[llvm-dev] Allowed operations for passes that report "no change"

Jay Foad via llvm-dev llvm-dev at lists.llvm.org
Tue Jul 21 04:12:30 PDT 2020


On Mon, 20 Jul 2020 at 08:21, Serge Guelton via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> > I agree. If a pass modifies the IR in any way, even temporarily, it was changed (at some point).
>  I'd like to +1, but when doing the migration of the code base to enable the associated expensive check, I found situations where (B) was used.

For example CodeGenPrepare has a TypePromotionTransaction class which
is specifically designed to let you modify the IR, then roll back
those modifications and return false.

Jay.


More information about the llvm-dev mailing list