The attached patch improves the interaction between GlobalOpt and leak checkers. One of the things that GlobalOpt will do is delete all the stores to a global that isn't loaded. If for some reason we don't mop up the malloc/new which was being stored in that global, a leak checker will complain.<div>

<br></div><div>The patch handles this by not deleting stores to globals in the above case, when the global is known to be a pointer type, or a composite type that contains one. We do delete stores of Constant, since those are trivially not derived from calling an allocator. There's more analysis we could do here to win back optimization if it turns out to be really important.</div>

<div><br></div><div>Please review!</div><div><br></div><div>Nick</div><div><br></div>