[PATCH] D137874: clang/AMDGPU: Use Support's wrapper around getenv

2022-11-14 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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137874/new/ https://reviews.llvm.org/D137874 ___ cfe-commits mailing list cfe-

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, MaskRay. Herald added subscribers: kosarev, StephenFan, arichardson, tpr, emaste. Herald added a project: All. yaxunl requested review of this revision. When -fgpu-rdc is used for linking relocatable objects, device relocatable objects ar

[PATCH] D138221: [HIP] Fix lld failure when devie object is empty

2022-11-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 476157. yaxunl added a comment. fix typo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138221/new/ https://reviews.llvm.org/D138221 Files: clang/lib/Driver/ToolChains/HIPAMD.cpp clang/test/Driver/hip-toolchain-device-only.hip clang/test/Driver

[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-01-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. @scchan the test expects CLANG_INSTALL_LIBDIR_BASENAME to be `lib`. Maybe in the failed test it was not true. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140315/new/ https://reviews.llvm.org/D140315 _

[PATCH] D140315: [AMDGCN] Update search path for device libraries

2023-01-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/Driver/hip-device-libs.hip:206 + +// RESDIR-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DIR:[^"]+(/|)rocm_resource_dir(/|)lib(/|)amdgcn(/|).*]]hip.bc" +// ROCMDIR-SAME: "-mlink-builtin-bitcode" "[[DEVICELIB_DI

[PATCH] D142506: [AMDGCN] Fix device lib test to work with lib64

2023-01-24 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/D142506/new/ https://reviews.llvm.org/D142506 __

[PATCH] D142459: [clang] Deprecate uses of GlobalObject::getAlignment

2023-01-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:491 new llvm::LoadInst(Var->getType(), ManagedVar, "ld.managed", false, - llvm::Align(Var->getAlignment()), I); + Var->getAlign().valueOrOne

[PATCH] D141447: clang/OpenCL: Don't use a Function for the block type

2023-01-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:12477-12480 + F->setCallingConv(llvm::CallingConv::AMDGPU_KERNEL); + + // FIXME: Apply default attributes + F->addFnAttr(llvm::Attribute::NoUnwind); need a test CHANGES SINCE LAST ACT

[PATCH] D141620: clang/OpenCL: Apply default attributes to enqueued blocks

2023-01-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl:381 +// GFX900-LABEL: define {{[^@]+}}@callee +// GFX900-SAME: (i64 noundef [[ID:%.*]], ptr addrspace(1) noundef [[OUT:%.*]]) #[[ATTR1:[0-9]+]] { +// GFX900-NEXT: entry:

[PATCH] D141447: clang/OpenCL: Don't use a Function for the block type

2023-01-30 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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141447/new/ https://reviews.llvm.org/D141447 ___ cfe-commits mailing list cfe-

[PATCH] D141449: clang/OpenCL: Fix not setting convergent on block invoke kernels

2023-01-30 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141449/new/ https://reviews.llvm.org/D141449 ___ cfe-commits mailing list cfe-c

[PATCH] D141620: clang/OpenCL: Apply default attributes to enqueued blocks

2023-01-30 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141620/new/ https://reviews.llvm.org/D141620 ___ cfe-commits mailing list cfe-c

[PATCH] D143111: [HIP] Support ASAN with malloc/free

2023-02-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, b-sumner. Herald added a project: All. yaxunl requested review of this revision. Device side malloc/free needs special implementation for ASAN. https://reviews.llvm.org/D143111 Files: clang/lib/Headers/__clang_hip_runtime_wrapper.h

[PATCH] D143111: [HIP] Support ASAN with malloc/free

2023-02-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/Headers/hip-header.hip:142 +// MALLOC-ASAN-LABEL: define weak {{.*}}i8* @malloc(i64 +// MALLOC-ASAN: call i8* @llvm.returnaddress(i32 0) +// MALLOC-ASAN: call i64 @__asan_malloc_impl(i

[PATCH] D142499: [Clang][AMDGPU] Set LTO CG opt level based on Clang option

2023-02-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142499/new/ https://reviews.llvm.org/D142499 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D143305: [clang] Fix -Xarch_ for -mllvm and alike

2023-02-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, MaskRay. Herald added a subscriber: hiraditya. Herald added a project: All. yaxunl requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: llvm-commits, sstefan1. Herald added a project: LLVM. Curre

[PATCH] D143325: [Driver] Add -mllvm= as an alias for -mllvm

2023-02-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143325/new/ https://reviews.llvm.org/D143325 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D143111: [HIP] Support ASAN with malloc/free

2023-02-06 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG993bce9680c6: [HIP] Support ASAN with malloc/free (authored by yaxunl). Herald added a project: clang. Repo

[PATCH] D143412: [HIP] Update test hip-header.hip

2023-02-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, arsenm. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: wdng. remove -no-opaque-pointers https://reviews.llvm.org/D143412 Files: clang/test/Headers/hip-header.hip Index: clang/test/H

[PATCH] D143412: [HIP] Update test hip-header.hip

2023-02-06 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4f01266954b1: [HIP] Update test hip-header.hip (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143412/new/

[PATCH] D141447: clang/OpenCL: Don't use a Function for the block type

2023-01-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D141447#4044886 , @arsenm wrote: > In D141447#4042273 , @yaxunl wrote: > >> need a test > > This is NFC, this is just fixing the API for the next commit I haven't posted > yet Did you

[PATCH] D141437: [HIP] Use .hipi as preprocessor output extension

2023-01-11 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rGe8f41fdb5c6f: [HIP] Use .hipi as preprocessor output extension (authored by yaxunl). Herald added a project:

[PATCH] D141620: clang/OpenCL: Make enqueued blocks inherit the parent attributes

2023-01-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:12488 + // FIXME: The invoke isn't applying the right attributes either + llvm::AttrBuilder KernelAttrs(C, CGF.CurFn->getAttributes().getFnAttrs()); + KernelAttrs.addAttribute("enqueued-block"); ---

[PATCH] D141620: clang/OpenCL: Make enqueued blocks inherit the parent attributes

2023-01-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:12488 + // FIXME: The invoke isn't applying the right attributes either + llvm::AttrBuilder KernelAttrs(C, CGF.CurFn->getAttributes().getFnAttrs()); + KernelAttrs.addAttribute("enqueued-block"); ---

[PATCH] D141620: clang/OpenCL: Apply default attributes to enqueued blocks

2023-01-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl:53-57 -__attribute__((target("s-memtime-inst"))) -void test_target_features_func(global int *i) { - queue_t default_queue; - unsigned flags = 0; - ndrange_t ndrange; wh

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. The intention of -emit-llvm -S is usually to get LLVM assembly for all targets for inspection or modification. HIP emits a bundled LLVM assembly in textual format in this case. Users can modify it directly, or extract assembly for each device and bundle them together aga

[PATCH] D142022: [Clang][OpenMP] Fix handling of -mcode-object-version for OpenMP

2023-01-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7116 if (Triple.isAMDGPU()) { -handleAMDGPUCodeObjectVersionOptions(D, Args, CmdArgs); +handleAMDGPUCodeObjectVersionOptions(D, C.getArgs(), CmdArgs); why do you need to

[PATCH] D142118: [HIP] Unbundler allows missing host entry

2023-01-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a project: All. yaxunl requested review of this revision. Herald added subscribers: sstefan1, MaskRay. Herald added a reviewer: jdoerfert. clang-offload-bundler should allow missing host entry when unbundling with option --a

[PATCH] D140663: CUDA/HIP: Use kernel name to map to symbol

2023-01-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/test/CodeGenCUDA/incomplete-func-ptr-type.cu:22 +// CHECK: define internal void @__hip_register_globals(ptr %0) { +// CHECK:%1 = call i32 @__hipRegisterFunction(ptr %0, ptr @_Z4kern7TempValIjE, ptr @0, ptr @0, i32 -1, ptr null

[PATCH] D140663: CUDA/HIP: Use kernel name to map to symbol

2023-01-19 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/D140663/new/ https://reviews.llvm.org/D140663 __

[PATCH] D142118: [HIP] Unbundler allows missing host entry

2023-01-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Driver/OffloadBundler.cpp:1063 // in case host bundle name was provided in command line. - if (!FoundHostBundle && BundlerConfig.HostInputIndex != ~0u) + if (!FoundHostBundle && Bund

[PATCH] D142118: [HIP] Unbundler allows missing host entry

2023-01-19 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG3006cb2aa8d9: [HIP] Unbundler allows missing host entry (authored by yaxunl). Herald added a project: clang.

[PATCH] D142022: [Clang][OpenMP] Fix handling of -mcode-object-version for OpenMP

2023-01-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Is this patch really necessary? `-mcode-object-version=` option does not go through any translation in derived args. If it is in derived args, it should also be in the original args. HIPAMD toolchain just uses the original driver args. Why OpenMP toolchain needs to use t

[PATCH] D142246: [HIP] Change default offload arch to gfx906

2023-01-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: MaskRay. Change default offload arch to gfx906 since it is the lowest officially supported offload arch (https://docs.amd.com/bundle/ROCm-R

[PATCH] D142246: [HIP] Change default offload arch to gfx906

2023-01-22 Thread Yaxun Liu 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 rGc487b84d7552: [HIP] Change default offload arch to gfx906 (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://re

[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

2023-01-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can we keep the original behaviour for the older driver for HIP? Only enable the change for the new driver. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141717/new/ https://reviews.llvm.org/D141717 ___

[PATCH] D142393: [OpenMP] Add 'amdgpu-flat-work-group-size' to OpenMP kernels

2023-01-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9552 F->addFnAttr("uniform-work-group-size", "true"); + if (IsOpenMPkernel) +F->addFnAttr("amdgpu-flat-work-group-size", jhuber6 wrote: > arsenm wrote: > > jhuber6 wrote: > > > a

[PATCH] D127771: [HIP] fix long double size

2022-06-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: kosarev, kerbowa, tpr, jvesely. Herald added a project: All. yaxunl requested review of this revision. For amdgpu target long double type is the same as double type. The width and align of long double type was in

[PATCH] D127771: [HIP] fix long double size

2022-06-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D127771#3582640 , @tra wrote: > AFAICT, the test case you've added works fine with the compiler at HEAD: > https://cuda.godbolt.org/z/q3xYMfdeb > I guess it only shows up in assertion-enabled builds. Can you check what > happe

[PATCH] D127771: [HIP] fix long double size

2022-06-14 Thread Yaxun Liu 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 rGaf9ee3357cec: [HIP] fix long double size (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D1

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 437587. yaxunl added a comment. use compiler-rt as runtime lib by default for --hip-link CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127142/new/ https://reviews.llvm.org/D127142 Files: clang/lib/Driver/ToolChain.cpp clang/test/Driver/hip-runti

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D127142#3571260 , @MaskRay wrote: > In D127142#3570290 , @yaxunl wrote: > >> If I use --rtlib=compiler-rt, does that also requires --unwindlib=unwindlib ? > > No. --unwindlib=libunwind r

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added reviewers: tra, b-sumner. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: MaskRay. Add option -fhip-kernel-arg-name to emit kernel argument name metadata, which is needed for certain HIP applications. ht

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D127142#3590874 , @yaxunl wrote: > In D127142#3571260 , @MaskRay wrote: > >> In D127142#3570290 , @yaxunl wrote: >> >>> If I use --rtlib=compile

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 438709. yaxunl added a comment. add -unwindlib=libgcc by default for --hip-link since -rtlib=compiler-rt needs it CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127142/new/ https://reviews.llvm.org/D127142 Files: clang/lib/Driver/ToolChain.cpp c

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D127142#3600809 , @MaskRay wrote: > Magically deciding a default value for --unwindlib or --rtlib is not nice. > You may emit a warning if the selected default happens to be incompatible > with HIP. We build clang not just fo

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1845-1846 + } + if (getCodeGenOpts().EmitOpenCLArgMetadata || + getCodeGenOpts().HIPSaveKernelArgName) Fn->setMetadata("kernel_arg_name", ---

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1845-1846 + } + if (getCodeGenOpts().EmitOpenCLArgMetadata || + getCodeGenOpts().HIPSaveKernelArgName) Fn->setMetadata("kernel_arg_name", ---

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-23 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 5 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6353 CmdArgs.push_back("-fgpu-allow-device-init"); +if (Args.hasFlag(options::OPT_fhip_kernel_arg_name, + options::OPT_fno_hip_k

[PATCH] D128022: [HIP] add -fhip-kernel-arg-name

2022-06-24 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked 2 inline comments as done. Closed by commit rG8ad4c6e4b129: [HIP] add -fhip-kernel-arg-name (authored by yaxunl). Herald added a project: clang. Changed

[PATCH] D125904: [Cuda] Use fallback method to mangle externalized decls if no CUID given

2022-05-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D125904#3537952 , @tra wrote: > How much work would it take to add cuid generation in the new driver, similar > to what the old driver does, using the same logic, however imperfect it is? > I'd be OK with that as a possibly pe

[PATCH] D126681: [HIP] Fix static lib name on windows

2022-05-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: MaskRay. clang by default assumes static library name to be xxx.lib when -lxxx is specified on Windows with MSVC environment, instead of lib

[PATCH] D126704: [HIP] Pass -Xoffload-linker option to device linker

2022-05-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: MaskRay. Reuse -Xoffload-linker option for HIP toolchain. https://reviews.llvm.org/D126704 Files: clang/lib/Driver/ToolChains/HIPAMD.cp

[PATCH] D126681: [HIP] Fix static lib name on windows

2022-05-31 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:1788 +for (auto Prefix : {"/libdevice/", "/"}) { + if (IsMSVC) { +AOBFileNames.push_back(Twine(LPath + Prefix + Lib + ".lib").str()); ---

[PATCH] D126681: [HIP] Fix static lib name on windows

2022-05-31 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rG377806a65ea9: [HIP] Fix static lib name on windows (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D126681

[PATCH] D126704: [HIP] Pass -Xoffload-linker option to device linker

2022-05-31 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG92a606f6de77: [HIP] Pass -Xoffload-linker option to device linker (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added a project: All. yaxunl requested review of this revision. Herald added a subscriber: MaskRay. HIP supports _Float16 by default in host programs, which may cause calls of conversion functions for _Float16 emitted e.g. `__trunc

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/MSVC.cpp:485 "amdhip64.lib"}); + CmdArgs.push_back(Args.MakeArgString("clang_rt.builtins-" + + getTriple().getA

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 434807. yaxunl marked 3 inline comments as done. yaxunl edited the summary of this revision. yaxunl added a comment. use getCompilerRT to get compiler-rt lib path CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127142/new/ https://reviews.llvm.org/D127

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. need a test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127267/new/ https://reviews.llvm.org/D127267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[PATCH] D127267: [NVPTX] Add setAuxTarget override rather than make a new TargetInfo

2022-06-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. This patch is to fix an issue, right? At least we need a test to prevent that issue from happening again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127267/new/ https://reviews.llvm.org/D127267 _

[PATCH] D127142: [HIP] Link with clang_rt.builtins

2022-06-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D127142#3568905 , @MaskRay wrote: >> These functions are not available in libgcc but in libclang_rt.builtins. >> Therefore --hip-link needs to link with libclang_rt.builtins by default. > > I think this is problematic. > > The

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:75 + "cannot find HIP Standard Parallelism Acceleration library; provide it via " + "'--stdpar-path'">; +def err_drv_no_hipstdpar_thrust_lib : Error< needs to update th

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-09-25 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 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155775/new/ https://reviews.llvm.org/D155775 ___ cfe-commits mailing list cfe-c

[PATCH] D155775: [HIP][Clang][Driver][RFC] Add driver support for C++ Parallel Algorithm Offload

2023-10-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155775#4652686 , @AlexVlx wrote: > In D155775#4652683 , @thakis wrote: > >> This seems to break tests on Mac and windows, see eg >> http://45.33.8.238/macm1/70415/step_7.txt >> >> Plea

[PATCH] D155480: [HIP] Rename predefined macros

2023-07-17 Thread Yaxun Liu 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 rGf0a955d3fa54: [HIP] Rename predefined macros (authored by yaxunl). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. Herald added subscribers: mattd, carlosgalvezp. Herald added a project: All. yaxunl requested review of this revision. Currently CUDA/HIP defines their own language standards in LanguageStandards.def but they are redundant. They are the

[PATCH] D154559: [clang] Fix constant evaluation about static member function

2023-07-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154559/new/ https://reviews.llvm.org/D154559 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-18 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 541836. yaxunl added a comment. update release note CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155539/new/ https://reviews.llvm.org/D155539 Files: clang/docs/ReleaseNotes.rst clang/include/clang/Basic/LangStandards.def clang/lib/Basic/LangS

[PATCH] D154790: [HIP] Use native math functions for `-fcuda-approx-transcendentals`

2023-07-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154790/new/ https://reviews.llvm.org/D154790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-19 Thread Yaxun Liu 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 rG2d1d07152bd2: [CUDA][HIP] Use the same default language std as C++ (authored by yaxunl). Herald added a project: clang. Changed prior to commit: h

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155539#4517882 , @sylvestre.ledru wrote: > I reverted the patch for causing > https://github.com/llvm/llvm-project/issues/63974 > https://github.com/llvm/llvm-project/commit/443f490b6aac4af28500f4b09b68a13260f4fba9 Thanks. I

[PATCH] D155213: [HIP] Add `-fno-hip-uniform-block`

2023-07-20 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/include/clang/Driver/Options.td:1092 ShouldParseIf; +defm hip_uniform_block : BoolFOption<"hip-uniform-block", + LangOpts<"HIPUniformBlock">, DefaultTrue, arsenm wrote: >

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Since we need to support -O0, we need to be prepared that we may not be able to remove all the calls of unsupported functions even though they may never be called at run time. We could simply replace them with traps in the middle end. This should work if such functions

[PATCH] D155850: [Clang][CodeGen][RFC] Add codegen support for C++ Parallel Algorithm Offload

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155850#4523051 , @AlexVlx wrote: > @yaxunl interesting point - are you worried about cases where due to missing > inlining / const prop an indirect call site that can be replaced with a > direct one would remain indirect? I t

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:319 +// relevant. +__device__ inline _Float16 __llvm_amdgcn_rcp_f16(_Float16 x) { + return ((_Float16)1.0f) / x; Can we add the deprecated attribute to urge people not t

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:319 +// relevant. +__device__ inline _Float16 __llvm_amdgcn_rcp_f16(_Float16 x) { + return ((_Float16)1.0f) / x; arsenm wrote: > arsenm wrote: > > yaxunl wrote: > > > Ca

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Headers/__clang_hip_libdevice_declares.h:13-15 +#if __has_include("hip/hip_version.h") +#include "hip/hip_version.h" +#endif // __has_include("hip/hip_version.h") pls condition this with ``` #if !defined(__HIP

[PATCH] D155982: Partially revert "clang/HIP: Remove __llvm_amdgcn_* wrapper hacks"

2023-07-21 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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155982/new/ https://reviews.llvm.org/D155982 ___ cfe-commits mailing list cfe-

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155539#4524189 , @probinson wrote: > This change to lang-std.cpp causes it not to verify _which_ language standard > is the default. It only verifies that cuda and hip don't _change_ it. > If you run FileCheck on one of those

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154123/new/ https://reviews.llvm.org/D154123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155539#4528094 , @probinson wrote: > In D155539#4524543 , @yaxunl wrote: > >> In D155539#4524189 , @probinson >> wrote: >> >>> This change to

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: probinson. Herald added a project: All. yaxunl requested review of this revision. Recover the checking for the default language standard for C++. https://reviews.llvm.org/D156127 Files: clang/test/Preprocessor/lang-std.cpp Index: clang/

[PATCH] D155539: [CUDA][HIP] Use the same default language std as C++

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D155539#4528137 , @yaxunl wrote: > In D155539#4528094 , @probinson > wrote: > >> In D155539#4524543 , @yaxunl wrote: >> >>> In D155539#4524189

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked an inline comment as done. yaxunl added inline comments. Comment at: clang/test/Preprocessor/lang-std.cpp:1 +// UNSUPPORTED: target={{.*-(ps4|ps5)}} /// Test default standards. dyung wrote: > This should be unneeded now, we recently updated the PS

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 543640. yaxunl marked an inline comment as done. yaxunl added a reviewer: dyung. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156127/new/ https://reviews.llvm.org/D156127 Files: clang/test/Preprocessor/

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 2 inline comments as done. yaxunl added inline comments. Comment at: clang/docs/HIPSupport.rst:65 + + clang++ --offload-arch=gfx906 -xhip sample.cpp -o sample + arsenm wrote: > scchan wrote: > > missing --hip-link > What does hip-link do? Why is i

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 543652. yaxunl marked an inline comment as done. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154123/new/ https://reviews.llvm.org/D154123 Files: clang/docs/HIPSupport.rst Index: clang/docs/HIPSupport.

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 543670. yaxunl added a comment. revised by comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156127/new/ https://reviews.llvm.org/D156127 Files: clang/test/Preprocessor/lang-std.cpp Index: clang/test/Preprocessor/lang-std.cpp ==

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 543671. yaxunl added a comment. fix typo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156127/new/ https://reviews.llvm.org/D156127 Files: clang/test/Preprocessor/lang-std.cpp Index: clang/test/Preprocessor/lang-std.cpp =

[PATCH] D154790: [HIP] Use native math functions for `-fcuda-approx-transcendentals`

2023-07-24 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping It passes internal CI. Also tested with Blender main branch with -ffast-math and no regressions were found. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154790/new/ https://reviews.llvm.org/D154790 ___ cfe-comm

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added inline comments. Comment at: clang/docs/HIPSupport.rst:30 + +Clang provides partial HIP support on Intel GPUs using the CHIP-Star project ``_. CHIP-Star implements the HIP runtime over o

[PATCH] D154123: [HIP] Start document HIP support by clang

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked 2 inline comments as done. Closed by commit rG795e934e15b7: [HIP] Start document HIP support by clang (authored by yaxunl). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D1

[PATCH] D156127: Partially revert changes to test lang-std.cpp

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl closed this revision. yaxunl added a comment. committed by 19d3b37196553372e963bd70718bba1b0bfc94ee CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156127/new/ https://reviews.llvm.org/D156127 _

[PATCH] D154797: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. yaxunl marked 4 inline comments as done. Closed by commit rGe17882430e5c: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals` (authored by yaxunl). Herald added

[PATCH] D154797: [CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`

2023-07-25 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:7228 + } else { +Args.ClaimAllArgs(options::OPT_fgpu_approx_transcendentals); +Args.ClaimAllArgs(options::OPT_fno_gpu_approx_transcendentals); MaskRay wrote: > You can use `A

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 544345. yaxunl retitled this revision from "[HIP] Add `-fno-hip-uniform-block`" to "[HIP] Add `-fno-offload-uniform-block`". yaxunl edited the summary of this revision. yaxunl added a comment. rename the option CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D155213: [HIP] Add `-fno-offload-uniform-block`

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping I renamed the option as `-fno-offload-uniform-block`. I switched to `offload` instead of `gpu` because I think in the long run offloading toolchains are not limited to GPUs, therefore sooner or later we will feel `-fgpu-` options are awkward. I did not use `--no-of

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-26 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. `__dynamic_cast` is part of standard C++ library. If we ever implement it for GPU, chances are we will use libc++abi with the same signature as other targets, i.e., the 2nd and 3rd arguments are generic pointers. I feel it is safer to do an address space cast when callin

[PATCH] D155870: [Clang][CodeGen] Another follow-up for `vtable`, `typeinfo` et al. are globals

2023-07-26 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. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D155870/new/ https://reviews.llvm.org/D155870 ___ cfe-commits mailing list cfe-

<    14   15   16   17   18   19   20   21   22   23   >