While we don't currently rewrite the hints on manually hot/cold hinted allocations, enable optionally matching profiles onto those allocations as a first step to being able to do this. By explicitly checking whether the library function is in the list of operator new also fixes one limitation of the prior call to isNewLikeFn. Some operator new calls (those that specify nothrow) are considered Malloc-like because they may return null. We want to be able to match and rewrite these. Therefore the new test uses a nothrow variant to test the fix for this as well.
36 KiB
36 KiB