summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/AsmWriter.cpp
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/lib/IR/AsmWriter.cpp
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/lib/IR/AsmWriter.cpp')
-rw-r--r--llvm/lib/IR/AsmWriter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/IR/AsmWriter.cpp b/llvm/lib/IR/AsmWriter.cpp
index 6e3b853b391..dc337c16a60 100644
--- a/llvm/lib/IR/AsmWriter.cpp
+++ b/llvm/lib/IR/AsmWriter.cpp
@@ -1459,6 +1459,7 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
if (GV->hasUnnamedAddr()) Out << "unnamed_addr ";
if (GV->isExternallyInitialized()) Out << "externally_initialized ";
Out << (GV->isConstant() ? "constant " : "global ");
+ if (!GV->AddressMaybeTaken()) Out << "notaddrtaken ";
TypePrinter.print(GV->getType()->getElementType(), Out);
if (GV->hasInitializer()) {
OpenPOWER on IntegriCloud