Don't ever call materializeAllPermanently during LTO.
authorRafael Espindola <rafael.espindola@gmail.com>
Fri, 24 Oct 2014 18:13:04 +0000 (18:13 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Fri, 24 Oct 2014 18:13:04 +0000 (18:13 +0000)
commit68b02dcd543f7c962dd0c4293044ebb629ab7360
tree0d43a34b7e81aade64134179b3e5a514f8b69655
parent51fa1bcef3346f3d127ae405dc0de6011c19be24
Don't ever call materializeAllPermanently during LTO.

To do this, change the representation of lazy loaded functions.

The previous representation cannot differentiate between a function whose body
has been removed and one whose body hasn't been read from the .bc file. That
means that in order to drop a function, the entire body had to be read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220580 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/IR/Function.h
include/llvm/IR/GVMaterializer.h
include/llvm/IR/GlobalObject.h
include/llvm/IR/GlobalValue.h
include/llvm/IR/Module.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Reader/BitcodeReader.h
lib/IR/Function.cpp
lib/IR/Globals.cpp
lib/IR/Module.cpp
lib/IR/Verifier.cpp
lib/Linker/LinkModules.cpp
lib/Object/IRObjectFile.cpp
tools/gold/gold-plugin.cpp