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

2021-04-16 Thread Pengfei Wang via Phabricator via cfe-commits
pengfei added a comment. In D99675#2695424 , @kpn wrote: > What changes are needed for a backend, and what happens if they aren't done? As far as I understand it, backend does optimizations based on patterns of the known nodes and MIs. Inserting a new

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-16 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen updated this revision to Diff 338273. Stephen added a comment. (fix patch to include all local changes) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99543/new/ https://reviews.llvm.org/D99543 Files:

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-16 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen requested review of this revision. Stephen added a comment. Thanks for the review! I think I've addressed the comments -- hopefully I kept it inline with what you're thinking. Please have another look at your leisure. Comment at:

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-16 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen updated this revision to Diff 338272. Stephen added a comment. - Add ability to pass semi-colon separated list of types to ignore, instead of assuming only size_type and difference_type. - Remove ability to avoid warnings on ::size() method, since it's subsumed by allowing narrowing

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

2021-04-16 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:1141 llvm::Value *IsWorker = Bld.CreateICmpULT(RT.getGPUThreadID(CGF), getThreadLimit(CGF)); Bld.CreateCondBr(IsWorker, WorkerBB, MasterCheckBB); There seem to be

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

2021-04-16 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1206b95e0703: [ASTReader] Only mark module out of date if not already compiled (authored by bnbarham, committed by akyrtzi). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 1206b95 - [ASTReader] Only mark module out of date if not already compiled

2021-04-16 Thread Argyrios Kyrtzidis via cfe-commits
Author: Ben Barham Date: 2021-04-16T17:57:03-07:00 New Revision: 1206b95e0703dc0a9b619a095d5564ac51c39d19 URL: https://github.com/llvm/llvm-project/commit/1206b95e0703dc0a9b619a095d5564ac51c39d19 DIFF: https://github.com/llvm/llvm-project/commit/1206b95e0703dc0a9b619a095d5564ac51c39d19.diff

[PATCH] D99005: [clang] Implement P2266 Simpler implicit move

2021-04-16 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 338262. mizvekov added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99005/new/ https://reviews.llvm.org/D99005 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaCoroutine.cpp

[PATCH] D100671: [ADT] Factor out in_place_t and expose in Optional ctor

2021-04-16 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D100671#2696123 , @scott.linder wrote: > In D100671#2695923 , @dblaikie > wrote: > >> This usage doesn't seem to quite match the standard - which provides an >> existing instance

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

2021-04-16 Thread Ben Shi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. benshi001 marked an inline comment as done. Closed by commit rG06995fe256ec: [clang][NFC] Fix a potential assert failure (authored by benshi001). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 06995fe - [clang][NFC] Fix a potential assert failure

2021-04-16 Thread Ben Shi via cfe-commits
Author: Ben Shi Date: 2021-04-17T07:17:34+08:00 New Revision: 06995fe256ec5a80092d5045c30b2c94f5ed8232 URL: https://github.com/llvm/llvm-project/commit/06995fe256ec5a80092d5045c30b2c94f5ed8232 DIFF: https://github.com/llvm/llvm-project/commit/06995fe256ec5a80092d5045c30b2c94f5ed8232.diff LOG:

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

2021-04-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D100514#2696106 , @cchen wrote: >> Initially we did not have an OMPIRBuilder object unconditionally, now we >> have. Let's move over everything that is ready. So master and critical >> should be good to go as well I

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

2021-04-16 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur added a comment. I have not looked at the other mentioned problem yet: > another that attribute regexes are not recognized > (https://reviews.llvm.org/harbormaster/unit/view/552593/ at > nvptx_target_codegen.cpp:723:17) Which might still be there. I would want for Harbormaster to

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

2021-04-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. With the nit to add the two reproducers, LGTM. (please make sure to run FAROS or some benchmarks we have before commiting). Comment at: openmp/libomptarget/deviceRTLs/common/src/parallel.cu:294 + // TODO: Add

[PATCH] D100671: [ADT] Factor out in_place_t and expose in Optional ctor

2021-04-16 Thread Scott Linder via Phabricator via cfe-commits
scott.linder added a comment. In D100671#2695923 , @dblaikie wrote: > This usage doesn't seem to quite match the standard - which provides an > existing instance of in_place_t for callers to use: > > std::optional o4(std::in_place, {'a', 'b', 'c'}); >

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

2021-04-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h:20 +// need to `include `. +#include +#endif JonChesterfield wrote: > I think there are legitimate use cases for writing code that doesn't include

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

2021-04-16 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 338252. yonghong-song added a comment. - isDefined() is not necessary, segfault is caused by a nullptr by causing a LV.getPointer(). Check nullptr instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

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

2021-04-16 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added a comment. > Initially we did not have an OMPIRBuilder object unconditionally, now we > have. Let's move over everything that is ready. So master and critical should > be good to go as well I suppose. While using OMPIRBuilder as default, do we want to just remove codegen in Clang

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

2021-04-16 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/test/Modules/Inputs/error/error.h:1 +#pragma mark mark + akyrtzi wrote: > Is this pragma relevant for the test? I'll double check but I believe assertions are hit regardless, but with assertions off the test

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

2021-04-16 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:437 + CompoundStmt *CS = CompoundStmt::Create(Context, Elts, L, R); + DiagnoseUnusedButSetVariables(CS); + return CS; mbenfield wrote: > mbenfield wrote: > > mbenfield wrote: > > >

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

2021-04-16 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. Sorry, I know what is the segfault now after some debugging. It is because `auto *Fn = dyn_cast(LV.getPointer(*this));` is a NULL pointer after there is a definition before this. Will pose another patch but with test case remains to cover mix of declaration,

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

2021-04-16 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. In D100567#2695827 , @dblaikie wrote: > Generally looks OK, but could you explain more about the problems > with/motivation for the declaration/definition issue? (probably worth noting > in the patch description maybe

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

2021-04-16 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis marked 4 inline comments as done. ggeorgakoudis added inline comments. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:2192 RCG(CGF); } } jdoerfert wrote: > Can we remove SeqGen while we are here please. We need to check in the >

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

2021-04-16 Thread Giorgis Georgakoudis via Phabricator via cfe-commits
ggeorgakoudis updated this revision to Diff 338246. ggeorgakoudis added a comment. Update for comments, fix for windows fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95976/new/ https://reviews.llvm.org/D95976 Files:

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

2021-04-16 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/test/Driver/embed-bitcode-nvptx.cu:1 +// RUN: %clang -Xclang -triple -Xclang nvptx64 -S -Xclang -target-feature -Xclang +ptx70 -fembed-bitcode=all --cuda-device-only -nocudalib -nocudainc %s -o - | FileCheck %s +// REQUIRES:

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

2021-04-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper added a comment. LGTM. Thanks for removing the NEON and SVE. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100616/new/ https://reviews.llvm.org/D100616 ___ cfe-commits mailing list

[PATCH] D100688: [AST] Remove args from LocationCall

2021-04-16 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: njames93. steveire requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This class initially had args to be generic to future needs. In particular, I thought that source location

[PATCH] D100226: [funcattrs] Add the maximal set of implied attributes to definitions

2021-04-16 Thread Philip Reames via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf549176ad976: [funcattrs] Add the maximal set of implied attributes to definitions (authored by reames). Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM

[clang] f549176 - [funcattrs] Add the maximal set of implied attributes to definitions

2021-04-16 Thread Philip Reames via cfe-commits
Author: Philip Reames Date: 2021-04-16T14:22:19-07:00 New Revision: f549176ad976caa3e19edd036df9a7e12770af7c URL: https://github.com/llvm/llvm-project/commit/f549176ad976caa3e19edd036df9a7e12770af7c DIFF: https://github.com/llvm/llvm-project/commit/f549176ad976caa3e19edd036df9a7e12770af7c.diff

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

2021-04-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/test/Driver/embed-bitcode-nvptx.cu:1 +// RUN: %clang -Xclang -triple -Xclang nvptx64 -S -Xclang -target-feature -Xclang +ptx70 -fembed-bitcode=all --cuda-device-only -nocudalib -nocudainc %s -o - | FileCheck %s +// REQUIRES:

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG, thanks for the quick fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100673/new/ https://reviews.llvm.org/D100673

[PATCH] D100671: [ADT] Factor out in_place_t and expose in Optional ctor

2021-04-16 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. This usage doesn't seem to quite match the standard - which provides an existing instance of in_place_t for callers to use: std::optional o4(std::in_place, {'a', 'b', 'c'}); (to quote https://en.cppreference.com/w/cpp/utility/optional/optional ) Probably good to

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

2021-04-16 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Generally looks OK, but could you explain more about the problems with/motivation for the declaration/definition issue? (probably worth noting in the patch description maybe comment in code and test) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-04-16 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. In D96033#2695748 , @rjmccall wrote: > In D96033#2695622 , @v.g.vassilev > wrote: > >> Would it make sense to have each `Decl` point to its owning PTU, similarly >> to what we do for

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

2021-04-16 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song added a comment. @dblaikie I renamed the variable, added a few guards to ensure safety and avoid unnecessary attempt to generate duplicated debuginfo, and enhanced the test case to cover mix of declaration, accessing extern func address and definition of the function. Could you

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 338210. ABataev added a comment. Added repro from PR49698 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100673/new/ https://reviews.llvm.org/D100673 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-04-16 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D96033#2695622 , @v.g.vassilev wrote: > Would it make sense to have each `Decl` point to its owning PTU, similarly to > what we do for the owning module (`Decl::getOwningModule`)? I think that's the interface we want, but

[PATCH] D99381: [compiler-rt][hwasan] Add Fuchsia-specific sanitizer platform limits

2021-04-16 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. I see, it's exposed here https://github.com/llvm/llvm-project/blob/6d2d3bd0a61f5fc7fd9f61f48bc30e9ca77cc619/compiler-rt/include/sanitizer/hwasan_interface.h#L88. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99381/new/

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In D100673#2695694 , @jdoerfert wrote: > Can we use the reproducer from the bug report, I want an outermost array > section with objects that have a declare mapper. Sure, will add. Comment at:

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-16 Thread Abhinav Gaba via Phabricator via cfe-commits
abhinavgaba added inline comments. Comment at: openmp/libomptarget/test/mapping/declare_mapper_nested_default_mappers_array.cpp:7 + +// XFAIL: clang + Thanks for the fixes, Alexey. Are you planning on handling this case separately? Repository: rG LLVM

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. Can we use the reproducer from the bug report, I want an outermost array section with objects that have a declare mapper. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100673/new/ https://reviews.llvm.org/D100673

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

2021-04-16 Thread Yonghong Song via Phabricator via cfe-commits
yonghong-song updated this revision to Diff 338202. yonghong-song added a comment. fix a clang-format warning Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100567/new/ https://reviews.llvm.org/D100567 Files:

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

2021-04-16 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D99675#2695480 , @mibintc wrote: > In D99675#2695424 , @kpn wrote: > >> What changes are needed for a backend, and what happens if they aren't done? > > In the clang patch, I'm planning to

[PATCH] D96033: [clang-repl] Land initial infrastructure for incremental parsing

2021-04-16 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Thank you for the details -- will be really useful to me and that architecture will define away several hard problems we tried to solve over the years. In D96033#2693910 , @rjmccall wrote: > Sorry for the delay. That seems

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

2021-04-16 Thread Thomas Lively 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 rG5c729750a6d7: [WebAssembly] Remove saturating fp-to-int target intrinsics (authored by tlively). Changed prior to commit:

[clang] 5c72975 - [WebAssembly] Remove saturating fp-to-int target intrinsics

2021-04-16 Thread Thomas Lively via cfe-commits
Author: Thomas Lively Date: 2021-04-16T12:11:20-07:00 New Revision: 5c729750a6d75df4eeb3eaad72e0b4e93ea27c0e URL: https://github.com/llvm/llvm-project/commit/5c729750a6d75df4eeb3eaad72e0b4e93ea27c0e DIFF: https://github.com/llvm/llvm-project/commit/5c729750a6d75df4eeb3eaad72e0b4e93ea27c0e.diff

[PATCH] D100056: [SystemZ][z/OS] Set files in FileRemapper.cpp are text

2021-04-16 Thread Jonathan Crowther via Phabricator via cfe-commits
Jonathan.Crowther accepted this revision. Jonathan.Crowther 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/D100056/new/ https://reviews.llvm.org/D100056

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

2021-04-16 Thread Pengxuan Zheng via Phabricator via cfe-commits
pzheng added a comment. Thanks for all the great feedbacks, @jansvoboda11, @xbolva00 and @lebedev.ri! Is there any other concern that needs to be addressed? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100509/new/

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

2021-04-16 Thread Thomas Lively via Phabricator via cfe-commits
tlively added inline comments. Comment at: llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp:124-127 + if (Subtarget->hasNontrappingFPToInt()) +for (auto Op : {ISD::FP_TO_SINT_SAT, ISD::FP_TO_UINT_SAT}) + for (auto T : {MVT::i32, MVT::i64}) +

[clang] 4696857 - DeclContext: Fix iterator category

2021-04-16 Thread Björn Schäpers via cfe-commits
Author: Björn Schäpers Date: 2021-04-16T20:59:36+02:00 New Revision: 46968577336f29ddc5fd30e87cb94b03fa3c9cd9 URL: https://github.com/llvm/llvm-project/commit/46968577336f29ddc5fd30e87cb94b03fa3c9cd9 DIFF:

[PATCH] D100056: [SystemZ][z/OS] Set files in FileRemapper.cpp are text

2021-04-16 Thread Abhina Sree via Phabricator via cfe-commits
abhina.sreeskantharajan updated this revision to Diff 338192. abhina.sreeskantharajan added a comment. fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100056/new/ https://reviews.llvm.org/D100056 Files:

[PATCH] D100675: [clang] Do not crash on template specialization following a fatal error

2021-04-16 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. adamcz added a reviewer: sammccall. adamcz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There was a missing isInvalid() check leading to an attempt to instantiate template with an empty instantiation stack.

[clang] 0daf273 - [Builtins] Add memory allocation builtins (PR12543)

2021-04-16 Thread Dávid Bolvanský via cfe-commits
Author: Dávid Bolvanský Date: 2021-04-16T20:36:46+02:00 New Revision: 0daf27302518dcc521fae5cb5c7f72b783c13c35 URL: https://github.com/llvm/llvm-project/commit/0daf27302518dcc521fae5cb5c7f72b783c13c35 DIFF:

[clang] eaa9ef0 - [CUDA, FDO] Filter out profiling options from GPU-side compilations.

2021-04-16 Thread Artem Belevich via cfe-commits
Author: Artem Belevich Date: 2021-04-16T11:35:28-07:00 New Revision: eaa9ef075d9b4d49ce9dae723516e7e6e8b0c4b6 URL: https://github.com/llvm/llvm-project/commit/eaa9ef075d9b4d49ce9dae723516e7e6e8b0c4b6 DIFF:

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

2021-04-16 Thread Artem Belevich via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGeaa9ef075d9b: [CUDA, FDO] Filter out profiling options from GPU-side compilations. (authored by tra). Changed prior to commit: https://reviews.llvm.org/D100598?vs=337896=338184#toc Repository: rG

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

2021-04-16 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur requested changes to this revision. Meinersbur added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:569-570 + else +ThreadLimit = Bld.CreateNUWSub(RT.getGPUNumThreads(CGF), +

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

2021-04-16 Thread Melanie Blower via Phabricator via cfe-commits
mibintc added a comment. In D99675#2695424 , @kpn wrote: > What changes are needed for a backend, and what happens if they aren't done? In the clang patch, I'm planning to add into TargetInfo a function like "does the target support __arithmetic_fence"?

[PATCH] D100673: [OPENMP]Fix PR49698: OpenMP declare mapper causes segmentation fault.

2021-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev created this revision. ABataev added reviewers: jdoerfert, abhinavgaba, jyu2, mikerice. Herald added subscribers: guansong, yaxunl. ABataev requested review of this revision. Herald added subscribers: openmp-commits, sstefan1. Herald added projects: clang, OpenMP. The implicitly generated

[PATCH] D100671: [ADT] Factor out in_place_t and expose in Optional ctor

2021-04-16 Thread Scott Linder via Phabricator via cfe-commits
scott.linder created this revision. Herald added a subscriber: dexonsmith. scott.linder requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D100671 Files:

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

2021-04-16 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. What changes are needed for a backend, and what happens if they aren't done? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99675/new/ https://reviews.llvm.org/D99675 ___ cfe-commits

[PATCH] D100667: [clang] Fix assert() crash when checking undeduced arg alignment

2021-04-16 Thread Adam Czachorowski via Phabricator via cfe-commits
adamcz created this revision. Herald added a subscriber: kristof.beyls. adamcz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There already was a check for undeduced and incomplete types, but it failed to trigger when outer type

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

2021-04-16 Thread Artem Belevich via Phabricator via cfe-commits
tra requested changes to this revision. tra added inline comments. This revision now requires changes to proceed. Comment at: clang/test/Driver/embed-bitcode-nvptx.cu:1 +// RUN: %clang -Xclang -triple -Xclang nvptx64 -S -Xclang -target-feature -Xclang +ptx70 -fembed-bitcode=all

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

2021-04-16 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. In D100118#2695365 , @kpn wrote: > I thought that adding a new fence required changing every optimization pass > in LLVM. That's why the constrained intrinsics were implemented they way they > are where no fence is needed. > >

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

2021-04-16 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn added a comment. I thought that adding a new fence required changing every optimization pass in LLVM. That's why the constrained intrinsics were implemented they way they are where no fence is needed. Aren't you going to have miscompiles using this new fence until all that optimization

[clang] 59437cb - [M68k] Fix empty builtin va_list kind

2021-04-16 Thread Min-Yih Hsu via cfe-commits
Author: Min-Yih Hsu Date: 2021-04-16T11:09:22-07:00 New Revision: 59437cb7d7c30054f0e77b2369c0aeffed3ccb14 URL: https://github.com/llvm/llvm-project/commit/59437cb7d7c30054f0e77b2369c0aeffed3ccb14 DIFF: https://github.com/llvm/llvm-project/commit/59437cb7d7c30054f0e77b2369c0aeffed3ccb14.diff

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

2021-04-16 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. -Wunused-but-set-variable is firing on `x` at [1] [1] https://source.chromium.org/chromium/chromium/src/+/master:third_party/abseil-cpp/absl/synchronization/mutex.h;drc=07cb7b184515ad207d30f00d0b00b8ce96d0a750;l=947

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

2021-04-16 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added a comment. Running this over Chromium, I'm getting $ cat /tmp/a.cc struct A { int i; A(int i): i(i) {} }; $ ./build/rel/bin/clang++ -fsyntax-only /tmp/a.cc -Wunused-but-set-parameter /tmp/a.cc:3:9: warning: parameter 'i' set but not used

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

2021-04-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4442-4446 + std::string CPU = getCPUName(Args, Triple, /*FromAs*/ false); + if (!CPU.empty()) { +CmdArgs.push_back("-target-cpu"); +

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

2021-04-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D100514#2695271 , @cchen wrote: > In D100514#2693600 , @jdoerfert > wrote: > >> Any reason we should not unconditionally use the OMPIRBuilder impl? (btw, >> many thanks for

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

2021-04-16 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added a comment. In D100514#2693601 , @jdoerfert wrote: > Also, don't forget to mark it as done in > https://clang.llvm.org/docs/OpenMPSupport.html :) I'll mark it as done after combined constructs are also done. Thanks! Repository: rG LLVM

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

2021-04-16 Thread Chi Chun Chen via Phabricator via cfe-commits
cchen added a comment. In D100514#2693600 , @jdoerfert wrote: > 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 >

[PATCH] D100630: [Debug-Info][DBX] DW_TAG_rvalue_reference_type should not be generated when dwarf version is smaller than 4

2021-04-16 Thread Jinsong Ji via Phabricator via cfe-commits
jsji added a comment. In D100630#2694681 , @probinson wrote: > If DBX is going to be really pedantic about not recognizing tags or > attributes that don't align with the DWARF version, maybe we're better off > with really supporting `-gstrict-dwarf`

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

2021-04-16 Thread Argyrios Kyrtzidis via Phabricator via cfe-commits
akyrtzi added inline comments. Comment at: clang/test/Modules/Inputs/error/error.h:1 +#pragma mark mark + Is this pragma relevant for the test? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100619/new/

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

2021-04-16 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4442-4446 + std::string CPU = getCPUName(Args, Triple, /*FromAs*/ false); + if (!CPU.empty()) { +CmdArgs.push_back("-target-cpu"); +CmdArgs.push_back(Args.MakeArgString(CPU));

[PATCH] D70094: [clang-tidy] new altera ID dependent backward branch check

2021-04-16 Thread Frank Derry Wanye via Phabricator via cfe-commits
ffrankies updated this revision to Diff 338160. ffrankies marked 3 inline comments as done. ffrankies added a comment. Removed `*- C++ -*` from IdDependentBackwardBranchCheck.cpp file-level comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70094/new/

[PATCH] D99158: [RISCV][WIP] Implement intrinsics for P extension

2021-04-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:41 // E -> ext_vector, followed by the number of elements and the base type. +// e -> Register sized Vector, followd by the base type and +// its width is the same as the register

[PATCH] D99158: [RISCV][WIP] Implement intrinsics for P extension

2021-04-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Also can you please explain the vector codegen plan at a high level? Do you intend to support auto vectorization or just using vector_size in C? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99158/new/

[PATCH] D99158: [RISCV][WIP] Implement intrinsics for P extension

2021-04-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/test/CodeGen/RISCV/rvp/intrinsics-rv32p.ll:25 + %1 = bitcast i32 %b.coerce to <4 x i8> + %2 = tail call <4 x i8> @llvm.riscv.add8.v4i8(<4 x i8> %0, <4 x i8> %1) + %3 = bitcast <4 x i8> %2 to i32 I'm still

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

2021-04-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D100617/new/ https://reviews.llvm.org/D100617

[PATCH] D99936: [clang][parser] Unify rejecting (non) decl stmt with gnu attributes

2021-04-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. In D99936#2694178 , @tbaeder wrote: > Hey Aaron, it's been a while. Do you have a suggestion on how to proceed if > @rsmith has no

[PATCH] D100391: [RISCV][Clang] Add RVV miscellaneous intrinsic functions.

2021-04-16 Thread Craig Topper via Phabricator via cfe-commits
craig.topper accepted this revision. craig.topper 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/D100391/new/ https://reviews.llvm.org/D100391

[PATCH] D99861: [Clang] Record tokens in attribute arguments for user-defined C++/C2x attributes

2021-04-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D99861#2694605 , @urnathan wrote: > See also https://bugs.llvm.org/show_bug.cgi?id=46446. when I first fell into > this issue, I did think it was trying to save the token stream as this patch > is doing. Neat I

[PATCH] D100473: [clang] Implement CompilerInvocation copy assignment

2021-04-16 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese accepted this revision. Bigcheese added a comment. This revision is now accepted and ready to land. I think this is fine given that we already have a copy constructor with deep copy semantics. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D100455: [clang] Rename CompilerInvocationBase to RefBase, split out ValueBase

2021-04-16 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese accepted this revision. Bigcheese 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/D100455/new/ https://reviews.llvm.org/D100455

[PATCH] D100653: [clang][cli] NFC: Move conditional LangOptions parsing/generation

2021-04-16 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese accepted this revision. Bigcheese 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/D100653/new/ https://reviews.llvm.org/D100653

[PATCH] D100533: [clang][deps] Remove the -full-command-line flag

2021-04-16 Thread Michael Spencer via Phabricator via cfe-commits
Bigcheese accepted this revision. Bigcheese 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/D100533/new/ https://reviews.llvm.org/D100533

[PATCH] D100654: [SystemZ][z/OS] Set more text files as text

2021-04-16 Thread Abhina Sree via Phabricator via cfe-commits
abhina.sreeskantharajan created this revision. Herald added subscribers: dexonsmith, arphaman. abhina.sreeskantharajan requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This patch corrects more instances of text files being

[PATCH] D99079: [ARM][AArch64] Require appropriate features for crypto algorithms

2021-04-16 Thread David Candler via Phabricator via cfe-commits
dcandler updated this revision to Diff 338126. dcandler marked 2 inline comments as done. dcandler added a comment. Removed one duplicated line. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99079/new/ https://reviews.llvm.org/D99079 Files: clang/include/clang/Basic/arm_neon.td

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

2021-04-16 Thread Michael Benfield via Phabricator via cfe-commits
mbenfield added inline comments. Comment at: clang/lib/Sema/SemaStmt.cpp:437 + CompoundStmt *CS = CompoundStmt::Create(Context, Elts, L, R); + DiagnoseUnusedButSetVariables(CS); + return CS; mbenfield wrote: > mbenfield wrote: > > george.burgess.iv wrote: > >

[PATCH] D100653: [clang][cli] NFC: Move conditional LangOptions parsing/generation

2021-04-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. NFC, this simplifies the main parsing/generating functions by moving logic around

[PATCH] D99762: [OPENMP]Fix PR49777: Clang should not try to specialize orphaned directives in device codegen.

2021-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 338122. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99762/new/ https://reviews.llvm.org/D99762 Files: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp

[PATCH] D100652: [HIP] Support hipRTC in header

2021-04-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. yaxunl requested review of this revision. hipRTC compiles HIP device code at run time. Since the system may not have development tools installed, when a HIP program is compiled through hipRTC, there is no standard C or C++ header

[PATCH] D100502: Allow lib64 in driver test

2021-04-16 Thread Troy Johnson via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8628ed0310e2: [Driver] Allow both lib64 and lib in rocm-detect test. (authored by troyj). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100502/new/

[clang] 8628ed0 - [Driver] Allow both lib64 and lib in rocm-detect test.

2021-04-16 Thread Troy Johnson via cfe-commits
Author: Troy Johnson Date: 2021-04-16T09:55:57-05:00 New Revision: 8628ed0310e2fc97e1536a8032327d746973069a URL: https://github.com/llvm/llvm-project/commit/8628ed0310e2fc97e1536a8032327d746973069a DIFF: https://github.com/llvm/llvm-project/commit/8628ed0310e2fc97e1536a8032327d746973069a.diff

[PATCH] D99350: [OPENMP]Fix PR49649: The introduction of $ref globals is not always valid.

2021-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 338116. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99350/new/ https://reviews.llvm.org/D99350 Files: clang/lib/CodeGen/CGOpenMPRuntime.cpp

[PATCH] D99436: [OPENMP]Fix PR49366: crash on VLAs in task untied regions.

2021-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 338114. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99436/new/ https://reviews.llvm.org/D99436 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

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

2021-04-16 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, just a couple of other comments inline. Comment at: clang/include/clang/Frontend/CompilerInstance.h:230 + + std::shared_ptr getInvocationPtr() {

[PATCH] D99530: [OPENMP]Fix PR49098: respect firstprivate of declare target variable.

2021-04-16 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev updated this revision to Diff 338111. ABataev added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99530/new/ https://reviews.llvm.org/D99530 Files: clang/lib/Sema/SemaOpenMP.cpp

[PATCH] D100391: [RISCV][Clang] Add RVV miscellaneous intrinsic functions.

2021-04-16 Thread Zakk Chen via Phabricator via cfe-commits
khchen added inline comments. Comment at: clang/include/clang/Basic/riscv_vector.td:1304 +// Reinterpret between different SEW under the same LMUL +foreach dst_sew = ["(FixedLog2SEW:3)", "(FixedLog2SEW:4)", "(FixedLog2SEW:5)", + "(FixedLog2SEW:6)"]

[PATCH] D100644: [clang][cli] NFC: Use Diags to report parsing success/failure

2021-04-16 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/D100644/new/ https://reviews.llvm.org/D100644

  1   2   >