introduce another vinstr temp

Some vinstrs are currently broken when using peephole
optimization as they appear as writing to a temporary ssa
output before being stored into their real destination,
causing the store to be optimized out, but the generated
code relies on having the destination as another temporary
value available.

Let's just add a 2nd temp to be used in those cases.

Signed-off-by: Wolfgang Bumiller <wry.git@bumiller.com>
This commit is contained in:
Wolfgang Bumiller 2019-09-15 10:06:53 +02:00
parent 451873ae52
commit 031f827da5

2
ir.h
View file

@ -249,7 +249,7 @@ ir_block* ir_function_create_block(lex_ctx_t ctx, ir_function*, const char
/* builder */ /* builder */
#define IR_HT_SIZE 1024 #define IR_HT_SIZE 1024
#define IR_MAX_VINSTR_TEMPS 1 #define IR_MAX_VINSTR_TEMPS 2
struct ir_builder { struct ir_builder {
ir_builder(const std::string& modulename); ir_builder(const std::string& modulename);