OSDN Git Service

[InlineSpiller] Fix a crash due to lack of forward progress from remat specifically...
authorPhilip Reames <listmail@philipreames.com>
Tue, 19 Jun 2018 21:19:59 +0000 (21:19 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 19 Jun 2018 21:19:59 +0000 (21:19 +0000)
commit19036ee759df8d7dc698546ff33bfdac0529df36
tree234c2f18fc5b50f18b4e40e332da3981656f7565
parent19d4a02944e29d16efc8985c61bbc7097c46c991
[InlineSpiller] Fix a crash due to lack of forward progress from remat specifically for STATEPOINT

This patch covers up a fairly fundemental issue around remat and register allocation which shows up with psuedo instructions with more vreg uses than there are physical registers.  This patch essentially just disables remat for STATEPOINTs which are the only case we've seen so far, but long term we need a better fix.

For STATEPOINTs specifically, this is a strict improvement.  It unblocks progress towards enabling a currently off-by-default mode which integrates deopt bundle operand lowering with register allocator spilling so that we end up with smaller stack sizes and more optimally placed spills.  Assming no other issues turn up during my next round of integration testing - which based on experience so far, is admittedly unlikely - we might finally be able to enable something I've been working towards in small bits and pieces for years now.  :)

For psuedo ops in general, there are a couple of ideas for a "proper fix" discussed on the bug, but I'm far enough outside my knowledge area to not be able to see any of them through to a successful conclusion.  If anyone wants to help out here, please do.

Differential Revision: https://reviews.llvm.org/D41098

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@335077 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/InlineSpiller.cpp
test/CodeGen/X86/statepoint-live-in.ll