~rdoering/ubuntu/karmic/erlang/fix-535090

« back to all changes in this revision

Viewing changes to lib/hipe/regalloc/hipe_optimistic_regalloc.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2009-02-15 16:42:52 UTC
  • mfrom: (1.1.13 upstream)
  • mto: (3.3.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 17.
  • Revision ID: james.westby@ubuntu.com-20090215164252-dxpjjuq108nz4noa
Upload to unstable after lenny is released.

Show diffs side-by-side

added added

removed removed

Lines of Context:
938
938
%% Merge two ordered sub-splits into one.
939
939
 
940
940
spillCostOrderedMerge(Spl1, [], Spl) ->
941
 
  Spl0 = lists:reverse(Spl),
942
 
  lists:append(Spl0, Spl1);
 
941
  lists:reverse(Spl) ++ Spl1;
943
942
spillCostOrderedMerge([], Spl2, Spl) ->
944
 
  Spl0 = lists:reverse(Spl),
945
 
  lists:append(Spl0, Spl2);
 
943
  lists:reverse(Spl) ++ Spl2;
946
944
spillCostOrderedMerge(Spl1, Spl2, Spl) ->
947
945
  {_, _, SpillCost1} = hd(Spl1),
948
946
  {_, _, SpillCost2} = hd(Spl2),
997
995
enqueueSplit([Node|Nodes], IG, Stack) ->
998
996
  ?debug_msg("  Placing node ~p at the bottom of the stack.~n", [Node]),
999
997
  Edges = hipe_ig:node_adj_list(Node, IG),
1000
 
  Stack1 = lists:append(Stack, [{Node, Edges}]),
 
998
  Stack1 = Stack ++ [{Node, Edges}],
1001
999
  enqueueSplit(Nodes, IG, Stack1).
1002
1000
 
1003
1001
%%----------------------------------------------------------------------