summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineFunctionPass.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-08 17:00:02 +0000
committerDan Gohman <gohman@apple.com>2009-10-08 17:00:02 +0000
commit09984279fd1f962e8f81a1b6e714962e1e9e224b (patch)
tree510f629415cf48c2c69868b61629651e9a7eb5c3 /llvm/lib/CodeGen/MachineFunctionPass.cpp
parenteeffde3a1dd237c548d3628a28e7a703d5cd33e7 (diff)
downloadbcm5719-llvm-09984279fd1f962e8f81a1b6e714962e1e9e224b.tar.gz
bcm5719-llvm-09984279fd1f962e8f81a1b6e714962e1e9e224b.zip
Add a form of addPreserved which takes a string argument, to allow passes
to declare that they preserve other passes without needing to pull in additional header file or library dependencies. Convert MachineFunctionPass and CodeGenLICM to make use of this. llvm-svn: 83555
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionPass.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunctionPass.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/MachineFunctionPass.cpp b/llvm/lib/CodeGen/MachineFunctionPass.cpp
index fd8a210c4f9..2f8d4c9e7aa 100644
--- a/llvm/lib/CodeGen/MachineFunctionPass.cpp
+++ b/llvm/lib/CodeGen/MachineFunctionPass.cpp
@@ -11,11 +11,8 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/Function.h"
#include "llvm/Analysis/AliasAnalysis.h"
-#include "llvm/Analysis/ScalarEvolution.h"
-#include "llvm/Analysis/IVUsers.h"
-#include "llvm/Analysis/LiveValues.h"
-#include "llvm/Analysis/MemoryDependenceAnalysis.h"
#include "llvm/CodeGen/MachineFunctionAnalysis.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
using namespace llvm;
@@ -36,15 +33,18 @@ void MachineFunctionPass::getAnalysisUsage(AnalysisUsage &AU) const {
// MachineFunctionPass preserves all LLVM IR passes, but there's no
// high-level way to express this. Instead, just list a bunch of
- // passes explicitly.
+ // passes explicitly. This does not include setPreservesCFG,
+ // because CodeGen overloads that to mean preserving the MachineBasicBlock
+ // CFG in addition to the LLVM IR CFG.
AU.addPreserved<AliasAnalysis>();
- AU.addPreserved<ScalarEvolution>();
- AU.addPreserved<IVUsers>();
- AU.addPreserved<MemoryDependenceAnalysis>();
- AU.addPreserved<LiveValues>();
- AU.addPreserved<DominatorTree>();
- AU.addPreserved<DominanceFrontier>();
- AU.addPreserved<LoopInfo>();
+ AU.addPreserved("scalar-evolution");
+ AU.addPreserved("iv-users");
+ AU.addPreserved("memdep");
+ AU.addPreserved("live-values");
+ AU.addPreserved("domtree");
+ AU.addPreserved("domfrontier");
+ AU.addPreserved("loops");
+ AU.addPreserved("lda");
FunctionPass::getAnalysisUsage(AU);
}
OpenPOWER on IntegriCloud