[PATCH] D19469: [TLI] Unify LibFunc signature checking. NFCI.

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 24 18:13:04 PDT 2016


There is no *if*. The data layout is not optional on the Module. There is always one.

> On Apr 24, 2016, at 5:52 PM, Ahmed Bougacha <ahmed.bougacha at gmail.com> wrote:
> 
> ab updated this revision to Diff 54816.
> ab added a comment.
> 
>> Well either the Caller of `getLibFunc` supplies it or there should be some "doInitialization()` like every pass?
> 
> 
> How about this: get the DataLayout from the function's parent, if it has one. Otherwise, default to isIntegerTy()?
> 
> 
> http://reviews.llvm.org/D19469
> 
> Files:
>  include/llvm/Analysis/TargetLibraryInfo.h
>  lib/Analysis/BasicAliasAnalysis.cpp
>  lib/Analysis/MemoryLocation.cpp
>  lib/Analysis/TargetLibraryInfo.cpp
>  lib/Analysis/ValueTracking.cpp
>  lib/Transforms/IPO/GlobalOpt.cpp
>  lib/Transforms/IPO/InferFunctionAttrs.cpp
>  lib/Transforms/Utils/SimplifyLibCalls.cpp
> 
> <D19469.54816.patch>



More information about the llvm-commits mailing list