[PATCH] D101553: [Loads] Ignore type test assume sequences inserted for devirtualization
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 4 11:47:35 PDT 2021
tejohnson added inline comments.
================
Comment at: llvm/lib/Analysis/Loads.cpp:633-643
+ // Ignore unrelated instruction types that in particular may only be
+ // inserted under special compile modes. The scan limit is set quite small
+ // (6 instructions) by default, so these can have an outsized effect on this
+ // optimization. Additionally, if these instructions are only applied when
+ // feeding back instrumentation PGO, different optimization can affect
+ // matching. Specifically, it is not uncommon to apply -g or whole program
+ // devirtualization (which results in bitcast / llvm.type.test / llvm.assume
----------------
Prazek wrote:
> nit: This comment (which is very useful) is a big duplication in code.
> What do you think of wrapping this chunk of code to a function, so that either logic, or the comment will not get out of sync?
> Something like:
>
> if (isUnrelatedToLoadOrStore(Inst)) // Probably could be named better.
> continue;
I ended up simplifying this code which meant it no longer required a big comment about these particular instruction types.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101553/new/
https://reviews.llvm.org/D101553
More information about the llvm-commits
mailing list