[PATCH] D110527: [llvm-reduce] Add MIR support.
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 10 10:07:01 PST 2021
bjope added a comment.
In D110527#3121905 <https://reviews.llvm.org/D110527#3121905>, @reames wrote:
> In D110527#3121844 <https://reviews.llvm.org/D110527#3121844>, @aeubanks wrote:
>
>> In D110527#3121812 <https://reviews.llvm.org/D110527#3121812>, @reames wrote:
>>
>>> I'm looking at using this functionality, and ran into a question on the design. I'm not clear why you exposed an mtriple command line argument on llvm-reduce. It appears you're using this to derive a default data layout, and as an input to parsing the machine function. However, LLVM IR allows specifying both data layout and triple in IR. As a result, we should be able to have the parsing derive the appropriate target directly from the test case. Is there something I'm missing here?
>>
>> I believe it's only used in the MIR case, not the IR case. This could definitely be made clearer in the cl::opt help.
>
> I don't think it's necessary even for the MIR case. MIR includes the full IR module, and is as a result, is also fully self describing. (If the optional datalayout and triple fields are present.)
The IR part can often be eliminated from a MIR based test case. But sure, one could argue that when running llvm-reduce it could be mandatory to add an IR section in the .mir file first (but then I think one needs to also add the function prototype).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110527/new/
https://reviews.llvm.org/D110527
More information about the llvm-commits
mailing list