<div dir="ltr"><div>Two minor comments:</div><div>You check that "NumWithout == 1", but on line 2532 we 'continue' if "NumWithout != 1". I suppose you could assert(NumWithout ==1) inside your if statement.</div>
<div><br></div><div>Also,</div><div><br></div><div>+        if (predMap[0].first) {</div><div>+          I = cast<Instruction>(predMap[0].first);</div><div>+          BB = predMap[0].second;</div><div>+        } else {</div>
<div>+          I = cast<Instruction>(predMap[1].first);</div><div>+          BB = predMap[1].second;</div><div>+        }</div><div><br></div><div>If you write this as:</div><div><br></div><div>  unsigned Index = predMap[0].first ? 0 : 1;</div>
<div>  I = cast<Instruction>(predMap[index].first);</div><div>  BB = predMap[index].second;</div><div><br></div><div>Does it look nicer to you?</div><div><br></div><div>Joey</div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On 15 August 2014 11:36, Erik Verbruggen <span dir="ltr"><<a href="mailto:erikjv@me.com" target="_blank">erikjv@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
When PRE detects a common operation after a basic diamond case and in<br>
one predecessor in that diamond, then hoist that operation in the common<br>
dominator of the predecessors instead of moving the operation into the<br>
predecessor lacking it.<br>
<br>
<br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>