{
gimple p = gimple_alloc (GIMPLE_PREDICT, 0);
/* Ensure all the predictors fit into the lower bits of the subcode. */
- gcc_assert (END_PREDICTORS <= GF_PREDICT_TAKEN);
+ gcc_assert ((int) END_PREDICTORS <= GF_PREDICT_TAKEN);
gimple_predict_set_predictor (p, predictor);
gimple_predict_set_outcome (p, outcome);
return p;
return fn ? fn->gimple_body : NULL;
}
+/* Return true when FNDECL has Gimple body either in unlowered
+ or CFG form. */
+bool
+gimple_has_body_p (tree fndecl)
+{
+ struct function *fn = DECL_STRUCT_FUNCTION (fndecl);
+ return (gimple_body (fndecl) || (fn && fn->cfg));
+}
/* Detect flags from a GIMPLE_CALL. This is just like
call_expr_flags, but for gimple tuples. */
tree
gimple_get_lhs (const_gimple stmt)
{
- enum tree_code code = gimple_code (stmt);
+ enum gimple_code code = gimple_code (stmt);
if (code == GIMPLE_ASSIGN)
return gimple_assign_lhs (stmt);
void
gimple_set_lhs (gimple stmt, tree lhs)
{
- enum tree_code code = gimple_code (stmt);
+ enum gimple_code code = gimple_code (stmt);
if (code == GIMPLE_ASSIGN)
gimple_assign_set_lhs (stmt, lhs);
return NULL_TREE;
}
-/* Build call same as STMT but skipping arguments ARGS_TO_SKIP. */
+/* Build a GIMPLE_CALL identical to STMT but skipping the arguments in
+ the positions marked by the set ARGS_TO_SKIP. */
+
gimple
-giple_copy_call_skip_args (gimple stmt, bitmap args_to_skip)
+gimple_copy_call_skip_args (gimple stmt, bitmap args_to_skip)
{
int i;
tree fn = gimple_call_fn (stmt);