aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2024-10-16 14:43:28 +0100
committerGitHub <noreply@github.com>2024-10-16 14:43:28 +0100
commita3010c77910c706be4c51ce4a95d51211e335a1f (patch)
tree80874a572d4f2e6bbc0a03f1621ee1b73bdf5262 /clang/lib/CodeGen/CodeGenModule.cpp
parentf5d3c87ede965d3cb4dd58aeed0a0b94e674b997 (diff)
downloadllvm-a3010c77910c706be4c51ce4a95d51211e335a1f.zip
llvm-a3010c77910c706be4c51ce4a95d51211e335a1f.tar.gz
llvm-a3010c77910c706be4c51ce4a95d51211e335a1f.tar.bz2
[GlobalISel] Add boolean predicated legalization action methods. (#111287)
Under AArch64 it is common and will become more common to have operation legalization rules dependant on a feature of the architecture. For example HasFP16 or the newer CSSC integer min/max instructions, among many others. With the current legalization rules this either means adding a custom predicate based on the feature as in `legalIf([=](const LegalityQuery &Query) { return HasFP16 && ...; }` or splitting the legalization rules into pieces that place rules optionally into them base on the features available. This patch proposes an alternative where the existing routines like legalFor(..) are provided a boolean predicate, which if false skips adding the rule. It makes the rules cleaner and will hopefully allow them to scale better as we add more features. The SVE predicates for loads/stores I have changed to just be always available. Scalable vectors without SVE have never been supported, but it could also add a condition.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions