[llvm-commits] [llvm] r62107 - in /llvm/trunk: lib/Transforms/IPO/Inliner.cpp lib/Transforms/Utils/InlineCost.cpp test/Transforms/Inline/2009-01-12-RecursiveInline.ll
Duncan Sands
baldrick at free.fr
Mon Jan 12 23:57:28 PST 2009
Hi Dale,
> @@ -180,14 +180,12 @@
> Function *Callee = CS.getCalledFunction();
> Function *Caller = TheCall->getParent()->getParent();
>
> - // Don't inline a directly recursive call.
> - if (Caller == Callee ||
> // Don't inline functions which can be redefined at link-time to mean
> // something else.
> // FIXME: We allow link-once linkage since in practice all versions of
> // the function have the same body (C++ ODR) - but the LLVM definition
> // of LinkOnceLinkage doesn't require this.
> - (Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()) ||
> + if ((Callee->mayBeOverridden() && !Callee->hasLinkOnceLinkage()) ||
the comment (containing the FIXME) is now indented funny. Also, it is
probably OK to inline a function with weak linkage (mayBeOverridden) into
itself.
Ciao,
Duncan.
More information about the llvm-commits
mailing list