Manually writing/maintaining schedule model is time-consuming and
error-prone. This patch introduces list of tools that help to auto
generate x86 schedule model. Currently, it's only capable to generate
alderlake-p schedmodel. However, it's easy to extend it to support more
target. Read llvm/utils/schedtool/README.md for more details.
Details
- Reviewers
RKSimon
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/utils/schedtool/xed-patch/0001-Dump-eosz-and-operand-s-xtype-width-when-verbosity-i.patch | ||
---|---|---|
14 | TBH I don't think its acceptable to include patches for another project inside llvm |
llvm/utils/schedtool/xed-patch/0001-Dump-eosz-and-operand-s-xtype-width-when-verbosity-i.patch | ||
---|---|---|
14 | I'm planning to put this tool in a single git repo. But it may takes a few weeks even several months to request... |
@HaohaiWen Something I've noticed is that the autogen AlderlakeP model has a LOT of single match instregex entries (and in fact the regex is written to be a single match) - which are a lot slower to match/compile in llvm-tblgen than instr equivalents - see https://github.com/llvm/llvm-project/issues/35303
I added a dbg dump to InstRegexOp::apply to warn about single intregex matches and many of them are coming from AlderlakeP.
Completely random example (it was just where the I paused the debugger):
def ADLPWriteResGroup222 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_06, ADLPPort01_05]> { let ResourceCycles = [2, 2, 1, 2]; let Latency = 6; let NumMicroOps = 7; } def : InstRW<[ADLPWriteResGroup222], (instregex "^SHA1MSG2rr$")>;
That could just as well be (instrs SHA1MSG2rr)
def ADLPWriteResGroup222 : SchedWriteRes<[ADLPPort00_01, ADLPPort00_01_05, ADLPPort00_06, ADLPPort01_05]> { let ResourceCycles = [2, 2, 1, 2]; let Latency = 6; let NumMicroOps = 7; } def : InstRW<[ADLPWriteResGroup222], (instregex "^SHA1MSG2rr$")>;That could just as well be (instrs SHA1MSG2rr)
Fixed
Don't match CodeGenOnly instructions with lock prefix. Add default LoadUOps argument.
[add_smv_uopsinfo] Fix resource mapping which never worked before
Just found this bug. It's important to map ports from older arch to new arch
coolection -> collection