mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-31 15:53:42 +00:00
Fix a performance problem with the new SSAUpdater. This showed up in the
GCCAS time for MultiSource/Benchmarks/ASCI_Purple/SMG2000. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102009 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c048f1d12c
commit
b913863a95
@ -529,9 +529,15 @@ void SSAUpdater::FindAvailableVals(BlockListTy *BlockList) {
|
|||||||
E = BlockList->rend(); I != E; ++I) {
|
E = BlockList->rend(); I != E; ++I) {
|
||||||
BBInfo *Info = *I;
|
BBInfo *Info = *I;
|
||||||
|
|
||||||
// Check if this block contains a newly added PHI.
|
if (Info->DefBB != Info) {
|
||||||
if (Info->DefBB != Info)
|
// Record the available value at join nodes to speed up subsequent
|
||||||
|
// uses of this SSAUpdater for the same value.
|
||||||
|
if (Info->NumPreds > 1)
|
||||||
|
AvailableVals[Info->BB] = Info->DefBB->AvailableVal;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if this block contains a newly added PHI.
|
||||||
PHINode *PHI = dyn_cast<PHINode>(Info->AvailableVal);
|
PHINode *PHI = dyn_cast<PHINode>(Info->AvailableVal);
|
||||||
if (!PHI || PHI->getNumIncomingValues() == Info->NumPreds)
|
if (!PHI || PHI->getNumIncomingValues() == Info->NumPreds)
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user