From 9ee47fcd5518a9ebd03ff7367224b6e0fd03f463 Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Sun, 31 Jul 2016 21:08:10 +0000 Subject: [PATCH] Comment fixes to MemorySSA.h git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277308 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Utils/MemorySSA.h | 4 +++- unittests/Transforms/Utils/MemorySSA.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/llvm/Transforms/Utils/MemorySSA.h b/include/llvm/Transforms/Utils/MemorySSA.h index 9ffd5eff473..48050000970 100644 --- a/include/llvm/Transforms/Utils/MemorySSA.h +++ b/include/llvm/Transforms/Utils/MemorySSA.h @@ -534,7 +534,9 @@ public: return It == PerBlockAccesses.end() ? nullptr : It->second.get(); } - /// \brief Create an empty MemoryPhi in MemorySSA + /// \brief Create an empty MemoryPhi in MemorySSA for a given basic block. + /// Only one MemoryPhi for a block exists at a time, so this function will + /// assert if you try to create one where it already exists. MemoryPhi *createMemoryPhi(BasicBlock *BB); enum InsertionPlace { Beginning, End }; diff --git a/unittests/Transforms/Utils/MemorySSA.cpp b/unittests/Transforms/Utils/MemorySSA.cpp index c21121f7870..6916ff536bc 100644 --- a/unittests/Transforms/Utils/MemorySSA.cpp +++ b/unittests/Transforms/Utils/MemorySSA.cpp @@ -67,7 +67,7 @@ public: TEST_F(MemorySSATest, CreateALoadAndPhi) { // We create a diamond where there is a store on one side, and then after - // running memory ssa, create a load after the merge point, and use it to test + // building MemorySSA, create a load after the merge point, and use it to test // updating by creating an access for the load and a memoryphi. F = Function::Create( FunctionType::get(B.getVoidTy(), {B.getInt8PtrTy()}, false),