[PATCH] D86651: [MemCpyOpt] Preserve MemorySSA.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 17:50:06 PDT 2020
asbirlea added a comment.
I was working on having MemCpyOpt preserve and use MSSA, in order to replace the use of MemDepAnalysis entirely. But I'm happy with having MSSA preserved first :-).
Some quick comments below.
================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:421
+ auto *NewAccess =
+ MSSAU->createMemoryAccessAfter(AMemSet, LastDef, LastAcc);
+ MSSAU->insertDef(cast<MemoryDef>(NewAccess), /*RenameUses=*/true);
----------------
`assert (LastDef && "Must exist.");`
================
Comment at: llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp:431
+ MSSAU->removeMemoryAccess(SI);
+ }
MD->removeInstruction(SI);
----------------
Remove braces.
================
Comment at: llvm/test/Transforms/MemCpyOpt/perserve-memssa.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -aa-pipeline=basic-aa -passes='require<memoryssa>,memcpyopt' -verify-memoryssa -S %s | FileCheck %s
----------------
Typo in file name, rename file to `preserve-memssa`.
================
Comment at: llvm/test/Transforms/MemCpyOpt/perserve-memssa.ll:3
+; RUN: opt -aa-pipeline=basic-aa -passes='require<memoryssa>,memcpyopt' -verify-memoryssa -S %s | FileCheck %s
+
+target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
----------------
;REQUIRES: asserts
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86651/new/
https://reviews.llvm.org/D86651
More information about the llvm-commits
mailing list