Co-authored-by: Graham Hunter <graham.hunter@arm.com>
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| clang/lib/Driver/ToolChains/Arch/AArch64.cpp | ||
|---|---|---|
| 66 | This is almost an enum class. enum class OptState { Unset, True, False }; | |
| llvm/unittests/Support/TargetParserTest.cpp | ||
|---|---|---|
| 913 | Has AEK_SVE2 been doubled up in this constant? | |
- Fix duplicate arch feature in unit test
- Use enum class instead of plain enum with typedef
| clang/lib/Driver/ToolChains/Arch/AArch64.cpp | ||
|---|---|---|
| 68 | Yes it does, but I believe that is the desired behaviour. | |
| clang/lib/Driver/ToolChains/Arch/AArch64.cpp | ||
|---|---|---|
| 68 | Doesn't your patch change this behaviour? The condition on line 147 no longer considers the original order of the flags. | |
- Use more brute force approach to ensure ordering is accounted for
- This massively simplifies things and removes what was becoming very confusing logic
- Add tests for missing cases
| clang/lib/Driver/ToolChains/Arch/AArch64.cpp | ||
|---|---|---|
| 82–88 | ^^^ Are the above changes necessary? i.e. if only +sve2-sha3 is set as target feature, I thought LLVM automatically infers that it requires +sve and +sve2. Is that not the case? | |
| clang/lib/Driver/ToolChains/Arch/AArch64.cpp | ||
|---|---|---|
| 82–88 | That is the case yes, however this code is to catch combinations, for example +sve2-bitperm+nosve2 needs to keep sve enabled, if +sve was never in the feature set this wouldn't be the case. | |
The tests in this are broken for windows, which I've fixed in 45e102a173680fd3c90def79a7f0766ed2786ff0.
This is almost an enum class.
enum class OptState { Unset, True, False };