early-access version 1870
This commit is contained in:
@@ -59,7 +59,7 @@ public:
|
||||
}
|
||||
|
||||
std::string code;
|
||||
RegAlloc reg_alloc{*this};
|
||||
RegAlloc reg_alloc{};
|
||||
const Info& info;
|
||||
const Profile& profile;
|
||||
const RuntimeInfo& runtime_info;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <ranges>
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <tuple>
|
||||
|
||||
@@ -196,7 +196,10 @@ void PrecolorInst(IR::Inst& phi) {
|
||||
|
||||
void Precolor(const IR::Program& program) {
|
||||
for (IR::Block* const block : program.blocks) {
|
||||
for (IR::Inst& phi : block->Instructions() | std::views::take_while(IR::IsPhi)) {
|
||||
for (IR::Inst& phi : block->Instructions()) {
|
||||
if (!IR::IsPhi(phi)) {
|
||||
break;
|
||||
}
|
||||
PrecolorInst(phi);
|
||||
}
|
||||
}
|
||||
|
@@ -86,7 +86,7 @@ struct ScalarF64 : Value {};
|
||||
|
||||
class RegAlloc {
|
||||
public:
|
||||
RegAlloc(EmitContext& ctx_) : ctx{ctx_} {}
|
||||
RegAlloc() = default;
|
||||
|
||||
Register Define(IR::Inst& inst);
|
||||
|
||||
@@ -142,7 +142,6 @@ private:
|
||||
|
||||
void Free(Id id);
|
||||
|
||||
EmitContext& ctx;
|
||||
size_t num_used_registers{};
|
||||
size_t num_used_long_registers{};
|
||||
std::bitset<NUM_REGS> register_use{};
|
||||
|
Reference in New Issue
Block a user