#include "coretypes.h"
#include "tm.h"
#include "target.h"
+#include "alias.h"
+#include "symtab.h"
#include "tree.h"
+#include "fold-const.h"
#include "calls.h"
#include "stmt.h"
#include "stor-layout.h"
#include "hard-reg-set.h"
#include "predict.h"
-#include "vec.h"
-#include "hashtab.h"
-#include "hash-set.h"
-#include "machmode.h"
-#include "input.h"
#include "function.h"
#include "dominance.h"
#include "cfg.h"
#include "internal-fn.h"
#include "tree-eh.h"
#include "gimple-expr.h"
-#include "is-a.h"
#include "gimple.h"
#include "gimple-iterator.h"
#include "gimple-walk.h"
#include "ipa-ref.h"
#include "lto-streamer.h"
#include "cgraph.h"
+#include "gimple-ssa.h"
/* All the tuples have their operand vector (if present) at the very bottom
BODY is sequence of statements inside the for loop.
KIND is the `for' variant.
- CLAUSES, are any of the OMP loop construct's clauses: private, firstprivate,
- lastprivate, reductions, ordered, schedule, and nowait.
+ CLAUSES, are any of the construct's clauses.
COLLAPSE is the collapse count.
PRE_BODY is the sequence of statements that are loop invariant. */
/* Build a GIMPLE_OMP_TARGET statement.
BODY is the sequence of statements that will be executed.
- CLAUSES are any of the OMP target construct's clauses. */
+ KIND is the kind of the region.
+ CLAUSES are any of the construct's clauses. */
gomp_target *
gimple_build_omp_target (gimple_seq body, int kind, tree clauses)
ggc_free (stmt);
}
}
+
+/* See if STMT now calls function that takes no parameters and if so, drop
+ call arguments. This is used when devirtualization machinery redirects
+ to __builtiln_unreacahble or __cxa_pure_virutal. */
+
+void
+maybe_remove_unused_call_args (struct function *fn, gimple stmt)
+{
+ tree decl = gimple_call_fndecl (stmt);
+ if (TYPE_ARG_TYPES (TREE_TYPE (decl))
+ && TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl))) == void_type_node
+ && gimple_call_num_args (stmt))
+ {
+ gimple_set_num_ops (stmt, 3);
+ update_stmt_fn (fn, stmt);
+ }
+}