summaryrefslogtreecommitdiff
path: root/ir_print_visitor.cpp
AgeCommit message (Collapse)Author
2010-05-01Use %p rather than %08x when printing pointers to fix compile.Kenneth Graunke
2010-04-28Track and print user defined structure typesIan Romanick
2010-04-28IR print visitor: Move logic for printing the whole program to _mesa_print_irIan Romanick
2010-04-28IR print visitor: Just print the name of structuresIan Romanick
Treat structure types like other non-array types. We'll have to print the structure defintion elsewhere.
2010-04-28Move array of operator strings out of ir_print_visitor.cpp.Kenneth Graunke
Also implement a reverse-lookup function for use in the IR reader.
2010-04-28ir_print_visitor: Re-parenthesize ir_call output.Kenneth Graunke
2010-04-28ir_print_visitor: Print return type of ir_function_signatures.Kenneth Graunke
2010-04-28ir_print_visitor: Print (constant bool (1)) instead of "true"Kenneth Graunke
It might be better to simply handle "true" in the reader, but since booleans normally aren't printed as "true" or "false", we may as well go for consistency.
2010-04-28ir_print_visitor: Remove unnecessary parens around expression operands.Kenneth Graunke
2010-04-28ir_print_visitor: Remove unnecessary parens around array size in types.Kenneth Graunke
2010-04-28ir_print_visitor: Fix unclosed parenthesis in (call...Kenneth Graunke
2010-04-28ir_print_visitor: Fix unclosed parenthesis in (assign ...Kenneth Graunke
Also remove useless parens around subexpressions.
2010-04-28ir_print_visitor: Remove unnecessary parenthesis around variable names.Kenneth Graunke
2010-04-28ir_print_visitor: print the type of expressions.Kenneth Graunke
This can be useful for debugging - it allows us to see that the inferred type is what we think it should be. Furthermore, it will allow the IR reader to avoid complex, operator-specific type inference.
2010-04-28ir_print_visitor: Remove unnecessary parenthesis around type names.Kenneth Graunke
Parenthesis should only be present for compound types (i.e. arrays or structures). For atomic types, simply print the symbol.
2010-04-28Print full type for ir_constant instead of base and component count.Kenneth Graunke
vec4 and mat2x2 have the same base type and number of components; printing the full type allows us to distinguish the two.
2010-04-21Remove ir_label since it is no longer used.Kenneth Graunke
2010-04-21Refactor IR function representation.Kenneth Graunke
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.
2010-04-07Make function bodies rely on the parameter variable declarations.Eric Anholt
Previously, generating inlined function bodies was going to be difficult, as there was no mapping between the body's declaration of variables where parameter values were supposed to live and the parameter variables that a caller would use in paramater setup. Presumably this also have been a problem for actual codegen.
2010-04-07Put function bodies under function signatures, instead of flat in the parent.Eric Anholt
This will let us know the length of function bodies for the purpose of inlining (among other uses).
2010-04-07Add some newlines when printing ir_loop instructionsIan Romanick
2010-04-07Add ir_loop_jump to represent 'break' and 'continue' in loopsIan Romanick
2010-04-07Add ir_loop to represent loopsIan Romanick
This touches a lot of files because everything derived from ir_visitor has to be updated. This is the primary disadvantage of the visitor pattern.
2010-04-06Add some linebreaks in the ir_print_visitor of if statement bodies.Eric Anholt
2010-04-02Add bool/int conversion as IR operations.Eric Anholt
Fixes constructor-09.glsl and CorrectParse2.frag.
2010-04-02Add conversion of bool to float as an IR operation to match int to float.Eric Anholt
2010-04-02Remove fake ir_binop_logic_not. I think you meant ir_unop_logic_not.Eric Anholt
2010-03-29Implement ir_if (for if-statments) and conversion from ASTIan Romanick
The following tests now pass: glslparsertest/shaders/if1.frag glslparsertest/shaders/if2.frag The following tests that used to pass now fail. It appears that most of these fail because ast_nequal and ast_equal are not converted to HIR. shaders/glsl-unused-varying.frag shaders/glsl-fs-sqrt-branch.frag
2010-03-29Implement exp2() and log2(), and make ir_unop_exp and ir_unop_log be base e.Eric Anholt
Making the base e functions IR operations is not a clear win. i965 doesn't support it, it doesn't look like r600 supports it, but r500 does. It should be easily supportable as a lowering pass, though.
2010-03-29Add sqrt() builtin as an IR operation.Eric Anholt
Following a discussion in #dri-devel, I think this makes more sense than implementing it as RSQ RCP CMP as Mesa did. The i965 has a hardware sqrt that should work, and AMD is suppposed to be able to implement it as RSQ RCP with an alternate floating point mode so that the 0.0 case is handled like we want.
2010-03-29Add builtin pow() function.Eric Anholt
2010-03-26IR print visitor: Print out something for the operator.Eric Anholt
2010-03-26IR print visitor: Print expressions a little betterIan Romanick
2010-03-26IR print visitor: print function callsIan Romanick
2010-03-26Add glsl_type::components to query total number of components in a typeIan Romanick
2010-03-26Move swizzles out of ir_dereference and into their own class.Kenneth Graunke
Also turn generate_swizzle into a static "create" method of the new class; we'll want to use it for the IR reader as well. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-26Add new abstract ir_rvalue class; rework accordingly.Kenneth Graunke
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-25IR print visitor: Finish printing constantsIan Romanick
2010-03-25IR print visitor: Remove most of the newlines from the printed outputIan Romanick
This makes it a lot easier to read... if you have a really wide display.
2010-03-25IR print visitor: print expressionsIan Romanick
Not quite complete. The operator is not yet printed.
2010-03-25IR print visitor: print ir_dereference instructionsIan Romanick
Also make a slight change to ir_variable. The ir_dereference tracks the number of nested dereferences. If an ir_variable is visited and the count is non-zero, just print the name of the variable.
2010-03-25IR print visitor: Less newlines when printing ir_variablesIan Romanick
2010-03-19Implement IR return instructionsIan Romanick
2010-03-11Add ir_call call to represent function calls.Ian Romanick
2010-03-09IR print visitor: Add some support for printing types and constantsIan Romanick
2010-03-09IR print visitor: Print assignmentsIan Romanick
2010-03-09IR visitor: Add initial version of ir_visitor classesIan Romanick
The ir_visitor class is the abstract base class for all visitors. ir_print_visitor contains the beginnings of a concrete visitor class that will print out an IR sequence in a Lisp / Scheme-like syntax.