<div dir="ltr">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.<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 17, 2019 at 11:05 PM Joan Lluch via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Hi All,<div><br></div><div>For a custom backend I’m developing, where jumps are not particularly expensive, I want to reduce the <span style="font-family:Monaco;font-size:11px;background-color:rgb(255,255,255)">phi-node-folding-threshold </span>attribute value from the default 2 to just 1, as it produces better code in my case.</div><div><br></div><div>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)  </div><div><br></div><div>However, it works as intended if I replace the default value by hard coding in it in SimplifyCFG.cpp and recompiling clang</div><div><br></div><div> 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?</div><div><br></div><div>Thanks in advance</div><div><br></div><div>John</div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>