#include "printer.h"
#include "entitymap_t.h"
#include "driver/firm_opt.h"
-#include "driver/firm_cmdline.h"
typedef struct trampoline_region trampoline_region;
struct trampoline_region {
ir_entity *region; /**< created region for the trampoline */
};
+fp_model_t firm_fp_model = fp_model_precise;
+
static const backend_params *be_params;
static ir_type *ir_type_char;
if (pos == NULL)
return NULL;
if (line != NULL)
- *line = pos->linenr;
+ *line = pos->lineno;
return pos->input_name;
}
}
/* is the current block a reachable one? */
-static bool currently_reachable()
+static bool currently_reachable(void)
{
- ir_node *block = get_cur_block();
- if (block == NULL || is_Bad(block))
- return false;
- else
- return true;
+ ir_node *const block = get_cur_block();
+ return block != NULL && !is_Bad(block);
}
-static void set_unreachable_now()
+static void set_unreachable_now(void)
{
- ir_node *bad = new_Bad(mode_BB);
- set_cur_block(bad);
+ set_cur_block(NULL);
}
static ir_mode *atomic_modes[ATOMIC_TYPE_LAST+1];
* reachable. */
static void jump_if_reachable(ir_node *const target_block)
{
- if (currently_reachable()) {
- add_immBlock_pred(target_block, new_Jmp());
- }
+ ir_node *const pred = currently_reachable() ? new_Jmp() : new_Bad(mode_X);
+ add_immBlock_pred(target_block, pred);
}
static void while_statement_to_firm(while_statement_t *statement)
default_proj_nr = l->last_case;
}
- if (default_proj_nr == INT_MAX) {
+ if (default_proj_nr == LONG_MAX) {
/* Bad: an overflow will occur, we cannot be sure that the
* maximum + 1 is a free number. Scan the values a second
* time to find a free number.
ir_graph *old_current_function = current_function;
current_function = irg;
- set_irg_fp_model(irg, firm_opt.fp_model);
+ set_irg_fp_model(irg, firm_fp_model);
tarval_enable_fp_ops(1);
set_irn_dbg_info(get_irg_start_block(irg),
get_entity_dbg_info(function_entity));