[hackers] [scc] [cc2-qbe] Do not emit local temporary variables || Roberto E. Vargas Caballero

From: <git_AT_suckless.org>
Date: Sat, 16 Apr 2016 09:42:19 +0200 (CEST)

commit f48bd7ea099100ae505a090271379e47953f0c54
Author: Roberto E. Vargas Caballero <Roberto E. Vargas Caballero>
AuthorDate: Fri Apr 15 14:48:03 2016 +0200
Commit: Roberto E. Vargas Caballero <Roberto E. Vargas Caballero>
CommitDate: Fri Apr 15 14:48:03 2016 +0200

    [cc2-qbe] Do not emit local temporary variables
    
    They do not need to be allocated.

diff --git a/cc2/arch/qbe/code.c b/cc2/arch/qbe/code.c
index 3ee9478..0d3db65 100644
--- a/cc2/arch/qbe/code.c
+++ b/cc2/arch/qbe/code.c
_AT_@ -201,7 +201,7 @@ writeout(void)
 
         puts(")\n{");
 
- for ( ; p; p = p->next) {
+ for ( ; p && p->id != TMPSYM; p = p->next) {
                 tp = &p->type;
                 printf("\t%s %s= alloc%lld %lld\n",
                        symname(p), size2asm(tp),
Received on Sat Apr 16 2016 - 09:42:19 CEST

This archive was generated by hypermail 2.3.0 : Sat Apr 16 2016 - 09:48:40 CEST