Commit graph

6 commits

Author SHA1 Message Date
Eric Anholt
e33c10328c Merge remote branch 'cworth/master'
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.
2010-06-24 15:13:03 -07:00
Eric Anholt
9ca0a022e6 Quiet unused arg warning for ir_constant cloning. 2010-06-24 13:32:35 -07:00
Eric Anholt
5f38408833 Move ir_constant cloning alongside the other cloning functions. 2010-06-24 13:32:35 -07:00
Eric Anholt
1b2bcf7913 Fix variable remapping in function cloning.
It's (ht, data, key) not (ht, key, data).
2010-06-24 13:32:35 -07:00
Carl Worth
1660a29547 exec_node: Add new talloc-based new()
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!
2010-06-23 18:59:35 -07:00
Eric Anholt
4b6fd39c89 Add a virtual clone() method to ir_instruction.
This will be used by function inlining, the linker, and avoiding double
usage of the LHS deref chains in ++, *=, and similar operations.
2010-06-23 15:20:29 -07:00