mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
57418d8f54
LazyCallGraph analysis framework. Wire it up all the way through the opt driver and add some very basic testing that we can build pass pipelines including these components. Still a lot more to do in terms of testing that all of this works, but the basic pieces are here. There is a *lot* of boiler plate here. It's something I'm going to actively look at reducing, but I don't have any immediate ideas that don't end up making the code terribly complex in order to fold away the boilerplate. Until I figure out something to minimize the boilerplate, almost all of this is based on the code for the existing pass managers, copied and heavily adjusted to suit the needs of the CGSCC pass management layer. The actual CG management still has a bunch of FIXMEs in it. Notably, we don't do *any* updating of the CG as it is potentially invalidated. I wanted to get this in place to motivate the new analysis, and add update APIs to the analysis and the pass management layers in concert to make sure that the *right* APIs are present. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206745 91177308-0d34-0410-b5e6-96231b3b80d8
52 lines
1.5 KiB
C++
52 lines
1.5 KiB
C++
//===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file is used as the registry of passes that are part of the core LLVM
|
|
// libraries. This file describes both transformation passes and analyses
|
|
// Analyses are registered while transformation passes have names registered
|
|
// that can be used when providing a textual pass pipeline.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// NOTE: NO INCLUDE GUARD DESIRED!
|
|
|
|
#ifndef MODULE_ANALYSIS
|
|
#define MODULE_ANALYSIS(NAME, CREATE_PASS)
|
|
#endif
|
|
MODULE_ANALYSIS("lcg", LazyCallGraphAnalysis())
|
|
#undef MODULE_ANALYSIS
|
|
|
|
#ifndef MODULE_PASS
|
|
#define MODULE_PASS(NAME, CREATE_PASS)
|
|
#endif
|
|
MODULE_PASS("print", PrintModulePass(dbgs()))
|
|
MODULE_PASS("print-cg", LazyCallGraphPrinterPass(dbgs()))
|
|
#undef MODULE_PASS
|
|
|
|
#ifndef CGSCC_ANALYSIS
|
|
#define CGSCC_ANALYSIS(NAME, CREATE_PASS)
|
|
#endif
|
|
#undef CGSCC_ANALYSIS
|
|
|
|
#ifndef CGSCC_PASS
|
|
#define CGSCC_PASS(NAME, CREATE_PASS)
|
|
#endif
|
|
#undef CGSCC_PASS
|
|
|
|
#ifndef FUNCTION_ANALYSIS
|
|
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
|
|
#endif
|
|
#undef FUNCTION_ANALYSIS
|
|
|
|
#ifndef FUNCTION_PASS
|
|
#define FUNCTION_PASS(NAME, CREATE_PASS)
|
|
#endif
|
|
FUNCTION_PASS("print", PrintFunctionPass(dbgs()))
|
|
#undef FUNCTION_PASS
|