[PATCH] D59222: MIR: Stop reinitializing target information for every use

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 13:42:46 PDT 2019


thegameg added inline comments.


================
Comment at: lib/CodeGen/MIRParser/MIRParser.cpp:56
   SlotMapping IRSlots;
-  /// Maps from register class names to register classes.
-  Name2RegClassMap Names2RegClasses;
-  /// Maps from register bank names to register banks.
-  Name2RegBankMap Names2RegBanks;
+  std::unique_ptr<PerTargetMIParsingState> Target;
+
----------------
arsenm wrote:
> thegameg wrote:
> > nit: `Optional<PerTargetMIParsingState>`?
> I don't think Optional really applies here. It's not really optional, so much as the construction needs to be delayed until a Subtarget is eventually available.
Yeah, both are fine with me after all.


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

https://reviews.llvm.org/D59222





More information about the llvm-commits mailing list