[PATCH] D21091: AArch64: refactor sysreg handling (new TableGen backend!)

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 5 14:30:26 PDT 2016


t.p.northover closed this revision.
t.p.northover marked 3 inline comments as done.
t.p.northover added a comment.

Thanks Ahmed. It should be committed (with most of your latest suggestions) as r274575 and r274576.

Tim.


================
Comment at: utils/TableGen/SearchableTableEmitter.cpp:232
@@ +231,3 @@
+                                         raw_ostream &OS) {
+  std::string TableName = InstanceClass->getName();
+  std::vector<Record *> Items = Records.getAllDerivedDefinitions(TableName);
----------------
ab wrote:
> const&? Or is the copy intentional?
getAllDerivedDefinitions returns an std::vector by value so I think they're equivalent (via RVO).

================
Comment at: utils/TableGen/SearchableTableEmitter.cpp:253
@@ +252,3 @@
+
+  for (auto Field : *InstanceClass->getValueAsListInit("SearchableFields")) {
+    SearchTables.emplace_back();
----------------
ab wrote:
> auto *?
> 
> Also, I'm not a huge fan of Almost Always Auto, so I'd just use Record*, but either is fine.
I went with `auto *` to avoid an ugly line wrap. I've used `Record *` below though, where it's less obvious what the type is.


Repository:
  rL LLVM

http://reviews.llvm.org/D21091





More information about the llvm-commits mailing list