mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #75292 from nate-chandler/rdar131882748
[Mem2Reg] Bail on address-only types.
This commit is contained in:
@@ -2203,6 +2203,12 @@ bool MemoryToRegisters::promoteAllocation(AllocStackInst *alloc,
|
||||
return true;
|
||||
}
|
||||
|
||||
// The value stored into an alloc_stack whose type address-only can never be
|
||||
// represented in a register. Bail out.
|
||||
if (alloc->getType().isAddressOnly(f)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// For AllocStacks that are only used within a single basic blocks, use
|
||||
// the linear sweep to remove the AllocStack.
|
||||
if (inSingleBlock) {
|
||||
|
||||
Reference in New Issue
Block a user