[PATCH] D59724: IRGen: Remove StructorType; thread GlobalDecl through more code. NFCI.

2019-03-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: rsmith, rjmccall. Herald added a subscriber: jdoerfert. Herald added a project: clang. This should make it easier to add more structor variants. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D59724 Files: clang/include/clang/AS

[PATCH] D59724: IRGen: Remove StructorType; thread GlobalDecl through more code. NFCI.

2019-03-22 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL356822: IRGen: Remove StructorType; thread GlobalDecl through more code. NFCI. (authored by pcc, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to com

[PATCH] D59797: [COFF] Reorder fields in Chunk and SectionChunk to reduce their size

2019-03-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: lld/COFF/Chunks.cpp:47 +namespace { +// This class exists just for the purpose of calculating the expected size of rnk wrote: > ruiu wrote: > > rnk wrote: > > > ruiu wrote: > > > > rnk wrote: > > > > > ruiu wrote: > > > >

[PATCH] D60059: [Driver] implement -feverything

2019-04-01 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D60059#1450320 , @lebedev.ri wrote: > In D60059#1450252 , @yuxuanchen1997 > wrote: > > > > enable all runtime sanitizers for extra safety > > > > Brilliant idea. But I wonder how that could

[PATCH] D60548: Variable auto-init: also auto-init alloca

2019-04-11 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. I probably wouldn't do anything about suppressing init on alloca for now, but if we did do something I think I'd be in favour of the separate builtin for uninitialized alloca. I also considered the alternative of allowing `__attribute__((uninitialized))` to appear on a func

[PATCH] D60807: Test for Oz fail

2019-04-16 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Interesting, it looks like the difference here is almost entirely due to different inlining decisions. And according to the tool I posted here: http://lists.llvm.org/pipermail/llvm-dev/2019-April/131811.html in the few functions in which we made the same inlining decisions,

[PATCH] D58321: Support for relative vtables

2019-05-01 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:531 +/// \brief Whether the class uses the relative C++ vtable ABI. +unsigned IsRelativeCXXABI : 1; + rjmccall wrote: > Should we proactively generalize this as a "CXXABIVariant" enu

[PATCH] D58321: [WIP] Support for relative vtables

2019-02-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Can we start with a patch that just exposes a flag that enables the relative ABI unconditionally, and remove all the platform ABI compatibility stuff? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58321/new/ https://reviews.ll

[PATCH] D37597: [ubsan] Function Sanitizer: Don't require writable text segments

2017-09-07 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Thanks. Once we apply this fix to other platforms this would seem to fix PR17633. We may also want to change the ubsan function signature in order to avoid bad pointer reads in case of version mismatches. Comment at: lib/CodeGen/CodeGenFunction.cpp:434 +

[PATCH] D37597: [ubsan] Function Sanitizer: Don't require writable text segments

2017-09-07 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:463 + auto *PCRelAsInt = + Builder.CreatePtrToInt(EncodedAddr, IntPtrTy, "encoded_addr.int"); + auto *FuncAsInt = Builder.CreatePtrToInt(F, IntPtrTy, "func_addr.int"); pcc wrote: > Mayb

[PATCH] D37597: [ubsan] Function Sanitizer: Don't require writable text segments

2017-09-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:445 + auto *GV = new llvm::GlobalVariable(CGM.getModule(), Addr->getType(), + /*isConstant=*/false, + llvm::GlobalValue::PrivateLinkag

[PATCH] D37597: [ubsan] Function Sanitizer: Don't require writable text segments

2017-09-12 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! Comment at: lib/CodeGen/CodeGenFunction.cpp:461 + ? EncodedAddr + : Builder.CreateSExt(EncodedAddr, IntPtrTy); + auto

[PATCH] D37787: Driver: Make -fwhole-program-vtables a core option so it can be used from clang-cl.

2017-09-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. Also add some missing driver tests for the regular clang driver. https://reviews.llvm.org/D37787 Files: clang/include/clang/Driver/Options.td clang/test/Driver/whole-program-vtables.c Index: clang/test/Driver/whole-program-vtables.c =

[PATCH] D37787: Driver: Make -fwhole-program-vtables a core option so it can be used from clang-cl.

2017-09-13 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313169: Driver: Make -fwhole-program-vtables a core option so it can be used from clang… (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D37787?vs=114960&id=115082#toc Repository:

[PATCH] D48680: Add missing visibility annotation for __base

2019-06-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Here's a standalone reproducer for the problem: $ cat exe.cpp #include std::function f(); int main() { f()(); } $ cat dso.cpp #include __attribute__((visibility("default"))) std::function f() { return [](){}; } $ ~/l3/ra-cmake/bin/clang+

[PATCH] D62636: Driver, IRGen: Set partitions on GlobalValues according to -fsymbol-partition flag.

2019-06-05 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/D62636/new/ https://reviews.llvm.org/D62636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D62636: Driver, IRGen: Set partitions on GlobalValues according to -fsymbol-partition flag.

2019-06-07 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 rL362829: Driver, IRGen: Set partitions on GlobalValues according to -fsymbol-partition… (authored by pcc, committed by ). Herald added a project: LLVM. Herald added a s

[PATCH] D64597: CodeGet: Init 32bit pointers with 0xAAAAAAAA

2019-07-11 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. The problem with `0x` on 32-bit is that it is likely to be a valid address. When I discussed this with JF I proposed a pointer initialization of `0x` which he agreed to. This value is very likely to trap when accessed (due to accesses likely wrapping to zer

[PATCH] D64597: CodeGet: Init 32bit pointers with 0xFFFFFFFF

2019-07-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D64597#1582944 , @hubert.reinterpretcast wrote: > In D64597#1581605 , @pcc wrote: > > > The problem with `0x` on 32-bit is that it is likely to be a valid > > address. > > > > When

[PATCH] D64458: add -fthinlto-index= option to clang-cl

2019-07-15 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. I think it's a little unfortunate that we're continuing to go down the road of letting users pass more flags to the ThinLTO backend action, but I won't stand in the way here. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64458

[PATCH] D48680: Add missing visibility annotation for __base

2019-07-16 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. I think it would be up to the libc++ maintainers to approve the patch. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48680/new/ https://reviews.llvm.org/D48680 ___ cfe-commits mailing list cfe

[PATCH] D48680: Add missing visibility annotation for __base

2019-07-16 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D48680#1587967 , @ldionne wrote: > @pcc In your reproducer, what is `~/l3/ra-cmake/bin/clang++`? That's just clang built from trunk at the time that I posted my comment. > Are you able to reproduce without `-fuse-ld=lld`? I'm try

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-16 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: eugenis. Herald added subscribers: cfe-commits, hiraditya. Herald added projects: clang, LLVM. This will let us instrument globals during initialization. This required making the new PM pass a module pass, which should still provide access to analys

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. IIUC the reason was to work around the lack of analysis availability from module passes, which is no longer a concern with the new PM. I would personally prefer to see the other sanitizers re-architected this way. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL366379: hwasan: Initialize the pass only once. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D64843?vs=210227&id=210429#toc Repository: rL LLVM CHANGES SINCE LA

[PATCH] D64843: hwasan: Initialize the pass only once.

2019-07-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. The instrumentation for globals is coming in a separate patch. It seems more important to achieve implementation simplicity for the sanitizer passes rather than data locality because they make fundamental changes to the IR that touch the whole module (unlike other passes th

[PATCH] D65009: [LTO] Don't mark regular LTO units with EnableSplitLTOUnit

2019-07-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Sorry, just realized this. If I do clang++ -c -flto a.cpp # "split" clang++ -c -flto=thin b.cpp -fwhole-program-vtables # non-split clang++ a.o b.o this should fail, right? If I'm not mistaken, this patch series will cause this to succeed. I think we need to change th

[PATCH] D65009: [LTO] Always mark regular LTO units with EnableSplitLTOUnit=1

2019-07-19 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: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65009/new/ https://reviews.llvm.org/D65009 ___ cfe-commits mailing

[PATCH] D65029: [Driver] Support for disabling sanitizer runtime linking

2019-07-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added subscribers: filcab, pcc. pcc added a comment. It's also worth asking whether `-nodefaultlibs` would work for this use case as @filcab suggested on D64547 . Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65029/new/ https

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-07-29 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. It doesn't seem sound to create the distinction between translation unit and linkage unit visibility and then allow passes to relax visibility. For example, imagine that you have an executable with (compiled with `-fvisibility=default`): struct PluginInterface { virtu

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-07-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D63932#1606248 , @ostannard wrote: > In that example, with everything having default ELF visibility, all of the > vtables will get vcall_visibility public, which can't be optimised by VFE, > and won't ever be relaxed to one of the

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-07-31 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D63932#1608235 , @ostannard wrote: > > - Take the example from my earlier message, give the "main executable" and > > "DSO" hidden visibility, build the "main executable" with LTO and the "DSO" > > without LTO, and statically link

[PATCH] D65543: Use library basenames when autolinking on Windows

2019-07-31 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. The idea behind embedding the path was that these objects are usually not distributed, so things usually just work. Is there some other way that we could arrange for the linker to search the sanitizer library directory automatically? Maybe we could add the path to one of t

[PATCH] D65629: cfi-icall: Allow the jump table to be optionally made non-canonical.

2019-08-01 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: hctim, tejohnson. Herald added subscribers: cfe-commits, dexonsmith, steven_wu, hiraditya, mehdi_amini. Herald added projects: clang, LLVM. The default behavior of Clang's indirect function call checker will replace the address of each CFI-checked f

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added reviewers: hctim, vitalybuka. Herald added subscribers: Sanitizers, cfe-commits, hiraditya, kubamracek, srhines. Herald added projects: clang, Sanitizers, LLVM. Globals are instrumented by adding a pointer tag to their symbol values and emitting metadata into

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc marked 3 inline comments as done. pcc added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan.cpp:221 + s32 gv_relptr; + u32 info; +}; vitalybuka wrote: > Can this be just following? > u32 size:24; > u8 tag; It could, but since these structs ar

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 213472. pcc added a comment. - Switch to an enum Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65770/new/ https://reviews.llvm.org/D65770 Files: clang/lib/Driver/SanitizerArgs.cpp clang/test/Driver/fsanitize.c

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 213477. pcc added a comment. - Increment num_descriptions_printed in the right place Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65770/new/ https://reviews.llvm.org/D65770 Files: clang/lib/Driver/SanitizerArgs

[PATCH] D65770: hwasan: Instrument globals.

2019-08-05 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. The AOSP side of this is https://android-review.googlesource.com/c/platform/bionic/+/1096613 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65770/new/ https://reviews.llvm.org/D65770 _

[PATCH] D65770: hwasan: Instrument globals.

2019-08-06 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368102: hwasan: Instrument globals. (authored by pcc, committed by ). Herald added a subscriber: delcypher. Changed prior to commit: https://reviews.llvm.org/D65770?vs=213477&id=213732#toc Repository:

[PATCH] D65629: cfi-icall: Allow the jump table to be optionally made non-canonical.

2019-08-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a reviewer: eugenis. pcc added a comment. Thanks for the confirmation Kees. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65629/new/ https://reviews.llvm.org/D65629 ___ cfe-commits mailing li

[PATCH] D65629: cfi-icall: Allow the jump table to be optionally made non-canonical.

2019-08-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc marked 6 inline comments as done. pcc added inline comments. Comment at: clang/test/CodeGen/cfi-icall-canonical-jump-tables.c:15 +// CHECK: define void @g({{.*}} [[ATTR2:#[0-9]+]] +__attribute__((cfi_jump_table_canonical)) void g() {} + eugenis wrote: > would

[PATCH] D65629: cfi-icall: Allow the jump table to be optionally made non-canonical.

2019-08-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 214434. pcc marked 2 inline comments as done. pcc added a comment. - Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65629/new/ https://reviews.llvm.org/D65629 Files: clang/docs/ControlFlow

[PATCH] D65629: cfi-icall: Allow the jump table to be optionally made non-canonical.

2019-08-09 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL368495: cfi-icall: Allow the jump table to be optionally made non-canonical. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D65629?vs=214434&id=214468#toc Repositor

[PATCH] D66437: Sema: Create a no-op implicit cast for lvalue function conversions.

2019-08-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: rsmith. Herald added a project: clang. This fixes an assertion failure in the case where an implicit conversion for a function call involves an lvalue function conversion, and makes the AST for initializations involving implicit lvalue function conv

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-08-19 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D63932#1610182 , @ostannard wrote: > > Partial linking will indeed prevent dropping the virtual functions, but it > > should not prevent clearing the pointer to the virtual function in the > > vtable. The linker should then be abl

[PATCH] D48680: Add missing visibility annotation for __base

2019-06-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. The same problem occurs whether or not `exe.cpp` is compiled with`-fno-exceptions -fno-rtti`. Repository: rCXX libc++ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D48680/new/ https://reviews.llvm.org/D48680 ___ cfe-

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

2019-06-27 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: eugenis. Herald added subscribers: Sanitizers, cfe-commits, jfb, hiraditya, javed.absar, kubamracek. Herald added projects: clang, Sanitizers, LLVM. A short granule is a granule of size between 1 and `TG-1` bytes. The size of a short granule is sto

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

2019-07-01 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 207379. pcc added a comment. - Simplify tagAlloca Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63908/new/ https://reviews.llvm.org/D63908 Files: clang/docs/HardwareAssistedAddressSanitizerDesign.rst compiler-

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

2019-07-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 208758. pcc marked 3 inline comments as done. pcc added a comment. - Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63908/new/ https://reviews.llvm.org/D63908 Files: clang/docs/HardwareAss

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

2019-07-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: compiler-rt/lib/hwasan/hwasan_allocator.cpp:159 ? (t ? t->GenerateRandomTag() : kFallbackAllocTag) : 0; +uptr tag_size = orig_size ? orig_size : 1; eugenis wrote: > When !(flags(

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

2019-07-09 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365551: hwasan: Improve precision of checks using short granule tags. (authored by pcc, committed by ). Herald added a subscriber: delcypher. Changed prior to commit: https://reviews.llvm.org/D63908?vs=

[PATCH] D64458: add -fthinlto-index= option to clang-cl

2019-07-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Do we really need to support clang-cl syntax here? Can't the user of -fthinlto-index= use the regular clang driver? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64458/new/ https://reviews.llvm.org/D64458 __

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-07-10 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Hi Oliver, thanks for working on this. This is something that I've always wanted to do with the type metadata but never had time to work on. I'll try to take a more in depth look later this week. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D62636: Driver, IRGen: Set partitions on GlobalValues according to -fsymbol-partition flag.

2019-05-29 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: rsmith. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D62636 Files: clang/include/clang/Basic/CodeGenOptions.h clang/include/clang/Driver/Options.td clang/lib/CodeGen/CodeGenModule.cpp clang/

[PATCH] D54604: Automatic variable initialization

2018-12-14 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Mostly looking good, a few style nits. Comment at: include/clang/Basic/DiagnosticDriverKinds.td:409 + +def err_drv_trivial_auto_var_init_zero_disabled : Warning< + "-ftrivial-auto-var-init=zero hasn't been enabled. Enable it at your own peril for benchmar

[PATCH] D54604: Automatic variable initialization

2018-12-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: test/CodeGenCXX/trivial-auto-var-init-attribute.cpp:13 +void test_attribute_uninitialized() { + [[clang::trivial_auto_init("uninitialized")]] int i; + used(i); -

[PATCH] D53891: [LTO] Add option to enable LTOUnit splitting, and disable unless needed

2018-12-18 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. You can't emit the type tests by default with `-flto=thin` because not all programs adhere to the conditions described in `LTOVisibility.rst` and we can't silently break those programs; it is something that they will need to explicitly opt in to. We should be able to emit t

[PATCH] D55620: [ThinLTO] Clang changes to utilize new pass to handle chains of aliases

2019-01-04 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: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D55620/new/ https://reviews.llvm.org/D55620 ___ cfe-commits mailing

[PATCH] D56038: hwasan: Implement lazy thread initialization for the interceptor ABI.

2019-01-04 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC350429: hwasan: Implement lazy thread initialization for the interceptor ABI. (authored by pcc, committed by ). Herald added a subscriber: cfe-commits. Changed prior to commit: https://reviews.llvm.org/

[PATCH] D53891: [LTO] Add option to enable LTOUnit splitting, and disable unless needed

2019-01-10 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: include/clang/Basic/CodeGenOptions.def:120 +CODEGENOPT(EnableSplitLTOUnit, 1, 0) ///< Enable LTO unit splitting to support +///

[PATCH] D53891: [LTO] Add option to enable LTOUnit splitting, and disable unless needed

2019-01-10 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: lib/Driver/ToolChains/Clang.cpp:5112 + bool EnableSplitLTOUnit = Args.hasFlag( + options::OPT_fsplit_lto_unit, options::OPT_fno_split_lto_unit, false); + if (EnableSplitLTOUnit || WholeProgramVTables || Sanitize.needsLTO()) {

[PATCH] D66437: Sema: Create a no-op implicit cast for lvalue function conversions.

2019-09-25 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/D66437/new/ https://reviews.llvm.org/D66437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D65543: [Windows] Autolink with basenames and add libdir to libpath

2019-09-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Another option would be to let the behaviour be controlled by `/Brepro`, so that the default behaviour would be to embed the path, while `/Brepro` builds would only embed the basename. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D68029: [ThinLTO] Enable index-only WPD from clang

2019-10-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: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68029/new/ https://reviews.llvm.org/D68029 ___ cfe-commits mailing

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: include/clang/Driver/Options.td:2255 HelpText<"Save intermediate compilation results.">; -def save_temps : Flag<["-", "--"], "save-temps">, Flags<[DriverOption]>, +def save_temps : Flag<["-", "--"], "save-temps">, Flags<[CC1Option, Drive

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-16 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: include/clang/Driver/Options.td:2255 HelpText<"Save intermediate compilation results.">; -def save_temps : Flag<["-", "--"], "save-temps">, Flags<[DriverOption]>, +def save_temps : Flag<["-", "--"], "save-temps">, Flags<[CC1Option, Drive

[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds

2018-04-16 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: rC Clang https://reviews.llvm.org/D45217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

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

2018-04-30 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:423 +Args.MakeArgString(Twine("-plugin-opt=objcopy=") + Objcopy)); +StringRef DWO_Dir = A->getValue(); +CmdArgs.push_back( Can we default this to a path alongside the outp

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: test/CodeGen/thinlto-diagnostic-handler-remarks-with-hotness.ll:14 +; RUN: %clang -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -fsave-optimization-record -fdiagnostics-show-hotness -o %t2.o -c +; RUN: cat %t2.opt.yaml.thin.0.yaml | FileChec

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 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: rC Clang https://reviews.llvm.org/D46464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mail

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. We should be installing `compiler-rt/lib/cfi/cfi_blacklist.txt`, no? https://reviews.llvm.org/D46403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. LGTM https://reviews.llvm.org/D46403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46464: [ThinLTO] Support opt remarks options with distributed ThinLTO backends

2018-05-04 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. LGTM Repository: rC Clang https://reviews.llvm.org/D46464 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-07 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: test/Frontend/dependency-gen.c:24 // RUN: echo "fun:foo" > %t.blacklist -// RUN: %clang -MD -MF - %s -fsyntax-only -fsanitize=cfi-vcall -flto -fvisibility=hidden -fsanitize-blacklist=%t.blacklist -I ./ | FileCheck -check-prefix=CHECK-SEVE

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-07 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc accepted this revision. pcc added a comment. LGTM https://reviews.llvm.org/D46403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46403: [CFI] Force LLVM to die if the implicit blacklist files cannot be found.

2018-05-07 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC331674: [CFI] Force LLVM to die if the implicit blacklist files cannot be found. (authored by pcc, committed by ). Repository: rC Clang https://reviews.llvm.org/D46403 Files: lib/Driver/SanitizerArg

[PATCH] D47567: Implement CFI for indirect calls via a member function pointer.

2018-06-25 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1413 + FD->getType(), Context.getRecordType(Base).getTypePtr())); + F->addTypeMetadata(0, Id); +} vlad.tsyrklevich wrote: > It'd be nice to have a test that reaches t

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

2018-06-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 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] D47567: Implement CFI for indirect calls via a member function pointer.

2018-06-25 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC335569: Implement CFI for indirect calls via a member function pointer. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D47567?vs=151272&id=152819#toc Repository:

[PATCH] D48680: Add missing visibility annotation for __base

2018-06-27 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. This change ensures that __func receives public LTO visibilty: https://clang.llvm.org/docs/LTOVisibility.html if a translation unit is compiled with `-fvisibility=hidden` and without `_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS` defined (i.e. dynamically linking against libc++).

[PATCH] D48155: Teach Clang to emit address-significance tables.

2018-07-17 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC337333: Teach Clang to emit address-significance tables. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D48155?vs=151282&id=155984#toc Repository: rC Clang https

[PATCH] D49526: Updated llvm-proto-fuzzer to execute the compiled code

2018-07-18 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp:209 + +// Helper function that converts ELF relocatable into raw machine code that +// can be executed in memory. Returns size of machine code. Did you look at using LLVM'

[PATCH] D67985: CFI: wrong type passed to llvm.type.test with multiple inheritance devirtualization

2019-10-07 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Can you add a CodeGenCXX test as well, please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67985/new/ https://reviews.llvm.org/D67985 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D68584: Fix Calling Convention through aliases

2019-10-07 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/CodeGen/CGDeclCXX.cpp:251 // Make sure the call and the callee agree on calling convention. - if (llvm::Function *dtorFn = - dyn_cast(dtor.ge

[PATCH] D63932: [GlobalDCE] Dead Virtual Function Elimination

2019-10-10 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/D63932/new/ https://reviews.llvm.org/D63932 ___ cfe-c

[PATCH] D67985: CFI: wrong type passed to llvm.type.test with multiple inheritance devirtualization

2019-10-11 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67985/new/ https://reviews.llvm.org/D67985 ___ cfe-commits mailing list cfe-commits@lists.l

[PATCH] D61675: [WIP] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator

2019-10-14 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Hi, it looks like this patch has caused a test failure under asan: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/35922/steps/check-llvm%20asan/logs/stdio Can you please take a look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D66437: Sema: Create a no-op implicit cast for lvalue function conversions.

2019-10-18 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/D66437/new/ https://reviews.llvm.org/D66437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[PATCH] D66437: Sema: Create a no-op implicit cast for lvalue function conversions.

2019-10-18 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG766f15814a01: Sema: Create a no-op implicit cast for lvalue function conversions. (authored by pcc). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66437/new/

[PATCH] D80647: [Driver] Support -fsanitize=shadow-call-stack on aarch64_be

2020-05-27 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/D80647/new/ https://reviews.llvm.org/D80647 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

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

2020-07-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: llvm/test/CodeGen/RISCV/shadowcallstack.ll:12 +; RV32-NEXT:ret +; RV32-NOT: x18 +; Shouldn't it be looking for `s2` since that's how `x18` is spelled in assembly? Repository: rG LLVM Github Monorepo CHANGES SINC

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

2020-07-23 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. > Any callee-saved register can be used. In fact, any register may be used, as long as it cannot be used to pass arguments or return values. It may be better to select a temporary register, as `x18` is on aarch64 when not being used as a platform register, so that problems

[PATCH] D79522: Allow -fsanitize-minimal-runtime with memtag sanitizer.

2020-05-06 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/D79522/new/ https://reviews.llvm.org/D79522 ___ cfe-c

[PATCH] D79919: [Driver] Pass -plugin-opt=O2 for -Os -Oz and -plugin-opt=O1 for -Og

2020-05-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 Comment at: clang/test/Driver/lto.c:52 +// RUN: %clang -target x86_64-unknown-linux-gnu --sysroot %S/Inputs/basic_cross_linux_tree %s \ +// RUN: -fuse-ld=lld -flto -O -###

[PATCH] D41036: IRGen: When performing CFI checks, load vtable pointer from vbase when necessary.

2017-12-08 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. Under the Microsoft ABI, it is possible for an object not to have a virtual table pointer of its own if all of its virtual functions were introduced by virtual bases. In that case, we need to load the vtable pointer from one of the virtual bases and perform the type chec

[PATCH] D40478: Added Instrument Control Flow Flag

2017-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: include/clang/Driver/Options.td:1035 HelpText<"Instrument function entry only, after inlining, without arguments to the instrumentation call">; - +def finstrument_control_flow : Flag<["-"], "finstrument-control-flow">, + Group, Flags<[C

[PATCH] D41036: IRGen: When performing CFI checks, load vtable pointer from vbase when necessary.

2017-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Ping. https://reviews.llvm.org/D41036 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D41036: IRGen: When performing CFI checks, load vtable pointer from vbase when necessary.

2017-12-13 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL320638: IRGen: When performing CFI checks, load vtable pointer from vbase when… (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D41036?vs=126220&id=126831#toc Reposi

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

2021-07-16 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/D104058/new/ https://reviews.llvm.org/D104058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

<    1   2   3   4   >