[PATCH] D53174: X86/TargetTransformInfo: Report div/rem constant immediate costs as TCC_Free

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 15:36:37 PDT 2018


MatzeB added a comment.

In https://reviews.llvm.org/D53174#1262775, @MatzeB wrote:

> In https://reviews.llvm.org/D53174#1262762, @craig.topper wrote:
>
> > Or is moving them because its a loop and we don't want to reload it every iteration and don't trust LICM?
>
>
> I'm not completely sure. I see the code operating with block frequencies so it probably sees a lower block frequency in front of the loop.
>
> The pass itself currently runs relatively close to SelectionDAG so there is no LICM happening anymore. Though IMO it really should be implemented in SelectionDAG after everything is expanded and actually all constants are visible and not play all the games with hoisting constants between blocks.


Also with ConstantHoisting being a late SelectionDAG pass we could get rid of the terrible OpaqueConstant concept in SelectionDAG/DAGCombiner. (I'm not signing up to actually change this at this time though)


Repository:
  rL LLVM

https://reviews.llvm.org/D53174





More information about the llvm-commits mailing list