#2 bugs after applying different optimization to functions

open
nobody
None
5
2009-08-23
2009-08-23
Liang Peng
No

Bug one:
Description: A segmentation fault(rhs_regno (x=0x0) rtl.h:1005) comes up if we:
delcare function Mibench > automotive_susan_e > susan.c:susan_edges_small() with __attribute__((optimize(3)))
and compile it using $~/ici/install/bin/gcc -O1 -lm -c susan.c .
My Solution: Always execute function init_caller_save () in toplev.c:backend_init_target().
Bug two:
Description: A segmentation fault(ipa-cp.c ipcp_get_lattice()) comes up if we:
declare function Mibench > automotive_susan_e > susan.c:susan_edges() with __attribute__((optimize(3)))
declare function Mibench > automotive_susan_e > susan.c:susan_edges_small() with __attribute__((optimize(1)))
declare function Mibench > automotive_susan_e > susan.c:susan_corners_quick() with __attribute__((optimize(3)))
and compile it using ~/ici/install/bin/gcc -O3 -lm -c susan.c.
My Solution: Do not execute inline_indirect_intraprocedural_analysis() (ipa-inline.c analyze_function()), if declaration of current function has
function_specific_optimization, and flag optimize is 0 or 1.

Discussion