1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/Transforms/Util
Peter Collingbourne c382eafa00 IR: Consider two DISubprograms to be odr-equal if they have the same template parameters.
In ValueMapper we create new operands for MDNodes and
rely on MDNode::replaceWithUniqued to create a new MDNode
with the specified operands. However this doesn't always
actually happen correctly for DISubprograms because when we
uniquify the new node, we only odr-compare it with existing nodes
(MDNodeSubsetEqualImpl<DISubprogram>::isDeclarationOfODRMember). Although
the TemplateParameters field can refer to a distinct DICompileUnit via
DITemplateTypeParameter::type -> DICompositeType::scope -> DISubprogram::unit,
it is not currently included in the odr comparison. As a result, we can end
up getting our original DISubprogram back, which means we will have a cloned
module referring to the DICompileUnit in the original module, which causes
a verification error.

The fix I implemented was to consider TemplateParameters to be one of the
odr-equal properties. But I'm a little uncomfortable with this. In general it
seems unsound to rely on distinct MDNodes never being reachable from nodes
which we only check odr-equality of. My only long term suggestion would be
to separate odr-uniquing from full uniquing.

Differential Revision: https://reviews.llvm.org/D29240

llvm-svn: 294240
2017-02-06 21:23:03 +00:00
..
MemorySSA [MemorySSA] Add new tests for invariant.groups 2017-01-23 16:38:10 +00:00
clone-dicompileunit.ll IR: Consider two DISubprograms to be odr-equal if they have the same template parameters. 2017-02-06 21:23:03 +00:00
combine-alias-scope-metadata.ll
flattencfg.ll
libcalls-shrinkwrap-double.ll Conditionally eliminate library calls where the result value is not used 2016-10-18 21:36:27 +00:00
libcalls-shrinkwrap-float.ll Conditionally eliminate library calls where the result value is not used 2016-10-18 21:36:27 +00:00
libcalls-shrinkwrap-long-double.ll Conditionally eliminate library calls where the result value is not used 2016-10-18 21:36:27 +00:00
lowerswitch.ll
simplify-dbg-declare-load.ll Fix some broken CHECK lines. 2017-01-22 20:28:56 +00:00
split-bit-piece.ll [DIExpression] Introduce a dedicated DW_OP_LLVM_fragment operation 2016-12-05 18:04:47 +00:00
store-first-op.ll [Verifier] Add verification for TBAA metadata 2016-12-11 20:07:15 +00:00
strip-gc-relocates.ll [StripGCRelocates] New pass to remove gc.relocates added by RS4GC 2016-10-21 18:43:16 +00:00
strip-nonlinetable-debuginfo-containingtypes.ll Renumber testcase metadata nodes after r290153. 2016-12-22 00:45:21 +00:00
strip-nonlinetable-debuginfo-cus.ll Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00
strip-nonlinetable-debuginfo-localvars.ll Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00
strip-nonlinetable-debuginfo-subroutinetypes.ll Add -strip-nonlinetable-debuginfo capability 2016-10-25 18:44:13 +00:00