diff options
author | Ian Romanick <[email protected]> | 2010-04-05 18:07:27 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-04-07 11:42:36 -0700 |
commit | 8c46ed24906ee10dd2f2cfaf4cf9803eca1ba523 (patch) | |
tree | 71eac354c7f81b6811f2dbbbc471e9b7353881f2 /ast.h | |
parent | 4cf20cd37c12c6243a09d52739d3d47f030a1799 (diff) |
Generate correct IR for do-while loops
Previously the same code was generated for a while loop and a do-while
loop. This pulls the code that generates the conditional break into a
separate method. This method is called either at the beginning or the
end depending on the loop type.
Reported-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'ast.h')
-rw-r--r-- | ast.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -572,6 +572,15 @@ public: ast_expression *rest_expression; ast_node *body; + +private: + /** + * Generate IR from the condition of a loop + * + * This is factored out of ::hir because some loops have the condition + * test at the top (for and while), and others have it at the end (do-while). + */ + void condition_to_hir(class ir_loop *, struct _mesa_glsl_parse_state *); }; |