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.
Differential D150310
[TableGen][SubtargetEmitter] Add the StartAtCycles field in the WriteRes class. fpetrogalli on May 10 2023, 2:28 PM. Authored by
Details Conditions that need to be met:
Diff Detail
Unit Tests
Event TimelineComment 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,
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
|
This code comment should describe (in a sentence or two) what is StartAtCycle used for.