[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2023-01-04 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D139723#4016685 , @mgorny wrote: > I've pushed a fix in dab67c66932b9149842f7c8431e951f952125fc0 > , based > on @jhuber6's fix from the other diff. Thank

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-26 Thread Michał Górny via Phabricator via cfe-commits
mgorny closed this revision. mgorny added a comment. I've pushed a fix in dab67c66932b9149842f7c8431e951f952125fc0 , based on @jhuber6's fix from the other diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-25 Thread Michał Górny via Phabricator via cfe-commits
mgorny added a comment. Also, please link commits to diffs using `Differential Revision:` trailer in the future. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/ https://reviews.llvm.org/D139723

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-25 Thread Michał Górny via Phabricator via cfe-commits
mgorny reopened this revision. mgorny added a comment. This revision is now accepted and ready to land. In D139723#4004536 , @doru1004 wrote: > Commit: 07ff3c5ccce68aed6c1a270b3f89ea14de7aa250 >

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-19 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit: 07ff3c5ccce68aed6c1a270b3f89ea14de7aa250 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-16 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 483659. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/ https://reviews.llvm.org/D139723 Files: clang/lib/Headers/CMakeLists.txt clang/lib/Headers/__clang_hip_runtime_wrapper.h

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-15 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 483312. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/ https://reviews.llvm.org/D139723 Files: clang/lib/Headers/CMakeLists.txt clang/lib/Headers/__clang_hip_runtime_wrapper.h clang/lib/Headers/__clang_hip_stdlib.h

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. @arsenm I have factored out the abs/labs/llabs functions in a separate __clang_hip_stdlib.h file which could be included by C sources. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-12 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 482133. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/ https://reviews.llvm.org/D139723 Files:

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/Headers/__clang_hip_math.h:145 // BEGIN FLOAT -#if defined(__cplusplus) __DEVICE__ doru1004 wrote: > arsenm wrote: > > Why not introduce __clang_hip_stdlib.h now? > Do we want to do this in this patch or as a

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added inline comments. Comment at: clang/lib/Headers/__clang_hip_math.h:145 // BEGIN FLOAT -#if defined(__cplusplus) __DEVICE__ arsenm wrote: > Why not introduce __clang_hip_stdlib.h now? Do we want to do this in this patch or as a separate patch? Is

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added inline comments. Comment at: clang/lib/Headers/__clang_hip_math.h:145 // BEGIN FLOAT -#if defined(__cplusplus) __DEVICE__ Why not introduce __clang_hip_stdlib.h now? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 481738. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/ https://reviews.llvm.org/D139723 Files: clang/lib/Headers/__clang_hip_math.h clang/test/Headers/Inputs/include/stdlib.h

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 added a comment. In D139723#3984846 , @jdoerfert wrote: > I'm not 100% sure if this was excluded on purpose or not. FWIW, in C, these > functions are not defined in math.h > (https://en.cppreference.com/w/c/numeric/math/abs), but in C++ they

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-09 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 updated this revision to Diff 481722. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139723/new/ https://reviews.llvm.org/D139723 Files: clang/lib/Headers/__clang_hip_math.h clang/test/Headers/Inputs/include/stdlib.h

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. In D139723#3984880 , @arsenm wrote: > In D139723#3984846 , @jdoerfert > wrote: > >> I'm not 100% sure if this was excluded on purpose or not. FWIW, in C, these >> functions are not

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-09 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D139723#3984846 , @jdoerfert wrote: > I'm not 100% sure if this was excluded on purpose or not. FWIW, in C, these > functions are not defined in math.h > (https://en.cppreference.com/w/c/numeric/math/abs), but in C++ they are

[PATCH] D139723: [OpenMP][AMDGPU] Enable use of abs labs and llabs math functions in C code

2022-12-09 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I'm not 100% sure if this was excluded on purpose or not. FWIW, in C, these functions are not defined in math.h (https://en.cppreference.com/w/c/numeric/math/abs), but in C++ they are (https://en.cppreference.com/w/cpp/numeric/math/abs). Once we enable libm_gpu it