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

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 04:35:56 PDT 2018


thegameg added a comment.

Sorry for the delay.

Thanks for fixing this. What do you think about using register units throughout the pass? I found them so much clearer to use when dealing with register aliases. @MatzeB has a great presentation on it: 2016 LLVM Developers' Meeting: M. Braun "Dealing with Register Hierarchies" <https://www.youtube.com/watch?v=-TV77T1R7OU>.



================
Comment at: lib/CodeGen/MachineSink.cpp:1080
+      DefedRegsInCopy.push_back(Reg);
+    } else if (MO.isUse()) {
+      if (ModifiedRegs[Reg]) {
----------------
Would `MO.readsReg()` be a better fit here?


================
Comment at: lib/CodeGen/MachineSink.cpp:1127
+    SmallVector<std::pair<unsigned, unsigned>, 2> UsedRegsInCopy;
+    SmallVector<unsigned, 2> DefedRegsInCopy;
+
----------------
I would comment on what the `unsigned` values represent.


https://reviews.llvm.org/D44958





More information about the llvm-commits mailing list