Changeset 2904 for extracted/compiler.ml


Ignore:
Timestamp:
Mar 19, 2013, 1:27:24 AM (6 years ago)
Author:
sacerdot
Message:
  1. Algorithm modified by hand to make it run faster. The trusted code needs to be changed once and for all.
  2. pretty-printing code to understand slowness added
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extracted/compiler.ml

    r2875 r2904  
    578578    Errors.res **)
    579579let assembler observe p =
     580prerr_endline "ASSEMBLY0";
    580581  Obj.magic
    581582    (Monad.m_bind0 (Monad.max_def Errors.res0)
     
    583584        (Errors.opt_to_res (Errors.msg ErrorMessages.Jump_expansion_failed)
    584585          (Policy.jump_expansion' p))) (fun sigma_pol ->
     586prerr_endline "ASSEMBLY1";
    585587      let sigma = fun ppc -> (Types.pi1 sigma_pol).Types.fst ppc in
    586588      let pol = fun ppc -> (Types.pi1 sigma_pol).Types.snd ppc in
    587589      let p0 = Assembly.assembly p sigma pol in
    588590      let i = Obj.magic observe Object_code_pass (Types.pi1 p0) in
     591prerr_endline "ASSEMBLY2";
    589592      Obj.magic (Errors.OK (Types.pi1 p0))))
    590593
     
    774777        Monad.m_bind0 (Monad.max_def Errors.res0)
    775778          (Obj.magic (assembler observe p1)) (fun p2 ->
     779prerr_endline "COMPUTE_COST_MAP";
    776780          let k = ASMCostsSplit.aSM_cost_map p2 in
     781prerr_endline "LIFT_COST_MAP";
    777782          let k' =
    778783            lift_cost_map_back_to_front p' (Fetch.load_code_memory p2.ASM.oc)
    779784              p2.ASM.costlabels k
    780785          in
     786prerr_endline "END";
    781787          Monad.m_return0 (Monad.max_def Errors.res0)
    782788            { c_labelled_object_code = p2; c_stack_cost = stack_cost;
Note: See TracChangeset for help on using the changeset viewer.