LatencyGenerator now computes all possible mode of serial execution for an Instruction upfront and generates CodeTemplate for the ones that give the best results (e.g. no need to generate a two instructions snippet when repeating a single one would do). The next step is to generate even more configurations for cases (e.g. for XOR we should generate "XOR EAX, EAX, EAX" and "XOR EAX, EAX, EBX")
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 23832 Build 23831: arc lint + arc unit
Event Timeline
tools/llvm-exegesis/lib/CodeTemplate.cpp | ||
---|---|---|
68 | ditto | |
91 | I can't convince myself that this is fine. Let's go through a static Execution[]. | |
tools/llvm-exegesis/lib/CodeTemplate.h | ||
51 | please give an example for each one of these. | |
62 | *powers | |
107 | This is calling for buildbot failures (I remember that some compilers handle this differently). Let's rename one of these to ExecutionMode. |
tools/llvm-exegesis/lib/CodeTemplate.h | ||
---|---|---|
53 | There is a large difference between e.g. this one and SERIAL_VIA_IMPLICIT_REGS. The latter indicates that the inst is always serial, the former that it can be made serial. Maybe rename SERIAL_VIA_IMPLICIT_REGS to ALWAYS_SERIAL_VIA_IMPLICIT_REGS ? | |
53 | Add doc for each one of these, e.g. "The instruction can be made serial by adding a back-to-back instruction that reads/writes to memory." | |
tools/llvm-exegesis/lib/Latency.cpp | ||
107 | back-to-back ? :D | |
107 | I don't get this comment. | |
123 | ditto | |
unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp | ||
61 | checkAndGetBestCodeTemplate | |
64 | Please add a comment on generateCodeTemplates as to the order of templates. |
tools/llvm-exegesis/lib/CodeTemplate.cpp | ||
---|---|---|
69 | why do you need this ? The type system should do that for you... | |
tools/llvm-exegesis/lib/CodeTemplate.h | ||
60 | This would be the case if you wrote to memory too, so add "/reads" after "clobbers" | |
70 | Uses | |
78 | doc ? | |
tools/llvm-exegesis/lib/Latency.cpp | ||
169 | ditto | |
tools/llvm-exegesis/lib/SnippetGenerator.cpp | ||
25 ↗ | (On Diff #169957) | pass by && ? |
please give an example for each one of these.