llvm-6502/lib/IR
Philip Reames 2e38beb32f Add a pass for inserting safepoints into (nearly) arbitrary IR
This pass is responsible for figuring out where to place call safepoints and safepoint polls. It doesn't actually make the relocations explicit; that's the job of the RewriteStatepointsForGC pass (http://reviews.llvm.org/D6975).

Note that this code is not yet finalized.  Its moving in tree for incremental development, but further cleanup is needed and will happen over the next few days.  It is not yet part of the standard pass order.  

Planned changes in the near future:
 - I plan on restructuring the statepoint rewrite to use the functions add to the IRBuilder a while back. 
 - In the current pass, the function "gc.safepoint_poll" is treated specially but is not an intrinsic. I plan to make identifying the poll function a property of the GCStrategy at some point in the near future.
 - As follow on patches, I will be separating a collection of test cases we have out of tree and submitting them upstream. 
 - It's not explicit in the code, but these two patches are introducing a new state for a statepoint which looks a lot like a patchpoint. There's no a transient form which doesn't yet have the relocations explicitly represented, but does prevent reordering of memory operations. Once this is in, I need to update actually make this explicit by reserving the 'unused' argument of the statepoint as a flag, updating the docs, and making the code explicitly check for such a thing. This wasn't really planned, but once I split the two passes - which was done for other reasons - the intermediate state fell out. Just reminds us once again that we need to merge statepoints and patchpoints at some point in the not that distant future.

Future directions planned:
 - Identifying more cases where a backedge safepoint isn't required to ensure timely execution of a safepoint poll.
 - Tweaking the insertion process to generate easier to optimize IR. (For example, investigating making SplitBackedge) the default.
 - Adding opt-in flags for a GCStrategy to use this pass. Once done, add this pass to the actual pass ordering.

Differential Revision: http://reviews.llvm.org/D6981



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228090 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04 00:37:33 +00:00
..
AsmWriter.cpp AsmParser: Recognize DW_TAG_* constants 2015-02-03 21:56:01 +00:00
AsmWriter.h
AttributeImpl.h
Attributes.cpp
AutoUpgrade.cpp [X86] Use i8 immediate for comparison type on AVX512 packed integer instructions. This matches floating point equivalents. Includes autoupgrade support to convert old code. 2015-01-25 23:26:02 +00:00
BasicBlock.cpp Add a pass for inserting safepoints into (nearly) arbitrary IR 2015-02-04 00:37:33 +00:00
CMakeLists.txt IR: Split out DebugInfoMetadata.h, NFC 2015-02-02 18:53:21 +00:00
Comdat.cpp
ConstantFold.cpp
ConstantFold.h
ConstantRange.cpp
Constants.cpp
ConstantsContext.h
Core.cpp Fix LLVMSetMetadata and LLVMAddNamedMetadataOperand for single value MDNodes 2015-01-28 16:35:59 +00:00
DataLayout.cpp
DebugInfo.cpp DebugInfo: Fix use after return found by asan. 2015-01-24 19:55:23 +00:00
DebugInfoMetadata.cpp Fix the -Werror build, NFC 2015-02-02 20:20:56 +00:00
DebugLoc.cpp IR: Cleanup dead code, NFC 2015-01-16 17:31:29 +00:00
DiagnosticInfo.cpp
DiagnosticPrinter.cpp
DIBuilder.cpp Reapply "IR: Simplify DIBuilder's HeaderBuilder API, NFC" 2015-01-20 05:02:42 +00:00
Dominators.cpp [PM] Port domtree to the new pass manager (at last). 2015-01-14 10:19:28 +00:00
Function.cpp Revert GCStrategy ownership changes 2015-01-26 18:26:35 +00:00
GCOV.cpp llvm-cov: Don't use llvm::outs() in library code 2015-01-23 23:09:27 +00:00
Globals.cpp
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp
Instructions.cpp
IntrinsicInst.cpp
IRBuilder.cpp Intrinsics: introduce llvm_any_ty aka ValueType Any 2015-01-22 20:14:38 +00:00
IRPrintingPasses.cpp [PM] Switch the new pass manager to use a reference-based API for IR 2015-01-05 02:47:05 +00:00
LegacyPassManager.cpp [LPM] A targeted but somewhat horrible fix to the legacy pass manager's 2015-01-28 09:47:21 +00:00
LLVMBuild.txt
LLVMContext.cpp
LLVMContextImpl.cpp Revert GCStrategy ownership changes 2015-01-26 18:26:35 +00:00
LLVMContextImpl.h IR: Split out DebugInfoMetadata.h, NFC 2015-02-02 18:53:21 +00:00
Makefile
Mangler.cpp
MDBuilder.cpp IR: Return unique_ptr from MDNode::getTemporary() 2015-01-19 21:30:18 +00:00
Metadata.cpp IR: Split out DebugInfoMetadata.h, NFC 2015-02-02 18:53:21 +00:00
MetadataImpl.h Added missing header for the explicit dependency on MDNode. 2015-02-04 00:20:52 +00:00
MetadataTracking.cpp IR: Store RAUW support and Context in the same pointer, NFC 2015-01-19 19:02:06 +00:00
Module.cpp
module.modulemap
Pass.cpp Refactoring cl::parser construction and initialization. 2015-01-22 21:01:12 +00:00
PassManager.cpp [PM] Push the debug option for the new pass manager into the opt tool 2015-01-13 22:42:38 +00:00
PassRegistry.cpp
Statepoint.cpp Intrinsics: introduce llvm_any_ty aka ValueType Any 2015-01-22 20:14:38 +00:00
SymbolTableListTraitsImpl.h
Type.cpp
TypeFinder.cpp
Use.cpp
UseListOrder.cpp
User.cpp
Value.cpp Cleaup ValueHandle to no longer keep a PointerIntPair for the Value*. 2015-01-09 00:48:47 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp
Verifier.cpp Use ImmutableCallSite for statepoint verification. 2015-02-03 23:18:47 +00:00