[PATCH] D53320: [llvm-exegeis] Computing Latency configuration upfront so we can generate many CodeTemplates at once.
Clement Courbet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 17 01:09:04 PDT 2018
courbet added inline comments.
================
Comment at: tools/llvm-exegesis/lib/CodeTemplate.cpp:69
+llvm::StringRef getName(ExecutionMode Bit) {
+ assert(llvm::isPowerOf2_32(static_cast<uint32_t>(Bit)) &&
+ "Bit must be a power of two");
----------------
why do you need this ? The type system should do that for you...
================
Comment at: tools/llvm-exegesis/lib/CodeTemplate.h:60
+ // The execution can be made serial by inserting a second instruction that
+ // clobbers memory.
+ // e.g. MOV8rm
----------------
This would be the case if you wrote to memory too, so add "/reads" after "clobbers"
================
Comment at: tools/llvm-exegesis/lib/CodeTemplate.h:70
+ // The execution can be made serial by inserting a second instruction that
+ // uses one of the Defs and defs one of the Use.
+ // e.g.
----------------
Uses
================
Comment at: tools/llvm-exegesis/lib/CodeTemplate.h:78
+
+ PARALLEL_VIA_LACKING_OPERANDS = 1u << 5,
+ PARALLEL_VIA_EXPLICIT_REGS = 1u << 6,
----------------
doc ?
================
Comment at: tools/llvm-exegesis/lib/Latency.cpp:85
+ std::vector<CodeTemplate> &CodeTemplates) {
+ assert(llvm::isPowerOf2_32(static_cast<uint32_t>(ExecutionModeBit)) &&
+ "ExecutionModeBit must be a power of two");
----------------
ditto
================
Comment at: tools/llvm-exegesis/lib/SnippetGenerator.cpp:25
+std::vector<CodeTemplate> getSingleton(CodeTemplate &CT) {
+ std::vector<CodeTemplate> Result;
----------------
pass by && ?
Repository:
rL LLVM
https://reviews.llvm.org/D53320
More information about the llvm-commits
mailing list