llvm-project/clang/lib/Sema
David Green 781b491bba [Clang][AArch64] Support AArch64 target(..) attribute formats.
This adds support under AArch64 for the target("..") attributes. The
current parsing is very X86-shaped, this patch attempts to bring it line
with the GCC implementation from
https://gcc.gnu.org/onlinedocs/gcc/AArch64-Function-Attributes.html#AArch64-Function-Attributes.

The supported formats are:
- "arch=<arch>" strings, that specify the architecture features for a
  function as per the -march=arch+feature option.
- "cpu=<cpu>" strings, that specify the target-cpu and any implied
  atributes as per the -mcpu=cpu+feature option.
- "tune=<cpu>" strings, that specify the tune-cpu cpu for a function as
  per -mtune.
- "+<feature>", "+no<feature>" enables/disables the specific feature, for
  compatibility with GCC target attributes.
- "<feature>", "no-<feature>" enabled/disables the specific feature, for
  backward compatibility with previous releases.

To do this, the parsing of target attributes has been moved into
TargetInfo to give the target the opportunity to override the existing
parsing. The only non-aarch64 change should be a minor alteration to the
error message, specifying using "CPU" to describe the cpu, not
"architecture", and the DuplicateArch/Tune from ParsedTargetAttr have
been combined into a single option.

Differential Revision: https://reviews.llvm.org/D133848
2022-10-01 15:40:59 +01:00
..
AnalysisBasedWarnings.cpp Use the range-based overload of llvm::sort where possible 2022-07-23 15:13:25 +02:00
CMakeLists.txt [HLSL] Support cbuffer/tbuffer for hlsl. 2022-09-21 10:07:43 -07:00
CodeCompleteConsumer.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
CoroutineStmtBuilder.h
DeclSpec.cpp [C2x] implement typeof and typeof_unqual 2022-09-28 13:27:52 -04:00
DelayedDiagnostic.cpp
HLSLExternalSemaSource.cpp [HLSL] Support PCH for cc1 mode 2022-09-20 15:13:43 -07:00
IdentifierResolver.cpp [HLSL] Support cbuffer/tbuffer for hlsl. 2022-09-21 10:07:43 -07:00
JumpDiagnostics.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
MultiplexExternalSemaSource.cpp [NFC] Make MultiplexExternalSemaSource own sources 2022-09-02 13:57:39 -05:00
OpenCLBuiltins.td [OpenCL] Guard depth image builtins 2022-09-13 10:10:48 +01:00
ParsedAttr.cpp [clang] Use std::size instead of llvm::array_lengthof 2022-09-08 17:20:25 -06:00
Scope.cpp Use value instead of getValue (NFC) 2022-07-29 21:18:41 -07:00
ScopeInfo.cpp [clang] Disallow mixing SEH and Objective-C exceptions 2021-10-20 14:18:12 -04:00
Sema.cpp [C++2a] P0634r3: Down with typename! 2022-09-28 09:50:19 -07:00
SemaAccess.cpp [C++2b] Implement multidimentional subscript operator 2022-02-08 12:10:47 -05:00
SemaAttr.cpp [clang] Add support for #pragma strict_gs_check 2022-09-19 20:07:14 +00:00
SemaAvailability.cpp [HLSL] Enable availability attribute 2022-09-16 16:04:27 -05:00
SemaCUDA.cpp [CUDA] remove duplicate condition 2022-07-22 11:27:19 -04:00
SemaCXXScopeSpec.cpp [C++20] [Module] Support reachable definition initially/partially 2022-06-29 12:48:48 +08:00
SemaCast.cpp [randstruct] Add randomize structure layout support 2022-04-09 13:15:36 -07:00
SemaChecking.cpp [Clang] P1169R4: static operator() 2022-09-29 23:03:26 +03:00
SemaCodeComplete.cpp [clang] Use x.empty() instead of llvm::empty(x) (NFC) 2022-09-18 11:07:50 -07:00
SemaConcept.cpp Fix regression from Deferred Concepts with lambda in var init 2022-09-27 06:32:39 -07:00
SemaConsumer.cpp
SemaCoroutine.cpp [C++] [Coroutines] Prefer aligned (de)allocation for coroutines - 2022-09-22 11:28:29 +08:00
SemaDecl.cpp [Clang][AArch64] Support AArch64 target(..) attribute formats. 2022-10-01 15:40:59 +01:00
SemaDeclAttr.cpp [Clang][AArch64] Support AArch64 target(..) attribute formats. 2022-10-01 15:40:59 +01:00
SemaDeclCXX.cpp [Clang] P1169R4: static operator() 2022-09-29 23:03:26 +03:00
SemaDeclObjC.cpp [clang] Qualify auto in range-based for loops (NFC) 2022-09-03 23:27:27 -07:00
SemaExceptionSpec.cpp [OpenMP] Initial parsing and semantic support for 'parallel masked taskloop simd' construct 2022-07-01 08:57:15 -07:00
SemaExpr.cpp [Clang] Don't warn if deferencing void pointers in unevaluated context 2022-09-28 12:30:02 +08:00
SemaExprCXX.cpp [Clang] P1169R4: static operator() 2022-09-29 23:03:26 +03:00
SemaExprMember.cpp [clang] Fix missing template arguments in AST of access to member variable template 2022-09-21 00:46:18 +02:00
SemaExprObjC.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
SemaFixItUtils.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaHLSL.cpp [HLSL] Support cbuffer/tbuffer for hlsl. 2022-09-21 10:07:43 -07:00
SemaInit.cpp [Clang] Fix variant crashes from GH58028, GH57370 2022-09-30 21:17:34 +03:00
SemaLambda.cpp [Clang] P1169R4: static operator() 2022-09-29 23:03:26 +03:00
SemaLookup.cpp [HLSL] Support cbuffer/tbuffer for hlsl. 2022-09-21 10:07:43 -07:00
SemaModule.cpp [C++20][Modules] Improve handing of Private Module Fragment diagnostics. 2022-08-21 10:19:46 +01:00
SemaObjCProperty.cpp [clang] Qualify auto in range-based for loops (NFC) 2022-09-03 23:27:27 -07:00
SemaOpenMP.cpp [Clang][OpenMP] Codegen generation for has_device_addr claues. 2022-09-20 21:12:30 -07:00
SemaOverload.cpp [Clang] P1169R4: static operator() 2022-09-29 23:03:26 +03:00
SemaPseudoObject.cpp [clang] NFC: Rename rvalue to prvalue 2021-06-09 12:27:10 +02:00
SemaRISCVVectorLookup.cpp [RISCV][Clang] Support RVV policy functions. 2022-08-01 17:32:08 +00:00
SemaSYCL.cpp [SYCL] Diagnose uses of zero length arrays 2021-12-29 15:30:18 +03:00
SemaStmt.cpp [clang] Use x.empty() instead of llvm::empty(x) (NFC) 2022-09-18 11:07:50 -07:00
SemaStmtAsm.cpp [clang] LLVM_FALLTHROUGH => [[fallthrough]]. NFC 2022-08-08 09:12:46 -07:00
SemaStmtAttr.cpp [clang][parse] Move source range into ParsedAttibutesView 2022-03-24 08:11:57 +01:00
SemaTemplate.cpp [C2x] implement typeof and typeof_unqual 2022-09-28 13:27:52 -04:00
SemaTemplateDeduction.cpp [C2x] implement typeof and typeof_unqual 2022-09-28 13:27:52 -04:00
SemaTemplateInstantiate.cpp Re-apply "Deferred Concept Instantiation Implementation" 2022-09-22 05:53:59 -07:00
SemaTemplateInstantiateDecl.cpp Re-apply "Deferred Concept Instantiation Implementation" 2022-09-22 05:53:59 -07:00
SemaTemplateVariadic.cpp [C2x] implement typeof and typeof_unqual 2022-09-28 13:27:52 -04:00
SemaType.cpp [Clang][Arm] Convert -fallow-half-arguments-and-returns to a target option. NFC 2022-09-29 11:00:32 +01:00
TreeTransform.h [Clang] P1169R4: static operator() 2022-09-29 23:03:26 +03:00
TypeLocBuilder.cpp [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
TypeLocBuilder.h [clang] Implement ElaboratedType sugaring for types written bare 2022-07-27 11:10:54 +02:00
UsedDeclVisitor.h [HIP][OpenMP] Fix assertion in deferred diag 2021-10-25 11:07:40 -04:00