[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG64ecdc1cb168: [OpenMP] Pass AMDGPU math libraries into the linker wrapper (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119841/new/

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield reopened this revision. JonChesterfield added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119841/new/ https://reviews.llvm.org/D119841

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. In D119841#3326638 , @JonChesterfield wrote: > This is asserting somewhere in clang-linker-wrapper, e.g. > https://lab.llvm.org/buildbot/#/builders/193/builds/6939 Yes, must be when we try to sort the device files. I'll revert

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Ron Lieberman via Phabricator via cfe-commits
ronlieb added a comment. Hi Joseph, seems to have broken amdgpu buildbit, please revert and fix ? https://lab.llvm.org/buildbot/#/builders/193/builds/6939 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119841/new/ https://reviews.llvm.org/D119841

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. This is asserting somewhere in clang-linker-wrapper, e.g. https://lab.llvm.org/buildbot/#/builders/193/builds/6939 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119841/new/ https://reviews.llvm.org/D119841

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Joseph Huber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG61fb260d9d8c: [OpenMP] Pass AMDGPU math libraries into the linker wrapper (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119841/new/

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG, with or without the -lm lookup Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8195 + // Get the AMDGPU math libraries. + // FIXME: This method is bad, remove

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8195 + // Get the AMDGPU math libraries. + // FIXME: This method is bad, remove once AMDGPU has a proper math library. + for (auto : llvm::make_range(OpenMPTCRange.first, OpenMPTCRange.second)) {

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8205 +if (llvm::find(LibraryArgs, "m") == LibraryArgs.end() && !D.CCCIsCXX()) + continue; + JonChesterfield wrote: > jdoerfert wrote: > > JonChesterfield wrote: > > >

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-16 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8205 +if (llvm::find(LibraryArgs, "m") == LibraryArgs.end() && !D.CCCIsCXX()) + continue; + jdoerfert wrote: > JonChesterfield wrote: > > jhuber6 wrote: > > >

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 409043. jhuber6 added a comment. Removing `-lm` semantics so it is linked by default. Also adding the flag to the tested output. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119841/new/

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8205 +if (llvm::find(LibraryArgs, "m") == LibraryArgs.end() && !D.CCCIsCXX()) + continue; + JonChesterfield wrote: > jhuber6 wrote: > > jdoerfert wrote: > > > I'd switch

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-15 Thread Jon Chesterfield via Phabricator via cfe-commits
JonChesterfield added a comment. I'm not confident it's only attributes that we rely on mlink-builtin-bitcode patching up, that could be poor phrasing on my part. Making the pipeline robust to underspecified IR input may be easier (and arguably more useful) than changing the rocm library to be

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8195 + // Get the AMDGPU math libraries. + // FIXME: This method is bad, remove once AMDGPU has a proper math library. + for (auto : llvm::make_range(OpenMPTCRange.first, OpenMPTCRange.second))

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a subscriber: arsenm. jdoerfert added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8195 + // Get the AMDGPU math libraries. + // FIXME: This method is bad, remove once AMDGPU has a proper math library. + for (auto :

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8195 + // Get the AMDGPU math libraries. + // FIXME: This method is bad, remove once AMDGPU has a proper math library. + for (auto : llvm::make_range(OpenMPTCRange.first, OpenMPTCRange.second))

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-15 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added inline comments. Comment at: clang/lib/Driver/ToolChains/Clang.cpp:8195 + // Get the AMDGPU math libraries. + // FIXME: This method is bad, remove once AMDGPU has a proper math library. + for (auto : llvm::make_range(OpenMPTCRange.first,

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. I can't test this yet because the AMDGPU cluster is down for maintenance. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119841/new/ https://reviews.llvm.org/D119841 ___

[PATCH] D119841: [OpenMP] Pass AMDGPU math libraries into the linker wrapper

2022-02-15 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: JonChesterfield, jdoerfert. Herald added subscribers: kerbowa, guansong, t-tye, tpr, dstuttard, yaxunl, jvesely, kzhuravl. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1, wdng. Herald added a