/*
- * Copyright (C) 1995-2007 University of Karlsruhe. All right reserved.
+ * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved.
*
* This file is part of libFirm.
*
basemode = mode_P_data;
assert(basemode && "no mode for lowering Sel");
- assert((get_mode_size_bytes(basemode) != -1) && "can not deal with unorthodox modes");
+ assert((get_mode_size_bits(basemode) % 8 == 0) && "can not deal with unorthodox modes");
index = get_Sel_index(sel, 0);
if (is_Array_type(owner)) {
* Replace Sel nodes by address computation. Also resolves array access.
* Handle Bitfields by added And/Or calculations.
*/
-void lower_highlevel_graph(ir_graph *irg) {
- /* First step: lower bitfield access: must be run as long as Sels still exists. */
- irg_walk_graph(irg, NULL, lower_bf_access, NULL);
+void lower_highlevel_graph(ir_graph *irg, int lower_bitfields) {
+
+ if(lower_bitfields) {
+ /* First step: lower bitfield access: must be run as long as Sels still
+ * exists. */
+ irg_walk_graph(irg, NULL, lower_bf_access, NULL);
+ }
/* Finally: lower SymConst-Size and Sel nodes, Casts, unaligned Load/Stores. */
irg_walk_graph(irg, NULL, lower_irnode, NULL);
* Replace Sel nodes by address computation. Also resolves array access.
* Handle Bitfields by added And/Or calculations.
*/
-void lower_highlevel(void) {
+void lower_highlevel(int lower_bitfields) {
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_graph(irg, lower_bitfields);
}
} /* lower_highlevel */