[all-commits] [llvm/llvm-project] a1f1bd: [IPSCCP] Switch away from Instruction::isSafeToRem...

Kevin P. Neal via All-commits all-commits at lists.llvm.org
Mon Jun 6 06:24:46 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1f1bd547b0d4c4b200dd485b85366bcd24c84c0
      https://github.com/llvm/llvm-project/commit/a1f1bd547b0d4c4b200dd485b85366bcd24c84c0
  Author: Kevin P. Neal <kevin.neal at sas.com>
  Date:   2022-06-06 (Mon, 06 Jun 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/SCCP.cpp

  Log Message:
  -----------
  [IPSCCP] Switch away from Instruction::isSafeToRemove()

In D115737 I found that I needed to teach Instruction::isSafeToRemove()
about strictfp/constrained intrinsics. It was pointed out that this is
probably the wrong function to use isInstructionTriviallyDead(). It doesn't
make sense to have a "second, worse implementation".

I also believe that the Instruction class is the wrong place for this
functionality. The information about whether or not an instruction can be
removed is in the transform passes and should stay there.

Differential Revision: https://reviews.llvm.org/D118387




More information about the All-commits mailing list