[PATCH] D84604: Thread safety analysis: Consider global variables in scope

2020-09-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D84604#2262745 , @lebedev.ri wrote: > I'm not sure this is the problematic patch, but i'm now seeing some weird > warnings: > > :304:15: warning: acquiring mutex 'guard' requires negative > capability '!guard'

[PATCH] D87368: clang-cl: Alias /wd5054 to -Wno-deprecated-anon-enum-enum-conversion

2020-09-09 Thread Ilia K via Phabricator via cfe-commits
ki.stfu created this revision. ki.stfu added a reviewer: rsmith. Herald added subscribers: cfe-commits, dang. Herald added a project: clang. ki.stfu requested review of this revision. >From here

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. As another data point, I have collected compile-time numbers for ARM64 with -Os -g LTO & -Oz -g LTO. Geoman changes below. Compile time here is actual execution time on a stabilized system. Compile time code size -Oz RLTO 0.67%

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 accepted this revision. xbolva00 added a subscriber: spatel. xbolva00 added a comment. This revision is now accepted and ready to land. Thanks, amazing work! I agree that this should be enabled now and do not wait anymore. @nikic @spatel ? Repository: rG LLVM Github Monorepo

[PATCH] D87364: clang-cl: Alias /wd4238 to -Wno-address-of-temporary

2020-09-09 Thread Ilia K via Phabricator via cfe-commits
ki.stfu created this revision. ki.stfu added a reviewer: rsmith. Herald added subscribers: cfe-commits, dang. Herald added a project: clang. ki.stfu requested review of this revision. See https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4238

[PATCH] D87372: clang-cl: Ignore /Zc:externConstexpr and /Zc:throwingNew

2020-09-09 Thread Ilia K via Phabricator via cfe-commits
ki.stfu created this revision. ki.stfu added a reviewer: rsmith. Herald added subscribers: cfe-commits, dang. Herald added a project: clang. ki.stfu requested review of this revision. The first option tells the compiler to use external linkage for `constexpr` variables, and the second one

[PATCH] D87372: clang-cl: Ignore /Zc:externConstexpr and /Zc:throwingNew

2020-09-09 Thread Ilia K via Phabricator via cfe-commits
ki.stfu added a comment. Not sure, but I'd be surprised if Clang behaves like MSVC in one of these cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87372/new/ https://reviews.llvm.org/D87372 ___

[PATCH] D87374: [SyntaxTree] Specialize `TreeTestBase` for `BuildTreeTest` and `MutationsTest`

2020-09-09 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas created this revision. eduucaldas added a reviewer: gribozavr2. Herald added a project: clang. Herald added a subscriber: cfe-commits. eduucaldas requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87374 Files:

[PATCH] D87358: [clang][aarch64] Fix ILP32 ABI for arm_sve_vector_bits

2020-09-09 Thread Cullen Rhodes via Phabricator via cfe-commits
c-rhodes created this revision. c-rhodes added reviewers: efriedma, sdesmalen, rsandifo-arm. Herald added subscribers: kristof.beyls, tschuett. Herald added a reviewer: rengolin. Herald added a project: clang. c-rhodes requested review of this revision. The element types of scalable vectors are

[PATCH] D87374: [SyntaxTree] Specialize `TreeTestBase` for `BuildTreeTest` and `MutationsTest`

2020-09-09 Thread Eduardo Caldas via Phabricator via cfe-commits
eduucaldas added inline comments. Comment at: clang/unittests/Tooling/Syntax/MutationsTest.cpp:75-85 +INSTANTIATE_TEST_CASE_P(SyntaxTreeTests, SyntaxTreeTest, +::testing::ValuesIn(allTestClangConfigs()), ); + TEST_P(SyntaxTreeTest, SynthesizedNodes) {

[PATCH] D87331: Sema: add support for `__attribute__((__swift_error__))`

2020-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2122 +def SwiftError : InheritableAttr { + let Spellings = [GCC<"swift_error">]; + let Args = [ Is this attribute also supported by GCC? It looked like it wasn't from my quick

[PATCH] D87360: clang-cl: Alias /wd4101 to -Wno-unused-variable

2020-09-09 Thread Ilia K via Phabricator via cfe-commits
ki.stfu updated this revision to Diff 290697. ki.stfu added a comment. Add tests CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87360/new/ https://reviews.llvm.org/D87360 Files: clang/include/clang/Driver/Options.td clang/test/Driver/cl-options.c Index:

[PATCH] D87201: [clang-format] Add a option for the position of Java static import

2020-09-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. LGTM, I'm happy if @JakeMerdichAMD is Comment at: clang/include/clang/Format/Format.h:1708 + /// \endcode + bool JavaStaticImportAfterImport; + bc-lee wrote: > JakeMerdichAMD wrote: > >

[PATCH] D87244: [clang] Add fix-it for -Wreorder-ctor.

2020-09-09 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. thanks, comments around some implementations. the only high level question i have is about the choice of location for fix-it (see the detailed comment inline) Comment at: clang/lib/Sema/SemaDeclCXX.cpp:5198 +static bool RangeContainsComments(Sema ,

[PATCH] D87360: clang-cl: Alias /wd4101 to -Wno-unused-variable

2020-09-09 Thread Ilia K via Phabricator via cfe-commits
ki.stfu created this revision. Herald added subscribers: cfe-commits, dang. Herald added a project: clang. ki.stfu requested review of this revision. See https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-3-c4101 Repository: rG LLVM Github Monorepo

[PATCH] D87347: [NFC] Fix compiler warnings due to integer comparison of different signedness

2020-09-09 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a reviewer: RKSimon. RKSimon added a comment. Couldn't we avoid a lot of this of this casting + template ugliness by just using the / INT_MAX / INT32_MAX defines? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87347/new/

[PATCH] D78938: Make LLVM build in C++20 mode

2020-09-09 Thread Barry Revzin via Phabricator via cfe-commits
BRevzin added a comment. > @BRevzin, you should a) mention the u8/const char* issue in the description > too, and also what compiler you used to build this with. I fully expect at > this stage that there are some C++20 compilers that might have slightly > different interpretations of things

[PATCH] D87352: Fix typo in doc ClangFormatStyleOptions.rst

2020-09-09 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay accepted this revision. MyDeveloperDay added a comment. This revision is now accepted and ready to land. LGTM, thank you for doing this.. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87352/new/ https://reviews.llvm.org/D87352

[clang] 8427885 - Temporairly revert "Thread safety analysis: Consider global variables in scope" & followup

2020-09-09 Thread Roman Lebedev via cfe-commits
Author: Roman Lebedev Date: 2020-09-09T12:15:56+03:00 New Revision: 8427885e27813c457dccb011f65e8ded7e31 URL: https://github.com/llvm/llvm-project/commit/8427885e27813c457dccb011f65e8ded7e31 DIFF: https://github.com/llvm/llvm-project/commit/8427885e27813c457dccb011f65e8ded7e31.diff

[PATCH] D86671: [clang-tidy] Add new case type to check variables with Hungarian notation

2020-09-09 Thread Douglas Chen via Phabricator via cfe-commits
dougpuob updated this revision to Diff 290726. dougpuob added a comment. - Fixed lint warnings and regression test failures on Windows. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86671/new/ https://reviews.llvm.org/D86671 Files:

[PATCH] D86558: [OPENMP]Add support for allocate vars in untied tasks.

2020-09-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert 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/D86558/new/ https://reviews.llvm.org/D86558

[PATCH] D86547: [compiler-rt][builtins] Use c[tl]zsi macro instead of __builtin_c[tl]z

2020-09-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86547/new/ https://reviews.llvm.org/D86547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D87395: Sema: add support for `__attribute__((__swift_objc_members__))`

2020-09-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: aaron.ballman. Herald added a reviewer: jdoerfert. Herald added a project: clang. compnerd requested review of this revision. This adds the `__swift_objc_members__` attribute to the semantic analysis. It allows for annotating ObjC

[PATCH] D87382: [AST] Fix dependence-bits for CXXDefaultInitExpr.

2020-09-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: rsmith. Herald added a project: clang. hokein requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87382 Files: clang/include/clang/AST/ComputeDependence.h

[PATCH] D84637: [AST] Enhance the const expression evaluator to support error-dependent exprs.

2020-09-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 290754. hokein marked an inline comment as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84637/new/ https://reviews.llvm.org/D84637 Files:

[PATCH] D87047: [clang] Add command line options for the Machine Function Splitter.

2020-09-09 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram accepted this revision. tmsriram added a comment. This revision is now accepted and ready to land. This LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87047/new/ https://reviews.llvm.org/D87047

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Nikita Popov via Phabricator via cfe-commits
nikic accepted this revision. nikic added a comment. LGTM as well, per llvm-dev discussion. I think you've done all the due diligence we can expect. Do you plan to also work on MSSA-based MemCpyOpt? I expect that one will have a large positive impact on Rust code, where lack of cross-BB memcpy

[PATCH] D87394: [PowerPC][Power10] Implementation of 128-bit Binary Vector Mod and Sign Extend builtins

2020-09-09 Thread Albion Fung via Phabricator via cfe-commits
Conanap created this revision. Conanap added reviewers: PowerPC, saghir, nemanjai, hfinkel. Conanap added projects: LLVM, clang, PowerPC. Herald added subscribers: steven.zhang, kbarton. Conanap requested review of this revision. This patch implements 128-bit Binary Vector Mod and Sign Extend

[PATCH] D86796: [Sema] Address-space sensitive index check for unbounded arrays

2020-09-09 Thread Chris Hamilton via Phabricator via cfe-commits
chrish_ericsson_atx added a comment. Ping? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86796/new/ https://reviews.llvm.org/D86796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D87358: [clang][aarch64] Fix ILP32 ABI for arm_sve_vector_bits

2020-09-09 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: clang/lib/AST/Type.cpp:2339 case BuiltinType::SveInt32: -return Ctx.IntTy; +return IsILP32 ? Ctx.LongTy : Ctx.IntTy; case BuiltinType::SveUint32: Rather than comparing with a specific triple, how about

[PATCH] D87338: [Driver][PGO] Driver support for de-Optimizing cold functions (PATCH 2/2)

2020-09-09 Thread Min-Yih Hsu via Phabricator via cfe-commits
myhsu updated this revision to Diff 290769. myhsu added a comment. Fix a bug in driver that accidentally made this feature turn on by default CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87338/new/ https://reviews.llvm.org/D87338 Files: clang/docs/ClangCommandLineReference.rst

[PATCH] D87220: [PowerPC] Fix STRICT_FRINT/STRICT_FNEARBYINT lowering

2020-09-09 Thread Qiu Chaofan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG88ff4d2ca1a0: [PowerPC] Fix STRICT_FRINT/STRICT_FNEARBYINT lowering (authored by qiucf). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[clang] 88ff4d2 - [PowerPC] Fix STRICT_FRINT/STRICT_FNEARBYINT lowering

2020-09-09 Thread Qiu Chaofan via cfe-commits
Author: Qiu Chaofan Date: 2020-09-09T22:40:58+08:00 New Revision: 88ff4d2ca1a0aaed6888152042256a0ef3fe863d URL: https://github.com/llvm/llvm-project/commit/88ff4d2ca1a0aaed6888152042256a0ef3fe863d DIFF: https://github.com/llvm/llvm-project/commit/88ff4d2ca1a0aaed6888152042256a0ef3fe863d.diff

[PATCH] D87388: [Analyzer] Model default constructors of containers

2020-09-09 Thread Balogh , Ádám via Phabricator via cfe-commits
baloghadamsoftware created this revision. baloghadamsoftware added reviewers: NoQ, vsavchenko, gamesh411. baloghadamsoftware added a project: clang. Herald added subscribers: ASDenysPetrov, martong, steakhal, Charusso, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet,

[PATCH] D87239: [analyzer][StdLibraryFunctionsChecker] Remove strcasecmp

2020-09-09 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. @steakhal Ping. > I completely agree with you. So, how should we proceed? :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87239/new/ https://reviews.llvm.org/D87239 ___

[PATCH] D86796: [Sema] Address-space sensitive index check for unbounded arrays

2020-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D86796#2263557 , @chrish_ericsson_atx wrote: > Ping? Sorry for the delayed review, but this managed to fall off my radar. Thank you for the ping! Comment at:

[PATCH] D83678: [analyzer][ReturnPtrRangeChecker] Fix a false positive on end() iterator

2020-09-09 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. LGTM on my end! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83678/new/ https://reviews.llvm.org/D83678 ___ cfe-commits mailing list

[PATCH] D86546: [compiler-rt][builtins] Use explicitly-sized integer types for LibCalls

2020-09-09 Thread Anatoly Trosinenko via Phabricator via cfe-commits
atrosinenko added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D86546/new/ https://reviews.llvm.org/D86546 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D84637: [AST] Enhance the const expression evaluator to support error-dependent exprs.

2020-09-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:4583 if (!InitE) return getDefaultInitValue(VD->getType(), Val); rsmith wrote: > The initializer might also be null because the variable is type-dependent > (eg, `X x;`), in

[PATCH] D79431: [analyzer] StdLibraryFunctionsChecker: Add better diagnostics

2020-09-09 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D79431#2263690 , @martong wrote: > In D79431#2215610 , @Szelethus wrote: > >> Ah, okay, silly me. Didn't catch that. Then the message is OK for now. >> >> edit: Describing //how// the

[PATCH] D87331: Sema: add support for `__attribute__((__swift_error__))`

2020-09-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd marked 10 inline comments as done. compnerd added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2122 +def SwiftError : InheritableAttr { + let Spellings = [GCC<"swift_error">]; + let Args = [ aaron.ballman wrote: > Is this attribute

[PATCH] D87331: Sema: add support for `__attribute__((__swift_error__))`

2020-09-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd updated this revision to Diff 290767. compnerd marked an inline comment as done. compnerd added a comment. Address feedback from @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87331/new/ https://reviews.llvm.org/D87331

[PATCH] D79431: [analyzer] StdLibraryFunctionsChecker: Add better diagnostics

2020-09-09 Thread Gabor Marton via Phabricator via cfe-commits
martong added a comment. In D79431#2215610 , @Szelethus wrote: > Ah, okay, silly me. Didn't catch that. Then the message is OK for now. > > edit: Describing //how// the violation happened might be a valuable for > development purposes as well. What if

[PATCH] D87396: Sema: add support for `__attribute__((__swift_typedef_bridged__))`

2020-09-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a reviewer: aaron.ballman. Herald added a reviewer: jdoerfert. Herald added a project: clang. compnerd requested review of this revision. Extend the semantic attributes that clang processes for Swift to include `swift_typedef_bridged`. This

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from a commenting nit. Thank you for the work on this! Comment at: clang/include/clang/AST/Stmt.h:1180 + + /// \returns the likelihood of the

[PATCH] D87331: Sema: add support for `__attribute__((__swift_error__))`

2020-09-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/include/clang/Basic/Attr.td:2128 + ]; + let Subjects = SubjectList<[Function, ObjCMethod], ErrorDiag>; + let Documentation = [SwiftErrorDocs]; compnerd wrote: > aaron.ballman wrote: > > Should this apply to

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked an inline comment as done. Mordante added a comment. Thanks for your feedback during the review. Comment at: clang/include/clang/AST/Stmt.h:1180 + + /// \returns the likelihood of the branches of an if statement. + static Likelihood getLikelihood(const Stmt

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-09 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added inline comments. Comment at: clang/include/clang/AST/Stmt.h:1180 + + /// \returns the likelihood of the branches of an if statement. + static Likelihood getLikelihood(const Stmt *Then, const Stmt *Else); Mordante wrote: > aaron.ballman wrote:

[PATCH] D87118: Add an explicit toggle for the static analyzer in clang-tidy

2020-09-09 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn:18 + } else { +values += [ "CLANG_TIDY_ENABLE_STATIC_ANALYZER=" ] + } thakis wrote: > hans wrote: > > Why not =0? > Because it's a #cmakedefine01, and

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added a comment. Thanks for reviewing. One last thing I need to resolve is to handle the coverage test case as skipped regions are emitted for empty lines, and haven't thought a good way other than adding checks for those new skipped regions. Repository: rG LLVM Github Monorepo

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-09 Thread Reid "Away June-Sep" Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/include/clang/Driver/Options.td:1980 HelpText<"remap file source paths in debug info">; +def fprofile_prefix_map_QA + : Joined<["-"], "fprofile-prefix-map=">, Group, Any reason for the _QA suffix instead of _EQ?

[clang] 08196e0 - Implements [[likely]] and [[unlikely]] in IfStmt.

2020-09-09 Thread Mark de Wever via cfe-commits
Author: Mark de Wever Date: 2020-09-09T20:48:37+02:00 New Revision: 08196e0b2e1f8aaa8a854585335c17ba479114df URL: https://github.com/llvm/llvm-project/commit/08196e0b2e1f8aaa8a854585335c17ba479114df DIFF: https://github.com/llvm/llvm-project/commit/08196e0b2e1f8aaa8a854585335c17ba479114df.diff

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-09 Thread Mark de Wever via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Mordante marked an inline comment as done. Closed by commit rG08196e0b2e1f: Implements [[likely]] and [[unlikely]] in IfStmt. (authored by Mordante). Changed prior to commit:

[PATCH] D87409: [libTooling] Fix use of `char` in comparison.

2020-09-09 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel created this revision. ymandel added a reviewer: lbenes. Herald added a project: clang. ymandel requested review of this revision. Fixes Transformer's `Range` parser to handle `char` in a platform-independent way. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87409

[PATCH] D87331: Sema: add support for `__attribute__((__swift_error__))`

2020-09-09 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. `const` qualification isn't the most meaningful thing for Objective-C objects anyway. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87331/new/ https://reviews.llvm.org/D87331

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Florian Hahn via Phabricator via cfe-commits
fhahn added a comment. It looks like a recently introduced GVN crash is exposed by this change (probably D87061 ). I will commit once this is fixed. In D87163#2263685 , @nikic wrote: > LGTM as well, per llvm-dev

[PATCH] D87331: Sema: add support for `__attribute__((__swift_error__))`

2020-09-09 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3394 +parameter. Currently, the error parameter is always the last parameter of type +``NSError**`` or ``CFErrorRef*``. Swift will remove the error parameter from +the imported API. When calling

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-09 Thread Vedant Kumar via Phabricator via cfe-commits
vsk accepted this revision. vsk added a comment. This revision is now accepted and ready to land. I took a closer look at the lexer changes, and think that these look fine. Thanks again for working on this. LGTM with a minor change, described inline. Comment at:

[PATCH] D84988: [Coverage] Add empty line regions to SkippedRegions

2020-09-09 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. In D84988#2264199 , @zequanwu wrote: > Thanks for reviewing. One last thing I need to resolve is to handle the > coverage test case as skipped regions are emitted for empty lines, and > haven't thought a good way other than adding

[PATCH] D87239: [analyzer][StdLibraryFunctionsChecker] Remove strcasecmp

2020-09-09 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. This revision is now accepted and ready to land. In D87239#2259428 , @martong wrote: > So, the problem is rather that the constraint check should be done in > checkPreCall, but that should be in

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea accepted this revision. asbirlea added a comment. Green light from me as well. I think there's still room for improvement for the NPM, but this is the right step to move forward infrastructure-wise. Regarding the MemCpyOpt question from nikic@, please let me know if you want to take

[PATCH] D86559: [Sema, CodeGen] Allow [[likely]] and [[unlikely]] on labels

2020-09-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante updated this revision to Diff 290809. Mordante added a comment. Update the patch to match the behaviour where the attribute only affects the substatement of an if statement. This means the likelihood attributes on labels are accepted but are a no-op. Since they're a no-op the

[PATCH] D87118: Add an explicit toggle for the static analyzer in clang-tidy

2020-09-09 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang-tools-extra/CMakeLists.txt:4 +option(CLANG_TIDY_ENABLE_STATIC_ANALYZER + "Include static analyzer checks in clang-tidy" ON) + hans wrote: > Should this default to CLANG_ENABLE_STATIC_ANALYZER instead of ON? I had

[PATCH] D87118: Add an explicit toggle for the static analyzer in clang-tidy

2020-09-09 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: llvm/utils/gn/secondary/clang-tools-extra/clang-tidy/BUILD.gn:18 + } else { +values += [ "CLANG_TIDY_ENABLE_STATIC_ANALYZER=" ] + } thakis wrote: > thakis wrote: > > hans wrote: > > > Why not =0? > > Because it's a

[PATCH] D85091: [Sema, CodeGen] Implement [[likely]] and [[unlikely]] in IfStmt

2020-09-09 Thread Mark de Wever via Phabricator via cfe-commits
Mordante marked 2 inline comments as done. Mordante added inline comments. Comment at: clang/include/clang/AST/Stmt.h:1180 + + /// \returns the likelihood of the branches of an if statement. + static Likelihood getLikelihood(const Stmt *Then, const Stmt *Else);

[PATCH] D84968: [PowerPC] Legalize v256i1 and v512i1 and implement load and store of these types

2020-09-09 Thread Baptiste Saleil via Phabricator via cfe-commits
bsaleil updated this revision to Diff 290804. bsaleil added a comment. Rebase so the patch can be applied on top of master. Also change the datalayout string on all ppc64 platforms to improve compatibility between object files. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84968/new/

[PATCH] D87164: Extending Baremetal toolchain's support for the rtlib option.

2020-09-09 Thread Jon Roelofs via Phabricator via cfe-commits
jroelofs added a comment. > The Baremetal toolchain currently has a fixed behavior regardless of the > -rtlib option's value. It is always linking against compiler-rt unless > -nodefaultlibs is enabled. > > This proposal slightly changes the code in such a way that enabling > -rtlib=libgcc

[PATCH] D84467: Add support for Branch Coverage in LLVM Source-Based Code Coverage

2020-09-09 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. @alanphipps thanks for bearing with me. I think this is about ready to land. I do ask that you back out any punctuation/whitespace changes in code/tests that aren't directly modified in your diff (the clang-format-diff script can help with this). It looks like some

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu created this revision. zequanwu added reviewers: rsmith, hans. Herald added a project: clang. Herald added a subscriber: cfe-commits. zequanwu requested review of this revision. Bug: https://bugs.llvm.org/show_bug.cgi?id=47467 Repository: rG LLVM Github Monorepo

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Rahman Lavaee via Phabricator via cfe-commits
rahmanl accepted this revision. rahmanl added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/Driver/fbasic-block-sections.c:11 // CHECK-OPT-LABELS: "-fbasic-block-sections=labels" +// CHECK-NOOPT-NOT: "-fbasic-block-sections"

[PATCH] D87347: [NFC] Fix compiler warnings due to integer comparison of different signedness

2020-09-09 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp updated this revision to Diff 290864. nullptr.cpp added a comment. Fix by directly using `INT_MAX` and `INT32_MAX`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87347/new/ https://reviews.llvm.org/D87347 Files:

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish updated this revision to Diff 290863. snehasish added a comment. Specify triple for driver tests, address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87426/new/ https://reviews.llvm.org/D87426 Files:

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish marked 3 inline comments as done. snehasish added a comment. Thanks for the quick review @MaskRay, PTAL. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4892 +} else { + D.Diag(diag::warn_drv_unsupported_opt_for_target) + << A->getAsString(Args)

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4892 +} else { + D.Diag(diag::warn_drv_unsupported_opt_for_target) + << A->getAsString(Args) << TripleStr; snehasish wrote: > MaskRay wrote: > > This should be an

[PATCH] D87425: [CodeGen][typeid] Emit typeinfo directly if type is known at compile-time

2020-09-09 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu updated this revision to Diff 290846. zequanwu added a comment. Remove unused field. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87425/new/ https://reviews.llvm.org/D87425 Files:

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-09 Thread Keith Smiley via Phabricator via cfe-commits
keith added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:1334 + llvm::SmallString<256> Path(Filename); + llvm::sys::fs::make_absolute(Path); + llvm::sys::path::remove_dots(Path, /*remove_dot_dot=*/true); rnk wrote: > Please only make

[PATCH] D83154: clang: Add -fcoverage-prefix-map

2020-09-09 Thread Keith Smiley via Phabricator via cfe-commits
keith updated this revision to Diff 290851. keith marked 2 inline comments as done. keith added a comment. Small fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83154/new/ https://reviews.llvm.org/D83154 Files:

[PATCH] D87358: [clang][aarch64] Fix ILP32 ABI for arm_sve_vector_bits

2020-09-09 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/lib/AST/Type.cpp:2339 case BuiltinType::SveInt32: -return Ctx.IntTy; +return IsILP32 ? Ctx.LongTy : Ctx.IntTy; case BuiltinType::SveUint32: sdesmalen wrote: > Rather than comparing with a specific

[PATCH] D87047: [clang] Add command line options for the Machine Function Splitter.

2020-09-09 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish updated this revision to Diff 290852. snehasish added a comment. Add a check for x86-elf. - Add a check for the triple in the driver to only enable the flag on x86+elf targets. - Add a test to ensure we don't enable this on other targets. Repository: rG LLVM Github Monorepo

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea requested changes to this revision. asbirlea added a comment. This revision now requires changes to proceed. I'm running into a crash with this, could you please hold off until tomorrow? I'm working on getting a reproducer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/fbasic-block-sections.c:1 -// RUN: %clang -### -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s -// RUN: %clang -### -fbasic-block-sections=all %s -S 2>&1 | FileCheck

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4892 +} else { + D.Diag(diag::warn_drv_unsupported_opt_for_target) + << A->getAsString(Args) << TripleStr; This should be an error Comment at:

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay requested changes to this revision. MaskRay added inline comments. This revision now requires changes to proceed. Comment at: clang/test/Driver/fbasic-block-sections.c:12 // CHECK-OPT-LABELS: "-fbasic-block-sections=labels" +// CHECK-TRIPLE-NOT:

[PATCH] D87163: [DSE] Switch to MemorySSA-backed DSE by default.

2020-09-09 Thread Alina Sbirlea via Phabricator via cfe-commits
asbirlea added inline comments. Comment at: llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp:312 switch (II->getIntrinsicID()) { default: llvm_unreachable("doesn't pass 'hasAnalyzableMemoryWrite' predicate"); case Intrinsic::lifetime_end: The

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish updated this revision to Diff 290867. snehasish added a comment. Update test based on review comments. - Use diag::err instead of warn. - Drop linux-gnu from the triple for the default test. - Check for the presence of the diagnostic message. Repository: rG LLVM Github Monorepo

[PATCH] D82112: [RFC][BPF] Implement getUserCost() for BPFTargetTransformInfo

2020-09-09 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song abandoned this revision. yonghong-song added a comment. Abandon this one. The current approach is to add "user barriers" in an IR phase before simplifyCFG/instrcombine to disable unfavorable speculative code motion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80531: [clang-tidy]: Added modernize-replace-disallow-copy-and-assign-macro

2020-09-09 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added subscribers: sammccall, dblaikie. dblaikie added a comment. In D80531#2069637 , @kwk wrote: > In D80531#2069383 , @njames93 wrote: > >> LGTM with 2 small nits, but I'd still give a few days see if

[PATCH] D87338: [Driver][PGO] Driver support for de-Optimizing cold functions (PATCH 2/2)

2020-09-09 Thread Min-Yih Hsu via Phabricator via cfe-commits
myhsu updated this revision to Diff 290849. myhsu edited the summary of this revision. myhsu added a comment. Unified driver options from "-fprofile-deopt-cold-*" into "-fprofile-omit-cold-opt" and "-fprofile-omit-cold-opt=". Where the former one is just a shorthand of

[PATCH] D87347: [NFC] Fix compiler warnings due to integer comparison of different signedness

2020-09-09 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp added a comment. I don't have commit access, can anyone help me commit this with `"Yang Fan "` ? Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87347/new/ https://reviews.llvm.org/D87347

[libunwind] 09d4929 - [libunwind] Bare-metal DWARF: set dso_base to 0

2020-09-09 Thread Ryan Prichard via cfe-commits
Author: Ryan Prichard Date: 2020-09-09T15:43:35-07:00 New Revision: 09d492902f178f60b3ab986360eadde9b5c8d359 URL: https://github.com/llvm/llvm-project/commit/09d492902f178f60b3ab986360eadde9b5c8d359 DIFF: https://github.com/llvm/llvm-project/commit/09d492902f178f60b3ab986360eadde9b5c8d359.diff

[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

2020-09-09 Thread Snehasish Kumar via Phabricator via cfe-commits
snehasish created this revision. snehasish added reviewers: tmsriram, rahmanl. Herald added a project: clang. Herald added a subscriber: cfe-commits. snehasish requested review of this revision. Basic block sections is untested on other platforms and binary formats apart from x86,elf. This patch

[PATCH] D75574: RFC: Implement objc_direct_protocol attribute to remove protocol metadata

2020-09-09 Thread Nathan Lanza via Phabricator via cfe-commits
lanza added a comment. > I don't think it'll actually error out at link time: protocol objects get > emitted eagerly on use, cross-module linking is just a code-size > optimization. This actually has caused longstanding problems. But if it's just a forward declaration there's nothing to emit.

[PATCH] D87347: [NFC] Fix compiler warnings due to integer comparison of different signedness

2020-09-09 Thread Yang Fan via Phabricator via cfe-commits
nullptr.cpp created this revision. Herald added subscribers: llvm-commits, cfe-commits, hiraditya, sbc100. Herald added projects: clang, LLVM. nullptr.cpp requested review of this revision. Herald added a subscriber: aheejin. Fix by explicitly expressing the conversions that caused by comparison.

[PATCH] D87349: [clang] adapt c++17 behavior for dependent decltype-specifiers

2020-09-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: rsmith. Herald added a project: clang. hokein requested review of this revision. Context: https://reviews.llvm.org/D86048#2254607 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87349 Files: clang/lib/AST/ASTContext.cpp

[PATCH] D87350: [AST][RecoveryExpr] Fix a crash on undeduced type.

2020-09-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. hokein requested review of this revision. We should not capture the type if the function return type is undeduced. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D87350 Files:

[clang] c0e5e3f - [Ignore Expressions] Fix performance regression by inlining `Ignore*SingleStep`

2020-09-09 Thread Eduardo Caldas via cfe-commits
Author: Eduardo Caldas Date: 2020-09-09T07:32:40Z New Revision: c0e5e3fbfa504c3792023d0db9008b08caa6b6d7 URL: https://github.com/llvm/llvm-project/commit/c0e5e3fbfa504c3792023d0db9008b08caa6b6d7 DIFF: https://github.com/llvm/llvm-project/commit/c0e5e3fbfa504c3792023d0db9008b08caa6b6d7.diff

[PATCH] D87278: [Ignore Expressions] Fix performance regression by inlining `Ignore*SingleStep`

2020-09-09 Thread Eduardo Caldas 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 rGc0e5e3fbfa50: [Ignore Expressions] Fix performance regression by inlining `Ignore*SingleStep` (authored by eduucaldas). Repository: rG LLVM

[PATCH] D84604: Thread safety analysis: Consider global variables in scope

2020-09-09 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I'm not sure this is the problematic patch, but i'm now seeing some weird warnings: :304:15: warning: acquiring mutex 'guard' requires negative capability '!guard' [-Wthread-safety-negative] MutexLocker guard(); ^ :309:15: warning: acquiring

[PATCH] D86137: Add ignore-unknown-options flag to clang-format.

2020-09-09 Thread George Rimar via Phabricator via cfe-commits
grimar added inline comments. Comment at: llvm/lib/Support/YAMLTraits.cpp:204 if (!is_contained(MN->ValidKeys, NN.first())) { - setError(NN.second.get(), Twine("unknown key '") + NN.first() + "'"); - break; + auto ReportNode = NN.second.get(); + auto

[PATCH] D78938: Make LLVM build in C++20 mode

2020-09-09 Thread James Henderson via Phabricator via cfe-commits
jhenderson added a comment. In D78938#2261411 , @jfb wrote: > On C++20 mode rotting: it won't if someone sets up a bot. If it rots, then > it's easier to un-rot with Barry's patch. I assume this would be a private bot? It can't be a public bot, since

  1   2   >