[PATCH] D150262: Disable sanitizer's on ifunc resolvers.

2023-08-14 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1ef3de6b09f6: Disable sanitizer's on ifunc resolvers. (authored by danielkiss). Herald added a project: clang. Herald added a subscriber: cfe-commits

[PATCH] D150867: [AArch64][FMV] Prevent target attribute using for multiversioning.

2023-05-23 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150867/new/ https://reviews.llvm.org/D150867 ___

[PATCH] D150800: [AArch64][FMV] Fix name mangling.

2023-05-23 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150800/new/ https://reviews.llvm.org/D150800 ___

[PATCH] D135652: [AArch64] Add preserve_all calling convention.

2023-04-28 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd75e70d7ae1f: [AArch64] Add preserve_all calling convention. (authored by danielkiss). Herald added a project: clang. Herald added a subscriber: cfe-

[PATCH] D142265: [AArch64] Function multi-versioning release notes added. NFC.

2023-01-23 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. LGTM Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142265/new/ https://reviews.llvm.org/D142265

[PATCH] D134719: [AArch64] Enable libm vectorized functions via SLEEF

2023-01-20 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc4fa504f797f: [AArch64] Enable libm vectorized functions via SLEEF (authored by danielkiss). Herald added a project: clang. Herald added a subscriber

[PATCH] D138792: [AArch64] Improve TargetParser API

2023-01-13 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:532 getTargetDefinesARMV81A(Opts, Builder); -break; - case llvm::AArch64::ArchKind::ARMV8_2A: + if (*ArchInfo == llvm::AArch64::ARMV8_2A) getTargetDefinesARMV82A(Opts, Builder);

[PATCH] D127812: [AArch64] FMV support and necessary target features dependencies.

2022-12-09 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. just small comment, thanks @ilinpv LGTM, just let others to chime in. Comment at: clang/lib/Basic/Targets/AArch64.cpp:652 + // AARCH64_ARCH_EXT_NAME feature with top

[PATCH] D139622: [AArch64][NFC] Move hasFeature fields initiations to the declaration

2022-12-09 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG218b77c85057: [AArch64][NFC] Move hasFeature fields initiations to the declaration (authored by danielkiss). Herald added a project: clang. Herald ad

[PATCH] D139503: [Headers][ARM] Allow `struct _Unwind_Exception` in unwind.h

2022-12-07 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. Wondering if we could deduplicate the headers? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139503/new/ https://reviews.llvm.org/D13950

[PATCH] D139445: [AArch64] Add __ARM_FEATURE_BTI and __ARM_FEATURE_PAUTH

2022-12-07 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGcfd44221e3e1: [AArch64] Add __ARM_FEATURE_BTI and __ARM_FEATURE_PAUTH (authored by danielkiss). Herald added a project: clang. Herald added a subscri

[PATCH] D127812: [AArch64] FMV support and necessary target features dependencies.

2022-11-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7305 + if (Args.hasArg(options::OPT_mno_fmv)) { +CmdArgs.push_back("-target-feature"); maybe we need to add a check here for compiler-rt as rt-lib because today libgcc is

[PATCH] D136062: [AArch64] Make ACLE intrinsics always available part MTE

2022-10-18 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG09aaf190d933: [AArch64] Make ACLE intrinsics always available part MTE (authored by danielkiss). Herald added a project: clang. Herald added a subscr

[PATCH] D133359: [AArch64] Make ACLE intrinsics always available part1

2022-10-14 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG30b67c677c6b: [AArch64] Make ACLE intrinsics always available part1 (authored by danielkiss). Herald added a project: clang. Herald added a subscribe

[PATCH] D134353: [AArch64] Add all predecessor archs in target info

2022-09-27 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG712de9d1716c: [AArch64] Add all predecessor archs in target info (authored by danielkiss). Herald added a project: clang. Herald added a subscriber:

[PATCH] D134349: [Arm][AArch64] Make getArchFeatures to use TargetParser.def

2022-09-23 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7e1a87387209: [Arm][AArch64] Make getArchFeatures to use TargetParser.def (authored by danielkiss). Herald added a project: clang. Herald added a sub

[PATCH] D127812: [AArch64] Function multiversioning support added.

2022-07-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss requested changes to this revision. danielkiss added a comment. This revision now requires changes to proceed. Please find the thread on the GCC mailing list here: https://gcc.gnu.org/pipermail/gcc/2022-July/239134.html Feedback there sounds positive to me. All received feedback added

[PATCH] D130145: [AArch64] Simplify BTI/PAC-RET module flags

2022-07-26 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. AutoUpgrade is added due to similar issue at a user. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130145/new/ https://reviews.llv

[PATCH] D130145: [AArch64] Simplify BTI/PAC-RET module flags

2022-07-25 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4415-4430 -// Upgrade branch protection and return address signing module flags. The -// module flag behavior for these fields were Error and now they are Min. -if (ID->getString() == "branch-ta

[PATCH] D130145: [AArch64] Simplify BTI/PAC-RET module flags

2022-07-22 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: llvm/lib/IR/AutoUpgrade.cpp:4415-4430 -// Upgrade branch protection and return address signing module flags. The -// module flag behavior for these fields were Error and now they are Min. -if (ID->getString() == "branch-ta

[PATCH] D129135: [doc][ReleaseNotes] Document AArch64 SVE ABI fix from D127209

2022-07-05 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129135/new/ https://reviews.llvm.org/D129135 ___

[PATCH] D127812: [AArch64] Function multiversioning support added.

2022-06-28 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. In D127812#3602688 , @aaron.ballman wrote: > In D127812#3602645 , @erichkeane > wrote: > >> In D127812#3601476 , @danielkiss >> wrote: >> >>

[PATCH] D127812: [AArch64] Function multiversioning support added.

2022-06-22 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. In D127812#3599530 , @aaron.ballman wrote: > In D127812#3587223 , @ilinpv wrote: > >> In D127812#3585249 , @erichkeane >> wrote: >> >>> I'm c

[PATCH] D123493: Support the min of module flags when linking, use for AArch64 BTI/PAC-RET

2022-06-11 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. In D123493#3569025 , @MaskRay wrote: > This behavior requires that all participating modules have the module flag. > In the absence of the module flag, what should be behavior be? > > For module flags like `"sign-return-addres

[PATCH] D123493: Support the min of module flags when linking, use for AArch64 BTI/PAC-RET

2022-04-13 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGb0343a38a591: Support the min of module flags when linking, use for AArch64 BTI/PAC-RET (authored by danielkiss). Herald added a project: clang. Hera

[PATCH] D121707: [llvm][AArch64] Insert "bti j" after call to setjmp

2022-03-21 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. Add to the commit message `Fixes #4` to make the connection on github. LGTM Comment at: llvm/lib/Target/AArch64/AArch64InstrInfo.td:480-481 +

[PATCH] D115501: [clang][ARM] Emit warnings when PACBTI-M is used with unsupported architectures

2021-12-10 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: clang/lib/Basic/Targets/ARM.cpp:372 + if (Arch.empty()) +return true; + I'd play safe and return false here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115501/n

[PATCH] D115140: [ARM][clang] Option b-key must not affect __ARM_FEATURE_PAC_DEFAULT

2021-12-07 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. In D115140#3176800 , @stuij wrote: > @danielkiss Yes that needs to be addressed, but we are doing that in another > patch that will (hopefully

[PATCH] D115140: [ARM][clang] Option b-key must not affect __ARM_FEATURE_PAC_DEFAULT

2021-12-06 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. I think rejecting\warning the `b-key` from the command line maybe a more developer friendly way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115140/new/ https://reviews.llvm.org/D115140 __

[PATCH] D109856: [libunwind][ARM] Handle end of stack during unwind

2021-11-26 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG632acec73776: [libunwind][ARM] Handle end of stack during unwind (authored by danielkiss). Herald added projects: libc++abi, libunwind. Herald added 1 blocking reviewer(s): libc++abi. Repository: rG LLV

[PATCH] D109856: [libunwind][ARM] Handle end of stack during unwind

2021-11-26 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. In D109856#3154763 , @mstorsjo wrote: > Looks reasonable I think. Is this a deficiency in the EHABI implementation > only, i.e. this aspect works as it should in the regular dwarf implementation? Yes, it works on dwarf alread

[PATCH] D112430: [ARM][libunwind] add PACBTI-M support for libunwind

2021-11-15 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. LGTM, Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112430/new/ https://reviews.llvm.org/D112430 ___ cfe-commits mailing list cfe-co

[PATCH] D51650: Implement target_clones multiversioning

2021-11-12 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:3290-3296 + // Ensure we don't combine these with themselves, since that causes some + // confusing behavior. + if (const auto *Other = D->getAttr()) { +S.Diag(AL.getLoc(), diag::err_disallowed_d

[PATCH] D51650: Implement target_clones multiversioning

2021-11-11 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. This revision is now accepted and ready to land. In D51650#3121789 , @erichkeane wrote: > But nit made. NIT: clang-format issues still present. Maybe you need to update your local clang-forma

[PATCH] D51650: Implement target_clones multiversioning

2021-11-10 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. Thanks for the rebase! Looks got to me, `-march` may make the default same as one of the clone, in this case maybe we don't need to create two versions of the function. This could be solved later IMHO. Comment at: clang/lib/Sema/SemaDecl.cpp:1066

[PATCH] D51650: Implement target_clones multiversioning

2021-11-05 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. In D51650#3096487 , @erichkeane wrote: > This needs rebasing/probably some cleanup, plus code review. If you have > active/proficient CFE code reviewers who could take a look, I'd be willing to > spend some time rebasing. Th

[PATCH] D112421: [clang][ARM] PACBTI-M frontend support

2021-11-04 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: clang/lib/Basic/Targets/AArch64.cpp:134-135 StringRef &Err) const { - llvm::AArch64::ParsedBranchProtection PBP; - if (!llvm::AArch64::parseBranchProtection(Spec, PBP, Err)) + llvm:

[PATCH] D51650: Implement target_clones multiversioning

2021-10-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. Hi @erichkeane, At Arm we are going to add the multiversioning support for Arm targets[1]. It would be nice to land this change because we could build top of it. Please let me know how can I help. [1]. https://github.com/ARM-software/acle/pull/21 CHANGES SINCE LAST

[PATCH] D112430: [ARM][libunwind] add PACBTI-M support for libunwind

2021-10-25 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: libunwind/src/Registers.hpp:2245-2246 + if (regNum == UNW_ARM_RA_AUTH_CODE) +return true; + Maybe we could gate this on __ARM_FEATURE_PAUTH because it won't work anyway without the feature enabled for libunwin

[PATCH] D100546: [ARM][AArch64] SLSHardening: make non-comdat thunks possible

2021-05-20 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. danielkiss marked an inline comment as done. Closed by commit rG801ab71032e1: [ARM][AArch64] SLSHardening: make non-comdat thunks possible (authored by danielkiss). Her

[PATCH] D93428: [AArch64] Add bti note property when compiling asm files with -mbranch-protection=bti

2020-12-17 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. In D93428#2461343 , @apazos wrote: > Thanks Daniel for the explanation. No problem at all. In D93428#2461343 , @apazos wrote: > Was the support added for GNU assembler as well? Is it t

[PATCH] D93428: [AArch64] Add bti note property when compiling asm files with -mbranch-protection=bti

2020-12-17 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. > Is there a reason why assembly files have a different flag (i.e. > -mmark-bti-property) to create the .note.gnu.property with the BTI entry? In assembly the compiler can't guarantee the landing pads are in place, therefore it doesn't add it automatically. The origi

[PATCH] D93428: [AArch64] Add bti note property when compiling asm files with -mbranch-protection=bti

2020-12-17 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. The `.note.gnu.property` is already generated when C/C++ files are compiled with `-mbranch-protection=bti`. `-mmark-bti-property` is only for assembly file where the `.note.gnu.property` should be added manually otherwise. Do you have any reproducer where C/C++ beh

[PATCH] D89834: FileManager: Improve the FileEntryRef API and customize its OptionalStorage

2020-10-30 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Herald added a subscriber: ormris. Comment at: clang/include/clang/Basic/FileEntry.h:186 + + constexpr bool hasValue() const noexcept { +return MaybeRef.hasOptionalValue(); This broke the build, `constexpr` could be dropped

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-09-28 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa48f6079f288: [AArch64] Generate .note.gnu.property based on module flags. (authored by danielkiss). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80791/new/

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-09-25 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 294284. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80791/new/ https://reviews.llvm.org/D80791 Files: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-0.ll llvm/test/CodeGen/AArch64/note-gnu

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-09-24 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2a96f47c5ffc: [AArch64] __builtin_return_address for PAuth. (authored by danielkiss). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://revie

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-09-24 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. @chill ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[PATCH] D81930: [AArch64] Add -mmark-bti-property flag.

2020-09-16 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG95e43f84b7b9: [AArch64] Add -mmark-bti-property flag. (authored by danielkiss). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81930/new/ https://reviews.llv

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-09-16 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 292250. danielkiss added a comment. Rebased top of D85649 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80791/new/ https://reviews.llvm.org/D80791 Files: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp llvm/t

[PATCH] D81930: [AArch64] Add -mmark-bti-property flag.

2020-09-15 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss marked 4 inline comments as done. danielkiss added a comment. @nickdesaulniers Thanks for the review, comments are addressed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81930/new/ https://reviews.llvm.org/D81930 ___ cfe-commits

[PATCH] D81930: [AArch64] Add -mmark-bti-property flag.

2020-09-15 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 291922. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81930/new/ https://reviews.llvm.org/D81930 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/arm64-markbti.S llvm/lib/Target/AArch64/A

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-09-04 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. @chill Could you check the latest update? I think it should be submitted with D84502 together. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 ___

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-08-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 288775. danielkiss edited the summary of this revision. danielkiss added a comment. Sync with D85649 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80791/new/ https://reviews.llvm.org/D80791 Files: clang/lib/C

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-08-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss abandoned this revision. danielkiss added a comment. Abandoning in favour of D85649 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181 ___ cfe-commits mailing

[PATCH] D81930: [AArch64] Add -mmark-bti-property flag.

2020-08-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 288765. danielkiss marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81930/new/ https://reviews.llvm.org/D81930 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Clang.cpp clang/test/Drive

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-08-27 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 288275. danielkiss added a comment. updating tests too. check-llvm, check-clang passes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 Files: llvm/include/llvm/CodeGen/ISDOpcodes.h llvm/lib/Target/AA

[PATCH] D81930: [AArch64] Add -mmark-bti-property flag.

2020-08-13 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss marked an inline comment as done. danielkiss added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64.td:352 +def FeatureEmitNoteBTIProperty : SubtargetFeature<"markbtiproperty", "MarkBTIProperty", +"true", "Emit .note.gnu.property for Branch Target Id

[PATCH] D81930: [AArch64] Add -mmark-bti-property flag.

2020-08-13 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 285492. danielkiss added a comment. Fix review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81930/new/ https://reviews.llvm.org/D81930 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/Clang.cpp clang/test

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-08-13 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 285332. danielkiss added a comment. Always emit xpac* instructions as discussed in D84502 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 Files: llvm/include/llvm/Cod

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-08-11 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. >> it is not useful to have a bti annotated function unless everything else is >> bti compatible too: it is all or nothing per elf module. > > This is false. Some functions in an elf module could be in a guarded region, > some in a non-guarded region. Some function ma

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-08-05 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. > FWIW GCC has a "sign-return-address" function attribute with a default value > of "none". It is considered deprecated, however, in favour of > "branch-protection" This is just the internal representation, the function attribute in C/C++ source is the "branch-prote

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-08-05 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 283172. danielkiss edited the summary of this revision. danielkiss added a comment. This version of the patch behaves as `gcc` for case when no function present and when function has `-mbranch-protection` attribute without compiler flag. The logic should b

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-08-04 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. Would it be better to add a new value to `"sign-return-address"` as `"none"`? I don't see any other alternative option, I'm open to any other idea. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-07-23 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 280048. danielkiss added a comment. fix review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 Files: llvm/include/llvm/CodeGen/ISDOpcodes.h llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-07-21 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. > If any function has the attribute "sign-return-address", then the output note > section should have PAC bit set. The return address signing is completely > local > to the function, and functions with or without return address signing can be > freely mixed with eac

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-07-20 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. Patch for gcc is merged. https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=a70d5d81c41048556fd86eaa1036018a6bfba115 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 ___ cf

[PATCH] D75453: [Driver][ARM] parse version of arm/thumb architecture correctly

2020-07-01 Thread Daniel Kiss 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 rG070acb1d1e51: [Driver][ARM] parse version of arm/thumb architecture correctly (authored by danielkiss). Repository: rG

[PATCH] D75453: [Driver][ARM] parse version of arm/thumb architecture correctly

2020-07-01 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. @j0le patch is landed but I just realised the review is still blocked by @compnerd. So it won't be closed I think, that is my bad. https://github.com/llvm/llvm-project/commit/070acb1d1e51ffd289a46b8f93e993635d0053b7 CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-06-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. In D80791#2120755 , @kees wrote: > In D80791#2120503 , @nickdesaulniers > wrote: > > > Might someone wish to disable PAC/BTI on an individual function, while > > having it on for the re

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-06-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. Function level attributes could set different attributes for functions. If function attribute is used then I assume the user know what he/she is doing so no need to emit a warning. Maybe some would ensure the function is only directly called and never called indirect

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-06-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. This patch solve this too: https://bugs.llvm.org/show_bug.cgi?id=46480 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80791/new/ https://reviews.llvm.org/D80791 ___ cfe-commi

[PATCH] D75453: [Driver][ARM] parse version of arm/thumb architecture correctly

2020-06-22 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. j0le, I will commit later this week for you. compnerd do you have any comment for this version? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75453/new/ https://reviews.llvm.org/D75453 ___ cfe-commits mailing lis

[PATCH] D81930: [AArch64] Add -mmark-bti-property flag.

2020-06-19 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 272024. danielkiss retitled this revision from "[AArch64] Add -mbti flag." to "[AArch64] Add -mmark-bti-property flag.". danielkiss edited the summary of this revision. danielkiss added a comment. Rename the flag to -mmark-bti-property CHANGES SINCE LAST

[PATCH] D81930: [AArch64] Add -mbti flag.

2020-06-18 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss planned changes to this revision. danielkiss added a comment. I got some comment internally, the -mbti might suggest it enables the bti feature so I'm going to rename the flag to -mmark-bti-property. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D81930: [AArch64] Add -mbti flag.

2020-06-16 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss created this revision. danielkiss added reviewers: nsz, tamas.petz, pbarrio, ostannard, chill. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls. Herald added projects: clang, LLVM. Writing the .note.gnu.property manually is error prone and hard to maintain i

[PATCH] D75453: [Driver][ARM] parse version of arm/thumb architecture correctly

2020-06-16 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss accepted this revision. danielkiss added a comment. Sorry for the delay, it is okay to say "ping" after a while :) LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75453/new/ https://reviews.llvm.org/D75453 ___ cfe-commits mai

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-06-08 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. patch for gcc: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547404.html CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-06-04 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. depends on D80791 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-06-04 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 268383. danielkiss edited the summary of this revision. danielkiss added a comment. Patch is refactored, the new pass smooth out the attribute issues. This version fixes issues with _clang_call_terminate, sanitisers and the CFI. New pass might need a new f

[PATCH] D80791: [AArch64] Generate .note.gnu.property based on module flags.

2020-05-29 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss created this revision. danielkiss added reviewers: tamas.petz, chill. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, kristof.beyls. Herald added projects: clang, LLVM. Generate .note.gnu.property for PAC and BTI if the compile unit is compiled with -mbranch-protection.

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-05-28 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. Related ticket for gcc: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94891 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D75044: [AArch64] __builtin_return_address for PAuth.

2020-05-27 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 266595. danielkiss marked an inline comment as done. danielkiss retitled this revision from "[AArch64] __builtin_extract_return_addr for PAuth." to "[AArch64] __builtin_return_address for PAuth.". danielkiss edited the summary of this revision. danielkiss

[PATCH] D75453: [Driver][ARM] fix undefined behaviour when checking architecture version

2020-04-28 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. Please update the title and the summary because those will be the commit message. IMHO the test a case would be extended with a test where the body of the modified if condition is tested. Otherwise LGTM. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75453/ne

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-04-08 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:5149-5152 + if (BPI.BranchTargetEnforcement) +Fn->addFnAttr("branch-target-enforcement", "true"); + else +Fn->addFnAttr("branch-target-enforcement", "false");

[PATCH] D75044: [AArch64] __builtin_extract_return_addr for PAuth.

2020-04-08 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss marked 4 inline comments as done. danielkiss added inline comments. Comment at: llvm/include/llvm/CodeGen/ISDOpcodes.h:74 /// the parent's frame or return address, and so on. -FRAMEADDR, RETURNADDR, ADDROFRETURNADDR, SPONENTRY, +FRAMEADDR, RETURNADDR, ADDR

[PATCH] D75044: [AArch64] __builtin_extract_return_addr for PAuth.

2020-04-08 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 256069. danielkiss added a comment. Rebased and address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/arm64-extractreturna

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-04-06 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 255347. danielkiss added a reviewer: tamas.petz. danielkiss added a comment. Fix review comments from Tamas. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181 Files: clang/lib/CodeGen/CGCall.cpp clang/l

[PATCH] D75044: [AArch64] __builtin_extract_return_addr for PAuth.

2020-04-03 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 254921. danielkiss added a comment. Rebased. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75044/new/ https://reviews.llvm.org/D75044 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/arm64-extractreturnaddress.c llvm/docs/LangRef

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-04-03 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 254761. danielkiss added a comment. The patched is rebased and the hopefully the logic is now simpler. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181 Files: clang/lib/CodeGen/CGCall.cpp clang/lib/Cod

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-04-02 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss marked an inline comment as done. danielkiss added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:5149-5152 + if (BPI.BranchTargetEnforcement) +Fn->addFnAttr("branch-target-enforcement", "true"); + else +Fn->addF

[PATCH] D77134: [clang][AARCH64] Add __ARM_FEATURE_{PAC, BTI}_DEFAULT defines

2020-04-02 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG37ced5a57106: [clang][AARCH64] Add __ARM_FEATURE_{PAC, BTI}_DEFAULT defines (authored by danielkiss). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77134/ne

[PATCH] D77131: [clang] Move branch-protection from CodeGenOptions to LangOptions

2020-04-02 Thread Daniel Kiss via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7314aea5a42d: [clang] Move branch-protection from CodeGenOptions to LangOptions (authored by danielkiss). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7713

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-04-01 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1828 + if (CodeGenOpts.BranchTargetEnforcement) { +FuncAttrs.addAttribute("branch-target-enforcement", "true"); + } chill wrote: > danielkiss wrote: > > chill wrote: > > > I would re

[PATCH] D77131: [clang] Move branch-protection from CodeGenOptions to LangOptions

2020-03-31 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. just a nit, LGTM otherwise. Comment at: clang/include/clang/Basic/CodeGenOptions.def:402 #undef VALUE_CODEGENOPT - is this change necessary? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-03-30 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-03-13 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 250191. danielkiss marked an inline comment as done. danielkiss added a comment. Patch is rebased, test is updated. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181 Files: clang/lib/CodeGen/CGCall.cpp

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-03-04 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 248222. danielkiss marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75181/new/ https://reviews.llvm.org/D75181 Files: clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/CGDeclCXX.cpp clang/lib/CodeGen/CodeGenModule

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-03-04 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss updated this revision to Diff 248201. danielkiss added a comment. Thanks for the comments, patch is improved isStringAttribute() check removed, the attribute is always a string in this case or "null" so the check is not needed. Function level the attribute is now only change when neede

[PATCH] D75181: [AArch64] Handle BTI/PAC in case of generated functions.

2020-03-04 Thread Daniel Kiss via Phabricator via cfe-commits
danielkiss marked 4 inline comments as done. danielkiss added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:1828 + if (CodeGenOpts.BranchTargetEnforcement) { +FuncAttrs.addAttribute("branch-target-enforcement", "true"); + } chill wrote: > I woul

  1   2   >