<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 13, 2010, at 11:37 AM, Chris Lattner wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Oct 13, 2010, at 11:22 AM, Gabor Greif wrote:<br><br><blockquote type="cite">Hi Chris,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I had a look into MachineCSE, but it looks like MBB-oriented.<br></blockquote><blockquote type="cite">The above problem is an inter-block one. Also MCSE seems<br></blockquote><blockquote type="cite">to perform value numbering on virtual/physical registers, which<br></blockquote><blockquote type="cite">does not map very well to status register bits that are implicitly<br></blockquote><blockquote type="cite">defined.<br></blockquote><blockquote type="cite">Any chance to recast this issue as a target-independent<br></blockquote><blockquote type="cite">(but cmp-specific) peephole problem, that just looks into<br></blockquote><blockquote type="cite">predecessor blocks and applies (target-hook-like) subsumption<br></blockquote><blockquote type="cite">checks for 'cmp' instructions?<br></blockquote><br>I think that extending MachineCSE to do a simple dominator tree walk with llvm::ScopedHashTable would make sense.<br></div></blockquote><div><br></div>It already does that. MachineCSE is a global pass. It's not a local CSE pass.</div><div><br></div><div>Evan</div><div><br><blockquote type="cite"><div><br>Status register bits should be handled just like any other physreg. On x86, this is a def of EFLAGS physreg for example. On PPC, the condition code register is actually a vreg iirc.<br><br>-Chris<br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div><br></body></html>