[llvm-dev] How to handle use of attribute group IDs with missing attribute group definition?

Robin Eklind via llvm-dev llvm-dev at lists.llvm.org
Tue Nov 13 04:27:50 PST 2018


Hi,

We've been exploring the test case suite of LLVM recently, and came across
quite a few test cases that reference attribute group IDs (e.g. `#2`), not
being defined in the module (i..e no associate attribute group definition
`#2 = {}`).

For instance, test/DebugInfo/X86/parameters.ll [1] uses #0, #1 and #2, but
only contains definitions for #0 and #1. The definition for #2 is missing.

So, my question is, is this valid LLVM IR? I tried to run the file through
opt -verify, but no error or warning was reported.

If it is valid LLVM IR, what is the behaviour when parsing such files? To
insert an empty definition (i.e. `#2 = {}`), or to remove uses of undefined
attribute group definitions (i.e. remove any reference of #2)?

Kindly,
Robin


[1]:
https://github.com/llvm-mirror/llvm/blob/master/test/DebugInfo/X86/parameters.ll
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181113/d7d54590/attachment.html>


More information about the llvm-dev mailing list