Shrink-wrap on povray
Hi, I try ARM, MIPS, PowerPC and X86 on povray benchmark. No one can shrink-wrap function Ray_In_Bound. Here is: bool Ray_In_Bound (RAY *Ray, OBJECT *Bounding_Object) { ... for (Bound = Bounding_Object; Bound != NULL; Bound = Bound-Sibling) {...} return (true); } For ARM O2/O3, Bound is allocated to r6 during ira. So there is copy r6 = r1 before testing Bound != NULL The copy (using r6) blocks the shrink-wrap optimization since r6 should be saved. Need enhance shrink-wrap to handle this case. Overall, for povray benchmark, 54 functions are shrink-wrapped for ARM; 59 functions are shrink-wrapped for X86; 25 functions are shrink-wrapped for MIPS; 26 functions are shrink-wrapped for PowerPC. Thanks! -Zhenqiang ___ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain
Re: Shrink-wrap on povray
On 20 November 2012 22:10, Zhenqiang Chen zhenqiang.c...@linaro.org wrote: Hi, I try ARM, MIPS, PowerPC and X86 on povray benchmark. No one can shrink-wrap function Ray_In_Bound. Here is: bool Ray_In_Bound (RAY *Ray, OBJECT *Bounding_Object) { ... for (Bound = Bounding_Object; Bound != NULL; Bound = Bound-Sibling) {...} return (true); } For ARM O2/O3, Bound is allocated to r6 during ira. So there is copy r6 = r1 before testing Bound != NULL Could you hack the benchmark to make the early exit explicit and see if that changes the result? That lets us know if improving shrink wrap is worthwhile. Something like: bool Ray_In_Bound (RAY *Ray, OBJECT *Bounding_Object) { if (Bounding_Object == NULL) return true; ... for (Bound = Bounding_Object; Bound != NULL; Bound = Bound-Sibling) {...} return (true); } -- Michael ___ linaro-toolchain mailing list linaro-toolchain@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-toolchain