[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. LGTM with a nit. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:750 + ArgsTy... Args) { + if (TargetTriple.getArch() == Triple::systemz) { +return M.getOrInsertFunction(Name, Type:

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-18 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:118 ///(X=1,2,4,8) are accessed through pointers obtained via the /// __msan_metadata_ptr_for_load_X(ptr) /// __msan_metadata_ptr_for_store_X(ptr) i

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-18 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Do you have a working kernel patch for SystemZ? I think we'd better name the functions taking the extra parameter differently - maybe at some point we'll even want them to coexist on certain architectures. Anyway, it might just look cleaner in the kernel code.

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added subscribers: pcc, glider. glider added inline comments. Comment at: clang/docs/DataFlowSanitizerDesign.rst:54 - /// Returns whether the given label label contains the label elem. + /// Returns whether the given label contains the label elem. int dfsan_has_labe

[PATCH] D127860: [msan] Allow KMSAN to use -fsanitize-memory-param-retval

2022-06-17 Thread Alexander Potapenko 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 rG7ab44b5c2155: [msan] Allow KMSAN to use -fsanitize-memory-param-retval (authored by glider). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D127860: [msan] Allow KMSAN to use -fsanitize-memory-param-retval

2022-06-16 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 437678. glider added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127860/new/ https://reviews.llvm.org/D127860 Files: clang/lib/Driver/SanitizerArgs.cpp clang/test/CodeGen/kmsan-param-ret

[PATCH] D127860: [msan] Allow KMSAN to use -fsanitize-memory-param-retval

2022-06-15 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. Herald added a project: All. glider requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Let -fsanitize-memory-param-retval be used together with -fsanitize=kernel-memory, so that it can be applied when buil

[PATCH] D120055: [asan] Add support for disable_sanitizer_instrumentation attribute

2022-02-18 Thread Alexander Potapenko 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 rGc85a26454d4b: [asan] Add support for disable_sanitizer_instrumenta

[PATCH] D120055: [asan] Add support for disable_sanitizer_instrumentation attribute

2022-02-17 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added reviewers: melver, dvyukov, eugenis. Herald added a subscriber: hiraditya. glider requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For ASan this will effectively serve as a synonym

[PATCH] D119838: Revert "[asan] Add support for disable_sanitizer_instrumentation attribute"

2022-02-15 Thread Alexander Potapenko 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 rG05ee1f4af897: Revert "[asan] Add support for disable_sanitizer_ins

[PATCH] D119838: Revert "[asan] Add support for disable_sanitizer_instrumentation attribute"

2022-02-15 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added reviewers: melver, eugenis. Herald added a subscriber: hiraditya. glider requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This reverts commit dd145f953db3dafbc019f1d3783bb4f09a28af

[PATCH] D119726: [asan] Add support for disable_sanitizer_instrumentation attribute

2022-02-15 Thread Alexander Potapenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdd145f953db3: [asan] Add support for disable_sanitizer_instrumentation attribute (authored by glider). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119726/n

[PATCH] D119726: [asan] Add support for disable_sanitizer_instrumentation attribute

2022-02-15 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 408780. glider added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119726/new/ https://reviews.llvm.org/D119726 Files: clang/docs/AddressSanitizer.rst clang/lib/CodeGen/CodeGenFunction.cpp

[PATCH] D119726: [asan] Add support for disable_sanitizer_instrumentation attribute

2022-02-14 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added a reviewer: melver. Herald added a subscriber: hiraditya. glider requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. For ASan this will effectively serve as a synonym for __attribute_

[PATCH] D115440: Provide __builtin_alloca*_uninitialized variants

2022-01-10 Thread Alexander Potapenko via Phabricator via cfe-commits
glider accepted this revision. glider added a comment. This revision is now accepted and ready to land. FWIW the implementation looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115440/new/ https://reviews.llvm.org/D115440 __

[PATCH] D114421: [asan] Add support for disable_sanitizer_instrumentation attribute

2021-12-10 Thread Alexander Potapenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2b554920f11c: [asan] Add support for disable_sanitizer_instrumentation attribute (authored by glider). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114421/n

[PATCH] D114421: [asan] Add support for disable_sanitizer_instrumentation attribute

2021-12-09 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 393187. glider added a comment. Fix a windows test failure: https://buildkite.com/llvm-project/premerge-checks/builds/69318#0b873cc6-bf07-482a-ac37-e960566ac8a3 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1144

[PATCH] D114421: [asan] Add support for disable_sanitizer_instrumentation attribute

2021-12-09 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 393168. glider added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114421/new/ https://reviews.llvm.org/D114421 Files: clang/docs/AddressSanitizer.rst clang/lib/CodeGen/CodeGenFunction.cp

[PATCH] D115440: [clang][auto-init] Provide __builtin_alloca_uninitialized

2021-12-09 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. In D115440#3182585 , @melver wrote: > For completeness, also provide __builtin_alloca_with_align_uninitialized(). Please make sure to update the patch description. (You may have done already, but arc doesn't pull them automaticall

[PATCH] D115440: [clang][auto-init] Provide __builtin_alloca_uninitialized

2021-12-09 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. I second this proposal. https://reviews.llvm.org/D60548 suggests to handle this case using a pragma, but the required change seems to be more intrusive. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:3436 case Builtin::BI__builtin_alloca_with_align: {

[PATCH] D114421: [asan] Add support for disable_sanitizer_instrumentation attribute

2021-12-07 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. > Should we have in AddressSanitizer.cpp the following for consistency with > other sanitizers? Good catch, without that disable_sanitizer_instrumentation could not override sanitize_address. I fixed this and added a test. Comment at: clang/test/CodeG

[PATCH] D114421: [asan] Add support for disable_sanitizer_instrumentation attribute

2021-12-07 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 392389. glider added a comment. Updated asan-globals.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114421/new/ https://reviews.llvm.org/D114421 Files: clang/docs/AddressSanitizer.rst clang/lib/CodeGen/C

[PATCH] D114421: [asan] Add support for disable_sanitizer_instrumentation attribute

2021-12-07 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 392382. glider added a comment. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. Addressed the comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114421/new/ https://reviews.l

[PATCH] D114421: [asan] Add support for disable_sanitizer_instrumentation attribute

2021-12-02 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Given this is a minor change that only affects users of disable_sanitizer_instrumentation, I'm inclined towards landing it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114421/new/ https://reviews.llvm.org/D114421 ___

[PATCH] D114421: [asan] Add support for disable_sanitizer_instrumentation attribute

2021-11-29 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Vitaly, Evgenii, can one of you please take a look? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114421/new/ https://reviews.llvm.org/D114421 ___ cfe-commits mailing list cfe-com

[PATCH] D114421: [asan] Add support for disable_sanitizer_instrumentation attribute

2021-11-23 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added reviewers: melver, vitalybuka. glider requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For ASan this will effectively serve as a synonym for __attribute__((no_sanitize("address"))) Repository: r

[PATCH] D108555: [tsan] Do not include from sanitize-thread-disable.c

2021-08-23 Thread Alexander Potapenko 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 rGcdb391698bb2: [tsan] Do not include from sanitize-thread-disable.c (authored by glider). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D108555: [tsan] Make sanitize-thread-disable.c an X86-only test

2021-08-23 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. In D108555#2960034 , @melver wrote: > LGTM, thanks! > > Patch title ("...an X86-only test..") also needs adjustment. It's strange that Phab doesn't automatically update the title when I update the commit message. Repository:

[PATCH] D108555: [tsan] Make sanitize-thread-disable.c an X86-only test

2021-08-23 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: clang/test/CodeGen/X86/sanitize-thread-disable.c:22 int instrumented1(int *a, _Atomic int *b) { return *a + atomic_load(b); } melver wrote: > melver wrote: > > I think you do not need to use atomic_load. > > > > You

[PATCH] D108555: [tsan] Make sanitize-thread-disable.c an X86-only test

2021-08-23 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 368096. glider added a comment. Removed the header Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108555/new/ https://reviews.llvm.org/D108555 Files: clang/test/CodeGen/sanitize-thread-disable.c Index: clang

[PATCH] D108555: [tsan] Make sanitize-thread-disable.c an X86-only test

2021-08-23 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Not really sure what's the best solution here, but I think restricting the test to x86 should help. So far only ARM and PPC bots reported failures. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108555/new/ https://reviews.l

[PATCH] D108555: [tsan] Make sanitize-thread-disable.c an X86-only test

2021-08-23 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added a reviewer: melver. Herald added subscribers: pengfei, jfb, kristof.beyls. glider requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Looks like non-x86 bots are unhappy with inclusion of e.g.: clang

[PATCH] D108202: [tsan] Add support for disable_sanitizer_instrumentation attribute

2021-08-23 Thread Alexander Potapenko 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 rG8300d52e8cbf: [tsan] Add support for disable_sanitizer_instrumentation attribute (authored by glider). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D108202: [tsan] Add support for disable_sanitizer_instrumentation attribute

2021-08-23 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 368056. glider marked 5 inline comments as done. glider added a comment. Addressed Marco's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108202/new/ https://reviews.llvm.org/D108202 Files: clang/docs

[PATCH] D108465: [msan] Hotfix clang/test/CodeGen/sanitize-memory-disable.c

2021-08-20 Thread Alexander Potapenko 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 rG417a49e78e73: [msan] Hotfix clang/test/CodeGen/sanitize-memory-disable.c (authored by glider). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D108465: [msan] Hotfix clang/test/CodeGen/sanitize-memory-disable.c

2021-08-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. In D108465#2957355 , @melver wrote: > Who reported the issue? Might be worth mentioning in commit message, > otherwise it appears to come out of nowhere (although it's semi-obvious given > x86-64 is only supported). Right. Added

[PATCH] D108465: [msan] Hotfix clang/test/CodeGen/sanitize-memory-disable.c

2021-08-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 367783. glider added a comment. Updated patch description with links to bot failures. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108465/new/ https://reviews.llvm.org/D108465 Files: clang/test/CodeGen/sanit

[PATCH] D108465: [msan] Hotfix clang/test/CodeGen/sanitize-memory-disable.c

2021-08-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. TBR Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108465/new/ https://reviews.llvm.org/D108465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D108465: [msan] Hotfix clang/test/CodeGen/sanitize-memory-disable.c

2021-08-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added reviewers: eugenis, melver. Herald added a subscriber: pengfei. glider requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Because KMSAN is not supported on many architectures, explicitly build the tes

[PATCH] D108199: [msan] Add support for disable_sanitizer_instrumentation attribute

2021-08-20 Thread Alexander Potapenko 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 rG8dc7dcdca1e0: [msan] Add support for disable_sanitizer_instrumentation attribute (authored by glider). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D108199: [msan] Add support for disable_sanitizer_instrumentation attribute

2021-08-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: clang/docs/MemorySanitizer.rst:91 + +The ``disable_sanitizer_instrumentation`` attribute can be applied to a certain +function to prevent all kinds of instrumentation. This attribute overrides melver wrote: > Could apply

[PATCH] D108199: [msan] Add support for disable_sanitizer_instrumentation attribute

2021-08-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 367774. glider marked 2 inline comments as done. glider added a comment. Addressed Marco's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108199/new/ https://reviews.llvm.org/D108199 Files: clang/docs

[PATCH] D108199: [msan] Add support for disable_sanitizer_instrumentation attribute

2021-08-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 367767. glider added a comment. Updated after landing the disable_sanitizer_instrumentation to LLVM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108199/new/ https://reviews.llvm.org/D108199 Files: clang/docs

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-20 Thread Alexander Potapenko 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 rGb0391dfc737e: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute (authored by glider). Repository: rG LLVM Github Monorepo

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. In D108029#2954604 , @glider wrote: > In D108029#2954566 , @melver wrote: > >> llvm/docs/LangRef.rst also needs a corresponding change. > > Right, will do. I thought LangRef was missing the

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-20 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 367759. glider added a comment. Updated LangRef.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108029/new/ https://reviews.llvm.org/D108029 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Ba

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-19 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. In D108029#2954566 , @melver wrote: > llvm/docs/LangRef.rst also needs a corresponding change. Right, will do. I thought LangRef was missing the sanitizer bits as well, and was planning to add them together, but apparently I was

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-19 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 367480. glider added a comment. Updated BitcodeReader.cpp and several tests per Marco's suggestion Renamed ATTR_DISABLE_SANITIZER_INSTRUMENTATION to ATTR_KIND_DISABLE_SANITIZER_INSTRUMENTATION Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-19 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: llvm/include/llvm/Bitcode/LLVMBitCodes.h:674 ATTR_KIND_ELEMENTTYPE = 77, + ATTR_DISABLE_SANITIZER_INSTRUMENTATION = 78, }; Missing "_KIND_" Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-17 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: llvm/include/llvm/IR/Attributes.td:90 +/// Do not instrument function with sanitizers. +def DisableSanitizerInstrumentation: EnumAttr<"disable_sanitizer_instrumentation", [FnAttr]>; + melver wrote: > There's this long-ta

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-17 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 366887. glider added a comment. Fix the docs Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108029/new/ https://reviews.llvm.org/D108029 Files: clang/include/clang/Basic/Attr.td clang/include/clang/Basic/Att

[PATCH] D108202: [tsan] Add support for disable_sanitizer_instrumentation attribute

2021-08-17 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added a reviewer: melver. Herald added subscribers: jfb, hiraditya. glider requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Unlike __attribute__((no_sanitize("thread"))), this one will c

[PATCH] D108199: [msan] Add support for disable_sanitizer_instrumentation attribute

2021-08-17 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added reviewers: eugenis, melver. Herald added a subscriber: hiraditya. glider requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Unlike __attribute__((no_sanitize("memory"))), this one wi

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-17 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2945 + let Spellings = [Clang<"disable_sanitizer_instrumentation">]; + let Subjects = SubjectList<[Function]>; + let Documentation = [DisableSanitizerInstrumentationDocs]; aaron.ballma

[PATCH] D108029: [clang][Codegen] Introduce the disable_sanitizer_instrumentation attribute

2021-08-17 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 366845. glider added a comment. Address Aaron's comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108029/new/ https://reviews.llvm.org/D108029 Files: clang/include/clang/Basic/Attr.td clang/include/cla

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-16 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 366591. glider added a comment. Updated patch description Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108029/new/ https://reviews.llvm.org/D108029 Files: clang/include/clang/Basic/Attr.td clang/include/cl

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-16 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a subscriber: krytarowski. glider marked 2 inline comments as done. glider added a comment. +krytarowski FYI Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108029/new/ https://reviews.llvm.org/D108029 __

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-16 Thread Alexander Potapenko via Phabricator via cfe-commits
glider marked 2 inline comments as done. glider added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:2601-2602 + +This is not the same as ``__attribute__((no_sanitize(...)))``, which depending +on the tool may still insert instrumentation to prevent false posi

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-16 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 366570. glider added a comment. Renamed no_sanitizer_instrumentation to disable_sanitizer_instrumentation Added bitcode attribute declaration and missing handling of the new attribute in switches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:2601-2602 + +This is not the same as ``__attribute__((no_sanitize(...)))``, which depending +on the tool may still insert instrumentation to prevent false positive reports. + }]; aar

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 366256. glider added a comment. Added a comment to clang/lib/CodeGen/CodeGenFunction.h Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108029/new/ https://reviews.llvm.org/D108029 Files: clang/include/clang/Bas

[PATCH] D108029: [clang][Codegen] Introduce the no_sanitizer_instrumentation attribute

2021-08-13 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added reviewers: eugenis, melver, browneee, dvyukov. Herald added subscribers: ormris, dexonsmith, jdoerfert, steven_wu, hiraditya. Herald added a reviewer: aaron.ballman. glider requested review of this revision. Herald added projects: clang, LLVM. Herald added

[PATCH] D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2]

2020-06-10 Thread Alexander Potapenko via Phabricator via cfe-commits
glider accepted this revision. glider added a comment. This revision is now accepted and ready to land. LGTM assuming allyesconfig builds. Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:759 // do globals-gc. -UseCtorComdat(UseGlobalsGC &&

[PATCH] D81390: [KernelAddressSanitizer] Make globals constructors compatible with kernel [v2]

2020-06-09 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: clang/test/CodeGen/asan-globals.cpp:16 +int aliased_global; +extern int __attribute__((alias("aliased_global"))) __global_alias; +int __special_global; Need a comment explaining this case a bit. Comment

[PATCH] D80805: [KernelAddressSanitizer] Make globals constructors compatible with kernel

2020-06-05 Thread Alexander Potapenko via Phabricator via cfe-commits
glider accepted this revision. glider 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/D80805/new/ https://reviews.llvm.org/D80805 ___

[PATCH] D80668: [Clang][Sanitizers] Expect test failure on {arm,thumb}v7

2020-05-28 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: clang/test/CodeGen/sanitize-coverage.c:8 +// +// XFAIL: armv7, thumbv7 Is there a Bugzilla entry for this? Please add a link to the code and to the patch description. Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D64742: Allow using -ftrivial-auto-var-init=zero in C mode without extra flags

2019-10-23 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. In D64742#1717054 , @mehdi_amini wrote: > In D64742#1606244 , @glider wrote: > > > As a data point, Linus Torvalds suggested that we need a similar feature > > for GCC so that the "kernel C

[PATCH] D64742: Allow using -ftrivial-auto-var-init=zero in C mode without extra flags

2019-10-21 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added subscribers: rsmith, dvyukov, dblaikie, arthur.j.odwyer, fwyzard, kristina, mehdi_amini, troyj. glider added a comment. Adding more people from the original discussion. Folks, we're now stuck in a situation where there's a potential buy-in from the Linux kernel community for stack

[PATCH] D66948: [CodeGen]: fix error message for "=r" asm constraint

2019-08-30 Thread Alexander Potapenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370444: [CodeGen]: fix error message for "=r" asm constraint (authored by glider, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D66948: [CodeGen]: fix error message for "=r" asm constraint

2019-08-30 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 218037. glider added a comment. Minor comment fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66948/new/ https://reviews.llvm.org/D66948 Files: clang/lib/CodeGen/CGStmt.cpp clang/test/CodeGen/x86_64-PR42

[PATCH] D66948: [CodeGen]: fix error message for "=r" asm constraint

2019-08-29 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 217887. glider added a comment. clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66948/new/ https://reviews.llvm.org/D66948 Files: clang/lib/CodeGen/CGStmt.cpp clang/test/CodeGen/x86_64-PR42672.c

[PATCH] D66948: [CodeGen]: fix error message for "=r" asm constraint

2019-08-29 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. glider added reviewers: eli.friedman, thakis. Herald added a project: clang. Herald added a subscriber: cfe-commits. Nico Weber reported that the following code: char buf[9]; asm("" : "=r" (buf)); yields the "impossible constraint in asm: can't store struct into

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-08-29 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Landed r370335, thank you! Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65234/new/ https://reviews.llvm.org/D65234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-08-29 Thread Alexander Potapenko via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL370335: [CodeGen]: don't treat structures returned in registers as memory inputs (authored by glider, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior t

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-08-29 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 217831. glider added a comment. Rebased the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65234/new/ https://reviews.llvm.org/D65234 Files: clang/lib/CodeGen/CGStmt.cpp clang/test/CodeGen/asm-attrs.c

[PATCH] D61879: WIP: Prototype of DSE optimizations for -ftrivial-auto-var-init

2019-08-26 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. In D61879#1621423 , @vitalybuka wrote: > Fix https://godbolt.org/z/-PinQP Please consider adding a test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61879/new/ https://reviews.ll

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-08-07 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 213920. glider added a comment. Added test cases for =x, replaced grep with not Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65234/new/ https://reviews.llvm.org/D65234 Files: clang/lib/CodeGen/CGStmt.cpp c

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-08-07 Thread Alexander Potapenko via Phabricator via cfe-commits
glider marked an inline comment as done. glider added a comment. In D65234#1615649 , @efriedma wrote: > For the "=x" thing I was talking about, try the following testcase: > > void a() { struct S { unsigned x[4]; } z; asm volatile("%0":"=x"(z)); } > vo

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-08-05 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Eli, any other comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65234/new/ https://reviews.llvm.org/D65234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[PATCH] D64742: Allow using -ftrivial-auto-var-init=zero in C mode without extra flags

2019-07-30 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. As a data point, Linus Torvalds suggested that we need a similar feature for GCC so that the "kernel C standard" mandates zero-initialization for locals: https://lkml.org/lkml/2019/7/28/206 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://revie

[PATCH] D61879: WIP: Prototype of DSE optimizations for -ftrivial-auto-var-init

2019-07-30 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Vitaly, what's the current status of these patches? What's your plan on submitting them? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61879/new/ https://reviews.llvm.org/D61879 __

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-07-30 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. +srhines Heads up: this patch reduces the size of the following Android kernel functions: _raw_spin_lock and _raw_spin_lock_bh: 132 bytes->68 bytes _raw_spin_lock_irq: 136 bytes->72 bytes _raw_spin_lock_irqsave: 144 bytes->80 bytes _raw_spin_trylock: 156 bytes->112

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-07-30 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 212293. glider added a comment. Test for =X somehow sneaked in - drop it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65234/new/ https://reviews.llvm.org/D65234 Files: clang/lib/CodeGen/CGStmt.cpp clang/t

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-07-29 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 212164. glider added a comment. Addressed Eli's comments, added a test for a packed struct Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65234/new/ https://reviews.llvm.org/D65234 Files: clang/lib/CodeGen/CGS

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-07-29 Thread Alexander Potapenko via Phabricator via cfe-commits
glider marked 3 inline comments as done. glider added inline comments. Comment at: clang/test/CodeGen/PR42672.c:50 + struct { +long long int v1, v2, v3, v4; + } str; efriedma wrote: > glider wrote: > > The acceptable size actually depends on the target plat

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-07-26 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 211920. glider added a comment. Make big_struct() test triple-specific Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65234/new/ https://reviews.llvm.org/D65234 Files: clang/lib/CodeGen/CGStmt.cpp clang/test

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-07-26 Thread Alexander Potapenko via Phabricator via cfe-commits
glider updated this revision to Diff 211919. glider marked 2 inline comments as done. glider added a comment. Fixed comments from Eli and Nick, added tests for unusual struct sizes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65234/new/ https://re

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-07-26 Thread Alexander Potapenko via Phabricator via cfe-commits
glider marked 2 inline comments as done. glider added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:1989 std::vector Args; + std::vector ResultTypeRequiresCast; nickdesaulniers wrote: > Are we able to use something other than `std::vector` here

[PATCH] D65234: [CodeGen]: don't treat structures returned in registers as memory inputs

2019-07-24 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. glider added reviewers: eli.friedman, jyknight. glider added a subscriber: vitalybuka. The "=r" output constraint for a structure variable passed to inline asm shouldn't be converted to "=*r", as t

[PATCH] D61879: WIP: Prototype of DSE optimizations for -ftrivial-auto-var-init

2019-07-16 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: llvm/lib/Transforms/Scalar/DeadStoreEliminationExpGlobal.cpp:27 +static const char GlobalArgumentMemAccess[] = { +// grep -P -o "(?<=FUNCTION_INFO: ).*" | sort -u > +// ../llvm-project/llvm/lib/Transforms/Scalar/DeadStoreEliminationExpD

[PATCH] D64742: Allow using -ftrivial-auto-var-init=zero in C mode without extra flags

2019-07-15 Thread Alexander Potapenko via Phabricator via cfe-commits
glider created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Initially concerns have been raised that -ftrivial-auto-var-init=zero potentially defines a new dialect of C++, therefore this option was guarded with -enable-trivial-auto-var-init-zero-knowing-it-

[PATCH] D61879: WIP: Prototype of DSE optimizations for -ftrivial-auto-var-init

2019-07-05 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: llvm/lib/Transforms/Scalar/DeadStoreEliminationExp.cpp:556 + LocationSize LS = MemoryLocation::getForDest(MSI).Size; + ConstantRange Range(PointerSizeInBits, false); + if (!LS.isPrecise() || An assertion fi

[PATCH] D61879: WIP: Prototype of DSE optimizations for -ftrivial-auto-var-init

2019-07-05 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: llvm/lib/Transforms/Scalar/DeadStoreEliminationExp.cpp:709 + size_t argN) { + const Function *F = cast(Callee); + if (argN >= F->arg_size()) This cast fails in the following case: ``` %21 = call i64 @

[PATCH] D61879: WIP: Prototype of DSE optimizations for -ftrivial-auto-var-init

2019-07-03 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: llvm/lib/Transforms/Scalar/DeadStoreEliminationExpGlobal.cpp:20 + +static const GlobalValue::GUID GUIDS_LOOKUP[] = { +// grep -P -o "(?<=LOOKUP_FN: ).*" | sort -u > error: zero-size array ‘llvm::GUIDS_LOOKUP’ Can you p

[PATCH] D61879: WIP: Prototype of DSE optimizations for -ftrivial-auto-var-init

2019-07-03 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Vitaly, can you please rebase the patch? As far as I can see, you've submitted parts of it already. (not that I can't resolve the conflicts locally, but keeping it up-to-date may save others some time) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D61664: [NewPM] Setup Passes for KASan and KMSan

2019-05-08 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. Rubberstamp LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61664/new/ https://reviews.llvm.org/D61664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[PATCH] D58885: Variable auto-init: split out small arrays

2019-03-04 Thread Alexander Potapenko via Phabricator via cfe-commits
glider accepted this revision. glider added inline comments. This revision is now accepted and ready to land. Comment at: lib/CodeGen/CGDecl.cpp:1206 + bool canDoSingleStore = Ty->isIntOrIntVectorTy() || + Ty->isPtrOrPtrVectorTy() || Ty->isFPOrFPVectorTy

[PATCH] D58885: Variable auto-init: split out small arrays

2019-03-04 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added a comment. The change itself looks good. It doesn't seem to regress kernel performance on ARM64. I haven't got to testing on x86 yet, but don't anticipate any problems either. Comment at: lib/CodeGen/CGDecl.cpp:1206 + bool canDoSingleStore = Ty->isIntOrIntVectorT

[PATCH] D58885: Variable auto-init: split out small arrays

2019-03-04 Thread Alexander Potapenko via Phabricator via cfe-commits
glider added inline comments. Comment at: test/CodeGenCXX/auto-var-init.cpp:1025 // PATTERN-LABEL: @test_intptr4_uninit() -// PATTERN: call void @llvm.memcpy{{.*}} @__const.test_intptr4_uninit.uninit -// ZERO-LABEL: @test_intptr4_uninit() -// ZERO: call void @llvm.memset{{.*}},

[PATCH] D57898: CodeGen: Fix PR40605 by splitting constant struct initializers

2019-03-01 Thread Alexander Potapenko via Phabricator via cfe-commits
glider closed this revision. glider added a comment. Landed r355181, thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57898/new/ https://reviews.llvm.org/D57898 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

  1   2   >