LLVM API Documentation
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/CallingConv.h"
#include "llvm/Constants.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Visibility.h"
#include <iostream>
#include <map>
Include dependency graph for LegalizeDAG.cpp:
Go to the source code of this file.
Functions | |
static unsigned | getScalarizedOpcode (unsigned VecOp, MVT::ValueType VT) |
static void | ComputeTopDownOrdering (SDNode *N, std::vector< SDNode * > &Order, std::map< SDNode *, unsigned > &Visited) |
static SDNode * | FindCallEndFromCallStart (SDNode *Node) |
static SDNode * | FindCallStartFromCallEnd (SDNode *Node) |
Variables | |
static cl::opt< bool > | ViewLegalizeDAGs ("view-legalize-dags", cl::Hidden, cl::desc("Pop up a window to show dags before legalize")) |
static void ComputeTopDownOrdering | ( | SDNode * | N, | |
std::vector< SDNode * > & | Order, | |||
std::map< SDNode *, unsigned > & | Visited | |||
) | [static] |
ComputeTopDownOrdering - Add the specified node to the Order list if it has not been visited yet and if all of its operands have already been visited.
Definition at line 289 of file LegalizeDAG.cpp.
References E, and llvm::SDNode::getNumOperands().
FindCallEndFromCallStart - Given a chained node that is part of a call sequence, find the CALLSEQ_END node that terminates the call sequence.
Definition at line 358 of file LegalizeDAG.cpp.
References llvm::ISD::CALLSEQ_END, E, llvm::SDNode::getOpcode(), Node, llvm::MVT::Other, and llvm::SDNode::use_empty().
FindCallStartFromCallEnd - Given a chained node that is part of a call sequence, find the CALLSEQ_START node that initiates the call sequence.
Definition at line 398 of file LegalizeDAG.cpp.
References llvm::ISD::CALLSEQ_START, llvm::SDNode::getOpcode(), llvm::SDNode::getOperand(), llvm::SDOperand::getValueType(), Node, and llvm::MVT::Other.
static unsigned getScalarizedOpcode | ( | unsigned | VecOp, | |
MVT::ValueType | VT | |||
) | [static] |
getScalarizedOpcode - Return the scalar opcode that corresponds to the specified vector opcode.
Definition at line 266 of file LegalizeDAG.cpp.
References ADD, AND, llvm::ISD::FADD, llvm::ISD::FDIV, llvm::ISD::FMUL, llvm::ISD::FSUB, llvm::MVT::isInteger(), MUL, OR, llvm::ISD::SDIV, SUB, llvm::ISD::UDIV, llvm::ISD::VADD, llvm::ISD::VAND, llvm::ISD::VMUL, llvm::ISD::VOR, llvm::ISD::VSDIV, llvm::ISD::VSUB, llvm::ISD::VUDIV, llvm::ISD::VXOR, and XOR.
Definition at line 52 of file LegalizeDAG.cpp.
std::map<SDOperand, std::pair<SDOperand, SDOperand> > ExpandedNodes |
ExpandedNodes - For nodes that need to be expanded this map indicates which which operands are the expanded version of the input. This allows us to avoid expanding the same node more than once.
Definition at line 90 of file LegalizeDAG.cpp.
bool IsLegalizingCall |
IsLegalizingCall - This member is used *only* for purposes of providing helpful assertions that a libcall isn't created while another call is being legalized (which could lead to non-serialized call sequences).
Definition at line 64 of file LegalizeDAG.cpp.
LastCALLSEQ_END - This keeps track of the CALLSEQ_END node that has been legalized. We use this to ensure that calls are properly serialized against each other, including inserted libcalls.
Definition at line 59 of file LegalizeDAG.cpp.
std::map<SDOperand, SDOperand> LegalizedNodes |
LegalizedNodes - For nodes that are of legal width, and that have more than one use, this map indicates what regularized operand to use. This allows us to avoid legalizing the same thing more than once.
Definition at line 80 of file LegalizeDAG.cpp.
std::map<SDOperand, SDOperand> PackedNodes |
PackedNodes - For nodes that need to be packed from MVT::Vector types to concrete packed types, this contains the mapping of ones we have already processed to the result.
Definition at line 100 of file LegalizeDAG.cpp.
std::map<SDOperand, SDOperand> PromotedNodes |
PromotedNodes - For nodes that are below legal width, and that have more than one use, this map indicates what promoted value to use. This allows us to avoid promoting the same thing more than once.
Definition at line 85 of file LegalizeDAG.cpp.
std::map<SDOperand, std::pair<SDOperand, SDOperand> > SplitNodes |
SplitNodes - For vector nodes that need to be split, this map indicates which which operands are the split version of the input. This allows us to avoid splitting the same node more than once.
Definition at line 95 of file LegalizeDAG.cpp.
Definition at line 51 of file LegalizeDAG.cpp.
ValueTypeActions - This is a bitvector that contains two bits for each value type, where the two bits correspond to the LegalizeAction enum. This can be queried with "getTypeAction(VT)".
Definition at line 75 of file LegalizeDAG.cpp.
Referenced by SetValueTypeAction().
cl::opt<bool> ViewLegalizeDAGs("view-legalize-dags", cl::Hidden, cl::desc("Pop up a window to show dags before legalize")) [static] |