#ifndef FIRM_IR_IROPT_T_H
#define FIRM_IR_IROPT_T_H
+#include <stdbool.h>
#include "irop_t.h"
#include "iropt.h"
#include "irnode_t.h"
/** Visit each node in the value table of a graph. */
void visit_all_identities(ir_graph *irg, irg_walk_func visit, void *env);
+/**
+ * Normalize a node by putting constants (and operands with larger
+ * node index) on the right (operator side).
+ *
+ * @param n The node to normalize
+ */
+void ir_normalize_node(ir_node *n);
+
ir_node *optimize_node(ir_node *n);
ir_node *optimize_in_place_2(ir_node *n);
/**
* Returns the associated tarval of a node.
*/
-static INLINE tarval *
+static inline tarval *
value_of(const ir_node *n) {
return value_of_ptr(n);
}
*/
ir_op_ops *firm_set_default_operations(ir_opcode code, ir_op_ops *ops);
+/**
+ * Returns true if a == -b
+ */
+bool is_negated_value(ir_node *a, ir_node *b);
+
#endif