[PATCH] D26739: [MemCpyOpt] Port to MemorySSA. Disabled by default.
JF Bastien via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 3 13:51:58 PST 2019
jfb added a comment.
(random drive-by)
================
Comment at: include/llvm/Transforms/Scalar.h:354
//
-FunctionPass *createMemCpyOptPass();
+FunctionPass *createMemCpyOptPass(bool = false);
----------------
`bool = false`? `enum class` FTW.
================
Comment at: lib/Transforms/Scalar/MemCpyOptimizer.cpp:127
+// \brief Locates the nearest MemoryAccess that clobbers \p MemLoc and strictly
+// dominates \p StartAbove
+static MemoryAccess *getCMA(MemorySSA *MSSA, MemoryUseOrDef *StartAbove,
----------------
Oxygen comments usually have triple slash at the beginning.
================
Comment at: lib/Transforms/Scalar/MemCpyOptimizer.cpp:167
+ /// StartPtrUser - The insertion point for the resulting memset.
+ Instruction *StartPtrUser;
----------------
Drop `StartPtrUser - ` (even if it matches the surrounding style).
================
Comment at: lib/Transforms/Scalar/MemCpyOptimizer.cpp:331
namespace {
- class MemCpyOptLegacyPass : public FunctionPass {
+ template <bool UseMSSA>
+ class MemCpyOptLegacyCommon : public FunctionPass {
----------------
Use the `enum class` here too.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D26739/new/
https://reviews.llvm.org/D26739
More information about the llvm-commits
mailing list