-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang][hlfir] Use the HLFIR base of hlfir.declare if possible.
This patch makes use of the HLFIR box produced for hlfir.declare in place of the FIR box (the memref of hlfir.declare) when possible. This makes the representation a little bit more clear, because all accesses are made via a single box. This reduces the life range of the original box, because the new temporary box produced by embox/rebox is used from now. Apparently, this works around some issues in the current HLFIR codegen, for example, look at the LIT tests changes around fir.array_coor produced by hlfir.designate codegen - using the FIR box for fir.array_coor might result in using incorrect lbounds. Apparently, this change enables more intrinsics simplifications because the SimplifyIntrinsicsPass looks for explicit embox/rebox in findBoxDef() to decide whether to apply the optimization. This change also provides better association of the base addresses referenced by OpenACC clauses with the corresponding boxes that might be used explicitly in OpenACC regions (e.g. for reading the lbounds). Reviewed By: razvanlupusoru, clementval Differential Revision: https://reviews.llvm.org/D158119
- Loading branch information
Showing
6 changed files
with
42 additions
and
23 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
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
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
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
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
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