summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2010-04-21 12:30:22 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-04-21 15:36:36 -0700
commit9fa99f3b6c84fe927ba97e6584cd919f097a6c9a (patch)
tree453be040c7a1948bbb4d9eadbac8ad8ba8c887cd /ir.h
parentf96c52ba2e290e3ba5f14cd7f87ba5b4382a1785 (diff)
Refactor IR function representation.
Now, ir_function is emitted as part of the IR instructions, rather than simply existing in the symbol table. Individual ir_function_signatures are not emitted themselves, but only as part of ir_function.
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/ir.h b/ir.h
index 504cffb..0d5b2e4 100644
--- a/ir.h
+++ b/ir.h
@@ -204,6 +204,10 @@ public:
/*@{*/
+/**
+ * The representation of a function instance; may be the full definition or
+ * simply a prototype.
+ */
class ir_function_signature : public ir_instruction {
/* An ir_function_signature will be part of the list of signatures in
* an ir_function.
@@ -236,10 +240,8 @@ public:
*/
struct exec_list parameters;
- /**
- * Pointer to the label that begins the function definition.
- */
- ir_label *definition;
+ /** Whether or not this function has a body (which may be empty). */
+ unsigned is_defined:1;
/** Body of instructions in the function. */
struct exec_list body;
@@ -253,7 +255,9 @@ private:
/**
- * Header for tracking functions in the symbol table
+ * Header for tracking multiple overloaded functions with the same name.
+ * Contains a list of ir_function_signatures representing each of the
+ * actual functions.
*/
class ir_function : public ir_instruction {
public: