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, linearscan };
25 cl::desc("Register allocator to use: (default = simple)"),
27 cl::values(clEnumVal(simple, " simple register allocator"),
28 clEnumVal(local, " local register allocator"),
29 clEnumVal(linearscan, " linear-scan global register allocator"),
34 FunctionPass *createRegisterAllocator()
38 return createSimpleRegisterAllocator();
40 return createLocalRegisterAllocator();
42 return createLinearScanRegisterAllocator();
44 assert(0 && "no register allocator selected");
45 return 0; // not reached
49 } // End llvm namespace