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
Event Timeline
tools/llvm-exegesis/lib/CodeTemplate.cpp | ||
---|---|---|
68 ↗ | (On Diff #169811) | ditto |
91 ↗ | (On Diff #169811) | I can't convince myself that this is fine. Let's go through a static Execution[]. |
tools/llvm-exegesis/lib/CodeTemplate.h | ||
51 ↗ | (On Diff #169811) | please give an example for each one of these. |
62 ↗ | (On Diff #169811) | *powers |
82 ↗ | (On Diff #169811) | 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 ↗ | (On Diff #169811) | 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 ↗ | (On Diff #169811) | 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 | ||
104 ↗ | (On Diff #169811) | back-to-back ? :D |
104 ↗ | (On Diff #169811) | I don't get this comment. |
120 ↗ | (On Diff #169811) | ditto |
unittests/tools/llvm-exegesis/X86/SnippetGeneratorTest.cpp | ||
60 ↗ | (On Diff #169811) | checkAndGetBestCodeTemplate |
63 ↗ | (On Diff #169811) | Please add a comment on generateCodeTemplates as to the order of templates. |
tools/llvm-exegesis/lib/CodeTemplate.cpp | ||
---|---|---|
69 ↗ | (On Diff #169957) | why do you need this ? The type system should do that for you... |
tools/llvm-exegesis/lib/CodeTemplate.h | ||
60 ↗ | (On Diff #169957) | This would be the case if you wrote to memory too, so add "/reads" after "clobbers" |
70 ↗ | (On Diff #169957) | Uses |
78 ↗ | (On Diff #169957) | doc ? |
tools/llvm-exegesis/lib/Latency.cpp | ||
85 ↗ | (On Diff #169957) | ditto |
tools/llvm-exegesis/lib/SnippetGenerator.cpp | ||
25 ↗ | (On Diff #169957) | pass by && ? |