llvm.org GIT mirror llvm / 7eb4beb
Expose the rest of the llvm-c scalar opts to ocaml. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97685 91177308-0d34-0410-b5e6-96231b3b80d8 Erick Tryzelaar 10 years ago
4 changed file(s) with 246 addition(s) and 23 deletion(s). Raw diff Collapse all Expand all
99 external add_constant_propagation : [
1010 -> unit
1111 = "llvm_add_constant_propagation"
12 external add_instruction_combining : [
13 -> unit
14 = "llvm_add_instruction_combining"
12 external add_sccp : [ unit
13 = "llvm_add_sccp"
14 external add_dead_store_elimination : [
15 -> unit
16 = "llvm_add_dead_store_elimination"
17 external add_aggressive_dce : [ unit
18 = "llvm_add_aggressive_dce"
19 external
20 add_scalar_repl_aggregation : [ unit
21 = "llvm_add_scalar_repl_aggregation"
22 external add_ind_var_simplification : [
23 -> unit
24 = "llvm_add_ind_var_simplification"
25 external
26 add_instruction_combination : [
27 -> unit
28 = "llvm_add_instruction_combination"
29 external add_licm : [
30 -> unit
31 = "llvm_add_licm"
32 external add_loop_unswitch : [
33 -> unit
34 = "llvm_add_loop_unswitch"
35 external add_loop_unroll : [
36 -> unit
37 = "llvm_add_loop_unroll"
38 external add_loop_rotation : [
39 -> unit
40 = "llvm_add_loop_rotation"
41 external add_loop_index_split : [
42 -> unit
43 = "llvm_add_loop_index_split"
1544 external
1645 add_memory_to_register_promotion : [
1746 -> unit
2049 add_memory_to_register_demotion : [
2150 -> unit
2251 = "llvm_add_memory_to_register_demotion"
23 external add_reassociation : [
24 -> unit
52 external add_reassociation : [ -> unit
2553 = "llvm_add_reassociation"
54 external add_jump_threading : [
55 -> unit
56 = "llvm_add_jump_threading"
57 external add_cfg_simplification : [
58 -> unit
59 = "llvm_add_cfg_simplification"
60 external
61 add_tail_call_elimination : [ unit
62 = "llvm_add_tail_call_elimination"
2663 external add_gvn : [
2764 -> unit
2865 = "llvm_add_gvn"
29 external add_cfg_simplification : [
30 -> unit
31 = "llvm_add_cfg_simplification"
66 external add_memcpy_opt : [
67 -> unit
68 = "llvm_add_memcpy_opt"
69 external add_loop_deletion : [
70 -> unit
71 = "llvm_add_loop_deletion"
72 external
73 add_lib_call_simplification : [ unit
74 = "llvm_add_lib_call_simplification"
1616 -> unit
1717 = "llvm_add_constant_propagation"
1818
19 (** See the [llvm::createSCCPPass] function. *)
20 external add_sccp : [ unit
21 = "llvm_add_sccp"
22
23 (** See [llvm::createDeadStoreEliminationPass] function. *)
24 external add_dead_store_elimination : [
25 -> unit
26 = "llvm_add_dead_store_elimination"
27
28 (** See The [llvm::createAggressiveDCEPass] function. *)
29 external add_aggressive_dce : [ unit
30 = "llvm_add_aggressive_dce"
31
32 (** See the [llvm::createScalarReplAggregatesPass] function. *)
33 external
34 add_scalar_repl_aggregation : [ unit
35 = "llvm_add_scalar_repl_aggregation"
36
37 (** See the [llvm::createIndVarSimplifyPass] function. *)
38 external add_ind_var_simplification : [
39 -> unit
40 = "llvm_add_ind_var_simplification"
41
1942 (** See the [llvm::createInstructionCombiningPass] function. *)
20 external add_instruction_combining : [
21 -> unit
22 = "llvm_add_instruction_combining"
43 external
44 add_instruction_combination : [
45 -> unit
46 = "llvm_add_instruction_combination"
47
48 (** See the [llvm::createLICMPass] function. *)
49 external add_licm : [
50 -> unit
51 = "llvm_add_licm"
52
53 (** See the [llvm::createLoopUnswitchPass] function. *)
54 external add_loop_unswitch : [
55 -> unit
56 = "llvm_add_loop_unswitch"
57
58 (** See the [llvm::createLoopUnrollPass] function. *)
59 external add_loop_unroll : [
60 -> unit
61 = "llvm_add_loop_unroll"
62
63 (** See the [llvm::createLoopRotatePass] function. *)
64 external add_loop_rotation : [
65 -> unit
66 = "llvm_add_loop_rotation"
67
68 (** See the [llvm::createLoopIndexSplitPass] function. *)
69 external add_loop_index_split : [
70 -> unit
71 = "llvm_add_loop_index_split"
2372
2473 (** See the [llvm::createPromoteMemoryToRegisterPass] function. *)
2574 external
3483 = "llvm_add_memory_to_register_demotion"
3584
3685 (** See the [llvm::createReassociatePass] function. *)
37 external add_reassociation : [
38 -> unit
86 external add_reassociation : [ -> unit
3987 = "llvm_add_reassociation"
88
89 (** See the [llvm::createJumpThreadingPass] function. *)
90 external add_jump_threading : [
91 -> unit
92 = "llvm_add_jump_threading"
93
94 (** See the [llvm::createCFGSimplificationPass] function. *)
95 external add_cfg_simplification : [
96 -> unit
97 = "llvm_add_cfg_simplification"
98
99 (** See the [llvm::createTailCallEliminationPass] function. *)
100 external
101 add_tail_call_elimination : [ unit
102 = "llvm_add_tail_call_elimination"
40103
41104 (** See the [llvm::createGVNPass] function. *)
42105 external add_gvn : [
43106 -> unit
44107 = "llvm_add_gvn"
45108
46 (** See the [llvm::createCFGSimplificationPass] function. *)
47 external add_cfg_simplification : [
48 -> unit
49 = "llvm_add_cfg_simplification"
109 (** See the [llvm::createMemCpyOptPass] function. *)
110 external add_memcpy_opt : [
111 -> unit
112 = "llvm_add_memcpy_opt"
113
114 (** See the [llvm::createLoopDeletionPass] function. *)
115 external add_loop_deletion : [
116 -> unit
117 = "llvm_add_loop_deletion"
118
119 (** See the [llvm::createSimplifyLibCallsPass] function. *)
120 external
121 add_lib_call_simplification : [ unit
122 = "llvm_add_lib_call_simplification"
2525 }
2626
2727 /* [ unit */
28 CAMLprim value llvm_add_instruction_combining(LLVMPassManagerRef PM) {
28 CAMLprim value llvm_add_sccp(LLVMPassManagerRef PM) {
29 LLVMAddSCCPPass(PM);
30 return Val_unit;
31 }
32
33 /* [ unit */
34 CAMLprim value llvm_add_dead_store_elimination(LLVMPassManagerRef PM) {
35 LLVMAddDeadStoreEliminationPass(PM);
36 return Val_unit;
37 }
38
39 /* [ unit */
40 CAMLprim value llvm_add_aggressive_dce(LLVMPassManagerRef PM) {
41 LLVMAddAggressiveDCEPass(PM);
42 return Val_unit;
43 }
44
45 /* [ unit */
46 CAMLprim value llvm_add_scalar_repl_aggregation(LLVMPassManagerRef PM) {
47 LLVMAddScalarReplAggregatesPass(PM);
48 return Val_unit;
49 }
50
51 /* [ unit */
52 CAMLprim value llvm_add_ind_var_simplification(LLVMPassManagerRef PM) {
53 LLVMAddIndVarSimplifyPass(PM);
54 return Val_unit;
55 }
56
57 /* [ unit */
58 CAMLprim value llvm_add_instruction_combination(LLVMPassManagerRef PM) {
2959 LLVMAddInstructionCombiningPass(PM);
60 return Val_unit;
61 }
62
63 /* [ unit */
64 CAMLprim value llvm_add_licm(LLVMPassManagerRef PM) {
65 LLVMAddLICMPass(PM);
66 return Val_unit;
67 }
68
69 /* [ unit */
70 CAMLprim value llvm_add_loop_unswitch(LLVMPassManagerRef PM) {
71 LLVMAddLoopUnrollPass(PM);
72 return Val_unit;
73 }
74
75 /* [ unit */
76 CAMLprim value llvm_add_loop_unroll(LLVMPassManagerRef PM) {
77 LLVMAddLoopUnrollPass(PM);
78 return Val_unit;
79 }
80
81 /* [ unit */
82 CAMLprim value llvm_add_loop_rotation(LLVMPassManagerRef PM) {
83 LLVMAddLoopRotatePass(PM);
84 return Val_unit;
85 }
86
87 /* [ unit */
88 CAMLprim value llvm_add_loop_index_split(LLVMPassManagerRef PM) {
89 LLVMAddLoopIndexSplitPass(PM);
3090 return Val_unit;
3191 }
3292
49109 }
50110
51111 /* [ unit */
52 CAMLprim value llvm_add_gvn(LLVMPassManagerRef PM) {
53 LLVMAddGVNPass(PM);
112 CAMLprim value llvm_add_jump_threading(LLVMPassManagerRef PM) {
113 LLVMAddJumpThreadingPass(PM);
54114 return Val_unit;
55115 }
56116
59119 LLVMAddCFGSimplificationPass(PM);
60120 return Val_unit;
61121 }
122
123 /* [ unit */
124 CAMLprim value llvm_add_tail_call_elimination(LLVMPassManagerRef PM) {
125 LLVMAddTailCallEliminationPass(PM);
126 return Val_unit;
127 }
128
129 /* [ unit */
130 CAMLprim value llvm_add_gvn(LLVMPassManagerRef PM) {
131 LLVMAddGVNPass(PM);
132 return Val_unit;
133 }
134
135 /* [ unit */
136 CAMLprim value llvm_add_memcpy_opt(LLVMPassManagerRef PM) {
137 LLVMAddMemCpyOptPass(PM);
138 return Val_unit;
139 }
140
141 /* [ unit */
142 CAMLprim value llvm_add_loop_deletion(LLVMPassManagerRef PM) {
143 LLVMAddLoopDeletionPass(PM);
144 return Val_unit;
145 }
146
147 /* [ unit */
148 CAMLprim value llvm_add_lib_call_simplification(LLVMPassManagerRef PM) {
149 LLVMAddSimplifyLibCallsPass(PM);
150 return Val_unit;
151 }
3636
3737 ignore (PassManager.create_function m
3838 ++ TargetData.add td
39 ++ add_instruction_combining
39 ++ add_constant_propagation
40 ++ add_sccp
41 ++ add_dead_store_elimination
42 ++ add_aggressive_dce
43 ++ add_scalar_repl_aggregation
44 ++ add_ind_var_simplification
45 ++ add_instruction_combination
46 ++ add_licm
47 ++ add_loop_unswitch
48 ++ add_loop_unroll
49 ++ add_loop_rotation
50 ++ add_loop_index_split
51 ++ add_memory_to_register_promotion
52 ++ add_memory_to_register_demotion
4053 ++ add_reassociation
54 ++ add_jump_threading
55 ++ add_cfg_simplification
56 ++ add_tail_call_elimination
4157 ++ add_gvn
42 ++ add_cfg_simplification
43 ++ add_constant_propagation
58 ++ add_memcpy_opt
59 ++ add_loop_deletion
60 ++ add_lib_call_simplification
4461 ++ PassManager.initialize
4562 ++ PassManager.run_function fn
4663 ++ PassManager.finalize