Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. /* Find loop header */
  2. unsigned start_idx = loop_header_indices.top();
  3.  
  4. /* Copy all contexts that came before the loop header */
  5. NOP_ctx_gfx10 loop_ctx[i];
  6. for (unsigned idx = 0; idx < start_idx; idx++)
  7. loop_ctx[idx] = all_ctx[idx];
  8.  
  9. /* Start the loop with the context from the end of the loop */
  10. loop_ctx[start_idx] = ctx;
  11.  
  12. /* Go through the whole loop again with the new context */
  13. for (unsigned idx = start_idx; idx < i; idx++) {
  14. NOP_ctx_gfx10 &loop_block_ctx = loop_ctx[idx];
  15.  
  16. for (unsigned b : program->blocks[idx].linear_preds)
  17. ctx.join(loop_ctx[b]);
  18.  
  19. handle_block_gfx10(loop_block_ctx, program->blocks[idx]);
  20. }
  21. loop_header_indices.pop();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement