[PATCH] D30242: [ExecutionDepsFix] Don't make copies of LiveReg objects when collecting operands for soft instructions

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 02:54:42 PST 2017


RKSimon added inline comments.


================
Comment at: lib/CodeGen/ExecutionDepsFix.cpp:737
+    for (SmallVectorImpl<const LiveReg*>::iterator i = Regs.begin(),
+           e = Regs.end(); i != e && !Inserted; ++i) {
+      if (LR.Def < (*i)->Def) {
----------------
It looks like this code was reusing the same i variable name for the inner loop - change it if you can? Also, possibly replace with a for-range loop and just break on the insertion.


================
Comment at: test/CodeGen/X86/pr30284.ll:5
+target triple = "i386-unknown-linux-gnu"
+
+; Function Attrs: nounwind
----------------
I realise its a test case but is it worth cleaning this up - remove unnecessary metadata etc. ?


https://reviews.llvm.org/D30242





More information about the llvm-commits mailing list