[llvm-commits] [llvm] r123662 - in /llvm/trunk: include/llvm/Transforms/Utils/PromoteMemToReg.h lib/Transforms/Scalar/ScalarReplAggregates.cpp lib/Transforms/Utils/Mem2Reg.cpp lib/Transforms/Utils/PromoteMemoryToRegister.cpp

Chris Lattner clattner at apple.com
Mon Jan 17 17:33:58 PST 2011


On Jan 17, 2011, at 9:38 AM, Cameron Zwarich wrote:
> Roll r123609 back in with two changes that fix test failures with expensive
> checks enabled:

Looks great Cameron, death to DF!  :-)

A few comments:
> +++ llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Mon Jan 17 11:38:41 2011
> @@ -152,7 +152,6 @@

Please rename "HasDomFrontiers" and friends, and remove the include of DominanceFrontiers.h

> +++ llvm/trunk/lib/Transforms/Utils/Mem2Reg.cpp Mon Jan 17 11:38:41 2011
> @@ -40,7 +40,6 @@
>     //
>     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
>       AU.addRequired<DominatorTree>();
> -      AU.addRequired<DominanceFrontier>();

Likewise, the #include and this comment:
    // getAnalysisUsage - We need dominance frontiers

> +++ llvm/trunk/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Mon Jan 17 11:38:41 2011
> @@ -9,10 +9,19 @@
> 
> @@ -35,6 +44,7 @@
> #include "llvm/ADT/STLExtras.h"
> #include "llvm/Support/CFG.h"
> #include <algorithm>
> +#include <queue>
> using namespace llvm;

The #include can be removed from here also.  There are a couple of other random references that should be cleaned up, search for "front".  For example:

/// scalar registers, inserting PHI nodes as appropriate.  This function makes
/// use of DominanceFrontier information.  This function does not modify the CFG

Otherwise, looks great!

-Chris





More information about the llvm-commits mailing list