[PATCH] D87717: [docs] Update ControlFlowIntegrity.rst.

2020-09-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc 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/D87717/new/ https://reviews.llvm.org/D87717 ___ cfe-com

[PATCH] D84414: [RISCV] Support Shadow Call Stack

2020-08-24 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. FWIW, on aarch64 we decided to make `-fsanitize=shadow-call-stack` require the x18 reservation (instead of implying it) to try to avoid ABI mismatch problems. That is, it should be safe to mix and match code compiled with and without `-fsanitize=shadow-call-stack`. If we ma

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-08-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. I think that the part of the description beginning "This can be used when..." is somewhat misleading since you could pretty much say the same thing about specifying `-fvisibility=hidden -fwhole-program-vtables` at compile time. I think it would be better to focus on the spe

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-08-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM Thanks and sorry for the delay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75655/new/ https://reviews.llvm.org/D75655 __

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

2020-09-03 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Hi, thanks for getting started on upstreaming this! 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 that turns them on by defaul

[PATCH] D63908: hwasan: Improve precision of checks using short granule tags.

2020-12-21 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: compiler-rt/trunk/lib/hwasan/hwasan_checks.h:76 +#endif + return *(u8 *)(ptr | (kShadowAlignment - 1)) == ptr_tag; +} xiangzhangllvm wrote: > Hello @pcc I think here seems some problem, the ptr is user passing point, > *(pt

[PATCH] D85474: Add -fbinutils-version= to gate ELF features on the specified binutils version

2020-11-03 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. I agree with @MaskRay that this should be a binutils-specific option. The flag `-mlinker-version` seems to have been designed around macOS-specific assumptions i.e. there is a single linker (ld64) and that the linker and assembler are not version coupled. Having this option

[PATCH] D91466: [WIP][clang][Fuchsia] Support HWASan for Fuchsia

2020-11-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. How does Zircon handle tagged addresses in syscalls? Are they handled equivalently to Linux's tagged address ABI? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91466/new/ https://reviews.llvm.org/D91466 __

[PATCH] D89766: Driver: Add integer sanitizers to trapping group automatically.

2020-10-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: jfb, eugenis. Herald added a project: clang. pcc requested review of this revision. In D86000 we added a new sanitizer to the integer group without adding it to the trapping group. This broke usage of -fsanitize=int

[PATCH] D89766: Driver: Add integer sanitizers to trapping group automatically.

2020-10-20 Thread Peter Collingbourne 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 rGc5acd3490b79: Driver: Add integer sanitizers to trapping group automatically. (authored by pcc). Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D90422: AArch64: Switch to x20 as the shadow base register for outlined HWASan checks.

2020-10-29 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: eugenis, hctim. Herald added subscribers: Sanitizers, cfe-commits, danielkiss, hiraditya, kristof.beyls. Herald added projects: clang, Sanitizers, LLVM. pcc requested review of this revision. >From a code size perspective it turns out to be better t

[PATCH] D90424: AArch64: Use SBFX instead of UBFX to extract address granule in outlined HWASan checks.

2020-10-29 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: eugenis, hctim. Herald added subscribers: cfe-commits, danielkiss, hiraditya, kristof.beyls. Herald added projects: clang, LLVM. pcc requested review of this revision. In a kernel (or in general in environments where bit 55 of the address is set) the

[PATCH] D90422: AArch64: Switch to x20 as the shadow base register for outlined HWASan checks.

2020-10-29 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. For the kernel I measured a small regression in boot time (with a version of this change that uses x20 for the v1 checks as well since the kernel doesn't use short granules yet) -- from 6.65s to 6.70s or 0.8%. But that's a fraction of the size gains which were 4% for kernel

[PATCH] D46791: Make -gsplit-dwarf generally available

2020-10-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Correct, clang no longer uses objcopy for this as of D47093 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D46791/new/ https://reviews.llvm.org/D46791 ___ cfe-commits mailing list cfe-com

[PATCH] D90422: AArch64: Switch to x20 as the shadow base register for outlined HWASan checks.

2020-10-30 Thread Peter Collingbourne 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 rG3859fc653fb4: AArch64: Switch to x20 as the shadow base register for outlined HWASan checks. (authored by pcc). Repository: rG LLVM Github Monorep

[PATCH] D90424: AArch64: Use SBFX instead of UBFX to extract address granule in outlined HWASan checks.

2020-10-30 Thread Peter Collingbourne 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 rGc9b1a2b41dca: AArch64: Use SBFX instead of UBFX to extract address granule in outlined HWASan… (authored by pcc). Repository: rG LLVM Github Monor

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-05-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. This warning seems to have a lot of false positives on things like reference arguments that are used as output parameters. For example here is a small sample of output from a stage2 build of part of LLVM: In file included from ../llvm/lib/BinaryFormat/Minidump.cpp:9: In

[PATCH] D102943: Hashing: use a 64-bit storage type on all platforms.

2021-05-21 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Isn't the bug here that module hashing is using `hash_code`? So shouldn't the correct fix be to use a specific hashing algorithm for module hashes? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102943/new/ https://reviews.llvm

[PATCH] D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps

2021-06-07 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. This isn't how the output looks on Android. Are you sure this isn't a Fuchsia-specific bug in the output formatting? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps

2021-06-08 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D103845#2806211 , @leonardchan wrote: > In D103845#2804441 , @pcc wrote: > >> This isn't how the output looks on Android. Are you sure this isn't a >> Fuchsia-specific bug in the output f

[PATCH] D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps

2021-06-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Thanks for tracking this down. It seems best to change the Printf call to add the newline, since otherwise it looks like you'd be adding a spurious newline to the other callers of `RenderFrame` on Fuchsia. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D103845: [compiler-rt][hwasan] Add newline between record_addr lines on frame record dumps

2021-06-14 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc 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/D103845/new/ https://reviews.llvm.org/D103845 ___ cfe-c

[PATCH] D104058: ThinLTO: Fix inline assembly references to static functions with CFI

2021-06-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/test/CodeGen/thinlto-cfi-icall-static-inline-asm.c:3 + +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -flto=thin -fsanitize=cfi-icall -f

[PATCH] D104830: AST: Create __va_list in the std namespace even in C.

2021-06-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: rsmith, eugenis. pcc requested review of this revision. Herald added a project: clang. This ensures that the mangled type names match between C and C++, which is significant when using -fsanitize=cfi-icall. Ideally we wouldn't have created this names

[PATCH] D104830: AST: Create __va_list in the std namespace even in C.

2021-06-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 354130. pcc added a comment. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104830/new/ https://reviews.llvm.org/D104830 Files: clang/lib/AST/ASTContext.cpp clang/test/CodeGen/aarch64-varargs.c clang

[PATCH] D104830: AST: Create __va_list in the std namespace even in C.

2021-06-23 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe655e74a318e: AST: Create __va_list in the std namespace even in C

[PATCH] D94355: [Passes] Add relative lookup table converter pass

2021-06-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Herald added a subscriber: ormris. Comment at: llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp:73 + return false; + +// If an operand in the lookup table is not dso_local, In the version of the patch that you committed, y

[PATCH] D108223: gn build: Build libclang.so on ELF platforms.

2021-08-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: thakis. pcc requested review of this revision. Herald added a project: LLVM. This requires changing the ELF build to enable -fPIC, consistent with other platforms. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D108223 Files: l

[PATCH] D108223: gn build: Build libclang.so on ELF platforms.

2021-08-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 366966. pcc added a comment. Herald added subscribers: ormris, steven_wu, hiraditya. Also libLTO.so Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108223/new/ https://reviews.llvm.org/D108223 Files: llvm/utils/gn

[PATCH] D108223: gn build: Build libclang.so on ELF platforms.

2021-08-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: llvm/utils/gn/secondary/clang/tools/libclang/BUILD.gn:16 - # For now, make libclang a static lib there. - libclang_target_type = "static_library" -} else { thakis wrote: > probably should update these too: > > ``` > % rg

[PATCH] D108223: gn build: Build libclang.so on ELF platforms.

2021-08-18 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb2e77cd095a6: gn build: Build libclang.so and libLTO.so on ELF platforms. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D108223?vs=366966&id=367318#toc Repository: rG LLVM Gith

[PATCH] D107850: [asan] Implemented intrinsic for the custom calling convention similar used by HWASan for X86.

2021-08-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:1640 +def int_asan_check_memaccess : + Intrinsic<[],[llvm_ptr_ty, llvm_i8_ty, llvm_i8_ty], eugenis wrote: > vitalybuka wrote: > > kstoimenov wrote: > > > vitalybuka wrote: > > > > vitaly

[PATCH] D107850: [asan] Implemented intrinsic for the custom calling convention similar used by HWASan for X86.

2021-08-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: llvm/include/llvm/IR/Intrinsics.td:1640 +def int_asan_check_memaccess : + Intrinsic<[],[llvm_ptr_ty, llvm_i8_ty, llvm_i8_ty], kstoimenov wrote: > eugenis wrote: > > vitalybuka wrote: > > > pcc wrote: > > > > eugenis wrote

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-10-27 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/AST/APValue.cpp:133 +void APValue::LValueBase::setNoCFIValue(bool NoCFI) { + if (is()) { +Local.NoCFIValue = NoCFI; Remove braces

[PATCH] D112761: cfi-icall: Add -fsanitize-cfi-promotion-aliases

2021-10-28 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. I asked @samitolvanen out-of-band to check whether this really needs a flag since it seems like there could be some underlying issue that needs to be resolved so that we can do this uncond

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-11-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added subscribers: rjmccall, rsmith. pcc added a comment. This revision now requires changes to proceed. In D108479#3108360 , @ardb wrote: > I would argue that the existing __builtin_addressof() should absorb th

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-11-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. > Maybe it should even be semantically restricted to require a constant decl > reference as its operand? I think we should do this. Maybe it should be named something like `__builtin_symbol_address` if we're intending for this to have an effect with PAuth as well? Reposi

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-11-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added subscribers: rjmccall, rsmith. pcc added a comment. (Adding back @rsmith, @rjmccall.) In D108479#3113035 , @samitolvanen wrote: > In D108479#3112492 , @rjmccall > wrote: > >> You could also make this

[PATCH] D113738: [LTO] Allow passing -Os/-Oz as the optimization level

2021-11-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Please see D63976 where we rejected a similar change in favor of just letting this be controllable at compile time. To the extent that the pass pipeline is affected by the size optimization level, I think we should change the passes so that

[PATCH] D108479: [Clang] Add __builtin_addressof_nocfi

2021-11-15 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D108479#3129577 , @rjmccall wrote: > In D108479#3129571 , @jrtc27 wrote: > >> For CHERI there's the added complication that descriptors and trampolines >> can exist for security reasons wh

[PATCH] D104830: AST: Create __va_list in the std namespace even in C.

2021-11-20 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Agreed that this should probably be done in the mangler, I'll try to take a look next week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104830/new/ https://reviews.llvm.org/D104830 __

[PATCH] D115015: CodeGen: Strip exception specifications from function types in CFI type names.

2021-12-02 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: eugenis. pcc requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With C++17 the exception specification has been made part of the function type, and therefore part of mangled type names. However

[PATCH] D120862: Sema: Allow scoped enums as source type for integral conversion.

2022-09-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Ping^2. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120862/new/ https://reviews.llvm.org/D120862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D135421: Driver: Change default Android linker to lld.

2022-10-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: srhines, rprichard, danalbert. Herald added subscribers: danielkiss, cryptoad. Herald added a project: All. pcc requested review of this revision. Herald added a subscriber: MaskRay. Herald added a project: clang. The clang distributed with the Andro

[PATCH] D135421: Driver: Change default Android linker to lld.

2022-10-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135421/new/ https://reviews.llvm.org/D135421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D135421: Driver: Change default Android linker to lld.

2022-10-13 Thread Peter Collingbourne 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 rG8d9c4a7425d9: Driver: Change default Android linker to lld. (authored by pcc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D120862: Sema: Allow scoped enums as source type for integral conversion.

2022-10-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Does that DR apply retroactively to C++17? I get the impression that "Status: C++20" means that the issue was only fixed in C++20, which would make this well-formed with `-std=c++17`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D139395: Add CFI integer types normalization

2023-01-31 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. LGTM with nits Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1694 + getCXXABI().getMangleContext().mangleTypeName( + T, Out, !!getCodeGenOpts().SanitizeCfiICallNormalizeIntegers); + Is the !! necessary he

[PATCH] D139395: Add CFI integer types normalization

2023-01-31 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139395/new/ https://reviews.llvm.org/D139395 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D139395: Add CFI integer types normalization

2023-01-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D139395#4066948 , @samitolvanen wrote: > Thanks for the patch, Ramon. This looks like a reasonable approach to me, and > just for reference, here appears to be the corresponding rustc change: > > https://github.com/rust-lang/rust

[PATCH] D127876: [clang] Don't emit type test/assume for virtual classes that should never participate in WPD

2022-06-15 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. This diverges from the documented behavior of `-lto-whole-program-visibility`. The flag is meant to give all classes hidden LTO visibility, but now it only does that to some of them. Rep

[PATCH] D127876: [clang] Don't emit type test/assume for virtual classes that should never participate in WPD

2022-06-15 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D127876#3586154 , @aeubanks wrote: > In D127876#3586134 , @pcc wrote: > >> This diverges from the documented behavior of >> `-lto-whole-program-visibility`. The flag is meant to give all c

[PATCH] D127876: [clang] Don't emit type test/assume for virtual classes that should never participate in WPD

2022-06-15 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. Okay, it seems reasonable enough to have the `[[clang::lto_visibility_public]]` attribute override the `--lto-whole-program-visibility` flag. What I'm not sure about though is whether `__declspec(uu

[PATCH] D119296: KCFI sanitizer

2022-06-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:6694 - if (isExternallyVisible(T->getLinkage())) { + if (isExternallyVisible(T->getLinkage()) || !OnlyExternal) { std::string OutName; It would be better to have a separate functi

[PATCH] D115844: [ubsan] Using metadata instead of prologue data for function sanitizer

2022-06-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM > Yes, but not indirectly called from C/C++ but rather from compiler-generated > code right? That's presumably why this patch + D116130 > worked for @zhuhan0

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-03-02 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/test/CodeGenCXX/lto-visibility-inference.cpp:73 c1->f(); - // ITANIUM-NOT: type.test{{.*}}!"_ZTS2C2" + // ITANIUM: type.test{{.*}}!"_ZTS2C2" // MS: type.test{{.*}}!"?AUC2@@" tejohnson wrote: > evgeny777 wrote:

[PATCH] D69574: Remove lazy thread-initialisation

2019-11-01 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc 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/D69574/new/ https://reviews.llvm.org/D69574 ___ cfe-c

[PATCH] D70692: IRGen: Call SetLLVMFunctionAttributes{, ForDefinition} on __cfi_check_fail.

2019-11-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: eugenis. Herald added a project: clang. This has the main effect of causing target-cpu and target-features to be set on __cfi_check_fail, causing the function to become ABI-compatible with other functions in the case where these attributes affect AB

[PATCH] D70692: IRGen: Call SetLLVMFunctionAttributes{, ForDefinition} on __cfi_check_fail.

2019-11-25 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG90b8bc003caa: IRGen: Call SetLLVMFunctionAttributes{,ForDefinition} on __cfi_check_fail. (authored by pcc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70

[PATCH] D70765: LTOVisibility.rst: fix up syntax in example

2019-11-27 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc 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/D70765/new/ https://reviews.llvm.org/D70765 ___ cfe-c

[PATCH] D71154: Driver: Don't look for libc++ headers in the install directory on Android.

2019-12-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: danalbert, srhines. Herald added a reviewer: EricWF. Herald added a subscriber: ldionne. Herald added a project: clang. The NDK uses a separate set of libc++ headers in the sysroot. Any headers in the installation directory are not going to work on A

[PATCH] D71154: Driver: Don't look for libc++ headers in the install directory on Android.

2019-12-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc marked an inline comment as done. pcc added inline comments. Comment at: clang/test/Driver/android-no-installed-libcxx.cpp:8 +// RUN: -stdlib=libc++ -fsyntax-only %s -### 2>&1 | FileCheck %s +// CHECK-NOT: "-internal-isystem" "{{.*}}v1" danalbert wrote: > T

[PATCH] D71154: Driver: Don't look for libc++ headers in the install directory on Android.

2019-12-06 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG198fbcb81749: Driver: Don't look for libc++ headers in the install directory on Android. (authored by pcc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D711

[PATCH] D71154: Driver: Don't look for libc++ headers in the install directory on Android.

2019-12-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc reopened this revision. pcc added a comment. This revision is now accepted and ready to land. Relanding with a fix for the problem found by @davezarzycki. The test needed to be adjusted to set `--sysroot`, otherwise it will fail in the case where a directory named `/usr/include/c++/v1` or `/

[PATCH] D71154: Driver: Don't look for libc++ headers in the install directory on Android.

2019-12-09 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbab9849963eb: Reland 198fbcb8, "Driver: Don't look for libc++ headers in the install… (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D71154?vs=232683&id=232892#toc Repository: r

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-03-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/docs/LTOVisibility.rst:40 +to hidden LTO visibility when the ``-lto-whole-program-visibility`` lld linker +option is applied (``-plugin-opt=whole_program_visibility`` for gold). This +can be used when it is known that the LTO link has

[PATCH] D71913: [LTO/WPD] Enable aggressive WPD under LTO option

2020-03-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/test/CodeGenCXX/lto-visibility-inference.cpp:73 c1->f(); - // ITANIUM-NOT: type.test{{.*}}!"_ZTS2C2" + // ITANIUM: type.test{{.*}}!"_ZTS2C2" // MS: type.test{{.*}}!"?AUC2@@" tejohnson wrote: > pcc wrote: > > te

[PATCH] D75655: [Docs] Document -lto-whole-program-visibility

2020-03-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/docs/LTOVisibility.rst:45 +build system, and the binary will not dlopen any libraries deriving from the +binary’s classes. This is useful in situations where it is not safe to specify +``-fvisibility=hidden`` at compile time. -

[PATCH] D74150: Update hwasan docs to cover outlined checks and globals.

2020-02-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: eugenis, hctim, kcc. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D74150 Files: clang/docs/HardwareAssistedAddressSanitizerDesign.rst Index: clang/docs/Hard

[PATCH] D74150: Update hwasan docs to cover outlined checks and globals.

2020-02-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc marked 5 inline comments as done. pcc added inline comments. Comment at: clang/docs/HardwareAssistedAddressSanitizerDesign.rst:87 + bl __hwasan_check_x0_2_short // call outlined tag check +// (a

[PATCH] D74150: Update hwasan docs to cover outlined checks and globals.

2020-02-06 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. pcc marked an inline comment as done. Closed by commit rG7931e8eee3da: Update hwasan docs to cover outlined checks and globals. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D74150?vs=242962&id=2430

[PATCH] D72959: Relative VTables ABI on Fuchsia

2020-01-21 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a subscriber: peter.smith. pcc added a comment. > On Aarch64, right now only CALL26 and JUMP26 instructions generate PLT > relocations, so we manifest them with stubs that are just jumps to the > original function. I think it would be worth considering defining a new relocation type f

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-01-24 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1117 +llvm::MD5::stringifyResult(R, Str); +std::string UniqueSuffix = (".$" + Str).str(); +MangledName = MangledName + UniqueSuffix; Why `".$"` and not just `"."`? CHANGES SI

[PATCH] D44788: Add an option to support debug fission on implicit ThinLTO.

2018-03-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Does this depend on another patch? Repository: rC Clang https://reviews.llvm.org/D44788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44801: Add the -fsanitize=shadow-call-stack flag

2018-03-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM Please add a test for the driver functionality. Repository: rC Clang https://reviews.llvm.org/D44801 ___ cfe-commits mailing list cfe-commits@

[PATCH] D45239: AArch64: Implement support for the shadowcallstack attribute.

2018-04-03 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: vlad.tsyrklevich, eugenis, kcc, t.p.northover, olista01. Herald added subscribers: hiraditya, kristof.beyls, javed.absar, rengolin. The implementation of shadow call stack on aarch64 is quite different to the implementation on x86_64. Instead of rese

[PATCH] D45239: AArch64: Implement support for the shadowcallstack attribute.

2018-04-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 141063. pcc marked 3 inline comments as done. pcc added a comment. - Addres review comments https://reviews.llvm.org/D45239 Files: clang/docs/ShadowCallStack.rst clang/lib/Driver/SanitizerArgs.cpp clang/lib/Driver/ToolChain.cpp clang/test/Driver/sanitiz

[PATCH] D45239: AArch64: Implement support for the shadowcallstack attribute.

2018-04-04 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329236: AArch64: Implement support for the shadowcallstack attribute. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D45239?vs=141063&id=141068#toc Repository: rL

[PATCH] D146497: libclang: Pass Clang install directory to driver via argv[0].

2023-03-20 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: bkramer, aaron.ballman. Herald added subscribers: mikhail.ramalho, arphaman. Herald added a project: All. pcc requested review of this revision. Herald added a project: clang. Various driver features, such as the sysroot path detection for Android ta

[PATCH] D146497: libclang: Pass Clang install directory to driver via argv[0].

2023-03-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/tools/libclang/CIndex.cpp:4022 + llvm::sys::path::append(ClangPath, "bin"); + llvm::sys::path::append(ClangPath, "clang"); + aaron.ballman wrote: > I suspect this doesn't matter *too* much, but... on Windows, wouldn'

[PATCH] D146497: libclang: Pass Clang install directory to driver via argv[0].

2023-03-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/tools/libclang/CIndex.cpp:4022 + llvm::sys::path::append(ClangPath, "bin"); + llvm::sys::path::append(ClangPath, "clang"); + pcc wrote: > aaron.ballman wrote: > > I suspect this doesn't matter *too* much, but... on W

[PATCH] D146497: libclang: Pass Clang install directory to driver via argv[0].

2023-03-22 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG201fdef40dd6: libclang: Pass Clang install directory to driver via argv[0]. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D146497?vs=506832&id=507525#toc Repository: rG LLVM Gi

[PATCH] D129700: [clang] Don't emit type tests for dllexport/import classes

2023-02-27 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Can't the code in CodeGenModule::HasHiddenLTOVisibility be moved here instead of duplicating it? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129700/new/ https://reviews.llvm.org/D129700 _

[PATCH] D151388: [HWASan] use hwasan linker for Android 14+

2023-05-26 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc 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/D151388/new/ https://reviews.llvm.org/D151388 ___ cfe-c

[PATCH] D143634: [ModuleUtils] Assert correct linkage and visibility of structors' COMDAT key

2023-02-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. I've always considered that this should be fixed by extending the resolution-based LTO API to also include resolutions for comdats. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143634/new/ https://reviews.llvm.org/D143634 __

[PATCH] D144035: [hwasan] Ensure hwasan aliases do not have ODR linkage

2023-02-21 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc requested changes to this revision. pcc added a comment. This revision now requires changes to proceed. Passes shouldn't be replacing aliases with aliasees in general, see D66606 . The right fix is to fix SCEV to not do that. Repository: rG LLVM Github Mon

[PATCH] D144035: [SCEV] Ensure SCEV does not replace aliases with their aliasees

2023-02-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc 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/D144035/new/ https://reviews.llvm.org/D144035 ___ cfe-c

[PATCH] D129700: [clang] Don't emit type tests for dllexport/import classes

2023-04-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc 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/D129700/new/ https://reviews.llvm.org/D129700 ___ cfe-c

[PATCH] D149215: [MemProf] Control availability of hot/cold operator new from LTO link

2023-04-27 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. > Adds an LTO option Usual question: does it need to be an option? Could the allocator expose a symbol such as `__malloc_hot_cold` that the linker could check for in the symbol table? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D149215: [MemProf] Control availability of hot/cold operator new from LTO link

2023-04-27 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D149215#4303197 , @tejohnson wrote: > In D149215#4303149 , @pcc wrote: > >>> Adds an LTO option >> >> Usual question: does it need to be an option? Could the allocator expose a >> symbol s

[PATCH] D138337: Add support for kcfi-seal optimization with LTO

2022-12-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Can't this be implicit if LTO is being used? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138337/new/ https://reviews.llvm.org/D138337 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D138337: Add support for kcfi-seal optimization with LTO

2022-12-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D138337#3972138 , @samitolvanen wrote: > In D138337#3972009 , @pcc wrote: > >> Can't this be implicit if LTO is being used? > > I would prefer to keep this behind a flag (similarly to `-mi

[PATCH] D139395: Add CFI integer types normalization

2022-12-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a reviewer: pcc. pcc added a comment. A high level question is whether we want to base the cross-language encoding on Itanium at all. Itanium has concepts such as substitutions that will complicate the implementation in other languages. Encoding pointee types can also lead to complica

[PATCH] D139395: Add CFI integer types normalization

2022-12-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D139395#3990772 , @rcvalle wrote: > I elaborated on the reasons why not use a generalized encoding in the design > document in the tracking issue > https://github.com/rust-lang/rust/issues/89653. The tl;dr; is that it will > res

[PATCH] D21113: Add support for case-insensitive header lookup

2016-12-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: lib/Basic/VirtualFileSystem.cpp:483 +CaseInsensitiveFileSystem::openFileForRead(const Twine &Path) { + SmallVector NewPath; + if (std::error_code EC = findCaseInsensitivePath(Path.str(), NewPath)) I wonder whether it would

[PATCH] D24688: Introduce "hosted" module flag.

2017-01-06 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Didn't we figure out in the end that this could be a function attribute instead? https://reviews.llvm.org/D24688 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24688: Introduce "hosted" module flag.

2017-01-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In https://reviews.llvm.org/D24688#638836, @mehdi_amini wrote: > In https://reviews.llvm.org/D24688#638835, @pcc wrote: > > > Didn't we figure out in the end that this could be a function attribute > > instead? > > > We did? You wrote in PR30403: "I had a brief look at what

[PATCH] D31162: IRGen: Do not set dllexport on declarations.

2017-03-20 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. Setting dllexport on a declaration has no effect, as we do not emit export directives for declarations. Part of the fix for PR32334. https://reviews.llvm.org/D31162 Files: clang/lib/CodeGen/CodeGenModule.cpp clang/test/CodeGenCXX/dllexport.cpp Index: clang/test

[PATCH] D31162: IRGen: Do not set dllexport on declarations.

2017-03-20 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298330: IRGen: Do not set dllexport on declarations. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D31162?vs=92412&id=92416#toc Repository: rL LLVM https://reviews.llvm.org/D3

[PATCH] D31050: [ThinLTO] Clang support for emitting minimized bitcode for thin link

2017-03-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D31050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    2   3   4   5   6   7   8   >