aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorRoman Belenov <rbelenov@gmail.com>2025-09-20 01:58:42 +0300
committerGitHub <noreply@github.com>2025-09-19 15:58:42 -0700
commit4a9fdda9882da8f054009c249c4bb0ef18f6f21a (patch)
tree48fa08d2163b59548e2ea73a0d8b6038d389d3ef /clang/lib/Sema/SemaModule.cpp
parentc91fa95fc7426215817c3d20564558a310d587e2 (diff)
downloadllvm-4a9fdda9882da8f054009c249c4bb0ef18f6f21a.zip
llvm-4a9fdda9882da8f054009c249c4bb0ef18f6f21a.tar.gz
llvm-4a9fdda9882da8f054009c249c4bb0ef18f6f21a.tar.bz2
[MCA] Enable customization of individual instructions (#155420)
Currently MCA takes instruction properties from scheduling model. However, some instructions may execute differently depending on external factors - for example, latency of memory instructions may vary differently depending on whether the load comes from L1 cache, L2 or DRAM. While MCA as a static analysis tool cannot model such differences (and currently takes some static decision, e.g. all memory ops are treated as L1 accesses), it makes sense to allow manual modification of instruction properties to model different behavior (e.g. sensitivity of code performance to cache misses in particular load instruction). This patch addresses this need. The library modification is intentionally generic - arbitrary modifications to InstrDesc are allowed. The tool support is currently limited to changing instruction latencies (single number applies to all output arguments and MaxLatency) via coments in the input assembler code; the format is the like this: add (%eax), eax // LLVM-MCA-LATENCY:100 Users of MCA library can already make additional customizations; command line tool can be extended in the future. Note that InstructionView currently shows per-instruction information according to scheduling model and is not affected by this change. See https://github.com/llvm/llvm-project/issues/133429 for additional clarifications (including explanation why existing customization mechanisms do not provide required functionality) --------- Co-authored-by: Min-Yih Hsu <min@myhsu.dev>
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
0 files changed, 0 insertions, 0 deletions