[PATCH] D67544: [TableGen] Support encoding and decoding per-HwMode
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 16 08:36:18 PDT 2019
RKSimon added inline comments.
================
Comment at: llvm/utils/TableGen/CodeEmitterGen.cpp:54
std::set<unsigned> &NamedOpIndices,
std::string &Case, CodeGenTarget &Target);
----------------
Separate NFC clang-format patch?
================
Comment at: llvm/utils/TableGen/CodeEmitterGen.cpp:82
+ unsigned &NumberedOp, std::set<unsigned> &NamedOpIndices, std::string &Case,
+ CodeGenTarget &Target) {
CodeGenInstruction &CGI = Target.getInstruction(R);
----------------
Separate NFC clang-format patch?
================
Comment at: llvm/utils/TableGen/CodeEmitterGen.cpp:261
+ if (const RecordVal *RV = R->getValue("EncodingInfos")) {
+ if (DefInit *DI = dyn_cast_or_null<DefInit>(RV->getValue())) {
+ auto HWM = Target.getHwModes();
----------------
(style) auto *DI =
================
Comment at: llvm/utils/TableGen/CodeEmitterGen.cpp:263
+ auto HWM = Target.getHwModes();
+ auto EBM = EncodingInfoByHwMode(DI->getDef(), HWM);
+ Case += " switch (HwMode) {\n";
----------------
(style) Don't use auto if the type isn't obvious.
================
Comment at: llvm/utils/TableGen/CodeEmitterGen.cpp:341
+ CodeGenTarget &Target, int HwMode) {
+ auto HWM = Target.getHwModes();
+ if (HwMode == -1)
----------------
(style) Don't use auto if the type isn't obvious.
================
Comment at: llvm/utils/TableGen/CodeEmitterGen.cpp:359
+ if (const RecordVal *RV = R->getValue("EncodingInfos")) {
+ if (DefInit *DI = dyn_cast_or_null<DefInit>(RV->getValue())) {
+ auto EBM = EncodingInfoByHwMode(DI->getDef(), HWM);
----------------
(style) auto *DI =
================
Comment at: llvm/utils/TableGen/FixedLenDecoderEmitter.cpp:2398
+ NumberedInstruction->TheDef->getValue("EncodingInfos")) {
+ if (DefInit *DI = dyn_cast_or_null<DefInit>(RV->getValue())) {
+ auto HWM = Target.getHwModes();
----------------
(style) auto *DI =
================
Comment at: llvm/utils/TableGen/FixedLenDecoderEmitter.cpp:2468
+ if (populateInstruction(Target, *EncodingDef, *Inst, i, Operands)) {
+ OpcMap[std::make_pair(DecoderNamespace, Size)].emplace_back(
+ i, IndexOfInstruction.find(Def)->second);
----------------
Can we move the DecoderNamespace creation inside the populateInstruction case?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67544/new/
https://reviews.llvm.org/D67544
More information about the llvm-commits
mailing list