[llvm-commits] [llvm] r153834 - /llvm/trunk/lib/Transforms/IPO/Inliner.cpp
Chris Lattner
clattner at apple.com
Sun Apr 1 09:09:02 PDT 2012
On Apr 1, 2012, at 3:41 AM, Chandler Carruth wrote:
> Author: chandlerc
> Date: Sun Apr 1 05:41:24 2012
> New Revision: 153834
>
> URL: http://llvm.org/viewvc/llvm-project?rev=153834&view=rev
> Log:
> Belatedly address some code review from Chris.
>
> As a side note, I really dislike array_pod_sort... Do we really still
> care about any STL implementations that get this so wrong? Does libc++?
Yes and Yes. libstdc++ and libc++ both optimize for performance at a ridiculous cost in code size.
-Chris
>
> Modified:
> llvm/trunk/lib/Transforms/IPO/Inliner.cpp
>
> Modified: llvm/trunk/lib/Transforms/IPO/Inliner.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Inliner.cpp?rev=153834&r1=153833&r2=153834&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Transforms/IPO/Inliner.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/Inliner.cpp Sun Apr 1 05:41:24 2012
> @@ -552,7 +552,7 @@
> // Note that it doesn't matter that we are iterating over a non-stable order
> // here to do this, it doesn't matter which order the functions are deleted
> // in.
> - std::sort(FunctionsToRemove.begin(), FunctionsToRemove.end());
> + array_pod_sort(FunctionsToRemove.begin(), FunctionsToRemove.end());
> FunctionsToRemove.erase(std::unique(FunctionsToRemove.begin(),
> FunctionsToRemove.end()),
> FunctionsToRemove.end());
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list