On Wed, Jun 29, 2011 at 12:56 AM, James Molloy <james.molloy at arm.com> wrote:> Hi Timothy, > > LLVM cannot remove the malloc calls, as malloc() has a sideeffect and that > would be changing the behaviour of the program.Wrong; LLVM can and will remove calls to malloc(). There isn't any way for a program to observe whether a particular malloc() call runs. -Eli