Summary: * Bug fixes. * Tune ivopt for code size.
Details: 1. Reproduce lp:1007353 "kernel build fails with 12.04 and 12.05 toolchain released" and workout a patch to fix it; reopen the related binutils/gas bug http://sourceware.org/bugzilla/show_bug.cgi?id=12698 and propose the patch to it; push the patch to linaro crosstool-ng to make sure lp:1007353 is fixed for next binary toolchain release.
2. Setup the SPEC build env and reproduce lp: 886124 "using LDR from literal pool rather than MOVW/MOVT". After cprop1 replaces lo_sum (high: symbol_ref bloc) (symbol_ref (block)) with a (symbol_ref (block)), no later optimization can split it. The solution in linaro 4.5 is to add a split (porting from codesourcery) in arm.md. Then split1 can split the (symbol_ref (block)). The split is:
(define_split [(set (match_operand:SI 0 "arm_general_register_operand" "") (match_operand:SI 1 "general_operand" ""))] "TARGET_32BIT && TARGET_USE_MOVT && GET_CODE (operands[1]) == SYMBOL_REF && !flag_pic && !target_word_relocations && !arm_tls_referenced_p (operands[1])" [(clobber (const_int 0))] { arm_emit_movpair (operands[0], operands[1]); DONE; })
3. Tune ivopt for code size. Try to set avg_loop_niter to 1 since loop iterator number does not impact code size. But test shows there is no improvement. Need more tuning.
Plans: * Analyze the failed cases in arm-linux-gnueabihf regression test. * Tune code size for M0.
Best regards! -Zhenqiang