This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix loop location in .vect dump files


Loop location is stored as part of LOOP_VINFO so that it can be used in info dumps. However LOOP_VINFO is not available all the time, so many times UNKNOWN_LOC is used (which falls back to function location). This makes reading dump file confusing. For example,

Before :

../../gcc/cp/decl.c:290: note: === vect_analyze_loop_form ===
../../gcc/cp/decl.c:290: note: not vectorized: multiple exits.
../../gcc/cp/decl.c:270: note: bad loop form.
../../gcc/cp/decl.c:270: note: vectorized 0 loops in function.
../../gcc/cp/decl.c:711: note: ===== analyze_loop_nest ===== (get_loop_exit_conditi
on
../../gcc/cp/decl.c:715: note: === vect_analyze_loop_form ===
../../gcc/cp/decl.c:715: note: not vectorized: too many BBs in loop.
../../gcc/cp/decl.c:711: note: bad loop form.
../../gcc/cp/decl.c:711: note: vectorized 0 loops in function.
../../gcc/cp/decl.c:781: note: ===== analyze_loop_nest ===== (get_loop_exit_conditi
on
../../gcc/cp/decl.c:788: note: === vect_analyze_loop_form ===
../../gcc/cp/decl.c:788: note: not vectorized: unexpectd loop form.
../../gcc/cp/decl.c:781: note: bad loop form.
../../gcc/cp/decl.c:781: note: vectorized 0 loops in function.



This verbose patch moves loop location out of LOOP_VINFO.


After :

../../gcc/cp/decl.c:290: note: bad loop form.
../../gcc/cp/decl.c:290: note: vectorized 0 loops in function.
../../gcc/cp/decl.c:715: note: ===== analyze_loop_nest =====
../../gcc/cp/decl.c:715: note: === vect_analyze_loop_form ===
../../gcc/cp/decl.c:715: note: not vectorized: too many BBs in loop.
../../gcc/cp/decl.c:715: note: bad loop form.
../../gcc/cp/decl.c:715: note: vectorized 0 loops in function.
../../gcc/cp/decl.c:788: note: ===== analyze_loop_nest =====
../../gcc/cp/decl.c:788: note: === vect_analyze_loop_form ===
../../gcc/cp/decl.c:788: note: === get_loop_niters === (number_of_iterations_in_loo
p
../../gcc/cp/decl.c:788: note: not vectorized: number of iterations cannot be comp
uted.
../../gcc/cp/decl.c:788: note: bad loop form.
../../gcc/cp/decl.c:788: note: vectorized 0 loops in function.



* tree-vectorizer.h (struct _loop_vec_info): Remove loop_line_number.
(LOOP_VINFO_LOC, LOOP_LOC): Remove.
(vect_loop_locaation): New.
* tree-vectorizer.c (vect_loop_location): New.
(vect_print_dump_info): Use vect_loop_location.
(new_loop_vec_info): Do not set LOOP_VINFO_LOC.
(vectorize_loops): Set vect_loop_location.
* boring entries to remove loc parameter everywhere
vect_print_dump_info is used ...


Bootstrapped and tested on powerpc-darwin. OK, with appropriate ChangeLog entry ?
Thanks,
-
Devang


Attachment: av_loop_loc.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]