summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorShuxin Yang <shuxin.llvm@gmail.com>2013-10-23 17:28:19 +0000
committerShuxin Yang <shuxin.llvm@gmail.com>2013-10-23 17:28:19 +0000
commite4fb375995def5029b94b5af708dd181be36ca01 (patch)
tree0aeb1e181522138b9b4899031276aa82e4648e7e /llvm/include
parent2ea0f2cdaef1d5c8a01acb2a9d9437215a0e0e00 (diff)
downloadbcm5719-llvm-e4fb375995def5029b94b5af708dd181be36ca01.tar.gz
bcm5719-llvm-e4fb375995def5029b94b5af708dd181be36ca01.zip
Use address-taken to disambiguate global variable and indirect memops.
Major steps include: 1). introduces a not-addr-taken bit-field in GlobalVariable 2). GlobalOpt pass sets "not-address-taken" if it proves a global varirable dosen't have its address taken. 3). AA use this info for disambiguation. llvm-svn: 193251
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/IR/GlobalVariable.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/GlobalVariable.h b/llvm/include/llvm/IR/GlobalVariable.h
index bfed50786ea..a5ab97db239 100644
--- a/llvm/include/llvm/IR/GlobalVariable.h
+++ b/llvm/include/llvm/IR/GlobalVariable.h
@@ -48,6 +48,7 @@ class GlobalVariable : public GlobalValue, public ilist_node<GlobalVariable> {
// can change from its initial
// value before global
// initializers are run?
+ bool notAddrTaken : 1; // Dose not have address taken.
public:
// allocate space for exactly one operand
@@ -174,6 +175,9 @@ public:
isExternallyInitializedConstant = Val;
}
+ void setAddressMaybeTaken(bool Val) { notAddrTaken = !Val; }
+ bool AddressMaybeTaken(void) const { return !notAddrTaken; }
+
/// copyAttributesFrom - copy all additional attributes (those not needed to
/// create a GlobalVariable) from the GlobalVariable Src to this one.
void copyAttributesFrom(const GlobalValue *Src);
OpenPOWER on IntegriCloud