Skip to content

Commit 54e2d97

Browse files
committed
[temp-rvalue-opt] Update temp-rvalue-opt for OSSA.
The pass is already setup for OSSA, so I just enabled it for ownership and converted its tests over. Eventually, I am going to be able to add support for eliminating alloc_stack that have a loadabel value and whose lifetime are ended via a load [take]. But that will be in a forthcoming commit.
1 parent 8a87ec3 commit 54e2d97

File tree

2 files changed

+659
-3
lines changed

2 files changed

+659
-3
lines changed

lib/SILOptimizer/Transforms/TempRValueElimination.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,6 @@ bool TempRValueOptPass::tryOptimizeCopyIntoTemp(CopyAddrInst *copyInst) {
393393

394394
/// The main entry point of the pass.
395395
void TempRValueOptPass::run() {
396-
if (getFunction()->hasOwnership())
397-
return;
398-
399396
LLVM_DEBUG(llvm::dbgs() << "Copy Peephole in Func "
400397
<< getFunction()->getName() << "\n");
401398

0 commit comments

Comments
 (0)