Conditions that need to be met:
- count(StartAtCycles) == count(ReservedCycles);
- For each i: StartAtCycles[i] < ReservedCycles[i];
- If left unspecified, the elements are set to 0.
Paths
| Differential D150310
[TableGen][SubtargetEmitter] Add the StartAtCycles field in the WriteRes class. ClosedPublic Authored by fpetrogalli on May 10 2023, 2:28 PM.
Details Summary Conditions that need to be met:
Diff Detail
Event Timelinefpetrogalli added a child revision: D150311: [MISched] Use StartAtCycle in trace dumps..May 10 2023, 2:34 PM Comment Actions Hi Francesco, Thanks for contributing this patch! In the past, I always wanted to add the ability to model "delayed resource consumption". However, I never got the time to actually do it. In the past, the lack of a proper mechanism for describing delayed resource consumption was identified as the main reason why sometimes llvm-mca produced poor quality perf reports. In future, more work will be needed to teach llvm-mca and exegesis how to correctly handle StartAtCycle information (if available). Long story short: your approach looks good to me and it similar to what was suggested in the past by others. Patch looks good to me (modulo a few minor nits - see below). Cheers,
This revision is now accepted and ready to land.May 12 2023, 4:14 AM
This revision was landed with ongoing or failed builds.May 15 2023, 1:54 AM Closed by commit rG4bfe4108022e: [TableGen][SubtargetEmitter] Add the StartAtCycles field in the WriteRes class. (authored by fpetrogalli). · Explain Why This revision was automatically updated to reflect the committed changes. Comment Actions This patch is causing multiple warnings when building with assertions. [3147/3173] Building CXX object unittests/tools/llvm-exegesis/CMakeFiles/LLVMExegesisTests.dir/X86/SchedClassResolutionTest.cpp.o ...//llvm-project/llvm/unittests/tools/llvm-exegesis/X86/SchedClassResolutionTest.cpp:68:70: warning: missing field 'StartAtCycle' initializer [-Wmissing-field-initializers] computeIdealizedProcResPressure(STI.getSchedModel(), {{P0Idx, 2}}); It would be great if you could take a look. If it takes longer to fix, please revert the commit in the meantime. Comment Actions
Thank you for the heads up @fhahn - I have created a fix at https://reviews.llvm.org/D150569 Francesco
michaelmaitland added inline comments.
fpetrogalli added inline comments.
Revision Contents
Diff 522084 llvm/include/llvm/MC/MCSchedule.h
llvm/include/llvm/Target/TargetSchedule.td
llvm/test/TableGen/StartAtCycle.td
llvm/tools/llvm-exegesis/lib/SchedClassResolution.cpp
llvm/utils/TableGen/SubtargetEmitter.cpp
|
This code comment should describe (in a sentence or two) what is StartAtCycle used for.