[llvm] befb731 - [LLParser] Remove redundant remangling (NFCI)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 21 01:55:55 PDT 2022


Author: Nikita Popov
Date: 2022-10-21T10:55:38+02:00
New Revision: befb731be64a60b97f857d18eaa40d68f8ba792d

URL: https://github.com/llvm/llvm-project/commit/befb731be64a60b97f857d18eaa40d68f8ba792d
DIFF: https://github.com/llvm/llvm-project/commit/befb731be64a60b97f857d18eaa40d68f8ba792d.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/AsmParser/LLParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp
index 052f4669cf6b0..922d081a2e318 100644
--- a/llvm/lib/AsmParser/LLParser.cpp
+++ b/llvm/lib/AsmParser/LLParser.cpp
@@ -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);
 


        


More information about the llvm-commits mailing list