+ir_node *be_get_end_of_block_insertion_point(const ir_node *block)
+{
+ ir_node *last = sched_last(block);
+
+ /* we might have projs and keepanys behind the jump... */
+ while(is_Proj(last) || be_is_Keep(last)) {
+ last = sched_prev(last);
+ assert(!sched_is_end(last));
+ }
+
+ if(!is_cfop(last)) {
+ last = sched_next(last);
+ /* last node must be a cfop, only exception is the start block */
+ assert(last == get_irg_start_block(get_irn_irg(block)));
+ }
+
+ /* add the reload before the (cond-)jump */
+ return last;
+}
+