llvm-project
556ff19d - [flang] Create TBAA subtree for COMMON block variables. (#156558)

Commit
122 days ago
[flang] Create TBAA subtree for COMMON block variables. (#156558) In order to help LLVM disambiguate accesses to the COMMON block variables, this patch creates a TBAA sub-tree for each COMMON block, and the places all variables belonging to this COMMON block into this sub-tree. The structure looks like this: ``` common /blk/ a, b, c "global data" | |- "blk_" | |- "blk_/bytes_0_to_3" |- "blk_/bytes_4_to_7" |- "blk_/bytes_8_to_11" ``` The TBAA tag for "a" is created in "blk_/bytes_0_to_3" root, etc. The byte spans are created based on the `storage` information provided by `fir.declare` (#155742). See also: https://discourse.llvm.org/t/rfc-flang-representation-for-objects-inside-physical-storage/88026
Author
Parents
Loading