#include "llvm/ADT/iterator"
#include "llvm/ADT/APFloat.h"
#include "llvm/CodeGen/ValueTypes.h"
-#include "llvm/CodeGen/MemOperand.h"
#include "llvm/Support/DataTypes.h"
#include <cassert>
/// FP_EXTEND(FP_ROUND(X,0)) because the extra bits aren't removed.
FP_ROUND,
- // FLT_ROUNDS - Returns current rounding mode:
+ // FLT_ROUNDS_ - Returns current rounding mode:
// -1 Undefined
// 0 Round to 0
// 1 Round to nearest
// 2 Round to +inf
// 3 Round to -inf
- FLT_ROUNDS,
+ FLT_ROUNDS_,
/// X = FP_ROUND_INREG(Y, VT) - This operator takes an FP register, and
/// rounds it to a floating point value. It then promotes it and returns it
// returns a chain.
// Operand #0 : input chain.
// Operand #1 : module unique number use to identify the label.
+ // Operand #2 : 0 indicates a debug label (e.g. stoppoint), 1 indicates
+ // a EH label, 2 indicates unknown label type.
LABEL,
+
+ // DECLARE - Represents a llvm.dbg.declare intrinsic. It's used to track
+ // local variable declarations for debugging information. First operand is
+ // a chain, while the next two operands are first two arguments (address
+ // and variable) of a llvm.dbg.declare instruction.
+ DECLARE,
// STACKSAVE - STACKSAVE has one operand, an input chain. It produces a
// value, the same type as the pointer type for the system, and an output
// pointer, and a SRCVALUE.
VAEND, VASTART,
- // SRCVALUE - This is a node type that holds a Value* that is used to
- // make reference to a value in the LLVM IR.
+ // SRCVALUE - This corresponds to a Value*, and is used to associate memory
+ // locations with their value. This allows one use alias analysis
+ // information in the backend.
SRCVALUE,
- // MEMOPERAND - This is a node that contains a MemOperand which records
- // information about a memory reference. This is used to make AliasAnalysis
- // queries from the backend.
- MEMOPERAND,
-
// PCMARKER - This corresponds to the pcmarker intrinsic.
PCMARKER,
/// isBuildVectorAllZeros - Return true if the specified node is a
/// BUILD_VECTOR where all of the elements are 0 or undef.
bool isBuildVectorAllZeros(const SDNode *N);
+
+ /// isDebugLabel - Return true if the specified node represents a debug
+ /// label (i.e. ISD::LABEL or TargetInstrInfo::LABEL node and third operand
+ /// is 0).
+ bool isDebugLabel(const SDNode *N);
//===--------------------------------------------------------------------===//
/// MemIndexedMode enum - This enum defines the load / store indexed
class SrcValueSDNode : public SDNode {
const Value *V;
+ int offset;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
protected:
friend class SelectionDAG;
- /// Create a SrcValue for a general value.
- explicit SrcValueSDNode(const Value *v)
- : SDNode(ISD::SRCVALUE, getSDVTList(MVT::Other)), V(v) {}
+ SrcValueSDNode(const Value* v, int o)
+ : SDNode(ISD::SRCVALUE, getSDVTList(MVT::Other)), V(v), offset(o) {
+ }
public:
- /// getValue - return the contained Value.
const Value *getValue() const { return V; }
+ int getOffset() const { return offset; }
static bool classof(const SrcValueSDNode *) { return true; }
static bool classof(const SDNode *N) {
};
-/// MemOperandSDNode - An SDNode that holds a MemOperand. This is
-/// used to represent a reference to memory after ISD::LOAD
-/// and ISD::STORE have been lowered.
-///
-class MemOperandSDNode : public SDNode {
- virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
-protected:
- friend class SelectionDAG;
- /// Create a MemOperand node
- explicit MemOperandSDNode(MemOperand mo)
- : SDNode(ISD::MEMOPERAND, getSDVTList(MVT::Other)), MO(mo) {}
-
-public:
- /// MO - The contained MemOperand.
- const MemOperand MO;
-
- static bool classof(const MemOperandSDNode *) { return true; }
- static bool classof(const SDNode *N) {
- return N->getOpcode() == ISD::MEMOPERAND;
- }
-};
-
-
class RegisterSDNode : public SDNode {
unsigned Reg;
virtual void ANCHOR(); // Out-of-line virtual method to give class a home.
/// isUnindexed - Return true if this is NOT a pre/post inc/dec load/store.
bool isUnindexed() const { return AddrMode == ISD::UNINDEXED; }
- /// getMemOperand - Return a MemOperand object describing the memory
- /// reference performed by this load or store.
- MemOperand getMemOperand() const;
-
static bool classof(const LSBaseSDNode *N) { return true; }
static bool classof(const SDNode *N) {
return N->getOpcode() == ISD::LOAD ||