mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-04 17:56:53 +00:00
Add even more missing createXxxPass functions.
llvm-svn: 19402
This commit is contained in:
parent
e4b0ac5acf
commit
6c0db8d863
@ -16,14 +16,70 @@
|
||||
#define LLVM_ANALYSIS_PASSES_H
|
||||
|
||||
namespace llvm {
|
||||
class FunctionPass;
|
||||
class ImmutablePass;
|
||||
class ModulePass;
|
||||
class Pass;
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
// createGlobalsModRefPass - This function creates and returns an instance of
|
||||
// the GlobalsModRef alias analysis pass.
|
||||
// createGlobalsModRefPass - This pass provides alias and mod/ref info for
|
||||
// global values that do not have their addresses taken.
|
||||
//
|
||||
Pass *createGlobalsModRefPass();
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
// createAliasAnalysisCounterPass - This pass counts alias queries and how the
|
||||
// alias analysis implementation responds.
|
||||
//
|
||||
ModulePass *createAliasAnalysisCounterPass();
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
// createAAEvalPass - This pass implements a simple N^2 alias analysis
|
||||
// accuracy evaluator.
|
||||
//
|
||||
FunctionPass *createAAEvalPass();
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
// createNoAAPass - This pass implements a "I don't know" alias analysis.
|
||||
//
|
||||
ImmutablePass *createNoAAPass();
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
// createBasicAliasAnalysisPass - This pass implements the default alias
|
||||
// analysis.
|
||||
//
|
||||
ImmutablePass *createBasicAliasAnalysisPass();
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
// createAndersensPass - This pass implements Andersen's interprocedural alias
|
||||
// analysis.
|
||||
//
|
||||
ModulePass *createAndersensPass();
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
// createBasicVNPass - This pass walks SSA def-use chains to trivially
|
||||
// identify lexically identical expressions.
|
||||
//
|
||||
ImmutablePass *createBasicVNPass();
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
// createLoaderPass - This pass loads information from a profile dump file.
|
||||
//
|
||||
ModulePass *createLoaderPass();
|
||||
|
||||
//===--------------------------------------------------------------------===//
|
||||
//
|
||||
// createNoProfileInfoPass - This pass implements the default "no profile".
|
||||
//
|
||||
ImmutablePass *createNoProfileInfoPass();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -31,8 +31,8 @@
|
||||
extern "C" __declspec(dllimport) void* __stdcall GetCurrentProcess();
|
||||
|
||||
namespace {
|
||||
struct ForceLinking {
|
||||
ForceLinking() {
|
||||
struct ForcePassLinking {
|
||||
ForcePassLinking() {
|
||||
// We must reference the passes in such a way that VC++ will not
|
||||
// delete it all as dead code, even with whole program optimization,
|
||||
// yet is effectively a NO-OP. As the compiler isn't smart enough
|
||||
@ -41,10 +41,13 @@ namespace {
|
||||
if (GetCurrentProcess() != (void *) -1)
|
||||
return;
|
||||
|
||||
std::vector<llvm::BasicBlock*> bbv;
|
||||
|
||||
(void) llvm::createAAEvalPass();
|
||||
(void) llvm::createAggressiveDCEPass();
|
||||
(void) llvm::createAliasAnalysisCounterPass();
|
||||
(void) llvm::createAndersensPass();
|
||||
(void) llvm::createArgumentPromotionPass();
|
||||
(void) llvm::createBasicAliasAnalysisPass();
|
||||
(void) llvm::createBasicVNPass();
|
||||
(void) llvm::createBlockPlacementPass();
|
||||
(void) llvm::createBlockProfilerPass();
|
||||
(void) llvm::createBreakCriticalEdgesPass();
|
||||
@ -74,6 +77,7 @@ namespace {
|
||||
(void) llvm::createInternalizePass();
|
||||
(void) llvm::createLICMPass();
|
||||
(void) llvm::createLoadValueNumberingPass();
|
||||
(void) llvm::createLoaderPass();
|
||||
(void) llvm::createLoopExtractorPass();
|
||||
(void) llvm::createLoopInstrumentationPass();
|
||||
(void) llvm::createLoopSimplifyPass();
|
||||
@ -88,6 +92,8 @@ namespace {
|
||||
(void) llvm::createLowerSelectPass();
|
||||
(void) llvm::createLowerSetJmpPass();
|
||||
(void) llvm::createLowerSwitchPass();
|
||||
(void) llvm::createNoAAPass();
|
||||
(void) llvm::createNoProfileInfoPass();
|
||||
(void) llvm::createPREPass();
|
||||
(void) llvm::createProfilePathsPass();
|
||||
(void) llvm::createPromoteMemoryToRegister();
|
||||
@ -107,7 +113,7 @@ namespace {
|
||||
(void) llvm::createUnifyFunctionExitNodesPass();
|
||||
(void) llvm::createUnreachableBlockEliminationPass();
|
||||
}
|
||||
} X;
|
||||
} _ForcePassLinking;
|
||||
};
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
@ -12,6 +12,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include <iostream>
|
||||
@ -124,3 +125,7 @@ namespace {
|
||||
X("count-aa", "Count Alias Analysis Query Responses");
|
||||
RegisterAnalysisGroup<AliasAnalysis, AliasAnalysisCounter> Y;
|
||||
}
|
||||
|
||||
ModulePass *llvm::createAliasAnalysisCounterPass() {
|
||||
return new AliasAnalysisCounter();
|
||||
}
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Assembly/Writer.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
@ -72,6 +73,8 @@ namespace {
|
||||
X("aa-eval", "Exhaustive Alias Analysis Precision Evaluator");
|
||||
}
|
||||
|
||||
FunctionPass *llvm::createAAEvalPass() { return new AAEval(); }
|
||||
|
||||
static inline void PrintResults(const char *Msg, bool P, Value *V1, Value *V2,
|
||||
Module *M) {
|
||||
if (P) {
|
||||
|
@ -14,6 +14,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Function.h"
|
||||
@ -80,6 +81,7 @@ namespace {
|
||||
RegisterAnalysisGroup<AliasAnalysis, NoAA> V;
|
||||
} // End of anonymous namespace
|
||||
|
||||
ImmutablePass *llvm::createNoAAPass() { return new NoAA(); }
|
||||
|
||||
namespace {
|
||||
/// BasicAliasAnalysis - This is the default alias analysis implementation.
|
||||
@ -124,6 +126,10 @@ namespace {
|
||||
RegisterAnalysisGroup<AliasAnalysis, BasicAliasAnalysis, true> Y;
|
||||
} // End of anonymous namespace
|
||||
|
||||
ImmutablePass *llvm::createBasicAliasAnalysisPass() {
|
||||
return new BasicAliasAnalysis();
|
||||
}
|
||||
|
||||
// hasUniqueAddress - Return true if the specified value points to something
|
||||
// with a unique, discernable, address.
|
||||
static inline bool hasUniqueAddress(const Value *V) {
|
||||
|
@ -58,6 +58,7 @@
|
||||
#include "llvm/Support/InstIterator.h"
|
||||
#include "llvm/Support/InstVisitor.h"
|
||||
#include "llvm/Analysis/AliasAnalysis.h"
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include <set>
|
||||
@ -334,6 +335,8 @@ namespace {
|
||||
RegisterAnalysisGroup<AliasAnalysis, Andersens> Y;
|
||||
}
|
||||
|
||||
ModulePass *llvm::createAndersensPass() { return new Andersens(); }
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// AliasAnalysis Interface Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -12,6 +12,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Analysis/ProfileInfo.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/CFG.h"
|
||||
@ -90,3 +91,5 @@ namespace {
|
||||
// Declare that we implement the ProfileInfo interface
|
||||
RegisterAnalysisGroup<ProfileInfo, NoProfileInfo, true> Y;
|
||||
} // End of anonymous namespace
|
||||
|
||||
ImmutablePass *llvm::createNoProfileInfoPass() { return new NoProfileInfo(); }
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "llvm/BasicBlock.h"
|
||||
#include "llvm/InstrTypes.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Analysis/ProfileInfo.h"
|
||||
#include "llvm/Analysis/ProfileInfoLoader.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
@ -54,6 +55,7 @@ namespace {
|
||||
RegisterAnalysisGroup<ProfileInfo, LoaderPass> Y;
|
||||
} // End of anonymous namespace
|
||||
|
||||
ModulePass *llvm::createLoaderPass() { return new LoaderPass(); }
|
||||
|
||||
/// createProfileLoaderPass - This function returns a Pass that loads the
|
||||
/// profiling information for the module from the specified filename, making it
|
||||
|
@ -12,6 +12,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Analysis/Passes.h"
|
||||
#include "llvm/Analysis/ValueNumbering.h"
|
||||
#include "llvm/Support/InstVisitor.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
@ -85,6 +86,8 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
ImmutablePass *llvm::createBasicVNPass() { return new BasicVN(); }
|
||||
|
||||
// getEqualNumberNodes - Return nodes with the same value number as the
|
||||
// specified Value. This fills in the argument vector with any equal values.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user