[PATCH] D41098: [InlineSpiller] Fix a crash due to lack of forward progress from remat

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 13:27:53 PST 2017


qcolombet added a comment.

Hi Philip,

I agree that a refactoring of how remat is done would be a good thing, but also only doing it for this corner case is overkill.

The current approach makes sense, but I believe we should use pressure sets or something along those lines, because the current logic won't work generally speaking. See the inline comment.

Cheers,
-Quentin



================
Comment at: lib/CodeGen/InlineSpiller.cpp:588
+      return false;
+  }
+
----------------
Counting by RC is not going to give you the result you want.
You can imagine some instruction with different RCs that overlap, e.g., GPRsp, GPR.
With the current counting your going to count them in different bucket and miss the overlap.

I believe the pressure sets (look in TargetRegisterInfo) would do what you want. Double check because it's been a while since I've played with it.


Repository:
  rL LLVM

https://reviews.llvm.org/D41098





More information about the llvm-commits mailing list