diff options
author | Reid Kleckner <rnk@google.com> | 2018-03-16 20:11:55 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-03-16 20:11:55 +0000 |
commit | 2aeb930a9f5761e39fb321ad61710683fb49009d (patch) | |
tree | 9819b3ddb6faae01e6d67f4266d9c4f89e06f4ed /llvm/lib | |
parent | ae9b07011140037c364e5efa2bb3ff422163d5b5 (diff) | |
download | bcm5719-llvm-2aeb930a9f5761e39fb321ad61710683fb49009d.tar.gz bcm5719-llvm-2aeb930a9f5761e39fb321ad61710683fb49009d.zip |
Revert r327721 "This patch fixes the invalid usage of OptSize in Machine Combiner."
It causes asserts when compiling Chromium on Win32 with optimizations.
We compile many things with -Os.
llvm-svn: 327733
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/MachineCombiner.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp index 7637a6474ff..efb463f8810 100644 --- a/llvm/lib/CodeGen/MachineCombiner.cpp +++ b/llvm/lib/CodeGen/MachineCombiner.cpp @@ -407,8 +407,8 @@ bool MachineCombiner::preservesResourceLen( /// \returns true when new instruction sequence should be generated /// independent if it lengthens critical path or not bool MachineCombiner::doSubstitute(unsigned NewSize, unsigned OldSize) { - if (OptSize) // First of all check OptSize option - return (NewSize < OldSize); // Only substitute if new size < old size + if (OptSize && (NewSize < OldSize)) + return true; if (!TSchedModel.hasInstrSchedModelOrItineraries()) return true; return false; @@ -588,7 +588,7 @@ bool MachineCombiner::combineInstructions(MachineBasicBlock *MBB) { // Eagerly stop after the first pattern fires. Changed = true; break; - } else if (!OptSize || (NewInstCount <= OldInstCount)) { + } else { // For big basic blocks, we only compute the full trace the first time // we hit this. We do not invalidate the trace, but instead update the // instruction depths incrementally. |