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)
commitd4bcefc7d9ff16710b2509e494614b5c08013567
treeb3737bb77e7daf33769e961cbb2cdf4e94d99faa
parentf924e11967750e5e269e063a22fc495799cfab6d
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.

llvm-svn: 220580
14 files changed:
llvm/include/llvm/IR/Function.h
llvm/include/llvm/IR/GVMaterializer.h
llvm/include/llvm/IR/GlobalObject.h
llvm/include/llvm/IR/GlobalValue.h
llvm/include/llvm/IR/Module.h
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.h
llvm/lib/IR/Function.cpp
llvm/lib/IR/Globals.cpp
llvm/lib/IR/Module.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Linker/LinkModules.cpp
llvm/lib/Object/IRObjectFile.cpp
llvm/tools/gold/gold-plugin.cpp