[PATCH] D118387: [NFC][IPSCCP] Switch away from Instruction::isSafeToRemove()

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 22 04:53:17 PDT 2022


sepavloff added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/SCCP.cpp:98
+
+  return (!isa<CallInst>(I) || !I->mayHaveSideEffects()) && !I->isTerminator();
+}
----------------
This check is almost the same as used by `Instruction::isSafeToRemove`, but the latter also checks for `isEHPad`. Why this check is omitted here? Would it be more consistent just to call `isSafeToRemove`?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118387/new/

https://reviews.llvm.org/D118387



More information about the llvm-commits mailing list