[all-commits] [llvm/llvm-project] 0129cd: Use deref facts derived from minimum object size o...
Philip Reames via All-commits
all-commits at lists.llvm.org
Thu Dec 3 15:05:49 PST 2020
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0129cd503575076556935a16f458b0a3c2e30646
https://github.com/llvm/llvm-project/commit/0129cd503575076556935a16f458b0a3c2e30646
Author: Philip Reames <listmail at philipreames.com>
Date: 2020-12-03 (Thu, 03 Dec 2020)
Changed paths:
M llvm/lib/Analysis/Loads.cpp
M llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll
Log Message:
-----------
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
More information about the All-commits
mailing list