[PATCH] D85788: [Clang test] Update to allow passing extra default clang arguments in use_clang

2020-10-16 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. Did we decide that we wanted this change then? I remember there being discussion around whether it's the right approach. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85788/new/ https://reviews.llvm.org/D85788

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-08-24 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. Herald added a subscriber: wenlei. @rjmccall We've discussed several different possibilities here. Does any of them strike you as a good step forward here? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82317/new/

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Gui Andrade via Phabricator via cfe-commits
guiand added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3573 + case LibFunc_atomic_load: +if (!isa(CB)) { + llvm::errs() << "MSAN -- cannot instrument invoke of libatomic load." eugenis wrote: >

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Gui Andrade via Phabricator via cfe-commits
guiand closed this revision. guiand added a comment. Committed as 97de0188dd5d845ff90c8ac779a2ea09688b17df Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-07-15 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 277992. guiand added a comment. Update tests again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82317/new/ https://reviews.llvm.org/D82317 Files: clang/test/ARCMT/objcmt-instancetype.m

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-29 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 281676. guiand added a comment. Addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-29 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 281679. guiand added a comment. Updated comment on disable-noundef-args option Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files:

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-29 Thread Gui Andrade via Phabricator via cfe-commits
guiand marked 5 inline comments as done. guiand added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2148-2150 +} else if (const VarDecl *VDecl = dyn_cast(TargetDecl)) { + // Function pointer + HasStrictReturn &= !VDecl->isExternC();

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-08-01 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 282328. guiand added a comment. Rebased; all tests passing again. Removed the change to the `ppc-*mmintrin.c` tests, instead I just use the -disable-noundef-args flag`. Cleaned up typos. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. Most of the discussion has been in https://reviews.llvm.org/D81678 (implementing the attribute in clang) and https://reviews.llvm.org/D82316 (adding the attribute to langref). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. In D82317#2200809 , @jrtc27 wrote: > At the very least, make whatever script you used to update these public, as I > don't want to have to recreate it from scratch when merging this in. I had > enough "fun" with the LLD

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. In D82317#2200789 , @rjmccall wrote: > Are you seriously adding an attribute to literally every argument and return > value? Why is this the right representation? This adds an attribute to every argument and return value where

[PATCH] D85573: [CGAtomic] Mark atomic libcall functions `nounwind`

2020-08-11 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284922. guiand added a comment. Added `willreturn`. I think `nocapture` is probably best left to a future change since it's more invasive -- it would require keeping tabs of which arguments to each function is a pointer arg. Repository: rG LLVM Github

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-08-11 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284907. guiand added a comment. Herald added a subscriber: delcypher. To try to alleviate the tests issue, @eugenis and I discussed that it might be best to take it slow. So now this patch will mask off emitting the attribute on clang tests by default.

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-08-11 Thread Gui Andrade via Phabricator via cfe-commits
guiand requested review of this revision. guiand added a comment. I think I'd like someone to take a look at the `llvm-lit` changes to see if this makes sense as an approach Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-08-11 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. After discussing with @eugenis, for the meantime it might be best to do the following: - Change the masking attribute to be `-fdisable-noundef-analysis` (name notwithstanding), and have it completely turn off all `noundef`s - Change the llvm-lit configuration to use the

[PATCH] D85573: [CGAtomic] Mark atomic libcall functions `nounwind`

2020-08-10 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. I don't think we can necessarily guarantee `argmemonly/readonly/writeonly`, particularly since these library calls can take a lock somewhere inside. I'll definitely add `nocapture` and `willreturn` though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-08-12 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284931. guiand added a comment. Made the compiler flag non-public Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284079. guiand added a comment. Rebased on master Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/ https://reviews.llvm.org/D85559 Files: clang/lib/CodeGen/CGAtomic.cpp

[PATCH] D85573: [CGAtomic] Mark atomic libcall functions `nounwind`

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand created this revision. guiand added reviewers: rsmith, eugenis. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. guiand requested review of this revision. These functions won't ever unwind. This is useful for MemorySanitizer as it simplifies handling

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284102. guiand removed a reviewer: rsmith. guiand added a comment. Separated out the frontend change. Addressed other comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand marked 2 inline comments as done. guiand added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3513 +assert(InsPoint); +if (!InsPoint) { + return; TODO: Remove this redudant call Repository: rG LLVM

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284080. guiand added a comment. Rebased on master (again) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/ https://reviews.llvm.org/D85559 Files: clang/lib/CodeGen/CGAtomic.cpp

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-07 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 284076. guiand edited the summary of this revision. guiand added a reviewer: rsmith. guiand added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Simplified by returning to the old implementation, but having libatomic calls

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-08-12 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. In D82317#2212145 , @jdoerfert wrote: > TBH, I don't see how this solves any problem. It just makes it a problem for > someone in the future... (FWIW, I say this being in full support of `noundef`) That's true. At the same time,

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-06-29 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. I've run across an issue when bootstrapping clang, that manifests itself in the following code when compiled with optimizations: #include float my_exp2(float a) { return pow(2.0, a); } With this code, the call to `pow` is lifted to a `exp2`, and then the

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-02 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 274895. guiand added a comment. Addressed comments, added test for indirect calls Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files:

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-08 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 276487. guiand added a comment. Per @nikic's suggestion, I isolated the LLVM side of the changes to a separate revision D83412 , which should be good to go. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-07-06 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 275771. guiand added a comment. Another wave of test updates Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82317/new/ https://reviews.llvm.org/D82317 Files: clang/test/ARCMT/objcmt-instancetype.m

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-14 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. Herald added a subscriber: dang. Is anything still pending here (besides the tests, of course)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678

[PATCH] D81678: Introduce partialinit attribute at call sites for stricter poison analysis

2020-06-17 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. In D81678#2097081 , @aqjune wrote: > To minimize diff, what about additionally introducing a function-level > attribute such as `args_frozen` stating that all arguments are frozen. (e.g > `define void @f(i32 x, i32 y)

[PATCH] D81678: Introduce partialinit attribute at call sites for stricter poison analysis

2020-06-18 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. Adding the function attribute turns out to have other challenges. Specifically, we don't want to have transforms remove a `frozen` from a parameter and then have to go through and update all the other parameters. This might happen if the function is marked with

[PATCH] D81678: Introduce partialinit attribute at call sites for stricter poison analysis

2020-06-18 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. In an email conversation with @rsmith and @eugenis, they raised the issue that it's not necessarily wrong to pass aggregate types by value, even when some fields are uninit. A relevant excerpt from Richard: > In addition to the union case, there's another strange case

[PATCH] D81678: Introduce frozen attribute at call sites for stricter poison analysis

2020-06-22 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. I've added the test change to yet another diff, which you can find here: https://reviews.llvm.org/D82317 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678

[PATCH] D82317: [Clang/Test]: Update tests where `frozen` attribute is necessary

2020-06-22 Thread Gui Andrade via Phabricator via cfe-commits
guiand created this revision. Herald added subscribers: cfe-commits, sstefan1, phosek, kerbowa, luismarques, apazos, sameer.abuasal, pzheng, s.egerton, lenary, dmgreen, Jim, mstorsjo, jocewei, PkmX, jfb, arphaman, the_o, brucehoult, MartinMosbeck, rogfer01, atanasyan, edward-jones, zzheng,

[PATCH] D81678: Introduce frozen attribute at call sites for stricter poison analysis

2020-06-22 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 272489. guiand added a comment. I've updated this patch to only include the actual implementation of `frozen`, for easier review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/

[PATCH] D81678: Introduce frozen attribute at call sites for stricter poison analysis

2020-06-22 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. @jdoerfert I've separated out changes to the language reference to https://reviews.llvm.org/D82316 as you suggested. I kept the name `frozen` for now while we reach a consensus regarding its final name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81678: Introduce frozen attribute at call sites for stricter poison analysis

2020-06-23 Thread Gui Andrade via Phabricator via cfe-commits
guiand marked 2 inline comments as done. guiand added inline comments. Comment at: clang/include/clang/Driver/CC1Options.td:507 +def disable_frozen_args : Flag<["-"], "disable-frozen-args">, + HelpText<"Disable emitting frozen attribute in LLVM IR">; def load : Separate<["-"],

[PATCH] D82398: [MSAN] Handle x86 {round,min,max}sd intrinsics

2020-06-23 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 272776. guiand added a comment. Ran clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82398/new/ https://reviews.llvm.org/D82398 Files: clang/test/CodeGen/msan-intrinsics.c

[PATCH] D82398: [MSAN] Handle x86 {round,min,max}sd intrinsics

2020-06-23 Thread Gui Andrade via Phabricator via cfe-commits
guiand created this revision. guiand added a reviewer: eugenis. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. guiand updated this revision to Diff 272776. guiand added a comment. Ran clang-format These need special handling over the simple

[PATCH] D82398: [MSAN] Handle x86 {round,min,max}sd intrinsics

2020-06-23 Thread Gui Andrade via Phabricator via cfe-commits
guiand marked 4 inline comments as done. guiand added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3331 + // case Intrinsic::x86_avx512_mask_sub_sd_round: + // case Intrinsic::x86_avx512_mask_mul_sd_round: + // case

[PATCH] D82398: [MSAN] Handle x86 {round,min,max}sd intrinsics

2020-06-23 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 272855. guiand added a comment. Addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82398/new/ https://reviews.llvm.org/D82398 Files: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

[PATCH] D81678: Introduce frozen attribute at call sites for stricter poison analysis

2020-06-25 Thread Gui Andrade via Phabricator via cfe-commits
guiand marked an inline comment as done. guiand added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2082 + const Type *RetTyPtr = RetTy.getTypePtr(); + if (!RetTy->isVoidType() && !RetTyPtr->isRecordType() && + RetAI.getKind() != ABIArgInfo::Indirect) {

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-06-25 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 273456. guiand retitled this revision from "Introduce frozen attribute at call sites for stricter poison analysis" to "Introduce noundef attribute at call sites for stricter poison analysis". guiand edited the summary of this revision. guiand added a comment.

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-06-25 Thread Gui Andrade via Phabricator via cfe-commits
guiand marked an inline comment as done. guiand added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2082 + const Type *RetTyPtr = RetTy.getTypePtr(); + if (!RetTy->isVoidType() && !RetTyPtr->isRecordType() && + RetAI.getKind() != ABIArgInfo::Indirect) {

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-06-26 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 273570. guiand retitled this revision from "[Clang/Test]: Update tests where `frozen` attribute is necessary" to "[Clang/Test]: Update tests where `noundef` attribute is necessary". guiand edited the summary of this revision. guiand added a comment. Herald

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-06-26 Thread Gui Andrade via Phabricator via cfe-commits
guiand marked an inline comment as done. guiand added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2082 + const Type *RetTyPtr = RetTy.getTypePtr(); + if (!RetTy->isVoidType() && !RetTyPtr->isRecordType() && + RetAI.getKind() != ABIArgInfo::Indirect) {

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-06-26 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 273558. guiand added a comment. Made DetermineNoUndef more robust Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D82398: [MSAN] Handle x86 {round,min,max}sd intrinsics

2020-06-27 Thread Gui Andrade via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. guiand marked an inline comment as done. Closed by commit rGeae84b41fe8e: [MSAN] Handle x86 {round,min,max}sd intrinsics (authored by guiand). Changed prior to commit: https://reviews.llvm.org/D82398?vs=272855=273883#toc

[PATCH] D81678: Introduce frozen attribute at call sites for stricter poison analysis

2020-06-20 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 272213. guiand retitled this revision from "Introduce partialinit attribute at call sites for stricter poison analysis" to "Introduce frozen attribute at call sites for stricter poison analysis". guiand edited the summary of this revision. guiand added a

[PATCH] D82398: [MSAN] Handle x86 {round,min,max}sd intrinsics

2020-06-23 Thread Gui Andrade via Phabricator via cfe-commits
guiand marked an inline comment as done. guiand added inline comments. Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3077 +Value *LowShadow = IRB.CreateOr(LowA, LowB); +Value *Shadow = IRB.CreateInsertElement(Second, LowShadow, IRB.getInt32(0)); +

[PATCH] D82398: [MSAN] Handle x86 {round,min,max}sd intrinsics

2020-06-23 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 272842. guiand added a comment. Use shufflevector, move test over to IR Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82398/new/ https://reviews.llvm.org/D82398 Files:

[PATCH] D81703: [Clang] Don't leave Expr::Classification fields uninitialized in default constructor

2020-06-11 Thread Gui Andrade via Phabricator via cfe-commits
guiand created this revision. guiand added a reviewer: rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. guiand edited the summary of this revision. This changes `Expr::Classification::{Kind, Modifiable}` fields so that they are initialized as `Unknown` rather than

[PATCH] D81678: Introduce partialinit attribute at call sites for stricter poison analysis

2020-06-12 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. As it stands, this attribute is applied whether or not msan is enabled, specifically because we think it can be useful in other contexts. As for the negativity of this attribute, it's true that it would be more intuitive to have it be something like `fullinit` instead.

[PATCH] D81678: Introduce partialinit attribute at call sites for stricter poison analysis

2020-06-12 Thread Gui Andrade via Phabricator via cfe-commits
guiand added inline comments. Comment at: clang/include/clang/AST/Type.h:2139-2141 + /// Check if this type has only two possible values, and so may be lowered to + /// a bool. + bool hasBooleanRepresentation() const; rsmith wrote: > This seems like a

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-23 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 279949. guiand added a comment. Adds additional constraints on `noundef`: Not a `nullptr_t`, not a member pointer, and not coerced to a type of larger size. Disabled emitting in return position for non-C++ languages (or inside extern "C"). @rsmith, I just

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-23 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. Just saw your comment about tests as well. The idea was to have all tests ported over as part of a separate commit (I linked it in the main patch description) and then only to push either commit once both are ready to land. To make it easier to be sure this specific

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-07-25 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 280588. guiand added a comment. Update tests to reflect more strict noundef rules Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82317/new/ https://reviews.llvm.org/D82317 Files:

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-25 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 280622. guiand added a comment. Added an across-the-board test with several different interesting cases. @rsmith, I'm not sure how to test things like VTables/VTTs, since afaik the way they would be exposed to function attributes would be if a struct is

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-28 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 281311. guiand added a comment. Incorporate C++'s more conservative checks for omitted return values Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files:

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-28 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 281323. guiand edited the summary of this revision. guiand added a comment. Fixes regression; allows emitting noundef for non-FunctionDecls as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-29 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 281345. guiand added a comment. Fix typo in MayDropFunctionReturn Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-07-29 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 281452. guiand added a comment. All tests up to date. Of particular note are the `ppc-*mmintrin.c` tests, which seemed to drastically change upon rerunning the test autogen script. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2020-07-30 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. @jdoerfert what would the procedure be for reviewing these test changes / getting this landed with the noundef patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D82317/new/ https://reviews.llvm.org/D82317

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-18 Thread Gui Andrade via Phabricator via cfe-commits
guiand closed this revision. guiand added a comment. Merged in https://reviews.llvm.org/rG780528d9da707b15849d6c9711cc3ab19f6c7f00 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2020-07-18 Thread Gui Andrade via Phabricator via cfe-commits
guiand reopened this revision. guiand added a comment. This revision is now accepted and ready to land. Sorry, closed this mistakenly! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678

[PATCH] D85573: [CGAtomic] Mark atomic libcall functions `nounwind`

2020-08-14 Thread Gui Andrade via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG909a851dbffe: [CGAtomic] Mark atomic libcall functions `nounwind` (authored by guiand). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85573/new/

[PATCH] D85559: [MSAN] Reintroduce libatomic load/store instrumentation

2020-08-14 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 285572. guiand added a comment. Addressed comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85559/new/ https://reviews.llvm.org/D85559 Files: compiler-rt/test/msan/libatomic.c

[PATCH] D85788: [Clang test] Update to allow passing extra default clang arguments in use_clang

2020-12-09 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. This whole thing is a little unfortunate, but maybe a better substitution would be leaving `%clang` as referring to the pure clang binary, with default arguments. Then we can have a `%clang_cc` which may only be used for a standard C compiler invocation. Returning to

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2021-02-05 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. Changing the mechanism to explicit opt-in seems like a good idea, and bypasses the test issues. If everyone agrees about proceeding with this, I can fix up this patch within the next couple days and we can hopefully wrap this up! Repository: rG LLVM Github Monorepo

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2021-02-11 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 322899. guiand added a comment. Updated to use -enable-noundef-analysis Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files:

[PATCH] D82317: [Clang/Test]: Update tests where `noundef` attribute is necessary

2021-04-06 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. Sorry, I must've missed this. @aqjune, if you'd be willing to take on this change, that would be amazing (I haven't got much time to update these patches lately). We can make these changes incrementally, too; say, one test subfolder at a time. Each patch could add the

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2021-03-02 Thread Gui Andrade via Phabricator via cfe-commits
guiand added a comment. For sure. I'll upload a rebased patch shortly and give it another day or so for people to look, and then push if there aren't any issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2021-03-04 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 328055. guiand added a comment. Reupload patch to trigger build Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files: clang/include/clang/Basic/CodeGenOptions.def

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2021-03-04 Thread Gui Andrade via Phabricator via cfe-commits
guiand updated this revision to Diff 328060. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81678/new/ https://reviews.llvm.org/D81678 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/clang/Driver/Options.td

[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis

2021-03-05 Thread Gui Andrade via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG10264a1b21ae: Introduce noundef attribute at call sites for stricter poison analysis (authored by guiand). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D85788: [Clang test] Update to allow passing extra default clang arguments in use_clang

2021-03-05 Thread Gui Andrade via Phabricator via cfe-commits
guiand abandoned this revision. guiand added a comment. We decided to go with a positive flag for enabling noundef, so I'm closing this. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85788/new/ https://reviews.llvm.org/D85788