Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Find loop header */
- unsigned start_idx = loop_header_indices.top();
- /* Copy all contexts that came before the loop header */
- NOP_ctx_gfx10 loop_ctx[i];
- for (unsigned idx = 0; idx < start_idx; idx++)
- loop_ctx[idx] = all_ctx[idx];
- /* Start the loop with the context from the end of the loop */
- loop_ctx[start_idx] = ctx;
- /* Go through the whole loop again with the new context */
- for (unsigned idx = start_idx; idx < i; idx++) {
- NOP_ctx_gfx10 &loop_block_ctx = loop_ctx[idx];
- for (unsigned b : program->blocks[idx].linear_preds)
- ctx.join(loop_ctx[b]);
- handle_block_gfx10(loop_block_ctx, program->blocks[idx]);
- }
- loop_header_indices.pop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement