LLVM API Documentation

llvm::TargetLowering::TargetLoweringOpt Struct Reference

#include <TargetLowering.h>

Collaboration diagram for llvm::TargetLowering::TargetLoweringOpt:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TargetLoweringOpt (SelectionDAG &InDAG)
bool CombineTo (SDOperand O, SDOperand N)
bool ShrinkDemandedConstant (SDOperand Op, uint64_t Demanded)

Public Attributes

SelectionDAGDAG
SDOperand Old
SDOperand New

Detailed Description

TargetLoweringOpt - A convenience struct that encapsulates a DAG, and two SDOperands for returning information from TargetLowering to its clients that want to combine

Definition at line 337 of file TargetLowering.h.


Constructor & Destructor Documentation

llvm::TargetLowering::TargetLoweringOpt::TargetLoweringOpt ( SelectionDAG InDAG  )  [inline]

Definition at line 342 of file TargetLowering.h.


Member Function Documentation

bool llvm::TargetLowering::TargetLoweringOpt::CombineTo ( SDOperand  O,
SDOperand  N 
) [inline]

Definition at line 344 of file TargetLowering.h.

References New, and Old.

Referenced by ShrinkDemandedConstant(), and llvm::TargetLowering::SimplifyDemandedBits().

bool TargetLowering::TargetLoweringOpt::ShrinkDemandedConstant ( SDOperand  Op,
uint64_t  Demanded 
)

ShrinkDemandedConstant - Check to see if the specified operand of the specified instruction is a constant integer. If so, check to see if there are any bits set in the constant that are not demanded. If so, shrink the constant and return true.

Definition at line 198 of file TargetLowering.cpp.

References llvm::ISD::AND, C, CombineTo(), DAG, llvm::SelectionDAG::getConstant(), llvm::SelectionDAG::getNode(), New, Op, llvm::ISD::OR, and llvm::ISD::XOR.

Referenced by llvm::TargetLowering::SimplifyDemandedBits().


Member Data Documentation

SelectionDAG& llvm::TargetLowering::TargetLoweringOpt::DAG

Definition at line 338 of file TargetLowering.h.

Referenced by ShrinkDemandedConstant(), and llvm::TargetLowering::SimplifyDemandedBits().

SDOperand llvm::TargetLowering::TargetLoweringOpt::Old

Definition at line 339 of file TargetLowering.h.

Referenced by CombineTo().

SDOperand llvm::TargetLowering::TargetLoweringOpt::New

Definition at line 340 of file TargetLowering.h.

Referenced by CombineTo(), and ShrinkDemandedConstant().


The documentation for this struct was generated from the following files: