Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Side by Side Diff: gcc/gcc/dse.c

Issue 3050029: [gcc] GCC 4.5.0=>4.5.1 (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-toolchain.git
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gcc/gcc/dojump.c ('k') | gcc/gcc/dummy-checksum.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
None
OLDNEW
1 /* RTL dead store elimination. 1 /* RTL dead store elimination.
2 Copyright (C) 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 2 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
3 Free Software Foundation, Inc.
3 4
4 Contributed by Richard Sandiford <rsandifor@codesourcery.com> 5 Contributed by Richard Sandiford <rsandifor@codesourcery.com>
5 and Kenneth Zadeck <zadeck@naturalbridge.com> 6 and Kenneth Zadeck <zadeck@naturalbridge.com>
6 7
7 This file is part of GCC. 8 This file is part of GCC.
8 9
9 GCC is free software; you can redistribute it and/or modify it under 10 GCC is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free 11 the terms of the GNU General Public License as published by the Free
11 Software Foundation; either version 3, or (at your option) any later 12 Software Foundation; either version 3, or (at your option) any later
12 version. 13 version.
(...skipping 28 matching lines...) Expand all
41 #include "alias.h" 42 #include "alias.h"
42 #include "insn-config.h" 43 #include "insn-config.h"
43 #include "expr.h" 44 #include "expr.h"
44 #include "recog.h" 45 #include "recog.h"
45 #include "dse.h" 46 #include "dse.h"
46 #include "optabs.h" 47 #include "optabs.h"
47 #include "dbgcnt.h" 48 #include "dbgcnt.h"
48 #include "target.h" 49 #include "target.h"
49 50
50 /* This file contains three techniques for performing Dead Store 51 /* This file contains three techniques for performing Dead Store
51 Elimination (dse). 52 Elimination (dse).
52 53
53 * The first technique performs dse locally on any base address. It 54 * The first technique performs dse locally on any base address. It
54 is based on the cselib which is a local value numbering technique. 55 is based on the cselib which is a local value numbering technique.
55 This technique is local to a basic block but deals with a fairly 56 This technique is local to a basic block but deals with a fairly
56 general addresses. 57 general addresses.
57 58
58 * The second technique performs dse globally but is restricted to 59 * The second technique performs dse globally but is restricted to
59 base addresses that are either constant or are relative to the 60 base addresses that are either constant or are relative to the
60 frame_pointer. 61 frame_pointer.
61 62
62 * The third technique, (which is only done after register allocation) 63 * The third technique, (which is only done after register allocation)
63 processes the spill spill slots. This differs from the second 64 processes the spill spill slots. This differs from the second
64 technique because it takes advantage of the fact that spilling is 65 technique because it takes advantage of the fact that spilling is
65 completely free from the effects of aliasing. 66 completely free from the effects of aliasing.
66 67
67 Logically, dse is a backwards dataflow problem. A store can be 68 Logically, dse is a backwards dataflow problem. A store can be
68 deleted if it if cannot be reached in the backward direction by any 69 deleted if it if cannot be reached in the backward direction by any
69 use of the value being stored. However, the local technique uses a 70 use of the value being stored. However, the local technique uses a
70 forwards scan of the basic block because cselib requires that the 71 forwards scan of the basic block because cselib requires that the
71 block be processed in that order. 72 block be processed in that order.
72 73
73 The pass is logically broken into 7 steps: 74 The pass is logically broken into 7 steps:
74 75
75 0) Initialization. 76 0) Initialization.
76 77
77 1) The local algorithm, as well as scanning the insns for the two 78 1) The local algorithm, as well as scanning the insns for the two
78 global algorithms. 79 global algorithms.
79 80
80 2) Analysis to see if the global algs are necessary. In the case 81 2) Analysis to see if the global algs are necessary. In the case
81 of stores base on a constant address, there must be at least two 82 of stores base on a constant address, there must be at least two
82 stores to that address, to make it possible to delete some of the 83 stores to that address, to make it possible to delete some of the
83 stores. In the case of stores off of the frame or spill related 84 stores. In the case of stores off of the frame or spill related
84 stores, only one store to an address is necessary because those 85 stores, only one store to an address is necessary because those
85 stores die at the end of the function. 86 stores die at the end of the function.
86 87
87 3) Set up the global dataflow equations based on processing the 88 3) Set up the global dataflow equations based on processing the
88 info parsed in the first step. 89 info parsed in the first step.
89 90
90 4) Solve the dataflow equations. 91 4) Solve the dataflow equations.
91 92
92 5) Delete the insns that the global analysis has indicated are 93 5) Delete the insns that the global analysis has indicated are
93 unnecessary. 94 unnecessary.
94 95
95 6) Delete insns that store the same value as preceeding store 96 6) Delete insns that store the same value as preceeding store
96 where the earlier store couldn't be eliminated. 97 where the earlier store couldn't be eliminated.
97 98
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 for that variable for when this variable is false. 132 for that variable for when this variable is false.
132 133
133 The global problem is formulated as a backwards set union 134 The global problem is formulated as a backwards set union
134 dataflow problem where the stores are the gens and reads are the 135 dataflow problem where the stores are the gens and reads are the
135 kills. Set union problems are rare and require some special 136 kills. Set union problems are rare and require some special
136 handling given our representation of bitmaps. A straightforward 137 handling given our representation of bitmaps. A straightforward
137 implementation of requires a lot of bitmaps filled with 1s. 138 implementation of requires a lot of bitmaps filled with 1s.
138 These are expensive and cumbersome in our bitmap formulation so 139 These are expensive and cumbersome in our bitmap formulation so
139 care has been taken to avoid large vectors filled with 1s. See 140 care has been taken to avoid large vectors filled with 1s. See
140 the comments in bb_info and in the dataflow confluence functions 141 the comments in bb_info and in the dataflow confluence functions
141 for details. 142 for details.
142 143
143 There are two places for further enhancements to this algorithm: 144 There are two places for further enhancements to this algorithm:
144 145
145 1) The original dse which was embedded in a pass called flow also 146 1) The original dse which was embedded in a pass called flow also
146 did local address forwarding. For example in 147 did local address forwarding. For example in
147 148
148 A <- r100 149 A <- r100
149 ... <- A 150 ... <- A
150 151
151 flow would replace the right hand side of the second insn with a 152 flow would replace the right hand side of the second insn with a
152 reference to r100. Most of the information is available to add this 153 reference to r100. Most of the information is available to add this
153 to this pass. It has not done it because it is a lot of work in 154 to this pass. It has not done it because it is a lot of work in
154 the case that either r100 is assigned to between the first and 155 the case that either r100 is assigned to between the first and
(...skipping 21 matching lines...) Expand all
176 byte of the entity associated with the slot. This depends on 177 byte of the entity associated with the slot. This depends on
177 KNOWING that reload always generates the accesses for each of the 178 KNOWING that reload always generates the accesses for each of the
178 bytes in some canonical (read that easy to understand several 179 bytes in some canonical (read that easy to understand several
179 passes after reload happens) way. 180 passes after reload happens) way.
180 181
181 b) Reload sometimes decides that spill slot it allocated was not 182 b) Reload sometimes decides that spill slot it allocated was not
182 large enough for the mode and goes back and allocates more slots 183 large enough for the mode and goes back and allocates more slots
183 with the same mode and alias set. The backout in this case is a 184 with the same mode and alias set. The backout in this case is a
184 little more graceful than (a). In this case the slot is unmarked 185 little more graceful than (a). In this case the slot is unmarked
185 as being a spill slot and if final address comes out to be based 186 as being a spill slot and if final address comes out to be based
186 off the frame pointer, the global algorithm handles this slot. 187 off the frame pointer, the global algorithm handles this slot.
187 188
188 c) For any pass that may prespill, there is currently no 189 c) For any pass that may prespill, there is currently no
189 mechanism to tell the dse pass that the slot being used has the 190 mechanism to tell the dse pass that the slot being used has the
190 special properties that reload uses. It may be that all that is 191 special properties that reload uses. It may be that all that is
191 required is to have those passes make the same calls that reload 192 required is to have those passes make the same calls that reload
192 does, assuming that the alias sets can be manipulated in the same 193 does, assuming that the alias sets can be manipulated in the same
193 way. */ 194 way. */
194 195
195 /* There are limits to the size of constant offsets we model for the 196 /* There are limits to the size of constant offsets we model for the
196 global problem. There are certainly test cases, that exceed this 197 global problem. There are certainly test cases, that exceed this
197 limit, however, it is unlikely that there are important programs 198 limit, however, it is unlikely that there are important programs
198 that really have constant offsets this size. */ 199 that really have constant offsets this size. */
199 #define MAX_OFFSET (64 * 1024) 200 #define MAX_OFFSET (64 * 1024)
200 201
201 202
202 static bitmap scratch = NULL; 203 static bitmap scratch = NULL;
203 struct insn_info; 204 struct insn_info;
204 205
205 /* This structure holds information about a candidate store. */ 206 /* This structure holds information about a candidate store. */
206 struct store_info 207 struct store_info
207 { 208 {
208 209
209 /* False means this is a clobber. */ 210 /* False means this is a clobber. */
210 bool is_set; 211 bool is_set;
211 212
212 /* False if a single HOST_WIDE_INT bitmap is used for positions_needed. */ 213 /* False if a single HOST_WIDE_INT bitmap is used for positions_needed. */
213 bool is_large; 214 bool is_large;
214 215
215 /* The id of the mem group of the base address. If rtx_varies_p is 216 /* The id of the mem group of the base address. If rtx_varies_p is
216 true, this is -1. Otherwise, it is the index into the group 217 true, this is -1. Otherwise, it is the index into the group
217 table. */ 218 table. */
218 int group_id; 219 int group_id;
219 220
220 /* This is the cselib value. */ 221 /* This is the cselib value. */
221 cselib_val *cse_base; 222 cselib_val *cse_base;
222 223
223 /* This canonized mem. */ 224 /* This canonized mem. */
224 rtx mem; 225 rtx mem;
225 226
226 /* Canonized MEM address for use by canon_true_dependence. */ 227 /* Canonized MEM address for use by canon_true_dependence. */
227 rtx mem_addr; 228 rtx mem_addr;
228 229
229 /* If this is non-zero, it is the alias set of a spill location. */ 230 /* If this is non-zero, it is the alias set of a spill location. */
230 alias_set_type alias_set; 231 alias_set_type alias_set;
231 232
232 /* The offset of the first and byte before the last byte associated 233 /* The offset of the first and byte before the last byte associated
233 with the operation. */ 234 with the operation. */
234 HOST_WIDE_INT begin, end; 235 HOST_WIDE_INT begin, end;
235 236
236 union 237 union
237 { 238 {
238 /* A bitmask as wide as the number of bytes in the word that 239 /* A bitmask as wide as the number of bytes in the word that
239 contains a 1 if the byte may be needed. The store is unused if 240 contains a 1 if the byte may be needed. The store is unused if
240 all of the bits are 0. This is used if IS_LARGE is false. */ 241 all of the bits are 0. This is used if IS_LARGE is false. */
241 unsigned HOST_WIDE_INT small_bitmask; 242 unsigned HOST_WIDE_INT small_bitmask;
242 243
243 struct 244 struct
244 { 245 {
245 /* A bitmap with one bit per byte. Cleared bit means the position 246 /* A bitmap with one bit per byte. Cleared bit means the position
246 is needed. Used if IS_LARGE is false. */ 247 is needed. Used if IS_LARGE is false. */
247 » bitmap bitmap; 248 » bitmap bmap;
248 249
249 /* Number of set bits (i.e. unneeded bytes) in BITMAP. If it is 250 /* Number of set bits (i.e. unneeded bytes) in BITMAP. If it is
250 equal to END - BEGIN, the whole store is unused. */ 251 equal to END - BEGIN, the whole store is unused. */
251 int count; 252 int count;
252 } large; 253 } large;
253 } positions_needed; 254 } positions_needed;
254 255
255 /* The next store info for this insn. */ 256 /* The next store info for this insn. */
256 struct store_info *next; 257 struct store_info *next;
257 258
(...skipping 20 matching lines...) Expand all
278 unsigned HOST_WIDE_INT mask = ~(unsigned HOST_WIDE_INT) 0; 279 unsigned HOST_WIDE_INT mask = ~(unsigned HOST_WIDE_INT) 0;
279 return mask >> (HOST_BITS_PER_WIDE_INT - n); 280 return mask >> (HOST_BITS_PER_WIDE_INT - n);
280 } 281 }
281 282
282 typedef struct store_info *store_info_t; 283 typedef struct store_info *store_info_t;
283 static alloc_pool cse_store_info_pool; 284 static alloc_pool cse_store_info_pool;
284 static alloc_pool rtx_store_info_pool; 285 static alloc_pool rtx_store_info_pool;
285 286
286 /* This structure holds information about a load. These are only 287 /* This structure holds information about a load. These are only
287 built for rtx bases. */ 288 built for rtx bases. */
288 struct read_info 289 struct read_info
289 { 290 {
290 /* The id of the mem group of the base address. */ 291 /* The id of the mem group of the base address. */
291 int group_id; 292 int group_id;
292 293
293 /* If this is non-zero, it is the alias set of a spill location. */ 294 /* If this is non-zero, it is the alias set of a spill location. */
294 alias_set_type alias_set; 295 alias_set_type alias_set;
295 296
296 /* The offset of the first and byte after the last byte associated 297 /* The offset of the first and byte after the last byte associated
297 with the operation. If begin == end == 0, the read did not have 298 with the operation. If begin == end == 0, the read did not have
298 a constant offset. */ 299 a constant offset. */
299 int begin, end; 300 int begin, end;
300 301
301 /* The mem being read. */ 302 /* The mem being read. */
302 rtx mem; 303 rtx mem;
303 304
304 /* The next read_info for this insn. */ 305 /* The next read_info for this insn. */
305 struct read_info *next; 306 struct read_info *next;
306 }; 307 };
307 typedef struct read_info *read_info_t; 308 typedef struct read_info *read_info_t;
308 static alloc_pool read_info_pool; 309 static alloc_pool read_info_pool;
309 310
310 311
311 /* One of these records is created for each insn. */ 312 /* One of these records is created for each insn. */
312 313
313 struct insn_info 314 struct insn_info
314 { 315 {
315 /* Set true if the insn contains a store but the insn itself cannot 316 /* Set true if the insn contains a store but the insn itself cannot
316 be deleted. This is set if the insn is a parallel and there is 317 be deleted. This is set if the insn is a parallel and there is
317 more than one non dead output or if the insn is in some way 318 more than one non dead output or if the insn is in some way
318 volatile. */ 319 volatile. */
319 bool cannot_delete; 320 bool cannot_delete;
320 321
321 /* This field is only used by the global algorithm. It is set true 322 /* This field is only used by the global algorithm. It is set true
322 if the insn contains any read of mem except for a (1). This is 323 if the insn contains any read of mem except for a (1). This is
323 also set if the insn is a call or has a clobber mem. If the insn 324 also set if the insn is a call or has a clobber mem. If the insn
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 trash as it is not cleared when a wild read occurs. The only 378 trash as it is not cleared when a wild read occurs. The only
378 time it is guaranteed to be correct is when the traversal starts 379 time it is guaranteed to be correct is when the traversal starts
379 at active_local_stores. */ 380 at active_local_stores. */
380 struct insn_info * next_local_store; 381 struct insn_info * next_local_store;
381 }; 382 };
382 383
383 typedef struct insn_info *insn_info_t; 384 typedef struct insn_info *insn_info_t;
384 static alloc_pool insn_info_pool; 385 static alloc_pool insn_info_pool;
385 386
386 /* The linked list of stores that are under consideration in this 387 /* The linked list of stores that are under consideration in this
387 basic block. */ 388 basic block. */
388 static insn_info_t active_local_stores; 389 static insn_info_t active_local_stores;
389 390
390 struct bb_info 391 struct bb_info
391 { 392 {
392 393
393 /* Pointer to the insn info for the last insn in the block. These 394 /* Pointer to the insn info for the last insn in the block. These
394 are linked so this is how all of the insns are reached. During 395 are linked so this is how all of the insns are reached. During
395 scanning this is the current insn being scanned. */ 396 scanning this is the current insn being scanned. */
396 insn_info_t last_insn; 397 insn_info_t last_insn;
397 398
398 /* The info for the global dataflow problem. */ 399 /* The info for the global dataflow problem. */
399 400
400 401
401 /* This is set if the transfer function should and in the wild_read 402 /* This is set if the transfer function should and in the wild_read
402 bitmap before applying the kill and gen sets. That vector knocks 403 bitmap before applying the kill and gen sets. That vector knocks
403 out most of the bits in the bitmap and thus speeds up the 404 out most of the bits in the bitmap and thus speeds up the
404 operations. */ 405 operations. */
405 bool apply_wild_read; 406 bool apply_wild_read;
406 407
407 /* The following 4 bitvectors hold information about which positions 408 /* The following 4 bitvectors hold information about which positions
408 of which stores are live or dead. They are indexed by 409 of which stores are live or dead. They are indexed by
409 get_bitmap_index. */ 410 get_bitmap_index. */
410 411
411 /* The set of store positions that exist in this block before a wild read. */ 412 /* The set of store positions that exist in this block before a wild read. */
412 bitmap gen; 413 bitmap gen;
413 414
414 /* The set of load positions that exist in this block above the 415 /* The set of load positions that exist in this block above the
415 same position of a store. */ 416 same position of a store. */
416 bitmap kill; 417 bitmap kill;
417 418
418 /* The set of stores that reach the top of the block without being 419 /* The set of stores that reach the top of the block without being
419 killed by a read. 420 killed by a read.
420 421
421 Do not represent the in if it is all ones. Note that this is 422 Do not represent the in if it is all ones. Note that this is
422 what the bitvector should logically be initialized to for a set 423 what the bitvector should logically be initialized to for a set
423 intersection problem. However, like the kill set, this is too 424 intersection problem. However, like the kill set, this is too
(...skipping 24 matching lines...) Expand all
448 typedef struct bb_info *bb_info_t; 449 typedef struct bb_info *bb_info_t;
449 static alloc_pool bb_info_pool; 450 static alloc_pool bb_info_pool;
450 451
451 /* Table to hold all bb_infos. */ 452 /* Table to hold all bb_infos. */
452 static bb_info_t *bb_table; 453 static bb_info_t *bb_table;
453 454
454 /* There is a group_info for each rtx base that is used to reference 455 /* There is a group_info for each rtx base that is used to reference
455 memory. There are also not many of the rtx bases because they are 456 memory. There are also not many of the rtx bases because they are
456 very limited in scope. */ 457 very limited in scope. */
457 458
458 struct group_info 459 struct group_info
459 { 460 {
460 /* The actual base of the address. */ 461 /* The actual base of the address. */
461 rtx rtx_base; 462 rtx rtx_base;
462 463
463 /* The sequential id of the base. This allows us to have a 464 /* The sequential id of the base. This allows us to have a
464 canonical ordering of these that is not based on addresses. */ 465 canonical ordering of these that is not based on addresses. */
465 int id; 466 int id;
466 467
467 /* True if there are any positions that are to be processed 468 /* True if there are any positions that are to be processed
468 globally. */ 469 globally. */
469 bool process_globally; 470 bool process_globally;
470 471
471 /* True if the base of this group is either the frame_pointer or 472 /* True if the base of this group is either the frame_pointer or
472 hard_frame_pointer. */ 473 hard_frame_pointer. */
473 bool frame_related; 474 bool frame_related;
474 475
475 /* A mem wrapped around the base pointer for the group in order to 476 /* A mem wrapped around the base pointer for the group in order to
476 do read dependency. */ 477 do read dependency. */
477 rtx base_mem; 478 rtx base_mem;
478 479
479 /* Canonized version of base_mem's address. */ 480 /* Canonized version of base_mem's address. */
480 rtx canon_base_addr; 481 rtx canon_base_addr;
481 482
482 /* These two sets of two bitmaps are used to keep track of how many 483 /* These two sets of two bitmaps are used to keep track of how many
483 stores are actually referencing that position from this base. We 484 stores are actually referencing that position from this base. We
484 only do this for rtx bases as this will be used to assign 485 only do this for rtx bases as this will be used to assign
485 positions in the bitmaps for the global problem. Bit N is set in 486 positions in the bitmaps for the global problem. Bit N is set in
486 store1 on the first store for offset N. Bit N is set in store2 487 store1 on the first store for offset N. Bit N is set in store2
487 for the second store to offset N. This is all we need since we 488 for the second store to offset N. This is all we need since we
488 only care about offsets that have two or more stores for them. 489 only care about offsets that have two or more stores for them.
(...skipping 10 matching lines...) Expand all
499 500
500 /* The positions in this bitmap have the same assignments as the in, 501 /* The positions in this bitmap have the same assignments as the in,
501 out, gen and kill bitmaps. This bitmap is all zeros except for 502 out, gen and kill bitmaps. This bitmap is all zeros except for
502 the positions that are occupied by stores for this group. */ 503 the positions that are occupied by stores for this group. */
503 bitmap group_kill; 504 bitmap group_kill;
504 505
505 /* The offset_map is used to map the offsets from this base into 506 /* The offset_map is used to map the offsets from this base into
506 positions in the global bitmaps. It is only created after all of 507 positions in the global bitmaps. It is only created after all of
507 the all of stores have been scanned and we know which ones we 508 the all of stores have been scanned and we know which ones we
508 care about. */ 509 care about. */
509 int *offset_map_n, *offset_map_p; 510 int *offset_map_n, *offset_map_p;
510 int offset_map_size_n, offset_map_size_p; 511 int offset_map_size_n, offset_map_size_p;
511 }; 512 };
512 typedef struct group_info *group_info_t; 513 typedef struct group_info *group_info_t;
513 typedef const struct group_info *const_group_info_t; 514 typedef const struct group_info *const_group_info_t;
514 static alloc_pool rtx_group_info_pool; 515 static alloc_pool rtx_group_info_pool;
515 516
516 /* Tables of group_info structures, hashed by base value. */ 517 /* Tables of group_info structures, hashed by base value. */
517 static htab_t rtx_group_table; 518 static htab_t rtx_group_table;
518 519
519 /* Index into the rtx_group_vec. */ 520 /* Index into the rtx_group_vec. */
520 static int rtx_group_next_id; 521 static int rtx_group_next_id;
521 522
522 DEF_VEC_P(group_info_t); 523 DEF_VEC_P(group_info_t);
523 DEF_VEC_ALLOC_P(group_info_t,heap); 524 DEF_VEC_ALLOC_P(group_info_t,heap);
524 525
525 static VEC(group_info_t,heap) *rtx_group_vec; 526 static VEC(group_info_t,heap) *rtx_group_vec;
526 527
527 528
528 /* This structure holds the set of changes that are being deferred 529 /* This structure holds the set of changes that are being deferred
529 when removing read operation. See replace_read. */ 530 when removing read operation. See replace_read. */
530 struct deferred_change 531 struct deferred_change
531 { 532 {
532 533
533 /* The mem that is being replaced. */ 534 /* The mem that is being replaced. */
534 rtx *loc; 535 rtx *loc;
535 536
536 /* The reg it is being replaced with. */ 537 /* The reg it is being replaced with. */
537 rtx reg; 538 rtx reg;
538 539
539 struct deferred_change *next; 540 struct deferred_change *next;
540 }; 541 };
541 542
542 typedef struct deferred_change *deferred_change_t; 543 typedef struct deferred_change *deferred_change_t;
543 static alloc_pool deferred_change_pool; 544 static alloc_pool deferred_change_pool;
544 545
545 static deferred_change_t deferred_change_list = NULL; 546 static deferred_change_t deferred_change_list = NULL;
546 547
547 /* This are used to hold the alias sets of spill variables. Since 548 /* This are used to hold the alias sets of spill variables. Since
548 these are never aliased and there may be a lot of them, it makes 549 these are never aliased and there may be a lot of them, it makes
549 sense to treat them specially. This bitvector is only allocated in 550 sense to treat them specially. This bitvector is only allocated in
550 calls from dse_record_singleton_alias_set which currently is only 551 calls from dse_record_singleton_alias_set which currently is only
551 made during reload1. So when dse is called before reload this 552 made during reload1. So when dse is called before reload this
552 mechanism does nothing. */ 553 mechanism does nothing. */
553 554
554 static bitmap clear_alias_sets = NULL; 555 static bitmap clear_alias_sets = NULL;
555 556
556 /* The set of clear_alias_sets that have been disqualified because 557 /* The set of clear_alias_sets that have been disqualified because
557 there are loads or stores using a different mode than the alias set 558 there are loads or stores using a different mode than the alias set
558 was registered with. */ 559 was registered with. */
559 static bitmap disqualified_clear_alias_sets = NULL; 560 static bitmap disqualified_clear_alias_sets = NULL;
560 561
561 /* The group that holds all of the clear_alias_sets. */ 562 /* The group that holds all of the clear_alias_sets. */
562 static group_info_t clear_alias_group; 563 static group_info_t clear_alias_group;
563 564
564 /* The modes of the clear_alias_sets. */ 565 /* The modes of the clear_alias_sets. */
565 static htab_t clear_alias_mode_table; 566 static htab_t clear_alias_mode_table;
566 567
567 /* Hash table element to look up the mode for an alias set. */ 568 /* Hash table element to look up the mode for an alias set. */
568 struct clear_alias_mode_holder 569 struct clear_alias_mode_holder
569 { 570 {
570 alias_set_type alias_set; 571 alias_set_type alias_set;
571 enum machine_mode mode; 572 enum machine_mode mode;
572 }; 573 };
573 574
574 static alloc_pool clear_alias_mode_pool; 575 static alloc_pool clear_alias_mode_pool;
575 576
576 /* This is true except if cfun->stdarg -- i.e. we cannot do 577 /* This is true except if cfun->stdarg -- i.e. we cannot do
577 this for vararg functions because they play games with the frame. */ 578 this for vararg functions because they play games with the frame. */
578 static bool stores_off_frame_dead_at_return; 579 static bool stores_off_frame_dead_at_return;
579 580
580 /* Counter for stats. */ 581 /* Counter for stats. */
581 static int globally_deleted; 582 static int globally_deleted;
582 static int locally_deleted; 583 static int locally_deleted;
583 static int spill_deleted; 584 static int spill_deleted;
584 585
585 static bitmap all_blocks; 586 static bitmap all_blocks;
586 587
587 /* The number of bits used in the global bitmaps. */ 588 /* The number of bits used in the global bitmaps. */
588 static unsigned int current_position; 589 static unsigned int current_position;
589 590
590 591
591 static bool gate_dse (void); 592 static bool gate_dse (void);
592 static bool gate_dse1 (void); 593 static bool gate_dse1 (void);
593 static bool gate_dse2 (void); 594 static bool gate_dse2 (void);
594 595
595 596

error: old chunk mismatch

OLDNEW
« no previous file with comments | « gcc/gcc/dojump.c ('k') | gcc/gcc/dummy-checksum.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698