* Replace Sel nodes by address computation. Also resolves array access.
* Handle bit fields by added And/Or calculations.
*
+ * @param irg the graph to lower
+ *
+ * @note: There is NO lowering ob objects oriented types. This is highly compiler
+ * and ABI specific and should be placed directly in the compiler.
+ */
+void lower_highlevel_graph(ir_graph *irg);
+
+/**
+ * Replaces SymConsts by a real constant if possible.
+ * Replace Sel nodes by address computation. Also resolves array access.
+ * Handle bit fields by added And/Or calculations.
+ * Lowers all graphs.
+ *
* @Note: There is NO lowering ob objects oriented types. This is highly compiler
* and ABI specific and should be placed directly in the compiler.
*/
* Replace Sel nodes by address computation. Also resolves array access.
* Handle Bitfields by added And/Or calculations.
*/
-void lower_highlevel(void) {
+void lower_highlevel_graph(ir_graph *irg) {
int i, n;
n = get_irp_n_irgs();
/* Finally: lower SymConst-Size and Sel nodes, Casts, unaligned Load/Stores. */
irg_walk_graph(irg, NULL, lower_irnode, NULL);
-
set_irg_phase_low(irg);
}
} /* lower_highlevel */
+
+/*
+ * Replaces SymConsts by a real constant if possible.
+ * Replace Sel nodes by address computation. Also resolves array access.
+ * Handle Bitfields by added And/Or calculations.
+ */
+void lower_highlevel(void) {
+ int i, n;
+
+ n = get_irp_n_irgs();
+ for (i = 0; i < n; ++i) {
+ ir_graph *irg = get_irp_irg(i);
+ lower_highlevel_graph(irg);
+ }
+} /* lower_highlevel */