diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-02-22 03:33:28 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2016-02-22 03:33:28 +0000 |
commit | e59c8af7059f2ba1d65ea421a8ba4a739ed80372 (patch) | |
tree | 82340acfca3d130a9010741be335e29d5a27431c /llvm/lib/CodeGen/EarlyIfConversion.cpp | |
parent | 0cc90a9147ccaef59cdb9caf4d68de990e5fdd05 (diff) | |
download | bcm5719-llvm-e59c8af7059f2ba1d65ea421a8ba4a739ed80372.tar.gz bcm5719-llvm-e59c8af7059f2ba1d65ea421a8ba4a739ed80372.zip |
Reapply "CodeGen: Use references in MachineTraceMetrics::Trace, NFC"
This reverts commit r261510, effectively reapplying r261509. The
original commit missed a caller in AArch64ConditionalCompares.
Original commit message:
Pass non-null arguments by reference in MachineTraceMetrics::Trace,
simplifying future work to remove implicit iterator => pointer
conversions.
llvm-svn: 261511
Diffstat (limited to 'llvm/lib/CodeGen/EarlyIfConversion.cpp')
-rw-r--r-- | llvm/lib/CodeGen/EarlyIfConversion.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp index 3e92a7ae168..f253dc8a10f 100644 --- a/llvm/lib/CodeGen/EarlyIfConversion.cpp +++ b/llvm/lib/CodeGen/EarlyIfConversion.cpp @@ -718,7 +718,7 @@ bool EarlyIfConverter::shouldConvertIf() { // TBB / FBB data dependencies may delay the select even more. MachineTraceMetrics::Trace HeadTrace = MinInstr->getTrace(IfConv.Head); unsigned BranchDepth = - HeadTrace.getInstrCycles(IfConv.Head->getFirstTerminator()).Depth; + HeadTrace.getInstrCycles(*IfConv.Head->getFirstTerminator()).Depth; DEBUG(dbgs() << "Branch depth: " << BranchDepth << '\n'); // Look at all the tail phis, and compute the critical path extension caused @@ -726,8 +726,8 @@ bool EarlyIfConverter::shouldConvertIf() { MachineTraceMetrics::Trace TailTrace = MinInstr->getTrace(IfConv.Tail); for (unsigned i = 0, e = IfConv.PHIs.size(); i != e; ++i) { SSAIfConv::PHIInfo &PI = IfConv.PHIs[i]; - unsigned Slack = TailTrace.getInstrSlack(PI.PHI); - unsigned MaxDepth = Slack + TailTrace.getInstrCycles(PI.PHI).Depth; + unsigned Slack = TailTrace.getInstrSlack(*PI.PHI); + unsigned MaxDepth = Slack + TailTrace.getInstrCycles(*PI.PHI).Depth; DEBUG(dbgs() << "Slack " << Slack << ":\t" << *PI.PHI); // The condition is pulled into the critical path. @@ -742,7 +742,7 @@ bool EarlyIfConverter::shouldConvertIf() { } // The TBB value is pulled into the critical path. - unsigned TDepth = adjCycles(TBBTrace.getPHIDepth(PI.PHI), PI.TCycles); + unsigned TDepth = adjCycles(TBBTrace.getPHIDepth(*PI.PHI), PI.TCycles); if (TDepth > MaxDepth) { unsigned Extra = TDepth - MaxDepth; DEBUG(dbgs() << "TBB data adds " << Extra << " cycles.\n"); @@ -753,7 +753,7 @@ bool EarlyIfConverter::shouldConvertIf() { } // The FBB value is pulled into the critical path. - unsigned FDepth = adjCycles(FBBTrace.getPHIDepth(PI.PHI), PI.FCycles); + unsigned FDepth = adjCycles(FBBTrace.getPHIDepth(*PI.PHI), PI.FCycles); if (FDepth > MaxDepth) { unsigned Extra = FDepth - MaxDepth; DEBUG(dbgs() << "FBB data adds " << Extra << " cycles.\n"); |