"llvm/lib/git@repo.hca.bsc.es:rferrer/llvm-epi-0.8.git" did not exist on "f9f4e1e7db6ea36a449e71f425217e0b3a92c206"
Newer
Older
//===-- Passes.cpp - Target independent code generation passes ------------===//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//===----------------------------------------------------------------------===//
Alkis Evlogimenos
committed
//
// This file defines interfaces to access the target independent code
// generation passes provided by the LLVM backend.
//
//===---------------------------------------------------------------------===//
#include "llvm/CodeGen/MachinePassRegistry.h"
Alkis Evlogimenos
committed
#include "llvm/CodeGen/Passes.h"
Alkis Evlogimenos
committed
namespace {
cl::opt<const char *, false, RegisterPassParser<RegisterRegAlloc> >
RegAlloc("regalloc",
cl::init("linearscan"),
cl::desc("Register allocator to use: (default = linearscan)"));
}
FunctionPass *llvm::createRegisterAllocator() {
RegisterRegAlloc::FunctionPassCtor Ctor = RegisterRegAlloc::getCache();
if (!Ctor) {
Ctor = RegisterRegAlloc::FindCtor(RegAlloc);
assert(Ctor && "No register allocator found");
if (!Ctor) Ctor = RegisterRegAlloc::FirstCtor();
RegisterRegAlloc::setCache(Ctor);
}
assert(Ctor && "No register allocator found");
return Ctor();
}