summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorJean Perier <jperier@nvidia.com>2023-02-24 09:06:14 +0100
committerJean Perier <jperier@nvidia.com>2023-02-24 09:06:30 +0100
commit91bd4c6e81ac8aebf1089eb52b935484925f2f58 (patch)
tree138de571e1388c4752fbf146d2fbf86bc43f2e3d /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent0630bd6c300ba46d226ef84cd26c38f67bdfbb54 (diff)
[flang] Preserve useResultSymbolShape_ option when folding array constructor shape
By default evaluate::GetShape(expr) may return a compiler generated expression using symbols that are part of function interfaces if there are function references in "expr". It is not right to replace an inquiry of "expr" with such compiler generated expression since the call context would be lost, along with the meaning of the inquiry expression. Inquiry folding uses GetContextFreeShape(expr) that sets-up useResultSymbolShape_ in GetShapeHelper to prevent such bad rewrites. But this did not work properly with array constructor: GetShapeHelper made a call to GetShape, ignoring and losing the "useResultSymbolShape_" instruction. Differential Revision: https://reviews.llvm.org/D144512
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions