summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2010-10-22 23:09:15 +0000
committerAndrew Trick <atrick@apple.com>2010-10-22 23:09:15 +0000
commit14e8d71cc945034d4ee6e76be00e00f14efac62f (patch)
treea949a75ee28e7ab9e441d23e1765a97c1e6d5c60 /include
parentc9db3314333c34458f6648088cdabbbc96696e9a (diff)
downloadllvm-14e8d71cc945034d4ee6e76be00e00f14efac62f.tar.gz
llvm-14e8d71cc945034d4ee6e76be00e00f14efac62f.tar.bz2
llvm-14e8d71cc945034d4ee6e76be00e00f14efac62f.tar.xz
This is a prototype of an experimental register allocation
framework. It's purpose is not to improve register allocation per se, but to make it easier to develop powerful live range splitting. I call it the basic allocator because it is as simple as a global allocator can be but provides the building blocks for sophisticated register allocation with live range splitting. A minimal implementation is provided that trivially spills whenever it runs out of registers. I'm checking in now to get high-level design and style feedback. I've only done minimal testing. The next step is implementing a "greedy" allocation algorithm that does some register reassignment and makes better splitting decisions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/LinkAllCodegenComponents.h1
-rw-r--r--include/llvm/CodeGen/Passes.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LinkAllCodegenComponents.h b/include/llvm/CodeGen/LinkAllCodegenComponents.h
index 59c0482efc..bc06d43b8f 100644
--- a/include/llvm/CodeGen/LinkAllCodegenComponents.h
+++ b/include/llvm/CodeGen/LinkAllCodegenComponents.h
@@ -34,6 +34,7 @@ namespace {
(void) llvm::createDeadMachineInstructionElimPass();
(void) llvm::createFastRegisterAllocator();
+ (void) llvm::createBasicRegisterAllocator();
(void) llvm::createLinearScanRegisterAllocator();
(void) llvm::createDefaultPBQPRegisterAllocator();
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index 7e135617fa..72dd3b8529 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -95,6 +95,11 @@ namespace llvm {
///
FunctionPass *createFastRegisterAllocator();
+ /// BasicRegisterAllocation Pass - This pass implements a degenerate global
+ /// register allocator using the basic regalloc framework.
+ ///
+ FunctionPass *createBasicRegisterAllocator();
+
/// LinearScanRegisterAllocation Pass - This pass implements the linear scan
/// register allocation algorithm, a global register allocator.
///