/**
* must be called from peephole optimisations before a node will be killed
* and its users will be redirected to new_node.
- * so bepeephole can update it's internal state.
+ * so bepeephole can update its internal state.
*
- * Note: killing a node and rewiring os only allowed if new_node produces
+ * Note: killing a node and rewiring is only allowed if new_node produces
* the same registers as old_node.
*/
static void be_peephole_before_exchange(const ir_node *old_node,
pred_offs = be_get_IncSP_offset(pred);
curr_offs = be_get_IncSP_offset(node);
-
- if (pred_offs == BE_STACK_FRAME_SIZE_EXPAND) {
- if (curr_offs != BE_STACK_FRAME_SIZE_SHRINK) {
- return node;
- }
- offs = 0;
- } else if (pred_offs == BE_STACK_FRAME_SIZE_SHRINK) {
- if (curr_offs != BE_STACK_FRAME_SIZE_EXPAND) {
- return node;
- }
- offs = 0;
- } else if (curr_offs == BE_STACK_FRAME_SIZE_EXPAND ||
- curr_offs == BE_STACK_FRAME_SIZE_SHRINK) {
- return node;
- } else {
- offs = curr_offs + pred_offs;
- }
+ offs = curr_offs + pred_offs;
/* add node offset to pred and remove our IncSP */
be_set_IncSP_offset(pred, offs);
xfree(register_values);
}
-BE_REGISTER_MODULE_CONSTRUCTOR(be_init_peephole);
+BE_REGISTER_MODULE_CONSTRUCTOR(be_init_peephole)
void be_init_peephole(void)
{
FIRM_DBG_REGISTER(dbg, "firm.be.peephole");