summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PBQP
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2010-07-17 06:31:41 +0000
committerLang Hames <lhames@gmail.com>2010-07-17 06:31:41 +0000
commit211e7ce7e7e4cc1e0a719d97c884ba7928e64cb7 (patch)
treed7b06687a94b1004638e19287c500c3bbd7a598c /llvm/lib/CodeGen/PBQP
parent9de5967244a57beee5e0531c4b75ce38976da39f (diff)
downloadbcm5719-llvm-211e7ce7e7e4cc1e0a719d97c884ba7928e64cb7.tar.gz
bcm5719-llvm-211e7ce7e7e4cc1e0a719d97c884ba7928e64cb7.zip
Iterating over sets of pointers in a heuristic was a bad idea. Switching
any command line paramater changed the register allocation produced by PBQP. Turns out variety is not the spice of life. Fixed some comparators, added others. All good now. llvm-svn: 108613
Diffstat (limited to 'llvm/lib/CodeGen/PBQP')
-rw-r--r--llvm/lib/CodeGen/PBQP/Heuristics/Briggs.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/PBQP/Heuristics/Briggs.h b/llvm/lib/CodeGen/PBQP/Heuristics/Briggs.h
index 4c1ce119ed0..18eaf7c0da9 100644
--- a/llvm/lib/CodeGen/PBQP/Heuristics/Briggs.h
+++ b/llvm/lib/CodeGen/PBQP/Heuristics/Briggs.h
@@ -52,9 +52,7 @@ namespace PBQP {
bool operator()(Graph::NodeItr n1Itr, Graph::NodeItr n2Itr) const {
if (s->getSolverDegree(n1Itr) > s->getSolverDegree(n2Itr))
return true;
- if (s->getSolverDegree(n1Itr) < s->getSolverDegree(n2Itr))
- return false;
- return (&*n1Itr < &*n2Itr);
+ return false;
}
private:
HeuristicSolverImpl<Briggs> *s;
@@ -69,9 +67,7 @@ namespace PBQP {
cost2 = g->getNodeCosts(n2Itr)[0] / s->getSolverDegree(n2Itr);
if (cost1 < cost2)
return true;
- if (cost1 > cost2)
- return false;
- return (&*n1Itr < &*n2Itr);
+ return false;
}
private:
OpenPOWER on IntegriCloud