Skip to content

Commit

Permalink
[LLParser] Remove redundant remangling (NFCI)
Browse files Browse the repository at this point in the history
UpgradeCallsToIntrinsic() is already intended to perform remangling
in case no other upgrades are necessary. The additional
remangleIntrinsicFunction() calls are not needed and can hide bugs
in the UpgradeCallsToIntrinsic() implementation.
  • Loading branch information
nikic committed Oct 21, 2022
1 parent d25ef09 commit befb731
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions llvm/lib/AsmParser/LLParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,16 +303,6 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
for (Function &F : llvm::make_early_inc_range(*M))
UpgradeCallsToIntrinsic(&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.
for (Function &F : llvm::make_early_inc_range(*M)) {
if (auto Remangled = Intrinsic::remangleIntrinsicFunction(&F)) {
F.replaceAllUsesWith(*Remangled);
F.eraseFromParent();
}
}

if (UpgradeDebugInfo)
llvm::UpgradeDebugInfo(*M);

Expand Down

0 comments on commit befb731

Please sign in to comment.