[all-commits] [llvm/llvm-project] 416e45: [flang][PFT] record every target of an assigned GO TO
Kareem Ergawy via All-commits
all-commits at lists.llvm.org
Thu Jul 16 07:01:39 PDT 2026
Branch: refs/heads/users/ergawy/record_multiway_branches_2
Home: https://github.com/llvm/llvm-project
Commit: 416e459e36912d987d687765f919c1761cad3163
https://github.com/llvm/llvm-project/commit/416e459e36912d987d687765f919c1761cad3163
Author: ergawy <kareem.ergawy at gmail.com>
Date: 2026-07-16 (Thu, 16 Jul 2026)
Changed paths:
M flang/lib/Lower/PFTBuilder.cpp
A flang/test/Lower/pre-fir-tree-assigned-goto.f90
Log Message:
-----------
[flang][PFT] record every target of an assigned GO TO
Assigned GO TO (`go to v [, (l1, l2, ...)]`) is the third multiway
branch in the language, alongside the computed GO TO and arithmetic IF
that were addressed in PR #210012. Its PFTBuilder handler previously
did:
[&](const parser::AssignedGotoStmt &) {
eval.isUnstructured = true;
markSuccessorAsNewBlock(eval);
},
i.e. it recorded no branch targets at all -- neither `controlSuccessor`
nor `extraControlSuccessors` was populated.
Handle the assigned GO TO the same way PR #210012 handles the computed
GO TO and arithmetic IF: iterate every possible target and call
`markBranchTarget(eval, label)` for each, so that `controlSuccessor`
receives the first and `extraControlSuccessors` receives the rest.
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list