-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FMV][AArch64] Do not optimize away runtime checks for implied featur…
…es (#99522) Summary: When generating the body of the ifunc resolver, clang skips runtime checks for features that are implied from the command line. We bend this rule for certain features (memtag, bti, dgh), but this happens quite arbitrarily in my opinion. The reasoning is that some features are in the HINT instruction space, meaning they operate as NOPs if the hardware does not support them. Still the user wants to detect their presence with runtime checks. See #90928 for details. I think we should always perform runtime checks regardless of the feature and then try to statically resolve calls whenever a function is compiled with a sufficiently high set of architecture features (so including target/target_version/target_clones attributes, and command line options). This is what GCC does. We have an open PR in LLVM GlobalOpt since it was suggested not to perform such codegen optimizations in clang anyway. See #87939. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251293
- Loading branch information
1 parent
5fe4c4c
commit 15b0642
Showing
3 changed files
with
55 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters