HomePhabricator

Use deref facts derived from minimum object size of allocations

Authored by reames on Dec 3 2020, 2:58 PM.

Description

Use deref facts derived from minimum object size of allocations

This change should be fairly straight forward. If we've reached a call, check to see if we can tell the result is dereferenceable from information about the minimum object size returned by the call.

To control compile time impact, I'm only adding the call for base facts in the routine. getObjectSize can also do recursive reasoning, and we don't want that general capability here.

As a follow up patch (without separate review), I will plumb through the missing TLI parameter. That will have the effect of extending this to known libcalls - malloc, new, and the like - whereas currently this only covers calls with the explicit allocsize attribute.

Differential Revision: https://reviews.llvm.org/D90341

Details

Committed
reamesDec 3 2020, 3:01 PM
Differential Revision
D90341: Use deref facts derived from minimum object size of allocations
Parents
rGba2612ce01ea: [HIP] cmath demote long double args to double
Branches
Unknown
Tags
Unknown