[llvm] r202742 - [C++11] Remove the completely unnecessary requirement on SetVector's

Chandler Carruth chandlerc at gmail.com
Tue Mar 4 22:27:01 PST 2014


On Tue, Mar 4, 2014 at 10:24 PM, Nick Lewycky <nicholas at mxc.ca> wrote:

> Chandler Carruth wrote:
>
>> Author: chandlerc
>> Date: Mon Mar  3 13:28:52 2014
>> New Revision: 202742
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=202742&view=rev
>> Log:
>> [C++11] Remove the completely unnecessary requirement on SetVector's
>> remove_if that its predicate is adaptable. We don't actually need this,
>> we can write a generic adapter for any predicate.
>>
>> This lets us remove some very wrong std::function usages. We should
>> never be using std::function for predicates to algorithms. This incurs
>> an *indirect* call overhead for every evaluation of the predicate, and
>> makes it very hard to inline through.
>>
>
> Pardon me sir, are you suggesting that llvm's inliner isn't up to the task?


Yep. Someone should fix that thing.

I'm also suggesting that we shouldn't make it work harder than necessary
without good cause.

;]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140304/9d3e0faf/attachment.html>


More information about the llvm-commits mailing list