[PATCH] D151098: [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help`

2023-05-22 Thread Joseph Huber 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 rGba9590d8bc76: [Clang][Docs] Add help test to `-march` and `-mcpu` to suggest `-mcpu=help` (authored by jhuber6). Repository: rG LLVM Github Monore

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4361081 , @arsenm wrote: > They bypass all semantic checks. For example if you declare something as > address space 4, it will let you write to it unlike __constant__. It will let > you place stack objects in globals

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4361237 , @ebevhan wrote: > Clang hasn't needed to formalize all of the address space behavior because > it's managed to piggyback off of the language semantics provided by OpenCL, > and no targets really have had a n

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D151087#4361367 , @ebevhan wrote: > I don't think the standard argument really holds. It doesn't mention > restrictions on address spaces because it doesn't have to, since they don't > exist in C++. If they did, I'm pretty su

[PATCH] D151087: [Clang] Permit address space casts with 'reinterpret_cast' in C++

2023-05-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. We should at least be able to `reinterpret_cast` between cases we know are compatible, as the OpenCL check does. One of the problems with the numerical address space is it doesn't have any information to know if that's strictly legal or not. I'm not sure if casting away

[PATCH] D150998: [OpenMP] Fix using the target ID when using the new driver

2023-05-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8475 "triple=" + TC->getTripleString(), -"arch=" + Arch.str(), +"arch=" + getProcessorFromTargetID(TC->getTriple(), Arch).str(), "kind=" + Kind.str(), --

[PATCH] D151839: [LinkerWrapper] Fix static library symbol resolution

2023-05-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, JonChesterfield, tra, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald added a project: clang. The linker wrapper perfo

[PATCH] D151839: [LinkerWrapper] Fix static library symbol resolution

2023-05-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/Driver/linker-wrapper-libs.c:27 // // Check that we extract a static library defining an undefined symbol. // tra wrote: > How does this test test the functionality of the undefined symbol? E.g. how > does

[PATCH] D151839: [LinkerWrapper] Fix static library symbol resolution

2023-05-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 527240. jhuber6 added a comment. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151839/new/ https://reviews.llvm.org/D151839 Files: clang/test/Driver/linker-wrapper-libs.c clang/tools/clang-linker-

[PATCH] D151839: [LinkerWrapper] Fix static library symbol resolution

2023-05-31 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/Driver/linker-wrapper-libs.c:27 // // Check that we extract a static library defining an undefined symbol. // tra wrote: > jhuber6 wrote: > > tra wrote: > > > How does this test test the functionality of th

[PATCH] D151839: [LinkerWrapper] Fix static library symbol resolution

2023-06-01 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa26bd95325f1: [LinkerWrapper] Fix static library symbol resolution (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D151839/new/ https://

[PATCH] D143768: [Clang] Add options to disable direct linking of arch tools

2023-02-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: aaronmondal, JonChesterfield, tra, jdoerfert, tianshilei1992. Herald added subscribers: kosarev, mattd, asavonic, kerbowa, tpr, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. He

[PATCH] D143768: [Clang] Add options to disable direct linking of arch tools

2023-02-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D143768#4119021 , @aaronmondal wrote: > Does this address the case where we have HSA headers present on the system? > > Since this only seems to modify link time behavior, I think building with > this flag would still include

[PATCH] D143768: [Clang] Add options to disable direct linking of arch tools

2023-02-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Like I said, the difference between these dependencies and something like `libxml2` or `libz` is that the presence of the libraries doesn't guard any features. We can build the application both ways, the only difference is runtime cost if we don't link the library direc

[PATCH] D143768: [Clang] Add options to disable direct linking of arch tools

2023-02-11 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Actually, I might want to optionally link this stuff in the `libc` project in the future as well. That would be a dependency only required for tests but it might be compelling then. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D143306: [Driver] Default to -fno-openmp-implicit-rpath

2023-02-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. If we're removing this feature it would probably make sense to remove the handling / flag altogether as `-fopenmp-implicit-rpath` isn't that much different from `-Wl,-rpath=/path/to/llvm/install/lib`. Overall, the problem is that we want to tie the `libomptarget.so` wit

[PATCH] D144505: [Clang] Add options in LTO mode when cross compiling for AMDGPU

2023-02-21 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, arsenm, yaxunl, JonChesterfield, tianshilei1992. Herald added subscribers: kosarev, kerbowa, inglorion, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscr

[PATCH] D144505: [Clang] Add options in LTO mode when cross compiling for AMDGPU

2023-02-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:545 +addLTOOptions(getToolChain(), Args, CmdArgs, Output, Inputs[0], + C.getDriver().getLTOMode() == LTOK_Thin); CmdArgs.push_back("-shared"); JonChesterfiel

[PATCH] D144505: [Clang] Add options in LTO mode when cross compiling for AMDGPU

2023-02-22 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc45d2df05e0e: [Clang] Add options in LTO mode when cross compiling for AMDGPU (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144505/new

[PATCH] D144505: [Clang] Add options in LTO mode when cross compiling for AMDGPU

2023-02-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/Driver/amdgpu-toolchain.c:7 // RUN: %clang -### -g --target=amdgcn-mesa-mesa3d -mcpu=kaveri %s 2>&1 | FileCheck -check-prefix=DWARF_VER %s // AS_LINK: "-cc1as" arsenm wrote: > should add a test for thinlt

[PATCH] D143306: [Driver] Default to -fno-openmp-implicit-rpath

2023-02-22 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D143306#4145482 , @jdoerfert wrote: > @jhuber6 Can you look into the last part, creating such a clang.cfg as part > of the build/install process? > > The fact that rpath is always set is a difference but I doubt it's that bad.

[PATCH] D144569: [Clang][OpenMP] Fix accessing of aligned arrays in offloaded target regions

2023-02-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/amdgpu_target_with_aligned_attribute.c:1 +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --function-signature --include-generated-funcs --replace-value-regex "__omp_offloading_

[PATCH] D144569: [Clang][OpenMP] Fix accessing of aligned arrays in offloaded target regions

2023-02-24 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Sema/SemaOpenMP.cpp:2274 + if (!IsByRef) { +if ((Ctx.getTargetInfo().getTriple().isAMDGCN()) || +(Ctx.getTargetInfo().getTriple().isNVPTX())) { Why does this handling need to be different between C

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, tra, yaxunl, MaskRay. Herald added subscribers: mattd, gchakrabarti, asavonic. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as done. jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Cuda.cpp:594 - // Add paths specified in LIBRARY_PATH environment variable as -L options. - addDirectoryList(Args, CmdArgs, "-L", "LIBRARY_PATH"); -

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 519957. jhuber6 added a comment. Addressing comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/ https://reviews.llvm.org/D149978 Files: clang/lib/Driver/ToolChains/Cuda.cpp clang/test/Driver

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Somewhat annoying, I've discovered that LLVM adds `-Wl,-fcolor-diagnostics` which obviously isn't supported by `nvlink` so it fails while including this in `libc`'s CMake. Any clue if there's a way to work around that? Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. The main reason I made this patch was to allow passing `--suppress-stack-size-warning` to `nvlink`. But it turns out it's a little more difficult there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/ https://re

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149978#4323221 , @tra wrote: > In D149978#4323210 , @jhuber6 wrote: > >> Somewhat annoying, I've discovered that LLVM adds `-Wl,-fcolor-diagnostics` >> which obviously isn't supported

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 519977. jhuber6 added a comment. Putting up the hack that works around my problem with `libc`. Definitely not a good solution though. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149978/new/ https://reviews.l

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149978#4323328 , @tra wrote: >> The latter is a little difficult, > > The more we dig, the more we want GPU-capable lld. :-) My thoughts exactly. I had a small chat with @MaskRay about how difficult it would be to spin up su

[PATCH] D149978: [Clang][NVPTX] Allow passing arguments to the linker while standalone

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149978#4323452 , @tra wrote: >> I've discovered that LLVM adds -Wl,-fcolor-diagnostics > > Can you tell me where it's done? `llvm/cmake/modules/HandleLLVMOptions.cmake:994` Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-05 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, JonChesterfield. Herald added subscribers: kosarev, kerbowa, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, wdng. Herald a

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-06 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:546 addLinkerCompressDebugSectionsOption(getToolChain(), Args, CmdArgs); AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA); + Args.AddAllArgs(CmdArgs, options::OPT_L); --

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:546 addLinkerCompressDebugSectionsOption(getToolChain(), Args, CmdArgs); AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA); + Args.AddAllArgs(CmdArgs, options::OPT_L); --

[PATCH] D150136: [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl. Herald added a subscriber: mattd. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. When cross-compiling NVPTX we use the triple

[PATCH] D150136: [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D150136#4327570 , @tra wrote: > The change may be an improvement, but we may still have a potential issue > here. > > E.g. ideally we may want to be able to cross-compile a CUDA app on a powerpc > or ARM build host targeting

[PATCH] D150136: [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain

2023-05-08 Thread Joseph Huber 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 rGc2c917f7f668: [Clang] Change default triple to LLVM_HOST_TRIPLE for the CUDA toolchain (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D150156: [OpenMP] Fix incorrect interop type for number of dependencies

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 520526. jhuber6 added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150156/new/ https://reviews.llvm.org/D150156 Files

[PATCH] D150156: [OpenMP] Fix incorrect interop type for number of dependencies

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D150156#4328360 , @tianshilei1992 wrote: > Does this cause the IR issue? Not sure, I just get an undefined symbol error in the linker now. Not sure if that means it's resolved or I just can't reproduce it. Repository: rG

[PATCH] D150156: [OpenMP] Fix incorrect interop type for number of dependencies

2023-05-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 520543. jhuber6 added a comment. Fix `add_attributes.ll` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150156/new/ https://reviews.llvm.org/D150156 Files: clang/test/OpenMP/interop_irbuilder.cpp llvm/inclu

[PATCH] D150156: [OpenMP] Fix incorrect interop type for number of dependencies

2023-05-08 Thread Joseph Huber 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 rGe494ebf9d09b: [OpenMP] Fix incorrect interop type for number of dependencies (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES S

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:546 addLinkerCompressDebugSectionsOption(getToolChain(), Args, CmdArgs); AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA); + Args.AddAllArgs(CmdArgs, options::OPT_L); --

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-09 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D150013#4330452 , @MaskRay wrote: > So it seems that there are configurations that we need -L (cross > compilation?). If we forward -L in some configurations, I think it'd be > better to do this consistently. > > The `LIBRARY

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-10 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 521202. jhuber6 added a comment. Updating, @yaxunl does this look good? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150013/new/ https://reviews.llvm.org/D150013 Files: clang/lib/Driver/ToolChains/CommonArg

[PATCH] D150013: [Clang] Respect `-L` options when compiling directly for AMDGPU

2023-05-11 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG027aeec7da67: [Clang] Respect `-L` options when compiling directly for AMDGPU (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150013/new

[PATCH] D150461: [OpenMP] Naturally align internal global variables in the OpenMPIRBuilder

2023-05-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tianshilei1992, ABataev, JonChesterfield, tstellar, gchatelet. Herald added subscribers: sunshaoce, guansong, hiraditya, yaxunl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm

[PATCH] D150427: [AMDGPU] Non hostcall printf support for HIP

2023-05-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Where does the runtime implementation of this live? I'm not very familiar with the HIP / hostcall ecosystem. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150427/new/ https://reviews.llvm.org/D150427 _

[PATCH] D150461: [OpenMP] Naturally align internal global variables in the OpenMPIRBuilder

2023-05-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D150461#4338498 , @gchatelet wrote: > quick question, did you try to build the openmp runtime as well to check if > the tests still pass? I'm an OpenMP developer so I always have it built : ). Yes they still pass. Repositor

[PATCH] D150461: [OpenMP] Naturally align internal global variables in the OpenMPIRBuilder

2023-05-12 Thread Joseph Huber 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 rGdd02984519ab: [OpenMP] Naturally align internal global variables in the OpenMPIRBuilder (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D150807: [Clang] Remove direct linking of offloading runtimes from the arch tools

2023-05-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, JonChesterfield, jdoerfert, tianshilei1992, ye-luo. Herald added subscribers: mattd, gchakrabarti, asavonic, kerbowa, tpr, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers:

[PATCH] D150807: [Clang] Remove direct linking of offloading runtimes from the arch tools

2023-05-17 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 523125. jhuber6 added a comment. Remove now unused definitions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150807/new/ https://reviews.llvm.org/D150807 Files: clang/tools/amdgpu-arch/AMDGPUArch.cpp clang

[PATCH] D150807: [Clang] Remove direct linking of offloading runtimes from the arch tools

2023-05-17 Thread Joseph Huber 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 rG66da9ec073ff: [Clang] Remove direct linking of offloading runtimes from the arch tools (authored by jhuber6). Repository: rG LLVM Github Monorepo

[PATCH] D148849: [OpenMP-OPT] Remove limit for heap to stack conversions of __kmpc_alloc_shared allocations

2023-04-20 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 accepted this revision. jhuber6 added a comment. This revision is now accepted and ready to land. LG Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148849/new/ https://reviews.llvm.org/D148849 ___

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, tra, yaxunl, tianshilei1992, MaskRay, jdoerfert. Herald added subscribers: kosarev, abrachet, phosek, kerbowa, s.egerton, simoncook, asb, jvesely. Herald added a project: All. jhuber6 requested review of this revision. Heral

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149019#4290573 , @JonChesterfield wrote: > Can't reasonably see the semantic change between all the whitespace reformat, > please split those two. E.g. use git-clang-format to only fix formatting in > the part you're changi

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 516167. jhuber6 added a comment. Fix formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149019/new/ https://reviews.llvm.org/D149019 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/Tool

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 516188. jhuber6 added a comment. Remove cc1 negative option Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149019/new/ https://reviews.llvm.org/D149019 Files: clang/include/clang/Driver/Options.td clang/lib

[PATCH] D149028: [Clang] Always pass `-fconvergent-functions` for GPU targets

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, jdoerfert, tianshilei1992, tra, yaxunl. Herald added a subscriber: kosarev. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. GPU t

[PATCH] D149028: [Clang] Always pass `-fconvergent-functions` for GPU targets

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 516198. jhuber6 added a comment. Herald added subscribers: mattd, asavonic. Add test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149028/new/ https://reviews.llvm.org/D149028 Files: clang/lib/Frontend/Compi

[PATCH] D149028: [Clang] Always pass `-fconvergent-functions` for GPU targets

2023-04-23 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D149028#4290831 , @JonChesterfield wrote: > I think this is sensible. Passing fno-convergent-functions presumably changes > the default? > > I wonder if we should adopt this and then remove the checks for each of the > GPU p

[PATCH] D149019: [Clang] Accept and forward `-fconvergent-functions` in the driver

2023-04-24 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf66576016290: [Clang] Accept and forward `-fconvergent-functions` in the driver (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D149019?vs=516188&id=516400#toc Repository: rG

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-04-29 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 518262. jhuber6 added a comment. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Update to only enable this when in "freestanding" mode. Also add a hash based on the module name to the global. Repository: rG LLVM Github Mono

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp:58 +((IsCtor ? "__init_array_object_" : "__fini_array_object_") + + F->getName() + "_" + getHash(M.getName()) + "_" + + std::to_string(Priority)) tr

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 518553. jhuber6 added a comment. Changing to use source filename. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149451/new/ https://reviews.llvm.org/D149451 Files: clang/lib/Driver/ToolChains/Cuda.cpp clan

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: llvm/lib/Target/NVPTX/NVPTXCtorDtorLowering.cpp:58 +((IsCtor ? "__init_array_object_" : "__fini_array_object_") + + F->getName() + "_" + getHash(M.getName()) + "_" + + std::to_string(Priority)) tr

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-01 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 518604. jhuber6 added a comment. Add option to allow overriding the global hash. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149451/new/ https://reviews.llvm.org/D149451 Files: clang/lib/Driver/ToolChains/

[PATCH] D149451: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors

2023-05-04 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf05ce9045af4: [NVPTX] Add NVPTXCtorDtorLoweringPass to handle global ctors / dtors (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D149451?vs=518604&id=519448#toc Repository:

[PATCH] D150998: [OpenMP] Fix using the target ID when using the new driver

2023-06-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Can we use this approach for now and land this? It makes the "new driver" less broken than it currently is as it supports target ID compilation in the general term. Fixing the merging rules will be a rather large overhaul so I'd like this to work in the meantime. This

[PATCH] D150998: [OpenMP] Fix using the target ID when using the new driver

2023-06-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D150998#4403401 , @yaxunl wrote: > In D150998#4403359 , @jhuber6 wrote: > >> Can we use this approach for now and land this? It makes the "new driver" >> less broken than it currently

[PATCH] D150998: [OpenMP] Fix using the target ID when using the new driver

2023-06-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D150998#4403444 , @yaxunl wrote: > what happens to > > clang -xhip a.c --offload-arch=gfx90a:xnack+ --offload-arch=gfx90a:xnack- > --offload-new-driver -fgpu-rdc > clang -xhip b.c --offload-arch=gfx90a:xnack+ --offload-arc

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: tra, yaxunl, jdoerfert, tianshilei1992, MaskRay, JonChesterfield, phosek. Herald added a project: All. jhuber6 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Clang provides the `-mli

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D152391#4404106 , @tra wrote: >> clang in.bc -Xclang -mlink-builtin-bitcode -Xclang libdevice.10.bc > > If that's something we intend to expose to the user, should we consider > promoting it to a top-level driver option? I'm

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Just realized this is probably going to be a bit more painful. the attribute propagation pass requires a `CodeGenModule` which isn't built without an `ASTContext` so it's not available here. Nothing those functions do explicitly requires the full `CGM`, they only use th

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. Scratch that, `ASTContext::getFunctionFeatureMap` is used. I wonder if we could forgo that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152391/new/ https://reviews.llvm.org/D152391 __

[PATCH] D150998: [OpenMP] Fix using the target ID when using the new driver

2023-06-07 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdc81d2a4d5b3: [OpenMP] Fix using the target ID when using the new driver (authored by jhuber6). Changed prior to commit: https://reviews.llvm.org/D150998?vs=523924&id=529476#toc Repository: rG LLVM G

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-07 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 529490. jhuber6 added a comment. Updating, in order to do this starting with bitcode I had to expose a helper that performs this operation using the options directly rather than through the `CodeGenModule`. This should keep the existing interfaces intact by sh

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 529557. jhuber6 added a comment. Add a better test to show that attributes are replaced and default attributes are added. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152391/new/ https://reviews.llvm.org/D152

[PATCH] D152442: [LinkerWrapper] Support linking vendor bitcode late

2023-06-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, tra, yaxunl, tianshilei1992, jdoerfert, gregrodgers, saiislam. Herald added a subscriber: tpr. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jplehr, sstefan1. H

[PATCH] D152461: [LTO] Add a config option to make the final output bitcode

2023-06-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, MaskRay, fhahn, tra, yaxunl, JonChesterfield, tianshilei1992. Herald added subscribers: ormris, StephenFan, steven_wu, hiraditya, inglorion. Herald added a project: All. jhuber6 requested review of this revision. Herald added proje

[PATCH] D152461: [LTO] Add a config option to make the final output bitcode

2023-06-08 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 529682. jhuber6 added a comment. Remove leftover debug Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152461/new/ https://reviews.llvm.org/D152461 Files: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cp

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-12 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152391/new/ https://reviews.llvm.org/D152391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 530919. jhuber6 marked 2 inline comments as done. jhuber6 added a comment. Addressing comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152391/new/ https://reviews.llvm.org/D152391 Files: clang/include

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as not done. jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2052-2106 +void clang::CodeGen::mergeDefaultFunctionDefinitionAttributes( +llvm::Function &F, const CodeGenOptions CodeGenOpts, +const LangOptions &LangOp

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 marked an inline comment as not done. jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2105-2106 + llvm::AttrBuilder FuncAttrs(F.getContext()); + GetCPUAndFeaturesAttributes(GlobalDecl(), FuncAttrs, + /*AddTargetFeatur

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 530944. jhuber6 added a comment. Removing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152391/new/ https://reviews.llvm.org/D152391 Files: clang/include/clang/CodeGen/CodeGenAction.h clang/lib/CodeGen/CGC

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 530946. jhuber6 added a comment. Format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152391/new/ https://reviews.llvm.org/D152391 Files: clang/include/clang/CodeGen/CodeGenAction.h clang/lib/CodeGen/CGCal

[PATCH] D139730: [OpenMP][DeviceRTL][AMDGPU] Support code object version 5

2023-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D139730#4418630 , @arsenm wrote: > In D139730#3991628 , > @JonChesterfield wrote: > >> We currently require that library for libm, which I'm also not thrilled >> about, but at least y

[PATCH] D152391: [Clang] Allow bitcode linking when the input is LLVM-IR

2023-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:2001 -void CodeGenModule::getDefaultFunctionAttributes(StringRef Name, - bool HasOptnone, - bool AttrOnCallSit

[PATCH] D152882: [LinkerWrapper] Support device binaries in multiple link jobs

2023-06-13 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, tra, yaxunl. Herald added a subscriber: tpr. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, jplehr, sstefan1, MaskRay. Herald added a reviewer: jdoe

[PATCH] D152882: [LinkerWrapper] Support device binaries in multiple link jobs

2023-06-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D152882#4421138 , @yaxunl wrote: > The design of target ID put constraints on target ID's that can be embedded > into one executable > https://clang.llvm.org/docs/ClangOffloadBundler.html#bundle-entry-id . For > example, gfx

[PATCH] D152882: [LinkerWrapper] Support device binaries in multiple link jobs

2023-06-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 531520. jhuber6 added a comment. Herald added subscribers: kerbowa, jvesely. Adjusting test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152882/new/ https://reviews.llvm.org/D152882 Files: clang/lib/Driver

[PATCH] D152882: [LinkerWrapper] Support device binaries in multiple link jobs

2023-06-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D152882#4421138 , @yaxunl wrote: > However, bitcode of target ID gfx90a:xnack+ is allowed to link in bitcode of > target ID gfx90a as long as they are from different containers. So there are > two rules about target ID: 1. c

[PATCH] D152882: [LinkerWrapper] Support device binaries in multiple link jobs

2023-06-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D152882#4422797 , @yaxunl wrote: > In D152882#4422788 , @jhuber6 wrote: > >> In D152882#4421138 , @yaxunl wrote: >> >>> However, bitcode of ta

[PATCH] D152965: [OpenMP] Correctly diagnose conflicting target identifierers for AMDGPU

2023-06-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, yaxunl, jdoerfert. Herald added subscribers: sunshaoce, kerbowa, guansong, tpr, dstuttard, jvesely, kzhuravl. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, jple

[PATCH] D152965: [OpenMP] Correctly diagnose conflicting target identifierers for AMDGPU

2023-06-14 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 531531. jhuber6 added a comment. Clang format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152965/new/ https://reviews.llvm.org/D152965 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/amdgpu-openmp-t

[PATCH] D152965: [OpenMP] Correctly diagnose conflicting target identifierers for AMDGPU

2023-06-15 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe96bec9cd8e1: [OpenMP] Correctly diagnose conflicting target identifierers for AMDGPU (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D15

[PATCH] D152882: [LinkerWrapper] Support device binaries in multiple link jobs

2023-06-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 531756. jhuber6 added a comment. Hopefully fixing test on Windows. I think it's fine to let the packager bundle mutliple of these now since it's caught in `clang`. So if the user really wants to force it we should allow them to since the bundler format is just

[PATCH] D152882: [LinkerWrapper] Support device binaries in multiple link jobs

2023-06-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/Driver/linker-wrapper.c:48 +// AMDGPU-LINK-ID: clang{{.*}} -o {{.*}}.img --target=amdgcn-amd-amdhsa -mcpu=gfx90a -O2 -Wl,--no-undefined {{.*}}.o {{.*}}.o + // RUN: clang-offload-packager -o %t.out \ yaxunl w

[PATCH] D152882: [LinkerWrapper] Support device binaries in multiple link jobs

2023-06-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 531791. jhuber6 added a comment. Updating Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152882/new/ https://reviews.llvm.org/D152882 Files: clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/amdgpu-op

<    8   9   10   11   12   13   14   15   16   >