[PATCH] D158144: [PHIElimination] Handle subranges in LiveInterval updates

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 17 08:57:00 PDT 2023


arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/CodeGen/LiveIntervals.cpp:865-866
 LiveIntervals::addSegmentToEndOfBlock(Register Reg, MachineInstr &startInst) {
-  LiveInterval &Interval = createEmptyInterval(Reg);
+  LiveInterval &Interval =
+    hasInterval(Reg) ? getInterval(Reg) : createEmptyInterval(Reg);
   VNInfo *VN = Interval.getNextValue(
----------------
Probably should move to getOrCreateEmptyInterval helper


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158144/new/

https://reviews.llvm.org/D158144



More information about the llvm-commits mailing list