summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/AsmPrinter.h8
-rw-r--r--include/llvm/CodeGen/JITCodeEmitter.h28
-rw-r--r--include/llvm/CodeGen/LatencyPriorityQueue.h11
-rw-r--r--include/llvm/CodeGen/LiveVariables.h32
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h13
-rw-r--r--include/llvm/CodeGen/MachineCodeEmitter.h44
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h16
-rw-r--r--include/llvm/CodeGen/MachineOperand.h4
-rw-r--r--include/llvm/CodeGen/Passes.h9
-rw-r--r--include/llvm/CodeGen/ScheduleDAG.h28
-rw-r--r--include/llvm/CodeGen/SelectionDAG.h14
-rw-r--r--include/llvm/CodeGen/SelectionDAGISel.h7
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h53
13 files changed, 136 insertions, 131 deletions
diff --git a/include/llvm/CodeGen/AsmPrinter.h b/include/llvm/CodeGen/AsmPrinter.h
index 109ff74c1b6d..9a07e31ac70b 100644
--- a/include/llvm/CodeGen/AsmPrinter.h
+++ b/include/llvm/CodeGen/AsmPrinter.h
@@ -297,7 +297,7 @@ namespace llvm {
/// EmitString - Emit a string with quotes and a null terminator.
/// Special characters are emitted properly.
/// @verbatim (Eg. '\t') @endverbatim
- void EmitString(const std::string &String) const;
+ void EmitString(const StringRef String) const;
void EmitString(const char *String, unsigned Size) const;
/// EmitFile - Emit a .file directive.
@@ -345,9 +345,11 @@ namespace llvm {
/// GetBlockAddressSymbol - Return the MCSymbol used to satisfy BlockAddress
/// uses of the specified basic block.
- MCSymbol *GetBlockAddressSymbol(const BlockAddress *BA) const;
+ MCSymbol *GetBlockAddressSymbol(const BlockAddress *BA,
+ const char *Suffix = "") const;
MCSymbol *GetBlockAddressSymbol(const Function *F,
- const BasicBlock *BB) const;
+ const BasicBlock *BB,
+ const char *Suffix = "") const;
/// EmitBasicBlockStart - This method prints the label for the specified
/// MachineBasicBlock, an alignment (if present) and a comment describing
diff --git a/include/llvm/CodeGen/JITCodeEmitter.h b/include/llvm/CodeGen/JITCodeEmitter.h
index 792fb5992336..ea3e59beab03 100644
--- a/include/llvm/CodeGen/JITCodeEmitter.h
+++ b/include/llvm/CodeGen/JITCodeEmitter.h
@@ -68,23 +68,29 @@ public:
///
virtual bool finishFunction(MachineFunction &F) = 0;
- /// startGVStub - This callback is invoked when the JIT needs the
- /// address of a GV (e.g. function) that has not been code generated yet.
- /// The StubSize specifies the total size required by the stub.
+ /// startGVStub - This callback is invoked when the JIT needs the address of a
+ /// GV (e.g. function) that has not been code generated yet. The StubSize
+ /// specifies the total size required by the stub. The BufferState must be
+ /// passed to finishGVStub, and start/finish pairs with the same BufferState
+ /// must be properly nested.
///
- virtual void startGVStub(const GlobalValue* GV, unsigned StubSize,
- unsigned Alignment = 1) = 0;
+ virtual void startGVStub(BufferState &BS, const GlobalValue* GV,
+ unsigned StubSize, unsigned Alignment = 1) = 0;
- /// startGVStub - This callback is invoked when the JIT needs the address of a
+ /// startGVStub - This callback is invoked when the JIT needs the address of a
/// GV (e.g. function) that has not been code generated yet. Buffer points to
- /// memory already allocated for this stub.
+ /// memory already allocated for this stub. The BufferState must be passed to
+ /// finishGVStub, and start/finish pairs with the same BufferState must be
+ /// properly nested.
///
- virtual void startGVStub(const GlobalValue* GV, void *Buffer,
+ virtual void startGVStub(BufferState &BS, void *Buffer,
unsigned StubSize) = 0;
-
- /// finishGVStub - This callback is invoked to terminate a GV stub.
+
+ /// finishGVStub - This callback is invoked to terminate a GV stub and returns
+ /// the start address of the stub. The BufferState must first have been
+ /// passed to startGVStub.
///
- virtual void *finishGVStub(const GlobalValue* F) = 0;
+ virtual void *finishGVStub(BufferState &BS) = 0;
/// emitByte - This callback is invoked when a byte needs to be written to the
/// output stream.
diff --git a/include/llvm/CodeGen/LatencyPriorityQueue.h b/include/llvm/CodeGen/LatencyPriorityQueue.h
index a7cebee6064e..7ac0418c9500 100644
--- a/include/llvm/CodeGen/LatencyPriorityQueue.h
+++ b/include/llvm/CodeGen/LatencyPriorityQueue.h
@@ -40,18 +40,11 @@ namespace llvm {
/// mobility.
std::vector<unsigned> NumNodesSolelyBlocking;
- /// IgnoreAntiDep - Ignore anti-dependencies
- bool IgnoreAntiDep;
-
/// Queue - The queue.
PriorityQueue<SUnit*, std::vector<SUnit*>, latency_sort> Queue;
public:
- LatencyPriorityQueue() : IgnoreAntiDep(false), Queue(latency_sort(this)) {
- }
-
- void setIgnoreAntiDep(bool ignore) {
- IgnoreAntiDep = ignore;
+ LatencyPriorityQueue() : Queue(latency_sort(this)) {
}
void initNodes(std::vector<SUnit> &sunits) {
@@ -72,7 +65,7 @@ public:
unsigned getLatency(unsigned NodeNum) const {
assert(NodeNum < (*SUnits).size());
- return (*SUnits)[NodeNum].getHeight(IgnoreAntiDep);
+ return (*SUnits)[NodeNum].getHeight();
}
unsigned getNumSolelyBlockNodes(unsigned NodeNum) const {
diff --git a/include/llvm/CodeGen/LiveVariables.h b/include/llvm/CodeGen/LiveVariables.h
index b2be569bc10a..39a4b89f54db 100644
--- a/include/llvm/CodeGen/LiveVariables.h
+++ b/include/llvm/CodeGen/LiveVariables.h
@@ -107,6 +107,13 @@ public:
/// findKill - Find a kill instruction in MBB. Return NULL if none is found.
MachineInstr *findKill(const MachineBasicBlock *MBB) const;
+ /// isLiveIn - Is Reg live in to MBB? This means that Reg is live through
+ /// MBB, or it is killed in MBB. If Reg is only used by PHI instructions in
+ /// MBB, it is not considered live in.
+ bool isLiveIn(const MachineBasicBlock &MBB,
+ unsigned Reg,
+ MachineRegisterInfo &MRI);
+
void dump() const;
};
@@ -156,8 +163,13 @@ private: // Intermediate data structures
SmallVector<unsigned, 4> &Defs);
void UpdatePhysRegDefs(MachineInstr *MI, SmallVector<unsigned, 4> &Defs);
- /// FindLastPartialDef - Return the last partial def of the specified register.
- /// Also returns the sub-registers that're defined by the instruction.
+ /// FindLastRefOrPartRef - Return the last reference or partial reference of
+ /// the specified register.
+ MachineInstr *FindLastRefOrPartRef(unsigned Reg);
+
+ /// FindLastPartialDef - Return the last partial def of the specified
+ /// register. Also returns the sub-registers that're defined by the
+ /// instruction.
MachineInstr *FindLastPartialDef(unsigned Reg,
SmallSet<unsigned,4> &PartDefRegs);
@@ -267,11 +279,17 @@ public:
void HandleVirtRegUse(unsigned reg, MachineBasicBlock *MBB,
MachineInstr *MI);
- /// addNewBlock - Add a new basic block BB as an empty succcessor to
- /// DomBB. All variables that are live out of DomBB will be marked as passing
- /// live through BB. This method assumes that the machine code is still in SSA
- /// form.
- void addNewBlock(MachineBasicBlock *BB, MachineBasicBlock *DomBB);
+ bool isLiveIn(unsigned Reg, const MachineBasicBlock &MBB) {
+ return getVarInfo(Reg).isLiveIn(MBB, Reg, *MRI);
+ }
+
+ /// addNewBlock - Add a new basic block BB between DomBB and SuccBB. All
+ /// variables that are live out of DomBB and live into SuccBB will be marked
+ /// as passing live through BB. This method assumes that the machine code is
+ /// still in SSA form.
+ void addNewBlock(MachineBasicBlock *BB,
+ MachineBasicBlock *DomBB,
+ MachineBasicBlock *SuccBB);
};
} // End llvm namespace
diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h
index bb50b5df4ca8..6b4c64055bf3 100644
--- a/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/include/llvm/CodeGen/MachineBasicBlock.h
@@ -92,10 +92,15 @@ class MachineBasicBlock : public ilist_node<MachineBasicBlock> {
public:
/// getBasicBlock - Return the LLVM basic block that this instance
- /// corresponded to originally.
+ /// corresponded to originally. Note that this may be NULL if this instance
+ /// does not correspond directly to an LLVM basic block.
///
const BasicBlock *getBasicBlock() const { return BB; }
+ /// getName - Return the name of the corresponding LLVM basic block, or
+ /// "(null)".
+ StringRef getName() const;
+
/// hasAddressTaken - Test whether this block is potentially the target
/// of an indirect branch.
bool hasAddressTaken() const { return AddressTaken; }
@@ -266,6 +271,12 @@ public:
/// ends with an unconditional branch to some other block.
bool isLayoutSuccessor(const MachineBasicBlock *MBB) const;
+ /// canFallThrough - Return true if the block can implicitly transfer
+ /// control to the block after it by falling off the end of it. This should
+ /// return false if it can reach the block after it, but it uses an explicit
+ /// branch to do so (e.g., a table jump). True is a conservative answer.
+ bool canFallThrough();
+
/// getFirstTerminator - returns an iterator to the first terminator
/// instruction of this basic block. If a terminator does not exist,
/// it returns end()
diff --git a/include/llvm/CodeGen/MachineCodeEmitter.h b/include/llvm/CodeGen/MachineCodeEmitter.h
index c55a9e65e453..791db003ead1 100644
--- a/include/llvm/CodeGen/MachineCodeEmitter.h
+++ b/include/llvm/CodeGen/MachineCodeEmitter.h
@@ -48,17 +48,41 @@ class Function;
/// occurred, more memory is allocated, and we reemit the code into it.
///
class MachineCodeEmitter {
+public:
+ class BufferState {
+ friend class MachineCodeEmitter;
+ /// BufferBegin/BufferEnd - Pointers to the start and end of the memory
+ /// allocated for this code buffer.
+ uint8_t *BufferBegin, *BufferEnd;
+
+ /// CurBufferPtr - Pointer to the next byte of memory to fill when emitting
+ /// code. This is guranteed to be in the range [BufferBegin,BufferEnd]. If
+ /// this pointer is at BufferEnd, it will never move due to code emission,
+ /// and all code emission requests will be ignored (this is the buffer
+ /// overflow condition).
+ uint8_t *CurBufferPtr;
+ public:
+ BufferState() : BufferBegin(NULL), BufferEnd(NULL), CurBufferPtr(NULL) {}
+ };
+
protected:
- /// BufferBegin/BufferEnd - Pointers to the start and end of the memory
- /// allocated for this code buffer.
- uint8_t *BufferBegin, *BufferEnd;
-
- /// CurBufferPtr - Pointer to the next byte of memory to fill when emitting
- /// code. This is guranteed to be in the range [BufferBegin,BufferEnd]. If
- /// this pointer is at BufferEnd, it will never move due to code emission, and
- /// all code emission requests will be ignored (this is the buffer overflow
- /// condition).
- uint8_t *CurBufferPtr;
+ /// These have the same meanings as the fields in BufferState
+ uint8_t *BufferBegin, *BufferEnd, *CurBufferPtr;
+
+ /// Save or restore the current buffer state. The BufferState objects must be
+ /// used as a stack.
+ void SaveStateTo(BufferState &BS) {
+ assert(BS.BufferBegin == NULL &&
+ "Can't save state into the same BufferState twice.");
+ BS.BufferBegin = BufferBegin;
+ BS.BufferEnd = BufferEnd;
+ BS.CurBufferPtr = CurBufferPtr;
+ }
+ void RestoreStateFrom(BufferState &BS) {
+ BufferBegin = BS.BufferBegin;
+ BufferEnd = BS.BufferEnd;
+ CurBufferPtr = BS.CurBufferPtr;
+ }
public:
virtual ~MachineCodeEmitter() {}
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index 47616ce3443d..bac9fce467e8 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -135,9 +135,6 @@ class MachineModuleInfo : public ImmutablePass {
/// llvm.compiler.used.
SmallPtrSet<const Function *, 32> UsedFunctions;
- /// UsedDbgLabels - labels are used by debug info entries.
- SmallSet<unsigned, 8> UsedDbgLabels;
-
bool CallsEHReturn;
bool CallsUnwindInit;
@@ -232,19 +229,6 @@ public:
return LabelID ? LabelIDList[LabelID - 1] : 0;
}
- /// isDbgLabelUsed - Return true if label with LabelID is used by
- /// DwarfWriter.
- bool isDbgLabelUsed(unsigned LabelID) {
- return UsedDbgLabels.count(LabelID);
- }
-
- /// RecordUsedDbgLabel - Mark label with LabelID as used. This is used
- /// by DwarfWriter to inform DebugLabelFolder that certain labels are
- /// not to be deleted.
- void RecordUsedDbgLabel(unsigned LabelID) {
- UsedDbgLabels.insert(LabelID);
- }
-
/// getFrameMoves - Returns a reference to a list of moves done in the current
/// function's prologue. Used to construct frame maps for debug and exception
/// handling comsumers.
diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h
index eede2cc50ced..8748afcba92e 100644
--- a/include/llvm/CodeGen/MachineOperand.h
+++ b/include/llvm/CodeGen/MachineOperand.h
@@ -435,10 +435,12 @@ public:
Op.setTargetFlags(TargetFlags);
return Op;
}
- static MachineOperand CreateBA(BlockAddress *BA) {
+ static MachineOperand CreateBA(BlockAddress *BA,
+ unsigned char TargetFlags = 0) {
MachineOperand Op(MachineOperand::MO_BlockAddress);
Op.Contents.OffsetedInfo.Val.BA = BA;
Op.setOffset(0); // Offset is always 0.
+ Op.setTargetFlags(TargetFlags);
return Op;
}
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index d0d610370bd5..8e8970269e87 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -129,6 +129,10 @@ namespace llvm {
/// branches.
FunctionPass *createBranchFoldingPass(bool DefaultEnableTailMerge);
+ /// TailDuplicate Pass - Duplicate blocks with unconditional branches
+ /// into tails of their predecessors.
+ FunctionPass *createTailDuplicatePass();
+
/// IfConverter Pass - This pass performs machine code if conversion.
FunctionPass *createIfConverterPass();
@@ -136,11 +140,6 @@ namespace llvm {
/// headers to target specific alignment boundary.
FunctionPass *createCodePlacementOptPass();
- /// DebugLabelFoldingPass - This pass prunes out redundant debug labels. This
- /// allows a debug emitter to determine if the range of two labels is empty,
- /// by seeing if the labels map to the same reduced label.
- FunctionPass *createDebugLabelFoldingPass();
-
/// getRegisterAllocator - This creates an instance of the register allocator
/// for the Sparc.
FunctionPass *getRegisterAllocator(TargetMachine &T);
diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h
index d5e702031223..955965bccfa9 100644
--- a/include/llvm/CodeGen/ScheduleDAG.h
+++ b/include/llvm/CodeGen/ScheduleDAG.h
@@ -340,34 +340,30 @@ namespace llvm {
void removePred(const SDep &D);
/// getDepth - Return the depth of this node, which is the length of the
- /// maximum path up to any node with has no predecessors. If IgnoreAntiDep
- /// is true, ignore anti-dependence edges.
- unsigned getDepth(bool IgnoreAntiDep=false) const {
+ /// maximum path up to any node with has no predecessors.
+ unsigned getDepth() const {
if (!isDepthCurrent)
- const_cast<SUnit *>(this)->ComputeDepth(IgnoreAntiDep);
+ const_cast<SUnit *>(this)->ComputeDepth();
return Depth;
}
/// getHeight - Return the height of this node, which is the length of the
- /// maximum path down to any node with has no successors. If IgnoreAntiDep
- /// is true, ignore anti-dependence edges.
- unsigned getHeight(bool IgnoreAntiDep=false) const {
+ /// maximum path down to any node with has no successors.
+ unsigned getHeight() const {
if (!isHeightCurrent)
- const_cast<SUnit *>(this)->ComputeHeight(IgnoreAntiDep);
+ const_cast<SUnit *>(this)->ComputeHeight();
return Height;
}
/// setDepthToAtLeast - If NewDepth is greater than this node's
/// depth value, set it to be the new depth value. This also
- /// recursively marks successor nodes dirty. If IgnoreAntiDep is
- /// true, ignore anti-dependence edges.
- void setDepthToAtLeast(unsigned NewDepth, bool IgnoreAntiDep=false);
+ /// recursively marks successor nodes dirty.
+ void setDepthToAtLeast(unsigned NewDepth);
/// setDepthToAtLeast - If NewDepth is greater than this node's
/// depth value, set it to be the new height value. This also
- /// recursively marks predecessor nodes dirty. If IgnoreAntiDep is
- /// true, ignore anti-dependence edges.
- void setHeightToAtLeast(unsigned NewHeight, bool IgnoreAntiDep=false);
+ /// recursively marks predecessor nodes dirty.
+ void setHeightToAtLeast(unsigned NewHeight);
/// setDepthDirty - Set a flag in this node to indicate that its
/// stored Depth value will require recomputation the next time
@@ -400,8 +396,8 @@ namespace llvm {
void print(raw_ostream &O, const ScheduleDAG *G) const;
private:
- void ComputeDepth(bool IgnoreAntiDep);
- void ComputeHeight(bool IgnoreAntiDep);
+ void ComputeDepth();
+ void ComputeHeight();
};
//===--------------------------------------------------------------------===//
diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h
index 8400e86e7eaf..e5868079cda2 100644
--- a/include/llvm/CodeGen/SelectionDAG.h
+++ b/include/llvm/CodeGen/SelectionDAG.h
@@ -322,12 +322,10 @@ public:
unsigned char TargetFlags = 0);
SDValue getValueType(EVT);
SDValue getRegister(unsigned Reg, EVT VT);
- SDValue getDbgStopPoint(DebugLoc DL, SDValue Root,
- unsigned Line, unsigned Col, MDNode *CU);
SDValue getLabel(unsigned Opcode, DebugLoc dl, SDValue Root,
unsigned LabelID);
- SDValue getBlockAddress(BlockAddress *BA, DebugLoc dl,
- bool isTarget = false);
+ SDValue getBlockAddress(BlockAddress *BA, EVT VT,
+ bool isTarget = false, unsigned char TargetFlags = 0);
SDValue getCopyToReg(SDValue Chain, DebugLoc dl, unsigned Reg, SDValue N) {
return getNode(ISD::CopyToReg, dl, MVT::Other, Chain,
@@ -884,6 +882,14 @@ public:
/// element of the result of the vector shuffle.
SDValue getShuffleScalarElt(const ShuffleVectorSDNode *N, unsigned Idx);
+ /// UnrollVectorOp - Utility function used by legalize and lowering to
+ /// "unroll" a vector operation by splitting out the scalars and operating
+ /// on each element individually. If the ResNE is 0, fully unroll the vector
+ /// op. If ResNE is less than the width of the vector op, unroll up to ResNE.
+ /// If the ResNE is greater than the width of the vector op, unroll the
+ /// vector op and fill the end of the resulting vector with UNDEFS.
+ SDValue UnrollVectorOp(SDNode *N, unsigned ResNE = 0);
+
private:
bool RemoveNodeFromCSEMaps(SDNode *N);
void AddModifiedNodeToCSEMaps(SDNode *N, DAGUpdateListener *UpdateListener);
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h
index 5d33224cbe2a..4130d2c0a25a 100644
--- a/include/llvm/CodeGen/SelectionDAGISel.h
+++ b/include/llvm/CodeGen/SelectionDAGISel.h
@@ -23,7 +23,7 @@
namespace llvm {
class FastISel;
- class SelectionDAGLowering;
+ class SelectionDAGBuilder;
class SDValue;
class MachineRegisterInfo;
class MachineBasicBlock;
@@ -48,7 +48,7 @@ public:
MachineFunction *MF;
MachineRegisterInfo *RegInfo;
SelectionDAG *CurDAG;
- SelectionDAGLowering *SDL;
+ SelectionDAGBuilder *SDB;
MachineBasicBlock *BB;
AliasAnalysis *AA;
GCFunctionInfo *GFI;
@@ -127,7 +127,8 @@ private:
void SelectBasicBlock(BasicBlock *LLVMBB,
BasicBlock::iterator Begin,
- BasicBlock::iterator End);
+ BasicBlock::iterator End,
+ bool &HadTailCall);
void CodeGenAndEmitDAG();
void LowerArguments(BasicBlock *BB);
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index d4d40b13e45a..950fd322da2e 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -494,10 +494,9 @@ namespace ISD {
// Operand #last: Optional, an incoming flag.
INLINEASM,
- // DBG_LABEL, EH_LABEL - Represents a label in mid basic block used to track
+ // EH_LABEL - Represents a label in mid basic block used to track
// locations needed for debug and exception handling tables. These nodes
// take a chain as input and return a chain.
- DBG_LABEL,
EH_LABEL,
// STACKSAVE - STACKSAVE has one operand, an input chain. It produces a
@@ -546,18 +545,6 @@ namespace ISD {
// HANDLENODE node - Used as a handle for various purposes.
HANDLENODE,
- // DBG_STOPPOINT - This node is used to represent a source location for
- // debug info. It takes token chain as input, and carries a line number,
- // column number, and a pointer to a CompileUnit object identifying
- // the containing compilation unit. It produces a token chain as output.
- DBG_STOPPOINT,
-
- // DEBUG_LOC - This node is used to represent source line information
- // embedded in the code. It takes a token chain as input, then a line
- // number, then a column then a file id (provided by MachineModuleInfo.) It
- // produces a token chain as output.
- DEBUG_LOC,
-
// TRAMPOLINE - This corresponds to the init_trampoline intrinsic.
// It takes as input a token chain, the pointer to the trampoline,
// the pointer to the nested function, the pointer to pass for the
@@ -636,10 +623,6 @@ namespace ISD {
/// element is not an undef.
bool isScalarToVector(const SDNode *N);
- /// isDebugLabel - Return true if the specified node represents a debug
- /// label (i.e. ISD::DBG_LABEL or TargetInstrInfo::DBG_LABEL node).
- bool isDebugLabel(const SDNode *N);
-
//===--------------------------------------------------------------------===//
/// MemIndexedMode enum - This enum defines the load / store indexed
/// addressing modes.
@@ -2004,37 +1987,18 @@ public:
}
};
-class DbgStopPointSDNode : public SDNode {
- SDUse Chain;
- unsigned Line;
- unsigned Column;
- MDNode *CU;
- friend class SelectionDAG;
- DbgStopPointSDNode(SDValue ch, unsigned l, unsigned c,
- MDNode *cu)
- : SDNode(ISD::DBG_STOPPOINT, DebugLoc::getUnknownLoc(),
- getSDVTList(MVT::Other)), Line(l), Column(c), CU(cu) {
- InitOperands(&Chain, ch);
- }
-public:
- unsigned getLine() const { return Line; }
- unsigned getColumn() const { return Column; }
- MDNode *getCompileUnit() const { return CU; }
-
- static bool classof(const DbgStopPointSDNode *) { return true; }
- static bool classof(const SDNode *N) {
- return N->getOpcode() == ISD::DBG_STOPPOINT;
- }
-};
-
class BlockAddressSDNode : public SDNode {
BlockAddress *BA;
+ unsigned char TargetFlags;
friend class SelectionDAG;
- BlockAddressSDNode(unsigned NodeTy, DebugLoc dl, EVT VT, BlockAddress *ba)
- : SDNode(NodeTy, dl, getSDVTList(VT)), BA(ba) {
+ BlockAddressSDNode(unsigned NodeTy, EVT VT, BlockAddress *ba,
+ unsigned char Flags)
+ : SDNode(NodeTy, DebugLoc::getUnknownLoc(), getSDVTList(VT)),
+ BA(ba), TargetFlags(Flags) {
}
public:
BlockAddress *getBlockAddress() const { return BA; }
+ unsigned char getTargetFlags() const { return TargetFlags; }
static bool classof(const BlockAddressSDNode *) { return true; }
static bool classof(const SDNode *N) {
@@ -2056,8 +2020,7 @@ public:
static bool classof(const LabelSDNode *) { return true; }
static bool classof(const SDNode *N) {
- return N->getOpcode() == ISD::DBG_LABEL ||
- N->getOpcode() == ISD::EH_LABEL;
+ return N->getOpcode() == ISD::EH_LABEL;
}
};