[PATCH] D59222: MIR: Stop reinitializing target information for every use
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 11 13:27:25 PDT 2019
arsenm marked an inline comment as done.
arsenm 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;
+
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59222/new/
https://reviews.llvm.org/D59222
More information about the llvm-commits
mailing list