[llvm-dev] Conditional analysis before inliner
Friedman, Eli via llvm-dev
llvm-dev at lists.llvm.org
Fri Apr 20 10:55:21 PDT 2018
On 4/19/2018 1:57 PM, Anom LLVM via llvm-dev wrote:
> Hi,
>
> I have pass phase ordering question.
>
> I am interested in performing a transformation that matches several
> LLVM IR instructions and converts them to a single builtin. This sort
> of transformation must occur prior to inlining because inlining needs
> to analyze cost of the builtin. However, the LLVM IR -> builtin
> transformation requires scalar evolution which typically doesn't run
> until after the inliner.
This isn't right, or at least, not the complete picture; loop
optimization passes run interleaved with the inliner. (Try looking at
the output of "-debug-pass=Executions" to see exactly what's happening.)
> My question is, is there a way to run scalar evolution conditionally
> prior to inlining? I'd like to leave compile time unaffected if my
> code doesn't contain any of these builtins.
ScalarEvolution is lazy, so it's essentially free if you don't query it.
-Eli
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
More information about the llvm-dev
mailing list