1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Bitcode
Scott Linder 47e3a5ca06 [DebugInfo] Enforce implicit constraints on distinct MDNodes
Add UNIQUED and DISTINCT properties in Metadata.def and use them to
implement restrictions on the `distinct` property of MDNodes:

* DIExpression can currently be parsed from IR or read from bitcode
  as `distinct`, but this property is silently dropped when printing
  to IR. This causes accepted IR to fail to round-trip. As DIExpression
  appears inline at each use in the canonical form of IR, it cannot
  actually be `distinct` anyway, as there is no syntax to describe it.
* Similarly, DIArgList is conceptually always uniqued. It is currently
  restricted to only appearing in contexts where there is no syntax for
  `distinct`, but for consistency it is treated equivalently to
  DIExpression in this patch.
* DICompileUnit is already restricted to always being `distinct`, but
  along with adding general support for the inverse restriction I went
  ahead and described this in Metadata.def and updated the parser to be
  general. Future nodes which have this restriction can share this
  support.

The new UNIQUED property applies to DIExpression and DIArgList, and
forbids them to be `distinct`. It also implies they are canonically
printed inline at each use, rather than via MDNode ID.

The new DISTINCT property applies to DICompileUnit, and requires it to
be `distinct`.

A potential alternative change is to forbid the non-inline syntax for
DIExpression entirely, as is done with DIArgList implicitly by requiring
it appear in the context of a function. For example, we would forbid:

    !named = !{!0}
    !0 = !DIExpression()

Instead we would only accept the equivalent inlined version:

    !named = !{!DIExpression()}

This essentially removes the ability to create a `distinct` DIExpression
by construction, as there is no syntax for `distinct` inline. If this
patch is accepted as-is, the result would be that the non-canonical
version is accepted, but the following would be an error and produce a diagnostic:

    !named = !{!0}
    ; error: 'distinct' not allowed for !DIExpression()
    !0 = distinct !DIExpression()

Also update some documentation to consistently use the inline syntax for
DIExpression, and to describe the restrictions on `distinct` for nodes
where applicable.

Reviewed By: StephenTozer, t-tye

Differential Revision: https://reviews.llvm.org/D104827
2021-06-28 21:20:04 +00:00
..
Inputs [Verifier] Move some atomicrmw/cmpxchg checks to instruction creation 2021-05-21 13:41:17 -07:00
2006-12-11-Cast-ConstExpr.ll
2009-06-11-FirstClassAggregateConstant.ll
aarch64-addp-upgrade.bc
aarch64-addp-upgrade.ll
aarch64-bf16-upgrade.ll
aarch64-bf16-upgrade.ll.bc
aggregateInstructions.3.2.ll
aggregateInstructions.3.2.ll.bc
allocated.ll
anon-functions.ll
apple-clang-700-compat.test
arm32_neon_vcnt_upgrade.ll
arm-bf16-upgrade.ll
arm-bf16-upgrade.ll.bc
associated.ll
atomic-no-syncscope.ll
atomic-no-syncscope.ll.bc
atomic.ll
atomicrmw-upgrade.ll [OpaquePtr] Create new bitcode encoding for atomicrmw 2021-05-25 16:30:34 -07:00
atomicrmw-upgrade.ll.bc [OpaquePtr] Create new bitcode encoding for atomicrmw 2021-05-25 16:30:34 -07:00
attributes-3.3.ll [llvm] Revert align attr test in test/Bitcode/attribute-3.3.ll 2021-05-24 09:15:27 -07:00
attributes-3.3.ll.bc [llvm] Revert align attr test in test/Bitcode/attribute-3.3.ll 2021-05-24 09:15:27 -07:00
attributes.ll [BitCode] Add noprofile to getAttrFromCode() 2021-06-27 11:59:57 -07:00
auto_upgrade_intrinsics.bc
avr-calling-conventions.ll
avr-calling-conventions.ll.bc
bcanalyzer-atomics.ll
bcanalyzer-comdat.ll
bcanalyzer-types.ll
binaryFloatInstructions.3.2.ll
binaryFloatInstructions.3.2.ll.bc
binaryIntInstructions.3.2.ll
binaryIntInstructions.3.2.ll.bc
bitcode-wrapper-header-armv7m.ll
bitcode-wrapper-header-x86_64.ll
bitwiseInstructions.3.2.ll
bitwiseInstructions.3.2.ll.bc
blockaddress.ll
branch-weight.ll
byval-upgrade.test
callbr.ll
callbr.ll.bc
calling-conventions.3.2.ll
calling-conventions.3.2.ll.bc
case-ranges-3.3.ll
case-ranges-3.3.ll.bc
cmpxchg-upgrade.ll
cmpxchg-upgrade.ll.bc
cmpxchg.3.6.ll
cmpxchg.3.6.ll.bc
compatibility-3.6.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
compatibility-3.6.ll.bc
compatibility-3.7.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
compatibility-3.7.ll.bc
compatibility-3.8.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
compatibility-3.8.ll.bc
compatibility-3.9.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
compatibility-3.9.ll.bc
compatibility-4.0.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
compatibility-4.0.ll.bc
compatibility-5.0.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
compatibility-5.0.ll.bc
compatibility-6.0.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
compatibility-6.0.ll.bc
compatibility.ll [SanitizeCoverage] Add support for NoSanitizeCoverage function attribute 2021-05-25 12:57:14 +02:00
constantsTest.3.2.ll
constantsTest.3.2.ll.bc
conversionInstructions.3.2.ll
conversionInstructions.3.2.ll.bc
dataLocation.ll
debug-loc-again.ll
dicompileunit-gnu-pubnames.ll
DICompileUnit-no-DWOId.ll
DICompileUnit-no-DWOId.ll.bc
DIEnumerator-10.0.ll
DIEnumerator-10.0.ll.bc
DIExpression-4.0.ll
DIExpression-4.0.ll.bc
DIExpression-aggresult.ll OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
DIExpression-aggresult.ll.bc
DIExpression-deref.ll
DIExpression-deref.ll.bc
DIExpression-is-distinct-upgrade.ll [DebugInfo] Enforce implicit constraints on distinct MDNodes 2021-06-28 21:20:04 +00:00
DIExpression-is-distinct-upgrade.ll.bc [DebugInfo] Enforce implicit constraints on distinct MDNodes 2021-06-28 21:20:04 +00:00
DIExpression-minus-upgrade.ll
DIExpression-minus-upgrade.ll.bc
diglobalvariable-3.8.ll
diglobalvariable-3.8.ll.bc
DIGlobalVariableExpression2.ll
DIGlobalVariableExpression2.ll.bc
DIGlobalVariableExpression.ll
DIGlobalVariableExpression.ll.bc
dilocalvariable-3.9.ll
dilocalvariable-3.9.ll.bc
DILocalVariable-explicit-tags.ll
DILocalVariable-explicit-tags.ll.bc
DILocation-implicit-code.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
DILocation-implicit-code.ll.bc
DIModule-clang-module.ll
DIModule-clang-module.ll.bc
DIModule-fortran-external-module.ll [DebugInfo] Support Fortran 'use <external module>' statement. 2020-12-18 13:10:57 -05:00
DIModule-fortran-module.ll
DIModule-fortran-module.ll.bc
DINamespace.ll
DINamespace.ll.bc
DISubprogram-distinct-definitions.ll
DISubprogram-distinct-definitions.ll.bc
DISubprogram-v4.ll
DISubprogram-v4.ll.bc
DISubprogram-v5.ll
DISubprogram-v5.ll.bc
disubrange-v0.ll
disubrange-v0.ll.bc
disubrange.ll
DITemplateParameter-5.0.ll
DITemplateParameter-5.0.ll.bc
dityperefs-3.8.ll
dityperefs-3.8.ll.bc
drop-debug-info.3.5.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
drop-debug-info.3.5.ll.bc
dso_local_equivalent.ll [llvm][Bitcode] Add bitcode reader/writer for DSOLocalEquivalent 2021-02-22 10:37:57 -08:00
dso_location.ll
DW_OP_over.ll
extractelement.ll
fcmp-fast.ll
flags.ll
fortranSubrange.ll
fortranSubrangeBackward.ll
fortranSubrangeBackward.ll.bc
function-address-space-fwd-decl.ll
function-default-address-spaces.ll
function-encoding-rel-operands.ll
function-local-metadata.3.5.ll
function-local-metadata.3.5.ll.bc
function-nonzero-address-spaces-types.ll
function-nonzero-address-spaces.ll
generic_subrange_const.ll
generic_subrange_count.ll
generic_subrange.ll
global-variables.3.2.ll
global-variables.3.2.ll.bc
globalvariable-attributes.ll
highLevelStructure.3.2.ll OpaquePtr: Bulk update tests to use typed sret 2020-11-20 17:58:26 -05:00
highLevelStructure.3.2.ll.bc
identification.ll
inalloca-upgrade.test Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
inalloca.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
infer_dso_local.ll
intrinsics-with-unnamed-types.ll Support intrinsic overloading on unnamed types 2021-03-19 14:34:25 +01:00
invalid-functionptr-align.ll
invalid-functionptr-align.ll.bc
invalid-record-strtab.ll [BitcodeReader] Validate Strtab before accessing. 2021-06-22 14:52:16 +01:00
invalid-record-strtab.ll.bc [BitcodeReader] Validate Strtab before accessing. 2021-06-22 14:52:16 +01:00
invalid-type-for-null-constant.ll
invalid-type-for-null-constant.ll.bc
invalid-weak-external.ll
invalid.ll
invalid.ll.bc
invalid.test [Verifier] Move some atomicrmw/cmpxchg checks to instruction creation 2021-05-21 13:41:17 -07:00
linkage-types-3.2.ll
linkage-types-3.2.ll.bc
local-linkage-default-visibility.3.4.ll
local-linkage-default-visibility.3.4.ll.bc
mdnodes-distinct-in-post-order.ll
mdnodes-distinct-nodes-break-cycles.ll
mdnodes-distinct-nodes-first.ll
mdnodes-in-post-order.ll
mdstring-high-bits.ll
memInstructions.3.2.ll
memInstructions.3.2.ll.bc
metadata-2.ll
metadata-function-blocks.ll
metadata-only-empty-string.ll
metadata-source.ll
metadata-source.ll.bc
metadata-strings.ll
metadata.3.5.ll
metadata.3.5.ll.bc
metadata.ll
miscInstructions.3.2.ll
miscInstructions.3.2.ll.bc
module_hash.ll
module-hash-strtab.ll
multi-module.ll
null-type.ll
null-type.ll.bc
objectsize-upgrade-7.0.ll
objectsize-upgrade-7.0.ll.bc
old-aliases.ll
old-aliases.ll.bc
operand-bundles-bc-analyzer.ll [ObjC][ARC] Use operand bundle 'clang.arc.attachedcall' instead of 2021-03-04 11:22:30 -08:00
operand-bundles.ll
padding.test
pr18704.ll
pr18704.ll.bc
PR23310.test
ptest-new.ll
ptest-old.ll
rankConst.ll
rankExp.ll
select.ll
shuffle.ll
source-filename.test
ssse3_palignr.ll
standardCIntrinsic.3.2.ll
standardCIntrinsic.3.2.ll.bc
stream-types.c
stream-types.c.ast
stream-types.c.ast.incomplete
stream-types.c.dia
stream-types.c.dia.incomplete
stream-types.c.opt.bitstream
summary_version.ll
tailcall.ll
terminatorInstructions.3.2.ll
terminatorInstructions.3.2.ll.bc
thinlto-alias2.ll
thinlto-alias3.ll
thinlto-alias.ll [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
thinlto-asm-noimport.ll
thinlto-deadstrip-flag.ll [LTO] Perform DSOLocal propagation in combined index 2021-02-12 22:58:26 -08:00
thinlto-empty-summary-section.ll
thinlto-function-summary-callgraph-cast.ll
thinlto-function-summary-callgraph-pgo.ll
thinlto-function-summary-callgraph-profile-summary.ll [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
thinlto-function-summary-callgraph-relbf.ll [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
thinlto-function-summary-callgraph-sample-profile-summary.ll
thinlto-function-summary-callgraph.ll
thinlto-function-summary-functionattrs.ll
thinlto-function-summary-originalnames.ll
thinlto-function-summary-paramaccess.ll
thinlto-function-summary-refgraph.ll [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
thinlto-function-summary.ll
thinlto-summary-globalvar.ll
thinlto-summary-linkage-types.ll
thinlto-summary-local-5.0.ll
thinlto-summary-local-5.0.ll.bc
thinlto-summary-section.ll
thinlto-synthetic-count-flag.ll [LTO] Perform DSOLocal propagation in combined index 2021-02-12 22:58:26 -08:00
thinlto-type-tests.ll [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
thinlto-type-vcalls.ll [ThinLTO] Add Visibility bits to GlobalValueSummary::GVFlags 2021-01-27 10:43:51 -08:00
thinlto-unused-type-tests.ll
upgrade-arc-runtime-calls-bitcast.bc
upgrade-arc-runtime-calls-bitcast.ll
upgrade-arc-runtime-calls-new.bc
upgrade-arc-runtime-calls.bc
upgrade-arc-runtime-calls.ll
upgrade-clang-arc-use.ll
upgrade-clang-arc-use.ll.bc
upgrade-datalayout2.ll
upgrade-datalayout3.ll
upgrade-datalayout.ll
upgrade-dbg-checksum.ll
upgrade-dbg-checksum.ll.bc
upgrade-dbg-value.ll
upgrade-dbg-value.ll.bc
upgrade-debug-info-for-profiling.ll
upgrade-debug-info-for-profiling.ll.bc
upgrade-frame-pointer.ll
upgrade-garbage-collection-for-objc.ll
upgrade-garbage-collection-for-swift.ll
upgrade-global-ctors.ll
upgrade-global-ctors.ll.bc
upgrade-global-dtors.ll
upgrade-global-dtors.ll.bc
upgrade-importedentity.ll
upgrade-importedentity.ll.bc
upgrade-incompatible-func-attr-11.0.ll [IR][AutoUpgrade] Drop alignment from non-pointer parameters and returns 2021-05-20 09:54:38 -07:00
upgrade-incompatible-func-attr-11.0.ll.bc [IR][AutoUpgrade] Drop alignment from non-pointer parameters and returns 2021-05-20 09:54:38 -07:00
upgrade-invariant-group-barrier.ll
upgrade-linker-options-2.ll
upgrade-linker-options.ll
upgrade-loop-metadata.ll
upgrade-loop-metadata.ll.bc
upgrade-masked-keep-metadata.ll Preserve metadata on masked intrinsics in auto-upgrade 2021-05-05 15:51:46 -05:00
upgrade-memory-intrinsics.ll
upgrade-module-flag.ll
upgrade-mrr-runtime-calls.bc
upgrade-objcretainrelease-asm.ll
upgrade-objcretainrelease-asm.ll.bc
upgrade-objcretainrelease.ll
upgrade-objcretainrelease.ll.bc
upgrade-pointer-address-space.ll
upgrade-pointer-address-space.ll.bc
upgrade-powi-intrinsics.ll Update @llvm.powi to handle different int sizes for the exponent 2021-06-17 09:38:28 +02:00
upgrade-powi-intrinsics.ll.bc Update @llvm.powi to handle different int sizes for the exponent 2021-06-17 09:38:28 +02:00
upgrade-ptr-annotation.ll Add auto-upgrade support for annotation intrinsics 2021-02-22 15:42:16 -08:00
upgrade-ptr-annotation.ll.bc Add auto-upgrade support for annotation intrinsics 2021-02-22 15:42:16 -08:00
upgrade-section-name.ll
upgrade-subprogram-this.ll
upgrade-subprogram-this.ll.bc
upgrade-subprogram.ll
upgrade-subprogram.ll.bc
upgrade-tbaa.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
upgrade-var-annotation.ll Add auto-upgrade support for annotation intrinsics 2021-02-22 15:42:16 -08:00
upgrade-var-annotation.ll.bc Add auto-upgrade support for annotation intrinsics 2021-02-22 15:42:16 -08:00
upgrade-vecreduce-intrinsics.ll
upgrade-vecreduce-intrinsics.ll.bc
upgrade-void-ret-attr-11.0.ll [IR][AutoUpgrade] Drop align attribute from void return types 2021-05-11 08:23:55 -07:00
upgrade-void-ret-attr-11.0.ll.bc [IR][AutoUpgrade] Drop align attribute from void return types 2021-05-11 08:23:55 -07:00
use-list-order2.ll [AsmWriter] Properly handle uselistorder for global symbols 2021-06-28 23:15:32 +02:00
use-list-order.ll
value-with-long-name.ll
variableArgumentIntrinsic.3.2.ll
variableArgumentIntrinsic.3.2.ll.bc
vector-pcs.ll
vectorInstructions.3.2.ll
vectorInstructions.3.2.ll.bc
visibility-styles.3.2.ll
visibility-styles.3.2.ll.bc
vscale-round-trip.ll
vscale-shuffle.ll
vst-forward-declaration.ll
weak-cmpxchg-upgrade.ll
weak-cmpxchg-upgrade.ll.bc
weak-macho-3.5.ll
weak-macho-3.5.ll.bc
x86_intr-upgrade.test OpaquePtr: Require byval on x86_intrcc parameter 0 2020-12-14 16:34:37 -05:00