mini-llvm 0.1.0
Loading...
Searching...
No Matches
RegisterAllocator.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2
3#pragma once
4
5#include <unordered_set>
6
15
16namespace mini_llvm {
17
19public:
21 void (mir::Register *reg, mir::StackSlot *slot, const mir::BasicBlockBuilder &builder)
22 >;
23
24 virtual ~RegisterAllocator() = default;
25
26 RegisterAllocator() = default;
27
30
33
34 virtual bool allocate(mir::Function &F,
35 const std::unordered_set<mir::VirtualRegister *> &virtRegs,
36 const std::unordered_set<mir::PhysicalRegister *> &physRegs,
37 RegisterAction load,
38 RegisterAction store
39 ) = 0;
40};
41
42} // namespace mini_llvm
#define MINI_LLVM_EXPORT
Definition Compiler.h:17
Definition FunctionRef.h:13
virtual bool allocate(mir::Function &F, const std::unordered_set< mir::VirtualRegister * > &virtRegs, const std::unordered_set< mir::PhysicalRegister * > &physRegs, RegisterAction load, RegisterAction store)=0
RegisterAllocator(const RegisterAllocator &)=delete
FunctionRef< void(mir::Register *reg, mir::StackSlot *slot, const mir::BasicBlockBuilder &builder) > RegisterAction
Definition RegisterAllocator.h:20
virtual ~RegisterAllocator()=default
RegisterAllocator & operator=(const RegisterAllocator &)=delete
RegisterAllocator & operator=(RegisterAllocator &&)=delete
RegisterAllocator(RegisterAllocator &&)=delete
Definition BasicBlockBuilder.h:14
Definition Function.h:21
Definition Register.h:14
Definition StackSlot.h:11
Definition GraphColoringAllocator.h:13