diff options
author | Nikita Popov <npopov@redhat.com> | 2024-01-19 16:08:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-19 16:08:16 +0100 |
commit | 9350860824a8badbbfe2ba81804e163543da2173 (patch) | |
tree | ec63a7c4364dd775c755bf3e97a16c78e3bf337a /llvm/lib/FileCheck/FileCheck.cpp | |
parent | 535b197b8e96b816998ad4b4ee45e011fa05fba9 (diff) | |
download | llvm-9350860824a8badbbfe2ba81804e163543da2173.zip llvm-9350860824a8badbbfe2ba81804e163543da2173.tar.gz llvm-9350860824a8badbbfe2ba81804e163543da2173.tar.bz2 |
[AsmParser] Add support for reading incomplete IR (part 1) (#78421)
Add an `-allow-incomplete-ir` flag to the IR parser, which allows
reading IR with missing declarations. This is intended to produce a
best-effort interpretation of the IR, along the same lines of what we
would manually do when taking, for example, a function from
`-print-after-all` output and fixing it up to be valid IR.
This patch only supports dropping references to undeclared metadata,
either by dropping metadata attachments from instructions/functions, or
by dropping calls to certain intrinsics (like debug intrinsics). I will
implement support for inserting missing function/global declarations in
a followup patch.
We don't have real use lists for metadata, so the approach here is to
iterate over the whole IR and identify metadata that needs to be
dropped. This does not support all possible cases, but should handle
anything that's relevant for the function-only IR use case.
Diffstat (limited to 'llvm/lib/FileCheck/FileCheck.cpp')
0 files changed, 0 insertions, 0 deletions