[PATCH] D76434: [SCEV] Query for immediate cost in Expander

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 09:12:21 PDT 2020


samparker added a comment.

The API is there to figure out whether the constant will be folded into the given instruction, otherwise there will be some 'cost' to materialize it. Having to generate instruction(s) for the materialization is likely to increase code size, but more importantly, reduce throughput and increase latency - which is why it's sometimes beneficial to hoist expensive constants out of loops.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76434/new/

https://reviews.llvm.org/D76434





More information about the llvm-commits mailing list