Opened 14 years ago
Closed 14 years ago
#436 closed task (wontfix)
find more efficient way to bulk-init locally allocated data
Reported by: | felix winkelmann | Owned by: | felix winkelmann |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | compiler | Version: | 4.6.x |
Keywords: | code generation | Cc: | |
Estimated difficulty: |
Description
For example, letrec
creates code like this:
C_word t1517; C_word t1518; C_word t1519; C_word ab[2291],*a=ab; C_check_for_interrupt; if(!C_stack_probe(&a)){ C_save_and_reclaim((void*)tr2,(void*)f_37706,2,t0,t1);} t2=C_SCHEME_UNDEFINED; t3=(*a=C_VECTOR_TYPE|1,a[1]=t2,tmp=(C_word)a,a+=2,tmp); t4=C_SCHEME_UNDEFINED; t5=(*a=C_VECTOR_TYPE|1,a[1]=t4,tmp=(C_word)a,a+=2,tmp); t6=C_SCHEME_UNDEFINED; t7=(*a=C_VECTOR_TYPE|1,a[1]=t6,tmp=(C_word)a,a+=2,tmp); t8=C_SCHEME_UNDEFINED; t9=(*a=C_VECTOR_TYPE|1,a[1]=t8,tmp=(C_word)a,a+=2,tmp); t10=C_SCHEME_UNDEFINED; t11=(*a=C_VECTOR_TYPE|1,a[1]=t10,tmp=(C_word)a,a+=2,tmp); t12=C_SCHEME_UNDEFINED; t13=(*a=C_VECTOR_TYPE|1,a[1]=t12,tmp=(C_word)a,a+=2,tmp); t14=C_SCHEME_UNDEFINED; t15=(*a=C_VECTOR_TYPE|1,a[1]=t14,tmp=(C_word)a,a+=2,tmp); t16=C_SCHEME_UNDEFINED; t17=(*a=C_VECTOR_TYPE|1,a[1]=t16,tmp=(C_word)a,a+=2,tmp); t18=C_SCHEME_UNDEFINED;
One could use local array initializers or so to reduce the amount of code generated.
Note: See
TracTickets for help on using
tickets.
Since the compiler has to create the local data anyway, I can't see much improvement by using any other construct.