mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202742 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3640,7 +3640,7 @@ bool SROA::runOnFunction(Function &F) {
|
||||
// Remove the deleted allocas from various lists so that we don't try to
|
||||
// continue processing them.
|
||||
if (!DeletedAllocas.empty()) {
|
||||
std::function<bool(AllocaInst *)> IsInSet = [&](AllocaInst *AI) {
|
||||
auto IsInSet = [&](AllocaInst *AI) {
|
||||
return DeletedAllocas.count(AI);
|
||||
};
|
||||
Worklist.remove_if(IsInSet);
|
||||
|
Reference in New Issue
Block a user