diff options
author | Nikita Popov <npopov@redhat.com> | 2022-10-21 11:49:42 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-10-21 11:50:09 +0200 |
commit | c028329787c7da9ca83bb12ba8c5d66b3551a94d (patch) | |
tree | 4ff2cf51779637bca72db9ec7bf29081a73f237d /llvm/lib/Bitcode/Reader/BitcodeReader.cpp | |
parent | 5ca77541446d7040638b53e0ddff3f76ee005681 (diff) | |
download | llvm-c028329787c7da9ca83bb12ba8c5d66b3551a94d.zip llvm-c028329787c7da9ca83bb12ba8c5d66b3551a94d.tar.gz llvm-c028329787c7da9ca83bb12ba8c5d66b3551a94d.tar.bz2 |
[Bitcode] Remove redundant intrinsic remangling (NFCI)
UpgradeIntrinsicFunction() is supposed to handle this already.
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index cfbc5fa..217c7db 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -627,8 +627,6 @@ class BitcodeReader : public BitcodeReaderBase, public GVMaterializer { // stored here with their replacement function. using UpdatedIntrinsicMap = DenseMap<Function *, Function *>; UpdatedIntrinsicMap UpgradedIntrinsics; - // Intrinsics which were remangled because of types rename - UpdatedIntrinsicMap RemangledIntrinsics; // Several operations happen after the module header has been read, but // before function bodies are processed. This keeps track of whether @@ -3570,11 +3568,6 @@ Error BitcodeReader::globalCleanup() { Function *NewFn; if (UpgradeIntrinsicFunction(&F, NewFn)) UpgradedIntrinsics[&F] = NewFn; - else if (auto Remangled = Intrinsic::remangleIntrinsicFunction(&F)) - // Some types could be renamed during loading if several modules are - // loaded in the same LLVMContext (LTO scenario). In this case we should - // remangle intrinsics names as well. - RemangledIntrinsics[&F] = *Remangled; // Look for functions that rely on old function attribute behavior. UpgradeFunctionAttributes(F); } @@ -6461,12 +6454,6 @@ Error BitcodeReader::materialize(GlobalValue *GV) { UpgradeIntrinsicCall(CI, I.second); } - // Update calls to the remangled intrinsics - for (auto &I : RemangledIntrinsics) - for (User *U : llvm::make_early_inc_range(I.first->materialized_users())) - // Don't expect any other users than call sites - cast<CallBase>(U)->setCalledFunction(I.second); - // Finish fn->subprogram upgrade for materialized functions. if (DISubprogram *SP = MDLoader->lookupSubprogramForFunction(F)) F->setSubprogram(SP); @@ -6571,12 +6558,6 @@ Error BitcodeReader::materializeModule() { I.first->eraseFromParent(); } UpgradedIntrinsics.clear(); - // Do the same for remangled intrinsics - for (auto &I : RemangledIntrinsics) { - I.first->replaceAllUsesWith(I.second); - I.first->eraseFromParent(); - } - RemangledIntrinsics.clear(); UpgradeDebugInfo(*TheModule); |