llvm-project/llvm/test/Verifier
Teresa Johnson 0174f5553e [MemProf] Basic metadata support and verification
Add basic support for the MemProf metadata (!memprof and !callsite)
which was initially described in "RFC: IR metadata format for MemProf"
(https://discourse.llvm.org/t/rfc-ir-metadata-format-for-memprof/59165).

The bulk of the patch is verification support, along with some tests.

There are a couple of changes to the format described in the original
RFC:

Initial measurements suggested that a tree format for the stack ids in
the contexts would be more efficient, but subsequent evaluation with
large applications showed that in fact the cost of the additional
metadata nodes required by this deduplication scheme overwhelmed the
benefit from sharing stack id nodes. Therefore, the implementation here
and in follow on patches utilizes a simpler scheme of lists of stack id
integers in the memprof profile contexts and callsite metadata. The
follow on matching patch employs context trimming optimizations to
reduce the cost.

Secondly, instead of verbosely listing all profiled fields in each
profiled context (memory info block or MIB), and deferring the
interpretation of the profile data, the profile data is evaluated and
converted into string tags specifying the behavior (e.g. "cold") during
profile matching. This reduces the verbosity of the profile metadata,
and allows additional context trimming optimizations. As a result, the
named metadata schema description is also no longer needed.

Differential Revision: https://reviews.llvm.org/D128141
2022-07-20 15:30:55 -07:00
..
AMDGPU
ARM
Mips
SystemZ
2002-04-13-RetTypes.ll
2002-11-05-GetelementptrPointers.ll
2004-05-21-SwitchConstantMismatch.ll
2006-07-11-StoreStruct.ll
2006-10-15-AddrLabel.ll
2006-12-12-IntrinsicDefine.ll
2007-12-21-InvokeParamAttrs.ll
2008-01-11-VarargAttrs.ll
2008-03-01-AllocaSized.ll
2008-11-15-RetVoid.ll
2009-05-29-InvokeResult1.ll
2009-05-29-InvokeResult2.ll
2009-05-29-InvokeResult3.ll
2010-08-07-PointerIntrinsic.ll
aarch64-ldstxr.ll
access_group.ll
alias-scope-metadata.ll
alias.ll
align-md.ll
align.ll
alloc-size-failedparse.ll
allockind.ll attributes: introduce allockind attr for describing allocator fn behavior 2022-05-31 10:01:17 -04:00
allocsize.ll
AmbiguousPhi.ll
amdgpu-cc.ll
annotation-metadata.ll
arm-intrinsics.ll
array_allocated.ll
array_associated.ll
array_dataLocation.ll
array_rank.ll
assume-bundles.ll
atomics.ll
bitcast-address-space-nested-global-cycle.ll
bitcast-address-space-nested-global.ll
bitcast-address-space-through-constant-inttoptr-inside-gep-instruction.ll
bitcast-address-space-through-constant-inttoptr.ll
bitcast-address-space-through-gep-2.ll
bitcast-address-space-through-gep.ll
bitcast-address-space-through-inttoptr.ll
bitcast-address-spaces.ll
bitcast-alias-address-space.ll
bitcast-pointer-vector-neg.ll
bitcast-vector-pointer-as-neg.ll
bitcast-vector-pointer-as.ll
bitcast-vector-pointer-neg.ll
bitcast-vector-pointer-pos.ll
blockbyref.ll
bswap.ll
byref.ll
byval-1.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
byval-4.ll
callbr.ll [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
callsite-dbgloc.ll
cc-flags.ll
comdat-decl1.ll
comdat-decl2.ll
comdat.ll
comdat2.ll
comdat3.ll
commandline-meta1.ll
commandline-meta2.ll
commandline-meta3.ll
commandline-meta4.ll
cttz-undef-arg.ll
dbg-difile-crash.ll
dbg-invalid-compileunit.ll
dbg-invalid-named-metadata.ll
dbg-invalid-retaintypes.ll
dbg-invalid-vector.ll
dbg-line-without-file.ll
dbg-null-retained-type.ll
dbg-orphaned-compileunit.ll
dbg-typerefs.ll
dbg.ll
deoptimize-intrinsic.ll
dereferenceable-md-inttoptr.ll
dereferenceable-md.ll
di-subroutine-localvar.ll
diderivedtype-address-space-atomic-type.ll
diderivedtype-address-space-const-type.ll
diderivedtype-address-space-friend.ll
diderivedtype-address-space-inheritance.ll
diderivedtype-address-space-member.ll
diderivedtype-address-space-ptr-to-member-type.ll
diderivedtype-address-space-restrict-type.ll
diderivedtype-address-space-rvalue-reference-type.ll
diderivedtype-address-space-typedef.ll
diderivedtype-address-space-volatile-type.ll
diexpression-dwarf-entry-value.ll
diexpression-entry-value-llvm-ir.ll
diexpression-entry-value.ll
diexpression-swap.ll
diexpression-valid-entry-value.ll
DIFile.ll
digenericsubrange-count-upperBound.ll
digenericsubrange-missing-stride.ll
digenericsubrange-missing-upperBound.ll
diglobalvariable.ll
dilocation-in-wrong-place.ll
DILocation-parents.ll
DILocation-scope.ll
disubprogram-name-match-only.ll
DISubprogram.ll
disubrange-count-upperBound.ll
disubrange-missing-upperBound.ll
dominates.ll [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
element-wise-atomic-memory-intrinsics.ll
elementtype.ll
extract-vector-mismatched-element-types.ll [IR] Move vector.insert/vector.extract out of experimental namespace 2022-06-27 10:48:45 +00:00
fnarg-debuginfo.ll
fnarg-nodebug.ll
force-opaque-ptr.ll
fp-intrinsics.ll
fpmath.ll
fragment.ll
frameescape.ll
func-dbg.ll
function-metadata-bad.ll
function-metadata-good.ll
gc_relocate_addrspace.ll
gc_relocate_operand.ll
gc_relocate_return.ll
gcread-ptrptr.ll
gcroot.ll
gcwrite-ptrptr.ll
get-active-lane-mask.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
global-ctors-2.ll
global-ctors.ll
guard-intrinsic.ll
ident-meta1.ll
ident-meta2.ll
ident-meta3.ll
ident-meta4.ll
ifunc.ll
immarg-param-attribute-invalid.ll
inalloca-vararg.ll
inalloca1.ll
inalloca2.ll
inalloca3.ll
inline-asm-indirect-operand.ll
insert-extract-intrinsics-invalid.ll [IR] Move vector.insert/vector.extract out of experimental namespace 2022-06-27 10:48:45 +00:00
insert-vector-mismatched-element-types.ll [IR] Move vector.insert/vector.extract out of experimental namespace 2022-06-27 10:48:45 +00:00
intrinsic-addr-taken.ll
intrinsic-arg-overloading-struct-ret.ll
intrinsic-bad-arg-type.ll
intrinsic-immarg.ll [clang] Add support for __builtin_memset_inline 2022-06-10 13:13:59 +00:00
invalid-cleanuppad-chain.ll
invalid-disubrange-count-node.ll
invalid-disubrange-lowerBound.ll
invalid-disubrange-stride.ll
invalid-disubrange-upperBound.ll
invalid-eh.ll
invalid-frame-pointer-attr-empty.ll
invalid-frame-pointer-attr-no-value.ll
invalid-frame-pointer-attr.ll
invalid-patchable-function-entry.ll
invalid-splice.ll
invalid-statepoint.ll
invalid-strbool-attr.ll
invalid-vp-intrinsics.ll [VP] Add vp.icmp comparison intrinsic and docs 2022-03-30 17:05:11 +01:00
invalid-warn-stack-size.ll
invariant.group.ll
invoke.ll
jumptable.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
llvm.compiler_used-invalid-type.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
llvm.dbg.declare-address.ll
llvm.dbg.declare-expression.ll
llvm.dbg.declare-variable.ll
llvm.dbg.intrinsic-dbg-attachment.ll
llvm.dbg.value-expression.ll
llvm.dbg.value-value.ll
llvm.dbg.value-variable.ll
llvm.fptrunc.round.ll
llvm.loop-cu-strip-indirect.ll
llvm.loop-cu-strip.ll
llvm.loop.cu.ll
llvm.loop.ll
llvm.used-invalid-init.ll
llvm.used-invalid-init2.ll
llvm.used-invalid-type.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
llvm.used-invalid-type2.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
llvm.used-ptr-type.ll
masked-load.ll
masked-store.ll
matrix-intrinsics-opaque-ptrs.ll
matrix-intrinsics.ll
mdcompositetype-templateparams-tuple.ll
mdcompositetype-templateparams.ll
memcpy-inline.ll
memcpy.ll
memprof-metadata-bad.ll [MemProf] Basic metadata support and verification 2022-07-20 15:30:55 -07:00
memprof-metadata-good.ll [MemProf] Basic metadata support and verification 2022-07-20 15:30:55 -07:00
memset-inline.ll [clang] Add support for __builtin_memset_inline 2022-06-10 13:13:59 +00:00
metadata-function-dbg.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
metadata-function-prof.ll
module-flags-1.ll [IR] Allow absence for Min module flags and make AArch64 BTI/PAC-RET flags backward compatible 2022-07-18 09:35:12 -07:00
module-flags-2.ll
module-flags-3.ll
module-flags-cgprofile.ll
module-flags-semantic-interposition.ll
musttail-invalid.ll
musttail-valid.ll
noalias_scope_decl.ll
non-integer-gep-index.ll
non-integer-gep-index.ll.bc
non-integral-pointers.ll
noundef.ll
opaque-ptr-invalid.ll
opaque-ptr.ll
operand-bundles.ll
param-align.ll [Verifier] Verify parameter alignment. 2022-03-27 08:35:05 +08:00
param-attr-align.ll Verify parameter alignment attribute 2022-03-27 09:03:22 +08:00
param-ret-align.ll [Verifier] Verify parameter alignment. 2022-03-27 08:35:05 +08:00
PhiGrouping.ll
pr34325.ll
preallocated-invalid.ll
preallocated-valid.ll
ptrauth-operand-bundles.ll
range-1.ll
range-2.ll
README.txt
recursive-struct-param.ll
recursive-type-1.ll
recursive-type-2.ll
recursive-type-3.ll
recursive-type-load.ll
recursive-type-store.ll
reduction-intrinsics.ll
resume.ll
sat-intrinsics.ll
scalable-global-vars.ll
scalable-vector-struct-alloca.ll
scalable-vector-struct-load.ll
scalable-vector-struct-store.ll
scatter_gather.ll
SelfReferential.ll
set1.ll
speculatable-callsite-invalid.ll
speculatable-callsite.ll
sret.ll
statepoint.ll
stepvector-intrinsic.ll
swiftasync.ll
swifterror.ll
swifterror2.ll
swifterror3.ll
swiftself.ll
swifttailcc-musttail-valid.ll
swifttailcc-musttail.ll
tailcc-musttail.ll
tbaa-allowed.ll
tbaa.ll
token1-with-asserts.ll
token1-without-asserts.ll
token2.ll
token3.ll
token4.ll
token5.ll
token6.ll
token7.ll
unique-disubprogram.ll
unsized-types-alloca.ll
unsized-types-load.ll
unsized-types-store.ll
varargs-intrinsic.ll
variant-part.ll
vp-intrinsics.ll [VP] Add more cast VPintrinsic and docs. 2022-04-01 09:16:10 +08:00
vscale_range.ll
weak-dllimport.ll
writeonly.ll
x86_amx1.ll
x86_amx2.ll
x86_amx3.ll
x86_amx4.ll
x86_amx5.ll
x86_amx6.ll
x86_amx7.ll
x86_amx8.ll
x86_amx9.ll
x86_intr.ll

This directory contains testcases that the verifier is supposed to detect as
malformed LLVM code.  Testcases for situations that the verifier incorrectly
identifies as malformed should go in the test/Assembler directory.