mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
c382eafa00
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 |
||
---|---|---|
.. | ||
MemorySSA | ||
clone-dicompileunit.ll | ||
combine-alias-scope-metadata.ll | ||
flattencfg.ll | ||
libcalls-shrinkwrap-double.ll | ||
libcalls-shrinkwrap-float.ll | ||
libcalls-shrinkwrap-long-double.ll | ||
lowerswitch.ll | ||
simplify-dbg-declare-load.ll | ||
split-bit-piece.ll | ||
store-first-op.ll | ||
strip-gc-relocates.ll | ||
strip-nonlinetable-debuginfo-containingtypes.ll | ||
strip-nonlinetable-debuginfo-cus.ll | ||
strip-nonlinetable-debuginfo-localvars.ll | ||
strip-nonlinetable-debuginfo-subroutinetypes.ll |