[PATCH] D76929: [AArch64][SVE] Add SVE intrinsic for LD1RQ

2020-04-14 Thread Kerry McLaughlin via Phabricator via cfe-commits
kmclaughlin updated this revision to Diff 257349. kmclaughlin marked 4 inline comments as done. kmclaughlin edited the summary of this revision. kmclaughlin added a comment. Simplified performLD1RQCombine method & added negative tests where the immediate is out of range. CHANGES SINCE LAST ACTI

[PATCH] D76929: [AArch64][SVE] Add SVE intrinsic for LD1RQ

2020-04-14 Thread Kerry McLaughlin via Phabricator via cfe-commits
kmclaughlin marked 2 inline comments as done. kmclaughlin added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:11592 +static SDValue performLD1RQCombine(SDNode *N, SelectionDAG &DAG) { + SDLoc DL(N); andwar wrote: > [Nit] I think

[PATCH] D77794: [clangd] Pull installed gRPC and introduce clangd-remote-(server|client)

2020-04-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 257353. kbobyrev added a comment. Alias libraries in CMake: gRPC::grpc++ to grpc++ and protobuf::libprotobuf to protobuf. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77794/new/ https://reviews.llvm.org/D777

[clang] c8a5b30 - [SveEmitter] Add range checks for immediates and predicate patterns.

2020-04-14 Thread Sander de Smalen via cfe-commits
Author: Sander de Smalen Date: 2020-04-14T16:49:32+01:00 New Revision: c8a5b30bac695e9fbb592cf77364a60ebd6e0dbd URL: https://github.com/llvm/llvm-project/commit/c8a5b30bac695e9fbb592cf77364a60ebd6e0dbd DIFF: https://github.com/llvm/llvm-project/commit/c8a5b30bac695e9fbb592cf77364a60ebd6e0dbd.di

[PATCH] D78116: [AST] dont invaliate VarDecl when the initializer contains errors.

2020-04-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: clang. This might be splitted into 2 separate patchs: 1. the initializer of a variable should play no part in decl "invalid" bit; 2. preserve the exprs in an error initializer via recovery exprs; if we do 1

[PATCH] D78075: [Clang][OpenMP] Added support for nowait target in CodeGen

2020-04-14 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. In D78075#1980746 , @jdoerfert wrote: > You need to update the tests too. Yeah, I will do that. Basically I would like to do that if this direction is not wrong... :-) Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D78117: [AVR] Define __ELF__

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: dylanmckay, rjmccall, MaskRay. aykevl added a project: LLVM. Herald added subscribers: cfe-commits, Jim. Herald added a project: clang. aykevl updated this revision to Diff 257358. This symbol is defined in avr-gcc. Because AVR normally uses th

[PATCH] D76929: [AArch64][SVE] Add SVE intrinsic for LD1RQ

2020-04-14 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen added inline comments. Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:11621 + if (VT.isFloatingPoint()) { +SDValue LoadChain = SDValue(Load.getNode(), 1); +Load = DAG.getMergeValues( It seems like the LoadChain is lost if VT is of

[PATCH] D78118: [analyzer] StdLibraryFunctionsChecker: Add option to display loaded summaries

2020-04-14 Thread Gabor Marton via Phabricator via cfe-commits
martong created this revision. martong added reviewers: NoQ, Szelethus, baloghadamsoftware, balazske. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnkovacs, szepet, xazax.hun, whisperity. Herald added a projec

[PATCH] D78117: [AVR] Define __ELF__

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl updated this revision to Diff 257358. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78117/new/ https://reviews.llvm.org/D78117 Files: clang/lib/Basic/Targets/AVR.cpp clang/test/CodeGen/avr/target-cpu-defines/atmega328p.c clang/test/Code

[PATCH] D77875: [ARM] Armv8.6-a Matrix Mul cmd line support

2020-04-14 Thread Luke Geeson via Phabricator via cfe-commits
LukeGeeson updated this revision to Diff 257362. LukeGeeson added a comment. - updated commit message to reflect sve=>f32/64 implication - added comment in AArch64.cpp to that effect CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77875/new/ https://reviews.llvm.org/D77875 Files: clang

[PATCH] D76678: [SveEmitter] Add range checks for immediates and predicate patterns.

2020-04-14 Thread Sander de Smalen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc8a5b30bac69: [SveEmitter] Add range checks for immediates and predicate patterns. (authored by sdesmalen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D766

[PATCH] D78120: [analyzer][StreamChecker] Don't make StreamTestChecker depend on StreamChecker for the time being

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: balazske, NoQ, xazax.hun, baloghadamsoftware, dcoughlin, martong. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnko

[PATCH] D77802: [analyzer] Improved RangeSet::Negate support of unsigned ranges

2020-04-14 Thread Denys Petrov via Phabricator via cfe-commits
ASDenysPetrov added a comment. @steakhal, thank you for your time! @baloghadamsoftware > Please add a bit more tests where we can see that the negated of unsigned > range of `[n..m]` is `UINT_MAX-m+1..UINT_MAX-n+1]`. Yes. I am writing them. Thanks for the review. Repository: rG LLVM Github

[PATCH] D78123: [analyzer][NSOrCFError] Don't emit diagnostics under the name osx.NSOrCFErrorDerefChecker

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, vsavchenko, dcoughlin, martong, xazax.hun, balazske, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.s

[PATCH] D78121: [analyzer][DirectIvarAssignment] Turn DirectIvarAssignmentForAnnotatedFunctions into a checker option

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, dcoughlin, vsavchenko, martong, balazske, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnk

[PATCH] D78122: [analyzer][Nullability] Don't emit under the checker name NullabilityBase

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, vsavchenko, dcoughlin, martong, balazske, baloghadamsoftware, xazax.hun. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.s

[PATCH] D77794: [clangd] Pull installed gRPC and introduce clangd-remote-(server|client)

2020-04-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/CMakeLists.txt:158 +if (LLVM_USE_GRPC) + set(protobuf_MODULE_COMPATIBLE TRUE) + find_package(Protobuf CONFIG REQUIRED HINTS ${GRPC_INSTALL_PATH}) can we add a comment to the top of this secti

[PATCH] D78124: [analyzer][ObjCGenerics] Don't emit diagnostics under the name core.DynamicTypePropagation

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, vsavchenko, dcoughlin, martong, balazske, xazax.hun, baloghadamsoftware. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.s

[PATCH] D78126: [analyzer][NFC] Don't allow dependency checkers to emit diagnostics

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus created this revision. Szelethus added reviewers: NoQ, xazax.hun, baloghadamsoftware, martong, balazske, dcoughlin. Szelethus added a project: clang. Herald added subscribers: cfe-commits, ASDenysPetrov, steakhal, Charusso, gamesh411, dkrupp, donat.nagy, mikhail.ramalho, a.sidorin, rnko

[PATCH] D78125: [AVR] Use the correct address space for non-prototyped function calls

2020-04-14 Thread Ayke via Phabricator via cfe-commits
aykevl created this revision. aykevl added reviewers: dylanmckay, rjmccall, MaskRay. aykevl added a project: LLVM. Herald added subscribers: cfe-commits, Jim. Herald added a project: clang. aykevl edited the summary of this revision. Some function declarations like this: void foo(); do not hav

[PATCH] D78117: [AVR] Define __ELF__

2020-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. The `test/clang/Preprocessor/` directory may make more sense for such tests. Is it time to create a target-specific sub directory `test/clang/Preprocessor/AVR/`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78117/new/ ht

[PATCH] D78122: [analyzer][Nullability] Don't emit under the checker name NullabilityBase

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Its worth mentioning that the reason I went out of my way not to change the name associated with reports from `CallAndMessage`, but I changed all of them here is that `NullabilityBase` is not a user-facing checker. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D76678: [SveEmitter] Add range checks for immediates and predicate patterns.

2020-04-14 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. For CDE and MVE, the sema inc file is called arm_foo_builtin_sema. Does it make sense to call the sve one arm_sve_builtin_sema instead of arm_sve_sema_rangechecks too, for consistency? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D78129: Add Marvell ThunderX3T110 support

2020-04-14 Thread Wei Zhao via Phabricator via cfe-commits
wxz2020 created this revision. wxz2020 added reviewers: joelkevinjones, pankajgode. Herald added subscribers: cfe-commits, jfb, hiraditya. Herald added a project: clang. This is the first checkin to support Marvell ThunderX3T110. Initial definition of the micro-ops of the instructions in ThunderX

[PATCH] D75791: [clang-format] Added new option IndentExternBlock

2020-04-14 Thread Marcus Johnson via Phabricator via cfe-commits
MarcusJohnson91 added a comment. @MyDeveloperDay > but I'm also constantly surprised by how many of the enumeration cases > started out as booleans only later to have to be converted to enums. The more > I think about this the more I think the problem can probably be dealt with > better by mak

[PATCH] D77918: [OpenMP] Avoid crash in preparation for diagnose of unsupported type

2020-04-14 Thread Mariya Podchishchaeva via Phabricator via cfe-commits
Fznamznon added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1831 "OpenMP device compilation mode is expected."); + // TODO: Do not check outside of functions for now as the targetDiag below + // requires one. Please ignore my comm

[PATCH] D78131: [SVE] Fix unsigned is always >= 0

2020-04-14 Thread Christopher Tetreault via Phabricator via cfe-commits
ctetreau created this revision. Herald added subscribers: cfe-commits, psnobl, rkruppe, tschuett. Herald added a reviewer: efriedma. Herald added a project: clang. ctetreau added a reviewer: sdesmalen. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D78131 Files: clang/utils/Tab

[PATCH] D75430: [analyzer][NFC] Introduce CXXDeallocatorCall, deploy it in MallocChecker

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. Just a gentle ping :) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75430/new/ https://reviews.llvm.org/D75430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinf

[PATCH] D57226: [Fixed Point] [AST] Add an AST serialization code for fixed-point literals.

2020-04-14 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. LGTM, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57226/new/ https://reviews.llvm.org/D57226 ___ cfe-commits mailing list cfe-commit

[PATCH] D77776: [Driver] Default to libc++ on FreeBSD

2020-04-14 Thread Jan Beich via Phabricator via cfe-commits
jbeich updated this revision to Diff 257403. jbeich retitled this revision from "[Driver] Drop support for FreeBSD < 10" to "[Driver] Default to libc++ on FreeBSD". jbeich added a comment. - Limit the scope to `-stdlib` In D6#1972543 , @dim wrote: >

[PATCH] D75184: [clang-tidy] Optional inheritance of file configs from parent directories 

2020-04-14 Thread Dmitry Polukhin via Phabricator via cfe-commits
DmitryPolukhin updated this revision to Diff 257405. DmitryPolukhin added a comment. And one more time :( Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75184/new/ https://reviews.llvm.org/D75184 Files: clang-tools-extra/clang-tidy/ClangTidy.cpp

[clang] 539163a - [X86] Add tests to clang Driver to ensure that SLH/Retpoline features are not enabled with LVI-CFI

2020-04-14 Thread Craig Topper via cfe-commits
Author: Scott Constable Date: 2020-04-14T10:47:27-07:00 New Revision: 539163affea7dc006c341ec82d80aece26a3c643 URL: https://github.com/llvm/llvm-project/commit/539163affea7dc006c341ec82d80aece26a3c643 DIFF: https://github.com/llvm/llvm-project/commit/539163affea7dc006c341ec82d80aece26a3c643.dif

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-14 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added inline comments. Comment at: clang/include/clang-c/Index.h:4503 CXObjCPropertyAttr_unsafe_unretained = 0x800, - CXObjCPropertyAttr_class = 0x1000 + CXObjCPropertyAttr_classattr = 0x1000 } CXObjCPropertyAttrKind;

[PATCH] D77427: [X86] Add tests to clang Driver to ensure that SLH/Retpoline features are not enabled with LVI-CFI

2020-04-14 Thread Craig Topper via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG539163affea7: [X86] Add tests to clang Driver to ensure that SLH/Retpoline features are not… (authored by sconstab, committed by craig.topper). Herald added a project: clang. Repository: rG LLVM Github

[PATCH] D78134: [Sema] Don't apply an lvalue-to-rvalue conversion to a discarded-value expression if it has an array type

2020-04-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: efriedma, rsmith, rjmccall. ahatanak added a project: clang. Herald added subscribers: ributzka, dexonsmith, jkorous. This fixes a bug which causes clang to emit incorrect IR for the following code in C++: int foo(void) { unsigned a

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread Florian Hahn via Phabricator via cfe-commits
fhahn marked an inline comment as done. fhahn added inline comments. Comment at: clang/docs/MatrixTypes.rst:27 +internal layout, overall size and alignment are implementation-defined. +A *matrix element type* must be a real type (as in C99 6.2.5p17) excluding +enumeration types o

[clang] 161fc1d - [Fixed Point] [AST] Add an AST serialization code for fixed-point literals.

2020-04-14 Thread via cfe-commits
Author: Vince Bridgers Date: 2020-04-14T13:20:49-05:00 New Revision: 161fc1d9118f4f64887cf7845a51ec79f1a8602f URL: https://github.com/llvm/llvm-project/commit/161fc1d9118f4f64887cf7845a51ec79f1a8602f DIFF: https://github.com/llvm/llvm-project/commit/161fc1d9118f4f64887cf7845a51ec79f1a8602f.diff

[clang] 38b39c3 - [clang] Add missing FileCheck colons

2020-04-14 Thread Jon Roelofs via cfe-commits
Author: Jon Roelofs Date: 2020-04-14T12:32:48-06:00 New Revision: 38b39c34ab0c860410e4ac7dc1b033ef14200be8 URL: https://github.com/llvm/llvm-project/commit/38b39c34ab0c860410e4ac7dc1b033ef14200be8 DIFF: https://github.com/llvm/llvm-project/commit/38b39c34ab0c860410e4ac7dc1b033ef14200be8.diff L

[PATCH] D77923: OpenCL: Fix some missing predefined macros

2020-04-14 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D77923#1979286 , @jvesely wrote: > > In D77923#1976497 , @jvesely wrote: > > > >> OPENCL_VERSION is something that should be really set by the opencl driver > >> rather than the compiler

[PATCH] D77836: [Attribute] Fix noderef attribute false-negatives

2020-04-14 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 257419. leonardchan added a comment. Rebased Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77836/new/ https://reviews.llvm.org/D77836 Files: clang/include/clang/Sema/Initialization.h clang/lib/Sema/Sem

[PATCH] D77721: [ASTImporter] Add support for importing fixed point literals

2020-04-14 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added a comment. Do these changes look ok to land? https://reviews.llvm.org/D57226 is pushed. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77721/new/ https://reviews.llvm.org/D77721 __

[PATCH] D77461: [WIP][clang-tidy] Remove false positive in AvoidNonConstGlobalVariables

2020-04-14 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/AvoidNonConstGlobalVariablesCheck.cpp:50 +// variables in a function. +if (!Variable->isLocalVarDecl()) { + diag(Variable->getLocation(), "variable %0 is non-const and global

[PATCH] D77910: AMDGPU: Define cl_khr_gl_sharing as a supported extension

2020-04-14 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D77910#1976171 , @b-sumner wrote: > I don't think we can guarantee this is or will be supported on all devices. > The language runtime makes this decision. We don't need to worry about theoretical devices. We should know the

[PATCH] D77461: [WIP][clang-tidy] Remove false positive in AvoidNonConstGlobalVariables

2020-04-14 Thread Kim Viggedal via Phabricator via cfe-commits
vingeldal updated this revision to Diff 257423. vingeldal marked an inline comment as done. vingeldal added a comment. Removed redundant condition in check Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77461/new/ https://reviews.llvm.org/D77461 Fi

[PATCH] D57226: [Fixed Point] [AST] Add an AST serialization code for fixed-point literals.

2020-04-14 Thread Vince Bridgers via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG161fc1d9118f: [Fixed Point] [AST] Add an AST serialization code for fixed-point literals. (authored by vabridgers, committed by einvbri ). Repository: rG LLVM Github Mono

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-14 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi updated this revision to Diff 257431. plotfi added a comment. Removing unintended change to Clang C API Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77233/new/ https://reviews.llvm.org/D77233 Files: clang/include/clang/AST/DeclObjC.h c

[PATCH] D78139: [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword

2020-04-14 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre created this revision. mgehre added reviewers: aaron.ballman, alexfh, hokein, njames93. Herald added a subscriber: xazax.hun. Herald added a project: clang. Before this PR, `modernize-use-using` would transform the typedef in template class TemplateKeyword { typedef typename a::temp

[PATCH] D77982: [Windows SEH] Fix the frame-ptr of a nested-filter within a _finally

2020-04-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Searching LocalDeclMap is less problematic, I guess... but still, it should be possible to something more straightforward. Maybe make startOutlinedSEHHelper store the actual ImplicitParamDecl, or something like that. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D78030: [TimeProfiler] Emit clock synchronization point

2020-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:266 + const auto BeginningOfTimeUs = SystemTime - ProcessLocalTime; + J.attribute("beginningOfTime", + BeginningOfTimeUs.time_since_epoch().count()); What is t

[PATCH] D78134: [Sema] Don't apply an lvalue-to-rvalue conversion to a discarded-value expression if it has an array type

2020-04-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. C++ says: [expr.context]p2: > In some contexts, an expression only appears for its side effects. Such an > expression is called a discarded-value expression. The array-to-pointer > (7.3.2) and function-to-pointer (7.3.3) standard conversions are not applied. > The lv

[PATCH] D78098: [CGExprAgg] Fix infinite loop in `findPeephole`

2020-04-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExprAgg.cpp:688 + +op = castE; } I liked the structure of the old code better, in case we want to look through other kinds of expressions. Please just add `op = castE->getSubExpr()` before

[PATCH] D78125: [AVR] Use the correct address space for non-prototyped function calls

2020-04-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:5051 llvm::Type *CalleeTy = getTypes().GetFunctionType(FnInfo); -CalleeTy = CalleeTy->getPointerTo(); +int AS = getTypes().getDataLayout().getProgramAddressSpace(); +CalleeTy = CalleeTy->get

[PATCH] D77918: [OpenMP] Avoid crash in preparation for diagnose of unsupported type

2020-04-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert marked an inline comment as done. jdoerfert added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:1831 "OpenMP device compilation mode is expected."); + // TODO: Do not check outside of functions for now as the targetDiag below + // requires

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-14 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: llvm/lib/Support/TimeProfiler.cpp:77 +static std::string getThreadName() { + SmallString<64> Name; You can define ThreadName a

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-14 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb marked 2 inline comments as done. broadwaylamb added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:77 +static std::string getThreadName() { + SmallString<64> Name; MaskRay wrote: > You can define ThreadName as `SmallString<0>` to

[PATCH] D78116: [AST] dont invaliate VarDecl when the initializer contains errors.

2020-04-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:11998 ExprResult Result = InitSeq.Perform(*this, Entity, Kind, Args, &DclT); if (Result.isInvalid()) { + auto RecoveryExpr = if the variable is an undeduced auto (and the type

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/docs/MatrixTypes.rst:79 + floating point type, convert the integer or floating point operand to the + underlying element type of the operand of matrix type. + fhahn wrote: > rjmccall wrote: > > You should standa

[PATCH] D78118: [analyzer] StdLibraryFunctionsChecker: Add option to display loaded summaries

2020-04-14 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus added a comment. This is a great idea, but the tests just seem to, well, test the new functionality? On a different issue, take a look at how certain help related frontend flags (not `-analyzer-config` ones!) skip the analysis, like `-analyzer-checker-help`, or `-analyzer-list-enable

[PATCH] D78030: [TimeProfiler] Emit clock synchronization point

2020-04-14 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb marked an inline comment as done. broadwaylamb added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:266 + const auto BeginningOfTimeUs = SystemTime - ProcessLocalTime; + J.attribute("beginningOfTime", + BeginningOfTimeUs.tim

[PATCH] D76612: [Matrix] Add draft specification for matrix support in Clang.

2020-04-14 Thread Sjoerd Meijer via Phabricator via cfe-commits
SjoerdMeijer added inline comments. Comment at: clang/docs/MatrixTypes.rst:27 +internal layout, overall size and alignment are implementation-defined. +A *matrix element type* must be a real type (as in C99 6.2.5p17) excluding +enumeration types or an implementation-defined half-

[PATCH] D78117: [AVR] Define __ELF__

2020-04-14 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. I agree that these tests are in the wrong directory; please prepare a patch that moves them. This patch is okay to go, though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D78100: [AST] Suppress the spammy "attempt to use a deleted fucntion" diagnostic.

2020-04-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added subscribers: adamcz, rsmith. sammccall added a comment. Sorry to go back and forth on this, but I'm not sure whether these diagnostics are actually spam to be suppressed. I think @adamcz mentioned these today as reasonable diagnostics we're enabling. @rsmith do you have an opini

[PATCH] D78085: [AST] Fix recovery-expr crash on invalid aligned attr.

2020-04-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/lib/AST/DeclBase.cpp:400 + for (; I != E; ++I) { +if (!I->isAlignmentDependent()) + Align = std::max(Align, I->getAlignment(Ctx)); This doesn't seem great - previously if e.g. codegen ends up needing th

[PATCH] D78030: [TimeProfiler] Emit clock synchronization point

2020-04-14 Thread Sergej Jaskiewicz via Phabricator via cfe-commits
broadwaylamb marked an inline comment as done. broadwaylamb added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:266 + const auto BeginningOfTimeUs = SystemTime - ProcessLocalTime; + J.attribute("beginningOfTime", + BeginningOfTimeUs.tim

[clang] 670f2f6 - [SVE] Remove calls to getBitWidth from clang

2020-04-14 Thread Christopher Tetreault via cfe-commits
Author: Christopher Tetreault Date: 2020-04-14T13:29:09-07:00 New Revision: 670f2f694bba24c2c2647d48e0bdf400365c283b URL: https://github.com/llvm/llvm-project/commit/670f2f694bba24c2c2647d48e0bdf400365c283b DIFF: https://github.com/llvm/llvm-project/commit/670f2f694bba24c2c2647d48e0bdf400365c28

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:77 +static std::string getThreadName() { + SmallString<64> Name; broadwaylamb wrote: > MaskRay wrote: > > You can define ThreadName as `SmallString<0>` to avoid this function. > Then

[PATCH] D76342: [OpenMP] Implement '#pragma omp tile'

2020-04-14 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. pong Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76342/new/ https://reviews.llvm.org/D76342 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D69088: [Lex] #pragma clang transform

2020-04-14 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69088/new/ https://reviews.llvm.org/D69088 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D77923: OpenCL: Fix some missing predefined macros

2020-04-14 Thread Jan Vesely via Phabricator via cfe-commits
jvesely added a comment. In D77923#1981398 , @arsenm wrote: > In D77923#1979286 , @jvesely wrote: > > > > In D77923#1976497 , @jvesely > > > wrote: > > > > > >> OPENCL_VERS

[PATCH] D78134: [Sema] Don't apply an lvalue-to-rvalue conversion to a discarded-value expression if it has an array type

2020-04-14 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added a comment. My first patch just did that and it seems to work. But the comment for `DefaultLvalueConversion` says "This is DefaultFunctionArrayLvalueConversion, except that it assumes the operand isn't of function or array type". It doesn't even have assertions to check that thoug

[PATCH] D77910: AMDGPU: Define cl_khr_gl_sharing as a supported extension

2020-04-14 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm updated this revision to Diff 257470. arsenm added a comment. Check triple OS CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77910/new/ https://reviews.llvm.org/D77910 Files: clang/lib/Basic/Targets/AMDGPU.h clang/test/Misc/amdgcn.languageOptsOpenCL.cl Index: clang/test/Mis

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 257465. craig.topper added a comment. Address some of the review comments. Primarily the ones in ImmutableGraph. I did de-templatize the method in X86LoadValueInjectionLoadHardening.cpp CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75936/new/

[PATCH] D78100: [AST] Suppress the spammy "attempt to use a deleted fucntion" diagnostic.

2020-04-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D78100#1981620 , @sammccall wrote: > Sorry to go back and forth on this, but I'm not sure whether these > diagnostics are actually spam to be suppressed. I think @adamcz mentioned > these today as reasonable diagnostics we're e

[PATCH] D78148: [CodeGen] make isTriviallyRecursive handle more trivial recursion

2020-04-14 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added reviewers: efriedma, serge-sans-paille. george.burgess.iv added a project: clang. Herald added a subscriber: cfe-commits. This function was not catching all forms of trivial recursion, meaning: void *memcpy(void *a, const void *b,

[PATCH] D76932: [AIX] emit .extern and .weak directive linkage

2020-04-14 Thread Digger via Phabricator via cfe-commits
DiggerLin updated this revision to Diff 257473. DiggerLin added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76932/new/ https://reviews.llvm.org/D76932 Files: clang/lib/Driver/ToolChains/AIX.cpp clang/test/Driver/ai

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper marked 6 inline comments as done. craig.topper added inline comments. Comment at: llvm/lib/Target/X86/ImmutableGraph.h:366 +std::vector TrimmedNodes(TrimNodes.size()); +for (size_type I = 0; I < TrimNodes.size(); ++I) { + TrimmedNodes[I] = TrimmedNodesSo

[PATCH] D77903: [SVE] Remove calls to getBitWidth from clang

2020-04-14 Thread Christopher Tetreault via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG670f2f694bba: [SVE] Remove calls to getBitWidth from clang (authored by ctetreau). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77903/new/ https://reviews.

[PATCH] D77115: [WebAssembly] Emit .llvmcmd and .llvmbc as custom sections

2020-04-14 Thread Sam Clegg via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3ea1c62cbae2: [WebAssembly] Emit .llvmcmd and .llvmbc as custom sections (authored by sbc100). Changed prior to commit: https://reviews.llvm.org/D77115?vs=253941&id=257476#toc Repository: rG LLVM Git

[clang] 9d2d6e7 - Emit Objective-C constructors as writable

2020-04-14 Thread Joerg Sonnenberger via cfe-commits
Author: Joerg Sonnenberger Date: 2020-04-14T22:32:34+02:00 New Revision: 9d2d6e71f096ad43b178c576adf94fc922034c73 URL: https://github.com/llvm/llvm-project/commit/9d2d6e71f096ad43b178c576adf94fc922034c73 DIFF: https://github.com/llvm/llvm-project/commit/9d2d6e71f096ad43b178c576adf94fc922034c73.

[PATCH] D78098: [CGExprAgg] Fix infinite loop in `findPeephole`

2020-04-14 Thread Ehud Katz via Phabricator via cfe-commits
ekatz marked an inline comment as done. ekatz added inline comments. Comment at: clang/lib/CodeGen/CGExprAgg.cpp:688 + +op = castE; } rjmccall wrote: > I liked the structure of the old code better, in case we want to look through > other kinds of expressi

[PATCH] D76342: [OpenMP] Implement '#pragma omp tile'

2020-04-14 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: clang/include/clang/AST/StmtOpenMP.h:4781-4784 +/// This represents the '#pragma omp tile' loop transformation directive. +class OMPTileDirective final +: public OMPLoopDirective, + private llvm::TrailingObjects { --

[PATCH] D68049: Propeller: Clang options for basic block sections

2020-04-14 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added a comment. Ping. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68049/new/ https://reviews.llvm.org/D68049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D77910: AMDGPU: Define cl_khr_gl_sharing as a supported extension

2020-04-14 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner added a comment. In D77910#1981429 , @arsenm wrote: > In D77910#1976171 , @b-sumner wrote: > > > I don't think we can guarantee this is or will be supported on all devices. > > The language runtime makes

[PATCH] D78098: [CGExprAgg] Fix infinite loop in `findPeephole`

2020-04-14 Thread Ehud Katz via Phabricator via cfe-commits
ekatz updated this revision to Diff 257482. ekatz added a comment. Use the old structure of the algorithm, with the fix, as requested. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78098/new/ https://reviews.llvm.org/D78098 Files: clang/lib/CodeGen/CGExprAgg.cpp clang/test/CodeGen/

[PATCH] D78134: [Sema] Don't apply an lvalue-to-rvalue conversion to a discarded-value expression if it has an array type

2020-04-14 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. It seems to me that there's as bug in the C++ specification here. The rules for discarded-value expressions say the lvalue-to-rvalue conversion is applied, whereas the rules for lvalue-to-rvalue conversions say one cannot be applied in this case. It's hard to guess what

[PATCH] D78134: [Sema] Don't apply an lvalue-to-rvalue conversion to a discarded-value expression if it has an array type

2020-04-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. That doesn't seem to be how we use it in practice; I'd just change the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78134/new/ https://reviews.llvm.org/D78134 ___ cf

[PATCH] D77572: [clang-tidy] add new check readability-use-anyofallof

2020-04-14 Thread Matthias Gehre via Phabricator via cfe-commits
mgehre added a comment. Thanks for the comments so far. I'm a bit lost now. Which changes that cannot wait for the next PR do you see necessary to get this check merged? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77572/new/ https://reviews.llvm

[PATCH] D75936: Add a Pass to X86 that builds a Condensed CFG for Load Value Injection (LVI) Gadgets [4/6]

2020-04-14 Thread Craig Topper via Phabricator via cfe-commits
craig.topper updated this revision to Diff 257488. craig.topper marked an inline comment as done. craig.topper added a comment. Fix some mistakes I made in the previous upload where I accidentally deleted the pipeline tests instead of updating them. CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D78027: [TimeProfiler] Emit real process ID and thread names

2020-04-14 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: llvm/lib/Support/TimeProfiler.cpp:249 + +for (const auto &TTP : ThreadTimeTraceProfilerInstances) { + writeMetadataEvent("thread_name", TTP->Tid, TTP->ThreadName); MaskRay wrote: > broadwaylamb wrote: > > MaskRa

[PATCH] D78155: [OpenMP] Use __OPENMP_NVPTX__ instead of _OPENMP in wrapper headers

2020-04-14 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: tra, hfinkel. Herald added subscribers: guansong, bollu, yaxunl. Herald added a project: clang. Due to recent changes we cannot use OpenMP in CUDA files anymore (PR45533) as the math handling of CUDA is different when _OPENMP is defined.

[PATCH] D78148: [CodeGen] make isTriviallyRecursive handle more trivial recursion

2020-04-14 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. Could you go into a little more detail what problem you're trying to resolve? isTriviallyRecursive is specifically a narrow hack to handle weird cases where a function is trying to hide the fact that it's calling itself, in ways that would convince gcc that the called

[clang] 91c8c74 - [CodeGen] clarify a comment; NFC

2020-04-14 Thread George Burgess IV via cfe-commits
Author: George Burgess IV Date: 2020-04-14T14:33:01-07:00 New Revision: 91c8c74180ced4b82da02f2544f3978f72003d37 URL: https://github.com/llvm/llvm-project/commit/91c8c74180ced4b82da02f2544f3978f72003d37 DIFF: https://github.com/llvm/llvm-project/commit/91c8c74180ced4b82da02f2544f3978f72003d37.d

[PATCH] D77233: [NFC] Refactoring PropertyAttributeKind for ObjCPropertyDecl and ObjCDeclSpec.

2020-04-14 Thread Puyan Lotfi via Phabricator via cfe-commits
plotfi marked an inline comment as done. plotfi added inline comments. Comment at: llvm/include/llvm/BinaryFormat/Dwarf.def:915 HANDLE_DW_APPLE_PROPERTY(0x2000, null_resettable) HANDLE_DW_APPLE_PROPERTY(0x4000, class) I have some concerns here too. How would

[PATCH] D78148: [CodeGen] make isTriviallyRecursive handle more trivial recursion

2020-04-14 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv abandoned this revision. george.burgess.iv added a comment. Nothing in the real world :) I was writing test-cases for a soon-to-be-in-your-inbox patch, and initially wrote `memcpy` recursion in terms of `memcpy`, rather than `__builtin_memcpy`. Wasn't sure if this was an overs

[PATCH] D77989: Allow disabling of vectorization using internal options

2020-04-14 Thread Wei Mi via Phabricator via cfe-commits
wmi accepted this revision. wmi added a comment. This revision is now accepted and ready to land. There is a comment about the bitwise operator, otherwise LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77989/new/ https://reviews.llvm.org/D7798

[PATCH] D78131: [SVE] Fix unsigned is always >= 0

2020-04-14 Thread Sander de Smalen via Phabricator via cfe-commits
sdesmalen accepted this revision. sdesmalen added a comment. This revision is now accepted and ready to land. LGTM, thanks for fixing @ctetreau! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78131/new/ https://reviews.llvm.org/D78131 ___

[PATCH] D78100: [AST] Suppress the spammy "attempt to use a deleted fucntion" diagnostic.

2020-04-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D78100#1981729 , @rsmith wrote: > In D78100#1981620 , @sammccall wrote: > > > Sorry to go back and forth on this, but I'm not sure whether these > > diagnostics are actually spam to be

[PATCH] D78098: [CGExprAgg] Fix infinite loop in `findPeephole`

2020-04-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGExprAgg.cpp:688 + +op = castE; } ekatz wrote: > rjmccall wrote: > > I liked the structure of the old code better, in case we want to look > > through other kinds of expressions. Please just

[PATCH] D74813: [RFC] Add hash of block contents to function block names

2020-04-14 Thread Alex Borcan via Phabricator via cfe-commits
alexbdv updated this revision to Diff 257508. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74813/new/ https://reviews.llvm.org/D74813 Files: clang/include/clang/AST/Mangle.h clang/lib/AST/Mangle.cpp clang/lib/CodeGen/CGBlocks.cpp clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeGen/

<    1   2   3   >