diff options
author | Daniel Jasper <djasper@google.com> | 2017-08-31 06:22:35 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2017-08-31 06:22:35 +0000 |
commit | b8198f02e689b2234c09c1171539ecfa3a0f59b2 (patch) | |
tree | ba3e68869d4d0a94872d4f7a1569af6313765c26 /llvm/lib/CodeGen | |
parent | 0b981ec41987b14e51ee58cb22006aa01e4fe844 (diff) | |
download | bcm5719-llvm-b8198f02e689b2234c09c1171539ecfa3a0f59b2.tar.gz bcm5719-llvm-b8198f02e689b2234c09c1171539ecfa3a0f59b2.zip |
Revert r312194: "[MachineOutliner] Add missed optimization remarks for the outliner."
Breaks on buildbot:
http://bb.pgr.jp/builders/test-llvm-i686-linux-RA/builds/6026/steps/test_llvm/logs/LLVM%20%3A%3A%20CodeGen__AArch64__machine-outliner-remarks.ll
llvm-svn: 312219
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MachineOutliner.cpp | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp index c12035455ab..9a8eebff2b5 100644 --- a/llvm/lib/CodeGen/MachineOutliner.cpp +++ b/llvm/lib/CodeGen/MachineOutliner.cpp @@ -46,7 +46,6 @@ #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineModuleInfo.h" -#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h" #include "llvm/CodeGen/Passes.h" #include "llvm/IR/IRBuilder.h" #include "llvm/Support/Allocator.h" @@ -65,7 +64,6 @@ #define DEBUG_TYPE "machine-outliner" using namespace llvm; -using namespace ore; STATISTIC(NumOutlined, "Number of candidates outlined"); STATISTIC(FunctionsCreated, "Number of functions created"); @@ -897,41 +895,8 @@ MachineOutliner::findCandidates(SuffixTree &ST, const TargetInstrInfo &TII, size_t OutliningCost = CallOverhead + FrameOverhead + SequenceOverhead; size_t NotOutliningCost = SequenceOverhead * Parent.OccurrenceCount; - // Is it better to outline this candidate than not? - if (NotOutliningCost <= OutliningCost) { - // Outlining this candidate would take more instructions than not - // outlining. - // Emit a remark explaining why we didn't outline this candidate. - std::pair<MachineBasicBlock::iterator, MachineBasicBlock::iterator> C = - CandidateClass[0]; - MachineOptimizationRemarkEmitter MORE( - *(C.first->getParent()->getParent()), nullptr); - MachineOptimizationRemarkMissed R(DEBUG_TYPE, "NotOutliningCheaper", - C.first->getDebugLoc(), - C.first->getParent()); - R << "Did not outline " << NV("Length", StringLen) << " instructions" - << " from " << NV("NumOccurrences", CandidateClass.size()) - << " locations." - << " Instructions from outlining all occurrences (" - << NV("OutliningCost", OutliningCost) << ")" - << " >= Unoutlined instruction count (" - << NV("NotOutliningCost", NotOutliningCost) << ")" - << " (Also found at: "; - - // Tell the user the other places the candidate was found. - for (size_t i = 1, e = CandidateClass.size(); i < e; i++) { - R << NV((Twine("OtherStartLoc") + Twine(i)).str(), - CandidateClass[i].first->getDebugLoc()); - if (i != e - 1) - R << ", "; - } - - R << ")"; - MORE.emit(R); - - // Move to the next candidate. + if (NotOutliningCost <= OutliningCost) continue; - } size_t Benefit = NotOutliningCost - OutliningCost; |