[all-commits] [llvm/llvm-project] ba3d02: [flang] Record the original name of a function dur...
Tom Eccles via All-commits
all-commits at lists.llvm.org
Sun Dec 3 12:37:25 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ba3d0241e2b0c4e025a94ce872426314fe119765
https://github.com/llvm/llvm-project/commit/ba3d0241e2b0c4e025a94ce872426314fe119765
Author: Tom Eccles <tom.eccles at arm.com>
Date: 2023-12-03 (Sun, 03 Dec 2023)
Changed paths:
M flang/include/flang/Optimizer/Analysis/TBAAForest.h
M flang/include/flang/Optimizer/Dialect/FIROpsSupport.h
M flang/lib/Optimizer/Transforms/ExternalNameConversion.cpp
M flang/test/Fir/external-mangling.fir
Log Message:
-----------
[flang] Record the original name of a function during ExternalNameCoversion (#74065)
We pass TBAA alias information with separate TBAA trees per function (to
prevent incorrect alias information after inlining). These TBAA trees
are identified by a unique string per function. Naturally, we use the
mangled name of the function.
TBAA tags are added in two places: during a dedicated pass relatively
early (structured control flow makes fir::AliasAnalysis more accurate),
then again during CodeGen (when implied box loads and stores become
visible). In between these two passes, the ExternalNameConversion pass
changes the name of some functions.
These functions with changed names previously ended up with separate
TBAA trees from the TBAA tags pass and from CodeGen - leading LLVM to
think that all data accesses alias with all descriptor accesses.
This patch solves this by storing the original name of a function in an
attribute during the ExternalNameConversion pass, and using the name
from that attribute when creating TBAA trees during CodeGen.
More information about the All-commits
mailing list