jak-project/goalc/regalloc/IRegister.h
water111 a80b331c27
[Compiler] In-progress support for vector float (AVX) (#171)
* begin work on vf support

* split reg kind into reg hw kind and class, use class for ireg

* try test

* clang format

* add some more ops and some example functions

* better lvf on statics

* add documentation
2020-12-30 15:33:51 -05:00

27 lines
551 B
C++

#pragma once
/*!
* IRegister is the Register for the Intermediate Representation.
*/
#include <string>
#include <vector>
#include "goalc/emitter/Register.h"
struct IRegister {
RegClass reg_class = RegClass::INVALID;
int id = -1;
std::string to_string() const;
struct hash {
auto operator()(const IRegister& r) const { return std::hash<int>()(r.id); }
};
};
struct IRegConstraint {
IRegister ireg;
int instr_idx = -1;
bool contrain_everywhere = false;
emitter::Register desired_register;
std::string to_string() const;
};