1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/lib/Transforms/InstCombine
Philip Reames 02104421ff [Statepoints 3/4] Statepoint infrastructure for garbage collection: SelectionDAGBuilder
This is the third patch in a small series.  It contains the CodeGen support for lowering the gc.statepoint intrinsic sequences (223078) to the STATEPOINT pseudo machine instruction (223085).  The change also includes the set of helper routines and classes for working with gc.statepoints, gc.relocates, and gc.results since the lowering code uses them.  

With this change, gc.statepoints should be functionally complete.  The documentation will follow in the fourth change, and there will likely be some cleanup changes, but interested parties can start experimenting now.

I'm not particularly happy with the amount of code or complexity involved with the lowering step, but at least it's fairly well isolated.  The statepoint lowering code is split into it's own files and anyone not working on the statepoint support itself should be able to ignore it.  

During the lowering process, we currently spill aggressively to stack. This is not entirely ideal (and we have plans to do better), but it's functional, relatively straight forward, and matches closely the implementations of the patchpoint intrinsics.  Most of the complexity comes from trying to keep relocated copies of values in the same stack slots across statepoints.  Doing so avoids the insertion of pointless load and store instructions to reshuffle the stack.  The current implementation isn't as effective as I'd like, but it is functional and 'good enough' for many common use cases.  

In the long term, I'd like to figure out how to integrate the statepoint lowering with the register allocator.  In principal, we shouldn't need to eagerly spill at all.  The register allocator should do any spilling required and the statepoint should simply record that fact.  Depending on how challenging that turns out to be, we may invest in a smarter global stack slot assignment mechanism as a stop gap measure.  

Reviewed by: atrick, ributzka

llvm-svn: 223137
2014-12-02 18:50:36 +00:00
..
CMakeLists.txt Tidy up a bit. No functional change. 2013-04-05 21:20:12 +00:00
InstCombine.h [InstCombine] Re-commit of r218721 (Optimize icmp-select-icmp sequence) 2014-11-21 23:36:44 +00:00
InstCombineAddSub.cpp InstCombine: Combine (X | Y) - X to (~X & Y) 2014-11-03 05:53:55 +00:00
InstCombineAndOrXor.cpp InstCombine: FoldOrOfICmps harder 2014-11-28 19:58:29 +00:00
InstCombineCalls.cpp [Statepoints 3/4] Statepoint infrastructure for garbage collection: SelectionDAGBuilder 2014-12-02 18:50:36 +00:00
InstCombineCasts.cpp InstCombine: Fix another infinite loop caused by visitFPTrunc 2014-11-18 22:06:45 +00:00
InstCombineCompares.cpp Removed extra line from a comment to test first commit. NFC. 2014-11-28 10:38:18 +00:00
InstCombineLoadStoreAlloca.cpp [InstCombine] Change LLVM To canonicalize toward the value type being 2014-11-25 10:09:51 +00:00
InstCombineMulDivRem.cpp InstCombine: Don't create an unused instruction 2014-11-24 16:41:13 +00:00
InstCombinePHI.cpp Update SetVector to rely on the underlying set's insert to return a pair<iterator, bool> 2014-11-19 07:49:26 +00:00
InstCombineSelect.cpp InstCombine: Restore optimizations lost in r210006 2014-11-27 07:25:21 +00:00
InstCombineShifts.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
InstCombineSimplifyDemanded.cpp Add additional patterns for @llvm.assume in ValueTracking 2014-09-07 19:21:07 +00:00
InstCombineVectorOps.cpp fixed some typos 2014-07-07 22:13:58 +00:00
InstCombineWorklist.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
InstructionCombining.cpp InstCombine: Don't assume DataLayout is always available 2014-11-24 07:26:20 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
Makefile