[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 338002. yonghong-song added a comment. - checked both !FD->isDefined() and !Fn->getSubprogram() before emitting debuginfo for the declaration - added additional tests to mix DeclRefExpr and actual function definition. Repository: rG LLVM Github Mono

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

2021-04-15 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield marked 4 inline comments as done. mbenfield added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:13751 +bool TraverseBinaryOperator(BinaryOperator *BO) { + auto *LHS = BO->getLHS(); + auto *DRE = dyn_cast(LHS); george.burgess.iv

[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 337999. mbenfield marked an inline comment as done. mbenfield added a comment. Capitalization and periods for comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100581/new/ https://reviews.llvm.org/D1005

[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 337998. mbenfield added a comment. Respond to comments. - Use /// for function comment - Improve the text of function comment - Use SmallPtrSet instead of SmallDenseMap - Use reference instead of pointer in AllUsesAreSetsVisitor - Capture with [&] - co

[PATCH] D100621: [OpenMP] Ensure the DefaultMapperId has a location

2021-04-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: JonChesterfield, ABataev, grokos. Herald added subscribers: guansong, yaxunl. Herald added a reviewer: bollu. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. A u

[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 337993. yonghong-song added a comment. - check Fn->getSubprogram() before emit debuginfo. This is consistent with EmitFuncDeclForCallSite() and is better than checking FD->isDefined() as we may hit multiple DeclRefExpr and all of them will go through e

[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/unittests/Introspection/IntrospectionTest.cpp:1294 + +#ifndef _WIN32 +TEST(Introspection, SourceLocations_TypeOfTypeLoc) { steveire wrote: > njames93 wrote: > > Can you add a comment explaining the issues with thi

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

2021-04-15 Thread Chirag Khandelwal via Phabricator via cfe-commits
AMDChirag added a comment. In D91054#2693514 , @fghanim wrote: > 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,

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

2021-04-15 Thread Max Sagebaum via Phabricator via cfe-commits
Max_S added a comment. Sorry forgot about that: Max Sagebaum Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99503/new/ https://reviews.llvm.org/D99503 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[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 337988. yonghong-song added a comment. check FD->isDefined() as well before emit debuginfo for the declaration. It is okay to emit a declaration subprogram and later refined to be with definition. But it is not okay to refine a definition to a declarat

[PATCH] D45639: [Driver] Support default libc++ library location on Darwin

2021-04-15 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D45639#2692142 , @ldionne wrote: > In D45639#2383754 , @smeenai wrote: > >> Just following up on this, cos I'm curious :) I have 12.1 now, and I still >> only see the C++ headers in the t

[PATCH] D100620: [OpenMP] Make sure classes work on the device as they do on the host

2021-04-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert created this revision. jdoerfert added reviewers: JonChesterfield, ABataev, grokos. Herald added subscribers: guansong, yaxunl. Herald added a reviewer: bollu. jdoerfert requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. We

[PATCH] D99949: [AMDGPU][OpenMP] Add amdgpu-arch tool to list AMD GPUs installed

2021-04-15 Thread Pushpinder Singh 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 rG7029cffc4e78: [AMDGPU][OpenMP] Add amdgpu-arch tool to list AMD GPUs installed (authored by pdhaliwal). Repository: rG LLVM Github Monorepo CHANG

[clang] 7029cff - [AMDGPU][OpenMP] Add amdgpu-arch tool to list AMD GPUs installed

2021-04-15 Thread Pushpinder Singh via cfe-commits
Author: Pushpinder Singh Date: 2021-04-16T05:26:20Z New Revision: 7029cffc4e78556cfe820791c612968bb15b2ffb URL: https://github.com/llvm/llvm-project/commit/7029cffc4e78556cfe820791c612968bb15b2ffb DIFF: https://github.com/llvm/llvm-project/commit/7029cffc4e78556cfe820791c612968bb15b2ffb.diff L

[PATCH] D100590: DeclContext: Fix iterator category

2021-04-15 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks updated this revision to Diff 337985. HazardyKnusperkeks added a comment. Trigger build. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100590/new/ https://reviews.llvm.org/D100590 Files: clang/include/clang/AST/DeclBase.h In

[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 a comment. Could you also check the compiler diagnostic messages? it will report `__builtin_rvv_vadd_vv_i8m1` or `vadd_generic` if argument type mis-match, which one you expected? I assume without `__clang_riscv_builtin_alias` clang will report `vadd_generic`? Repository: r

[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. So I think it's more than consistent issue, it's a bug fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100615/new/ https://reviews.llvm.org/D100615 ___ cfe-commits mailing

[PATCH] D100619: [ASTReader] Only mark module out of date if not already compiled

2021-04-15 Thread Ben Barham via Phabricator via cfe-commits
bnbarham created this revision. bnbarham added a reviewer: akyrtzi. bnbarham requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If a module contains errors (ie. it was built with -fallow-pcm-with-compiler-errors and had errors) and was from th

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

2021-04-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/include/clang/Basic/TargetBuiltins.h:334 static constexpr uint64_t LargestBuiltinID = std::max( {NEON::FirstTSBuiltin, ARM::LastTSBuiltin, SVE::FirstTSBuiltin, AArch64::LastTSBuiltin, BPF::LastTSBuiltin, PPC::Last

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

2021-04-15 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. The transposition problem arises from: Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95976/new/ https://reviews.llvm.org/D95976 ___ cfe-commits mailing list cfe-commits@li

[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#2693607 , @MaskRay wrote: > In D100616#2693603 , @craig.topper > wrote: > >> In D100616#2693595 , @MaskRay >> wrote: >> >>> SVE:

[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

[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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

[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 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

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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 __

[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 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

[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

[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 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] 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

[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

[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 =

[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

[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] 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

[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] 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] 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] 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] 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] 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] 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/

[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] 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] 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] 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

[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] 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 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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

  1   2   3   >