[llvm] 03c44c7 - [NFC] Deduplicate comment in PromoteMemoryToRegister.cpp

Scott Linder via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 12:23:14 PDT 2020


Author: Scott Linder
Date: 2020-05-15T15:18:07-04:00
New Revision: 03c44c7584b43059010b1b80c8e38d6fdb2c1658

URL: https://github.com/llvm/llvm-project/commit/03c44c7584b43059010b1b80c8e38d6fdb2c1658
DIFF: https://github.com/llvm/llvm-project/commit/03c44c7584b43059010b1b80c8e38d6fdb2c1658.diff

LOG: [NFC] Deduplicate comment in PromoteMemoryToRegister.cpp

This has been duplicated since before
2372a193ba904fdc85de3cc559e0bc162f14f144, but that commit has it
appearing twice in the space of 10 lines of the same function body. It
could also be hoisted up to the point just after where the last
special-case is considered, but I want to keep the intent of the
original authors.

Committed as obvious without a review.

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
index d58e1ea574ef..c7e9c919ec47 100644
--- a/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
+++ b/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp
@@ -595,11 +595,6 @@ void PromoteMem2Reg::run() {
     // Keep the reverse mapping of the 'Allocas' array for the rename pass.
     AllocaLookup[Allocas[AllocaNum]] = AllocaNum;
 
-    // At this point, we're committed to promoting the alloca using IDF's, and
-    // the standard SSA construction algorithm.  Determine which blocks need PHI
-    // nodes and see if we can optimize out some work by avoiding insertion of
-    // dead phi nodes.
-
     // Unique the set of defining blocks for efficient lookup.
     SmallPtrSet<BasicBlock *, 32> DefBlocks(Info.DefiningBlocks.begin(),
                                             Info.DefiningBlocks.end());


        


More information about the llvm-commits mailing list