Age | Commit message (Collapse) | Author |
|
Conflicts:
ast_to_hir.cpp
ir.cpp
This brings in the talloc-based memory management work, so that the
compiler (almost) no longer leaks memory.
|
|
|
|
I ripped it out with the cloning changes yesterday, and should have
tested and noticed that there were now returns all over.
|
|
And fix all callers to use the tallbac-based new for exec_node
construction. We make ready use of talloc_parent in order to get
valid, (and appropriate) talloc owners for everything we construct
without having to add new 'ctx' parameters up and down all the call
trees.
This closes the majority of the memory leaks in the
glsl-orangebook-ch06-bump.frag test:
total heap usage: 55,623 allocs, 42,672 frees
(was 14,533 frees)
Now 76.7% leak-free. Woo-hoo!
|
|
This will be used by function inlining, the linker, and avoiding double
usage of the LHS deref chains in ++, *=, and similar operations.
|
|
|
|
|
|
|
|
This was detected by valgrind. I think GCC still does the right
thing, but the C++ spec allows the compiler to do something
stupid... like crash or only delete the first entry in the array.
|
|
|
|
|
|
Move the accept method for visitors from ir_dereference to the derived
classes.
|
|
Create separate subclasses of ir_dereference for variable, array, and
record dereferences. As a side effect, array and record dereferences
no longer point to ir_variable objects directly. Instead they each
point to an ir_dereference_variable object.
This is the first of several steps in the refactoring process. The
intention is that ir_dereference will eventually become an abstract
base class.
|
|
|
|
This caused a nasty bug where the function inliner would create new
variables for each of the formal parameters, but the body would still
reference the old copies.
This was highly visible since the dead code eliminator (rightly) removed
the new declarations, leading to printed IR that referenced non-existent
variable names.
|
|
|
|
|
|
|
|
We still don't inline for control flow in the inlined function, and we
don't have any limits on what we will inline.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|