1 //===-- Passes.cpp - Target independent code generation passes -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines interfaces to access the target independent code
11 // generation passes provided by the LLVM backend.
13 //===---------------------------------------------------------------------===//
15 #include "llvm/CodeGen/Passes.h"
16 #include "Support/CommandLine.h"
19 enum RegAllocName { simple, local };
23 cl::desc("Register allocator to use: (default = simple)"),
25 cl::values(clEnumVal(simple, " simple register allocator"),
26 clEnumVal(local, " local register allocator"),
31 FunctionPass *createRegisterAllocator()
35 return createSimpleRegisterAllocator();
37 return createLocalRegisterAllocator();
39 assert(0 && "no register allocator selected");
40 return 0; // not reached