llvm-6502/lib
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
..
Analysis Rip min/max pattern matching out of InstCombine and into 2015-05-11 14:42:20 +00:00
AsmParser
Bitcode [opaque pointer type] Explicit pointee type for GEPOperator/GEPConstantExpr. 2015-05-08 00:42:26 +00:00
CodeGen [RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector of pointers 2015-05-11 18:49:34 +00:00
DebugInfo A few fixes for llvm-symbolizer on Windows. 2015-05-06 22:26:30 +00:00
ExecutionEngine
Fuzzer [lib/Fuzzer] build tests that work well with dfsan also w/o dfsan 2015-05-08 21:45:19 +00:00
IR [RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector of pointers 2015-05-11 18:49:34 +00:00
IRReader
LineEditor
Linker
LTO
MC MC: Skip names of temporary symbols in object streamer 2015-05-06 21:34:34 +00:00
Object [llvm-readobj/obj2yaml/yaml2obj] Support MIPS machine ELF header flags 2015-05-08 07:04:59 +00:00
Option
Passes
ProfileData InstrProf: Simplify looking up sections for coverage data 2015-05-07 00:31:58 +00:00
Support TargetParser: FPU/ARCH/EXT parsing refactory - NFC 2015-05-08 21:04:27 +00:00
TableGen
Target [X86] Updates to X86 backend for f16 promotion 2015-05-11 17:14:39 +00:00
Transforms [RewriteStatepointsForGC] Fix a bug on creating gc_relocate for pointer to vector of pointers 2015-05-11 18:49:34 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile