[LLVMdev] General questions about PassManager and the removed SimplifyLibraryCalls pass
Dan Liew
dan at su-root.co.uk
Tue Apr 15 09:22:27 PDT 2014
Sorry for not replying earlier. I recently just switched my e-mail
account and I noticed there were several e-mails I haven't replied to
during migration.
On 10 April 2014 21:48, Meador Inge <meadori at codesourcery.com> wrote:
> On 04/04/2014 09:13 PM, Daniel Liew wrote:
>
>> 2. I recently noticed that the SimplifyLibraryCallsPass was removed
>> and according to the LLVM3.4 release notes its functionality is now in
>> "instruction combiner and function attribute marking passes". I was
>> wondering, which function attributes passes were meant?
>
> The "functionattrs" pass. See 'lib/Transforms/IPO/FunctionAttrs.cpp'.
Oh I thought you meant TargetLibraryInfo because it is used by the opt
tool to disable simplification of library calls, like so...
PassManager Passes;
// Add an appropriate TargetLibraryInfo pass for the module's triple.
TargetLibraryInfo *TLI = new TargetLibraryInfo(Triple(M->getTargetTriple()));
// The -disable-simplify-libcalls flag actually disables all builtin optzns.
if (DisableSimplifyLibCalls)
TLI->disableAllFunctions();
Passes.add(TLI);
However the TargetLibraryInfo pass seems to be immutable so I guess
that means it's not allowed to add attributes to functions. I see that
the FunctionAttrs pass depends on TargetLibraryInfo so I guess that
makes sense.
I recently just sent a patch to the documentation relating to this to
llvm-commits. Looks like I'm going to need to re-write it slightly.
Thanks,
--
Dan Liew
PhD Student - Imperial College London
More information about the llvm-dev
mailing list