diff options
author | River Riddle <riddleriver@gmail.com> | 2022-05-06 18:05:54 -0700 |
---|---|---|
committer | River Riddle <riddleriver@gmail.com> | 2022-05-11 11:55:33 -0700 |
commit | 2ac3cd20cacdf37135eeb64ad2b7baefb9769e99 (patch) | |
tree | 08cae2495aeaabec60a39287d12198e6dbff8a0b /llvm/utils/TableGen/CodeGenTarget.cpp | |
parent | 3ca6328637b3f42096c652e4df53282649956bdb (diff) | |
download | llvm-2ac3cd20cacdf37135eeb64ad2b7baefb9769e99.zip llvm-2ac3cd20cacdf37135eeb64ad2b7baefb9769e99.tar.gz llvm-2ac3cd20cacdf37135eeb64ad2b7baefb9769e99.tar.bz2 |
[TableGen] Remove the use of global Record state
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.
Differential Revision: https://reviews.llvm.org/D125276
Diffstat (limited to 'llvm/utils/TableGen/CodeGenTarget.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenTarget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenTarget.cpp b/llvm/utils/TableGen/CodeGenTarget.cpp index 649a117..2ccaf99 100644 --- a/llvm/utils/TableGen/CodeGenTarget.cpp +++ b/llvm/utils/TableGen/CodeGenTarget.cpp @@ -552,7 +552,7 @@ void CodeGenTarget::reverseBitsForLittleEndianEncoding() { NewBits[middle] = BI->getBit(middle); } - BitsInit *NewBI = BitsInit::get(NewBits); + BitsInit *NewBI = BitsInit::get(Records, NewBits); // Update the bits in reversed order so that emitInstrOpBits will get the // correct endianness. |