mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
[unroll] Replace a boolean, for loop, condition, and break with
std::all_of and a lambda. Much cleaner, no functionality changed. llvm-svn: 229058
This commit is contained in:
parent
4ae15f9bf1
commit
94b76fa886
@ -542,14 +542,10 @@ public:
|
||||
continue;
|
||||
if (DeadInstructions.count(I))
|
||||
continue;
|
||||
bool AllUsersFolded = true;
|
||||
for (User *U : I->users())
|
||||
if (!DeadInstructions.count(cast<Instruction>(U))) {
|
||||
AllUsersFolded = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (AllUsersFolded) {
|
||||
if (std::all_of(I->user_begin(), I->user_end(), [&](User *U) {
|
||||
return DeadInstructions.count(cast<Instruction>(U));
|
||||
})) {
|
||||
NumberOfOptimizedInstructions += TTI.getUserCost(I);
|
||||
DeadInstructions.insert(I);
|
||||
EnqueueOperands(*I);
|
||||
|
Loading…
x
Reference in New Issue
Block a user