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 327 of file TargetLowering.h.


Constructor & Destructor Documentation

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

Definition at line 332 of file TargetLowering.h.


Member Function Documentation

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

Definition at line 334 of file TargetLowering.h.

References New, O, 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 197 of file TargetLowering.cpp.

References llvm::ISD::AND, llvm::CallingConv::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 328 of file TargetLowering.h.

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

SDOperand llvm::TargetLowering::TargetLoweringOpt::New

Definition at line 330 of file TargetLowering.h.

Referenced by CombineTo(), and ShrinkDemandedConstant().

SDOperand llvm::TargetLowering::TargetLoweringOpt::Old

Definition at line 329 of file TargetLowering.h.

Referenced by CombineTo().


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