[PATCH] D43756: TableGen: Delay instantiating inline anonymous records

Artem Belevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 5 16:27:51 PST 2018


tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/TableGen/Record.cpp:1379
+VarDefInit *VarDefInit::get(Record *Class, ArrayRef<Init *> Args) {
+  static FoldingSet<VarDefInit> ThePool;
+
----------------
nhaehnle wrote:
> tra wrote:
> > Same concern as I've raised in D43680 regarding use of the pool values across multiple invocations of tablegen's main function.
> Hmm. I'm less inclined to change this here, since all the other *Init classes work the same way already. I don't see anything that makes VarDefInit qualitatively different from e.g. OpInit.
OK. 

One of these days we'll need to clean these static pools up on exit from TableGenMain.


Repository:
  rL LLVM

https://reviews.llvm.org/D43756





More information about the llvm-commits mailing list