llvm-6502/lib/IR
Philip Reames d021bb8003 [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





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223137 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-02 18:50:36 +00:00
..
AsmWriter.cpp Parse 'ghccc' in .ll files as the GHC convention (cc 10) 2014-12-01 21:04:44 +00:00
AsmWriter.h
AttributeImpl.h
Attributes.cpp
AutoUpgrade.cpp Revert "IR: MDNode => Value" 2014-11-11 21:30:22 +00:00
BasicBlock.cpp
CMakeLists.txt [Statepoints 3/4] Statepoint infrastructure for garbage collection: SelectionDAGBuilder 2014-12-02 18:50:36 +00:00
Comdat.cpp
ConstantFold.cpp
ConstantFold.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
ConstantRange.cpp [Modules] Move the ConstantRange class into the IR library. This is 2014-03-04 12:24:34 +00:00
Constants.cpp Revert "unique_ptrify LLVMContextImpl::CAZConstants" 2014-11-25 02:26:22 +00:00
ConstantsContext.h IR: De-duplicate code for replacing operands in place 2014-08-19 19:13:30 +00:00
Core.cpp
DataLayout.cpp Switch the default DataLayout to be little endian, and make the variable 2014-10-20 10:41:29 +00:00
DebugInfo.cpp
DebugLoc.cpp Revert "Revert "DI: Fold constant arguments into a single MDString"" 2014-10-03 20:01:09 +00:00
DiagnosticInfo.cpp
DiagnosticPrinter.cpp Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
DIBuilder.cpp Debug Info: revert r222195, r222210 and r222239. 2014-11-21 19:55:23 +00:00
Dominators.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
Function.cpp Revert "Masked Vector Load and Store Intrinsics." 2014-11-28 21:29:14 +00:00
GCOV.cpp GCOV: Make sure that function idents in the .gcda and .gcno match 2014-11-06 06:55:02 +00:00
Globals.cpp Copy externally_initialized in GlobalVariable::copyAttributesFrom. 2014-11-10 18:41:59 +00:00
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp
Instructions.cpp Revert r220349 to re-instate r220277 with a fix for PR21330 -- quite 2014-11-25 08:20:27 +00:00
IntrinsicInst.cpp
IRBuilder.cpp Revert "Masked Vector Load and Store Intrinsics." 2014-11-28 21:29:14 +00:00
IRPrintingPasses.cpp
LeakDetector.cpp
LeaksContext.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LegacyPassManager.cpp
LLVMBuild.txt Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
LLVMContext.cpp
LLVMContextImpl.cpp Revert "unique_ptrify LLVMContextImpl::CAZConstants" 2014-11-25 02:26:22 +00:00
LLVMContextImpl.h Revert "unique_ptrify LLVMContextImpl::CAZConstants" 2014-11-25 02:26:22 +00:00
Makefile
Mangler.cpp Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC. 2014-10-28 13:12:13 +00:00
MDBuilder.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
Metadata.cpp
Module.cpp Remove StringMap::GetOrCreateValue in favor of StringMap::insert 2014-11-19 05:49:42 +00:00
module.modulemap
Pass.cpp
PassManager.cpp Remove unnecessary/redundant std::move 2014-07-16 17:09:21 +00:00
PassRegistry.cpp [PM] Remove an unused and rather expensive mapping from an analysis 2014-10-06 00:30:59 +00:00
Statepoint.cpp [Statepoints 3/4] Statepoint infrastructure for garbage collection: SelectionDAGBuilder 2014-12-02 18:50:36 +00:00
SymbolTableListTraitsImpl.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Type.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
TypeFinder.cpp Revert "IR: MDNode => Value" 2014-11-11 21:30:22 +00:00
Use.cpp Fix a URL (NFC) 2014-08-21 21:09:24 +00:00
UseListOrder.cpp
User.cpp
Value.cpp
ValueSymbolTable.cpp
ValueTypes.cpp
Verifier.cpp [Statepoints 1/4] Statepoint infrastructure for garbage collection: IR Intrinsics 2014-12-01 21:18:12 +00:00