llvm / llvm/llvm-project

[llvm-mca] Warn the user or error if there is no accurate CPU model for selected -mcpu

Open
#179,955 4 comments 0 reactions 0 assignees View on GitHub
tools:llvm-mca
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Currently if a user passes an -mcpu=option to simulate a certain instruction sequence MCA will use whatever scheduling model is specified for that CPU internally in LLVM. Usually if there is no accurate scheduling model added when a new -mcpu option is upstreamed a sensible default is selected. This is fine for instruction scheduling optimisations, but I would argue is unhelpful for MCA users and can lead to confusion.

For example, in aarch64 many CPUs default to Cortex-A510 scheduling in the absence of dedicated models, but silently simulating a Cortex-A510 in MCA when an unsuspecting user selects a different -mcpu option is unhelpful

Contributor guide

Open the contributing guide

Research direction

Start at llvm-mca's -mcpu handling and the scheduling-model selection for AArch64; trace how fallback models are chosen. Done means the tool explicitly warns or errors when the selected CPU lacks an accurate scheduling model, rather than silently simulating the fallback model.

Written by the indexing model from the issue text.

Assessment

Domain
cli, compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.