[PATCH] D147078: [LICM][BPF] Disable hoistMinMax() optimization for BPF target

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 10:05:38 PDT 2023


fhahn added a comment.

In D147078#4244246 <https://reviews.llvm.org/D147078#4244246>, @jrfastab wrote:

> I think the idea here is that not all transformations are generically good for all backends. There is a cost model for instructions could there be something similar for transformations as well? Then BPF could mark the cost here somewhat high noting it doesn't actually provide value?

Agreed that some transformations are driven by backend cost decisions. But there are also canonicalization transforms where one of the main goals is transforming the IR into a form that's easier for other passes & analysis to handle. LICM is at least partly performs general canonicalization which is completely target-independent. Another example of this is that LICM completely ignores register pressure (i.e. target properties) when hoisting code (IIUC), relying on the backend to sink it back if needed.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147078



More information about the llvm-commits mailing list