[PATCH] D119100: [TableGen] Add a new `encoder` directive into VarLenCodeEmitterGen
Min-Yih Hsu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 6 18:19:23 PST 2022
myhsu created this revision.
myhsu added reviewers: SamWot, jmolloy, RKSimon, craig.topper, ricky26.
Herald added a subscriber: hiraditya.
myhsu requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The new `encoder` directive can be used to specify custom encoder for a single `operand` or `slice`. This is different from the `EncoderMethod` field within an `Operand`, which affects //every// operands in the target.
In addition, this patch also changes the function signature of the encoder method -- a new argument, `InsertPost`, is added to both the default one (i.e. `getMachineValue`) and the custom one. This argument provides the bit position where the operand will eventually be inserted.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119100
Files:
llvm/include/llvm/Target/Target.td
llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp
llvm/test/TableGen/VarLenEncoder.td
llvm/utils/TableGen/VarLenCodeEmitterGen.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119100.406311.patch
Type: text/x-patch
Size: 11228 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220207/2495939e/attachment.bin>
More information about the llvm-commits
mailing list