[cfe-dev] Question on "phi-node-folding-threshold"

Craig Topper via cfe-dev cfe-dev at lists.llvm.org
Tue Sep 17 23:34:33 PDT 2019


You can set it on the command line by doing "clang -mllvm
-phi-node-folding-threshold=1”  The -mllvm tells clang to pass the next
argument through to the command line system used by IR passes.

~Craig


On Tue, Sep 17, 2019 at 11:05 PM Joan Lluch via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi All,
>
> For a custom backend I’m developing, where jumps are not particularly
> expensive, I want to reduce the phi-node-folding-threshold attribute
> value from the default 2 to just 1, as it produces better code in my case.
>
> I first tried to set the attribute as a clang command line option, but it
> does not seem to be available. ( I tried “clang
>  -phi-node-folding-threshold=1” but this returns an “unknown argument”
> error)
>
> However, it works as intended if I replace the default value by hard
> coding in it in SimplifyCFG.cpp and recompiling clang
>
>  My question is, Is there a way to set that attribute to a different value
> for a specific target?. Or at least to set it on the command line?
>
> Thanks in advance
>
> John
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190917/c060866e/attachment.html>


More information about the cfe-dev mailing list