[PATCH] D32684: [X86] Adding new LLVM TableGen backend that generates the X86 backend memory folding tables.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 06:15:53 PDT 2017
RKSimon added a comment.
A few style comments
================
Comment at: utils/TableGen/X86FoldTablesEmitter.cpp:69
+ else
+ result.erase(result.length() - 3, 3);
+
----------------
Is there a better way to avoid having to strip the trailing " | "? If not, at least comment what this is doing.
================
Comment at: utils/TableGen/X86FoldTablesEmitter.cpp:265
+ if (Inst->Operands[i].Rec->getName() == "RST") {
+ return true;
+ }
----------------
Use llvm::any_of ?
================
Comment at: utils/TableGen/X86FoldTablesEmitter.cpp:275
+ if (Inst->Operands[i].Rec->getName() == "ptr_rc_tailcall") {
+ return true;
+ }
----------------
Use llvm::any_of ?
================
Comment at: utils/TableGen/X86FoldTablesEmitter.cpp:329
+ if (IntrinsicSensitive) {
+ if (MemRec->getName() == "sdmem" || MemRec->getName() == "ssmem")
+ return 128;
----------------
```
if (IntrinsicSensitive &&
(MemRec->getName() == "sdmem" || MemRec->getName() == "ssmem"))
return 128;
```
================
Comment at: utils/TableGen/X86FoldTablesEmitter.cpp:360
+ ListInit *SchedRW = Rec->getValueAsListInit(List);
+ for (auto Sched : *SchedRW) {
+ if (Sched->getAsString() == Def)
----------------
llvm::any_of
================
Comment at: utils/TableGen/X86FoldTablesEmitter.cpp:397
+ return true;
+ return false;
+}
----------------
```
return (Op->getName().find("_NOREX") != std::string::npos);
```
https://reviews.llvm.org/D32684
More information about the llvm-commits
mailing list