mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-01 16:33:37 +01:00
46990c17f7
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize the pass's dependencies. Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h before parsing commandline arguments. I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass registration/creation, please send the testcase to me directly. llvm-svn: 116820
61 lines
2.3 KiB
C++
61 lines
2.3 KiB
C++
//===-- CodeGen.cpp -------------------------------------------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file implements the common initialization routines for the
|
|
// CodeGen library.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/InitializePasses.h"
|
|
#include "llvm-c/Initialization.h"
|
|
|
|
using namespace llvm;
|
|
|
|
/// initializeCodeGen - Initialize all passes linked into the CodeGen library.
|
|
void llvm::initializeCodeGen(PassRegistry &Registry) {
|
|
initializeCalculateSpillWeightsPass(Registry);
|
|
initializeDeadMachineInstructionElimPass(Registry);
|
|
initializeGCModuleInfoPass(Registry);
|
|
initializeIfConverterPass(Registry);
|
|
initializeLiveIntervalsPass(Registry);
|
|
initializeLiveStacksPass(Registry);
|
|
initializeLiveVariablesPass(Registry);
|
|
initializeMachineCSEPass(Registry);
|
|
initializeMachineDominatorTreePass(Registry);
|
|
initializeMachineLICMPass(Registry);
|
|
initializeMachineLoopInfoPass(Registry);
|
|
initializeMachineModuleInfoPass(Registry);
|
|
initializeMachineSinkingPass(Registry);
|
|
initializeMachineVerifierPassPass(Registry);
|
|
initializeOptimizePHIsPass(Registry);
|
|
initializePHIEliminationPass(Registry);
|
|
initializePeepholeOptimizerPass(Registry);
|
|
initializePreAllocSplittingPass(Registry);
|
|
initializeProcessImplicitDefsPass(Registry);
|
|
initializePEIPass(Registry);
|
|
initializeRALinScanPass(Registry);
|
|
initializeRegisterCoalescerAnalysisGroup(Registry);
|
|
initializeRenderMachineFunctionPass(Registry);
|
|
initializeSimpleRegisterCoalescingPass(Registry);
|
|
initializeSlotIndexesPass(Registry);
|
|
initializeLoopSplitterPass(Registry);
|
|
initializeStackProtectorPass(Registry);
|
|
initializeStackSlotColoringPass(Registry);
|
|
initializeStrongPHIEliminationPass(Registry);
|
|
initializeTwoAddressInstructionPassPass(Registry);
|
|
initializeUnreachableBlockElimPass(Registry);
|
|
initializeUnreachableMachineBlockElimPass(Registry);
|
|
initializeVirtRegMapPass(Registry);
|
|
initializeLowerIntrinsicsPass(Registry);
|
|
}
|
|
|
|
void LLVMInitializeCodeGen(LLVMPassRegistryRef R) {
|
|
initializeCodeGen(*unwrap(R));
|
|
}
|