[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield created this revision. mbenfield added reviewers: george.burgess.iv, cjdb, aeubanks. mbenfield requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. These are intended to mimic warnings available in gcc. Repository: rG LLVM Github M

[PATCH] D100509: Support GCC's -fstack-usage flag

2021-04-15 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Set current_function_has_unbounded_dynamic_stack_size to 1 when pushing a variable-sized argument onto the stack. if (current_function_has_unbounded_dynamic_stack_size) stack_usage_kind = DYNAMIC; else stack_usage_kind = DYNAMIC_BOUN

[clang] e0c2125 - [OpenMP] Added codegen for masked directive

2021-04-15 Thread via cfe-commits
Author: cchen Date: 2021-04-15T12:55:07-05:00 New Revision: e0c2125d1d1e72039b8e071d468d9f740c7dbfbd URL: https://github.com/llvm/llvm-project/commit/e0c2125d1d1e72039b8e071d468d9f740c7dbfbd DIFF: https://github.com/llvm/llvm-project/commit/e0c2125d1d1e72039b8e071d468d9f740c7dbfbd.diff LOG: [O

[PATCH] D100514: [OpenMP] Added codegen for masked directive

2021-04-15 Thread Chi Chun Chen 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 rGe0c2125d1d1e: [OpenMP] Added codegen for masked directive (authored by cchen). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield added a comment. This is my first code submitted to LLVM; please tell me anything that should be done differently. A couple decisions that should be considered: - These warnings are not enabled by any other flags. This is different from gcc, where `-Wunused-but-set-variable` is enabl

[PATCH] D100492: [OpenCL] Change OpenCL builtin version encoding

2021-04-15 Thread Anton Zabaznov via Phabricator via cfe-commits
azabaznov added inline comments. Comment at: clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp:507 +if (VersionIDs[I] >= MinVersion && VersionIDs[I] < MaxVersion) { + Encoded |= 1 << I; +} svenvh wrote: > azabaznov wrote: > > nit: Encoded |= clang::

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield updated this revision to Diff 337842. mbenfield added a comment. bugfix: don't increment FalseCount when the value was already false Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100581/new/ https://reviews.llvm.org/D100581 Files: clan

[PATCH] D96524: [OpenCL] Add support of OpenCL C 3.0 __opencl_c_fp64

2021-04-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D96524#2691428 , @azabaznov wrote: > My main idea was to provide an interface which will not make users to specify > `-cl-ext=+__opencl_c_fp64,+cl_khr_fp64`/ > `-cl-ext=-__opencl_c_fp64,-cl_khr_fp64` if they need to enable/d

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. Overall LGTM, thank you for working on this :-) Comment at: clang/lib/Sema/SemaDecl.cpp:13761-13771 +bool VisitDeclRefExpr(const DeclRefExpr *DRE) { + auto iter = M->find(DRE->getFoundDecl()); + if (iter != M->end() && iter->second) { +

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. the description should be clearer about what these warnings do running this over an existing codebase to see what fires is probably a good idea (if you haven't already done that) Comment at: clang/test/Sema/vector-gcc-compat.c:38 v2i64 v2i64_a = (

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield added inline comments. Comment at: clang/test/Sema/vector-gcc-compat.c:38 v2i64 v2i64_a = (v2i64){0, 1}; - v2i64 v2i64_r; + v2i64 v2i64_r; // expected-warning{{variable 'v2i64_r' set but not used}} aeubanks wrote: > this file isn't really testing

[PATCH] D100590: DeclContext: Fix iterator category

2021-04-15 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks created this revision. HazardyKnusperkeks added reviewers: rsmith, v.g.vassilev. HazardyKnusperkeks added projects: clang, clang-tools-extra, LLDB. Herald added a subscriber: JDevlieghere. HazardyKnusperkeks requested review of this revision. Herald added a subscriber: cfe-commit

[clang] dda978e - [clang-format] Option for empty lines after an access modifier.

2021-04-15 Thread Marek Kurdej via cfe-commits
Author: Max Sagebaum Date: 2021-04-15T21:03:07+02:00 New Revision: dda978eef87c57e254929848956d46f6db75c125 URL: https://github.com/llvm/llvm-project/commit/dda978eef87c57e254929848956d46f6db75c125 DIFF: https://github.com/llvm/llvm-project/commit/dda978eef87c57e254929848956d46f6db75c125.diff

[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.

2021-04-15 Thread Marek Kurdej 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 rGdda978eef87c: [clang-format] Option for empty lines after an access modifier. (authored by Max_S, committed by curdeius). Repository: rG LLVM Gith

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic created this revision. asavonic added reviewers: rjmccall, dmgreen, t.p.northover, ostannard, sdesmalen, momchil.velikov, SjoerdMeijer. Herald added subscribers: mstorsjo, danielkiss, kristof.beyls. asavonic requested review of this revision. Herald added a project: clang. Herald added a

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added inline comments. Comment at: clang/test/CodeGen/arm64-arguments.c:53 -// CHECK: define{{.*}} i64 @f12() +// CHECK: define{{.*}} i24 @f11_packed() +struct s11_packed { char c; short s } __attribute__((packed)); I'm not sure if `i24` here is a prob

[PATCH] D100509: Support GCC's -fstack-usage flag

2021-04-15 Thread Pengxuan Zheng via Phabricator via cfe-commits
pzheng added a comment. In D100509#2692259 , @xbolva00 wrote: > Set current_function_has_unbounded_dynamic_stack_size to 1 when pushing a > variable-sized argument onto the stack. > > if (current_function_has_unbounded_dynamic_stack_size) >

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Hmm. I think the right thing to do here is to recognize generally that we're emitting a mandatory tail call, and so suppress *all* the normal transformations on the return value. The conditions on mandatory tail calls should make that possible, and it seems like it w

[clang] 8e0f2e8 - [clang] [AArch64] Fix handling of HFAs passed to Windows variadic functions

2021-04-15 Thread Martin Storsjö via cfe-commits
Author: Martin Storsjö Date: 2021-04-15T22:21:27+03:00 New Revision: 8e0f2e89ff951c74875ed751e2215cc263b33328 URL: https://github.com/llvm/llvm-project/commit/8e0f2e89ff951c74875ed751e2215cc263b33328 DIFF: https://github.com/llvm/llvm-project/commit/8e0f2e89ff951c74875ed751e2215cc263b33328.diff

[PATCH] D100467: [clang] [AArch64] Fix handling of HFAs passed to Windows variadic functions

2021-04-15 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8e0f2e89ff95: [clang] [AArch64] Fix handling of HFAs passed to Windows variadic functions (authored by mstorsjo). Changed prior to commit: https://reviews.llvm.org/D100467?vs=337412&id=337866#toc Repos

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield added a comment. In D100581#2692425 , @aeubanks wrote: > running this over an existing codebase to see what fires is probably a good > idea (if you haven't already done that) I ran it on LLVM itself (with clang and lldb) and got no firings at

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield updated this revision to Diff 337877. mbenfield added a comment. Updates in response to comments. - Parameters.empty() and early exit. - comments in VisitDeclRefExpr. - clearer description of the warnings. Also, changed the name of DiagnoseUnusedDecls to DiagnoseUnusedButSetDecls for

[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-15 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM with a test nit. Comment at: clang/test/CodeGenCUDA/unused-global-var.cu:23-29 +// CHECK-NOT: @_ZL2v3 +constexpr int v3 = 1; + +// Check managed variables are always kept. + +

[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-15 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:584 + PM.addPass(GlobalDCEPass()); PM.addPass(InternalizePass(mustPreserveGV)); } Should we move where the internalize pass is added instead? C

[PATCH] D99675: RFC [llvm][clang] Create new intrinsic llvm.arith.fence to control FP optimization at expression level

2021-04-15 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 337879. mibintc edited the summary of this revision. mibintc added a comment. This is a minor update from @pengfei which allows simple tests cases to run end-to-end with clang. Also I changed the "summary" to reflect the review discussion around the FMA opti

[PATCH] D100567: BPF: emit debuginfo for Function of DeclRefExpr if requested

2021-04-15 Thread Andrii Nakryiko via Phabricator via cfe-commits
anakryiko accepted this revision. anakryiko added a comment. Nice, thanks! This will work for externs with explicit section name (.ksym) and with no section name (externs for static linking), right? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100

[PATCH] D97417: [clangd] use a compatible preamble for the first AST built

2021-04-15 Thread Quentin Chateau via Phabricator via cfe-commits
qchateau added a comment. Herald added a project: clang-tools-extra. Have you guys been giving some thoughts to that patch ? I've been using it in my daily work since I submitted the patch, and I'd not go back Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D100488: [SystemZ][z/OS] Add IsText Argument to GetFile and GetFileOrSTDIN

2021-04-15 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D100488#2689494 , @amccarth wrote: > Personally, I'm not a fan of boolean function parameters because of the > inline comments necessary to make the call site understandable. But it > appears to be consistent with LLVM Coding St

[PATCH] D100118: [clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotect-parens

2021-04-15 Thread Melanie Blower via Phabricator via cfe-commits
mibintc updated this revision to Diff 337881. mibintc retitled this revision from "[clang] RFC Support new builtin __arithmetic_fence to control floating point optiization" to "[clang] RFC Support new builtin __arithmetic_fence to control floating point optimization, and new clang option fprotec

[PATCH] D100552: [HIP] Diagnose compiling kernel without offload arch

2021-04-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 337883. yaxunl marked an inline comment as done. yaxunl added a comment. revised error msg by Aaron's comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100552/new/ https://reviews.llvm.org/D100552 Files: clang/include/clang/Basic/DiagnosticSe

[PATCH] D99503: [clang-format] Inconsistent behavior regarding line break before access modifier

2021-04-15 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. I don't know if you did elsewhere, but you have to give a name and email for the commit, so that someone can push it for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D100596: [WebAssembly] Remove saturating fp-to-int target intrinsics

2021-04-15 Thread Thomas Lively via Phabricator via cfe-commits
tlively created this revision. tlively added reviewers: aheejin, dschuff. Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100. tlively requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. U

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thanks for this! I think this warning looks valuable. Most of my comments are various forms of style nits. :) Comment at: clang/lib/Sema/SemaDecl.cpp:13738 +// values in Map should be true. traverses Body; if any key is used in any way +//

[PATCH] D100509: Support GCC's -fstack-usage flag

2021-04-15 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Great if better :) Please consider adding a small testcase (eg from zstd) where llvm says static and gcc says dynamic,bound. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100509/new/ https://reviews.llvm.org/D100509 ___

[PATCH] D100567: BPF: emit debuginfo for Function of DeclRefExpr if requested

2021-04-15 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Yes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100567/new/ https://reviews.llvm.org/D100567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D100598: [CUDA, FDO] Filter out profiling options from GPU-side compilations.

2021-04-15 Thread Artem Belevich via Phabricator via cfe-commits
tra created this revision. tra added reviewers: yaxunl, tejohnson. Herald added subscribers: wenlei, bixia. tra requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D100598 Files: clang/lib/Driver/ToolChains/Clang.cpp

[PATCH] D100598: [CUDA, FDO] Filter out profiling options from GPU-side compilations.

2021-04-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5830 // these by hand. - if (Arg *A = getLastProfileSampleUseArg(Args)) { -auto *PGOArg = Args.getLastArg( -options::OPT_fprofile_generate, options::OPT_fprofile_generate_EQ, -opt

[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/unused-global-var.cu:23-29 +// CHECK-NOT: @_ZL2v3 +constexpr int v3 = 1; + +// Check managed variables are always kept. + +// CHECK: @v4 +__managed__ int v4;

[PATCH] D100598: [CUDA, FDO] Filter out profiling options from GPU-side compilations.

2021-04-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5830 // these by hand. - if (Arg *A = getLastProfileSampleUseArg(Args)) { -auto *PGOArg = Args.getLastArg( -options::OPT_fprofile_generate, options::OPT_fprofile_generate_EQ, -

[PATCH] D100598: [CUDA, FDO] Filter out profiling options from GPU-side compilations.

2021-04-15 Thread Artem Belevich via Phabricator via cfe-commits
tra updated this revision to Diff 337896. tra added a comment. filter the options for AMD GPUs too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100598/new/ https://reviews.llvm.org/D100598 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/t

[clang] 542e780 - [AST] Add a print method to Introspection LocationCall

2021-04-15 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2021-04-15T22:18:29+01:00 New Revision: 542e7806e61089da88a2ff467006073cbe8d URL: https://github.com/llvm/llvm-project/commit/542e7806e61089da88a2ff467006073cbe8d DIFF: https://github.com/llvm/llvm-project/commit/542e7806e61089da88a2ff467006073cbe8d.diff

[PATCH] D100423: [AST] Add a print method to Introspection LocationCall

2021-04-15 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG542e7806e610: [AST] Add a print method to Introspection LocationCall (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100423/new/ https

[clang] f019e5f - [AST][Introspection] Add a check to detect if introspection is supported.

2021-04-15 Thread Nathan James via cfe-commits
Author: Nathan James Date: 2021-04-15T22:21:41+01:00 New Revision: f019e5f73ed732b374e376f5ddbba5d1f67dca0c URL: https://github.com/llvm/llvm-project/commit/f019e5f73ed732b374e376f5ddbba5d1f67dca0c DIFF: https://github.com/llvm/llvm-project/commit/f019e5f73ed732b374e376f5ddbba5d1f67dca0c.diff

[PATCH] D100530: [AST][Introspection] Add a check to detect if introspection is supported.

2021-04-15 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf019e5f73ed7: [AST][Introspection] Add a check to detect if introspection is supported. (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 337900. yaxunl marked 2 inline comments as done. yaxunl added a comment. revised tests by Artem's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98783/new/ https://reviews.llvm.org/D98783 Files: clang/test/CodeGenCUDA/unused-global-var.cu

[PATCH] D100548: [AST] Fix location call storage with common last-invocation

2021-04-15 Thread Nathan James via Phabricator via cfe-commits
njames93 accepted this revision. njames93 added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/Tooling/NodeIntrospection.cpp:33 } - result += (vec.back()->name() + "()").str(); + result += (vec.front()->name() + "()").str(); retur

[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

2021-04-15 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 337903. mizvekov added a comment. - Added doc to disallowNRVO - Also detect implicit return type for blocks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99696/new/ https://reviews.llvm.org/D99696 Files: c

[PATCH] D100598: [CUDA, FDO] Filter out profiling options from GPU-side compilations.

2021-04-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100598/new/ https://reviews.llvm.org/D100598 __

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. In D100591#2692599 , @rjmccall wrote: > I think the right thing to do here is to recognize generally that we're > emitting a mandatory tail call, and so suppress *all* the normal > transformations on the return value. I assume

[PATCH] D100552: [HIP] Diagnose compiling kernel without offload arch

2021-04-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Enforcing explicit GPU target makes sense. However, I think that singling out a `__global__` as the trigger is not sufficient for the intended purpose. If we can't generate a usable GPU-side binary, then we should produce an error if we need to generate *anything* during G

[PATCH] D100516: [AST] Add TypeLoc support to node introspection

2021-04-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp:158-159 BN.getNodeAs("stmtOrDeclBase"); +const auto *TypeLocBase = BN.getNodeAs("typeLocBase"); +const auto *ExprBase = BN.getNodeAs("exprBase"); if (const auto *N

[clang] f9d932e - [clang][AArch64] Correctly align HFA arguments when passed on the stack

2021-04-15 Thread Momchil Velikov via cfe-commits
Author: Momchil Velikov Date: 2021-04-15T22:58:14+01:00 New Revision: f9d932e6735afe73117e142a12443449f2197e69 URL: https://github.com/llvm/llvm-project/commit/f9d932e6735afe73117e142a12443449f2197e69 DIFF: https://github.com/llvm/llvm-project/commit/f9d932e6735afe73117e142a12443449f2197e69.dif

[PATCH] D98794: [AArch64] Correctly align HFA arguments when passed on the stack

2021-04-15 Thread Momchil Velikov 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 rGf9d932e6735a: [clang][AArch64] Correctly align HFA arguments when passed on the stack (authored by chill). Herald added a project: clang. Herald adde

[PATCH] D100567: BPF: emit debuginfo for Function of DeclRefExpr if requested

2021-04-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. What happens for this program: extern void f1(); void f2(void *); inline void f3() { f2(f1); } ... Even when `f3` is never called, I'm guessing your change will cause `f1` to be emitted? Also something like this: void f1(); int main() { int x =

[clang] 4f6d698 - [AST] Fix location call storage with common last-invocation

2021-04-15 Thread Stephen Kelly via cfe-commits
Author: Stephen Kelly Date: 2021-04-15T23:15:11+01:00 New Revision: 4f6d69846747dd53a54a5de0da7eca38df52d5ca URL: https://github.com/llvm/llvm-project/commit/4f6d69846747dd53a54a5de0da7eca38df52d5ca DIFF: https://github.com/llvm/llvm-project/commit/4f6d69846747dd53a54a5de0da7eca38df52d5ca.diff

[PATCH] D100548: [AST] Fix location call storage with common last-invocation

2021-04-15 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4f6d69846747: [AST] Fix location call storage with common last-invocation (authored by stephenkelly). Changed prior to commit: https://reviews.llvm.org/D100548?vs=337713&id=337917#toc Repository: rG

[clang] 924cdff - [OpenMP5][DOCS] Update status of masked construct and correct the color

2021-04-15 Thread via cfe-commits
Author: cchen Date: 2021-04-15T17:19:04-05:00 New Revision: 924cdff0ae18f60f476ccc44d6e5cd0d0e026256 URL: https://github.com/llvm/llvm-project/commit/924cdff0ae18f60f476ccc44d6e5cd0d0e026256 DIFF: https://github.com/llvm/llvm-project/commit/924cdff0ae18f60f476ccc44d6e5cd0d0e026256.diff LOG: [O

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:13740 +// other than assigning to it, sets the corresponding value to false. +static void AreAllUsesSets(Stmt *Body, + llvm::SmallDenseMap *Map) { george.burgess.iv

[clang] be65347 - NFC: Add missing matcher for test method

2021-04-15 Thread Stephen Kelly via cfe-commits
Author: Stephen Kelly Date: 2021-04-15T23:26:00+01:00 New Revision: be65347326084ad1c309d4330e94d671f011b35b URL: https://github.com/llvm/llvm-project/commit/be65347326084ad1c309d4330e94d671f011b35b DIFF: https://github.com/llvm/llvm-project/commit/be65347326084ad1c309d4330e94d671f011b35b.diff

[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

2021-04-15 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. >> These warnings are not enabled by any other flags. This is different from >> gcc, where -Wunused-but-set-variable is enabled by -Wextra in combination >> with either -Wunused or -Wall. IMHO we should follow gcc here. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D100567: BPF: emit debuginfo for Function of DeclRefExpr if requested

2021-04-15 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. For the first example, actually clang is smart enough to remove all dead code, so nothing generated. [yhs@devbig003.ftw2 ~/tmp/ext_func_var]$ cat t1.c extern void f1(); void f2(void *); inline void f3() { f2(f1); } [yhs@devbig003.ftw2 ~/tmp/ext_func_var]$ clang

[clang] f62ad15 - NFC: Add a simple test for introspection call formatting

2021-04-15 Thread Stephen Kelly via cfe-commits
Author: Stephen Kelly Date: 2021-04-15T23:45:54+01:00 New Revision: f62ad15cd7df0ca7681e0dbb894ee1c1d2465c51 URL: https://github.com/llvm/llvm-project/commit/f62ad15cd7df0ca7681e0dbb894ee1c1d2465c51 DIFF: https://github.com/llvm/llvm-project/commit/f62ad15cd7df0ca7681e0dbb894ee1c1d2465c51.diff

[PATCH] D100567: BPF: emit debuginfo for Function of DeclRefExpr if requested

2021-04-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. ah, right, because this is powered by seeing the DeclRefExpr only in code that's codegen'd - fair enough. Thanks for checking! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100567/new/ https://reviews.llvm.org/D100567 __

[PATCH] D100567: BPF: emit debuginfo for Function of DeclRefExpr if requested

2021-04-15 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:2840 +// Emit debuginfo for the function declaration if the target wants to. +if (getContext().getTargetInfo().allowDebugInfoForExternalVar()) { + CGDebugInfo *DI = CGM.getModuleDebugInfo()

[PATCH] D100567: BPF: emit debuginfo for Function of DeclRefExpr if requested

2021-04-15 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:2840 +// Emit debuginfo for the function declaration if the target wants to. +if (getContext().getTargetInfo().allowDebugInfoForExternalVar()) { + CGDebugInfo *DI = CGM.getModuleDebugInfo(); ---

[PATCH] D100604: [PowerPC] Improve codegen for int-to-fp conversion of subword vector extract

2021-04-15 Thread Albion Fung via Phabricator via cfe-commits
Conanap created this revision. Conanap added reviewers: nemanjai, saghir, PowerPC. Conanap added projects: LLVM, PowerPC, clang. Herald added a subscriber: kbarton. Conanap requested review of this revision. The following example generates code that can be completed in two instructions instead:

[PATCH] D100516: [AST] Add TypeLoc support to node introspection

2021-04-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire updated this revision to Diff 337923. steveire edited the summary of this revision. steveire added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100516/new/ https://reviews.llvm.org/D100516 Files: clang/include/clang/T

[PATCH] D100516: [AST] Add TypeLoc support to node introspection

2021-04-15 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added inline comments. Comment at: clang/unittests/Introspection/IntrospectionTest.cpp:1294 + +#ifndef _WIN32 +TEST(Introspection, SourceLocations_TypeOfTypeLoc) { njames93 wrote: > Can you add a comment explaining the issues with this test on windows >

[PATCH] D100604: [PowerPC] Improve codegen for int-to-fp conversion of subword vector extract

2021-04-15 Thread Albion Fung via Phabricator via cfe-commits
Conanap updated this revision to Diff 337924. Conanap added a comment. Added test file CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100604/new/ https://reviews.llvm.org/D100604 Files: llvm/lib/Target/PowerPC/PPCInstrVSX.td llvm/test/CodeGen/PowerPC/uint-to-fp-v4i32.ll llvm/test/

[PATCH] D100499: [AArch64] Neon Polynomial vadd Intrinsic Fix

2021-04-15 Thread Ryan Santhirarajan via Phabricator via cfe-commits
rsanthir.quic added a comment. As you mentioned, I thought it was only supported due to `CheckFPAdvSIMDEnabled64`. If the header is also guarding for AArch64 does that not support the idea that it is AArch64 specific? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://r

[PATCH] D100531: [clang][deps] Simplify function discovering .pcm and .modulemap files

2021-04-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D100531/new/ https://reviews.llvm.org/D100531 __

[PATCH] D100534: [clang][deps] Generate the full command-line for modules

2021-04-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h:78-80 + /// The compiler invocation associated with the translation unit that imports + /// this module. + CompilerInvocation Invocation; Looks l

[PATCH] D100536: [clang][deps] NFC: Remove unused FullDependencies member

2021-04-15 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith accepted this revision. dexonsmith 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/D100536/new/ https://reviews.llvm.org/D100536 __

[PATCH] D100609: [Offload][OpenMP][CUDA] Allow fembed-bitcode for device offload

2021-04-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added a reviewer: tra. Herald added subscribers: guansong, yaxunl. Herald added a reviewer: bollu. jdoerfert requested review of this revision. Herald added a subscriber: sstefan1. Herald added a project: clang. This is a fix for the problem reported here

[PATCH] D100609: [Offload][OpenMP][CUDA] Allow fembed-bitcode for device offload

2021-04-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I'm not really sure about the test, my local setup didn't have CUDA attached properly but this should work in principle ;) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100609/new/ https://reviews.llvm.org/D100609 _

[PATCH] D100567: BPF: emit debuginfo for Function of DeclRefExpr if requested

2021-04-15 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 337948. yonghong-song edited the summary of this revision. yonghong-song added a comment. Rename TargetInfo.allowDebugInfoForExternalVar to TargetInfo.allowDebugInfoForExternalRef. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-15 Thread Richard Smith - zygoloid 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 rG834467590842: Implemented [[clang::musttail]] attribute for guaranteed tail calls. (authored by haberman, committed by rsmith). Repository: rG LLV

[clang] 8344675 - Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-15 Thread Richard Smith via cfe-commits
Author: Joshua Haberman Date: 2021-04-15T17:12:21-07:00 New Revision: 8344675908424ee532d4ae30e5043c5a5834e02c URL: https://github.com/llvm/llvm-project/commit/8344675908424ee532d4ae30e5043c5a5834e02c DIFF: https://github.com/llvm/llvm-project/commit/8344675908424ee532d4ae30e5043c5a5834e02c.dif

[PATCH] D95976: [OpenMP] Simplify offloading parallel call codegen

2021-04-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I have only minor remarks but I'd like you to check if my hunch is correct and the proposed modifications will fix fix PR49777 *and* fix PR49779. Also, the number of arguments need to be increased, let's go big and automatic here. Other than that I think this looks go

[PATCH] D100509: Support GCC's -fstack-usage flag

2021-04-15 Thread Pengxuan Zheng via Phabricator via cfe-commits
pzheng added a comment. I checked some of the functions in zstd where gcc outputs "dynamic,bounded", but did not find any straightforward way to simplify them into standalone tests. If anyone happen to have a simple test case, I would be more than happy to add here. Repository: rG LLVM Gith

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-15 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Looks like this breaks tests on mac/arm: http://45.33.8.238/macm1/7552/step_7.txt Please take a look and revert for now if it takes a while to fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99517/new/ https://reviews.l

[clang] f7c9de0 - Add triple to fix test failure.

2021-04-15 Thread Richard Smith via cfe-commits
Author: Richard Smith Date: 2021-04-15T18:08:35-07:00 New Revision: f7c9de0de5804498085af973dc6bfc934a18f000 URL: https://github.com/llvm/llvm-project/commit/f7c9de0de5804498085af973dc6bfc934a18f000 DIFF: https://github.com/llvm/llvm-project/commit/f7c9de0de5804498085af973dc6bfc934a18f000.diff

[PATCH] D99517: Implemented [[clang::musttail]] attribute for guaranteed tail calls.

2021-04-15 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D99517#2693418 , @thakis wrote: > Looks like this breaks tests on mac/arm: > http://45.33.8.238/macm1/7552/step_7.txt Should be fixed by rGf7c9de0de5804498085af973dc6bfc934a18f000

[PATCH] D99456: [C++2b] Support size_t literals

2021-04-15 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: clang/lib/Frontend/InitPreprocessor.cpp:593-594 + // C++2b features. + if (LangOpts.CPlusPlus2b) +Builder.defineMacro("__cpp_size_t_suffix", "202011L"); if (LangOpts.Char8) Quuxplusone wrote: > AntonBikineev wrot

[PATCH] D100509: Support GCC's -fstack-usage flag

2021-04-15 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. In D100509#2693388 , @pzheng wrote: > I checked some of the functions in zstd where gcc outputs "dynamic,bounded", > but did not find any straightforward way to simplify them into standalone > tests. If anyone happen to have a

[PATCH] D100611: [RISCV] Add new attribute __clang_riscv_builtin_alias for intrinsics.

2021-04-15 Thread Hsiangkai Wang via Phabricator via cfe-commits
HsiangKai created this revision. HsiangKai added reviewers: craig.topper, rogfer01, khchen, evandro, frasercrmck. Herald added subscribers: StephenFan, vkmr, jdoerfert, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jone

[PATCH] D100591: [Clang][AArch64] Disable rounding of return values for AArch64

2021-04-15 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D100591#2692978 , @asavonic wrote: > In D100591#2692599 , @rjmccall > wrote: > >> I think the right thing to do here is to recognize generally that we're >> emitting a mandatory tail

[PATCH] D100415: [Coroutines] Split coroutine during CoroEarly into an init and ramp function

2021-04-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D100415#2691666 , @lxfind wrote: > @ChuanqiXu Thank you for the detailed review! Really appreciate it. > I agree we should create a coroutine benchmark at some point, ideally some > realistic production-code driven benchmark

[PATCH] D91054: [Clang][OpenMP] Frontend work for sections - D89671

2021-04-15 Thread Fady Ghanim via Phabricator via cfe-commits
fghanim added a comment. You can update the tests as long as long as the output is correct. for example the difference is only in names, ordering of basicblocks and instructions that doesn't affect correctness, etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D100611: [RISCV] Add new attribute __clang_riscv_builtin_alias for intrinsics.

2021-04-15 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: clang/test/CodeGen/RISCV/riscv-attr-builtin-alias.c:9 +#define __rvv_generic \ +static inline __attribute__((__always_inline__, __nodebug__, __overloadable__)) + I guess this is not needed anymore? or at least could b

[PATCH] D100615: [RISCV][Driver] Make the ordering of CmdArgs consistent between RISCV::Linker and baremetal::Linker

2021-04-15 Thread ShihPo Hung via Phabricator via cfe-commits
arcbbb created this revision. arcbbb added reviewers: asb, craig.topper, frasercrmck, rogfer01, jrtc27, mgrang. Herald added subscribers: vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, abidh, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzhen

[PATCH] D100616: [clang] Fix a potential assert failure

2021-04-15 Thread Ben Shi via Phabricator via cfe-commits
benshi001 created this revision. benshi001 added a reviewer: MaskRay. Herald added subscribers: s.egerton, simoncook, dschuff. benshi001 requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a project: clang. The calculation of LargestBuiltinID needs all t

[PATCH] D100617: [RISCV][Clang] Drop the assembly tests for RVV intrinsics.

2021-04-15 Thread Zakk Chen via Phabricator via cfe-commits
khchen created this revision. khchen added reviewers: craig.topper, rogfer01, HsiangKai, evandro, liaolucy, jrtc27. Herald added subscribers: vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzhe

[PATCH] D100615: [RISCV][Driver] Make the ordering of CmdArgs consistent between RISCV::Linker and baremetal::Linker

2021-04-15 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Few more word for this issue, the option order is matter for linker both for GNU `ld` and `lld`, in the test @arcbbb provided, `ABC` will treat as undefined in `a.lds` if the order is wrong. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D100616: [clang] Fix a potential assert failure

2021-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. SVE::FirstTSBuiltin is 8148, the largest. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100616/new/ https://reviews.llvm.org/D100616

[PATCH] D100514: [OpenMP] Added codegen for masked directive

2021-04-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Any reason we should not unconditionally use the OMPIRBuilder impl? (btw, many thanks for providing one!) We have an OMPIRBuilder always around in clang's codegen, so there is little reason not to use it if it is feature complete. Repository: rG LLVM Github Monorep

[PATCH] D100514: [OpenMP] Added codegen for masked directive

2021-04-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Also, don't forget to mark it as done in https://clang.llvm.org/docs/OpenMPSupport.html :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100514/new/ https://reviews.llvm.org/D100514 _

[PATCH] D100616: [clang] Fix a potential assert failure

2021-04-15 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D100616#2693595 , @MaskRay wrote: > SVE::FirstTSBuiltin is 8148, the largest. Isn't SVE::FirstTSBuiltin used to start AArch64's builtins list. So shouldn't AArch64::LastTSBuiltin be larger? Repository: rG LLVM Github

[PATCH] D100615: [RISCV][Driver] Make the ordering of CmdArgs consistent between RISCV::Linker and baremetal::Linker

2021-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LG. A better test should have a few more stuff, see Xlinker-args.c Instead of saying --defsym takes precedence over T_Group options, you can say that -T is the last. > Few more word for thi

[PATCH] D100616: [clang] Fix a potential assert failure

2021-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D100616#2693603 , @craig.topper wrote: > In D100616#2693595 , @MaskRay wrote: > >> SVE::FirstTSBuiltin is 8148, the largest. > > Isn't SVE::FirstTSBuiltin used to start AArch64's built

<    1   2   3   >