~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to lib/hipe/sparc/hipe_sparc_ra_postconditions.erl

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-11-06 18:54:42 UTC
  • mfrom: (3.3.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091106185442-bqxb11qghumvmvx2
Tags: 1:13.b.2.1-dfsg-1ubuntu1
* Merge with Debian testing; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
%%
20
20
 
21
21
-module(hipe_sparc_ra_postconditions).
22
 
-export([check_and_rewrite/3]).
23
 
-export([check_and_rewrite2/3]).
 
22
 
 
23
-export([check_and_rewrite/3, check_and_rewrite2/3]).
 
24
 
24
25
-include("hipe_sparc.hrl").
25
26
 
26
27
check_and_rewrite(Defun, Coloring, Allocator) ->
185
186
  case temp_is_spilled(Src, TempMap) of
186
187
    true ->
187
188
      NewSrc = clone(Src, RegOpt),
188
 
      {[hipe_sparc:mk_pseudo_move(Src, NewSrc)],
189
 
       NewSrc,
190
 
       true};
 
189
      {[hipe_sparc:mk_pseudo_move(Src, NewSrc)], NewSrc, true};
191
190
    _ ->
192
191
      {[], Src, false}
193
192
  end.
196
195
  case temp_is_spilled(Dst, TempMap) of
197
196
    true ->
198
197
      NewDst = clone(Dst, temp1(Strategy)),
199
 
      {[hipe_sparc:mk_pseudo_move(NewDst, Dst)],
200
 
       NewDst,
201
 
       true};
 
198
      {[hipe_sparc:mk_pseudo_move(NewDst, Dst)], NewDst, true};
202
199
    _ ->
203
200
      {[], Dst, false}
204
201
  end.
211
208
  case hipe_sparc:temp_is_allocatable(Temp) of
212
209
    true ->
213
210
      Reg = hipe_sparc:temp_reg(Temp),
214
 
      case tuple_size(TempMap) > Reg of
215
 
        true -> hipe_temp_map:is_spilled(Reg, TempMap);
216
 
        false -> false
217
 
      end;
 
211
      tuple_size(TempMap) > Reg andalso hipe_temp_map:is_spilled(Reg, TempMap);
218
212
    false -> true
219
213
  end.
220
214