[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2023-09-11 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab abandoned this revision. ab added a comment. This went through so many rebases that the incremental diff is not very helpful ;) Let's start over on github: https://github.com/llvm/llvm-project/pull/65996 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112941/new/

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2023-09-11 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab updated this revision to Diff 556443. ab added a comment. Herald added subscribers: llvm-commits, wangpc, MaskRay. Herald added projects: LLVM, All. Added the relevant bits of the great documentation John wrote in clang/docs/PointerAuthentication.rst. I tried to trim it down to only the

[PATCH] D148967: Disable atexit()-based lowering when LTO'ing kernel/kext code

2023-04-25 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. This revision is now accepted and ready to land. A comment inline, but LGTM otherwise, thanks! Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:1208 + // -disable-atexit-based-global-dtor-lowering CodeGen flag. + //

[PATCH] D134351: AArch64: add definitions for recent Apple CPUs

2022-09-21 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. This revision is now accepted and ready to land. > but in AArch64TargetParser.def, marking them v8.6 brings in support for the > SM4 cryptographic hash and we don't actually have that Huh, I don't understand why, does that ring a bell? Looks like

[PATCH] D76062: [PATCH] [ARM] ARMv8.6-a command-line + BFloat16 Asm Support

2022-09-21 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Herald added a subscriber: StephenFan. Herald added a project: All. Comment at: llvm/include/llvm/Support/AArch64TargetParser.def:52 + AArch64::AEK_RDM | AArch64::AEK_RCPC | AArch64::AEK_DOTPROD | + AArch64::AEK_SM4 |

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-03-23 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. This revision is now accepted and ready to land. Reading this again, I have a feeling defaulting to newest will come back to bite us (or, well, apple folks.) But we can reevaluate if we get to that. So, LGTM, thanks! Repository: rG LLVM

[PATCH] D119788: [AArch64] Add support for -march=native for Apple M1 CPU

2022-02-18 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. In D119788#3331324 , @keith wrote: > Thanks for the tips! I left the default as generic here, but I totally take > your point on defaulting to the newest and I'm happy to update if you feel > strongly, lmk what you think I agree

[PATCH] D105169: [Clang/Test]: Rename enable_noundef_analysis to disable-noundef-analysis and turn it off by default

2022-01-18 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2535 ArgAttrs[FirstIRArg + i] = llvm::AttributeSet::get(getLLVMContext(), Attrs); } Hmm, if I'm reading this right, this overwrites the `nonnull dereferenceable align`

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2021-11-08 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Comment at: clang/include/clang/Driver/Options.td:2865-2872 +let Group = f_Group in { + let Flags = [CC1Option] in { +def fptrauth_intrinsics : Flag<["-"], "fptrauth-intrinsics">, + HelpText<"Enable pointer-authentication intrinsics">; + } +

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2021-11-04 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. In D112941#3105297 , @tschuett wrote: > The original `ptrauth.h` has the same comment style. Would doxygen style be > an improvement? Hmm, what do you have in mind? Markup for the builtin arguments/returns? The need for `__`

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2021-11-04 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab updated this revision to Diff 384827. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112941/new/ https://reviews.llvm.org/D112941 Files: clang/include/clang/Basic/Builtins.def clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2021-11-04 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab updated this revision to Diff 384825. ab marked 3 inline comments as done. ab added a comment. Simplify `err_ptrauth_disabled` diagnostic, rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112941/new/ https://reviews.llvm.org/D112941

[PATCH] D112941: [clang] Add support for the new pointer authentication builtins.

2021-11-01 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab created this revision. ab added reviewers: rjmccall, ahatanak, bruno, pcc, apazos, kristof.beyls, t.p.northover, pbarrio, chill, danielkiss, psmith. ab added a project: clang. Herald added subscribers: dexonsmith, zzheng, dang, mgorny. ab requested review of this revision. Building on D90868

[PATCH] D100807: [clang][driver] Use the canonical Darwin arch name when printing out the triple for a Darwin target

2021-04-26 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. This revision is now accepted and ready to land. Neat, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100807/new/ https://reviews.llvm.org/D100807 ___ cfe-commits mailing list

[PATCH] D100807: [clang][driver] Use the canonical Darwin arch name when printing out the triple for a Darwin target

2021-04-20 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. This sounds nice! One idea, maybe more dangerous, not sure which is better: in `setTripleTypeForMachOArchName`, we already have a couple `setArchName` calls, I think that's why `arm64e` is left alone in the `aarch64-cpus.c` test. Maybe we can do the `setArchName` call

[PATCH] D87095: [Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth.

2020-12-03 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. Thanks Tim! f77c948d56b Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87095/new/ https://reviews.llvm.org/D87095

[PATCH] D87095: [Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth.

2020-12-03 Thread Ahmed Bougacha via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGf77c948d56b0: [Triple][MachO] Define arm64e, an AArch64 subarch for Pointer Auth. (authored by ab). Changed prior to

[PATCH] D87095: [Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth.

2020-09-17 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab updated this revision to Diff 292557. ab added a comment. Herald added a subscriber: pzheng. Reformat ValidArchs. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87095/new/ https://reviews.llvm.org/D87095 Files: clang/lib/Basic/Targets/AArch64.cpp clang/lib/Driver/ToolChain.cpp

[PATCH] D87095: [Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth.

2020-09-03 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. In D87095#2255010 , @pcc wrote: > But I was wondering: shouldn't this be the *last* patch? I was imagining that > you would first upstream support for the `-fptrauth-*` flags, and then at the > end you would add an `arm64e` subarch

[PATCH] D87095: [Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth.

2020-09-03 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab created this revision. Herald added subscribers: cfe-commits, danielkiss, cmtice, rupprecht, dexonsmith, steven_wu, hiraditya, kristof.beyls, arichardson. Herald added a reviewer: jhenderson. Herald added a reviewer: MaskRay. Herald added projects: clang, LLVM. ab requested review of this

[PATCH] D86105: [darwin] Disable the -Wpsabi warning

2020-09-01 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. Hmm, is there a more general way to disable warnings? I'm not familiar with these parts, so I'll defer to you folks =] Comment at: clang/lib/CodeGen/TargetInfo.cpp:2515-2516 + if (!CallerHasFeat && !CalleeHasFeat) { +// Darwin doesn't enable

[PATCH] D82699: [driver][arm64] Set target CPU to A12 for compiler invocations that target Apple Silicon

2020-06-30 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. In D82699#2118313 , @arphaman wrote: > @t.p.northover @ab I noticed that the use of "apple-a12" doesn't infer the > right target features when we're passing in a11 or older, so that's why my > test file has the `INFER-A12` separate

[PATCH] D78252: [AArch64] FMLA/FMLS patterns improvement.

2020-04-22 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:8058 + def : Pat<(v8f16 (OpNode (v8f16 V128:$Rd), (v8f16 V128:$Rn), + (AArch64duplane16 (v8f16 V128:$Rm), +

[PATCH] D78252: [AArch64] FMLA/FMLS patterns improvement.

2020-04-21 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64InstrFormats.td:8058 + def : Pat<(v8f16 (OpNode (v8f16 V128:$Rd), (v8f16 V128:$Rn), + (AArch64duplane16 (v8f16 V128:$Rm), +

[PATCH] D70779: AArch64: add support for newer Apple CPUs

2019-12-03 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64.td:587 +"Apple A10", [ +ProcAppleA7, +FeatureCRC, ab wrote: > t.p.northover wrote: >

[PATCH] D70779: AArch64: add support for newer Apple CPUs

2019-12-03 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. (but either way, LGTM) Comment at: llvm/lib/Target/AArch64/AArch64.td:587 +"Apple A10", [ +ProcAppleA7, +FeatureCRC,

[PATCH] D70779: AArch64: add support for newer Apple CPUs

2019-12-02 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64.td:587 +"Apple A10", [ +ProcAppleA7, +FeatureCRC, I'm not sure we want to reuse the

[PATCH] D58320: [Darwin] Introduce a new flag, -fapple-link-rtlib that forces linking of the builtins library.

2019-03-06 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. Please check the embedded thing (the other comments are minor). Otherwise, LGTM; if you have found this flag to be necessary, this looks like a reasonable way to implement it Comment at: clang/include/clang/Driver/Options.td:1252 +def fapple_link_rtlib :

[PATCH] D58306: [AArch64] Change size suffix for FP16FML intrinsics.

2019-02-20 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. Thanks for checking, much appreciated! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58306/new/ https://reviews.llvm.org/D58306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D58306: [AArch64] Change size suffix for FP16FML intrinsics.

2019-02-20 Thread Ahmed Bougacha via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL354538: [AArch64] Change size suffix for FP16FML intrinsics. (authored by ab, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D53633: [AArch64] Implement FP16FML intrinsics

2019-02-15 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Comment at: cfe/trunk/test/CodeGen/aarch64-neon-fp16fml.c:12 + +float32x2_t test_vfmlal_low_u32(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float> @test_vfmlal_low_u32(<2 x float> %a, <4 x half> %b, <4 x half> %c)

[PATCH] D58306: [AArch64] Change size suffix for FP16FML intrinsics.

2019-02-15 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab created this revision. ab added reviewers: SjoerdMeijer, bryanpkc. ab added a project: clang. Herald added a subscriber: javed.absar. These currently use _u32, but they should instead use _f32 or _f16, the types of the accumulator, and of the multiplication. I'm starting with _f16 (because

[PATCH] D53633: [AArch64] Implement FP16FML intrinsics

2019-02-14 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added inline comments. Herald added a subscriber: jdoerfert. Herald added a project: LLVM. Comment at: cfe/trunk/test/CodeGen/aarch64-neon-fp16fml.c:12 + +float32x2_t test_vfmlal_low_u32(float32x2_t a, float16x4_t b, float16x4_t c) { +// CHECK-LABEL: define <2 x float>

[PATCH] D55731: [darwin][arm64] use the "cyclone" CPU for Darwin even when `-arch` is not specified

2018-12-17 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55731/new/ https://reviews.llvm.org/D55731 ___ cfe-commits

[PATCH] D50068: [AArch64][ARM] Add Armv8.4-A tests

2018-07-31 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab accepted this revision. ab added a comment. This revision is now accepted and ready to land. LGTM, thanks! Comment at: test/Driver/aarch64-cpus.c:9 // RUN: %clang -target aarch64_be -mlittle-endian -mcpu=generic -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC %s //

[PATCH] D48701: [CMake] Rename cxx_headers back to cxx-headers.

2018-06-28 Thread Ahmed Bougacha via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335899: [CMake] Rename cxx_headers back to cxx-headers. (authored by ab, committed by ). Herald added subscribers: llvm-commits, christof. Changed prior to commit:

[PATCH] D48700: [CMake] Make bootstrap and compiler-rt depend on cxx-headers.

2018-06-28 Thread Ahmed Bougacha via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335898: [CMake] Make bootstrap and compiler-rt depend on cxx-headers. (authored by ab, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D48701: [CMake] Rename cxx_headers back to cxx-headers.

2018-06-27 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab created this revision. ab added a reviewer: phosek. Herald added subscribers: ldionne, mgorny. r334477 renamed the cxx-headers target to cxx_headers, but various pieces sort-of expect the target names to match the component (e.g., LLVM_DISTRIBUTION_COMPONENTS in the various bootstrap caches,

[PATCH] D48700: [CMake] Make bootstrap and compiler-rt depend on cxx-headers.

2018-06-27 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab created this revision. ab added a reviewer: phosek. Herald added subscribers: mgorny, dberris. Since r334468, my understanding is, we no longer always copy the libcxx headers by virtue of their presence when cmake runs. This is an attempt to make some of the later stages (compiler-rt, and

[PATCH] D46042: Cap vector alignment at 16 for all Darwin platforms

2018-05-04 Thread Ahmed Bougacha via Phabricator via cfe-commits
ab added a comment. So, this makes sense to me, but on x86, should we also be worried about the fact that the calling convention is based on which features are available? (>128bit ext_vector_types are passed in AVX/AVX-512 registers, if available). Presumably swift is also affected, no?