------- 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