Skip to content

[flang] Improve length information in character transformational #65771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 11, 2023

Conversation

jeanPerier
Copy link
Contributor

Intrinsic resolution currently does not resolve constant length information for character transformational (with "sameChar") where the argument has constant length but is not a variable or a constant expression.

It is not required to fold those expressions (only inquiry on constant expression or variable with constant length is required to be a constant expression).

But constant length information for character is valuable for lowering, so I think this is a nice and easy to have.

Addresses my comment in #65705 (comment) where the patch is adding code to in lowering manually get constant length info into FIR type system for maxval intrinsic result instead of relying on what LEN() is able to provide.

Intrinsic resolution currently does not resolve constant length
information for character transformational  (with "sameChar")
where the argument has constant length but is not a variable.

It is not required to fold those expressions (only inquiry on constant
expression or variable with constant length is required to be a
constant expression).

But constant length information for character is valuable for lowering,
so I think this is a nice and easy to have.
@jeanPerier jeanPerier requested a review from a team as a code owner September 8, 2023 15:41
@github-actions github-actions bot added the flang Flang issues not falling into any other category label Sep 8, 2023
@jeanPerier jeanPerier merged commit 8b13775 into llvm:main Sep 11, 2023
@jeanPerier jeanPerier deleted the jpr-better-len-info branch September 11, 2023 10:52
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
…m#65771)

Intrinsic resolution currently does not resolve constant length
information for character transformational (with "sameChar") where the
argument has constant length but is not a variable or a constant
expression.

It is not required to fold those expressions (only inquiry on constant
expression or variable with constant length is required to be a constant
expression).

But constant length information for character is valuable for lowering,
so I think this is a nice and easy to have.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants