[Compiler] Add reset-here option to colored and constrained rlet vars (#169)

* add reset-here to clear coloring at entry to rlet

* update doc
This commit is contained in:
water111
2020-12-27 14:21:48 -05:00
committed by GitHub
parent 25301a8bbc
commit c811778d00
11 changed files with 54 additions and 69 deletions
+8 -8
View File
@@ -857,15 +857,15 @@ void IR_Null::do_codegen(emitter::ObjectGenerator* gen,
}
///////////////////////
// FunctionStart
// ValueReset
///////////////////////
IR_FunctionStart::IR_FunctionStart(std::vector<RegVal*> args) : m_args(std::move(args)) {}
IR_ValueReset::IR_ValueReset(std::vector<RegVal*> args) : m_args(std::move(args)) {}
std::string IR_FunctionStart::print() {
return "function-start";
std::string IR_ValueReset::print() {
return "value-reset";
}
RegAllocInstr IR_FunctionStart::to_rai() {
RegAllocInstr IR_ValueReset::to_rai() {
RegAllocInstr rai;
for (auto& x : m_args) {
rai.write.push_back(x->ireg());
@@ -873,9 +873,9 @@ RegAllocInstr IR_FunctionStart::to_rai() {
return rai;
}
void IR_FunctionStart::do_codegen(emitter::ObjectGenerator* gen,
const AllocationResult& allocs,
emitter::IR_Record irec) {
void IR_ValueReset::do_codegen(emitter::ObjectGenerator* gen,
const AllocationResult& allocs,
emitter::IR_Record irec) {
(void)gen;
(void)allocs;
(void)irec;