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"
21 enum RegAllocName { simple, local };
25 cl::desc("Register allocator to use: (default = simple)"),
27 cl::values(clEnumVal(simple, " simple register allocator"),
28 clEnumVal(local, " local register allocator"),
33 FunctionPass *createRegisterAllocator()
37 return createSimpleRegisterAllocator();
39 return createLocalRegisterAllocator();
41 assert(0 && "no register allocator selected");
42 return 0; // not reached
46 } // End llvm namespace