[all-commits] [llvm/llvm-project] f8325f: [Tablegen] Bugfix and refactor VarLenCodeEmitter H...
Erik Jonsson via All-commits
all-commits at lists.llvm.org
Thu Oct 19 22:21:39 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f8325f12606d7c8510abbf933bf95983bf66da7d
https://github.com/llvm/llvm-project/commit/f8325f12606d7c8510abbf933bf95983bf66da7d
Author: Erik Jonsson <erik.j.jonsson at ericsson.com>
Date: 2023-10-20 (Fri, 20 Oct 2023)
Changed paths:
A llvm/test/TableGen/VarLenEncoderHwModes.td
M llvm/utils/TableGen/VarLenCodeEmitterGen.cpp
Log Message:
-----------
[Tablegen] Bugfix and refactor VarLenCodeEmitter HwModes. (#68795)
VarLenCodeEmitterGen produced code that did not compile if using
alternative encoding in different HwModes. It's not possbile to assign
unsigned **Index = Index_<mode>[][2] = { ... };
As a fix, Index and InstBits where removed in favor of mode specific
getInstBits_<mode> functions since this is the only place the arrays are
accessed.
Handling of HwModes is now concentrated to the VarLenCodeEmitterGen::run
method reducing the overall amount of code and enabling other types of
alternative encodings not related to HwModes.
Added a test for VarLenCodeEmitterGen HwModes.
Make sure that HwModes are supported in the same way they are supported
for the standard CodeEmitter. It should be possible to define
instructions with universal encoding across modes, distinct encodings
for each mode or only define encodings for some modes.
Fixed indentation in generated code.
More information about the All-commits
mailing list