diff options
author | Eli Bendersky <eliben@chromium.org> | 2013-06-28 13:25:56 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@chromium.org> | 2013-06-28 13:25:56 -0700 |
commit | 331ef6ecbef4e3f3afa8ae627ad5b3528a534e04 (patch) | |
tree | 4440cd227f449d9d0ac0d7b97accab48a945876f /tools | |
parent | 46f7d96a210d9524fcb050a3e8bf5e0f65081442 (diff) |
Revert the IntrinsicLowering logic that preserves externals for intrinsics.
This is no longer required, following our recent PNaCl ABI cleanups.
BUG=None
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/18031017
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 11 | ||||
-rw-r--r-- | tools/lto/LTOModule.cpp | 13 |
2 files changed, 2 insertions, 22 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index cb0e41fff5..7a1c48c86c 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -18,7 +18,6 @@ #include "llvm/Analysis/Passes.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Bitcode/ReaderWriter.h" -#include "llvm/CodeGen/IntrinsicLowering.h" // @LOCALMOD #include "llvm/Config/config.h" #include "llvm/IR/Constants.h" #include "llvm/IR/DataLayout.h" @@ -72,16 +71,6 @@ LTOCodeGenerator::LTOCodeGenerator() InitializeAllTargets(); InitializeAllTargetMCs(); InitializeAllAsmPrinters(); - - // @LOCALMOD-BEGIN - // Preserve symbols which may be referenced due to the lowering - // of an intrinsic. - const llvm::StringSet<> &IntrinsicSymbols = IntrinsicLowering::GetFuncNames(); - for (llvm::StringSet<>::const_iterator it = IntrinsicSymbols.begin(), - ie = IntrinsicSymbols.end(); it != ie; ++it) { - _mustPreserveSymbols[it->getKey().str().c_str()] = 1; - } - // @LOCALMOD-END } LTOCodeGenerator::~LTOCodeGenerator() { diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp index be407056df..f9257294b1 100644 --- a/tools/lto/LTOModule.cpp +++ b/tools/lto/LTOModule.cpp @@ -16,7 +16,6 @@ #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/Triple.h" #include "llvm/Bitcode/ReaderWriter.h" -#include "llvm/CodeGen/IntrinsicLowering.h" // @LOCALMOD #include "llvm/IR/Constants.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/Module.h" @@ -307,12 +306,6 @@ LTOModule *LTOModule::makeLTOModule(MemoryBuffer *buffer, TargetMachine *target = march->createTargetMachine(TripleStr, CPU, FeatureStr, Options); - // @LOCALMOD-BEGIN - // Add declarations for functions which may be used by intrinsics. - IntrinsicLowering IL(*target->getDataLayout()); - IL.AddPrototypes(*m); - // @LOCALMOD-END - LTOModule *Ret = new LTOModule(m.take(), target); if (Ret->parseSymbols(errMsg)) { delete Ret; @@ -656,10 +649,8 @@ LTOModule::addPotentialUndefinedSymbol(const GlobalValue *decl, bool isFunc) { // @LOCALMOD-BEGIN // Bitcode modules may have declarations for functions or globals // which are unused. Ignore them here so that gold does not mistake - // them for undefined symbols. But don't ignore declarations for - // functions which are potentially used by intrinsics. - if (decl->use_empty() && - !IntrinsicLowering::IsCalledByIntrinsic(decl->getName())) + // them for undefined symbols. + if (decl->use_empty()) return; // @LOCALMOD-END |