ChangeLog.ptr 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545
  1. 2007-06-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
  2. Merge mainline, revision 125733
  3. 2007-06-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
  4. * tree-vrp.c (compare_values_warnv): Fix spelling/grammer
  5. mistakes
  6. (extract_range_from_binary_expr): Likewise.
  7. * doc/c-tree.texi (POINTER_PLUS_EXPR): Likewise.
  8. * tree-ssa-loop-niter.c (assert_loop_rolls_lt): Add vertical
  9. whitespace.
  10. * tree-pretty-print.c (op_symbol_code <case POINTER_PLUS_EXPR>):
  11. Change print out to "+".
  12. * tree-scalar-evolution.c (instantiate_parameters_1):
  13. Use chrec_type instead of TREE_TYPE.
  14. * builtins.c (expand_builtin_strcat): Fix vertical whitespace.
  15. (std_expand_builtin_va_start): Fix whitespace.
  16. (fold_builtin_strstr): Use size_int instead of build_int_cst (sizetype.
  17. (fold_builtin_strchr): Likewise.
  18. (fold_builtin_strrchr): Likewise.
  19. (fold_builtin_strpbrk): Likewise.
  20. * fold-const.c (try_move_mult_to_index): Fix spelling/grammer
  21. mistakes.
  22. (fold_to_nonsharp_ineq_using_bound): Merge the two ifs at the end.
  23. (fold_binary): Fix spelling/grammer mistakes.
  24. * tree-ssa-ccp.c (maybe_fold_stmt_addition): Assert that only
  25. a POINTER_PLUS_EXPR is passed in.
  26. * tree-ssa-loop-ivopts.c (determine_base_object):
  27. Fix spelling/grammer mistakes.
  28. * expr.c (expand_expr_real_1): Likewise.
  29. * tree-data-ref.c (split_constant_offset): Likewise.
  30. * c-typeck.c (build_unary_op): Use fold_convert instead of convert
  31. for converting to sizetype.
  32. * tree.def (POINTER_PLUS_EXPR): Fix comment.
  33. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1):
  34. Fix spelling/grammer mistakes.
  35. (phiprop_insert_phi): Likewise.
  36. * c-common.c (pointer_int_sum): Remove FIXME about
  37. POINTER_MINUS_EXPR.
  38. 2007-06-13 Andrew Pinski <andrew_pinski@playstation.sony.com>
  39. * expr.c (expand_expr_real_1 <case POINTER_PLUS_EXPR>): Remove assert
  40. for checking the modes of the operands are the same.
  41. 2007-06-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
  42. * config/sparc/sparc.c (sparc_gimplify_va_arg): Use POINTER_PLUS_EXPR
  43. instead of PLUS_EXPR when the operand was a pointer. Don't create a
  44. BIT_AND_EXPR for pointer types.
  45. 2007-06-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
  46. * config/mips/mips.c (mips_va_start): Use POINTER_PLUS_EXPR
  47. for pointers.
  48. (mips_gimplify_va_arg_expr): Likewise.
  49. Don't create BIT_AND_EXPR in a pointer type.
  50. 2007-06-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
  51. Merge mainline, revision 125658
  52. 2007-06-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
  53. Merge mainline, revision 125611
  54. 2007-06-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
  55. * matrix-reorg.c (collect_data_for_malloc_call): Stmt
  56. will now only be either INDIRECT_REF and POINTER_PLUS_EXPR.
  57. Offset only holds something for PLUS_EXPR.
  58. (ssa_accessed_in_tree): Handle POINTER_PLUS_EXPR just as
  59. a PLUS_EXPR.
  60. (analyze_transpose): POINTER_PLUS_EXPR will only show up now
  61. and not PLUS_EXPR.
  62. (analyze_accesses_for_modify_stmt): Likewise.
  63. Remove comment about the type being integral type as it is
  64. wrong now.
  65. (analyze_matrix_accesses): Handle POINTER_PLUS_EXPR as
  66. PLUS_EXPR.
  67. (transform_access_sites): POINTER_PLUS_EXPR will only show up now
  68. and not PLUS_EXPR.
  69. Correct the type which the artimentic is done in (is now
  70. sizetype).
  71. Reindent one loop.
  72. 2007-06-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
  73. * config/ia64/ia64.c (ia64_gimplify_va_arg): Use
  74. POINTER_PLUS_EXPR for pointers and create the
  75. BIT_AND_EXPR in sizetype.
  76. * config/s390/s390.c (s390_va_start): Use POINTER_PLUS_EXPR
  77. for pointers instead of PLUS_EXPR.
  78. (s390_gimplify_va_arg): Likewise.
  79. 2007-06-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
  80. * config/frv/frv.c (frv_expand_builtin_va_start): Use sizetype
  81. with make_tree, instead of a pointer type.
  82. * config/pa/pa.c (reloc_needed): Handle POINTER_PLUS_EXPR
  83. as PLUS_EXPR/MINUS_EXPR.
  84. (hppa_gimplify_va_arg_expr): Don't create MINUS_EXPR or
  85. PLUS_EXPR for pointers, instead use POINTER_PLUS_EXPR.
  86. Don't use BIT_AND_EXPR on a pointer type, convert the
  87. expression to sizetype first.
  88. 2007-06-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
  89. * tree-ssa-forwprop.c
  90. (forward_propagate_addr_into_variable_array_index):
  91. Don't expect a statement for the size 1 case.
  92. Use the offset variable for the size 1 case.
  93. Look through use-def chains to find the mutliply
  94. for the non size 1 case.
  95. (forward_propagate_addr_expr_1): Call
  96. forward_propagate_addr_into_variable_array_index with
  97. the SSA_NAME instead of the statement.
  98. 2007-06-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
  99. PR tree-opt/32225
  100. * tree-scalar-evolution.c (follow_ssa_edge_in_rhs <case
  101. POINTER_PLUS_EXPR>): Do not change type_rhs.
  102. (follow_ssa_edge_in_rhs <case POINTER_PLUS_EXPR, case PLUS_EXPR>):
  103. Use the code of the orginal expression instead of just PLUS_EXPR.
  104. Also use type_rhs where TREE_TYPE (rhs) was used (reverting back
  105. to the trunk).
  106. 2007-06-03 Andrew Pinski <andrew_pinski@playstation.sony.com>
  107. * tree-predcom.c (ref_at_iteration): If we have a pointer
  108. type do the multiplication in sizetype.
  109. 2007-06-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
  110. Merge mainline, revision 125285
  111. 2007-05-31 Andrew Pinski <andrew_pinski@playstation.sony.com>
  112. * tree-vrp.c (extract_range_from_binary_expr): Handle
  113. MIN_EXPR/MAX_EXPR for pointers type.
  114. PR tree-opt/32167
  115. * tree-chrec.c (chrec_fold_plus): When either
  116. operand is zero, convert the other operand.
  117. 2007-05-30 Andrew Pinski <andrew_pinski@playstation.sony.com>
  118. * builtins.c (std_expand_builtin_va_start): Use
  119. sizetype for the call to make_tree and then convert
  120. to the pointer type.
  121. 2007-05-30 Andrew Pinski <andrew_pinski@playstation.sony.com>
  122. PR tree-op/32145
  123. * tree-vrp.c (extract_range_from_assert): Create
  124. POINTER_PLUS_EXPR for pointer types.
  125. PR tree-opt/32144
  126. * tree-chrec.c (chrec_fold_plus_poly_poly): If the
  127. first chrec is a pointer type, then the second should
  128. be sizetype and not the first's type.
  129. 2007-05-28 Andrew Pinski <andrew_pinski@playstation.sony.com>
  130. * fold-const.c (try_move_mult_to_index):
  131. Say why we strip the nops.
  132. (fold_unary <case NOP_EXPR>): Remove
  133. TODO as we cannot get that case.
  134. * tree-chrec.c (chrec_fold_plus):
  135. Cleanup the code to chose which
  136. tree code is used.
  137. (chrec_convert_rhs): Add comment on
  138. why the increment is sizetype for
  139. pointers.
  140. * tree-mudflap.c (mf_xform_derefs_1):
  141. Use size_int instead of build_int_cst.
  142. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise.
  143. 2007-05-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
  144. PR tree-opt/32015
  145. * tree.c (build2_stat): Make sure that
  146. MULT_EXPR is not used with pointers.
  147. * tree-chrec.c (chrec_apply): Use chrec_convert_rhs
  148. on the argument x instead of chrec_convert.
  149. 2007-05-20 Kaz Kojima <kkojima@gcc.gnu.org>
  150. * config/sh/sh.c (sh_va_start): Call make_tree with sizetype
  151. and convert its result to a pointer type. Use POINTER_PLUS_EXPR
  152. for the pointer additions and also use size_int for the offsets.
  153. (sh_gimplify_va_arg_expr): Use POINTER_PLUS_EXPR for the pointer
  154. additions and also use size_int for the offsets. Perform
  155. BIT_AND_EXPR on sizetype arguments.
  156. 2007-05-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
  157. * tree-ssa-forwprop (forward_propagate_addr_into_variable_array_index):
  158. Don't expect there to be a cast for the index as that
  159. does not exist anymore.
  160. (forward_propagate_addr_expr_1): Check for
  161. POINTER_PLUS_EXPR instead of PLUS_EXPR.
  162. Don't check for the first operand of the
  163. POINTER_PLUS_EXPR was the index as it
  164. cannot be.
  165. 2007-05-15 Richard Guenther <rguenther@suse.de>
  166. * config/i386/i386.c (ix86_gimplify_va_arg): Use POINTER_PLUS_EXPR,
  167. perform BIT_AND_EXPR on sizetype arguments.
  168. 2007-05-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
  169. * config/rs6000/rs6000.c (rs6000_va_start): Use POINTER_PLUS_EXPR
  170. instead of PLUS_EXPR for pointer addition.
  171. (rs6000_va_start): Likewise.
  172. Also use sizetype for the offset.
  173. * tree-stdarg.c (va_list_counter_bump): Check for PLUS_EXPR
  174. and POINTER_PLUS_EXPR.
  175. (check_va_list_escapes): Likewise.
  176. 2007-05-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
  177. * config/i386/i386.c (ix86_va_start): Use POINTER_PLUS_EXPR
  178. for the pointer addition and also use size_int/sizetype
  179. for the offset.
  180. (ix86_gimplify_va_arg): Likewise.
  181. 2007-05-14 Andrew Pinski <andrew_pinski@playstation.sony.com>
  182. Merge mainline, revision 124657
  183. * tree-data-ref.c (split_constant_offset): Handle
  184. POINTER_PLUS_EXPR
  185. exactly the same as PLUS_EXPR/MINUS_EXPR except for the offset
  186. needs to be calcuated using PLUS_EXPR instead of
  187. POINTER_PLUS_EXPR.
  188. * builtins.c (fold_builtin_memchr): Use POINTER_PLUS_EXPR
  189. instead of PLUS_EXPR for adding to a pointer.
  190. 2006-05-15 Zdenek Dvorak <dvorakz@suse.cz>
  191. * tree-ssa-loop-ivopts.c (determine_base_object): Abort for PLUS_EXPR
  192. in pointer type.
  193. 2007-05-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
  194. * tree-ssa-address.c (tree_mem_ref_addr): When adding
  195. the offset to the base, use POINTER_PLUS_EXPR.
  196. 2007-05-12 Andrew Pinski <andrew_pinski@playstation.sony.com>
  197. * expr.c (expand_expr_addr_expr_1): Call expand_expr
  198. for the offset with the modifier as EXPAND_INITIALIZER
  199. if the modifier is EXPAND_INITIALIZER.
  200. (expand_expr_real_1 <case INTEGER_CST>): Don't force to
  201. a register if we had an overflow.
  202. 2007-05-10 Andrew Pinski <andrew_pinski@playstation.sony.com>
  203. Merge mainline, revision 124602.
  204. * fold-const.c (extract_array_ref): Make sure the offset
  205. is converted to sizetype.
  206. (try_move_mult_to_index): Strip the NOPs from the offset.
  207. (fold_binary <case POINTER_PLUS_EXPR>): Convert the second
  208. operand to sizetype before calling try_move_mult_to_index.
  209. * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne):
  210. For pointer types, use sizetype when
  211. creating MINUS_EXPR/PLUS_EXPRs.
  212. * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Make sure
  213. the offset is converted to sizetype.
  214. 2007-05-11 Andrew Pinski <andrew_pinski@playstation.sony.com>
  215. * config/spu/spu.c (spu_va_start): Create POINTER_PLUS_EXPR
  216. instead of PLUS_EXPR when doing addition on pointer
  217. types. Use sizetype for the second operand.
  218. (spu_gimplify_va_arg_expr): Likewise.
  219. * tree-ssa.c (tree_ssa_useless_type_conversion_1):
  220. Convert the MIN/MAX of the inner type to the outer
  221. type before comparing them.
  222. 2007-05-09 Andrew Pinski <andrew_pinski@playstation.sony.com>
  223. Zdenek Dvorak <dvorakz@suse.cz>
  224. * fold-const.c (fold_to_nonsharp_ineq_using_bound): Don't
  225. use a pointer type for MINUS_EXPR.
  226. (fold_binary <case MINUS_EXPR>): Fold (PTR0 p+ A) - (PTR1 p+ B)
  227. into (PTR0 - PTR1) + (A - B). Fold (PTR0 p+ A) - PTR1 into
  228. (PTR0 - PTR1) + A iff (PTR0 - PTR1) simplifies.
  229. * tree-chrec.c (chrec_fold_plus_poly_poly): For
  230. POINTER_PLUS_EXPR, use a different right hand side type.
  231. Handle POINTER_PLUS_EXPR like PLUS_EXPR.
  232. (chrec_fold_plus_1): Likewise.
  233. (convert_affine_scev): Likewise.
  234. (chrec_convert_aggressive): Likewise.
  235. (chrec_fold_plus): For pointer types, use POINTER_PLUS_EXPR
  236. instead of PLUS_EXPR.
  237. (reset_evolution_in_loop): For pointer types, the new_evol
  238. should be sizetype.
  239. (chrec_convert_rhs): New function.
  240. * tree-chrec.h (chrec_convert_rhs): New prototype.
  241. (build_polynomial_chrec): For pointer types, the right hand
  242. side should be sizetype and not the same as the left hand side.
  243. * tree-scalar-evolution.c (add_to_evolution_1): Convert the
  244. increment using chrec_convert_rhs instead of chrec_convert.
  245. (follow_ssa_edge_in_rhs): Handle POINTER_PLUS_EXPR like
  246. PLUS_EXPR except for the right hand side's type will be
  247. sizetype.
  248. (interpret_rhs_modify_stmt): Handle POINTER_PLUS_EXPR.
  249. (fold_used_pointer_cast): Kill.
  250. (pointer_offset_p): Kill.
  251. (fold_used_pointer): Kill.
  252. (pointer_used_p): Kill.
  253. (analyze_scalar_evolution_1 <case GIMPLE_MODIFY_STMT>): Don't
  254. call fold_used_pointer.
  255. (instantiate_parameters_1): Convert the increment
  256. using chrec_convert_rhs instead of chrec_convert.
  257. Handle POINTER_PLUS_EXPR as PLUS_EXPR.
  258. * tree-ssa-loop-niter.c (split_to_var_and_offset): Handle
  259. POINTER_PLUS_EXPR as PLUS_EXPR.
  260. (assert_loop_rolls_lt): For pointer types, use sizetype when
  261. creating MINUS_EXPR/PLUS_EXPRs.
  262. (number_of_iterations_le): Likewise.
  263. (expand_simple_operations): POINTER_PLUS_EXPR are simple also.
  264. (derive_constant_upper_bound): Handle POINTER_PLUS_EXPR just
  265. like PLUS_EXPR and MINUS_EXPR.
  266. * tree-data-ref.c (analyze_offset_expr): Likewise.
  267. (address_analysis): Handle POINTER_PLUS_EXPR as PLUS_EXPR.
  268. (analyze_offset): Handle POINTER_PLUS_EXPR also.
  269. (create_data_ref): Convert the increment
  270. using chrec_convert_rhs instead of chrec_convert.
  271. * tree-vect-transform.c (vect_update_ivs_after_vectorizer):
  272. For pointer types, create POINTER_PLUS_EXPR instead of
  273. PLUS_EXPR and also create MULT_EXPR in sizetype.
  274. 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
  275. * builtins.c (std_gimplify_va_arg_expr): Use fold_build2 for
  276. the creating of POINTER_PLUS_EXPR. For the BIT_AND_EXPR, cast
  277. the operands to sizetype first and then cast the BIT_AND_EXPR
  278. back to the pointer type.
  279. * tree-ssa-address.c (create_mem_ref): Create A
  280. POINTER_PLUS_EXPR for one case.
  281. * tree.c (const_hash_1): Handle POINTER_PLUS_EXPR same as
  282. PLUS_EXPR.
  283. (compare_constant): Likewise.
  284. (copy_constant): Likewise.
  285. (compute_reloc_for_constant): Likewise.
  286. (output_addressed_constants): Likewise.
  287. 2007-05-07 Andrew Pinski <andrew_pinski@playstation.sony.com>
  288. * tree.def (POINTER_PLUS_EXPR): The second operand
  289. is of type sizetype and not ssizetype.
  290. * doc/c-tree.texi (POINTER_PLUS_EXPR): Document.
  291. 2007-05-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
  292. * tree-mudflap.c (mf_xform_derefs_1 <case BIT_FIELD_REF>):
  293. Add a conversion of ofs to sizetype.
  294. (mf_decl_eligible_p): Reformat for length issues.
  295. (mf_xform_derefs_1): Likewise.
  296. 2007-05-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
  297. * tree.c (build2_stat): Check to make sure the
  298. second operand is compatiable with sizetype.
  299. 2007-05-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
  300. * tree-cfg.c (verify_expr): Change error
  301. message about sizetype to be correct.
  302. 2007-05-06 Andrew Pinski <andrew_pinski@playstation.sony.com>
  303. Merge mainline, revision 124478.
  304. * fold-const.c (fold_unary): Handle for (T1)(X op Y),
  305. only p+ as that is the only as that can be handled for
  306. binary operators now. Add a TODO for non pointer type
  307. op's.
  308. * gimplifier.c (gimplify_expr): Don't special case
  309. PLUS_EXPR. Special case POINTER_PLUS_EXPR instead,
  310. remove check for pointer type as it will always be
  311. a pointer type now.
  312. 2007-05-04 Andrew Pinski <andrew_pinski@playstation.sony.com>
  313. * tree-vrp.c (extract_range_from_binary_expr): Handle
  314. POINTER_PLUS_EXPRs. Assert POINTER_PLUS_EXPR is
  315. the only expression for pointer types.
  316. * tree-vect-transform.c (vect_gen_niters_for_prolog_loop):
  317. Add a cast when creating byte_misalign.
  318. 2007-05-04 Andrew Pinski <andrew_pinski@playstation.sony.com>
  319. * fold-const.c (fold_binary <case POINTER_PLUS_EXPR>);
  320. Add comment on why you get INT +p INT.
  321. (fold_binary <case PLUS_EXPR>): Add folding of PTR+INT into
  322. PTR p+ INT.
  323. * dwarf2out.c (loc_descriptor_from_tree_1):
  324. Handle POINT_PLUS_EXPR as a PLUS_EXPR.
  325. 2007-05-04 Andrew Pinski <andrew_pinski@playstation.sony.com>
  326. * tree-vrp.c (compare_values_warnv): Convert val2 to
  327. the type of val1.
  328. * fold-const.c (extract_array_ref): Look for
  329. POINTER_PLUS_EXPR instead of PLUS_EXPR's.
  330. * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Likewise.
  331. 2007-05-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
  332. * c-format.c (check_format_arg): Handle POINTER_PLUS_EXPR
  333. instead of PLUS_EXPR of pointer types.
  334. 2007-05-02 Andrew Pinski <andrew_pinski@playstation.sony.com>
  335. * fold-const.c (try_move_mult_to_index): Remove code argument
  336. and replace all uses with PLUS_EXPR.
  337. (fold_binary <case POINTER_PLUS_EXR>): Remove code argument.
  338. (fold_binary <case PLUS_EXPR>): Don't call try_move_mult_to_index.
  339. (fold_binary <case MINUS_EXPR>): Likewise.
  340. * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Remove subtraction
  341. case as it is always addition now.
  342. (fold_stmt_r): Don't handle PLUS_EXPR/MINUS_EXPR specially.
  343. Handle POINTER_PLUS_EXPR like PLUS_EXPR was handled before.
  344. 2007-05-01 Andrew Pinski <andrew_pinski@playstation.sony.com>
  345. Merge mainline, revision 124343.
  346. * tree-vect-transform.c (bump_vector_ptr): Create a POINTER_PLUS_EXPR
  347. instead of PLUS_EXPR for the pointer increment statement.
  348. * expr.c (expand_expr_real_1): Add FIXME/assert for the unhandle case
  349. where the modes of the two operands are different.
  350. 2007-02-25 Andrew Pinski <andrew_pinski@playstation.sony.com>
  351. Merge mainline, revision 122323.
  352. 2006-12-14 Zdenek Dvorak <dvorakz@suse.cz>
  353. Merge mainline, revision 119860.
  354. 2006-11-23 Andrew Pinski <andrew_pinski@playstation.sony.com>
  355. * tree.def (POINTER_PLUS_EXPR): New tree code.
  356. * tree-pretty-print.c (dump_generic_node): Handle
  357. POINTER_PLUS_EXPR.
  358. (op_prio): Likewise.
  359. (op_symbol_1): Likewise.
  360. * optabs.c (optab_for_tree_code): Likewise.
  361. * tree-ssa-loop-manip.c (create_iv): Handle pointer base
  362. specially.
  363. * tree-tailcall.c (process_assignment): Mention
  364. POINTER_PLUS_EXPR in a TODO comment.
  365. * tree.c (build2_stat): Assert when trying to use PLUS_EXPR or
  366. MINUS_EXPR with a pointer. Also assert for POINTER_PLUS_EXPR
  367. not used with a pointer and an integer type.
  368. * tree-scalar-evolution.c (fold_used_pointer): Mention
  369. POINTER_PLUS_EXPR is what this needs to handle.
  370. * builtins.c (get_pointer_alignment): Handle POINTER_PLUS_EXPR
  371. instead of PLUS_EXPR.
  372. (expand_builtin_strcat): Create a POINTER_PLUS_EXPR instead of
  373. PLUS_EXPR for pointers.
  374. (std_gimplify_va_arg_expr): Likewise.
  375. (fold_builtin_memory_op): Likewise.
  376. (fold_builtin_strstr): Likewise.
  377. (fold_builtin_strchr): Likewise.
  378. (fold_builtin_strrchr): Likewise.
  379. (fold_builtin_strpbrk): Likewise.
  380. (expand_builtin_memory_chk): Likewise.
  381. (fold_builtin_memory_chk): Likewise.
  382. * fold-const.c (build_range_check): Handle pointer types
  383. specially.
  384. (fold_to_nonsharp_ineq_using_bound): Likewise.
  385. (fold_binary): Handle simple POINTER_PLUS_EXPR cases.
  386. (tree_expr_nonnegative_p): Handle POINTER_PLUS_EXPR.
  387. (tree_expr_nonzero_p): Likewise.
  388. (fold_indirect_ref_1): Look at POINTER_PLUS_EXPR instead
  389. of PLUS_EXPR for the complex expression folding.
  390. * tree-ssa-loop-ivopts.c (determine_base_object): Handle
  391. POINTER_PLUS_EXPR.
  392. (tree_to_aff_combination): Likewise.
  393. (force_expr_to_var_cost): Likewise.
  394. (force_expr_to_var_cost): Likewise. Create a POINTER_PLUS_EXPR
  395. instead of PLUS_EXPR for pointers.
  396. * c-format.c (check_format_arg): Mention this should be handling
  397. POINTER_PLUS_EXPR.
  398. * tree-stdarg.c (va_list_counter_bump): Handle POINTER_PLUS_EXPR
  399. instead of PLUS_EXPR.
  400. (check_va_list_escapes): Likewise.
  401. (check_all_va_list_escapes): Likewise.
  402. * expr.c (expand_expr_real_1): Handle POINTER_PLUS_EXPR.
  403. (string_constant): Likewise.
  404. * tree-ssa-address.c (add_to_parts): Create a POINTER_PLUS_EXPR
  405. instead of PLUS_EXPR for pointers.
  406. (most_expensive_mult_to_index): Likewise.
  407. (addr_to_parts): Use the correct type for the index.
  408. * c-typeck.c (build_unary_op): For pointers create the increment
  409. as a sizetype. Create a POINTER_PLUS_EXPR instead of PLUS_EXPR
  410. for pointers.
  411. * gimplify.c (gimplify_self_mod_expr): Create a
  412. POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
  413. (gimplify_omp_atomic_fetch_op): Handle POINTER_PLUS_EXPR.
  414. * tree-mudflap.c (mf_xform_derefs_1): Create a
  415. POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
  416. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Add a
  417. note this should be handling POINTER_PLUS_EXPR.
  418. * varasm.c (initializer_constant_valid_p): Handle
  419. POINTER_PLUS_EXPR.
  420. * tree-ssa-loop-prefetch.c (idx_analyze_ref): Handle
  421. POINTER_PLUS_EXPR instead of PLUS_EXPR.
  422. (issue_prefetch_ref): Create a POINTER_PLUS_EXPR instead
  423. of PLUS_EXPR for pointers.
  424. * tree-vect-transform.c (vect_create_addr_base_for_vector_ref):
  425. Likewise.
  426. * tree-inline.c (estimate_num_insns_1): Handle
  427. POINTER_PLUS_EXPR.
  428. * tree-object-size.c (plus_expr_object_size): Handle
  429. POINTER_PLUS_EXPR instead of PLUS_EXPR. Removing all the extra
  430. code which is trying to figure out which side is a pointer and
  431. is the index.
  432. (check_for_plus_in_loops_1): Likewise.
  433. (check_for_plus_in_loops): Likewise.
  434. * c-common.c (pointer_int_sum): Create a
  435. POINTER_PLUS_EXPR instead of PLUS_EXPR for pointers.
  436. * tree-ssa-structalias.c (handle_ptr_arith): Handle
  437. only POINTER_PLUS_EXPR. Removing all the extra
  438. code which is trying to figure out which side is a pointer and
  439. is the index.
  440. * tree-cfg.c (verify_expr): Add extra checking for pointers and
  441. PLUS_EXPR and MINUS_EXPR.
  442. Also add checking to make sure the operands of POINTER_PLUS_EXPR
  443. are correct.
  444. Copyright (C) 2006-2007 Free Software Foundation, Inc.
  445. Copying and distribution of this file, with or without modification,
  446. are permitted in any medium without royalty provided the copyright
  447. notice and this notice are preserved.