diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-06-25 21:21:14 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-06-25 21:21:14 +0000 |
| commit | 2a4ed82ce2ba4a02f2a02eb4ed8ce5186f3f93da (patch) | |
| tree | 90fd0723cd274e432d095c9d81e0b76c17106a43 /include/llvm/CodeGen | |
| parent | 304f6a48b1232bdad8b2c0dff7c08d677826ef86 (diff) | |
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
Diffstat (limited to 'include/llvm/CodeGen')
| -rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 8 | ||||
| -rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 4 |
2 files changed, 8 insertions, 4 deletions
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; |
