summaryrefslogtreecommitdiffstats
path: root/ir.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-04-07 13:19:11 -0700
committerIan Romanick <[email protected]>2010-04-07 17:23:23 -0700
commit894ea972a4defdaafeaa3a248c113b06c7ae0c7e (patch)
tree2efd3473b4375e0ee1ea2714f7530f590054a7aa /ir.h
parentf1ddca9f2143e377d2a70941dcedbb1f5c699e07 (diff)
Put function bodies under function signatures, instead of flat in the parent.
This will let us know the length of function bodies for the purpose of inlining (among other uses).
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/ir.h b/ir.h
index 7ae5e3b952a..95991c013fa 100644
--- a/ir.h
+++ b/ir.h
@@ -170,7 +170,7 @@ public:
class ir_label : public ir_instruction {
public:
- ir_label(const char *label);
+ ir_label(const char *label, ir_function_signature *signature);
virtual void accept(ir_visitor *v)
{
@@ -178,11 +178,16 @@ public:
}
const char *label;
+
+ ir_function_signature *signature;
};
/*@{*/
class ir_function_signature : public ir_instruction {
+ /* An ir_function_signature will be part of the list of signatures in
+ * an ir_function.
+ */
public:
ir_function_signature(const glsl_type *return_type);
@@ -216,6 +221,9 @@ public:
*/
ir_label *definition;
+ /** Body of instructions in the function. */
+ struct exec_list body;
+
private:
/** Function of which this signature is one overload. */
class ir_function *function;