Commit 7213344d authored by yb9976's avatar yb9976
Browse files

condeval is called jump threading now

[r26280]
parent d1c902c9
......@@ -87,7 +87,7 @@ typedef enum {
dbg_opt_confirm, /**< A Firm subgraph was replace because of a Confirmation. */
dbg_gvn_pre, /**< A Firm node was replace because of the GVN-PRE algorithm. */
dbg_combo, /**< A Firm node was replace because of the combo algorithm. */
dbg_cond_eval, /**< A Firm node was replace because of the conditional evaluation algorithm. */
dbg_jumpthreading, /**< A Firm node was replace because of the jumpthreading algorithm. */
dbg_backend, /**< A Firm subgraph was replaced because of a Backend transformation */
dbg_max /**< Maximum value. */
} dbg_action;
......
......@@ -123,7 +123,7 @@ enum firmstat_optimizations_t {
FS_OPT_COMBO_CF, /**< Combo: removed conditional control flow */
FS_OPT_COMBO_FOLLOWER, /**< Combo: replaced a follower */
FS_OPT_COMBO_CONGRUENT, /**< Combo: replaced by congruent */
FS_OPT_COND_EVAL, /**< Conditional evaluation: removed conditional control flow */
FS_OPT_JUMPTHREADING, /**< Jump threading: removed conditional control flow */
FS_OPT_RTS_ABS, /**< RTS optimization: call to abs() replaced */
FS_OPT_RTS_ALLOCA, /**< RTS optimization: call to alloca() replaced */
FS_OPT_RTS_SQRT, /**< RTS optimization: call to sqrt() replaced */
......
......@@ -417,15 +417,15 @@
} while(0)
/**
* Merge the debug info due to a cond eval result.
* Merge the debug info due to a jump threading result.
*
* @param oldn the old control flow node
* @param n the new control flow node replacing oldn
*/
#define DBG_OPT_COND_EVAL(oldn, n) \
#define DBG_OPT_JUMPTHREADING(oldn, n) \
do { \
hook_merge_nodes(&n, 1, &oldn, 1, FS_OPT_COND_EVAL); \
__dbg_info_merge_pair(n, oldn, dbg_cond_eval); \
hook_merge_nodes(&n, 1, &oldn, 1, FS_OPT_JUMPTHREADING); \
__dbg_info_merge_pair(n, oldn, dbg_jumpthreading); \
} while(0)
#endif
......@@ -203,7 +203,7 @@ libfirm_la_SOURCES = \
opt/cfopt.c \
opt/code_placement.c \
opt/combo.c \
opt/condeval.c \
opt/jumpthreading.c \
opt/convopt.c \
opt/critical_edges.c \
opt/escape_ana.c \
......
......@@ -214,8 +214,8 @@ static void remove_empty_block(ir_node *block)
continue;
}
/* we simply kill Pins, because there are some strange interactions
* between condeval, which produce PhiMs with Pins, we simply kill
* the pins here, everything is scheduled anyway */
* between jump threading, which produce PhiMs with Pins, we simply
* kill the pins here, everything is scheduled anyway */
if (is_Pin(node)) {
exchange(node, get_Pin_op(node));
continue;
......
......@@ -69,7 +69,7 @@ const char *dbg_action_2_str(dbg_action a) {
CASE(dbg_opt_confirm);
CASE(dbg_gvn_pre);
CASE(dbg_combo);
CASE(dbg_cond_eval);
CASE(dbg_jumpthreading);
CASE(dbg_backend);
default:
if (a <= dbg_max)
......
......@@ -429,7 +429,7 @@ static tarval *computed_value_Mux(const ir_node *n) {
static tarval *computed_value_Confirm(const ir_node *n) {
/*
* Beware: we might produce Phi(Confirm(x == true), Confirm(x == false)).
* Do NOT optimize them away (CondEval wants them), so wait until
* Do NOT optimize them away (jump threading wants them), so wait until
* remove_confirm is activated.
*/
if (get_opt_remove_confirm()) {
......
......@@ -1964,7 +1964,7 @@ static void compute_Unknown(node_t *node) {
* It would be safe to compute Top IF it can be assured, that only Cmp
* nodes are inputs to Conds. We check that first.
* This is the way Frontends typically build Firm, but some optimizations
* (cond_eval for instance) might replace them by Phib's...
* (jump threading for instance) might replace them by Phib's...
*/
node->type.tv = tarval_UNKNOWN;
} /* compute_Unknown */
......
......@@ -430,7 +430,7 @@ static ir_node *find_const_or_confirm(jumpthreading_env_t *env, ir_node *jump,
DB((
dbg, LEVEL_1,
"> Found condition evaluation candidate %+F->%+F\n",
"> Found jump threading candidate %+F->%+F\n",
env->true_block, block
));
......@@ -496,7 +496,7 @@ static ir_node *find_candidate(jumpthreading_env_t *env, ir_node *jump,
DB((
dbg, LEVEL_1,
"> Found condition evaluation candidate %+F->%+F\n",
"> Found jump threading candidate %+F->%+F\n",
env->true_block, block
));
......@@ -671,7 +671,7 @@ static void thread_jumps(ir_node* block, void* data)
} else if (selector_evaluated == 1) {
dbg_info *dbgi = get_irn_dbg_info(selector);
ir_node *jmp = new_rd_Jmp(dbgi, get_nodes_block(projx));
DBG_OPT_COND_EVAL(projx, jmp);
DBG_OPT_JUMPTHREADING(projx, jmp);
exchange(projx, jmp);
*changed = 1;
return;
......
......@@ -140,7 +140,7 @@ static const struct {
{ FS_OPT_COMBO_CF, "Combo: removed conditional control flow" },
{ FS_OPT_COMBO_FOLLOWER, "Combo: removed a follower" },
{ FS_OPT_COMBO_CONGRUENT,"Combo: replaced by congruent" },
{ FS_OPT_COND_EVAL, "Conditional evaluation: removed conditional control flow" },
{ FS_OPT_JUMPTHREADING, "Jump threading: removed conditional control flow" },
{ FS_OPT_RTS_ABS, "RTS optimization: call to abs() replaced" },
{ FS_OPT_RTS_ALLOCA, "RTS optimization: call to alloca() replaced" },
{ FS_OPT_RTS_SQRT, "RTS optimization: call to sqrt() replaced" },
......
......@@ -5068,7 +5068,7 @@
>
</File>
<File
RelativePath="..\ir\opt\condeval.c"
RelativePath="..\ir\opt\jumpthreading.c"
>
</File>
<File
......
......@@ -91,7 +91,7 @@ ir\opt\proc_cloning.h
ir\opt\opt_confirms.h
ir\opt\opt_frame.h
ir\opt\opt_osr.h
ir\opt\condeval.h
ir\opt\jumpthreading.h
ir\tr\entity.h
ir\tr\mangle.h
......
......@@ -5,17 +5,17 @@
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=libfirm - Win32 Debug
!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "libfirm.mak".
!MESSAGE
!MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben
!MESSAGE Sie knnen beim Ausfhren von NMAKE eine Konfiguration angeben
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "libfirm.mak" CFG="libfirm - Win32 Debug"
!MESSAGE
!MESSAGE Fr die Konfiguration stehen zur Auswahl:
!MESSAGE Fr die Konfiguration stehen zur Auswahl:
!MESSAGE
!MESSAGE "libfirm - Win32 Release" (basierend auf "Win32 (x86) Static Library")
!MESSAGE "libfirm - Win32 Debug" (basierend auf "Win32 (x86) Static Library")
......@@ -2091,7 +2091,7 @@ SOURCE=..\ir\opt\code_placement.c
# End Source File
# Begin Source File
SOURCE=..\ir\opt\condeval.c
SOURCE=..\ir\opt\jumpthreading.c
# End Source File
# Begin Source File
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment