From: Kyrylo Tkachov <[email protected]>
The name reads as a conditional-execution limit, but the branchless paths use
it too, as the number of instructions they may speculate: the diamond
multiple-set gate in noce_process_if_block and the assignment count in
check_cond_move_block both test it. Say so where it is defined, and record
that the default charges an unpredictable branch. Comment-only.
gcc/ChangeLog:
* ifcvt.cc (MAX_CONDITIONAL_EXECUTE): Add a comment.
Signed-off-by: Kyrylo Tkachov <[email protected]>
---
gcc/ifcvt.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/gcc/ifcvt.cc b/gcc/ifcvt.cc
index 6c754eff767..267f2dee111 100644
--- a/gcc/ifcvt.cc
+++ b/gcc/ifcvt.cc
@@ -47,6 +47,12 @@
#include "rtl-iter.h"
#include "ifcvt.h"
+/* The number of instructions this pass may make run unconditionally in place
+ of a branch. The conditional-execution path uses it as the number of insns
+ it may predicate. The branchless paths use it as the number of insns they
+ may speculate. The default charges the cost of an unpredictable branch,
+ plus one. Some targets override it. */
+
#ifndef MAX_CONDITIONAL_EXECUTE
#define MAX_CONDITIONAL_EXECUTE \
(BRANCH_COST (optimize_function_for_speed_p (cfun), false) \
--
2.50.1 (Apple Git-155)