[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

[PATCH] D85649: [AArch64] PAC/BTI code generation for LLVM generated functions

2022-03-15 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Herald added a project: All. In D85649#2281439 , @chill wrote: > It looks like the only value that makes sense is `Error` - any other policy > (existing or not) would potentially lead to meaningfully different code > generated with o

[PATCH] D119296: KCFI sanitizer

2022-04-07 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. > Note that if additional data has been injected between the KCFI > type identifier and the start of the function, e.g. by using > -fpatchable-function-entry, the offset in bytes must be specified > using -fsanitize-kcfi-offset= to avoid errors. The offset > must be the same f

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-02 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:842 + if (!Args.hasArg(options::OPT_shared)) +SharedRuntimes.push_back("hwasan-preinit"); } morehouse wrote: > eugenis wrote: > > pcc wrote: > > > Shouldn't it be

[PATCH] D118171: [HWASan] Add __hwasan_init to .preinit_array.

2022-02-03 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/D118171/new/ https://reviews.llvm.org/D118171 ___ cfe-c

[PATCH] D119296: KCFI sanitizer

2022-02-08 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3168 + -1); + llvm::Value *Test = Builder.CreateICmpEQ(Builder.CreateLoad(HashPtr), Hash); + llvm::BasicBlock *ContBB = createBasicBlock("kcfi.cont"); We considered a scheme like this befo

[PATCH] D116774: AST: Move __va_list tag back to std conditionally on AArch64.

2022-02-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 407227. pcc retitled this revision from "AST: Move __va_list tag to the top level on ARM architectures." to "AST: Move __va_list tag back to std conditionally on AArch64.". pcc edited the summary of this revision. pcc added a comment. Make it conditional Repos

[PATCH] D119296: KCFI sanitizer

2022-02-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3168 + -1); + llvm::Value *Test = Builder.CreateICmpEQ(Builder.CreateLoad(HashPtr), Hash); + llvm::BasicBlock *ContBB = createBasicBlock("kcfi.cont"); samitolvanen wrote: > pcc wrote: > >

[PATCH] D119296: KCFI sanitizer

2022-02-09 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:3168 + -1); + llvm::Value *Test = Builder.CreateICmpEQ(Builder.CreateLoad(HashPtr), Hash); + llvm::BasicBlock *ContBB = createBasicBlock("kcfi.cont"); pcc wrote: > samitolvanen wrote: > >

[PATCH] D119367: [HWASan] Allow no_sanitize(..) and change metadata passing.

2022-02-11 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In addition to the .bc support we will also need support for reading/writing .ll files. Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:1721 -static DenseSet getExcludedGlobals(Module &M) { - NamedMDNode *Globals = M.getNamedMetadat

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

2022-02-14 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. On the bug you have: define internal fastcc void @​_Z4callIiE4taskv.resume(%_Z4callIiE4taskv.Frame* noalias nonnull align 8 dereferenceable(24 ) %FramePtr) #​1 prologue <{ i32, i32 }> <{ i32 846595819, i32 trunc (i64 sub (i64 ptrtoint (i8** @​1 to i64), i64 ptrtoin

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

2022-02-14 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D115844#3321235 , @ychen wrote: > In D115844#3321190 , @pcc wrote: > >> On the bug you have: >> >> define internal fastcc void >> @​_Z4callIiE4taskv.resume(%_Z4callIiE4taskv.Frame* noali

[PATCH] D116774: AST: Move __va_list tag back to std conditionally on AArch64.

2022-02-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc updated this revision to Diff 409716. pcc added a comment. Use isARM() etc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116774/new/ https://reviews.llvm.org/D116774 Files: clang/lib/AST/ASTContext.cpp clang/lib/AST/ItaniumMangle.cpp cla

[PATCH] D116774: AST: Move __va_list tag back to std conditionally on AArch64.

2022-02-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc marked 2 inline comments as done. pcc added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116774/new/ https://reviews.llvm.org/D116774 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D116773: AST: Make getEffectiveDeclContext() a member function of ItaniumMangleContextImpl. NFCI.

2022-02-17 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG18ead23385a4: AST: Make getEffectiveDeclContext() a member function of… (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D116773?vs=398007&id=409733#toc Repository: rG LLVM Github

[PATCH] D116774: AST: Move __va_list tag back to std conditionally on AArch64.

2022-02-17 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 rG82e5f951fd6e: AST: Move __va_list tag back to std conditionally on AArch64. (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D

[PATCH] D116774: AST: Move __va_list tag back to std conditionally on AArch64.

2022-02-17 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116774/new/ https://reviews.llvm.org/D116774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[PATCH] D119296: KCFI sanitizer

2022-04-28 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D119296#3467905 , @samitolvanen wrote: > In D119296#3466027 , @joaomoreira > wrote: > >> I played a little bit with kcfi and here are some thoughts: >> >> - under -Os I saw functions bein

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

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

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

2022-05-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1843 + + auto *FTRTTIProxy = new llvm::GlobalVariable( + TheModule, Addr->getType(), Are these proxy variables necessary? I think that now that we have custom code generation for th

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

2022-05-12 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1843 + + auto *FTRTTIProxy = new llvm::GlobalVariable( + TheModule, Addr->getType(), ychen wrote: > pcc wrote: > > Are these proxy variables necessary? I think that now that we have

[PATCH] D120727: [libc++] Overhaul how we select the ABI library

2022-05-13 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a comment. In D120727#3512177 , @paulkirth wrote: > Hi, we're seeing some failures in Fuchsia's Clang CI. Our runtimes build > seems to be unable to find `cxxabi.h`. > > The failing bot can be found here: > https://luci-milo.appspot.com/ui/p/f

[PATCH] D125624: [gold] Remove an external dependency to GNU binutils' header file

2022-05-16 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added inline comments. Comment at: llvm/tools/gold/gold-plugin.cpp:44-52 // FIXME: remove this declaration when we stop maintaining Ubuntu Quantal and // Precise and Debian Wheezy (binutils 2.23 is required) #define LDPO_PIE 3 #define LDPT_GET_SYMBOLS_V3 28 // FIXME:

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

2019-08-22 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] D66606: IR. Change strip* family of functions to not look through aliases.

2019-08-22 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: rnk. Herald added subscribers: cfe-commits, aheejin, hiraditya, jgravelle-google, sbc100, dschuff, srhines. Herald added projects: clang, LLVM. I noticed another instance of the issue where references to aliases were being replaced with aliasees, t

[PATCH] D66606: IR. Change strip* family of functions to not look through aliases.

2019-08-22 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL369697: IR. Change strip* family of functions to not look through aliases. (authored by pcc, committed by ). Changed prior to commit: https://reviews.llvm.org/D66606?vs=216671&id=216694#toc Repository:

[PATCH] D36013: Fix logic for generating llvm.type.test()s

2017-07-28 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/cfi-vcall-no-trap.cpp:2 +// Only output llvm.assume(llvm.type.test()) if cfi-vcall is disabled and whole-program-vtables is enabled +// RUN: %clan

[PATCH] D36013: Fix logic for generating llvm.type.test()s

2017-07-31 Thread Peter Collingbourne via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL309622: Fix logic for generating llvm.type.test()s (authored by pcc). Changed prior to commit: https://reviews.llvm.org/D36013?vs=108702&id=108994#toc Repository: rL LLVM https://reviews.llvm.org/D3

[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-03 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc added a subscriber: cfe-commits. pcc added inline comments. Comment at: lib/CodeGen/CodeGenFunction.cpp:785 + // Ignore unrelated casts from C++ calls to allocate(). Don't match on the + // namespace because not all allocators are in std:: The comment sho

[PATCH] D36294: CFI: blacklist STL allocate() from unrelated-casts

2017-08-03 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/D36294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   7   8   >