forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Flang][OpenMP] Remove unused OpWithBodyGenInfo attributes (llvm#97572)
This patch removes the `outerCombined`, `reductionSymbols` and `reductionTypes` attributes from the `OpWithBodyGenInfo` structure and their uses, as they never impact the lowering process or its output. The `outerCombined` variable is always set to `false`, so in practice it doesn't represent what its name indicates. Furthermore, initializing it correctly can result in privatization not being performed in cases where it should (at least tests doing this together with composite construct support pointed me in that direction). It seems to be tied to the early privatization approach, where a redundant alloca could possibly be avoided in certain cases. With the transition to delayed privatization, it seems like it won't serve that purpose anymore, since the decision of what and where privatization-related allocations are inserted will be postponed to the MLIR to LLVM IR translation stage. Since this feature is already currently not being used, its potential benefit appears to be minor and it won't make sense to do once the delayed privatization approach is rolled out, I propose removing it. The `reductionSymbols` and `reductionTypes` variables are set in certain cases but never used. Unless there's a plan where these will be needed, in which case it would be a better alternative to document it, I believe we should also remove them.
- Loading branch information
Showing
1 changed file
with
14 additions
and
50 deletions.
There are no files selected for viewing
This file contains 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