mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[Attributor] Verify checkForAllUses
return value properly
Also do not emit more than one remark after Heap2Stack failed.
This commit is contained in:
parent
0b6fb7b1ef
commit
0042081f58
@ -6163,7 +6163,8 @@ ChangeStatus AAHeapToStackFunction::updateImpl(Attributor &A) {
|
||||
"parameter as `__attribute__((noescape))` to override.";
|
||||
};
|
||||
|
||||
if (AI.LibraryFunctionId == LibFunc___kmpc_alloc_shared)
|
||||
if (ValidUsesOnly &&
|
||||
AI.LibraryFunctionId == LibFunc___kmpc_alloc_shared)
|
||||
A.emitRemark<OptimizationRemarkMissed>(AI.CB, "OMP113", Remark);
|
||||
|
||||
LLVM_DEBUG(dbgs() << "[H2S] Bad user: " << *UserI << "\n");
|
||||
@ -6183,7 +6184,8 @@ ChangeStatus AAHeapToStackFunction::updateImpl(Attributor &A) {
|
||||
ValidUsesOnly = false;
|
||||
return true;
|
||||
};
|
||||
A.checkForAllUses(Pred, *this, *AI.CB);
|
||||
if (!A.checkForAllUses(Pred, *this, *AI.CB))
|
||||
return false;
|
||||
return ValidUsesOnly;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user