diff options
author | Junmo Park <junmoz.park@samsung.com> | 2016-02-25 00:23:27 +0000 |
---|---|---|
committer | Junmo Park <junmoz.park@samsung.com> | 2016-02-25 00:23:27 +0000 |
commit | 161dc1c60532d5926a628d9dde76b517cc299e06 (patch) | |
tree | e82ca29daf5857e78487872462be9b999d7c1e00 /llvm/lib/CodeGen | |
parent | 0a750820a3b199edb5ba5f92e71375b0971a1c13 (diff) | |
download | bcm5719-llvm-161dc1c60532d5926a628d9dde76b517cc299e06.tar.gz bcm5719-llvm-161dc1c60532d5926a628d9dde76b517cc299e06.zip |
[CodeGenPrepare] Remove load-based heuristic
Summary:
Both the hardware and LLVM have changed since 2012.
Now, load-based heuristic don't show big differences any more on OoO cores.
There is no notable regressons and improvements on spec2000/2006. (Cortex-A57, Core i5).
Reviewers: spatel, zansari
Differential Revision: http://reviews.llvm.org/D16836
llvm-svn: 261809
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 4b9cc003ee2..7fc018556e1 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -4477,17 +4477,6 @@ static bool isFormingBranchFromSelectProfitable(const TargetTransformInfo *TTI, if (!Cmp || !Cmp->hasOneUse()) return false; - Value *CmpOp0 = Cmp->getOperand(0); - Value *CmpOp1 = Cmp->getOperand(1); - - // Emit "cmov on compare with a memory operand" as a branch to avoid stalls - // on a load from memory. But if the load is used more than once, do not - // change the select to a branch because the load is probably needed - // regardless of whether the branch is taken or not. - if ((isa<LoadInst>(CmpOp0) && CmpOp0->hasOneUse()) || - (isa<LoadInst>(CmpOp1) && CmpOp1->hasOneUse())) - return true; - // If either operand of the select is expensive and only needed on one side // of the select, we should form a branch. if (sinkSelectOperand(TTI, SI->getTrueValue()) || |