[PATCH] D29092: PR31729: [GVNHoist] Don't hoist unsafe scalars at -Oz

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 17:30:16 PST 2017


efriedma added a comment.

> Thanks for the feedback. GVNHoist does that. Please see the GVNHoist:298 hoistingFromAllPaths(). It will hoist instructions only when they are very busy.

Oh, okay.  That's... the right sort of thing, but I think it's missing some checks.  The most obvious hole is that you need to call isGuaranteedToTransferExecutionToSuccessor on each instruction in the block, not just the terminator.  It also looks like it doesn't handle infinite loops correctly.


https://reviews.llvm.org/D29092





More information about the llvm-commits mailing list