1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-09-08 17:54:40 +00:00

Working on predictability in output

This commit is contained in:
Jesper Gravgaard 2017-07-14 00:25:25 +02:00
parent 5c1aa7a2e7
commit 1dfbcd1ca4

View File

@ -165,6 +165,13 @@ public class Pass2AliasElimination extends Pass2SsaOptimization {
public Variable getKeepVar() {
Variable keep = null;
List<Variable> vars = new ArrayList<>(this.vars);
Collections.sort(vars, new Comparator<Variable>() {
@Override
public int compare(Variable o1, Variable o2) {
return o1.getFullName().compareTo(o2.getFullName());
}
});
for (Variable var : vars) {
if (keep == null) {
keep = var;