[PATCH] D63846: [clang] Preserve names of addrspacecast'ed values.

2019-07-08 Thread Vyacheslav Zakharin via Phabricator via cfe-commits
vzakhari updated this revision to Diff 208564. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63846/new/ https://reviews.llvm.org/D63846 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGenCUDA/builtins-amdgcn.cu clang/test/CodeGenOpenCL/address-spaces-conversions.cl clang/t

[PATCH] D63846: [clang] Preserve names of addrspacecast'ed values.

2019-07-08 Thread Vyacheslav Zakharin via Phabricator via cfe-commits
vzakhari added a comment. I changed the tests to use FileCheck variables whenever possible. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63846/new/ https://reviews.llvm.org/D63846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked 2 inline comments as done. MaskRay added inline comments. Comment at: lib/Driver/SanitizerArgs.cpp:27-30 static const SanitizerMask NeedsUbsanRt = SanitizerKind::Undefined | SanitizerKind::Integer | SanitizerKind::ImplicitConversion | SanitizerKind::Null

[PATCH] D64317: [Driver] Add float-divide-by-zero back to supported sanitizers after D63793/rC365272

2019-07-08 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay marked an inline comment as done. MaskRay added inline comments. Comment at: test/Driver/fsanitize-blacklist.c:32 // RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DEFAULT-

[PATCH] D64356: [OPENMP]Initial fix PR42392: Improve -Wuninitialized warnings for OpenMP programs.

2019-07-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/Analysis/CFG.cpp:4746-4750 + D->for_each_used_expr([this, &B](Expr *E) { +assert(E && "Expected expression."); +if (CFGBlock *R = Visit(E)) + B = R; + }); ABataev wrote: > NoQ wrote: > > Not sure, are thes

[PATCH] D64356: [OPENMP]Initial fix PR42392: Improve -Wuninitialized warnings for OpenMP programs.

2019-07-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a subscriber: rsmith. NoQ added a comment. Ok, so i think i more or less understand where this is going and i like it! My only concern about making sure that used-expressions don't appear in both CFGs; and, even then, it's likely that i'm wrong. +@rsmith just in case he has any immedi

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added a comment. Thanks! My mind was really set to actually model these with `classof()`, whoops. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:25-27 + using CastCheck = + std::function; NoQ wrote: > Kinda nice, but a simple

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208573. Charusso marked 12 inline comments as done. Charusso added a comment. - Fix - New `getNoteTag()` which accepts a plain note. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/cl

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208574. Charusso added a comment. - Fix a typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/include/clang/StaticAnalyzer/Core/Pat

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added a subscriber: rnkovacs. NoQ added a comment. We should add at least some tests for the other three functions. Comment at: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td:278 +def CastValueChecker : Checker<"CastValue">, + HelpText<"Model casts">, + Documenta

Re: [libunwind] r364217 - Merging r360861:

2019-07-08 Thread Tom Stellard via cfe-commits
On 07/08/2019 11:51 AM, Dimitry Andric wrote: > On 24 Jun 2019, at 20:40, Tom Stellard via cfe-commits > wrote: >> >> Author: tstellar >> Date: Mon Jun 24 11:40:58 2019 >> New Revision: 364217 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=364217&view=rev >> Log: >> Merging r360861: >> >> ---

[PATCH] D63846: [clang] Preserve names of addrspacecast'ed values.

2019-07-08 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63846/new/ https://reviews.llvm.org/D63846 ___ cfe-commits mailing list cfe-co

[PATCH] D63638: [clang][NewPM] Add new pass manager RUN lines to avx512f-builtins.c

2019-07-08 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a comment. In D63638#1574927 , @craig.topper wrote: > What if we just only check the output from the new pass manager. I don't > think I care about the differences between the two. +1 CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D64382: Use getMostFrequentByte to decide if should used memset+stores

2019-07-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 208583. vitalybuka added a comment. Reverted debug logging Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64382/new/ https://reviews.llvm.org/D64382 Files: clang/lib/CodeGen/CGDecl.cpp Index: clang/lib/Co

[PATCH] D64305: [clangd] Add path mappings functionality

2019-07-08 Thread William Wagner via Phabricator via cfe-commits
wwagner19 marked 9 inline comments as done. wwagner19 added a comment. Thanks for all the feedback, Sam! I'll try and get an updated patch up sometime tomorrow. Comment at: clang-tools-extra/clangd/PathMapping.cpp:30 + const auto &K = V.kind(); + if (K == Kind::Object) { +

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208586. Charusso marked 9 inline comments as done. Charusso added a comment. - Fix. - More tests. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/clang/StaticAnalyzer/Checkers/Checker

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:61 + + return Ty.getAsString(); +} NoQ wrote: > Use after free! `QualType::getAsString()` returns a temporary `std::string`. > You're returning a `StringRef` that

[PATCH] D64374: [analyzer] CastValueChecker: Model casts

2019-07-08 Thread Csaba Dabis via Phabricator via cfe-commits
Charusso updated this revision to Diff 208588. Charusso added a comment. - Simplify the new `getNoteTag()`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64374/new/ https://reviews.llvm.org/D64374 Files: clang/include/clang/StaticAnalyzer/Checkers/Checkers.td clang/include/clang/St

r365435 - [BPF] Preserve debuginfo array/union/struct type/access index

2019-07-08 Thread Yonghong Song via cfe-commits
Author: yhs Date: Mon Jul 8 21:04:21 2019 New Revision: 365435 URL: http://llvm.org/viewvc/llvm-project?rev=365435&view=rev Log: [BPF] Preserve debuginfo array/union/struct type/access index For background of BPF CO-RE project, please refer to http://vger.kernel.org/bpfconf2019.html In summary

[PATCH] D64278: Rename libclang_shared to libclang-cpp

2019-07-08 Thread Tom Stellard via Phabricator via cfe-commits
tstellar added a comment. I'm fine with this new name. Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64278/new/ https://reviews.llvm.org/D64278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

r365436 - Revert "[BPF] Preserve debuginfo array/union/struct type/access index"

2019-07-08 Thread Yonghong Song via cfe-commits
Author: yhs Date: Mon Jul 8 21:15:12 2019 New Revision: 365436 URL: http://llvm.org/viewvc/llvm-project?rev=365436&view=rev Log: Revert "[BPF] Preserve debuginfo array/union/struct type/access index" This reverts commit r365435. Forgot adding the Differential Revision link. Will add to the comm

r365438 - [BPF] Preserve debuginfo array/union/struct type/access index

2019-07-08 Thread Yonghong Song via cfe-commits
Author: yhs Date: Mon Jul 8 21:21:50 2019 New Revision: 365438 URL: http://llvm.org/viewvc/llvm-project?rev=365438&view=rev Log: [BPF] Preserve debuginfo array/union/struct type/access index For background of BPF CO-RE project, please refer to http://vger.kernel.org/bpfconf2019.html In summary

[PATCH] D61809: [BPF] Preserve debuginfo array/union/struct type/access index

2019-07-08 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL365438: [BPF] Preserve debuginfo array/union/struct type/access index (authored by yhs, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: ht

[PATCH] D64385: GodeGen: Add test to track emitStoresForConstant behavior

2019-07-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added reviewers: eugenis, pcc. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64385 Files: clang/test/CodeGen/init-memset.c Index: clang/test/CodeGen/init-mems

[PATCH] D64385: GodeGen, NFC: Add test to track emitStoresForConstant behavior

2019-07-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 208593. vitalybuka added a comment. format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64385/new/ https://reviews.llvm.org/D64385 Files: clang/lib/CodeGen/CGDecl.cpp clang/test/CodeGen/init-memset.c

[PATCH] D64382: Use getMostFrequentByte to decide if should used memset+stores

2019-07-08 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: clang/lib/CodeGen/CGDecl.cpp:865 +/// initializer with equal or fewer than NumStores scalar stores. +static bool canEmitStoresForInitAfterMemset(CodeGenModule &CGM, +llvm::Constant *Init, -

[PATCH] D64382: Use getMostFrequentByte to decide if should used memset+stores

2019-07-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 208594. vitalybuka added a comment. undo some behavior change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64382/new/ https://reviews.llvm.org/D64382 Files: clang/lib/CodeGen/CGDecl.cpp Index: clang/lib

[PATCH] D64386: CodeGen: Use memset in initializers for non-zeros

2019-07-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added reviewers: eugenis, pcc, jfb. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D64386 Files: clang/lib/CodeGen/CGDecl.cpp clang/test/CodeGen/init

[PATCH] D64385: GodeGen, NFC: Add test to track emitStoresForConstant behavior

2019-07-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka updated this revision to Diff 208598. vitalybuka added a comment. add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64385/new/ https://reviews.llvm.org/D64385 Files: clang/test/CodeGen/init-memset.c Index: clang/test/CodeGen/in

[PATCH] D64387: CodeGen: Do not memset if following stores will overwrite entire variable

2019-07-08 Thread Vitaly Buka via Phabricator via cfe-commits
vitalybuka created this revision. vitalybuka added reviewers: eugenis, pcc, jfb. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. In some cases llvm::getMostFrequentByte can't analyze a constant so we write zeros and then override the rest with stores. These zeros

<    1   2   3