PR c++/68795: fix uninitialized close_paren_loc in cp_parser_postfix_expression
[gcc.git] / gcc / predict.c
index 5fd41658e86b56291abdc97e2f11bbb9114e37be..150d8d008e7c3d730cfb867258fb69ba2b725c8d 100644 (file)
@@ -1,5 +1,5 @@
 /* Branch prediction routines for the GNU compiler.
-   Copyright (C) 2000-2015 Free Software Foundation, Inc.
+   Copyright (C) 2000-2016 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -31,39 +31,24 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "backend.h"
-#include "target.h"
 #include "rtl.h"
 #include "tree.h"
 #include "gimple.h"
 #include "cfghooks.h"
 #include "tree-pass.h"
-#include "tm_p.h"
 #include "ssa.h"
-#include "expmed.h"
-#include "insn-config.h"
-#include "regs.h"
 #include "emit-rtl.h"
-#include "recog.h"
 #include "cgraph.h"
 #include "coverage.h"
 #include "diagnostic-core.h"
 #include "gimple-predict.h"
-#include "alias.h"
 #include "fold-const.h"
 #include "calls.h"
 #include "cfganal.h"
-#include "flags.h"
 #include "profile.h"
-#include "except.h"
-#include "dojump.h"
-#include "explow.h"
-#include "varasm.h"
-#include "stmt.h"
-#include "expr.h"
 #include "sreal.h"
 #include "params.h"
 #include "cfgloop.h"
-#include "internal-fn.h"
 #include "gimple-iterator.h"
 #include "tree-cfg.h"
 #include "tree-ssa-loop-niter.h"
@@ -284,6 +269,16 @@ optimize_function_for_speed_p (struct function *fun)
   return !optimize_function_for_size_p (fun);
 }
 
+/* Return the optimization type that should be used for the function FUN.  */
+
+optimization_type
+function_optimization_type (struct function *fun)
+{
+  return (optimize_function_for_speed_p (fun)
+         ? OPTIMIZE_FOR_SPEED
+         : OPTIMIZE_FOR_SIZE);
+}
+
 /* Return TRUE when BB should be optimized for size.  */
 
 bool
@@ -301,6 +296,16 @@ optimize_bb_for_speed_p (const_basic_block bb)
   return !optimize_bb_for_size_p (bb);
 }
 
+/* Return the optimization type that should be used for block BB.  */
+
+optimization_type
+bb_optimization_type (const_basic_block bb)
+{
+  return (optimize_bb_for_speed_p (bb)
+         ? OPTIMIZE_FOR_SPEED
+         : OPTIMIZE_FOR_SIZE);
+}
+
 /* Return TRUE when BB should be optimized for size.  */
 
 bool