<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">- Please do not add any more uses of the LiveVariables pass! It is deprecated and only kept around for one last pass that isn't converted. All new code should use LiveIntervalAnalysis!</div><div class="">- Kill flags are optional: If they are present they must be correct, but it is legal to have a value die without having a kill flag on the operand. So often a simple fix is to clear out the kill flags from instructions you touch instead of recomputing them. The only downside is that some later passes will only perform the maximum amount of optimization will kill flags present [1]</div><div class=""><br class=""></div><div class="">- Matthias</div><div class=""><br class=""></div><div class="">[1] Long term we want to get rid of kill flags completely which should clean up a lot of code. But that is unfortunately a very tedious process, last time I tried to switch the biggest user of killflags (RegisterScavenger) to a new algorithm a powerpc stage2 buildbot broke and I never figured out why...</div><br class=""><div><blockquote type="cite" class=""><div class="">On May 17, 2017, at 11:29 AM, Nemanja Ivanovic via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">This kind of sounds like the peephole optimization should really be resetting the kill flag if it's extending the live range of a [virtual] register (which is what the description here seems to imply).<br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, May 5, 2017 at 9:54 AM, Jatin Bhateja via llvm-dev <span dir="ltr" class=""><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" class="">llvm-dev@lists.llvm.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hello Devs,<div class=""><br class=""></div><div class="">Machine Instruction verifier pass always validates Live variable info associated with MachineInstr along with other checks.</div><div class=""><br class=""></div><div class="">Please consider following scenario (w.r.t bugZilla <span style="font-size:12.8px;white-space:nowrap" class="">32583)</span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class="">1/  MachineCSE pass may prohibit optimising out a common sub-expression for instruction using physical registers </span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class="">by looking at the LiveIn info of successor basic blocks. </span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class="">2/ Which means we need Live Variables analysis to happen prior to executing MachineCSE.</span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class="">3/ Live variable analysis associates Kill/def information with MachineOperands.</span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class="">4/ In one of the regression Peephole optimizer (which does not uses liveness information)</span><br class=""></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class="">performs certain transformations over MachineBasicBlock which potentially dirties the</span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class="">liveness information computed early. </span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class=""><br class=""></span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class="">5/ Now, when Machine Instruction verifier kicks in after Peephole optimizer it reports use after kill violation</span></div><div class=""><span style="font-size:12.8px;white-space:nowrap" class="">over a particular instruction.  </span></div><div class=""><br class=""></div><div class="">Can we selectively turn of the live variable checking in Machine instruction verifier till next Live variable pass is invoked (as per the need of following pass).<br class=""></div><div class=""><br class=""></div><div class="">This may sound like defeating the purpose of machine instruction verifier which checks instruction validity against different parameters after each transformation pass, but if a pass does not use Live ness information should not be constrained to do other transformations which may dirty the live ness information.</div><div class=""><br class=""></div><div class="">Please provide you comments.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Jatin Bhateja</div></div>
<br class="">______________________________<wbr class="">_________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-dev</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></body></html>