From 2a4ed82ce2ba4a02f2a02eb4ed8ce5186f3f93da Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 25 Jun 2009 21:21:14 +0000 Subject: allow setting target operand flags on TargetGlobalAddress nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74203 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/SelectionDAG.h | 8 +++++--- include/llvm/CodeGen/SelectionDAGNodes.h | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'include/llvm/CodeGen') diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 36b680dab6..38008fb114 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -278,10 +278,12 @@ public: return getConstantFP(Val, VT, true); } SDValue getGlobalAddress(const GlobalValue *GV, MVT VT, - int64_t offset = 0, bool isTargetGA = false); + int64_t offset = 0, bool isTargetGA = false, + unsigned char TargetFlags = 0); SDValue getTargetGlobalAddress(const GlobalValue *GV, MVT VT, - int64_t offset = 0) { - return getGlobalAddress(GV, VT, offset, true); + int64_t offset = 0, + unsigned char TargetFlags = 0) { + return getGlobalAddress(GV, VT, offset, true, TargetFlags); } SDValue getFrameIndex(int FI, MVT VT, bool isTarget = false); SDValue getTargetFrameIndex(int FI, MVT VT) { diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 1e8bee46d7..9c62361e52 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1819,13 +1819,15 @@ public: class GlobalAddressSDNode : public SDNode { GlobalValue *TheGlobal; int64_t Offset; + unsigned char TargetFlags; friend class SelectionDAG; GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT VT, - int64_t o = 0); + int64_t o, unsigned char TargetFlags); public: GlobalValue *getGlobal() const { return TheGlobal; } int64_t getOffset() const { return Offset; } + unsigned char getTargetFlags() const { return TargetFlags; } // Return the address space this GlobalAddress belongs to. unsigned getAddressSpace() const; -- cgit v1.2.3-70-g09d2