Skip to content
Snippets Groups Projects
  • Jonathan Wakely's avatar
    6ea6c497
    Add new/delete to struct occurence · 6ea6c497
    Jonathan Wakely authored
    This adds an example how to use new/delete operators to pool
    allocated objects.
    
    2020-06-04  Jonathan Wakely  <jwakely@redhat.com>
    
    	* alloc-pool.h (object_allocator::remove_raw): New.
    	* tree-ssa-math-opts.c (struct occurrence): Use NSMDI.
    	(occurrence::occurrence): Add.
    	(occurrence::~occurrence): Likewise.
    	(occurrence::new): Likewise.
    	(occurrence::delete): Likewise.
    	(occ_new): Remove.
    	(insert_bb): Use new occurence (...) instead of occ_new.
    	(register_division_in): Likewise.
    	(free_bb): Use delete occ instead of manually removing
    	from the pool.
    6ea6c497
    History
    Add new/delete to struct occurence
    Jonathan Wakely authored
    This adds an example how to use new/delete operators to pool
    allocated objects.
    
    2020-06-04  Jonathan Wakely  <jwakely@redhat.com>
    
    	* alloc-pool.h (object_allocator::remove_raw): New.
    	* tree-ssa-math-opts.c (struct occurrence): Use NSMDI.
    	(occurrence::occurrence): Add.
    	(occurrence::~occurrence): Likewise.
    	(occurrence::new): Likewise.
    	(occurrence::delete): Likewise.
    	(occ_new): Remove.
    	(insert_bb): Use new occurence (...) instead of occ_new.
    	(register_division_in): Likewise.
    	(free_bb): Use delete occ instead of manually removing
    	from the pool.