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 would really prefer to not set values "true" or "false" for the attribute: > we don't really have tri-state logic there > (absent/present-true/present-false), and those values just add some not-very > useful string processing. > the attribute will be "absent" for the runtime emitted function. ================ Comment at: clang/lib/CodeGen/CGCall.cpp:1831 + + auto RASignKind = CodeGenOpts.getSignReturnAddress(); + if (RASignKind != CodeGenOptions::SignReturnAddressScope::None) { ---------------- chill wrote: > What do we get from setting the PACBTI state in the default function > attributes? We still have > to do a per function processing, we can just as well avoid repeating the > logic, and spare us some > adding and potentially removing attributes churn. > in the new patch the per function processing will change the attribute only if really need. ================ Comment at: llvm/lib/Target/AArch64/AArch64BranchTargets.cpp:62 + + // LLVM emmited function won't have the attribute. + if (!F.hasFnAttribute("branch-target-enforcement")) { ---------------- emmited -> emitted 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