[PATCH] Cleanup last_location and update input_location in ipa_prop
Dehao Chen
dehao@google.com
Mon Nov 26 22:55:00 GMT 2012
The new patch is attached. Bootstrapped and passed gcc regression test.
Ok for trunk?
Thanks,
Dehao
gcc/ChangeLog:
2010-11-05 Dehao Chen <dehao@google.com>
* ipa-prop.c (ipa_modify_call_arguments): Set loc correctly.
* emit-rtl.c (last_location): Remove unused variable.
Index: gcc/emit-rtl.c
===================================================================
--- gcc/emit-rtl.c (revision 193203)
+++ gcc/emit-rtl.c (working copy)
@@ -5937,7 +5937,7 @@ location_t epilogue_location;
/* Hold current location information and last location information, so the
datastructures are built lazily only when some instructions in given
place are needed. */
-static location_t curr_location, last_location;
+static location_t curr_location;
/* Allocate insn location datastructure. */
void
@@ -5945,7 +5945,6 @@ insn_locations_init (void)
{
prologue_location = epilogue_location = 0;
curr_location = UNKNOWN_LOCATION;
- last_location = UNKNOWN_LOCATION;
}
/* At the end of emit stage, clear current location. */
Index: gcc/ipa-prop.c
===================================================================
--- gcc/ipa-prop.c (revision 193203)
+++ gcc/ipa-prop.c (working copy)
@@ -2870,7 +2870,8 @@ ipa_modify_call_arguments (struct cgraph_edge *cs,
gcc_checking_assert (adj->offset % BITS_PER_UNIT == 0);
base = gimple_call_arg (stmt, adj->base_index);
- loc = EXPR_LOCATION (base);
+ loc = DECL_P (base) ? DECL_SOURCE_LOCATION (base)
+ : EXPR_LOCATION (base);
if (TREE_CODE (base) != ADDR_EXPR
&& POINTER_TYPE_P (TREE_TYPE (base)))
More information about the Gcc-patches
mailing list