1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
|
2013-07-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-array-notation.c (find_rank): Added INDIRECT_REF case.
(build_array_notation_expr): Likewise.
2013-07-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
* config/i386/i386.c (ix86_cilkplus_find_isa_code): New function.
(ix86_builtin_find_vlength_for_proc): Updated to emit the new mangling
format.
(TARGET_CILKPLUS_BUILTIN_FIND_ISA_CODE): Updated #define to point
to the new function.
* tree-vect-patterns.c (vect_recog_pow_pattern): Added 3 new parameters
to the vectorizable_function function call.
* tree-vect-stmts.c (vectorizable_function): Added 3 new parameters.
Passed these parameters to find_elem_fn_name.
(vectorizable_call): Made 'dt' a dynamic array instead of a static one.
Passed 3 additional parameter to function call vectorizable_function.
Pass a scalar parameter when the paramter type is linear or uniform.
* doc/tm.texi (Addressing Modes): Changed TARGET_CILKPLUS_BUITIN_ISA
CODE function's parameter.
* targhooks.c (default_builtin_find_isa_code): Likewise.
* target.def (default_builtin_find_isa_code): Likewise.
* targhooks.h (default_builtin_find_isa_code): Likewise, but for a
prototype.
* cilk.h (find_elem_fn_name): Remove prototype.
(find_suffix): Likewise.
(extract_elem_fn_values): Added a new parameter.
(find_prefix): New prototype.
* elem-function-common.c (find_elem_fn_parm_type): Remove prototype.
(is_elem_fn): Likewise.
(find_elem_fn_name): Likewise.
(find_processor_code): Remove function.
(extract_elem_fn_values): Added a new parameter to prototype.
(rename_elem_fn): Change second parameter name.
(find_suffix): Renamed to find_prefix and made it return the new
mangling format.
(find_elem_fn_parm_type_1): Added new parameter to the function call
extact_elem_fn_values.
(find_elem_fn_name): Added new parameters to support new mangling
format.
(extract_elem_fn_values): Added new parameter. Supported the new
mangling format and replaced processor clause with isa clause.
* tree-vectorizer.h (vectorizable_function): Added 3 new parameters.
2013-06-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (cilk_output_metadata): Make alignment number to be 32.
(output_zca_table): Hard-coded the size of IP to be 8.
2013-05-08 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-array-notation.c (fix_builtin_array_notation_fn): Added a check
for non-arithmetic types in array notation builtin functions.
2013-04-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-array-notation.c (fix_builtin_array_notation_fn): Added "equal-to"
component to the conditional expression checks for finding the maximum
and minimum value index for the array notation builtin functions.
2013-04-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-array-notation.c (fix_builtin_array_notation_fn): Added a check
for array notation functions inside array notations. If so, return an
error.
(build_array_notation_expr): Fixed a bug and popped a statement list.
2013-04-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-array-notation.c (build_array_notation_expr): Added a check for
length mismatch. Also changed loading array_list so that array refs can
be used with array notations. Finally, store array notation components
into variable only if it is not a INTEGER constant.
(find_rank): Changed the computation method so that array ref can be
used with array notations.
(length_mismatch_in_expr_p): New function.
(fix_builtin_array_notation_fn): Added a check to see if max/min value
is available for the type. If so, set it as the starting point for
min and max reduction functions.
2013-04-14 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/Make-lang.in (C_AND_OBJC_OBJS): Added c/c-pragma-simd.o.
* c/c-typeck.c (c_finish_loop): Added new parameter to pass in pragma
simd information.
* c/c-parser.c (c_parser_for_statement): Likewise.
(c_parser_simd_pragma): added CILKPLUS_PRAGMA_SIMD case. Removed
PRAGMA_SIMD_ASSERT, PRAGMA_SIMD_VECTORLENGTH, PRAGMA_SIMD_PRIVATE,
PRAGMA_SIMD_LINEAR cases.
(same_var_in_multiple_lists_p): New function.
(c_parser_simd_construct): Likewise.
(c_parser_simd_assert): Changed the function to use vecs intead of
mallocs, linked-list and TREE_LIST. Also, added a parameter to pass in
pragma simd information.
(c_parser_simd_vectorlength): Likewise.
(c_parser_simd_reduction): Likewise.
(c_parser_simd_linear): Likewise.
(c_parser_simd_private): Likewise.
* pragma_simd.c (psv_find_node): Changed the function to use vecs
instead of mallocs, linked-list and TREE_LIST.
(clause_resolved_p): Likewise.
(pragma_simd_assert_requested_p): Likewise.
(pragma_simd_verify_clauses): Likewise.
(set_OK_for_certain_clause): Likewise.
(psv_find_node): Likewise.
(pragma_simd_acceptable_vlength_p): Likewise.
(check_off_reduction_var): Likewise.
(find_linear_step_size): Likewise.
(all_reductions_satisfied_p): Likewise.
(pragma_simd_is_private_var_p): Renamed from pragma_simd_is_private_var.
(p_simd_nodes_clear): New function.
(p_simd_head_insert): Likewise.
(pragma_simd_is_linear_var_p): Likewise.
(dump_pragma_simd_values_vec): Likewise.
(psv_head_insert): Remove.
(insert_reduction_values): Likewise.
(same_var_in_multiple_lists_p): Likewise.
* tree-vectorizer.c (vectorize_loops): Removed function call
pragma_simd_vectorize_loop_p.
* tree.h (struct pragma_simd_values): Replaced dynamic arrays with
vecs.
(tree_label_decl): Made pragma_simd_index unsigned instead of signed.
* cfgloop.h (struct loop): Likewise.
* tree-vect-loop.c (vect_analyze_scalar_cycles_1): Added a check for
verbosity of vectorizer, and if so then emit debug information.
(vect_create_epilog_for_reduction): Added a call to remove reduction
var when a reduction has occurred.
* gimple.h (struct gimple_statement): Likewise.
* c/c-pragma-simd.c: New file.
2013-04-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-array-notation.c (build_array_notation_expr): Added support to
follow execute-once rule for triplets.
(fix_conditional_array_notations_1): Likewise.
(fix_array_notation_call_expr): Likewise.
(build_array_notation_expr): Made checking for invariant expressions
in RHS of an array notation non-conditional.
2013-03-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-parser.c (c_parser_simd_vectorlength): Called the function
c_parser_expr_no_commas instead of c_parser_expression to parse just
until the comma.
2013-03-13 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-parser.c (c_parser_simd_vectorlength): Allow using sizeof
expression for vectorlength.
* config/i386/i386.c (ix86_frame_pointer_required): Removed statements
that checks if cilkplus is enabled and if the function is a cilk
function.
* ira.c (ira_setup_eliminable_regset): Enforce frame pointer usage when
it cilkplus is enabled and if the function is a cilk function.
* reload1.c (update_eliminables): Likewise.
2013-03-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
* builtins.c (expand_builtin): Added a check if cilkscreen is available
for the target.
* config/i386/i386.c (ix86_have_cilkscreen_support): New function.
Also, assigned this function to the following #define:
TARGET_CILKPLUS_BUILTIN_HAVE_CILKSCREEN_SUPPORT.
* target.def (builtin_have_cilkscreen_support): New target hook.
* targhooks.c (default_have_cilkscreen_support): New function.
(default_builtin_map_proc_to_attr): Likewise.
(default_builtin_find_proc_code): Likewise.
(default_builtin_find_isa_code): Likewise.
(default_builtin_find_vlength_for_proc): Make return type as unsigned.
* doc/tm.texi (Addressing Modes): Added documentation for new target
hook TARGET_CILKPLUS_BUILTIN_HAVE_CILKSCREEN_SUPPORT.
* doc/tm.texi.in (Addressing Modes): Likewise.
2013-03-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* pragma_simd.c (pragma_simd_is_private_var): Added an else clause and
set var_name as var if var is not a VAR_DECL or PARM_DECL.
2013-03-08 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree-loop-distribution.c (ssa_name_has_uses_outside_loop_p): Added
a call to pragma_simd_is_private_vars function when cilk plus is
enabled.
* c/c-parser.c (c_parser_for_statement): Removed the pragma_simd_found
parameter. Also, removed the call for pragma_simd_create_private_vars.
* cfghooks.c (dump_bb): Moved the carriage return to out file to the
end.
* pragma_simd.c (pragma_simd_is_private_var): New function.
(find_var_decl): Remove.
(change_var_decl): Likewise.
(pragma_simd_create_private_vars): Likewise.
2013-02-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (output_zca_table): Added an extra field of zeros for 32 bit
architectures.
* c/c-typeck.c (convert_arguments): Added a check for function being
not null.
* c/c-parser.c (c_parser_cilk_grainsize): Added a check for the tree
C_MAYBE_CONST_EXPR. If so, then reject the grainsize. Also, convert
the grainsize to long signed int.
2013-02-04 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (cilk_init_builtins): Defined __cilkrts_rethrow builtin
function.
(build_cilk_sync): Added code to set exception flag and exception data
in the stack frame. Also added code to call __cilkrts_rethrow function.
Finally, inserted this code in the appropriate location of if-stmt.
(set_cilk_except_flag): New function.
(clear_cilk_except_flag): Likewise.
(set_cilk_except_data): Likewise.
(build_cilk_catch_sync): Likewise.
* cilk-builtins.def (BUILT_IN_CILK_RETHROW): New builtin function.
* c/c-objc-common.h (LANG_HOOKS_FRAME_CLEANUP): Set this hook to
c_install_body_with_frame_cleanup.
* langhooks-def.h (LANG_HOOKS_FRAME_CLEANUP): New #define.
(lhd_install_body_with_frame_cleanup): New function.
* langhooks.h (lang_hooks_for_cilkplus): New struct field called
"install_body_with_frame_cleanup."
2013-01-25 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-typeck.c (c_finish_return): Added a check if the return expr is
a builtin array-notation function. If so, then we don't issue error.
* c/c-array-notation.c (fix_return_expr): New function.
(expand_array_notation_exprs): Added a RETURN_EXPR case.
2013-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cgraphunit.c (cgraph_finalize_function): If cilkplus is enabled and
if it is a cloned elemental function, then we force its output.
2013-01-22 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-parser.c (c_parser_cilk_grainsize): Added a function call to skip
to the end of pragma whenever an error occurred.
2013-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
* gimplify.c (gimplify_expr): Added a check to see if error has occured.
If so, then don't even try to handle the spawn since the program is
wrong anyway.
2012-12-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
* elem-function-common.c (find_elem_fn_parm_type_1): Freed a malloced
variable.
(find_elem_fn_name): Likewise.
2012-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree-vect-loop.c (vect_determine_vectorization_factor): Replaced all
occurances of "fatal_error" with error_at with vect_location.
(vect_analyze_loop_form): Likewise.
(vect_analyze_loop_operations): Likewise.
(vect_analyze_loop): Likewise.
2012-12-16 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree.h (GTY): Added new field in struct called "decl_auto."
(DECL_AUTO): New #define.
* c/c-typeck.c (c_finish_cilk_loop): Added a check for multiple expr. in
condition or increment inside a _Cilk_for. If so, then emit an error.
(build_compound_expr): Added a check for spawned function call in a
compound expression. If so, then emit an error.
(c_finish_cilk_loop): Added a check for "static," "register," "extern,"
and "auto" declarations in the induction variable of _Cilk_for.
* c/c-parser.c (c_parser_cilk_for_statement): Added a check for
multiple expressions for initialization for a Cilk_for. If so, then
emit an error.
(c_parser_postfix_expression): Added check for consecutive _Cilk_spawn
keyword. If found, emit and error.
(c_parser_declaration_or_fndef): Set DECL_AUTO to 1 if storage class is
set to auto.
2012-12-14 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-parser.c (c_parser_cilk_for_statement): Replaced unknown location with the
correct location value.
* c/c-typeck.c (c_finish_cilk_loop): Checked if the increment is one of
the following: !=, <=, <, >=, or >. Report error otherwise. Also
report error if the induction variable is constant or volatile.
2012-12-13 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree-vect-loop.c (vect_determine_vectorization_factor): Added a
check if assert is requested in simd pragma.
(vect_analyze_loop_form): Likewise.
(vect_analyze_loop_operations): Likewise.
(vect_analyze_loop): Likewise.
* tree-cfgcleanup.c (remove_forwarder_block): Copied the pragma
simd struct index from the removed bb to the destination basic block.
* cfgloop.c (flow_loops_find): Added flag_enable_cilk check.
* tree-cfg.c (gimple_merge_blocks): Copied the pragma simd struct
index from the source to destination.
(remove_bb): Likewise.
2012-12-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-objc-common.h (LANG_HOOKS_CILK_CHECK_CTRL_FLOW): New define.
* cilk.c (store_labels): New function.
(find_all_labels): Likewise.
(check_goto_labels_inside_cilk_for_body): Likewise.
(check_gotos_inside_cilk_for): Likewise.
(check_gotos_outside_cilk_for): Likewise.
(check_cilk_ctrl_flow): Likewise.
* langhooks.c (lhd_cilk_check_ctrl_flow): Likewise.
* langhooks.h (struct lang_hooks_for_cilkplus): New function pointer.
* gimplify.c (gimplify_function_tree): Called cilk_check_ctrl_flow
function that is part of lang_hooks.
* langhooks-def.h (LANG_HOOKS_CILK): New field added.
2012-12-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
* doc/tm.texi (TARGET_CILKPLUS_BUILTIN_MAP_PROCESSOR_TO_ATTR): Added
documentation for this hook.
(TARGET_CILKPLUS_BUILTIN_FIND_PROCESSOR_CODE): Likewise.
(TARGET_CILKPLUS_BUILTIN_FIND_ISA_CODE): Likewise.
(TARGET_CILKPLUS_BUILTIN_FIND_VLENGTH_CODE): Likewise.
* doc/tm.texi.in (TARGET_CILKPLUS_BUILTIN_MAP_PROCESSOR_TO_ATTR): Added
hook.
(TARGET_CILKPLUS_BUILTIN_FIND_PROCESSOR_CODE): Likewise.
(TARGET_CILKPLUS_BUILTIN_FIND_ISA_CODE): Likewise.
(TARGET_CILKPLUS_BUILTIN_FIND_VLENGTH_FOR_PROC): Likewise.
* targhooks.c (default_builtin_map_processor_to_attr): New function.
(default_builtin_find_processor_code): Likewise.
(default_builtin_find_vlength_code): Likewise.
(default_builtin_find_isa_code): Likewise.
* c/c-parser.c (c_parser_elem_fn_processor_clause): Fixed syntax issue
in error message. Added several checks and error reporting for invalid
values.
(c_parser_elem_fn_uniform_clause): Likewise.
(c_parser_elem_fn_linear_clause): Likewise.
(c_parser_elem_fn_vlength_clause): Likewise.
* c/c-decl.c (c_builtin_function_ext_scope): Added a check if external
scope is non-null.
* target.def (TARGET_CILKPLUS): Added this hook and several definitions
such as builtin_map_processor_to_attr, builtin_find_processor_code,
builtin_find_vlength_for_proc, builtin_find_isa_code.
* tree.h (enum elem_fn_parm_type): Moved this to c-common.
* cilk.h (elem_fn_info): Added some extra fields into struct.
* elem-function-common.c (find_processor_code): Called the target
dependent version. Also made several changes to satisfy the new
elemental function mangling format. Finally, fixed up header comments.
(find_suffix): Likewise.
(extract_elem_fn_values): Likewise.
* tree-vect-stmts.c (elem_fn_vect_get_vec_def_for_operand): Return
scalar version for the uniform or linear parameters.
(vectorizable_call): Set the function type correctly.
* tree-inline.c (remap_var_for_cilk): Remove.
(tree_elem_fn_versioning): Fix up header function and reflected changes
in tree_function_versioning into this function.
(copy_tree_body_r): Removed a call for remap_var_for_cilk.
(elem_fn_copy_arguments_for_versioning): Fixed header comments.
* Makefile.in (C_COMMON_OBJS): Added c-family/c-cpp-elem-function.o.
* config/i386/i386.c (type_natural_mode): Added a check for cilk flag
before emitting a note.
(ix86_frame_pointer_required): Added a flag_enable_cilk check.
(ix86_cilkplus_map_proc_to_attr): New function.
(ix86_cilkplus_find_proc_code): Likewise.
(ix86_cilkplus_find_isa_code): Likewise.
(ix86_builtin_find_vlength_for_proc): Likewise.
2012-12-06 Balaji V. Iyer <balaji.v.iyer@intel.com>
* array-notation-common.c: Delete.
* c/c-parser.c (c_parser_declarator_inner): Added a check for array
notation inside a declaration and emit error if found.
(c_parser_if_statement): Added a check if array notation expression
exists in a if_stmt. Only call the fix function if it is also true.
(c_parser_switch_statement): Added a check if array notation exists in
its condition. If so, then we emit an error message.
(c_parser_while_statement): Likewise.
(c_parser_do_statement): Likewise.
(c_parser_for_statement): Likewise.
(c_parser_postfix_expression_after_primary): Did some var name changes.
(c_parser_array_notation): Added the location parameter and added some
error checking functions.
* c/c-typeck.c (build_array_ref): Added a check if array notation inside
array's index is one or less. Otherwise, emit an error.
(build_function_call_vec): Added code to not do type conversion for
builtin array notation __sec_reduce functions.
* c/c-array_notation.c (struct inv_list): New structure.
(find_rank): Changed *rank from int to size_t.
(extract_array_notation_exprs): Removed all variables that used realloc
with vecs and replaced all insertion with the appropriate push function.
(replace_array_notations): Likewise.
(contains_array_notation_expr): Likewise.
(build_array_notation_expr): All the changes as above plus replace
several integer type variables to size_t. Also added location variables
when available instead of plane UNKNOWN_LOCATION. Finally, replaced
malloc and free with the appropriate builtin GCC's equivalent.
(fix_conditional_array_notations_1): Likewise.
(fix_array_notation_expr): Likewise.
(fix_array_notation_call_expr): Likewise.
(fix_builtin_array_notation_fn): All the changes as the above functions
plus added support for MUTATING function.
(is_builtin_array_notation_fn): Added support for MUTATING function.
(find_correct_array_notation_type): Added a check for builtin array
notation function.
(find_inv_trees): New function.
(replace_inv_trees): Likewise.
(replace_invariant_exprs): Likewise.
(build_array_notation_ref): Likewise.
* tree.h: Removed all array notation structures and #defines.
* tree.def: Removed ARRAY_NOTATION_REF tree definition and moved it to
c-common.
* Makefile.in (C_COMMON_OBJS): Added c-family/array-notation-common.c.
(OBJS): Removed array-notation-common.o.
2012-11-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c/c-array-notation.c (fix_conditional_array_notations_1): Added some
code to handle builtin array notations in a condition expr.
(expand_array_notation_exprs): Added a COND_EXPR case.
(find_correct_aray_notation_type): New function.
* c-typeck.c (build_binary_op): Added a check for array notations inside
op0 and op1. If so, then we call find_correct_array_notation_type.
2012-10-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (replace_cilk_metadata): New function.
(cilk_remove_annotated_functions): Called replace_cilk_metadata when
the function is not notify_intrinsic or notify_zc_intrinsic.
* builtins.c (expand_builtin): Removed all the expansion of builtin
cilkscreen functions.
2012-10-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
* gimplify.c (gimplify_call_expr): Moved enter_frame call from the
frame_body creation to right before the detach call.
2012-10-08 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree.h (SPAWN_DETACH_POINT): Removed the restriction of a CALL_EXPR.
2012-09-13 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree-profile.c (tree_profiling): Added a check for cilk plus flag and
whether it is a cilk helper function before calling branch_prob ().
2012-09-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk-spawn.c: Remove file.
* elem-function.c: Likewise.
* Makefile.in: Renamed cilk-spawn.* to c-family/c-cilk.*
2012-08-22 Balaji V. Iyer <balaji.v.iyer@intel.com>
* alias.c (record_component_aliases): Added a check for builtin
trampoline record.
2012-08-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree-inline.c (tree_elem_fn_versioning): Changed the call from
elem_fn_add_local_variables to the add_local_variables function.
(elem_fn_add_local_variables): Remove.
2012-08-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
* gimplify.c (gimplify_expr): Renamed cilk field in langhooks struct to
cilkplus.
(gimplify_function_tree): Make elem_fn_create_fn part of langhooks.
* cilk-spawn.c (cilk_spawnable_constructor): Renamed cilk field in
langhooks struct to cilkplus.
(recognize_spawn): Likewise.
* langhooks.c (lhd_elem_fn_create_fn): Added new function.
2012-07-31 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cfgrtl.c (rtl_verify_flow_info_1): Added a check for Cilk Plus
spawned function.
2012-07-30 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cppbuiltin.c (define_builtin_macros_for_compilation_flags): Fixed
spacing and added a comment to clarify the code's indent.
* elem-function-common.c (find_processor_code): Fixed comments.
(find_vlength_code): Likewise.
(rename_elem_fn): Likewise.
(find_suffix): Likewise.
(find_elem_fn_parm_type_1): Likewise.
(find_elem_fn_parm_type): Likewise.
(find_elem_fn_name): Likewise.
(extract_elem_fn_values): Likewise.
(is_elem_fn): Likewise.
* elem-function.c (create_processor_attribute): Likewise.
* expr.c (expand_expr_real_1): Added clafifying comments.
* final.c (rest_of_handle_comments): Fixed comments.
* array-notation-common.c (mark_cold): Added comment on function header.
(array_notation_init_builtins): Likewise.
(is_sec_implicit_index_fn): Likewise.
(extract_sec_implicit_index_arg): Likewise.
* gimplify.c (gimplify_decl_expr): Added a check for cilkplus flag.
Also fixed spacing.
(gimplify_call_expr): Likewise.
(gimplify_expr): Fixed comments.
* ipa-inline-analysis.c (initialize_inline_failed): Likewise.
* ipa-inline.c (can_inline_edge_p): Likewise.
* langhook.c (lhd_hook_bool_false): Fixed spacing.
* pointer-set.c (pointer_map_traverse_ordered): Remove
(sort_decl): Remove.
* pragma-simd.c (clear_pragma_simd_list): New function.
(clause_resolved_p): Fixed comments.
(set_OK_for_certain_clause): Likewise.
(psv_head_insert): Likewise.
(all_reductions_satisfied_p): Likewise.
(pragma_simd_vectorize_loop_p): Likewise.
(same_var_in_multiple_lists_p): Likewise.
(pragma_simd_assert_requested_P): Fixed spacing and comments.
(find_var_decl): Likewise.
(change_var_decl): Likewise.
* attribs.c (is_elem_fn_attribute_p): Remove.
(decl_attributes): Added a cilkplus flag check.
* builtins.c (expand_builtin): Fixed code and comment spacing.
* builtins.def (): Removed all cilkplus specific functions to a seperate
file.
* c/c-array-notation.c (find_rank): Fixed spacing and wordings in
comments and removed unwanted curly braces and spaces.
(extract_array_notation_exprs): Likewise.
(replace_array_notations): Likewise.
(max): Likewise.
(build_array_notation_expr): Likewise.
(fix_conditional_array_notations_1): Likewise.
(fix_conditional_array_notations): Likewise.
(fix_array_notation_call_expr): Likewise.
(is_builtin_array_notation_fn): Added header comment.
(expand_array_notation_exprs): Likewise.
* c/c-parser.c (c_parser_declaration_or_fndef): Added a check for the
cilkplus flag. Also, fixed spacing and wordings of some comments and
removed unwanted curly braces.
(c_parser_attributes): Likewise.
(c_parser_compound_statement): Likewise.
(c_parser_statement_after_labels): Likewise.
(c_parser_if_statement): Likewise.
(c_parser_switch_statement): Likewise.
(c_parser_while_statement): Likewise.
(c_parser_do_statement): Likewise.
(c_parser_postfix_expression): Likewise.
(c_parser_postfix_expression_after_primary): Likewise.
(c_parser_for_statement): Likewise.
(c_parser_array_notation): Added header comment.
(c_parser_elem_fn_processor_clause): Likewise.
(c_parser_elem_fn_uniform_clause): Likewise.
(c_parser_elem_fn_linear_clause): Likewise.
(c_parser_elem_fn_vlength_clause): Likewise.
(c_parser_elem_fn_expr_list): Likewise.
(c_parser_init): Fixed spacing and wordings in comments, and added
"cilkplus" to add cilkplus related variabled we defined.
(c_parser_for_statement): Likewise.
(c_parser_simd_assert): Likewise.
(c_parser_simd_linear): Likewise.
(c_parser_simd_private): Likewise.
(c_parser_simd_vectorlength): Likewise.
(c_parser_simd_reduction): Likewise.
(c_parser_cilk_grainsize): Likewise.
* c/c-typeck.c (c_finish_loop): Likewise.
(build_binary_op): Added c_save_expr call that was accidentally dropped.
* cfgloop.c (flow_loops_find): Fixed spacing.
* cgraphunit.c (cgraph_decide_if_function_is_needed): Likewise.
(cgraph_finalize_function): Remove unwanted check for cilk_flag.
* cilk-spawn.c (sort_decl): Remove.
(declare_one_free_variable): Fix comments - both spacing and wording.
Also replaced call for pointer_map_traverse_ordered with pointer_map
traverse.
(build_wrapper_type): Likewise.
(init_wd): Added header comment.
(free_wd): Likewise.
(race_warning): Likewise.
(dump_replacement_map): Likewise.
(debug_replacement_map): Likewise.
(check_outlined_calls): Likewise.
(install_body_with_frame_cleanup): Likewise.
(init_cfd): Likewise.
(compute_incr_direction): Likewise.
(tree_operand_nocov): Likewise.
(cilk_simplify_tree): Likewise.
(cilk_loop_convert): Likewise.
(block_for_loop): Likewise.
(build_cilk_wrapper): Fixed comments, removed unwanted curly braces.
(add_variable): Likewise.
(extract_free_variables): Likewise.
(build_cilk_helper_decl): Likewise.
(wrapper_parm_cb): Likewise.
(for_local_cb): Likewise.
(wrapper_local_cb): Likewise.
(copy_decl_for_cilk): Likewise.
(cilk_outline): Likewise.
(check_loop_difference_type): Likewise.
(extract_for_fields): Likewise.
(divide_count): Likewise.
(compute_loop_count): Likewise.
(build_cilk_for_body): Likewise.
(gimplify_cilk_for_2): Likewise.
(gimplify_cilk_for_1): Likewise.
(gimplify_cilk_for): Likewise.
(var_mentioned_p): Likewise.
(declare_cilk_for_parms): Likewise.
* cilk.c (is_elem_fn_attribute_p): Add.
(compare_fn): Likewise.
(is_cilk_function_decl): Likewise.
* config/i386/i386.c (type_natural_mode): Added some comments.
(ix86_function_arg_boundary): Likewise.
(ix86_frame_pointer_required): Removed unwanted curly braces and fixed
comments.
2012-07-25 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (is_cilk_must_expand_fn): Added BUILT_IN_CILK_DETACH case.
2012-07-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (cilk_declare_looper): Added comments to function header. Also
fixed few minor spacing and commenting issues.
(add_field): Likewise.
(install_builtin): Likewise.
(cilk_init_builtin): Likewise.
(cilk_call_setjmp): Likewise.
(cilk_test_flag): Likewise.
(expand_builtin_cilk_detach): Likewise.
(expand_builtin_pop_frame): Likewise.
(build_cilk_function_exit): Likewise.
(make_cilk_frame): Likewise.
(gimplify_cilk_sync): Likewise.
(create_metadata_label): Likewise.
(insert_into_zca_list): Likewise.
(find_zca_data): Likewise.
(get_zca_entry_count): Likewise.
(get_zca_string_table_size): Likewise.
(get_zca_exprs_table_size): Likewise.
(output_zca_table): Likewise.
(output_string_table): Likewise.
(output_expr_table): Likewise.
(delete_zca_list): Likewise.
(cilk_output_metadata): Likewise.
(expand_builtin_cilk_metadata): Likewise.
(cilk_annotationed_fn_p): Likewise.
(cilk_remove_annotated_functions): Likewise.
(is_cilk_must_expand_fn): New function.
* cilk-spawn.c (call_graph_add_fn): Renamed cg_hacks. Also removed
unwanted comments and fixed some spacing.
(gimplify_cilk_spawn): Fixed spacing.
(build_cilk_wrapper): Removed unwanted comments.
(extract_free_variables): Fixed spacing and removed unwanted curly
braces.
(cilk_simplify_tree): Likewise.
(extract_for_fields): Likewise.
(gimplify_cilk_for_1): Likewise.
(declare_cilk_for_parms): Likewise.
(build_cilk_for_body): Removed unwanted comments and renamed cg_hacks to
call_graph_add_fn.
* c/c-parser.c (c_parser_expr_no_commas): Modified some comments and
restructured && || and removed unwanted curly braces.
(c_parser_cilk_grainsize): Likewise.
(c_parser_pragma): Likewise.
(c_parser_cilk_for_statement): Likewise.
* builtins.c (expand_builtin): Replaced plane flag_enable_cilk with
specific function that excludes only a certain set of functions.
* elem-function-common.c (find_vlength_code): Fixed spacing and comments
to conform with the coding standard.
* elem-function.c (create_processor_attributes): Likewise.
(create_optimize_attribute): Likewise.
(replace_return_with_new_var): Likewise.
(elem_fn_build_array): Likewise.
(replace_array_ref_for_vec): Likewise.
(fix_elem_fn_return_value): Likewise.
(add_elem_fn_loop): Likewise.
(add_elem_fn_mask): Likewise.
(call_graph_add_fn): Renamed cg_hacks.
(elem_fn_create_fn): Likewise.
* gimplify.c (gimplify_call_expr): Fixed spacing and removed unwanted
curly braces.
(gimplify_function_tree): Fixed comments and spacing.
* pragma_simd.c (set_OK_for_certain_clause): Fixed code to conform to
popular coding.
(psv_find_node): Fixed comments, spacing and removed unwanted curly
braces.
(psv_head_insert): Likewise.
(pragma_simd_assert_requested): Likewise.
(pragma_simd_acceptable_vlength_p): Likewise.
(pragma_simd_vectorize_loop_p): Likewise.
(pragma_simd_create_private_vars): Likewise.
(find_var_decl): Likewise.
(insert_reduction_values): Likewise.
(same_var_in_multiple_lists_p): Likewise.
(check_off_reduction_var): Likewise.
(find_linear_step_size): Fixed spacing in header comments.
* tree-pretty-print.c (dump_generic_node): Renamed SYNC_STMT and
SPAWN_STMT to CILK_SYNC_STMT and CILK_SPAWN_STMT, respectively.
* tree.def: Likewise.
* tree.c (type_hash_code): Remove.
(build_function_linkage_variant): Likewise.
* tree.h: Removed build_function_linkage_variant and the associated
#defines.
2012-07-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
* gimplify.c (gimplify_expr): Replaced all weak symbols with a
language hook equivalent for handling cilk_spawn, cilk_sync and
cilk_for.
* c/c-objc-common.h (LANG_HOOKS_GIMPLIFY_CILK_SPAWN): Defined this.
(LANG_HOOKS_CILK_VALID_SPAWN): Likewise.
(LANG_HOOKS_GIMPLIFY_CILK_FOR): Likewise.
(LANG_HOOKS_GIMPLIFY_CILK_SYNC): Likewise.
* cilk.h: Replaced all the weak attributes.
* langhooks.c (lhd_recognize_spawn): New function.
(lhd_cilk_valid_spawn): Likewise.
(lhd_gimplify_cilk_spawn): Likewise.
(lhd_gimplify_cilk_for): Likewise.
(lhd_gimplify_cilk_sync): Likewise.
* langhooks-def.h (LANG_HOOKS_CILK_VALID_SPAWN): New define.
(LANG_HOOKS_GIMPLIFY_CILK_FOR): Likewise.
(LANG_HOOKS_GIMPLIFY_CILK_SYNC): Likewise.
(LANG_HOOKS_GIMPLIFY_CILK_SPAWN): Likewise.
(LANG_HOOKS_CILK): Added the 4 new defined phrases above to this
structure.
* c/c-lang.c: Added cilk.h header.
2012-07-16 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_parser_statement_after_labels): Checked if a sync expr
is not an error_mark_node.
* c-decl.c (pop_scope): Removed a exit when any label errors are found.
* dwarf2out.c (dwarf2out_decl): Removed an unnecessary flag_enable_cilk
check.
* cilk.c (cilk_init_builtins): Removed unused code. Also, converted the
enter_frame function to use install_builtin.
2012-07-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (build_binary_op): Added a call to c_save_expr.
* cilk.c (add_field): Changed the location of field to builtin location.
2012-07-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk-spawn.c (compute_loop_var): Changed count_type from the struct
value to the type of the loop variable.
* cgraphunit.c (cgraph_finalize_function): Added a check for cilk flag
not being enabled.
2012-06-27 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree-vect-stmts.c (vectorizable_call): No need to bail out. Some
elemental functions will have more than 3 arguments and those are OK.
* elem-function-common.c (extract_elem_fn_values): Initialized the
vectorlength based on the return value type. Also, if vectorlength is
not set, then we use the initial value based on return value.
2012-06-26 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree-cfg.c (make_blocks): Transferred pragma simd value from one node
to another.
(remove_bb): Likewise.
* pragma_simd.c (pragma_simd_assert_requested_p): Compared with ASSERT
instead of NOASSERT.
(check_off_reduction_var): Checked if reduc_stmt is NULL.
(find_linear_step_size): Unwrapped variable from SSA_NAME type.
2012-06-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR 53672
* dwarf2out.c (dwarf2out_abstract_function): Added a check for the
spawn helper.
(dwarf2out_function_decl): Added a check if CILK_FN_P is set when there
is no function struct.
* cilk.c (expand_builtin_cilk_metadata): Set the CILK_FN_P field to 1.
* cilk-spawn.c (cg-hacks): Likewise.
(gimplify_cilk_for_2): Likewise.
(gimplify_cilk_for): Likewise.
* tree.h (CILK_FN_P): Added new #define to access a base field of tree.
2012-06-15 Balaji V. Iyer <balaji.v.iyer@intel.com>
PR 53672
* dwarf2out.c (dwarf2out_function_decl): Added a check for spawn helper.
2012-06-15 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (install_builtin): Added a check if pushdecl is successful.
Only update the fndecl if it is.
(cilk_init_builtins): Removed duplicate code and changed fixed a small
bug.
(get_frame_arg): Added a check if compatable_p is available.
(expand_builtin_cilk_metadata): Removed attribute_unused for the parms,
and set is_cilk_function whenever notify_intrinsic is set.
* tree.h (GTY): Added a new enum field called BUILT_IN_CILK.
* builtins.def: Set the builtin type as BUILT_IN_CILK for all cilk
related functions.
2012-06-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (cilk_init_builtins): Made the stack frame structure runtime
independent.
2012-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk-spawn.c (compute_loop_var): Removed an unwanted assert.
(build_cilk_for_body): Changed var type from min_parms's to the original
var_type. This change is propagated in several places with the
appropriate type conversions.
2012-06-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree-inline.c (remap_gimple_op_r): Added a check for NON-NULL
TREE_BLOCK, if so then clear it.
2012-05-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_parser_attributes): Added a check for vector attribute.
* elem-function-common.c (find_vlength_code): Added a check for
no processor type.
* elem-function.c (cg_hacks): Added a check if cfun is non-NULL.
(elem_fn_create_fn): Marked function as already cloned in function tree
node.
* ipa.c (symtab_remove_unreachable_nodes): Added a check for cloned
elemental function.
* cgraphunit.c (cgraph_analyze_functions): Likewise.
2012-05-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
* elem-function.c (elem_fn_create_fn): Mistakenly removed a necessary
attribute.
(create_processor_attribute): Added a underscore
between pentium and 4 for sse3, removed an extra 's' in
sse3 for core2_duo and put underscore between core and 2 in core2.
* elem-function-common.c (find_processor_code): Likewise.
(extract_elem_fn_values): Fixed a bug for mask parsing.
* c-parser.c (c_parser_elem_fn_processor_attribute): Same change as the
create_processor_attribute function.
(c_parser_elem_fn_expr_list): Changed unmask to nomask.
2012-05-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cgraphunit.c (cgraph_decide_is_function_needed): Added a check for
a cloned elemental function in the checking assert.
* tree-inline.c (elem_fn_add_local_variables): Make vlength as an
unused attribute. Also stopped moving local variables to vector values.
(elem_fn_copy_arguments_for_versioning): Added a bool called masked as
a new parameter. Also, added a masked parameter to the cloned function
if this bool is set to true. Also, stopped setting arguments to
GIMPLE_REG.
(initialize_elem_fn_cfun): New function.
(tree_elem_fn_versioning): Removed several information pertaining to
maintaining a CFG. Also added a masked bool parameter to be passed into
several local functions. Called initialize_elem_fn_cfun function.
* gimplify.c (gimplify_function_tree): Called function to create
elemental function when the function is marked appropriately.
* elem-function-common.c (find_processor_code): Moved function from
elem-function.c.
(find_vlength_code): Likewise.
(rename_elem_fn): Likewise.
(find_suffix): Likewise.
(find_elem_fn_parm_type_1): Likewise.
(find_elem_fn_parm_type): Likewise.
(find_elem_fn_name): Likewise.
(extract_elem_fn_values): Likewise.
(is_elem_fn): Likewise.
* elem-function.c (create_optimize_attribute): Changed sprintf to an
if-statement.
(find_suffix): Changed a string copy to string concatination.
(replace_return_with_new_var): New function.
(elem_fn_build_array): Likewise.
(replace_array_ref_for_vec): Likewise.
(fix_elem_fn_return_value): Likewise.
(add_elem_fn_loop): Likewise.
(add_elem_fn_mask): Likewise.
(cg_hacks): Likewise.
(elem_fn_create_fn): Likewise.
* passes.c (init_optimization_passes): Removed elem_fn_pass.
2012-05-08 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (expand_builtin_cilk_detach): Added mode type for
plus_constant.
2012-05-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_parser_declaration_or_fndef): Saved function arguments
for an elemental function.
* elem-function.c (find_elem_fn_parm_type_1): Added step-size parameter.
(find_elem_fn_parm_type): Likewise.
* tree-vect-stmts.c (vect_get_vec_def_for_operand): Added step-size
support for linear clause. Also called elem_fn_linear_init_vector for
linear clause.
(vectorizable_call): When linear clause is set, set the vector type to
constant_def.
(elem_fn_linear_init_vector): New function.
* tree.c (build_elem_fn_linear_vector_from_val): Likewise.
2012-04-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
* elem-function.c (find_elem_fn_param_type_1): New function.
(find_elem_fn_param_type): Likewise.
(find_elem_fn_name): Likewise.
(is_elem_fn): Make it unstatic.
* tree-data-ref.c (find_data_references_in_stmt): Added support for
functions that can be made to elemental functions.
* tree-vect-stmts.c (vect_get_vec_def_for_operand): Added a check for
the parameters to see whether it is uniform, linear or neither.
(vectorizable_function): Handled code to substitute regular function
with the equivalent elemental function.
(vectorizable_call): Set the function type for substituted elemental
function.
* tree.h (enum elem_fn_parm_type): New enum.
2012-04-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
* final.c (rest_of_handle_final): Moved outputing ZCA data after
assembling end function.
2012-04-16 Balaji V. Iyer <balaji.v.iyer@intel.com>
* elem-function.c (is_elem_fn): Changed the parameter type from a
cgraph_node to tree of type function decl.
(create_elem_vec_fn): Likewise.
2012-04-14 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cgraphunit.c (cgraph_add_new_function): Replaced cgraph_create_node
with cgraph_get_create_node.
* c-array-notation.c (find_rank): Changed a check for true to false.
(fix_builtin_array_notation_fn): Changed a false parm to true.
2012-04-13 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cgraph.c (cgraph_add_new_function): Remove.
* elem-function.c (is_elem_fn): Replaced all node->decl with
node->symbol.decl.
(create_elem_vec_fn): Likewise.
(create_elem_fn_nodes): Replaced all calls for decl and externally
visible from cgraph_node with cgraph_node->symbol. Also removed
TODO_dump_func.
* cilk-low.c: Removed TODO_dump_func.
2012-04-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
* elem-function.c (create_elem_vec_fn): Checked if function struct of
decl is present.
2012-04-06 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_parser_elem_fn_expr_list): Fixed a bug and consumed
one token.
2012-04-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
* config/i386/i386.c (type_natural_mode): Added a flag_enable_cilk
check.
(ix86_function_arg_boundary): Likewise.
* expr.c (expand_expr_real_1): Likewise.
* elem-function.c (create_processor_attribute): Added avx to target
string.
(create_elem_fn_nodes): called copy_node to new_decl's type. Replaced
tree_function_versioning call with tree_elem_fn_versioning.
* tree-inline.c (elem_fn_add_local_variables): New function.
(elem_fn_copy_arguments_for_versioning): Likewise.
(tree_elem_fn_versioning): Likewise.
2012-03-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
* elem-function.c (extract_elem_fn_values): Initialized proc_type field
to NULL.
2012-03-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
* elem-function.c (find_processor_code): Returned default value when
no value is given.
(find_vlength_code): Likewise.
2012-03-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (expand_array_notation_exprs): New function.
(fix_array_notation_call_expr): Likewise.
* c-parser.c (c_parser_compound_statement): Added a check for array
notation exprs.
(c_parser_expr_no_commas): Removed call to fix_array_notation_expr.
2012-03-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk-spawn.c (extract_free_variables): Removed TREE_VECTOR_CST_ELTS
with a combination of VECTOR_CST_NELTS and VECTOR_CST_ELT.
* pragma-simd.c (find_var_decl): Likewise.
(change_var_decl): Likewise.
2012-03-16 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk-spawn.c (cilk_valid_spawn): Unwrapped the call_expr from expr
and cleanup point statements.
(gimplify_cilk_spawn): Likewise.
* function.c (allocate_struct_function): Initialized calls_spawns
correctly.
* tree.h: Removed cilk_hyper_flag and replaced with cilk_has_spawn.
Also added DECL_HAS_SPAWN_P and removed DECL_HYPER_LOOKUP_P.
2012-03-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (convert_arguments): Added array notation check for
funtion values.
* c-array-notation.c (extract_array_notation_exprs): Handled TREE_LIST.
2012-03-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* attribs.c (decl_attributes): Concatinated existing attributes with
vector attributes.
* c-decl.c (bind): Added a check if scope is not null.
* elem-function.c (rename_elm_fn): New function.
(is_elem_fn): Likewise.
(find_processor_code): Likewise.
(find_vlength_code): Likewise.
(create_processor_attribute): Likewise.
(create_optimize_attribute): Likewise.
(find_suffix): Likewise.
(create_elem_fn_nodes): Likewise.
(extract_elem_fn_values): Likewise.
(create_elem_vec_fn): Likewise.
* passes.c (init_optimization_passes): Added elemental function pass.
2012-03-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
* attribs.c (decl_attributes): Added a check for elemental function
attribute.
(is_elem_fn_attribute_p): New function.
* c-parser.c (c_parser_attributes): Added a check for vector attribute.
(c_parser_elem_fn_processor_clause): New function.
(c_parser_elem_fn_uniform_clause): Likewise.
(c_parser_elem_fn_linear_clause): Likewise.
(c_parser_elem_fn_vlength_clause): Likewise.
(c_parser_elem_fn_expr_list): Likewise.
2012-02-15 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (cilk_fix_stack_reg): New function.
(expand_buitin_cilk_metadata): Added a check for memory type rtx and do
a call to the cilk_fix_reg_stack function.
2012-02-14 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (contains_array_notation_exprs): Added a check
for NULL expr.
2012-02-13 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (fix_builtin_array_notation_fn): Added a
REDUCE_ANY_NONZEROS, REDUCE_ALL_NONZEROS and REDUCE_CUSTOM case.
(is_builtin_array_notation_fn): Replaced all occurances of "zeros" in
string with "zero." Also, added a case for REDUCE_ALL_ZEROS and
REDUCE_ALL_NONZEROS and REDUCE_CUSTOM.
* array-notation-common.c (array_notation_init_builtins): Likewise.
(is_sec_implicit_index_fn): Added a check for FUNCTION_DECL.
* tree.h: Added REDUCE_ANY_NONZEROS and REDUCE_ALL_NONZEROS into enum.
* c-typeck.c (convert_arguments): Added a check for array notation in
the function decl.
2012-01-31 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (build_array_notation_expr): Added another
dimension to lhs variables to handle gather scatter of array notations.
2012-01-26 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (fix_builtin_array_notation_fn): Initialized the
maximum/minimum value for max/min index builtin function.
2012-01-26 Balaji V. Iyer <balaji.v.iyer@intel.com>
* array-notation-common.c (array_notation_init_builtins): Added the
internal array notation function "__sec_reduce_implicit_index."
(is_sec_implicit_index_fn): New function.
(extract_sec_implicit_index_arg): Likewise.
* c-array-notation.c (extract_array_notation_exprs): Added a check to
see if we encountered sec_implicit_index function.
(replace_array_notations): Likewise.
(build_array_notation_expr): Likewise.
2012-01-25 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notation.c (replace_array_notations): Added a new bool as
parameter and added support for it.
(find_rank): Likewise.
(extract_array_notation_exprs): Likewise.
(replace_array_notations): Likewise.
(max): New function.
(fix_builtin_array_notation_fn): Likewise.
(is_builtin_array_notation_fn): Likewise.
(contains_array_notation_expr): Likewise.
(build_array_notation_expr): Added support for builtin function.
Changed all for-loops that have comparison with lhs_rank, with
max (lhs_rank and rhs_rank). Also added a check if array_expr_lhs is
NULL, then we set that equal to lhs.
* c-parser.c (c_parser_expr_no_commas): Added support for array
notations inside function calls (i.e. function that takes array notation
as input and returns a scalar value).
* c-typeck.c (convert_arguments): If array notation is present inside
a function call, then we skip it for now since we will fix it up in a
later step.
2012-01-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
* Makefile.in: Added array-notation-common.c file for compilation.
* array-notation-common.c (mark_cold): New function.
(array_notation_init_builtins): Likewise.
* tree.h: Added a new enum list called "array_notation_reduce_type."
2012-01-16 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (cilk_remove_annotated_functions): Added a int cast for
VEC_length in for-loop condition.
2011-12-25 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notations.c (find_rank): Added a check for CALL_EXPR and
AGGR_INIT_EXPR.
(extract_array_notation_exprs): Likewise.
(replace_array_notations): Likewise.
(build_array_notation_expr): Changed variable from ii to jj.
(fix_array_notation_expr): Moved default_function_array_read_conversion
into if and else-if to handle function call case.
* c-parser.c (c_parser_expr_no_commas): Added a check for CALL_EXPR.
2011-12-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notations.c (fix_array_notation_expr): New function.
(fix_conditional_array_notations_1): Fixed a bug, by changing greater
than to less-than.
* c-parser.c (c_parser_unary_expression): Added support to handle
array notations in unary operations.
(c_parser_postfix_expression_after_primary): Likewise.
2011-12-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-array-notations.c (fix_conditional_array_notations): New function.
(fix_conditional_array_notations_1): Likewise.
(extract_array_notation_exprs): Added a check for STATEMENT_LIST.
(replace_array_notations): Likewise.
* c-parser.c (c_parser_if_statement): Added a call to the function
fix_conditional_array_notations. Also stored the compound statement
to a variable to be passed into fix_conditional_array_notations.
2011-12-22 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (find_rank): Moved function to c-array-notations.c
(build_array_notation_expr): Likewise. Also added support for a
polynomial right-hand-size expression.
(replace_array_notations): New function.
(extract_array_notation_exprs): New function.
2011-12-16 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (find_rank): Modified to find rank of array notation
inside expressions such as PLUS_EXPR.
(build_array_notation_expr): Added support for N-Diamension array
notation.
2011-12-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-typeck.c (build_array_notation_expr): New function.
* c-parser.c (c_parser_array_notation): Likewise.
(c_parser_array_notation): Likewise.
(c_parser_expr_no_commas): Added if statement to handle ARRAY_NOTATION.
(c_parser_postfix_expression_after_primary): Added a check to see
if ARRAY NOTATION was used, and if so then added appropriate code to
handle it.
* gimplify.c (gimplify_expr): Added a case for ARRAY_NOTATION_REF.
* tree.def (ARRAY_NOTATION_REF): New tree-type for array_notation.
* tree.h (ARRAY_NOTATION_CHECK): New define for ARRAY_NOTATION TREE
(ARRAY_NOTATION_ARRAY): Likewise.
(ARRAY_NOTATION_START): Likewise.
(ARRAY_NOTATION_END): Likewise.
(ARRAY_NOTATION_STRIDE): Likewise.
(ARRAY_NOTATION_TYPE): Likewise.
* tree-vectorizer.c (vectorize_loops): Added the function call
optimize_loop_nest_for_speed_p () into the if-loop.
2011-12-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (create_metadata_label): Make notes instead of CODE_LABEL.
(delete_zca_list): New function.
(cilk_output_metadata): Called delete_zca_list().
* final.c (rest_of_handle_final): Added a call for
cilk_output_metadata.
* toplev.c (compile_file): Removed call for cilk_output_metadata.
2011-12-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
* builtin.c (expand_builtin): Added support for NOTIFY_INTRINSIC and
NOTIFY_ZC_INTRINSIC.
* builtins.def: Likewise.
* cilk.h: Likewise.
* cilk.c (cilk_annotated_function_p): Likewise.
(cilk_init_builtins): Likewise. Also, removed underscores
from cilk_spawn_prepare and cilk_spawn_or_continue function declaration.
(zca_stack): Changed a stack-based implementation to a linked-list
based implementation.
(insert_into_zca_list): Likewise.
(find_zca_data): Likewise.
(get_zca_entry): Likewise.
(get_zca_string_table_size): Likewise.
(output_zca_table): Likewise.
(output_expr_table): Likewise.
(cilk_remove_annotated_functions): Likewise.
* dwarf2out.c (dwarf2out_var_location): Make early return if cilk is
enabled.
* function.h (struct function): Added calls_notify_intrinsic field.
* sched-rgn.c (schedule_insns): Check if cilk is enabled along with
whether the notify_intrinsic is used in function.
2011-12-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (cilk_init_builtins): Removed prefixing undescores from
cilk_spawn_prepare and cilk_spawn_or_continue.
(get_zca_table_size): Added 1 to length of string.
(output_zca_section): Likewise.
(cilk_output_metadata): Added a '0' to indicate end of string. Also
removed 'w' from the section type. Finally, changed the entry count
size from 4 to 2.
(expand_builtin_cilk_metadata): Flipped the bytes of dwarf_expr in two
places.
(output_string_table): Removed unnecessary curly braces.
(cilk_remove_annotated_functions): Likewise.
* dwarf2out.c (dwarf2out_var_location): Make early return if cilk is
enabled.
2011-11-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* opts.c: Removed the CILKPLUS_IMPLEMENTED macro and the #ifdef and
#ifndefs that uses this macro.
2011-11-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk-spawn.c (wrapper_parm_cb): Changed a const tree cast
to (tree *).
(for_local_cb): Likewise.
(wrapper_local_cb): Likewise.
2011-10-22 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (install_builtin): Changed implicit_built_in_decls[] to
set_builtin_decl ().
(cilk_call_setjmp): Replaced implicit_built_in_decls[] to
builtin_decl_implicit ().
2011-10-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
* builtins.def: Removed duplicate disable_instrumentation call.
* cilk-spawn.c (cg_hacks): Set the "is_cilk_helper_function" flag.
* cilk.c: Added new vector called zca_stack.
(cilk_init_builtins): Removed underscores from zca functions.
(create_metadata_label): New function.
(get_zca_entry_count): Likewise.
(get_zca_string_table_size): Likewise.
(get_zca_exprs_table_size): Likewise.
(output_zca_table): Likewise.
(output_string_table): Likewise.
(output_expr_table): Likewise.
(cilk_output_metadata): Likewise.
(expand_builtin_cilk_metadata): Likewise.
(cilk_annotated_function_p): Likewise.
(cilk_remove_annotated_function): Likewise.
* cilk.h (ZCA_MAJOR_VER_NUMBER): New define.
(ZCA_MINOR_VER_NUMBER): Likewise.
(struct zca_data_t): Added new data structure.
(expand_builtin_cilk_metadata): New function declaration.
(cilk_output_metadata): Likewise.
(cilk_remove_annotated_functions): Likewise.
(cilk_annotated_function_p): Likewise.
* dwarf2out.c (loc_descriptor): Made this function universal, that is,
non-static.
* dwarf2out.h: Added a prototype for loc_descriptor().
* final.c (final): Added a call to cilk_remove_annotated_functions().
* function.h (struct function): Added is_cilk_helper_function variable.
* sched-rgn.c (schedule_insns): Added a check to see if we are inside
cilk_helper.
* toplev.c (compile_file): Added a call to cilk_output_metadata().
2011-10-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
* builtin.c (expand_builtin): Added case statements for ZCA
annotation functions support.
* cilk.c (get_zca_exprs_table_size): New function for ZCA support.
(output_zca_table): Likewise.
(output_string_table): Likewise.
(output_expr_table): Likewise.
(cilk_output_metadata): Likewise.
* cilk.h: Added function declarations for the newly added function in
cilk.c. Also added zca_data structure and zca_data stack.
* toplev.c (compile_file): Added a call to cilk_output_metadata.
2011-10-06 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-decl.c (c_make_cilk_frame): Added cilk_enter_begin and
cilk_enter_end function calls into spawn expansion.
* cilk-spawn.c (install_body_with_frame_cleanup): Added
cilk_enter_help_begin and cilk_enter_end function calls into spawn
expansion.
(gimplify_cilk_spawn): Inserted cilk_spawn_prepare and
cilk_spawn_or_continue function calls into spawn expansion.
* cilk.c (build_cilk_function_exit): Added cilk_leave_begin and
cilk_leave_end function calls into spawn expansion.
(build_cilk_sync): Added sync_begin and sync_end function calls into
sync expansion.
* gimplify.c (gimplify_call_expr): Added detach_begin and detach_end
before calling cilkrts_detach.
2011-10-04 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cilk.c (cilk_init_builtins): Added Cilkscreen builtin function
declarations.
* builtins.def: Added Cilkscreen builtin functions expand tags.
* cilk.h: Added Cilkscreen builtin functions in the cilk_trees chain.
2011-09-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
* ipa-inline.c(can_inline_edge_p): Added a check for function
that spawns.
* ipa-inline-analysis.c (initialize_inline_failed): Likewise.
2011-09-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
* tree.c (walk_tree_1): Handled the "cilk_for" case.
* tree.h (CILK_FOR_VAR): Use 5 instead of 4 as TREE_OPERAND
argument.
2011-09-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
* pragma_simd.c: Added the standard GCC header.
2011-09-08 Balaji V. Iyer <balaji.v.iyer@intel.com>
* gimplify.c (gimplify_call_expr): Removed if (SPAWN_CALL_P (*expr))
statement.
2011-09-06 Balaji V. Iyer <balaji.v.iyer@intel.com>
* cppbuiltin.c (define_builtin_macros_for_compliation_flags): Added
the __cilk keyword and set it to 200.
2011-08-08 Balaji V. Iyer <balaji.v.iyer@intel.com>
* c-parser.c (c_parse_init): Added if statement to check if
flag_enable_cilk is turned off. If so, then or D_CILK mask with mask.
(c_parser_cilk_for_statement): Added new function
(c_parser_cilk_grainsize): Likewise.
(c_parser_simd_linear): Likewise.
(c_parser_simd_private): Likewise.
(c_parser_simd_assert): Likewise.
(c_parser_simd_vectorlength): Likewise.
(c_parser_simd_reduction): Likewise.
(c_parser_statement_after_labels): Added new case labels to handle
RID_CILK_FOR and RID_CILK_SYNC.
* c-typeck.c (c_finish_bc_stmt): Added "case 2" to check to see if
there are break statements inside a cilk_for loop.
(c_finish_cilk_loop): Added new function.
(c_build_sync): Likewise.
(c_calls_spawns): Likewise.
* cilk.c: New file.
* cilk.h: Likewise.
* cilk-spawn.c: Likewise.
* function.h (struct GTY(()) function): Added "cilk_frame_decl" and
"is_cilk_function" elements into this structure.
* gimplify.c (gimplify_call_expr): Added code to check if (is_detach)
is set. If so, then output the appropriate code for detach expression.
Also, output appropriate code for pop_frame operation.
(gimplify_expr): Check if a valid found is encountered. If found,
then do "cilk_gimplify_spawn" on the expression.
(gimplify_expr): Added case statements for CILK_FOR_STMT and
SYNC_STMT.
* Make-lang.in: Added the newly added files into the compiliation list.
* Makefile.in: Added cilk files to compile with the gcc files.
* pragma_simd.c: New file.
* passes.c(init_optimization_passes): Added NEXT_PASS(pass_expand_cilk)
* tree-pretty-print.c (dump_generic_node): Added a new case statement
SYNC_STMT, CILK_FOR_STMT, to print a cilk_for and sync statement.
* tree.h (struct GTY(()) tree base): Added "is_cilk_spawn" element into
structure. Also added "pragma_simd_index" element into this structure.
(SPAWN_CALL_P, SPAWN_DETACH_POINT, DECL_DETACHES_P, DECL_SET_KNOT):
New defines.
(CILK_KNOT_NONE, CILK_KNOT_SPAWN, CILK_KNOT_SYNC, CILK_KNOT_FLUSH):
Likewise.
(struct GTY(()) tree_function_decl): Added "cilk_knot_type" and
"cilk_hyper_flag" into this structure.
(FOR_STMT_CHECK2): Added new define to check if it is for or cilk_for.
(FOR_INIT_STMT, FOR_COND, FOR_EXPR, FOR_BODY): New defines.
(CILK_FOR_VAR, CILK_FOR_INIT, CILK_FOR_GRAIN): Likewise.
(INVALID_PRAGMA_SIMD_SLOT): Likewise.
(enum pragma_simd_kind) : Newly added enum to hold different pragma
simd clauses.
(struct reduction values): New structure to hold #pragma simd reduction
information.
(struct pragma_simd_values): Structure to hold pragma simd clause
values.
(PRAGMA_SIMD_INDEX): New define.
(LABEL_EXPR_PRAGMA_SIMD_INDEX): Likewise.
(struct GTY(()) tree_label_decl): Added new variable
"pragma_simd_index"
* tree-inline.c (struct copy_body_data): Added remap_var_for_cilk
variable.
* tree-vect-loop.c (vect_determine_vectorization_factor): Added if
statements in multiple locations to check if flag enable cilk is
enabled and if pragma simd assert is requested. If so, then print
appropriate error message.
|