diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2a11001a74bd795d5ff36a9e42c9a82ae7f6a540..c128a74a183c0d6087695212f1a476ec42a3e428 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2009-10-08  Anatoly Sokolov  <aesok@post.ru>
+
+	* config/avr/avr.c (last_insn_address) Remove variable.
+	(expand_prologue): Don't initialise last_insn_address variable.
+	(final_prescan_insn): Don't output insn size.
+	* config/avr/avr.opt (msize): Remove switch.
+	* doc/invoke.texi (AVR Options): Remove documentation of -msize
+	switch.
+
 2009-10-08  Adam Nemet  <anemet@caviumnetworks.com>
 
 	* combine.c (label_tick_ebb_start): Fix comment.
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 76df476f4c458b43d2fe4f343c49aee4db77a132..7c3234f8f640b88241885fb6780fb8dbe97308d0 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -104,9 +104,6 @@ static GTY(()) rtx zero_reg_rtx;
 /* AVR register names {"r0", "r1", ..., "r31"} */
 static const char *const avr_regnames[] = REGISTER_NAMES;
 
-/* This holds the last insn address.  */
-static int last_insn_address = 0;
-
 /* Preprocessor macros to define depending on MCU type.  */
 static const char *avr_extra_arch_macro;
 
@@ -556,8 +553,6 @@ expand_prologue (void)
   rtx pushword = gen_rtx_MEM (HImode,
                   gen_rtx_POST_DEC (HImode, stack_pointer_rtx));
   rtx insn;
-
-  last_insn_address = 0;
   
   /* Init cfun->machine.  */
   cfun->machine->is_naked = avr_naked_function_p (current_function_decl);
@@ -1459,25 +1454,17 @@ byte_immediate_operand (rtx op, enum machine_mode mode ATTRIBUTE_UNUSED)
           && INTVAL (op) <= 0xff && INTVAL (op) >= 0);
 }
 
-/* Output all insn addresses and their sizes into the assembly language
-   output file.  This is helpful for debugging whether the length attributes
-   in the md file are correct.
-   Output insn cost for next insn.  */
+/* Output insn cost for next insn.  */
 
 void
 final_prescan_insn (rtx insn, rtx *operand ATTRIBUTE_UNUSED,
 		    int num_operands ATTRIBUTE_UNUSED)
 {
-  int uid = INSN_UID (insn);
-
-  if (TARGET_INSN_SIZE_DUMP || TARGET_ALL_DEBUG)
+  if (TARGET_ALL_DEBUG)
     {
-      fprintf (asm_out_file, "/*DEBUG: 0x%x\t\t%d\t%d */\n",
-	       INSN_ADDRESSES (uid),
-               INSN_ADDRESSES (uid) - last_insn_address,
+      fprintf (asm_out_file, "/* DEBUG: cost = %d.  */\n",
 	       rtx_cost (PATTERN (insn), INSN, !optimize_size));
     }
-  last_insn_address = INSN_ADDRESSES (uid);
 }
 
 /* Return 0 if undefined, 1 if always true or always false.  */
diff --git a/gcc/config/avr/avr.opt b/gcc/config/avr/avr.opt
index f94d6a3c2ac837a3f207c8465c67cebd9745b1d8..f8013e53a18653c0bd6f0bb873d5594b2e5592a7 100644
--- a/gcc/config/avr/avr.opt
+++ b/gcc/config/avr/avr.opt
@@ -47,10 +47,6 @@ mshort-calls
 Target Report Mask(SHORT_CALLS)
 Use rjmp/rcall (limited range) on >8K devices
 
-msize
-Target Report Mask(INSN_SIZE_DUMP)
-Output instruction sizes to the asm file
-
 mtiny-stack
 Target Report Mask(TINY_STACK)
 Change only the low 8 bits of the stack pointer
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index a805f2b59cd178426ec9234029afa10fb41d3c7b..6d0d4c4f5d8cfa6c55f3d72f17007498565efac1 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -471,7 +471,7 @@ Objective-C and Objective-C++ Dialects}.
 -mfix-cortex-m3-ldrd}
 
 @emph{AVR Options}
-@gccoptlist{-mmcu=@var{mcu}  -msize  -mno-interrupts @gol
+@gccoptlist{-mmcu=@var{mcu}  -mno-interrupts @gol
 -mcall-prologues  -mtiny-stack  -mint8}
 
 @emph{Blackfin Options}
@@ -9931,10 +9931,6 @@ Instruction set avr5 is for the enhanced AVR core with up to 128K program
 memory space (MCU types: atmega16, atmega161, atmega163, atmega32, atmega323,
 atmega64, atmega128, at43usb355, at94k).
 
-@item -msize
-@opindex msize
-Output instruction sizes to the asm file.
-
 @item -mno-interrupts
 @opindex mno-interrupts
 Generated code is not compatible with hardware interrupts.