class loop_terminator *insert(ir_if *);
- /**
- * Loop whose variable state is being tracked by this structure
- */
- ir_loop *loop;
-
/**
* Variables that have not yet been classified
*/
{
hash_table_dtor(this->var_hash);
}
+
+ static void* operator new(size_t size, void *ctx)
+ {
+ void *lvs = ralloc_size(ctx, size);
+ assert(lvs != NULL);
+
+ ralloc_set_destructor(lvs, (void (*)(void*)) destructor);
+
+ return lvs;
+ }
+
+private:
+ static void
+ destructor(loop_variable_state *lvs)
+ {
+ lvs->~loop_variable_state();
+ }
};
void *mem_ctx;
- friend class loop_analysis;
+ friend loop_state *analyze_loop_variables(exec_list *instructions);
};
#endif /* LOOP_ANALYSIS_H */