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

Markus Lavin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 22 01:41:53 PDT 2021


markus added inline comments.


================
Comment at: llvm/test/tools/llvm-reduce/mir/instr-reduce.mir:4
+
+# REQUIRES: plugins
+# REQUIRES: riscv-registered-target
----------------
aeubanks wrote:
> why does this need plugins?
It does not.


================
Comment at: llvm/tools/llvm-reduce/ReducerWorkItem.h:21
+  std::shared_ptr<Module> M;
+  std::unique_ptr<MachineFunction> MF;
+  void print(raw_ostream &ROS, void *p = nullptr) const;
----------------
aeubanks wrote:
> I'm not super familiar with MIR, but do we only support one function at a time?
There could be multiple functions but we do not support it here right now. There is a comment about it in parsing in ReducerWorkItem.cpp:114. When reducing MIR reproducers you have typically already limited yourself to a single functions so I do not see that there is a great need. Not initially at least, it can always be done as a follow up improvement later on. 


================
Comment at: llvm/tools/llvm-reduce/llvm-reduce.cpp:79
+                 cl::desc("Set the target triple"));
+cl::opt<bool> EnableMIR("mir", cl::desc("MIR mode"));
 
----------------
aeubanks wrote:
> markus wrote:
> > aeubanks wrote:
> > > it'd be nice if we could automatically infer this from the input (like `llc`)
> > Yeah, but maybe we can save that for later as well.
> could you add a TODO?
I thought this comment was about replacing EnableMIR with InputLanguage and inferring from the filename which I have done already.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110527/new/

https://reviews.llvm.org/D110527



More information about the llvm-commits mailing list