This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/28364] poor optimization choices when iterating over a std::string (probably not c++-specific)
- From: "zackw at panix dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jul 2006 08:25:33 -0000
- Subject: [Bug tree-optimization/28364] poor optimization choices when iterating over a std::string (probably not c++-specific)
- References: <bug-28364-37@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #20 from zackw at panix dot com 2006-07-13 08:25 -------
Subject: Re: poor optimization choices when iterating over a std::string
(probably not c++-specific)
> > However, ch isn't just copying the loop header; it is also
> > copying the *entire body of the loop*, which nothing can fix. I call
> > that a clear bug.
>
> how do you define a loop header?
I was under the impression it was just the one basic block called out
in the .ch dump, e.g.
;; Loop 1
;; header 6, latch 5
;; depth 1, level 1, outer 0
-- basic block 6 happens to contain just the code from the syntactic
loop condition. Andrew informs me that this is wrong, and that in
this case the header is the entire loop, but I will come back at that
with 'ch should never be duplicating the entire loop; if the header is
the entire loop, it should do something more sensible, like duplicate
just the first basic block or something.'
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28364