Skip to content

Commit befb731

Browse files
committed
[LLParser] Remove redundant remangling (NFCI)
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.
1 parent d25ef09 commit befb731

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

llvm/lib/AsmParser/LLParser.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -303,16 +303,6 @@ bool LLParser::validateEndOfModule(bool UpgradeDebugInfo) {
303303
for (Function &F : llvm::make_early_inc_range(*M))
304304
UpgradeCallsToIntrinsic(&F);
305305

306-
// Some types could be renamed during loading if several modules are
307-
// loaded in the same LLVMContext (LTO scenario). In this case we should
308-
// remangle intrinsics names as well.
309-
for (Function &F : llvm::make_early_inc_range(*M)) {
310-
if (auto Remangled = Intrinsic::remangleIntrinsicFunction(&F)) {
311-
F.replaceAllUsesWith(*Remangled);
312-
F.eraseFromParent();
313-
}
314-
}
315-
316306
if (UpgradeDebugInfo)
317307
llvm::UpgradeDebugInfo(*M);
318308

0 commit comments

Comments
 (0)