[PATCH] D44958: [PostRASink]Add register dependency check for implicit operands

Jun Bum Lim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 10:28:04 PDT 2018


junbuml added a comment.

>   What do you think about using register units throughout the pass? I found them so much clearer to use when dealing with register aliases. 

I think I saw the case where LiveRegUnits is used to find a scratch reg. It seems possible to use it here as well. Let me take a little closer look at it. I think it should be a separate NFC patch.



================
Comment at: lib/CodeGen/MachineSink.cpp:1080
+      DefedRegsInCopy.push_back(Reg);
+    } else if (MO.isUse()) {
+      if (ModifiedRegs[Reg]) {
----------------
thegameg wrote:
> Would `MO.readsReg()` be a better fit here?
One case where readReg works better is when the source of Copy is undef, but I'm not perfectly clear if it's safe to skip the internal read. 
 


https://reviews.llvm.org/D44958





More information about the llvm-commits mailing list