[PATCH] D48102: Improve handling of COPY instructions with identical value numbers

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 18 07:23:14 PDT 2018


tpr added inline comments.


================
Comment at: lib/CodeGen/RegisterCoalescer.cpp:2842
+          assert(Id != S.end());
+          Id->end = std::max(Id->end, Q.endPoint());
+        }
----------------
This is the cause of my second failure. In my test, because of some weird branching around in the control flow, there is another value in between Id and Q.endPoint(), and this code is illegally extending segment Id over the top of the other value.

I guess what it really needs is to add new segments as necessary so Id->valno is live on all paths from OtherDef to Def.

Is there some ready made code to do that somewhere?


Repository:
  rL LLVM

https://reviews.llvm.org/D48102





More information about the llvm-commits mailing list