Bugzilla – Bug 192
[X86] X86 Backend never releases memory for machine code structures
Last modified: 2003-12-21 21:55:09
You need to log in before you can comment on or make changes to this bug.
The X86 backend never frees memory for MachineInstr, MachineBasicBlock, MachineFunction, etc objects, even after it has emitted the function or whatever ot memory or the .s file. This is silly. -Chris
This is now fixed. Here are the patches: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031215/010390.html http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031215/010392.html http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031215/010393.html While I was at it, I fixed this minor memory leak. I wish MachineInstr's used ilists. :( http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031215/010389.html Also, this permits removing this FIXME from the JIT: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031215/010391.html It appears that the Sparc code generator is not freeing MachineFunction objects, but is freeing most of the other gunk. I've emailed Misha a proposed fix for test. -Chris
Misha has tested Chris' suggested fix and committed it: http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20031215/010408.html
Thanks Misha! -Chris