[PATCH] D76477: [clang-tidy] Update path of main translation unit

2020-03-19 Thread Jens Carl via Phabricator via cfe-commits
j-carl created this revision. Herald added subscribers: cfe-commits, xazax.hun. Herald added a project: clang. j-carl added a reviewer: alexfh. j-carl added a project: clang-tools-extra. j-carl edited the summary of this revision. j-carl removed a reviewer: alexfh. j-carl added a reviewer: alexfh.

[PATCH] D75591: [OpenMP] Add firstprivate as a default data-sharing attribute to clang

2020-03-19 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I'm satisfied with this, @fghanim wdyt? Comment at: clang/lib/Sema/SemaOpenMP.cpp:5102 Diag(P.second->getExprLoc(), diag::err_omp_no_dsa_for_variable) << P.first << P.second->getSourceRange(); Diag(DSAStack->getDefaultDSALocat

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

2020-03-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In D75184#1914788 , @njames93 wrote: > In D75184#1914705 , @DmitryPolukhin > wrote: > > > You are absolutely right about current behaviour. Thank you for catching > > this odd behaviour. I'

[PATCH] D57497: [RISCV] Passing small data limitation value to RISCV backend

2020-03-19 Thread Shiva Chen via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rGfc3752665f4b: [RISCV] Passing small data limitation value to RISCV backend (authored by shiva0217). Changed prior to comm

[PATCH] D66094: [CodeGen] Emit destructor calls for non-trivial C structs returned by function calls and loaded from volatile objects

2020-03-19 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. Thank, this looks great. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66094/new/ https://reviews.llvm.org/D66094 ___

[clang] fc37526 - [RISCV] Passing small data limitation value to RISCV backend

2020-03-19 Thread via cfe-commits
Author: Shiva Chen Date: 2020-03-20T11:03:51+08:00 New Revision: fc3752665f4b7ae2ec3faad4204512687800c1ec URL: https://github.com/llvm/llvm-project/commit/fc3752665f4b7ae2ec3faad4204512687800c1ec DIFF: https://github.com/llvm/llvm-project/commit/fc3752665f4b7ae2ec3faad4204512687800c1ec.diff LO

[PATCH] D60748: Adds an option "malign-pass-aggregate" to make the alignment of the struct and union parameters compatible with the default gcc

2020-03-19 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 added a comment. > I think at least the initial patch is correct. I re-read your comment above, please ignore this sentence. Sorry for the noise. My question now is that since we cannot guarantee that we are doing the right thing, is this patch necessary? CHANGES SINCE LAST ACTION h

[PATCH] D76416: [WIP][ASan] Apply -ffile-prefix-map mappings to ASan instrumentation

2020-03-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan added a subscriber: mcgrathr. leonardchan added a comment. Putting this on hold for now. Although this implementation works for ASan, it would be have to be repeated for other tools like SourceBasedCoverage or other sanitizers. After discussing with @phosek and @mcgrathr, a more gen

[PATCH] D60748: Adds an option "malign-pass-aggregate" to make the alignment of the struct and union parameters compatible with the default gcc

2020-03-19 Thread LiuChen via Phabricator via cfe-commits
LiuChen3 marked 3 inline comments as done. LiuChen3 added a comment. In D60748#1931440 , @jyknight wrote: > Since the ABI this is trying to match is not documented literally anywhere, I > think we need to have some confidence that what this implements is

[PATCH] D76472: AMDGPU: Emit llvm.fshr for __builtin_amdgcn_alignbit

2020-03-19 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm created this revision. arsenm added reviewers: yaxunl, rampitec. Herald added subscribers: kerbowa, t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely, kzhuravl. These are equivalent. The generic rotate builtins do not directly map to the fshr intrinsic. https://reviews.llvm.org/D76472 File

[PATCH] D76397: [WebAssembly] SIMD bitmask intrinsics and builtin functions

2020-03-19 Thread Thomas Lively via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa3f974f3c332: [WebAssembly] SIMD bitmask intrinsics and builtin functions (authored by tlively). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76397/new/ ht

[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

2020-03-19 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Ping! I would expect this to be non-controversial, but if there is a different reviewer anyone can suggest, I'd appreciate it! Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75685/new/ https://reviews.llvm.org/D75685 __

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D76365#1932439 , @hliao wrote: > > That's a magic. I could not figure out how it works. From its use, e.g. > `tex2D` on `texture`, > > __nv_tex_surf_handler("__tex2D_v2", (typename __nv_tex_rmet_cast::type) > &temp, t, x, y

[clang] a3f974f - [WebAssembly] SIMD bitmask intrinsics and builtin functions

2020-03-19 Thread Thomas Lively via cfe-commits
Author: Thomas Lively Date: 2020-03-19T17:15:37-07:00 New Revision: a3f974f3c3321d602a49f8ada3d3d4dd34db792a URL: https://github.com/llvm/llvm-project/commit/a3f974f3c3321d602a49f8ada3d3d4dd34db792a DIFF: https://github.com/llvm/llvm-project/commit/a3f974f3c3321d602a49f8ada3d3d4dd34db792a.diff

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7329 + if (Result.isLValue()) +return Success(Result, E); +} wchilders wrote: > rsmith wrote: > > wchilders wrote: > > > This doesn't seem to be the right answer, and `Const

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D76365#1932398 , @tra wrote: > I believe LLVM does have `nvvm.texsurf.handle` implemented: > https://github.com/llvm/llvm-project/blob/d9972f848294b06807c8764615852ba2bc1e8a74/llvm/include/llvm/IR/IntrinsicsNVVM.td#L1150 This o

[PATCH] D76447: Apply ConstantEvaluated evaluation contexts to more manifestly constant evaluated scopes

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16793-16797 + if (isManifestlyEvaluatedVar(*this, D)) { +using ExpressionKind = ExpressionEvaluationContextRecord::ExpressionKind; + +PushExpressionEvaluationContext( +ExpressionEvaluatio

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D76365#1932392 , @tra wrote: > > Note that, clang-based one needs defining texture fetch functions as they > > could not be reused from CUDA SDK. That part is enclosed with #if > > defined(__clang__). > > What prevents clang to

[PATCH] D76452: Use LLD by default for Android.

2020-03-19 Thread Dan Albert via Phabricator via cfe-commits
danalbert updated this revision to Diff 251498. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76452/new/ https://reviews.llvm.org/D76452 Files: clang/lib/Driver/ToolChains/Linux.h clang/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1135 +llvm::MD5 Md5; +Md5.update(getModule().getSourceFileName()); +llvm::MD5::MD5Result R; tmsriram wrote: > hubert.reinterpretcast wrote: > > davidxl wrote

[PATCH] D76458: Add Indirect Thunk Support to X86 to mitigate Load Value Injection (LVI) [by modifying X86RetpolineThunks.cpp]

2020-03-19 Thread Zola Bridges via Phabricator via cfe-commits
zbrid added inline comments. Comment at: llvm/lib/Target/X86/X86.td:437 +: SubtargetFeature< + "lvi-cfi", "UseLVIControlFlowIntegrity", "true", + "Prevent indirect calls/branches from using a memory operand, and " Also to follow up on the di

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. I believe LLVM does have `nvvm.texsurf.handle` implemented: https://github.com/llvm/llvm-project/blob/d9972f848294b06807c8764615852ba2bc1e8a74/llvm/include/llvm/IR/IntrinsicsNVVM.td#L1150 We also appear to have some plumbing for it in clang: https://github.com/llvm/llvm-pro

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. > Note that, clang-based one needs defining texture fetch functions as they > could not be reused from CUDA SDK. That part is enclosed with #if > defined(__clang__). What prevents clang to compile the texture functions in the CUDA headers? It looks like we'll need to imple

[PATCH] D76455: [NFC] Refactor handling of Xarch option

2020-03-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D76455#1932232 , @tra wrote: > +1 for refactoring, but what's the long term plan. > Long time ago echristo@ and I had a vague idea to change clang's option > parsing to allow something like ` -Xarch_host -Xarch_device > -Xar

[PATCH] D75661: Remove SequentialType from the type heirarchy.

2020-03-19 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. Thank you for this patch! Personally I find the code more readable without the SequentialType abstraction and the use of the GEP interface (getTypeAtIndex(Type, Idx)) you added in D75660

[PATCH] D75010: [OpenMP] Adding InaccessibleMemOnly and InaccessibleMemOrArgMemOnly for runtime calls.

2020-03-19 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. LGTM if the test all pass. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75010/new/ https://reviews.llvm.org/D75010 ___ cfe-commits mailing

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram marked 4 inline comments as done. tmsriram added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1135 +llvm::MD5 Md5; +Md5.update(getModule().getSourceFileName()); +llvm::MD5::MD5Result R; hubert.reinterpretcast wrote: > davi

[PATCH] D76458: Add Indirect Thunk Support to X86 to mitigate Load Value Injection (LVI) [by modifying X86RetpolineThunks.cpp]

2020-03-19 Thread Zola Bridges via Phabricator via cfe-commits
zbrid added a comment. I commented on the other patch about this before I saw this patch. Thanks for putting this up! I think it looks pretty good, but could you do a more full refactor of the retpolinethunks pass in an NFC patch? Then have the LVI functionality added on top of that refactored

[PATCH] D76189: [Fuchsia] Use -ffile-prefix-map

2020-03-19 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG98223f7931f2: [Fuchsia] Use -ffile-prefix-map (authored by phosek). Changed prior to commit: https://reviews.llvm.org/D76189?vs=250401&id=251491#toc Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. With this revision, the following sample could be compiled with CUDA SDK and almost the same PTX code is generated. #include texture tex; #if defined(__clang__) struct v4f { float x, y, z, w; }; __device__ v4f tex_2d_ld(texture, float,

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders marked an inline comment as done. wchilders added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7329 + if (Result.isLValue()) +return Success(Result, E); +} rsmith wrote: > wchilders wrote: > > This doesn't seem to be the

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/unique-internal-funcnames.c:3 + +// RUN: %clang -target x86_64 -S -o - %s | FileCheck %s --check-prefix=PLAIN +// RUN: %clang -target x86_64 -S -funique-internal-funcnames -o - %s | FileCheck %s --check-prefix=UNIQUE

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 251488. hliao added a comment. More refinement to compile sample code with CUDA headers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76365/new/ https://reviews.llvm.org/D76365 Files: clang/include/clang/AST/

[PATCH] D75934: Add Indirect Thunk Support to X86 to mitigate Load Value Injection (LVI) [2/6]

2020-03-19 Thread Zola Bridges via Phabricator via cfe-commits
zbrid added a comment. I followed up with Chandler about whether it would make sense to integrate this with the existing retpolines pass as you and Craig suggested. He supported the idea. Could you create a new patch(es) to do the refactor/renaming of the retpolines thunking pass and instructio

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1135 +llvm::MD5 Md5; +Md5.update(getModule().getSourceFileName()); +llvm::MD5::MD5Result R; davidxl wrote: > rnk wrote: > > davidxl wrote: > > > Source filen

[PATCH] D76458: Add Indirect Thunk Support to X86 to mitigate Load Value Injection (LVI) [by modifying X86RetpolineThunks.cpp]

2020-03-19 Thread Scott Constable via Phabricator via cfe-commits
sconstab created this revision. sconstab added reviewers: zbrid, craig.topper, andrew.w.kaylor, chandlerc. Herald added subscribers: jfb, hiraditya. This patch is an alternate implementation of D75934 that mitigates LVI indirect calls/jumps by making changes to

[PATCH] D76455: [NFC] Refactor handling of Xarch option

2020-03-19 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. +1 for refactoring, but what's the long term plan. Long time ago echristo@ and I had a vague idea to change clang's option parsing to allow something like ` -Xarch_host -Xarch_device -Xarch= only...>` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76455/new/ http

[PATCH] D76140: [InlineFunction] update attributes during inlining

2020-03-19 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1172 +return true; +return false; + }; `mayThrow` is not sufficient. As with my earlier example, a potential `exit` is sufficient to break this, thus you need

[PATCH] D60748: Adds an option "malign-pass-aggregate" to make the alignment of the struct and union parameters compatible with the default gcc

2020-03-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: clang/include/clang/Basic/LangOptions.def:353 +VALUE_LANGOPT(AlignPassingAggregate, 1, 0, "Compatible with gcc default passing struct and union (x86 only).") + If only codegen needs to know, a CodeGenOption would be bette

[clang] 98223f7 - [Fuchsia] Use -ffile-prefix-map

2020-03-19 Thread Petr Hosek via cfe-commits
Author: Petr Hosek Date: 2020-03-19T15:14:15-07:00 New Revision: 98223f7931f263a38435c51c026d7dcd9bf11a68 URL: https://github.com/llvm/llvm-project/commit/98223f7931f263a38435c51c026d7dcd9bf11a68 DIFF: https://github.com/llvm/llvm-project/commit/98223f7931f263a38435c51c026d7dcd9bf11a68.diff LO

[PATCH] D76098: [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb89202e842ac: [clangd] Do not trigger go-to-def textual fallback inside string literals (authored by nridge). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D7

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread David Li via Phabricator via cfe-commits
davidxl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1135 +llvm::MD5 Md5; +Md5.update(getModule().getSourceFileName()); +llvm::MD5::MD5Result R; rnk wrote: > davidxl wrote: > > Source filenames are not guaranteed to be unique

[PATCH] D76424: [AST] Use TypeDependence bitfield to calculate dependence on Types. NFC

2020-03-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang/include/clang/AST/Type.h:2882 - Pointee->isInstantiationDependentType()), - Pointee->isVariablyModifiedType(), - (Cls->containsUnexpandedParameterPack() || hokein wrote: > we

[PATCH] D76424: [AST] Use TypeDependence bitfield to calculate dependence on Types. NFC

2020-03-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 251478. sammccall marked 5 inline comments as done. sammccall added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76424/new/ https://reviews.llvm.org/D76424 Files: clang/include

[PATCH] D76098: [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 251476. nridge added a comment. Use WordStart Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76098/new/ https://reviews.llvm.org/D76098 Files: clang-tools-extra/clangd/XRefs.cpp clang-tools-extra/clangd/unit

[PATCH] D76098: [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:381 + // to activate, are not retained by TokenBuffer). + for (syntax::Token T : syntax::spelledTokensTouching(Loc, AST.getTokens())) { +if (T.range(AST.get

[clang-tools-extra] b89202e - [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-19 Thread Nathan Ridge via cfe-commits
Author: Nathan Ridge Date: 2020-03-19T17:24:45-04:00 New Revision: b89202e842acda4d6519cb45c98128827df84a2f URL: https://github.com/llvm/llvm-project/commit/b89202e842acda4d6519cb45c98128827df84a2f DIFF: https://github.com/llvm/llvm-project/commit/b89202e842acda4d6519cb45c98128827df84a2f.diff

[PATCH] D76392: [AST] Make Expr::setDependence protected and remove add/removeDependence. NFC

2020-03-19 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb4f02d89e5d8: [AST] Make Expr::setDependence protected and remove add/removeDependence. NFC (authored by sammccall). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D76455: [NFC] Refactor handling of Xarch option

2020-03-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Extract common code to a function. To prepare for adding an option for CUDA/HIP host and device only option. https://reviews.llvm.org/D76455 Files: clang/include/clang/Driver/ToolChain.h clang/lib/Driver/ToolChain.cpp clang/lib/

[PATCH] D76447: Apply ConstantEvaluated evaluation contexts to more manifestly constant evaluated scopes

2020-03-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:16793-16797 + if (isManifestlyEvaluatedVar(*this, D)) { +using ExpressionKind = ExpressionEvaluationContextRecord::ExpressionKind; + +PushExpressionEvaluationContext( +ExpressionEvaluationCo

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram updated this revision to Diff 251469. tmsriram marked 4 inline comments as done. tmsriram added a comment. Address reviewer comments. - reword comment - rewrite test to use -emit-llvm CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73307/new/ https://reviews.llvm.org/D73307 Fil

[PATCH] D76385: Allow remapping Clang module include paths

2020-03-19 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:2487 + // Return a StringRef to the remapped Path. + auto RemapPath = [&](std::string Path) -> std::string { +Path = remapDIPath(Path); `&` -> `&TheCU` We should try to explicitly

[PATCH] D76432: [clangd] Add a tweak for adding "using" statement.

2020-03-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This seems really well-thought-out. I'm being (even) more verbose than usual about the interesting AST details. Please do push back/defer fixing anything that adds a lot of complexity and doesn't seem important. Comment at: clang-tools-extra/clangd/

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I guess my initial reaction is that it is disappointing that downstream consumers can't cope with non-unique symbol names (What is the point of having internal linkage if we can't rely on it?), but given @mtrofin's input about AFDO, this seems like it may be a practical sol

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram added inline comments. Comment at: clang/test/CodeGen/unique-internal-funcnames.c:16 +// UNIQUE-NOT: foo: +// UNIQUE: foo.{{[0-9a-f]+}}: lebedev.ri wrote: > What does `getModule().getSourceFileName()` contain? > The full path to the source file, or just

[clang] b4f02d8 - [AST] Make Expr::setDependence protected and remove add/removeDependence. NFC

2020-03-19 Thread Sam McCall via cfe-commits
Author: Sam McCall Date: 2020-03-19T21:54:40+01:00 New Revision: b4f02d89e5d8d2e3b85abced3964c937b693494c URL: https://github.com/llvm/llvm-project/commit/b4f02d89e5d8d2e3b85abced3964c937b693494c DIFF: https://github.com/llvm/llvm-project/commit/b4f02d89e5d8d2e3b85abced3964c937b693494c.diff LO

[PATCH] D66094: [CodeGen] Emit destructor calls for non-trivial C structs returned by function calls and loaded from volatile objects

2020-03-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak updated this revision to Diff 251463. ahatanak marked an inline comment as done. ahatanak added a comment. Teach `Expr::isConstantInitializer` that `ExprWithCleanups` can be a constant. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66094/ne

[PATCH] D76451: [clangd] Enable textual fallback for go-to-definition on dependent names

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge marked an inline comment as done. nridge added inline comments. Comment at: clang-tools-extra/clangd/XRefs.cpp:234 ParsedAST &AST, llvm::StringRef MainFilePath, - const SymbolIndex *Index) { + const SymbolIndex *Index, b

[PATCH] D76452: Use LLD by default for Android.

2020-03-19 Thread Dan Albert via Phabricator via cfe-commits
danalbert created this revision. danalbert added a reviewer: srhines. danalbert added a project: clang. Herald added a subscriber: cryptoad. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D76452 Files: clang/lib/Driver/ToolChains/Linux.h clang/test/Driver/Inputs/basic_android

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/AST/Expr.cpp:2875 - else if (auto *CE = dyn_cast(E)) -return CE->getSubExpr(); - return E; } wchilders wrote: > `IgnoreParensSingleStep` for some reason has been unwrapping `ConstantExpr`s. > This re

[PATCH] D76451: [clangd] Enable textual fallback for go-to-definition on dependent names

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge created this revision. nridge added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. nridge marked an inline comment as done. nridge added inline comments. Comment

[PATCH] D66094: [CodeGen] Emit destructor calls for non-trivial C structs returned by function calls and loaded from volatile objects

2020-03-19 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:677 + E->getType().isDestructedType() == QualType::DK_nontrivial_c_struct) +Cleanup.setExprNeedsCleanups(true); + rjmccall wrote: > ahatanak wrote: > > rjmccall wrote: > > > ahatanak

[PATCH] D76447: Apply ConstantEvaluated evaluation contexts to more manifestly constant evaluated scopes

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders marked an inline comment as done. wchilders added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:15597 + (Rec.isConstantEvaluated() && + Rec.ExprContext != ExpressionKind::EK_ConstexprVarInit)) { ExprCleanupObjects.erase(ExprCleanupObjects.begi

[PATCH] D76447: Apply ConstantEvaluated evaluation contexts to more manifestly constant evaluated scopes

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: Tyker, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. wchilders marked an inline comment as done. wchilders added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:15597 + (Rec

[PATCH] D73898: [analyzer] StdLibraryFunctionsChecker: Add argument constraints

2020-03-19 Thread Kristóf Umann via Phabricator via cfe-commits
Szelethus accepted this revision. Szelethus added a comment. This revision is now accepted and ready to land. Whoo! The patch looks great and well thought out, the tests look like they cover everything and we also talked about plans for future patches. Excellent! I left a nit about merging the t

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram marked an inline comment as done. tmsriram added inline comments. Comment at: clang/test/CodeGen/unique-internal-funcnames.c:3 + +// RUN: %clang -target x86_64 -S -o - %s | FileCheck %s --check-prefix=PLAIN +// RUN: %clang -target x86_64 -S -funique-internal-funcnames -o

[clang] b20ab41 - Teach TreeTransform to substitute into resolved TemplateArguments.

2020-03-19 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2020-03-19T12:43:11-07:00 New Revision: b20ab412bf838a8a87e5cc1c8c6399c3c9255354 URL: https://github.com/llvm/llvm-project/commit/b20ab412bf838a8a87e5cc1c8c6399c3c9255354 DIFF: https://github.com/llvm/llvm-project/commit/b20ab412bf838a8a87e5cc1c8c6399c3c9255354.diff

[PATCH] D76140: [InlineFunction] update attributes during inlining

2020-03-19 Thread Anna Thomas via Phabricator via cfe-commits
anna updated this revision to Diff 251447. anna added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. fixed clang tests. rot-intrinsics.c testcase has 5 different RUNs with 3 prefixes. Depending on target-triple, the attribute is added to the caller, so I've dis

[PATCH] D76310: [Hexagon] Add linux #defines when linux triple is selected

2020-03-19 Thread Sid Manning via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG430c9a80c17b: [Hexagon] Enable linux #defines (authored by sidneym). Repository: rG LLVM Github Monorepo CHANGES SINCE

[clang] 430c9a8 - [Hexagon] Enable linux #defines

2020-03-19 Thread Sid Manning via cfe-commits
Author: Sid Manning Date: 2020-03-19T14:33:49-05:00 New Revision: 430c9a80c17b00ec65b8254810e3c9e122d13f98 URL: https://github.com/llvm/llvm-project/commit/430c9a80c17b00ec65b8254810e3c9e122d13f98 DIFF: https://github.com/llvm/llvm-project/commit/430c9a80c17b00ec65b8254810e3c9e122d13f98.diff L

[PATCH] D76444: Use FinishThunk to finish musttail thunks

2020-03-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: hans, rjmccall. Herald added a project: clang. FinishThunk, and the invariant of setting and then unsetting CurCodeDecl, was added in 7f416cc42638 (2015). The invariant didn't exist when I added this musttail codepath in ab2090d10765 (2014). Recently

[PATCH] D76443: Use ConstantExpr cached APValues if present for code generation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:1095 +// preventing the cached results from being used. +if (!isa(fe)) { + enterFullExpression(fe); This one is a bit weird, I think the comment explains it well, but I feel th

[PATCH] D76443: Use ConstantExpr cached APValues if present for code generation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: void, Tyker, rsmith. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. wchilders added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:1095 +// preventing the cached results from be

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread David Li via Phabricator via cfe-commits
davidxl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1129 + // should get unique names. Use the hash of module name to get a unique + // identifier and this is a best effort. + if (getCodeGenOpts().UniqueInternalFuncNames && lebedev.

[clang] a983562 - Precommit test for clang::CallGraph declared functions.

2020-03-19 Thread Erich Keane via cfe-commits
Author: Erich Keane Date: 2020-03-19T12:00:30-07:00 New Revision: a983562b23458777a7226ec6cfe41cbeb9d291de URL: https://github.com/llvm/llvm-project/commit/a983562b23458777a7226ec6cfe41cbeb9d291de DIFF: https://github.com/llvm/llvm-project/commit/a983562b23458777a7226ec6cfe41cbeb9d291de.diff L

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread David Li via Phabricator via cfe-commits
davidxl added a comment. As far as I understand, this is not a propeller specific patch, but it fixes a general problem in AFDO as well. Perhaps change the summary to reflect that? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73307/new/ https://reviews.llvm.org/D73307 _

[PATCH] D76238: [SveEmitter] Implement builtins for contiguous loads/stores

2020-03-19 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: clang/include/clang/Basic/AArch64SVETypeFlags.h:72 + bool isStructStore() const { return Flags & IsStructStore; } + bool isZxtReturn() const { return Flags & IsZxtReturn; } + SjoerdMeijer wrote: > nit: this one is non

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1129 + // should get unique names. Use the hash of module name to get a unique + // identifier and this is a best effort. + if (getCodeGenOpts().UniqueInternalFuncNames && maybe

[PATCH] D74918: Add method to TargetInfo to get CPU cache line size

2020-03-19 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D74918#1931488 , @zoecarver wrote: > @lebedev.ri LLVM may be better, I'm not sure. If you feel strongly I can move > it. I do think that it makes much more sense somewhere closer to the backend > @jyknight I'm planning on

[PATCH] D76416: [ASan] Apply -ffile-prefix-map mappings to ASan instrumentation

2020-03-19 Thread Leonard Chan via Phabricator via cfe-commits
leonardchan updated this revision to Diff 251421. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76416/new/ https://reviews.llvm.org/D76416 Files: clang/include/clang/Basic/CodeGenOptions.h clang/lib/CodeGen/ModuleBuilder.cpp clang/lib/CodeGen/

[PATCH] D76130: [PPC][AIX] Implement variadic function handling in LowerFormalArguments_AIX

2020-03-19 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA added inline comments. Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:7076 +static const MCPhysReg GPR_64[] = {PPC::X3, PPC::X4, PPC::X5, PPC::X6, + PPC::X7, PPC::X8, PPC::X9, PPC::X10}; +unsigned const NumGPArgRegs =

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders added inline comments. Comment at: clang/lib/AST/Expr.cpp:2875 - else if (auto *CE = dyn_cast(E)) -return CE->getSubExpr(); - return E; } `IgnoreParensSingleStep` for some reason has been unwrapping `ConstantExpr`s. This results in the const

[PATCH] D76438: ConstantExpr cached APValues if present for constant evaluation

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders created this revision. wchilders added reviewers: Tyker, rsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch allows the constant evaluator to use `APValueResult`s from `ConstantExpr`s. There are some outstanding concerns I'll mark with inline comme

[PATCH] D76098: [clangd] Do not trigger go-to-def textual fallback inside string literals

2020-03-19 Thread Nathan Ridge via Phabricator via cfe-commits
nridge updated this revision to Diff 251418. nridge added a comment. Take a blacklisting approach Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76098/new/ https://reviews.llvm.org/D76098 Files: clang-tools-extra/clangd/XRefs.cpp clang-tools-ex

[PATCH] D76360: [PPC][AIX] Emit correct Vaarg for 32BIT-AIX in clang

2020-03-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:4176 +/// PPC32_SVR4_ABIInfo - The 32-bit PowerPC ABI information, used by PowerPC ELF +/// (SVR4), Darwin and AIX. class PPC32_SVR4_ABIInfo : public DefaultABIInfo { I w

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/CodeGen/unique-internal-funcnames.c:3 + +// RUN: %clang -target x86_64 -S -o - %s | FileCheck %s --check-prefix=PLAIN +// RUN: %clang -target x86_64 -S -funique-internal-funcnames -o - %s | FileCheck %s --check-prefix=UNIQUE

[PATCH] D76396: Allow immediate invocation of constructors

2020-03-19 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D76396#1930773 , @Tyker wrote: > I have already a patch aiming to do the same thing. D74007 > Thanks. Sorry I dropped the ball on that one. =/ Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D66094: [CodeGen] Emit destructor calls for non-trivial C structs returned by function calls and loaded from volatile objects

2020-03-19 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:677 + E->getType().isDestructedType() == QualType::DK_nontrivial_c_struct) +Cleanup.setExprNeedsCleanups(true); + ahatanak wrote: > rjmccall wrote: > > ahatanak wrote: > > > rjmccall

[PATCH] D76393: Allow remapping the sysroot with -fdebug-prefix-map.

2020-03-19 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 251412. aprantl added a comment. Herald added a subscriber: hiraditya. Don't try to be too clever with the strings. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76393/new/ https://reviews.llvm.org/D76393 Files: clang/lib/CodeGen/CGDebugInfo.cpp

[PATCH] D76385: Allow remapping Clang module include paths

2020-03-19 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl updated this revision to Diff 251411. aprantl added a comment. Don't try to be too clever. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76385/new/ https://reviews.llvm.org/D76385 Files: clang/lib/CodeGen/CGDebugInfo.cpp clang/test/Modules/debug-info-moduleimport.m Index:

[PATCH] D76130: [PPC][AIX] Implement variadic function handling in LowerFormalArguments_AIX

2020-03-19 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA updated this revision to Diff 251408. ZarkoCA marked 11 inline comments as done. ZarkoCA added a comment. Addressed code comments, working on adding and fixing tests for further clarity. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76130/ne

[PATCH] D76396: Allow immediate invocation of constructors

2020-03-19 Thread Wyatt Childers via Phabricator via cfe-commits
wchilders abandoned this revision. wchilders added a comment. In D76396#1930773 , @Tyker wrote: > I have already a patch aiming to do the same thing. D74007 > Oof, okay, sounds good. I was not aware of this patch, it lo

[PATCH] D76360: [PPC][AIX] Emit correct Vaarg for 32BIT-AIX in clang

2020-03-19 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA marked 8 inline comments as done. ZarkoCA added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:4175 namespace { /// PPC32_SVR4_ABIInfo - The 32-bit PowerPC ELF (SVR4) ABI information. class PPC32_SVR4_ABIInfo : public DefaultABIInfo { sf

[PATCH] D73307: Unique Names for Functions with Internal Linkage

2020-03-19 Thread Sriraman Tallam via Phabricator via cfe-commits
tmsriram updated this revision to Diff 251409. tmsriram marked 2 inline comments as done. tmsriram added a comment. Address reviewer comments. Fix test and delete blank line. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73307/new/ https://reviews.llvm.org/D73307 Files: clang/includ

[PATCH] D76360: [PPC][AIX] Emit correct Vaarg for 32BIT-AIX in clang

2020-03-19 Thread Zarko Todorovski via Phabricator via cfe-commits
ZarkoCA updated this revision to Diff 251407. ZarkoCA marked 3 inline comments as done. ZarkoCA added a comment. Changed comments per suggestions. Added `va_copy` in test case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76360/new/ https://reviews.llvm.org/D76360 Files: clang/lib/

[PATCH] D76418: [Syntax] Build template declaration nodes

2020-03-19 Thread Dmitri Gribenko via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG88bf9b3d26f0: [Syntax] Build template declaration nodes (authored by hlopko, committed by gribozavr). Changed prior to co

[clang] 88bf9b3 - [Syntax] Build template declaration nodes

2020-03-19 Thread Dmitri Gribenko via cfe-commits
Author: Marcel Hlopko Date: 2020-03-19T17:43:07+01:00 New Revision: 88bf9b3d26f06eaf33972d1f371edc4cb187ff1a URL: https://github.com/llvm/llvm-project/commit/88bf9b3d26f06eaf33972d1f371edc4cb187ff1a DIFF: https://github.com/llvm/llvm-project/commit/88bf9b3d26f06eaf33972d1f371edc4cb187ff1a.diff

[PATCH] D74918: Add method to TargetInfo to get CPU cache line size

2020-03-19 Thread Zoe Carver via Phabricator via cfe-commits
zoecarver marked 3 inline comments as done. zoecarver added a comment. @lebedev.ri LLVM may be better, I'm not sure. If you feel strongly I can move it. @jyknight I'm planning on adding a builtin that uses this method. I can put the patch up for that first if you would like.

[PATCH] D76433: [Syntax] Make TreeTest independent from the host platform.

2020-03-19 Thread Marcel Hlopko via Phabricator via cfe-commits
hlopko updated this revision to Diff 251399. hlopko added a comment. Reformat Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76433/new/ https://reviews.llvm.org/D76433 Files: clang/unittests/Tooling/Syntax/TreeTest.cpp Index: clang/unittests/To

[PATCH] D69330: [AST] Add RecoveryExpr to retain expressions on semantic errors

2020-03-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. all prerequisite patches have been landed, it is time to land this patch now. Would be nice to have a second look before committing it +@sammccall. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69330/new/ https://reviews.ll

  1   2   >