[llvm-commits] [llvm] r85635 - /llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Dan Gohman gohman at apple.com
Fri Oct 30 16:15:43 PDT 2009


Author: djg
Date: Fri Oct 30 18:15:43 2009
New Revision: 85635

URL: http://llvm.org/viewvc/llvm-project?rev=85635&view=rev
Log:
Add a comment about a missed opportunity.

Modified:
    llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp

Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=85635&r1=85634&r2=85635&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Fri Oct 30 18:15:43 2009
@@ -1753,8 +1753,13 @@
 /// nodes in this block. This doesn't try to be clever about PHI nodes
 /// which differ only in the order of the incoming values, but instcombine
 /// orders them so it usually won't matter.
+///
 static bool EliminateDuplicatePHINodes(BasicBlock *BB) {
   bool Changed = false;
+  
+  // This implementation doesn't currently consider undef operands
+  // specially. Theroetically, two phis which are identical except for
+  // one having an undef where the other doesn't could be collapsed.
 
   // Map from PHI hash values to PHI nodes. If multiple PHIs have
   // the same hash value, the element is the first PHI in the





More information about the llvm-commits mailing list