Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.