This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29782] Incorrect inlining failure
- From: "takis at issaris dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Nov 2006 17:28:36 -0000
- Subject: [Bug middle-end/29782] Incorrect inlining failure
- References: <bug-29782-12207@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from takis at issaris dot org 2006-11-09 17:28 -------
(In reply to comment #3)
> It has a heuristic to tell the result in code-size difference. Of course no
> heuristic is perfect - see tree-inline.c:estimate_num_insns().
Ofcourse! Thanks for your reply!
So, I guess that if I were to move ASM_EXPR to the list of zero cost cases, GCC
would always inline my code. I'll see if this works. Thanks again! :)
Still, I think it is weird I'm seeing this behavior, as with my untrained eyes,
it seems as if inline assembly would only get 1 assigned as cost, while a
function call probably costs 4+something (I guess from estimate_move_cost()
although it can also return another value of which I am currently not capable
of determining the value). This would mean inlining of functions containing
only inline assembly blocks would always succeed, right? Hmm... Unless the else
in estimate_move_cost() can return 0 or 1 in some cases.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29782