diff options
author | Shuxin Yang <shuxin.llvm@gmail.com> | 2013-10-23 17:28:19 +0000 |
---|---|---|
committer | Shuxin Yang <shuxin.llvm@gmail.com> | 2013-10-23 17:28:19 +0000 |
commit | e4fb375995def5029b94b5af708dd181be36ca01 (patch) | |
tree | 0aeb1e181522138b9b4899031276aa82e4648e7e /llvm/lib/Bitcode/Reader | |
parent | 2ea0f2cdaef1d5c8a01acb2a9d9437215a0e0e00 (diff) | |
download | bcm5719-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/Bitcode/Reader')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index e408cd1f981..3fca4ab8e0d 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1848,6 +1848,9 @@ bool BitcodeReader::ParseModule(bool Resume) { new GlobalVariable(*TheModule, Ty, isConstant, Linkage, 0, "", 0, TLM, AddressSpace, ExternallyInitialized); NewGV->setAlignment(Alignment); + if (Record.size() > 10) + NewGV->setAddressMaybeTaken(Record[10]); + if (!Section.empty()) NewGV->setSection(Section); NewGV->setVisibility(Visibility); |