[PATCH] D125276: [TableGen] Remove the use of global Record state

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 15:32:53 PDT 2022


rriddle created this revision.
Herald added subscribers: pmatos, asb, Chia-hungDuan, bollu, hiraditya, jgravelle-google, sbc100, dschuff.
Herald added a project: All.
rriddle requested review of this revision.
Herald added subscribers: llvm-commits, stephenneuendorffer, aheejin.
Herald added a project: LLVM.

This commits removes TableGens reliance on managed static global record state
by moving the RecordContext into the RecordKeeper. The RecordKeeper is now
treated similarly to a (LLVM|MLIR|etc)Context object and is passed to static
construction functions. This is an important step forward in removing TableGens
reliance on global state, and in a followup will allow for users that parse tablegen
to parse multiple tablegen files without worrying about Record lifetime.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125276

Files:
  llvm/include/llvm/TableGen/Record.h
  llvm/lib/TableGen/Error.cpp
  llvm/lib/TableGen/Parser.cpp
  llvm/lib/TableGen/Record.cpp
  llvm/lib/TableGen/RecordContext.h
  llvm/lib/TableGen/TGParser.cpp
  llvm/utils/TableGen/CodeGenDAGPatterns.cpp
  llvm/utils/TableGen/CodeGenInstruction.cpp
  llvm/utils/TableGen/CodeGenRegisters.cpp
  llvm/utils/TableGen/CodeGenTarget.cpp
  llvm/utils/TableGen/DecoderEmitter.cpp
  llvm/utils/TableGen/PseudoLoweringEmitter.cpp
  llvm/utils/TableGen/SearchableTableEmitter.cpp
  llvm/utils/TableGen/WebAssemblyDisassemblerEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125276.428220.patch
Type: text/x-patch
Size: 81760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220509/18872080/attachment-0001.bin>


More information about the llvm-commits mailing list