[llvm-commits] [llvm] r53212 - in /llvm/trunk: include/llvm/CodeGen/ lib/CodeGen/ lib/CodeGen/SelectionDAG/ lib/Target/ARM/ lib/Target/Alpha/ lib/Target/CellSPU/ lib/Target/IA64/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/Target/X86/

Chris Lattner clattner at apple.com
Wed Jul 9 23:33:33 PDT 2008


On Jul 7, 2008, at 4:14 PM, Dan Gohman wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=53212&view=rev
> Log:
> Pool-allocation for MachineInstrs, MachineBasicBlocks, and
> MachineMemOperands. The pools are owned by MachineFunctions.
>
> This drastically reduces the number of calls to malloc/free made
> during the "Emit" phase of scheduling, as well as later phases
> in CodeGen. Combined with other changes, this speeds up the
> "instruction selection" phase of CodeGen by 10% in some cases.

Very nice Dan, this is great work!

> /// TID NULL and no operands.
> MachineInstr::MachineInstr()
>   : TID(0), NumImplicitOps(0), Parent(0) {
> -  // Make sure that we get added to a machine basicblock
> -  LeakDetector::addGarbageObject(this);
> }

Are you sure you want to disable the leak detector?  I realize that  
"leaks" won't actually leak memory (they will get freed when the  
function is done) but this sort of thing can indicate a serious logic  
error and can turn into a "leak" in the garbage collected sense.

-Chris



More information about the llvm-commits mailing list