[PATCH] D19486: Keep dead inst copy from being deleted only when the inst is rematerializable

Quentin Colombet via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 14:30:29 PDT 2016


qcolombet added a comment.

Hi Wei,

Additing the alias analysis seem unreleated to me.
Could it be a separate patch?
Could you add a test case?

Cheers,
-Quentin


================
Comment at: lib/CodeGen/LiveRangeEdit.cpp:331
@@ -330,1 +330,3 @@
+    // allocations of the func are done.
+    if (isOrigDef && DeadRemats && TII.isTriviallyReMaterializable(MI, AA)) {
       LiveInterval &NewLI = createEmptyIntervalFrom(Dest);
----------------
Don't we already check that MI is triviallyReMaterializable before trying to rematerialize?
I.e., this is just an optimization to keep DeadRemats small, not the actual fix, right?

In other words, if this is the proposed fix, I think I miss something!


Repository:
  rL LLVM

http://reviews.llvm.org/D19486





More information about the llvm-commits mailing list