[PATCH] compile time improvement for MachineSink

Lawrence Hu lawrence at codeaurora.org
Fri May 15 17:08:02 PDT 2015


Yes, please commit it for me, since you are on it, could you please fix the comment for me too.

Thanks a lot.


================
Comment at: lib/CodeGen/MachineSink.cpp:175
@@ -173,1 +174,3 @@
+  // since it's possible that they are no longer correct.
+  RegsToClearKillFlags.set(SrcReg);
 
----------------
hiraditya wrote:
> In line: 154, we check that SrcReg has only one non-debug-use. So I'm wondering why we need to clear kill flags in the entire function when there will be only one use of SrcReg i.e., in MI which is erased anyway.
I will remove that, this is not the timing consuming part anyway.

================
Comment at: lib/CodeGen/MachineSink.cpp:300
@@ +299,3 @@
+  }
+  RegsToClearKillFlags.clear();
+
----------------
dberlin wrote:
> ```
> for (auto Reg : RegsToClearKillFlags)
>   MRI->clearKillFlags(Reg);
> 
> RegsToClearKillFlags.clear()
> ```
will do that, thanks.

http://reviews.llvm.org/D9719

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list