[all-commits] [llvm/llvm-project] ed82d7: CloneFunction: Do not delete blocks with address t...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Wed Apr 2 23:58:38 PDT 2025
Branch: refs/heads/users/arsenm/clone-function-fix-folding-blocks-with-address-taken
Home: https://github.com/llvm/llvm-project
Commit: ed82d741a37054779dac9cbc92333cb93061ed57
https://github.com/llvm/llvm-project/commit/ed82d741a37054779dac9cbc92333cb93061ed57
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2025-04-03 (Thu, 03 Apr 2025)
Changed paths:
M llvm/lib/Transforms/Utils/CloneFunction.cpp
Log Message:
-----------
CloneFunction: Do not delete blocks with address taken
If a block with a single predecessor also had its address taken,
it was getting deleted in this post-inline cleanup step. This would
result in the blockaddress in the resulting function getting deleted
and replaced with inttoptr 1.
This fixes one of (at least?) two bugs required to permit inlining of
functions with blockaddress uses.
At the moment this is not testable (at least without an annoyingly complex
unit test), and is a pre-bug fix for future patches. Functions with
blockaddress uses are rejected in isInlineViable, so we don't get this far
with the current InlineFunction uses (some of the existing cases seem to
reproduce this part of the rejection logic, like PartialInliner). This
will be tested in a pending llvm-reduce change.
Prerequisite for #38908
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