This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/79165] [7 Regression] 100% compile-time increase for polyhedron aermod by r244581
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 23 Jan 2017 09:56:49 +0000
- Subject: [Bug fortran/79165] [7 Regression] 100% compile-time increase for polyhedron aermod by r244581
- Auto-submitted: auto-generated
- References: <bug-79165-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79165
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, so the reason for the slowness is that the Fortran frontend emits full
diagnostics to a temporary buffer for gfc_match_rvalue:
/* Match a function reference. */
function0:
m = gfc_match_actual_arglist (0, &actual_arglist);
if (m == MATCH_NO)
{
if (sym->attr.proc == PROC_ST_FUNCTION)
gfc_error ("Statement function %qs requires argument list at %C",
sym->name);
else
gfc_error ("Function %qs requires an argument list at %C",
sym->name);
m = MATCH_ERROR;
break;
}
for aermod that's 18748 times. And what slows down with the linemap mangling
is showing of the caret location (location_get_source_line/get_next_line
and thus the fcache I suppose).
Tentatively remembering an error like above is of course quite broken (read:
expensive).
So somehow with the tree.c hunk of the patch location_get_source_line
(inclusive callees) gets 90 times more expensive (when using callgrind on
aermod).