mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
* Rename MethodPass class to FunctionPass
- Rename runOnMethod to runOnFunction
* Transform getAnalysisUsageInfo into getAnalysisUsage
- Method is now const
- It now takes one AnalysisUsage object to fill in instead of 3 vectors
to fill in
- Pass's now specify which other passes they _preserve_ not which ones
they modify (be conservative!)
- A pass can specify that it preserves all analyses (because it never
modifies the underlying program)
* s/Method/Function/g in other random places as well
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2333 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
//===-- GlobalDCE.cpp - DCE unreachable internal functions ----------------===//
|
||||
//
|
||||
// This transform is designed to eliminate unreachable internal globals
|
||||
// FIXME: GlobalDCE should update the callgraph, not destroy it!
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -55,16 +56,12 @@ namespace {
|
||||
return RemoveUnreachableFunctions(M, getAnalysis<CallGraph>());
|
||||
}
|
||||
|
||||
// getAnalysisUsageInfo - This function works on the call graph of a module.
|
||||
// getAnalysisUsage - This function works on the call graph of a module.
|
||||
// It is capable of updating the call graph to reflect the new state of the
|
||||
// module.
|
||||
//
|
||||
virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Required,
|
||||
Pass::AnalysisSet &Destroyed,
|
||||
Pass::AnalysisSet &Provided) {
|
||||
Required.push_back(CallGraph::ID);
|
||||
// FIXME: This should update the callgraph, not destroy it!
|
||||
Destroyed.push_back(CallGraph::ID);
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired(CallGraph::ID);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user