[PATCH] D69836: [MIR] Target specific MIR formating and parsing
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 00:06:06 PST 2019
arsenm added inline comments.
================
Comment at: llvm/include/llvm/CodeGen/TargetInstrInfo.h:1795-1799
+ virtual const MIRFormatter *getMIRFormatter() const {
+ if (!Formatter.get())
+ Formatter = std::make_unique<MIRFormatter>();
+ return Formatter.get();
+ }
----------------
arsenm wrote:
> This requires the target implementation to recreate the null check and construct pattern Make this non-virtual and have a virtual getMIRFormatterImpl ?
I also just realized this should really go in the TargetMachine, not TargeInstrInfo, similar to the target specific YAML functions. The name should also be createMIRFormatter for consistency
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69836/new/
https://reviews.llvm.org/D69836
More information about the llvm-commits
mailing list