[ValueTracking] Make getStringLenth aware of strdup
authorserge-sans-paille <sguelton@redhat.com>
Mon, 11 Apr 2022 11:38:31 +0000 (13:38 +0200)
committerserge-sans-paille <sguelton@redhat.com>
Tue, 12 Apr 2022 12:47:29 +0000 (14:47 +0200)
commite810d558093cff40caaa1aff24d289c76c59916d
tree7f58e9c2fab8bce98123adcf2f84545256f3e57d
parent0231a90bc438f728c81087520d8d5d85101ed05b
[ValueTracking] Make getStringLenth aware of strdup

During strlen compile-time evaluation, make it possible to track size of
strduped strings.

Differential Revision: https://reviews.llvm.org/D123497
llvm/include/llvm/Analysis/ValueTracking.h
llvm/lib/Analysis/MemoryBuiltins.cpp
llvm/lib/Analysis/ValueTracking.cpp
llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp
llvm/test/Transforms/InstCombine/strlen-1.ll