[llvm] 1771d81 - [Attributor] Allow to delete (assume) intrinsics outside the SCC
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 20:35:34 PST 2023
Author: Johannes Doerfert
Date: 2023-01-23T20:32:07-08:00
New Revision: 1771d81475e335d36cea22032aed2dbee0dee077
URL: https://github.com/llvm/llvm-project/commit/1771d81475e335d36cea22032aed2dbee0dee077
DIFF: https://github.com/llvm/llvm-project/commit/1771d81475e335d36cea22032aed2dbee0dee077.diff
LOG: [Attributor] Allow to delete (assume) intrinsics outside the SCC
Added:
Modified:
llvm/lib/Transforms/IPO/Attributor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp
index ee70a3980eba..b9134ce26e80 100644
--- a/llvm/lib/Transforms/IPO/Attributor.cpp
+++ b/llvm/lib/Transforms/IPO/Attributor.cpp
@@ -2354,7 +2354,7 @@ ChangeStatus Attributor::cleanupIR() {
for (const auto &V : ToBeDeletedInsts) {
if (Instruction *I = dyn_cast_or_null<Instruction>(V)) {
if (auto *CB = dyn_cast<CallBase>(I)) {
- assert(isRunOn(*I->getFunction()) &&
+ assert((isa<IntrinsicInst>(CB) || isRunOn(*I->getFunction())) &&
"Cannot delete an instruction outside the current SCC!");
if (!isa<IntrinsicInst>(CB))
Configuration.CGUpdater.removeCallSite(*CB);
More information about the llvm-commits
mailing list