aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineSSAUpdater.cpp
diff options
context:
space:
mode:
authorPeter Steinfeld <psteinfeld@nvidia.com>2021-04-06 09:25:35 -0700
committerPeter Steinfeld <psteinfeld@nvidia.com>2021-04-06 15:05:16 -0700
commit52cc9df1c14cf34dbfe491cf2b4079c920a2190e (patch)
tree8135dd57180d211eaf7ea6a0a4121ab4117e5128 /llvm/lib/CodeGen/MachineSSAUpdater.cpp
parent2641c1f15ea53125eb4119af036c60553b30f7bf (diff)
downloadllvm-52cc9df1c14cf34dbfe491cf2b4079c920a2190e.zip
llvm-52cc9df1c14cf34dbfe491cf2b4079c920a2190e.tar.gz
llvm-52cc9df1c14cf34dbfe491cf2b4079c920a2190e.tar.bz2
[flang] Improve constant folding for type parameter inquiries
We were not folding type parameter inquiries for the form 'var%typeParam' where 'typeParam' was a KIND or LEN type parameter of a derived type and 'var' was a designator of the derived type. I fixed this by adding code to the function 'FoldOperation()' for 'TypeParamInquiry's to handle this case. I also cleaned up the code for the case where there is no designator. In order to make the error messages correctly refer to both the points of declaration and instantiation, I needed to add an argument to the function 'InstantiateIntrinsicType()' for the location of the instantiation. I also changed the formatting of 'TypeParamInquiry' to correctly format this case. I also added tests for both KIND and LEN type parameter inquiries in resolve104.f90. Making these changes revealed an error in resolve89.f90 and caused one of the error messages in assign04.f90 to be different. Reviewed By: klausler Differential Revision: https://reviews.llvm.org/D99892
Diffstat (limited to 'llvm/lib/CodeGen/MachineSSAUpdater.cpp')
0 files changed, 0 insertions, 0 deletions