@@ -1,5 +1,18 @@
2014-10-24 David Malcolm <dmalcolm@redhat.com>
+ Concretize gimple_call_arg_flags
+
+ * gimple.h (gimple_call_arg_flags): Require a const_gimple_call
+ rather than a const_gimple.
+
+ * gimple.c (gimple_call_fnspec): Likewise.
+ (gimple_call_arg_flags): Likewise.
+
+ * tree-inline.c (remap_gimple_stmt): Use a dyn_cast rather than a
+ is_gimple_call and repeated checked casts.
+
+2014-10-24 David Malcolm <dmalcolm@redhat.com>
+
Concretize gimple_call_set_tail and gimple_call_tail_p
* gimple.h (gimple_call_set_tail): Require a gimple_call.
@@ -1367,7 +1367,7 @@ gimple_call_flags (const_gimple stmt)
/* Return the "fn spec" string for call STMT. */
static const_tree
-gimple_call_fnspec (const_gimple stmt)
+gimple_call_fnspec (const_gimple_call stmt)
{
tree type, attr;
@@ -1388,7 +1388,7 @@ gimple_call_fnspec (const_gimple stmt)
/* Detects argument flags for argument number ARG on call STMT. */
int
-gimple_call_arg_flags (const_gimple stmt, unsigned arg)
+gimple_call_arg_flags (const_gimple_call stmt, unsigned arg)
{
const_tree attr = gimple_call_fnspec (stmt);
@@ -1373,7 +1373,7 @@ bool empty_body_p (gimple_seq);
gimple_seq gimple_seq_copy (gimple_seq);
bool gimple_call_same_target_p (const_gimple, const_gimple);
int gimple_call_flags (const_gimple);
-int gimple_call_arg_flags (const_gimple, unsigned);
+int gimple_call_arg_flags (const_gimple_call, unsigned);
int gimple_call_return_flags (const_gimple_call);
bool gimple_assign_copy_p (gimple);
bool gimple_assign_ssa_name_copy_p (gimple);
@@ -1548,9 +1548,9 @@ remap_gimple_stmt (gimple stmt, copy_body_data *id)
copy = gimple_copy (stmt);
/* Clear flags that need revisiting. */
- if (is_gimple_call (copy)
- && gimple_call_tail_p (as_a <gimple_call> (copy)))
- gimple_call_set_tail (as_a <gimple_call> (copy), false);
+ if (gimple_call call_stmt = dyn_cast <gimple_call> (copy))
+ if (gimple_call_tail_p (call_stmt))
+ gimple_call_set_tail (call_stmt, false);
/* Remap the region numbers for __builtin_eh_{pointer,filter},
RESX and EH_DISPATCH. */