summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-01-06 06:17:53 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-01-06 06:17:53 +0000
commit255874ff521bb81b294ec861a5d9a99d8198448c (patch)
tree7eb1a34132c825d8e33e6157afb5715089d03eff /lib/CodeGen
parent238589ebf571a4acefbb02e47812f8e0cfaaec7f (diff)
downloadllvm-255874ff521bb81b294ec861a5d9a99d8198448c.tar.gz
llvm-255874ff521bb81b294ec861a5d9a99d8198448c.tar.bz2
llvm-255874ff521bb81b294ec861a5d9a99d8198448c.tar.xz
Revert r122936. I'll re-implement the change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122949 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index be2de0c00d..110812c437 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -50,7 +50,6 @@
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringExtras.h"
-#include "llvm/ADT/Triple.h"
#include <algorithm>
#include <cmath>
using namespace llvm;
@@ -3287,14 +3286,8 @@ static bool FindOptimalMemOpLowering(std::vector<EVT> &MemOps,
// the size of a call to memcpy or memset (3 arguments + call).
if (Limit != ~0U) {
const Function *F = DAG.getMachineFunction().getFunction();
- if (F->hasFnAttr(Attribute::OptimizeForSize)) {
- Triple T(((LLVMTargetMachine&)TLI.getTargetMachine()).getTargetTriple());
- if (T.getOS() != Triple::Darwin)
- // A pretty terrible hack to defat the wild guess. On Darwin, -Os means
- // optimize for size without hurting performance so we don't want to
- // bump down the limit.
- Limit = 4;
- }
+ if (F->hasFnAttr(Attribute::OptimizeForSize))
+ Limit = 4;
}
unsigned NumMemOps = 0;