function.c (132732) | function.c (146908) |
---|---|
1/* Expands front end tree to back end RTL for GCC. 2 Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify it under 8the terms of the GNU General Public License as published by the Free --- 5 unchanged lines hidden (view full) --- 14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15for more details. 16 17You should have received a copy of the GNU General Public License 18along with GCC; see the file COPYING. If not, write to the Free 19Software Foundation, 59 Temple Place - Suite 330, Boston, MA 2002111-1307, USA. */ 21 | 1/* Expands front end tree to back end RTL for GCC. 2 Copyright (C) 1987, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 3 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. 4 5This file is part of GCC. 6 7GCC is free software; you can redistribute it and/or modify it under 8the terms of the GNU General Public License as published by the Free --- 5 unchanged lines hidden (view full) --- 14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15for more details. 16 17You should have received a copy of the GNU General Public License 18along with GCC; see the file COPYING. If not, write to the Free 19Software Foundation, 59 Temple Place - Suite 330, Boston, MA 2002111-1307, USA. */ 21 |
22/* $FreeBSD: head/contrib/gcc/function.c 132732 2004-07-28 04:01:01Z kan $ */ | 22/* $FreeBSD: head/contrib/gcc/function.c 146908 2005-06-03 04:02:20Z kan $ */ |
23 24/* This file handles the generation of rtl code from tree structure 25 at the level of the function as a whole. 26 It creates the rtl expressions for parameters and auto variables 27 and has full responsibility for allocating stack slots. 28 29 `expand_function_start' is called at the beginning of a function, 30 before the function body is parsed, and `expand_function_end' is --- 202 unchanged lines hidden (view full) --- 233}; 234 235/* Forward declarations. */ 236 237static rtx assign_stack_local_1 (enum machine_mode, HOST_WIDE_INT, int, 238 struct function *); 239static struct temp_slot *find_temp_slot_from_address (rtx); 240static void put_reg_into_stack (struct function *, rtx, tree, enum machine_mode, | 23 24/* This file handles the generation of rtl code from tree structure 25 at the level of the function as a whole. 26 It creates the rtl expressions for parameters and auto variables 27 and has full responsibility for allocating stack slots. 28 29 `expand_function_start' is called at the beginning of a function, 30 before the function body is parsed, and `expand_function_end' is --- 202 unchanged lines hidden (view full) --- 233}; 234 235/* Forward declarations. */ 236 237static rtx assign_stack_local_1 (enum machine_mode, HOST_WIDE_INT, int, 238 struct function *); 239static struct temp_slot *find_temp_slot_from_address (rtx); 240static void put_reg_into_stack (struct function *, rtx, tree, enum machine_mode, |
241 enum machine_mode, int, unsigned int, int, htab_t); | 241 unsigned int, bool, bool, bool, htab_t); |
242static void schedule_fixup_var_refs (struct function *, rtx, tree, enum machine_mode, 243 htab_t); 244static void fixup_var_refs (rtx, enum machine_mode, int, rtx, htab_t); 245static struct fixup_replacement 246 *find_fixup_replacement (struct fixup_replacement **, rtx); 247static void fixup_var_refs_insns (rtx, rtx, enum machine_mode, int, int, rtx); 248static void fixup_var_refs_insns_with_hash (htab_t, rtx, enum machine_mode, int, rtx); 249static void fixup_var_refs_insn (rtx, rtx, enum machine_mode, int, int, rtx); --- 253 unchanged lines hidden (view full) --- 503} 504 505/* Allocate a stack slot of SIZE bytes and return a MEM rtx for it 506 with machine mode MODE. 507 508 ALIGN controls the amount of alignment for the address of the slot: 509 0 means according to MODE, 510 -1 means use BIGGEST_ALIGNMENT and round size to multiple of that, | 242static void schedule_fixup_var_refs (struct function *, rtx, tree, enum machine_mode, 243 htab_t); 244static void fixup_var_refs (rtx, enum machine_mode, int, rtx, htab_t); 245static struct fixup_replacement 246 *find_fixup_replacement (struct fixup_replacement **, rtx); 247static void fixup_var_refs_insns (rtx, rtx, enum machine_mode, int, int, rtx); 248static void fixup_var_refs_insns_with_hash (htab_t, rtx, enum machine_mode, int, rtx); 249static void fixup_var_refs_insn (rtx, rtx, enum machine_mode, int, int, rtx); --- 253 unchanged lines hidden (view full) --- 503} 504 505/* Allocate a stack slot of SIZE bytes and return a MEM rtx for it 506 with machine mode MODE. 507 508 ALIGN controls the amount of alignment for the address of the slot: 509 0 means according to MODE, 510 -1 means use BIGGEST_ALIGNMENT and round size to multiple of that, |
511 -2 means use BITS_PER_UNIT, |
|
511 positive specifies alignment boundary in bits. 512 513 We do not round to stack_boundary here. 514 515 FUNCTION specifies the function to allocate in. */ 516 517static rtx 518assign_stack_local_1 (enum machine_mode mode, HOST_WIDE_INT size, int align, --- 21 unchanged lines hidden (view full) --- 540 541 alignment /= BITS_PER_UNIT; 542 } 543 else if (align == -1) 544 { 545 alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT; 546 size = CEIL_ROUND (size, alignment); 547 } | 512 positive specifies alignment boundary in bits. 513 514 We do not round to stack_boundary here. 515 516 FUNCTION specifies the function to allocate in. */ 517 518static rtx 519assign_stack_local_1 (enum machine_mode mode, HOST_WIDE_INT size, int align, --- 21 unchanged lines hidden (view full) --- 541 542 alignment /= BITS_PER_UNIT; 543 } 544 else if (align == -1) 545 { 546 alignment = BIGGEST_ALIGNMENT / BITS_PER_UNIT; 547 size = CEIL_ROUND (size, alignment); 548 } |
549 else if (align == -2) 550 alignment = 1; /* BITS_PER_UNIT / BITS_PER_UNIT */ |
|
548 else 549 alignment = align / BITS_PER_UNIT; 550 551#ifdef FRAME_GROWS_DOWNWARD 552 function->x_frame_offset -= size; 553#endif 554 555 /* Ignore alignment we can't do with expected alignment of the boundary. */ --- 732 unchanged lines hidden (view full) --- 1288 1289void 1290put_var_into_stack (tree decl, int rescan) 1291{ 1292 rtx reg; 1293 enum machine_mode promoted_mode, decl_mode; 1294 struct function *function = 0; 1295 tree context; | 551 else 552 alignment = align / BITS_PER_UNIT; 553 554#ifdef FRAME_GROWS_DOWNWARD 555 function->x_frame_offset -= size; 556#endif 557 558 /* Ignore alignment we can't do with expected alignment of the boundary. */ --- 732 unchanged lines hidden (view full) --- 1291 1292void 1293put_var_into_stack (tree decl, int rescan) 1294{ 1295 rtx reg; 1296 enum machine_mode promoted_mode, decl_mode; 1297 struct function *function = 0; 1298 tree context; |
1296 int can_use_addressof; 1297 int volatilep = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl); 1298 int usedp = (TREE_USED (decl) | 1299 bool can_use_addressof_p; 1300 bool volatile_p = TREE_CODE (decl) != SAVE_EXPR && TREE_THIS_VOLATILE (decl); 1301 bool used_p = (TREE_USED (decl) |
1299 || (TREE_CODE (decl) != SAVE_EXPR && DECL_INITIAL (decl) != 0)); 1300 1301 context = decl_function_context (decl); 1302 1303 /* Get the current rtl used for this object and its original mode. */ 1304 reg = (TREE_CODE (decl) == SAVE_EXPR 1305 ? SAVE_EXPR_RTL (decl) 1306 : DECL_RTL_IF_SET (decl)); --- 30 unchanged lines hidden (view full) --- 1337 { 1338 reg = XEXP (reg, 0); 1339 decl_mode = promoted_mode = GET_MODE (reg); 1340 } 1341 1342 /* If this variable lives in the current function and we don't need to put it 1343 in the stack for the sake of setjmp or the non-locality, try to keep it in 1344 a register until we know we actually need the address. */ | 1302 || (TREE_CODE (decl) != SAVE_EXPR && DECL_INITIAL (decl) != 0)); 1303 1304 context = decl_function_context (decl); 1305 1306 /* Get the current rtl used for this object and its original mode. */ 1307 reg = (TREE_CODE (decl) == SAVE_EXPR 1308 ? SAVE_EXPR_RTL (decl) 1309 : DECL_RTL_IF_SET (decl)); --- 30 unchanged lines hidden (view full) --- 1340 { 1341 reg = XEXP (reg, 0); 1342 decl_mode = promoted_mode = GET_MODE (reg); 1343 } 1344 1345 /* If this variable lives in the current function and we don't need to put it 1346 in the stack for the sake of setjmp or the non-locality, try to keep it in 1347 a register until we know we actually need the address. */ |
1345 can_use_addressof | 1348 can_use_addressof_p |
1346 = (function == 0 1347 && ! (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl)) 1348 && optimize > 0 1349 /* FIXME make it work for promoted modes too */ 1350 && decl_mode == promoted_mode 1351#ifdef NON_SAVING_SETJMP 1352 && ! (NON_SAVING_SETJMP && current_function_calls_setjmp) 1353#endif 1354 ); 1355 1356 /* If we can't use ADDRESSOF, make sure we see through one we already 1357 generated. */ | 1349 = (function == 0 1350 && ! (TREE_CODE (decl) != SAVE_EXPR && DECL_NONLOCAL (decl)) 1351 && optimize > 0 1352 /* FIXME make it work for promoted modes too */ 1353 && decl_mode == promoted_mode 1354#ifdef NON_SAVING_SETJMP 1355 && ! (NON_SAVING_SETJMP && current_function_calls_setjmp) 1356#endif 1357 ); 1358 1359 /* If we can't use ADDRESSOF, make sure we see through one we already 1360 generated. */ |
1358 if (! can_use_addressof && GET_CODE (reg) == MEM | 1361 if (! can_use_addressof_p 1362 && GET_CODE (reg) == MEM |
1359 && GET_CODE (XEXP (reg, 0)) == ADDRESSOF) 1360 reg = XEXP (XEXP (reg, 0), 0); 1361 1362 /* Now we should have a value that resides in one or more pseudo regs. */ 1363 1364 if (GET_CODE (reg) == REG) 1365 { | 1363 && GET_CODE (XEXP (reg, 0)) == ADDRESSOF) 1364 reg = XEXP (XEXP (reg, 0), 0); 1365 1366 /* Now we should have a value that resides in one or more pseudo regs. */ 1367 1368 if (GET_CODE (reg) == REG) 1369 { |
1366 if (can_use_addressof) | 1370 if (can_use_addressof_p) |
1367 gen_mem_addressof (reg, decl, rescan); 1368 else | 1371 gen_mem_addressof (reg, decl, rescan); 1372 else |
1369 put_reg_into_stack (function, reg, TREE_TYPE (decl), promoted_mode, 1370 decl_mode, volatilep, 0, usedp, 0); | 1373 put_reg_into_stack (function, reg, TREE_TYPE (decl), decl_mode, 1374 0, volatile_p, used_p, false, 0); |
1371 } 1372 else if (GET_CODE (reg) == CONCAT) 1373 { 1374 /* A CONCAT contains two pseudos; put them both in the stack. 1375 We do it so they end up consecutive. 1376 We fixup references to the parts only after we fixup references 1377 to the whole CONCAT, lest we do double fixups for the latter 1378 references. */ 1379 enum machine_mode part_mode = GET_MODE (XEXP (reg, 0)); 1380 tree part_type = (*lang_hooks.types.type_for_mode) (part_mode, 0); 1381 rtx lopart = XEXP (reg, 0); 1382 rtx hipart = XEXP (reg, 1); 1383#ifdef FRAME_GROWS_DOWNWARD 1384 /* Since part 0 should have a lower address, do it second. */ 1385 put_reg_into_stack (function, hipart, part_type, part_mode, | 1375 } 1376 else if (GET_CODE (reg) == CONCAT) 1377 { 1378 /* A CONCAT contains two pseudos; put them both in the stack. 1379 We do it so they end up consecutive. 1380 We fixup references to the parts only after we fixup references 1381 to the whole CONCAT, lest we do double fixups for the latter 1382 references. */ 1383 enum machine_mode part_mode = GET_MODE (XEXP (reg, 0)); 1384 tree part_type = (*lang_hooks.types.type_for_mode) (part_mode, 0); 1385 rtx lopart = XEXP (reg, 0); 1386 rtx hipart = XEXP (reg, 1); 1387#ifdef FRAME_GROWS_DOWNWARD 1388 /* Since part 0 should have a lower address, do it second. */ 1389 put_reg_into_stack (function, hipart, part_type, part_mode, |
1386 part_mode, volatilep, 0, 0, 0); | 1390 0, volatile_p, false, false, 0); |
1387 put_reg_into_stack (function, lopart, part_type, part_mode, | 1391 put_reg_into_stack (function, lopart, part_type, part_mode, |
1388 part_mode, volatilep, 0, 0, 0); | 1392 0, volatile_p, false, true, 0); |
1389#else 1390 put_reg_into_stack (function, lopart, part_type, part_mode, | 1393#else 1394 put_reg_into_stack (function, lopart, part_type, part_mode, |
1391 part_mode, volatilep, 0, 0, 0); | 1395 0, volatile_p, false, false, 0); |
1392 put_reg_into_stack (function, hipart, part_type, part_mode, | 1396 put_reg_into_stack (function, hipart, part_type, part_mode, |
1393 part_mode, volatilep, 0, 0, 0); | 1397 0, volatile_p, false, true, 0); |
1394#endif 1395 1396 /* Change the CONCAT into a combined MEM for both parts. */ 1397 PUT_CODE (reg, MEM); 1398 MEM_ATTRS (reg) = 0; 1399 1400 /* set_mem_attributes uses DECL_RTL to avoid re-generating of 1401 already computed alias sets. Here we want to re-generate. */ --- 4 unchanged lines hidden (view full) --- 1406 SET_DECL_RTL (decl, reg); 1407 1408 /* The two parts are in memory order already. 1409 Use the lower parts address as ours. */ 1410 XEXP (reg, 0) = XEXP (XEXP (reg, 0), 0); 1411 /* Prevent sharing of rtl that might lose. */ 1412 if (GET_CODE (XEXP (reg, 0)) == PLUS) 1413 XEXP (reg, 0) = copy_rtx (XEXP (reg, 0)); | 1398#endif 1399 1400 /* Change the CONCAT into a combined MEM for both parts. */ 1401 PUT_CODE (reg, MEM); 1402 MEM_ATTRS (reg) = 0; 1403 1404 /* set_mem_attributes uses DECL_RTL to avoid re-generating of 1405 already computed alias sets. Here we want to re-generate. */ --- 4 unchanged lines hidden (view full) --- 1410 SET_DECL_RTL (decl, reg); 1411 1412 /* The two parts are in memory order already. 1413 Use the lower parts address as ours. */ 1414 XEXP (reg, 0) = XEXP (XEXP (reg, 0), 0); 1415 /* Prevent sharing of rtl that might lose. */ 1416 if (GET_CODE (XEXP (reg, 0)) == PLUS) 1417 XEXP (reg, 0) = copy_rtx (XEXP (reg, 0)); |
1414 if (usedp && rescan) | 1418 if (used_p && rescan) |
1415 { 1416 schedule_fixup_var_refs (function, reg, TREE_TYPE (decl), 1417 promoted_mode, 0); 1418 schedule_fixup_var_refs (function, lopart, part_type, part_mode, 0); 1419 schedule_fixup_var_refs (function, hipart, part_type, part_mode, 0); 1420 } 1421 } 1422 else 1423 return; 1424} 1425 1426/* Subroutine of put_var_into_stack. This puts a single pseudo reg REG 1427 into the stack frame of FUNCTION (0 means the current function). | 1419 { 1420 schedule_fixup_var_refs (function, reg, TREE_TYPE (decl), 1421 promoted_mode, 0); 1422 schedule_fixup_var_refs (function, lopart, part_type, part_mode, 0); 1423 schedule_fixup_var_refs (function, hipart, part_type, part_mode, 0); 1424 } 1425 } 1426 else 1427 return; 1428} 1429 1430/* Subroutine of put_var_into_stack. This puts a single pseudo reg REG 1431 into the stack frame of FUNCTION (0 means the current function). |
1432 TYPE is the user-level data type of the value hold in the register. |
|
1428 DECL_MODE is the machine mode of the user-level data type. | 1433 DECL_MODE is the machine mode of the user-level data type. |
1429 PROMOTED_MODE is the machine mode of the register. 1430 VOLATILE_P is nonzero if this is for a "volatile" decl. 1431 USED_P is nonzero if this reg might have already been used in an insn. */ | 1434 ORIGINAL_REGNO must be set if the real regno is not visible in REG. 1435 VOLATILE_P is true if this is for a "volatile" decl. 1436 USED_P is true if this reg might have already been used in an insn. 1437 CONSECUTIVE_P is true if the stack slot assigned to reg must be 1438 consecutive with the previous stack slot. */ |
1432 1433static void 1434put_reg_into_stack (struct function *function, rtx reg, tree type, | 1439 1440static void 1441put_reg_into_stack (struct function *function, rtx reg, tree type, |
1435 enum machine_mode promoted_mode, 1436 enum machine_mode decl_mode, int volatile_p, 1437 unsigned int original_regno, int used_p, htab_t ht) | 1442 enum machine_mode decl_mode, unsigned int original_regno, 1443 bool volatile_p, bool used_p, bool consecutive_p, 1444 htab_t ht) |
1438{ 1439 struct function *func = function ? function : cfun; | 1445{ 1446 struct function *func = function ? function : cfun; |
1440 rtx new = 0; | 1447 enum machine_mode mode = GET_MODE (reg); |
1441 unsigned int regno = original_regno; | 1448 unsigned int regno = original_regno; |
1449 rtx new = 0; |
|
1442 1443 if (regno == 0) 1444 regno = REGNO (reg); 1445 1446 if (regno < func->x_max_parm_reg) 1447 { 1448 if (!func->x_parm_reg_stack_loc) 1449 abort (); 1450 new = func->x_parm_reg_stack_loc[regno]; 1451 } 1452 1453 if (new == 0) | 1450 1451 if (regno == 0) 1452 regno = REGNO (reg); 1453 1454 if (regno < func->x_max_parm_reg) 1455 { 1456 if (!func->x_parm_reg_stack_loc) 1457 abort (); 1458 new = func->x_parm_reg_stack_loc[regno]; 1459 } 1460 1461 if (new == 0) |
1454 new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 0, func); | 1462 new = assign_stack_local_1 (decl_mode, GET_MODE_SIZE (decl_mode), 1463 consecutive_p ? -2 : 0, func); |
1455 1456 PUT_CODE (reg, MEM); 1457 PUT_MODE (reg, decl_mode); 1458 XEXP (reg, 0) = XEXP (new, 0); 1459 MEM_ATTRS (reg) = 0; 1460 /* `volatil' bit means one thing for MEMs, another entirely for REGs. */ 1461 MEM_VOLATILE_P (reg) = volatile_p; 1462 --- 5 unchanged lines hidden (view full) --- 1468 if (type) 1469 { 1470 MEM_SET_IN_STRUCT_P (reg, 1471 AGGREGATE_TYPE_P (type) || MEM_IN_STRUCT_P (new)); 1472 set_mem_alias_set (reg, get_alias_set (type)); 1473 } 1474 1475 if (used_p) | 1464 1465 PUT_CODE (reg, MEM); 1466 PUT_MODE (reg, decl_mode); 1467 XEXP (reg, 0) = XEXP (new, 0); 1468 MEM_ATTRS (reg) = 0; 1469 /* `volatil' bit means one thing for MEMs, another entirely for REGs. */ 1470 MEM_VOLATILE_P (reg) = volatile_p; 1471 --- 5 unchanged lines hidden (view full) --- 1477 if (type) 1478 { 1479 MEM_SET_IN_STRUCT_P (reg, 1480 AGGREGATE_TYPE_P (type) || MEM_IN_STRUCT_P (new)); 1481 set_mem_alias_set (reg, get_alias_set (type)); 1482 } 1483 1484 if (used_p) |
1476 schedule_fixup_var_refs (function, reg, type, promoted_mode, ht); | 1485 schedule_fixup_var_refs (function, reg, type, mode, ht); |
1477} 1478 1479/* Make sure that all refs to the variable, previously made 1480 when it was a register, are fixed up to be valid again. 1481 See function above for meaning of arguments. */ 1482 1483static void 1484schedule_fixup_var_refs (struct function *function, rtx reg, tree type, --- 151 unchanged lines hidden (view full) --- 1636{ 1637 struct insns_for_mem_entry tmp; 1638 struct insns_for_mem_entry *ime; 1639 rtx insn_list; 1640 1641 tmp.key = var; 1642 ime = htab_find (ht, &tmp); 1643 for (insn_list = ime->insns; insn_list != 0; insn_list = XEXP (insn_list, 1)) | 1486} 1487 1488/* Make sure that all refs to the variable, previously made 1489 when it was a register, are fixed up to be valid again. 1490 See function above for meaning of arguments. */ 1491 1492static void 1493schedule_fixup_var_refs (struct function *function, rtx reg, tree type, --- 151 unchanged lines hidden (view full) --- 1645{ 1646 struct insns_for_mem_entry tmp; 1647 struct insns_for_mem_entry *ime; 1648 rtx insn_list; 1649 1650 tmp.key = var; 1651 ime = htab_find (ht, &tmp); 1652 for (insn_list = ime->insns; insn_list != 0; insn_list = XEXP (insn_list, 1)) |
1644 if (INSN_P (XEXP (insn_list, 0))) | 1653 if (INSN_P (XEXP (insn_list, 0)) && !INSN_DELETED_P (XEXP (insn_list, 0))) |
1645 fixup_var_refs_insn (XEXP (insn_list, 0), var, promoted_mode, 1646 unsignedp, 1, may_share); 1647} 1648 1649 1650/* Per-insn processing by fixup_var_refs_insns(_with_hash). INSN is 1651 the insn under examination, VAR is the variable to fix up 1652 references to, PROMOTED_MODE and UNSIGNEDP describe VAR, and --- 1251 unchanged lines hidden (view full) --- 2904} 2905 2906/* Force the register pointed to by R, an ADDRESSOF rtx, into the stack. */ 2907 2908static void 2909put_addressof_into_stack (rtx r, htab_t ht) 2910{ 2911 tree decl, type; | 1654 fixup_var_refs_insn (XEXP (insn_list, 0), var, promoted_mode, 1655 unsignedp, 1, may_share); 1656} 1657 1658 1659/* Per-insn processing by fixup_var_refs_insns(_with_hash). INSN is 1660 the insn under examination, VAR is the variable to fix up 1661 references to, PROMOTED_MODE and UNSIGNEDP describe VAR, and --- 1251 unchanged lines hidden (view full) --- 2913} 2914 2915/* Force the register pointed to by R, an ADDRESSOF rtx, into the stack. */ 2916 2917static void 2918put_addressof_into_stack (rtx r, htab_t ht) 2919{ 2920 tree decl, type; |
2912 int volatile_p, used_p; | 2921 bool volatile_p, used_p; |
2913 2914 rtx reg = XEXP (r, 0); 2915 2916 if (GET_CODE (reg) != REG) 2917 abort (); 2918 2919 decl = ADDRESSOF_DECL (r); 2920 if (decl) 2921 { 2922 type = TREE_TYPE (decl); 2923 volatile_p = (TREE_CODE (decl) != SAVE_EXPR 2924 && TREE_THIS_VOLATILE (decl)); 2925 used_p = (TREE_USED (decl) 2926 || (DECL_P (decl) && DECL_INITIAL (decl) != 0)); 2927 } 2928 else 2929 { 2930 type = NULL_TREE; | 2922 2923 rtx reg = XEXP (r, 0); 2924 2925 if (GET_CODE (reg) != REG) 2926 abort (); 2927 2928 decl = ADDRESSOF_DECL (r); 2929 if (decl) 2930 { 2931 type = TREE_TYPE (decl); 2932 volatile_p = (TREE_CODE (decl) != SAVE_EXPR 2933 && TREE_THIS_VOLATILE (decl)); 2934 used_p = (TREE_USED (decl) 2935 || (DECL_P (decl) && DECL_INITIAL (decl) != 0)); 2936 } 2937 else 2938 { 2939 type = NULL_TREE; |
2931 volatile_p = 0; 2932 used_p = 1; | 2940 volatile_p = false; 2941 used_p = true; |
2933 } 2934 | 2942 } 2943 |
2935 put_reg_into_stack (0, reg, type, GET_MODE (reg), GET_MODE (reg), 2936 volatile_p, ADDRESSOF_REGNO (r), used_p, ht); | 2944 put_reg_into_stack (0, reg, type, GET_MODE (reg), ADDRESSOF_REGNO (r), 2945 volatile_p, used_p, false, ht); |
2937} 2938 2939/* List of replacements made below in purge_addressof_1 when creating 2940 bitfield insertions. */ 2941static rtx purge_bitfield_addressof_replacements; 2942 2943/* List of replacements made below in purge_addressof_1 for patterns 2944 (MEM (ADDRESSOF (REG ...))). The key of the list entry is the --- 703 unchanged lines hidden (view full) --- 3648 changed if the new address is valid. */ 3649 3650static void 3651instantiate_decl (rtx x, HOST_WIDE_INT size, int valid_only) 3652{ 3653 enum machine_mode mode; 3654 rtx addr; 3655 | 2946} 2947 2948/* List of replacements made below in purge_addressof_1 when creating 2949 bitfield insertions. */ 2950static rtx purge_bitfield_addressof_replacements; 2951 2952/* List of replacements made below in purge_addressof_1 for patterns 2953 (MEM (ADDRESSOF (REG ...))). The key of the list entry is the --- 703 unchanged lines hidden (view full) --- 3657 changed if the new address is valid. */ 3658 3659static void 3660instantiate_decl (rtx x, HOST_WIDE_INT size, int valid_only) 3661{ 3662 enum machine_mode mode; 3663 rtx addr; 3664 |
3665 if (x == 0) 3666 return; 3667 3668 /* If this is a CONCAT, recurse for the pieces. */ 3669 if (GET_CODE (x) == CONCAT) 3670 { 3671 instantiate_decl (XEXP (x, 0), size / 2, valid_only); 3672 instantiate_decl (XEXP (x, 1), size / 2, valid_only); 3673 return; 3674 } 3675 |
|
3656 /* If this is not a MEM, no need to do anything. Similarly if the 3657 address is a constant or a register that is not a virtual register. */ | 3676 /* If this is not a MEM, no need to do anything. Similarly if the 3677 address is a constant or a register that is not a virtual register. */ |
3658 3659 if (x == 0 || GET_CODE (x) != MEM) | 3678 if (GET_CODE (x) != MEM) |
3660 return; 3661 3662 addr = XEXP (x, 0); 3663 if (CONSTANT_P (addr) 3664 || (GET_CODE (addr) == ADDRESSOF && GET_CODE (XEXP (addr, 0)) == REG) 3665 || (GET_CODE (addr) == REG 3666 && (REGNO (addr) < FIRST_VIRTUAL_REGISTER 3667 || REGNO (addr) > LAST_VIRTUAL_REGISTER))) --- 4486 unchanged lines hidden --- | 3679 return; 3680 3681 addr = XEXP (x, 0); 3682 if (CONSTANT_P (addr) 3683 || (GET_CODE (addr) == ADDRESSOF && GET_CODE (XEXP (addr, 0)) == REG) 3684 || (GET_CODE (addr) == REG 3685 && (REGNO (addr) < FIRST_VIRTUAL_REGISTER 3686 || REGNO (addr) > LAST_VIRTUAL_REGISTER))) --- 4486 unchanged lines hidden --- |