[PATCH] D43142: Experimental pass to convert all floating point operations to the equivalent constrained intrinsics

Andy Kaylor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 2 11:12:59 PDT 2018


andrew.w.kaylor added a comment.

In https://reviews.llvm.org/D43142#1285602, @cameron.mcinally wrote:

> In https://reviews.llvm.org/D43142#1285565, @kpn wrote:
>
> > If all optimizations including constant folding, or at least optimizations on floating point, are delayed until after inlining then there's no problem.
>
>
> I'll add that this is a ton of work. A binary Instruction can't currently have two Constant operands. So, ConstantFolding is baked into the Instruction implementation right now. If I'm mistaken, someone please correct me.
>
> I'm not an expert on inlining, but I imagine there are challenges moving it to 1st in the pass order too. I could see it being difficult to analyze cost on an unoptimized, non-canonical IR.


We really can't defer optimizations that occur before inlining. The legacy pass manager is specifically structured so that the function simplification passes and the inlining pass are layered such that the function simplification passes are run on a function before we decide whether or not to inline it and then run again on the calling functions so that if we did inline the code can be simplified again in its new context before we decide whether or not to inline that function. I'm not sure how the new pass manager manages this dance, but I'm certain that it must have the same effective ordering.


https://reviews.llvm.org/D43142





More information about the llvm-commits mailing list