llvm-6502/lib/IR
Sanjoy Das 5b5782c20e [RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector of pointers
Summary:
In RewriteStatepointsForGC pass, we create a gc_relocate intrinsic for
each relocated pointer, and the gc_relocate has the same type with the
pointer. During the creation of gc_relocate intrinsic, llvm requires to
mangle its type. However, llvm does not support mangling of all possible
types. RewriteStatepointsForGC will hit an assertion failure when it
tries to create a gc_relocate for pointer to vector of pointers because
mangling for vector of pointers is not supported.

This patch changes the way RewriteStatepointsForGC pass creates
gc_relocate. For each relocated pointer, we erase the type of pointers
and create an unified gc_relocate of type i8 addrspace(1)*. Then a
bitcast is inserted to convert the gc_relocate to the correct type. In
this way, gc_relocate does not need to deal with different types of
pointers and the unsupported type mangling is no longer a problem. This
change would also ease further merge when LLVM erases types of pointers
and introduces an unified pointer type.

Some minor changes are also introduced to gc_relocate related part in
InstCombineCalls, CodeGenPrepare, and Verifier accordingly.

Patch by Chen Li!

Reviewers: reames, AndyAyers, sanjoy

Reviewed By: sanjoy

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237009 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-11 18:49:34 +00:00
..
AsmWriter.cpp [Statepoint] Clean up Statepoint.h: accessor names. 2015-05-06 02:36:26 +00:00
AttributeImpl.h Add missing dereferenceable_or_null getters 2015-05-06 17:41:54 +00:00
Attributes.cpp Change typeIncompatible to return an AttrBuilder instead of new-ing an AttributeSet. 2015-05-06 23:19:56 +00:00
AutoUpgrade.cpp AVX-512: Changed CC parameter in "cmp" intrinsic 2015-05-11 09:03:14 +00:00
BasicBlock.cpp
CMakeLists.txt [opaque pointer type] Explicit pointee type for GEPOperator/GEPConstantExpr. 2015-05-08 00:42:26 +00:00
Comdat.cpp
ConstantFold.cpp Recommit r236670: [opaque pointer type] Pass explicit pointer type through GEP constant folding"" 2015-05-07 17:28:58 +00:00
ConstantFold.h Recommit r236670: [opaque pointer type] Pass explicit pointer type through GEP constant folding"" 2015-05-07 17:28:58 +00:00
ConstantRange.cpp
Constants.cpp [opaque pointer type] Explicit pointee type for GEPOperator/GEPConstantExpr. 2015-05-08 00:42:26 +00:00
ConstantsContext.h [opaque pointer type] Explicit pointee type for GEPOperator/GEPConstantExpr. 2015-05-08 00:42:26 +00:00
Core.cpp [opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space 2015-04-29 21:22:39 +00:00
DataLayout.cpp
DebugInfo.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DebugInfoMetadata.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DebugLoc.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
DiagnosticInfo.cpp [IR/Diagnostic] Assert that DebugLoc is valid before accessing. 2015-05-04 18:08:35 +00:00
DiagnosticPrinter.cpp
DIBuilder.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
Dominators.cpp [DomTree] verifyDomTree to unconditionally perform DT verification 2015-05-06 08:18:41 +00:00
Function.cpp Replace branch-to-unreachable with assertion. 2015-05-08 18:52:28 +00:00
GCOV.cpp
Globals.cpp [opaque pointer type] Pass GlobalAlias the actual pointer type rather than decomposing it into pointee type + address space 2015-04-29 21:22:39 +00:00
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp
Instructions.cpp [opaque pointer type] Track explicit GEP pointee type through in-memory IR 2015-05-05 18:03:48 +00:00
IntrinsicInst.cpp
IRBuilder.cpp Extend the statepoint intrinsic to allow statepoints to be marked as transitions from GC-aware code to code that is not GC-aware. 2015-05-08 18:07:42 +00:00
IRPrintingPasses.cpp uselistorder: Pull the bit through PrintModulePass 2015-04-15 02:38:06 +00:00
LegacyPassManager.cpp [NFC] Converting to range-based for. 2015-04-29 21:45:22 +00:00
LLVMBuild.txt
LLVMContext.cpp
LLVMContextImpl.cpp Add the i128 builtin type to LLVM. 2015-04-17 15:32:15 +00:00
LLVMContextImpl.h IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
Makefile
Mangler.cpp
MDBuilder.cpp
Metadata.cpp IR: Add Function metadata attachments 2015-04-24 21:51:02 +00:00
MetadataImpl.h
MetadataTracking.cpp
Module.cpp
module.modulemap
Operator.cpp [opaque pointer type] Explicit pointee type for GEPOperator/GEPConstantExpr. 2015-05-08 00:42:26 +00:00
Pass.cpp
PassManager.cpp
PassRegistry.cpp
Statepoint.cpp
SymbolTableListTraitsImpl.h
Type.cpp Add the i128 builtin type to LLVM. 2015-04-17 15:32:15 +00:00
TypeFinder.cpp
Use.cpp
User.cpp
Value.cpp Move Value.isDereferenceablePointer to ValueTracking [NFC] 2015-04-23 17:36:48 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp Add support for v1i128 type. 2015-04-17 16:11:05 +00:00
Verifier.cpp [RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector of pointers 2015-05-11 18:49:34 +00:00