On Oct 19, 2007, at 1:36 AM, Duncan Sands wrote: > Hi Devang, > >>>> Do not raise free() call that is called through invoke instruction. >> >>> why not? As far as I know free cannot raise an exception, >> >> If this is guaranteed then raiseallocs needs to do cleanup and break >> link between bb with inovke [EMAIL PROTECTED](..) and corresponding unwind >> block >> (remove PHI nodes' incoming edge). > > it is not clear to me whether we are allowed to assume that free is > the > standard C free (likewise for malloc). If we are, then I think it > would > be better to raise calls to them, fixing up the unwind edge if they > were > invokes.
In general, we want to limit this. However, raiseallocations in general assumes that malloc and free are builtins. Something like - fbuiltins should not run the pass. I think it would be safe for it to raise an invoke of malloc or free into a call, simply deleting the unwind edge. -Chris _______________________________________________ llvm-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
