aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorLauro Ramos Venancio <lauro.venancio@gmail.com>2007-04-21 20:56:26 +0000
committerLauro Ramos Venancio <lauro.venancio@gmail.com>2007-04-21 20:56:26 +0000
commit2c5c111b6c144b05718404c85b9dfcc76b1619e7 (patch)
treedc04a6a623b3d509a400671ff97fa2f21edaca6c /lib/CodeGen
parent7022d1fb2dbd65fa680d67e9598414ff958d07c2 (diff)
downloadexternal_llvm-2c5c111b6c144b05718404c85b9dfcc76b1619e7.zip
external_llvm-2c5c111b6c144b05718404c85b9dfcc76b1619e7.tar.gz
external_llvm-2c5c111b6c144b05718404c85b9dfcc76b1619e7.tar.bz2
X86 TLS: Implement review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36318 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 75fbf8a..05348da 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -13,7 +13,6 @@
#include "llvm/CodeGen/SelectionDAG.h"
#include "llvm/Constants.h"
-#include "llvm/GlobalValue.h"
#include "llvm/GlobalVariable.h"
#include "llvm/Intrinsics.h"
#include "llvm/Assembly/Writer.h"
@@ -2573,6 +2572,17 @@ HandleSDNode::~HandleSDNode() {
MorphNodeTo(ISD::HANDLENODE, VTs, 0, 0); // Drops operand uses.
}
+GlobalAddressSDNode::GlobalAddressSDNode(bool isTarget, const GlobalValue *GA,
+ MVT::ValueType VT, int o)
+ : SDNode(isa<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);
+}
/// Profile - Gather unique data for the node.
///