[PATCH] D64557: Add llvm.loop.licm.disable metadata
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 09:20:56 PDT 2019
Meinersbur added inline comments.
================
Comment at: lib/Transforms/Scalar/LICM.cpp:335
+ // just exit.
+ if (hasDisableLICMTransformsHint(L)) {
+ return false;
----------------
There is a `hasDisableAllTransformsHint` (`llvm.loop.disable_nonforced`) metadata that was intended to disable all (high-level) loop transformations. The use case is to ensure that no pass changes the loop before a user-defined transformation is applied (e.g. a loop is not unrolled before `#pragma clang loop interleave(enable)` is applied).
The prefix `llvm.loop.` indicates that LICM is also such a loop transformation and therefore disabled by `llvm.loop.disable_nonforced`, but I don't think we want that.
Maybe use `llvm.licm.disable`?
Also, there are several schemes of enable/disable metadata. The other one to disable a transformations is e.g. `!{"llvm.loop.vectorize.enable", i1 0}`. I am not sure which one is preferable; we have the mix already anyway.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64557/new/
https://reviews.llvm.org/D64557
More information about the llvm-commits
mailing list