aboutsummaryrefslogtreecommitdiff
path: root/ChangeLog.cell
blob: 7ef2ae7def7d23910094e11901d0d285defdb4b7 (plain)
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
2008-11-17  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>

	Add aggressive conditional move optimizations.

	* gcc/ifcvt.c (aggressive_cmov, block_modifies_live_reg,
	find_andif_orif_block): Declare. 
	(safe_to_transform_p, cost_effective_p, validate_remap_regs_1,
	validate_remap_regs, remap_instructions, hoist_instructions,
	mark_regs_in_rtx, copy_regs_in_rtx, noce_try_cmove_aggressive,
	noce_process_andif_orif_block, find_andif_orif_block,
	block_modifies_live_reg): Define.
	(noce_find_if_block): Call noce_try_cmove_aggressive.
	(find_if_header): Call find_andif_orif_block.
	(if_convert): Proccess blocks in post order.
	* gcc/common.opt (-faggressive-cmov): New option.

2008-09-22  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>

	Use a better method to adjust hint labels on branches.

	* gcc/config/spu/spu.c (spu_emit_branch_or_set,
	spu_emit_branch_hint, spu_machine_dependent_reorg): Emit hint
	labels before branch and adjust offset after adding nops.

2008-09-10  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>

	Support dynamic hints via __builtin_expect with a non-constant
	second argument.

	* gcc/doc/md.texi (builtin_expect): Document new pattern.
	* gcc/builtins.c (expand_builtin_expect): Handle target defined
	builtin_expect.
	* gcc/predict.c (strip_builtin_expect): Don't strip all the time
	when the target provides builtin_expect.
	* gcc/config/spu/spu.c (spu_expect_op0, spu_expect_op1): Define.
	(spu_emit_branch_or_set): Handle spu_expect_op0 and spu_expect_op1.
	(spu_emit_branch_hint): Handle dynamic hints.
	(get_branch_target): Handle expect_then and expect_else rtl.
	(insn_clobbers_hbr): Return true for hints.
	(spu_machine_dependent_reorg): Reposition lables for hints.
	* gcc/config/spu/spu.h (spu_expect_op0, spu_expect_op1): Declare.
	* gcc/config/spu/spu.md (expect_then, expect_else, builtin_expect):
	Declare.


2008-08-27  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>

	Fix a bug caused by the previous change.

	* gcc/config/spu/spu.c (spu_init_expanders) : Pregenerate
	a couple of pseudo-registers.

2008-08-27  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
	
	Improve code generated for loads and stores on SPU.

	* gcc/doc/tm.texi (SPLIT_BEFORE_CSE2) : Document.
	* gcc/tree-pass.h (pass_split_before_cse2) : Declare.
	* gcc/final.c (rest_of_clean_state) : Initialize split0_completed.
	* gcc/testsuite/gcc.target/spu/split0-1.c : Add test.
	* gcc/recog.c (split0_completed) : Define.
	(gate_handle_split_before_cse2, rest_of_handle_split_before_cse2) :
	New functions.
	(pass_split_before_cse2) : New pass.
	* gcc/rtl.h (split0_completed) : Declare.
	* gcc/passes.c (init_optimization_passes) : Add
	pass_split_before_cse2 before pass_cse2 .
	* gcc/config/spu/spu-protos.h (spu_legitimate_address) : Add
	for_split argument.
	(aligned_mem_p, spu_valid_move) : Remove prototypes.
	(spu_split_load, spu_split_store) : Change return type to int.
	* gcc/config/spu/predicates.md (spu_mem_operand) : Remove.
	(spu_dest_operand) : Add.
	* gcc/config/spu/spu-builtins.md (spu_lqd, spu_lqx, spu_lqa,
	spu_lqr, spu_stqd, spu_stqx, spu_stqa, spu_stqr) : Remove AND
	operation.
	* gcc/config/spu/spu.c (regno_aligned_for_load) : Remove.
	(reg_aligned_for_addr, address_needs_split) : New functions.
	(spu_legitimate_address, spu_expand_mov, spu_split_load,
	spu_split_store) : Update.
	* gcc/config/spu/spu.h (REG_ALIGN, SPLIT_BEFORE_CSE2) : Define.
	(GO_IF_LEGITIMATE_ADDRESS) : Update for spu_legitimate_address.
	* gcc/config/spu/spu.md ("_mov<mode>", "_movdi", "_movti") : Update
	predicates.
	("load", "store") : Change to define_split.

2008-08-26  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>
	
	Fix hbrp issues.

	* haifa-sched.c (sched_emit_insn) : Define.
	* sched-int.h (sched_emit_insn) : Add prototype.
	* config/spu/spu.c (spu_sched_reorder) : Use sched_emit_insn.
	(insert_hbrp_for_ilb_runout) : Put nops between hbr and hbrp insns.

2008-08-19  Trevor Smigiel <Trevor_Smigiel@playstation.sony.com>

	Improved branch hints, safe hints, and scheduling.

	* doc/invoke.texi (-mdual-nops, -mhint-max-nops,
	-mhint-max-distance -msafe-hints) : Document.
	* config/spu/spu.c (spu_flag_var_tracking): New.
	(TARGET_SCHED_INIT_GLOBAL, TARGET_SCHED_INIT,
	TARGET_SCHED_REORDER, TARGET_SCHED_REORDER2,
	TARGET_ASM_FILE_START): Define.
	(TARGET_SCHED_ADJUST_PRIORITY): Remove.
	(STOP_HINT_P, HINTED_P, SCHED_ON_EVEN_P): Define.
	(spu_emit_branch_hint) Add blocks argument.
	(insert_branch_hints, insert_nops) Remove. 
	(pad_bb, insert_hbrp_for_ilb_runout, insert_hbrp, in_spu_reorg,
	uses_ls_unit, spu_sched_init_global, spu_sched_init,
	spu_sched_reorder, asm_file_start) New functions.
	(clock_var, spu_sched_length, pipe0_clock, 
	pipe1_clock, prev_clock_var, prev_priority,
	spu_ls_first, prev_ls_clock) New static variables.
	* config/spu/spu.h (TARGET_DEFAULT): Add MASK_SAFE_HINTS
	* config/spu.md (iprefetch): Add operand, make it clobber MEM.
	(nopn_nv): Add a non-volatile version of nop.
	* config/spu/spu.opt (-mdual-nops, -mhint-max-nops,
	-mhint-max-distance, -msafe-hints): New options.        

2008-08-27  Ben Elliston  <bje@au.ibm.com>

	* gcc/tree.h (check_qualified_type): Use CONST_CAST_TREE as
	needed.
	* gcc/langhooks.c (lhd_tree_dump_type_quals): Likewise.
	* gcc/c-typeck.c (comptypes_internal): Likewise.
	* gcc/cp/typeck.c (cp_type_quals): Likewise.

2008-08-26  Ben Elliston  <bje@au.ibm.com>

	* gcc/config/spu/spu.c (spu_valid_addr_space): Take a
	const_tree argument.

2008-08-26  Ben Elliston  <bje@au.ibm.com>
	    Alan Modra  <amodra@au.ibm.com>

	* gcc/c-decl.c (start_decl): Set DECL_SECTION_NAME to "._ea" for
	__ea variable definitions.
	(grokdeclarator): Allow static and global __ea variable
	definitions.
	* gcc/config/spu/spu.c (TARGET_SECTION_TYPE_FLAGS): Define.
	(spu_section_type_flags): New function.
	(ea_symbol_ref): Convert to for_each_rtx predicate.
	(spu_legitimate_constant_p): Reject __ea symbol refs wrapped in
	const.
	(spu_legitimate_address): Likewise.
	* gcc/config/spu/spu.h (TEXT_SECTION_ASM_OP): Add a tab.
	(DATA_SECTION_ASM_OP): Likewise.
	* gcc/config/spu/spu.opt: Add -mall-ea.
	* gcc/c-typeck.c (build_array_ref): Do not strip qualifiers from
	the array element type.  (PR 33726)

	* gcc/c-common.h (strip_array_types): Move declaration to..
	* gcc/tree.h: ..here.
	(OTHER_ADDR_SPACE_POINTER_TYPE_P,
	GENERIC_ADDR_SPACE_POINTER_TYPE_P, TYPE_QUALS): Invoke
	strip_array_types on TYPE_ADDR_SPACE argument.
	* gcc/c-objc-common.c (c_types_compatible_p): Likewise.
	* gcc/config/spu/spu.h (ASM_OUTPUT_SYMBOL_REF): Likewise.
	* gcc/config/spu/spu.c (ea_symbol_ref): Likewise.
	* gcc/convert.c (convert_to_integer): Likewise.
	* gcc/c-parser.c (c_parser_postfix_expression_after_paren_type): Ditto.
	* gcc/dwarf2out.c (modified_type_die): Likewise.
	* gcc/emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
	* gcc/varasm (make_decl_rtl): Likewise.
	* gcc/tree.c (build_pointer_type): Likewise.
	(strip_array_types): Move from here ..
	* gcc/c-common.c: .. to here.
	* gcc/testsuite/gcc.target/spu/ea/compile.c: Update test.
	* gcc/testsuite/gcc.target/spu/ea/errors.c: Likewise.
	* gcc/testsuite/gcc.target/spu/cache.c: Likewise.

2008-08-25  Ben Elliston  <bje@au.ibm.com>

	* gcc/fwprop.c (PR_HANDLE_MEM): Remove trailing comma.

2008-08-25  Ulrich Weigand  <uweigand@de.ibm.com>

	* gcc/config/spu/cachemgr.c: Make interrupt safe and respect tag
	mask policy.

2008-08-20  Ben Elliston  <bje@au.ibm.com>

	Backport from FSF mainline:
	2008-08-20  Ben Elliston  <bje@au.ibm.com>

	* c-decl.c: Include targhooks.h.
	(shadow_tag_warned): Include declspecs->address_space.
	(quals_from_declspecs): Encode address space number into quals.
	(grokdeclarator): Warn about duplicate address space qualifiers.
	Issue various diagnostics as specified by N1169.
	(build_null_declspecs): Clear ret->address_space.
	(declspecs_add_addrspace): New function.
	* c-objc-common.c (c_types_compatible_p): Two types in different
	address spaces are not compatible.
	* c-parser.c (enum c_id_kind): Add C_ID_ADDRSPACE.
	(c_lex_one_token): Set token->id_kind to C_ID_ADDRSPACE if the
	token is a recognised address space.
	(c_token_starts_typename): Return true for C_ID_ADDRSPACE.
	(c_token_starts_declspecs): Likewise.
	(c_parser_declspecs): Handle C_ID_ADDRSPACE.
	(c_parser_postfix_expression_after_paren_type): Reject compound
	literals qualified by an address space qualifier.	
	* c-pretty-print.c: Include target.h and target-def.h.
	(pp_c_type_qualifier_list): Print address space if non-zero.
	* c-tree.h (struct c_declspecs): Add address_space field.
	* c-typeck.c (build_binary_op): If an operand is a pointer into
	another address space, make the result of the comparison such a
	pointer also.
	* convert.c: Include target.h.
	(convert_to_pointer): Use targetm.addr_space_pointer_mode to
	calculate the width of a pointer.
	(convert_to_integer): Likewise.
	* dwarf2out.c (modified_type_die): Set the DW_AT_address_class
	attribute to the address space number for pointer and reference
	types, if the type is in a non-generic address space.
	* emit-rtl.c (get_mem_attrs): Add address space parameter.
	(set_mem_attributes_minus_bitpos, set_mem_attrs_from_reg,
	set_mem_alias_set, set_mem_align, set_mem_expr, set_mem_offset,
	set_mem_size, change_address, adjust_address_1, offset_address,
	widen_memory_access): Update all callers.
	(set_mem_addr_space): New function.
	* emit-rtl.h (set_mem_addr_space): Declare.
	* explow.c (memory_address): Only convert memory addresses to
	Pmode if they are not valid pointer modes.
	* expr.c (expand_expr_addr_expr): Do not assume the target mode is
	Pmode.
	(expand_expr_real_1): Handle casts of pointers to/from non-generic
	address spaces.
	* fold-const.c (fit_double_type): Do not assume the type precision
	of a pointer is POINTER_SIZE.
	(fold_convert_const): Return NULL_TREE for non-generic pointers.
	* output.h (default_addr_space_pointer_mode): Declare.
	* print-rtl.c (print_rtx): Output the address space number, if
	non-zero.
	* rtl.h (struct mem_attrs): Add addrspace field.
	(MEM_ADDR_SPACE): New macro.
	* target-def.h (TARGET_ADDR_SPACE_POINTER_MODE): New target hook.
	(TARGET_ADDR_SPACE_NAME): Likewise.
	(TARGET_ADDR_SPACE_NUMBER): Likewise.
	(TARGET_ADDR_SPACE_CONVERSION_RTL): Likewise.
	(TARGET_VALID_ADDR_SPACE): Likewise.
	(TARGET_INITIALIZER): Incorporate the hooks above.
	* target.h (struct gcc_target): Add addr_space_pointer_mode,
	addr_space_name, addr_space_number, addr_space_conversion_rtl,
	valid_addr_space callbacks.
	* targhooks.h (default_addr_space_name): Declare.
	(default_addr_space_number): Likewise.
	(default_addr_space_conversion_rtl): Likewise.
	* targhooks.c (default_addr_space_name): New.
	(default_addr_space_conversion_rtl): Likewise.
	(default_addr_space_number): Likewise.
	* tree-pretty-print.c: Include target.h and target-def.h.
	(dump_generic_node): Output address space information.
	* tree-ssa-loop-ivopts.c (generic_type_for): If the pointer
	belongs to another address space, include that qualification in
	the type for the pointer returned.
	* tree-ssa.c (useless_type_conversion_p_1): Casts between pointers
	in different address spaces are never useless.
	(useless_type_conversion_p): Casts between two generic void
	pointers are useless.
	* tree.c (integer_pow2p): Handle non-generic pointer sizes.
	(tree_log2): Likewise.
	(tree_floor_log2): Likewise.
	(set_type_quals): Set TYPE_ADDR_SPACE.
	(build_pointer_type): Do not assume pointers are ptr_mode.
	* tree.h (OTHER_ADDR_SPACE_POINTER): New macro.
	(GENERIC_ADDR_SPACE_POINTER): Likewise.
	(TYPE_ADDR_SPACE): Likewise.
	(ENCODE_QUAL_ADDR_SPACE): Likewise.
	(DECODE_QUAL_ADDR_SPACE): Likewise.
	(TYPE_QUALS): Encode the address space in the qualifiers.
	(struct tree_type): Add address_space field.
	* varasm.c (make_decl_rtl): Use the address space pointer mode,
	not necessarily Pmode.
	(default_addr_space_pointer_mode): New function.
	* doc/extend.texi (Named Address Spaces): New node.
	* doc/rtl.texi (Special Accessors): Document MEM_ADDR_SPACE.
	* doc/tm.texi (Misc): Document these new target hooks.

	* config.gcc (spu-*-elf*): Add spu_cache.h to extra_headers.
	* config/spu/spu-c.c (spu_cpu_cpp_builtins): Define __EA32__ or
	__EA64__, depending on the ea pointer size.  *
	* config/spu/spu-elf.h (DRIVER_SELF_SPECS): Link the right
	gcc_cache library depending on the -mcache-size and
	-matomic-updates option given.
	(LIB_SPEC): Link gcc_cachemgr library.
	* config/spu/spu.c (struct spu_address_space): New.
	(spu_address_spaces): New table.
	(TARGET_ADDR_SPACE_POINTER_MODE): Define.
	(TARGET_ADDR_SPACE_NUMBER): Likewise.
	(TARGET_ADDR_SPACE_CONVERSION_RTL): Likewise.
	(TARGET_VALID_POINTER_MODE): Likewise.
	(TARGET_VALID_ADDR_SPACE): Likewise.
	(TARGET_ASM_UNALIGNED_DI_OP): Remove.
	(TARGET_ASM_ALIGNED_DI_OP): Define instead.
	(ea_symbol_ref): New.
	(spu_legitimate_constant_p): Reject __ea qualified references.
	(spu_legitimate_address): Keep __ea references until reload.
	(EAmode): Define.
	(cache_fetch, cache_fetch_dirty, ea_alias_set): New variables.
	(ea_load_store): New function.
	(ea_load_store_inline): Likewise.
	(expand_ea_mem): Likewise.
	(spu_expand_mov): Handle __ea memory operands.
	(spu_ea_pointer_mode): New function.
	(spu_valid_pointer_mode): Likewise.
	(spu_addr_space_name): Likewise.
	(spu_addr_space_conversion_rtl): Likewise.
	(spu_valid_addr_space): Likewise.
	(spu_addr_space_number): Likewise.
	* config/spu/spu.h (ASM_OUTPUT_SYMBOL_REF): New macro.
	* config/spu/spu.md (to_ea): New expander.
	(from_ea): Likewise.
	* config/spu/spu.opt (mea32, mea64): New options.
	* config/spu/spu_mfcio.h: New typedef.
	* config/spu/t-spu-elf (MULTILIB_OPTIONS): Add mea64.
	(EXTRA_MULTILIB_PARTS): Add cache libraries.
	(cachemgr.o, %/cachemgr.o): New targets.
	(cachemgr_nonatomic.o, %/cachemgr_nonatomic.o): Likewise.
	(libgcc_%.a, %/libgcc_%.a): Likewise.
	(cache8k.o, cache16k.o, cache32k.o, etc): Likewise.
	(%/cache8k.o, %/cache16k.o, %/cache32k.o, etc): Likewise.
	* config/spu/cache.S: New file.
	* config/spu/cachemgr.c: Likewise.
	* config/spu/spu_cache.h: Likewise.
	* doc/invoke.texi (SPU Options): Document -mea32, -mea64,
	-mcache-size and -matomic-updates options.

2008-05-20  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>

	* Created "cell-4_3-branch".