Guest User

ocaml_updates.patch

a guest
Nov 4th, 2014
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.72 KB | None | 0 0
  1. Index: examples/OCaml-Kaleidoscope/Chapter4/toy.ml
  2. ===================================================================
  3. --- examples/OCaml-Kaleidoscope/Chapter4/toy.ml (revision 205827)
  4. +++ examples/OCaml-Kaleidoscope/Chapter4/toy.ml (working copy)
  5. @@ -27,7 +27,8 @@
  6.  
  7. (* Set up the optimizer pipeline. Start with registering info about how the
  8. * target lays out data structures. *)
  9. - DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm;
  10. + let dl = ExecutionEngine.data_layout the_execution_engine in
  11. + DataLayout.add_to_pass_manager the_fpm dl;
  12.  
  13. (* Do simple "peephole" optimizations and bit-twiddling optzn. *)
  14. add_instruction_combination the_fpm;
  15. Index: examples/OCaml-Kaleidoscope/Chapter5/toy.ml
  16. ===================================================================
  17. --- examples/OCaml-Kaleidoscope/Chapter5/toy.ml (revision 205827)
  18. +++ examples/OCaml-Kaleidoscope/Chapter5/toy.ml (working copy)
  19. @@ -27,7 +27,8 @@
  20.  
  21. (* Set up the optimizer pipeline. Start with registering info about how the
  22. * target lays out data structures. *)
  23. - DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm;
  24. + let dl = ExecutionEngine.data_layout the_execution_engine in
  25. + DataLayout.add_to_pass_manager the_fpm dl;
  26.  
  27. (* Do simple "peephole" optimizations and bit-twiddling optzn. *)
  28. add_instruction_combination the_fpm;
  29. Index: examples/OCaml-Kaleidoscope/Chapter6/toy.ml
  30. ===================================================================
  31. --- examples/OCaml-Kaleidoscope/Chapter6/toy.ml (revision 205827)
  32. +++ examples/OCaml-Kaleidoscope/Chapter6/toy.ml (working copy)
  33. @@ -27,7 +27,8 @@
  34.  
  35. (* Set up the optimizer pipeline. Start with registering info about how the
  36. * target lays out data structures. *)
  37. - DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm;
  38. + let dl = ExecutionEngine.data_layout the_execution_engine in
  39. + DataLayout.add_to_pass_manager the_fpm dl;
  40.  
  41. (* Do simple "peephole" optimizations and bit-twiddling optzn. *)
  42. add_instruction_combination the_fpm;
  43. Index: examples/OCaml-Kaleidoscope/Chapter7/toy.ml
  44. ===================================================================
  45. --- examples/OCaml-Kaleidoscope/Chapter7/toy.ml (revision 205827)
  46. +++ examples/OCaml-Kaleidoscope/Chapter7/toy.ml (working copy)
  47. @@ -28,7 +28,8 @@
  48.  
  49. (* Set up the optimizer pipeline. Start with registering info about how the
  50. * target lays out data structures. *)
  51. - DataLayout.add (ExecutionEngine.target_data the_execution_engine) the_fpm;
  52. + let dl = ExecutionEngine.data_layout the_execution_engine in
  53. + DataLayout.add_to_pass_manager the_fpm dl;
  54.  
  55. (* Promote allocas to registers. *)
  56. add_memory_to_register_promotion the_fpm;
Advertisement
Add Comment
Please, Sign In to add comment