diff options
author | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-20 21:38:10 +0000 |
---|---|---|
committer | Lauro Ramos Venancio <lauro.venancio@gmail.com> | 2007-04-20 21:38:10 +0000 |
commit | b3a0417cad8b625acc3033bd5e24afb9ffd0b084 (patch) | |
tree | c691c028e9aa107d0cd0b091af7858a7f040b445 /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | e3e31c22bf7ebed9e8e00ede4f4aa87ce2225528 (diff) | |
download | external_llvm-b3a0417cad8b625acc3033bd5e24afb9ffd0b084.zip external_llvm-b3a0417cad8b625acc3033bd5e24afb9ffd0b084.tar.gz external_llvm-b3a0417cad8b625acc3033bd5e24afb9ffd0b084.tar.bz2 |
Implement "general dynamic", "initial exec" and "local exec" TLS models for
X86 32 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 74f405f..77d607a 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -19,6 +19,7 @@ #ifndef LLVM_CODEGEN_SELECTIONDAGNODES_H #define LLVM_CODEGEN_SELECTIONDAGNODES_H +#include "llvm/GlobalVariable.h" #include "llvm/Value.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/GraphTraits.h" @@ -95,7 +96,8 @@ namespace ISD { // Various leaf nodes. STRING, BasicBlock, VALUETYPE, CONDCODE, Register, Constant, ConstantFP, - GlobalAddress, FrameIndex, JumpTable, ConstantPool, ExternalSymbol, + GlobalAddress, GlobalTLSAddress, FrameIndex, + JumpTable, ConstantPool, ExternalSymbol, // The address of the GOT GLOBAL_OFFSET_TABLE, @@ -124,6 +126,7 @@ namespace ISD { // anything else with this node, and this is valid in the target-specific // dag, turning into a GlobalAddress operand. TargetGlobalAddress, + TargetGlobalTLSAddress, TargetFrameIndex, TargetJumpTable, TargetConstantPool, @@ -1164,7 +1167,12 @@ protected: friend class SelectionDAG; GlobalAddressSDNode(bool isTarget, const GlobalValue *GA, MVT::ValueType VT, int o = 0) - : SDNode(isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress, + : SDNode(dyn_cast<GlobalVariable>(GA) && + dyn_cast<GlobalVariable>(GA)->isThreadLocal() ? + // Thread Local + (isTarget ? ISD::TargetGlobalTLSAddress : ISD::GlobalTLSAddress) : + // Non Thread Local + (isTarget ? ISD::TargetGlobalAddress : ISD::GlobalAddress), getSDVTList(VT)), Offset(o) { TheGlobal = const_cast<GlobalValue*>(GA); } @@ -1176,11 +1184,12 @@ public: static bool classof(const GlobalAddressSDNode *) { return true; } static bool classof(const SDNode *N) { return N->getOpcode() == ISD::GlobalAddress || - N->getOpcode() == ISD::TargetGlobalAddress; + N->getOpcode() == ISD::TargetGlobalAddress || + N->getOpcode() == ISD::GlobalTLSAddress || + N->getOpcode() == ISD::TargetGlobalTLSAddress; } }; - class FrameIndexSDNode : public SDNode { int FI; virtual void ANCHOR(); // Out-of-line virtual method to give class a home. |