Commit 5c246896 by Jakub Jelinek Committed by Jakub Jelinek

* tree-tailcall.c (find_tail_calls): Ignore GIMPLE_NOPs.

From-SVN: r231282
parent 6b2e46bf
2015-12-04 Jakub Jelinek <jakub@redhat.com> 2015-12-04 Jakub Jelinek <jakub@redhat.com>
* tree-tailcall.c (find_tail_calls): Ignore GIMPLE_NOPs.
PR tree-optimization/68680 PR tree-optimization/68680
* calls.c (special_function_p): Return ECF_MAY_BE_ALLOCA for * calls.c (special_function_p): Return ECF_MAY_BE_ALLOCA for
BUILT_IN_ALLOCA{,_WITH_ALIGN}. Don't check for __builtin_alloca BUILT_IN_ALLOCA{,_WITH_ALIGN}. Don't check for __builtin_alloca
...@@ -412,9 +412,10 @@ find_tail_calls (basic_block bb, struct tailcall **ret) ...@@ -412,9 +412,10 @@ find_tail_calls (basic_block bb, struct tailcall **ret)
{ {
stmt = gsi_stmt (gsi); stmt = gsi_stmt (gsi);
/* Ignore labels, returns, clobbers and debug stmts. */ /* Ignore labels, returns, nops, clobbers and debug stmts. */
if (gimple_code (stmt) == GIMPLE_LABEL if (gimple_code (stmt) == GIMPLE_LABEL
|| gimple_code (stmt) == GIMPLE_RETURN || gimple_code (stmt) == GIMPLE_RETURN
|| gimple_code (stmt) == GIMPLE_NOP
|| gimple_clobber_p (stmt) || gimple_clobber_p (stmt)
|| is_gimple_debug (stmt)) || is_gimple_debug (stmt))
continue; continue;
...@@ -532,7 +533,8 @@ find_tail_calls (basic_block bb, struct tailcall **ret) ...@@ -532,7 +533,8 @@ find_tail_calls (basic_block bb, struct tailcall **ret)
stmt = gsi_stmt (agsi); stmt = gsi_stmt (agsi);
if (gimple_code (stmt) == GIMPLE_LABEL) if (gimple_code (stmt) == GIMPLE_LABEL
|| gimple_code (stmt) == GIMPLE_NOP)
continue; continue;
if (gimple_code (stmt) == GIMPLE_RETURN) if (gimple_code (stmt) == GIMPLE_RETURN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment