diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-01-10 18:13:32 +0100 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2013-01-10 12:11:54 -0800 |
commit | b4f7fcaf99a4d952e59f2a9fa9286d24cc4b3a5a (patch) | |
tree | a2670027e2f84d2602734c3636e03ca34e68b2f9 | |
parent | e9825b47323ee58a95c221bc0a7b759ab0c95061 (diff) | |
download | orc-b4f7fcaf99a4d952e59f2a9fa9286d24cc4b3a5a.tar.gz |
orccompiler: Allow fallback to backup/emulation if the target specific register allocation failsbaserock/morph
The OrcCode of the program wouldn't be filled with all required fields
if the register allocation happens to early.
-rw-r--r-- | orc/orccompiler.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/orc/orccompiler.c b/orc/orccompiler.c index 68eb01e..2175206 100644 --- a/orc/orccompiler.c +++ b/orc/orccompiler.c @@ -254,12 +254,6 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target, orc_compiler_rewrite_vars (compiler); if (compiler->error) goto error; - if (compiler->target) { - orc_compiler_global_reg_alloc (compiler); - - orc_compiler_rewrite_vars2 (compiler); - } - #if 0 { ORC_ERROR("variables"); @@ -285,9 +279,6 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target, } } #endif - - if (compiler->error) goto error; - program->orccode = orc_code_new (); program->orccode->is_2d = program->is_2d; @@ -323,6 +314,13 @@ orc_program_compile_full (OrcProgram *program, OrcTarget *target, goto error; } + if (compiler->target) { + orc_compiler_global_reg_alloc (compiler); + + orc_compiler_rewrite_vars2 (compiler); + } + if (compiler->error) goto error; + orc_compiler_assign_rules (compiler); if (compiler->error) goto error; |