[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Anshil Gandhi 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 rGa955a3189637: [AMDGPU] Replace target feature for global fadd32 (authored by gandhi21299). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Sounds good, thanks the review @rampitec Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 509127. gandhi21299 added a comment. - Adding tests for gfx90a and gfx940 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840 Files: clang/include/clang/Basic/Built

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 509067. gandhi21299 added a comment. - removed builtins-amdgcn-gfx908.cl Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840 Files: clang/include/clang/Basic/Builti

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-28 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 509066. gandhi21299 added a comment. - gfx908 does not support return version of the builtin Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146840/new/ https://reviews.llvm.org/D146840 Files: clang/includ

[PATCH] D146840: [AMDGPU] Replace target feature for global fadd32

2023-03-24 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 created this revision. gandhi21299 added reviewers: foad, arsenm, rampitec, Joe_Nash. Herald added subscribers: kosarev, StephenFan, kerbowa, tpr, dstuttard, yaxunl, jvesely, kzhuravl. Herald added a project: All. gandhi21299 requested review of this revision. Herald added subscribers:

[PATCH] D92956: Fix range-loop-analysis checks for trivial copyability

2022-04-07 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Perhaps, a description could be added to this patch before committing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92956/new/ https://reviews.llvm.org/D92956 ___ cfe-commit

[PATCH] D92956: Fix range-loop-analysis checks for trivial copyability

2022-04-07 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Herald added a project: All. @Quuxplusone I can commit this patch on behalf of @fanfuqiang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92956/new/ https://reviews.llvm.org/D92956 _

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-29 Thread Anshil Gandhi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf0560ca0018: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in… (authored by gandhi21299). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Thanks for the review, I will merge this patch in. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553 ___ cfe-commits mailing list cfe

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 390377. gandhi21299 added a comment. - replaced integers with memory order macros in SemaCUDA/atomic-ops.cu Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553 Files:

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-26 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 390094. gandhi21299 added a comment. applied clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553 Files: clang/include/clang/AST/Expr.h clang/include/

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-26 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 390093. gandhi21299 added a comment. addressed feedback including - correction of function signatures - checking for order combinations - correcting expected store atomic instruction - using predefined macros for memory order Repository: rG LLVM Githu

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-25 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Passed internal CI Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-25 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 389834. gandhi21299 added a comment. - applied clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553 Files: clang/include/clang/AST/Expr.h clang/includ

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-25 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 389833. gandhi21299 added a comment. - added order argument in the builtins and changed the tests accordingly - adding Sema test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llv

[PATCH] D114025: [clang][NFC] Inclusive terms: replace some uses of sanity in clang

2021-11-24 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5536 +// GCC does not enforce these rules for GNU atomics, but we do, because if +// we didn't it would be very confusing. FIXME: For whom? How so? auto IsAllowedValueType = [&](QualType

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-24 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5587 // the GNU atomics specification, but we enforce it, because if we didn't it // would be very confusing. FIXME: For whom? How so? Diag(ExprRange.getBegin(), diag::err_atomic_op_ne

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-24 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:5587 // the GNU atomics specification, but we enforce it, because if we didn't it // would be very confusing. FIXME: For whom? How so? Diag(ExprRange.getBegin(), diag::err_atomic_op_ne

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-24 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 389577. gandhi21299 added a comment. removed changes in atomic-ops.cl, CUDA test may be sufficient. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114553/new/ https://reviews.llvm.org/D114553 Files: clang

[PATCH] D114553: [HIP] Add atomic load, atomic store and atomic cmpxchng_weak builtin support in HIP-clang

2021-11-24 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 created this revision. gandhi21299 added reviewers: yaxunl, b-sumner, t-tye, tra, rjmccall. gandhi21299 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Introduce __hip_atomic_load, __hip_atomic_store and __hip_atomic_compare_ex

[PATCH] D92956: Fix range-loop-analysis checks for trivial copyability

2021-11-21 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 accepted this revision. gandhi21299 added a comment. This revision is now accepted and ready to land. LGTM, thanks for the bug fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92956/new/ https://reviews.llvm.org/D92956 __

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-18 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @yaxunl thanks for the review! My Github account is locked unfortunately so I will have to ask you to push this commit to the main branch. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113925/new/ https://re

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-16 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 387668. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. - removed debug code - some macro definitions need to be defined for HIP-only compilation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 387396. gandhi21299 added a comment. reapplied clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113925/new/ https://reviews.llvm.org/D113925 Files: clang/include/clang/AST/Expr.h clang/includ

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 387395. gandhi21299 added a comment. clang-formatted code Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113925/new/ https://reviews.llvm.org/D113925 Files: clang/include/clang/AST/Expr.h clang/include/

[PATCH] D113925: [HIP] Add HIP scope atomic operations

2021-11-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 created this revision. gandhi21299 added reviewers: yaxunl, b-sumner, t-tye, tra, rjmccall. Herald added subscribers: dexonsmith, Anastasia. gandhi21299 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Add an AtomicScopeModel for

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-20 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp:67 + if (auto *GA = dyn_cast(Op.getGlobal())) +return cast(GA->getOperand(0)); return cast(Op.getGlobal()); arsenm wrote: > gandhi21299 wrote: > > arsenm

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-20 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp:67 + if (auto *GA = dyn_cast(Op.getGlobal())) +return cast(GA->getOperand(0)); return cast(Op.getGlobal()); arsenm wrote: > I thought aliases could inclu

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-19 Thread Anshil Gandhi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0567f0333176: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols (authored by gandhi21299). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: clang/test/CodeGenCUDA/amdgpu-alias-undef-symbols.cu:3 + +// RUN: %clang -target x86_64-unknown-linux-gnu --offload-arch=gfx906 --cuda-device-only -nogpulib -nogpuinc -x hip -emit-llvm -S -o - %s \ +// RUN: -fgpu-rdc -O3 -mllvm -a

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @thakis can you please check if this solution is sufficient? Thanks for bringing it up Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 380110. gandhi21299 added a comment. added -target option in the test amdgpu-alias-undef-symbols.cu Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 Files: clang

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-15 Thread Anshil Gandhi 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 rGf92db6d3fff1: [HIP] Relax conditions for address space cast in builtin args (authored by gandhi21299). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 380098. gandhi21299 added a comment. cleaned up code for readability Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D111734 Files: clang/lib/Sema/SemaExpr.cpp clang/

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @tra I see, we sure can rewrite that segment for readability. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D111734 ___ cfe-commits maili

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3b48e1170dc6: [HIP] Relax conditions for address space cast in builtin args (authored by gandhi21299). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/n

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D111734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 380067. gandhi21299 marked 3 inline comments as done. gandhi21299 added a comment. corrected sema test, as requested Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D11173

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG03375a3fb33b: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols (authored by gandhi21299). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 380048. gandhi21299 added a comment. removed unused diagnostic sema note Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D111734 Files: clang/lib/Sema/SemaExpr.cpp cl

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 380047. gandhi21299 added a comment. installed clang-format, refreshing patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D111734 Files: clang/include/clang/Basic/D

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 380046. gandhi21299 added a comment. adding sema test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D111734 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-14 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Passed internal CI, still working on a Sema test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D111734 ___ cfe-commits mailing list cfe-

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-14 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Passed ePSDB Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-14 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 379530. gandhi21299 added a comment. add a restrictions to what architecture AlwaysInliner should run on, updated the inline-calls.ll test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https:/

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 379444. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. adding codegen test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D111734 Files: cl

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 379419. gandhi21299 added a comment. removed irrelevant lines in the test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111734/new/ https://reviews.llvm.org/D111734 Files: clang/lib/Sema/SemaExpr.cpp c

[PATCH] D111734: [HIP] Relax conditions for address space cast in builtin args

2021-10-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 created this revision. gandhi21299 added a reviewer: yaxunl. gandhi21299 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Allow (implicit) address space casting between LLVM-equivalent target address spaces. Repository: rG LL

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-12 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: llvm/test/CodeGen/AMDGPU/inline-calls.ll:3 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck %s -; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck %s @tstellar

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-08 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Passed internal CI Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-08 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 378218. gandhi21299 added a comment. added -nogpulib and -nogpuinc flags to amdgpu-alias-undef-symbols.cu Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 Files:

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-08 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-08 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 377922. gandhi21299 added a comment. refreshing patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-05 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-01 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 376559. gandhi21299 added a comment. - Since callees may alias to a function pointer, it makes sense for `getCalleeFunction(...)` to return a `Function` which is a cast of the operand of a `GlobalAlias`. Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-10-01 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 376564. gandhi21299 added a comment. - eliminated changes in SIISelLowering Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 Files: clang/lib/Driver/ToolChains/C

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-30 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. inline-calls.ll failed on gfx908 due to the change in SIISelLowering.cpp, line 3015. Without the change, there is a failure in AMDGPUResourceAnalysis.cpp, line 65 because Op.getGlobal() is not a Function. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-30 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 reclaimed this revision. gandhi21299 added a comment. Sorry, that was a mistake. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___ cfe-commits mai

[PATCH] D110772: [clang] Allow pointers from any address space to gfx90a builtins

2021-09-30 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 376095. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. - corrected test, address space cast should go under `unsafeAtomicAdd(...)` codegen Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D110772: [clang] Allow pointers from any address space to gfx90a builtins

2021-09-30 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 created this revision. gandhi21299 added reviewers: yaxunl, rampitec. gandhi21299 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Explicitly address space cast the pointer if its address space differs from the address space of t

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp:96-97 if (Function* F = dyn_cast(A.getAliasee())) { + if (A.getLinkage() != GlobalValue::InternalLinkage) +continue; A.replaceAllUsesWith(F);

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-29 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 375655. gandhi21299 added a comment. - declare failure when lowering an accessor of a callee which is not a function, in GlobalISel Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-27 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @yaxunl Should inline-calls.ll be converted into an expected failing test or removed? (to avoid cast failure in AMDGPUResourceAnalysis to break the test) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https:

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-27 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 375284. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. - added the `REQUIRES` line as requested by Sam Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.l

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-27 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. In D109707#3016438 , @gandhi21299 wrote: > - replaced a `cast` with a `dyn_cast` since the return value from > `getCalleeFunction()` is not always a Function > - `RUN on line 2` was causing 2 more scalar registers to be used

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-27 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. It does not look like function calls are supported yet in AMDGPUCallLowering, is that correct? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-27 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 375079. gandhi21299 added a comment. - Declare an unhandled call lowering in SelectionDAG when a callee is encountered which cannot be casted into a Function - I am still investigating the effects on GlobalISel side of things, there seems to be a problem

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-23 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp:65 - return cast(Op.getGlobal()); + return dyn_cast(Op.getGlobal()); } arsenm wrote: > I think this is not the right place for this. If we can determine the

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-23 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 374369. gandhi21299 added a comment. - refreshing patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/tes

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-22 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 374354. gandhi21299 added a comment. - replaced a `cast` with a `dyn_cast` since the return value from `getCalleeFunction()` is not always a Function - `RUN on line 2` was causing 2 more scalar registers to be used on tonga due to @func_alias not being i

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 373257. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. - Prevent removing alias if the GlobalAlias does not have internal linkage Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @yaxunl I think we have two ways to go from here: 1. If appropriate, reset the maximum number of scalar registers allowed in `@kernel3` (inline-calls.ll) to fix the test. 2. Determine a stronger condition for inlining. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-16 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Internal linkage detection works great for our purposes but it causes a failure in llvm/test/CodeGen/AMDGPU/inline-calls.ll due to `@func_alias` unable to be casted into a `Function`. If we pass through that, the `@kernel3` causes the error: `scalar registers (98) e

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-16 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @yaxunl Under what criteria should an alias not be removed? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 ___ cfe-commits mailing

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 372573. gandhi21299 added a comment. - converted the HIP test into a CUDA test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 Files: clang/lib/Driver/ToolChain

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-15 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 372551. gandhi21299 added a comment. - added the include header for HIP runtime Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109707/new/ https://reviews.llvm.org/D109707 Files: clang/lib/Driver/ToolChai

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-14 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5069 // where aliases aren't supported. - if (!RawTriple.isOSDarwin() && !RawTriple.isNVPTX() && !RawTriple.isAMDGPU()) CmdArgs.push_back("-mconstructor-aliases"); gandh

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-14 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 372528. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. - set `GlobalOpt` parameter to false by default to disallow alias elimination when the options EarlyInlineAll and EnableFunctionCalls are true and false, respectively. R

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 marked an inline comment as done. gandhi21299 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:5069 // where aliases aren't supported. - if (!RawTriple.isOSDarwin() && !RawTriple.isNVPTX() && !RawTriple.isAMDGPU()) CmdArgs.push_back("-

[PATCH] D109707: [HIP] [AlwaysInliner] Disable AlwaysInliner to eliminate undefined symbols

2021-09-13 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 created this revision. gandhi21299 added reviewers: yaxunl, aeubanks. Herald added subscribers: foad, kerbowa, hiraditya, tpr, nhaehnle, jvesely, arsenm. gandhi21299 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commi

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-20 Thread Anshil Gandhi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG508b06699a39: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware… (authored by gandhi21299). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-18 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 marked an inline comment as done. gandhi21299 added a comment. Thanks for the review, I will merge this in as soon as the CI passes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 ___

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-18 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 367273. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. - code refactor Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 Files: clang/

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-18 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-18 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 367042. gandhi21299 added a comment. - corrected logic for ORE in SIISelLowering.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 Files: clang/test/CodeGenOp

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-18 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. My understanding is that since we are reporting unsafe expansion into hw instructions, `fpModeMatchesGlobalFPAtomicMode(RMW)` must be false to match the logic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-18 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. @rampitec Which part of the logic is wrong? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 ___ cfe-commits mailing list cfe-commit

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-18 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 367000. gandhi21299 marked an inline comment as done. gandhi21299 added a comment. - corrected AtomicExpansionKind return value in SIISelLowering as pointed out by reviewer - eliminated previous function declaration which is not defined/used anymore Rep

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-18 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366958. gandhi21299 added a comment. - requested changes from reviewer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 Files: clang/test/CodeGenOpenCL/atomics-c

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 marked 3 inline comments as done. gandhi21299 added inline comments. Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12195 + if (!fpModeMatchesGlobalFPAtomicMode(RMW)) +return reportUnsafeHWInst(RMW, AtomicExpansionKind::None); ra

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366765. gandhi21299 marked 2 inline comments as done. gandhi21299 added a comment. - split the OpenCL test into two for brevity - fixed a mistake in SIISelLowering as pointed out by reviewer - added the missing -munsafe-fp-atomics flag Repository: rG L

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 marked 5 inline comments as done. gandhi21299 added inline comments. Comment at: clang/test/CodeGenOpenCL/atomics-remarks-gfx90a.cl:9 +// RUN: %clang_cc1 -cl-std=CL2.0 -O0 -triple=amdgcn-amd-amdhsa -target-cpu gfx90a \ +// RUN: -Rpass=si-lower -munsafe-fp-atomi

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366752. gandhi21299 added a comment. - corrected an argument in AtomicExpand pass Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 Files: clang/test/CodeGenOpenC

[PATCH] D108150: [Remarks] [AMDGPU] Emit optimization remarks for atomics generating hardware instructions

2021-08-17 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 updated this revision to Diff 366751. gandhi21299 added a comment. - added more tests - addressed feedback from reviewer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108150/new/ https://reviews.llvm.org/D108150 Files: clang/test/Cod

[PATCH] D106891: [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-17 Thread Anshil Gandhi via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf22ba5187350: [Remarks] Emit optimization remarks for atomics generating CAS loop (authored by gandhi21299). Changed prior to commit: https://reviews.llvm.org/D106891?vs=366683&id=366735#toc Repository

[PATCH] D108150: [Remarks] Emit optimization remarks for atomics generating hardware instructions

2021-08-16 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 created this revision. gandhi21299 added reviewers: rampitec, arsenm, b-sumner. Herald added subscribers: foad, kerbowa, jfb, hiraditya, Anastasia, nhaehnle, jvesely. gandhi21299 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, wdng. Herald added

[PATCH] D106891: [Remarks] Emit optimization remarks for atomics generating CAS loop

2021-08-16 Thread Anshil Gandhi via Phabricator via cfe-commits
gandhi21299 added a comment. Will do, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106891/new/ https://reviews.llvm.org/D106891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

  1   2   3   >