Skip to content

Red/21.x#63

Open
stelleg wants to merge 23 commits intodev/21.xfrom
red/21.x
Open

Red/21.x#63
stelleg wants to merge 23 commits intodev/21.xfrom
red/21.x

Conversation

@stelleg
Copy link
Collaborator

@stelleg stelleg commented Jan 9, 2026

Reductions rebased on 21.x.

Status: Working for CPU reductions (OpenCilk) with good performance. See kitsune-tests/reductions.

GPU was broken by some changes in the Tapir infrastructure that Tarun and I couldn't figure out in time. Should still be a useful reference for implementing for the CUDA and HIP backends.

tarunprabhu and others added 23 commits October 20, 2025 16:23
Since Tapir currently requires optimizations, it is difficult to get the IR as
soon as it is generated by the frontend. Using -S -emit-llvm will only produce
IR that has been through the entire optimization pipeline. This commit adds a
-print-before-first option to both clang and flang. This prints the IR to stderr
just before the optimization passes are run. This is useful when debugging the
frontend to see exactly what IR is being produced.
CudaABI and HipABI had custom argument orders for the outlined functions
consisting of the bodies of tapir loops. This made them more complicated than
necessary since nothing else in the code was particularly dependent on the
order of the arguments. This has been fixed so those two tapir targets just
use the implementation of setupLoopOutlineArgs from the default
LoopOutlineProcessor for most of the work and add a small amount of additional
code. Some code was also cleaned up to use the newer API in llvm::Function to
get the nth llvm::Argument. In addition to updating the tests to reflect these
changes, some were also tweaked to avoid very long lines and to make it easier
to determine what exactly was being matched.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants