[PATCH] D110527: [llvm-reduce] Add MIR support.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 10 10:02:19 PST 2021


reames added a comment.

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.)


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