aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2025-05-02 16:11:14 +0200
committerGitHub <noreply@github.com>2025-05-02 16:11:14 +0200
commite66592509b7d56c8a6db8883be2257325f1d7b56 (patch)
tree98625b002a40ef8086c957010c43e57df21684e2 /flang/lib/Frontend/CompilerInvocation.cpp
parent0b2ab11321d2b400987e9ade28a221dff67aea7d (diff)
downloadllvm-e66592509b7d56c8a6db8883be2257325f1d7b56.zip
llvm-e66592509b7d56c8a6db8883be2257325f1d7b56.tar.gz
llvm-e66592509b7d56c8a6db8883be2257325f1d7b56.tar.bz2
llvm-reduce: Add values to return reduction (#132686)
In void functions, try to replace instruction uses with a new non-void return. If the return type matches the instruction, also try to directly return it. This handles most of the cases, but doesn't try to handle all of the weird exception related terminators. Also doesn't try to replace argument uses, although it could. We could also handle cases where we can insert a simple cast to an original return value. I didn't think too hard about where to put this in the default pass order. In many cases it obviates the need for most of the CFG folds, but I've left it near the end initially. I also think this is too aggressive about removing dead code, and should leave existing dead code alone. I'm also not sure why we have both "removeUnreachableBlocks" and EliminateUnreachableBlocks" in Utils. Fixes #66039, fixes #107327
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions