1. 25 Jul, 2011 25 commits
  2. 24 Jul, 2011 7 commits
  3. 23 Jul, 2011 8 commits
    • dwarf2cfi: Generate and connect traces. · 829bdd4b
      This kinda-sorta corresponds to Bernd's 007-dw2cfi patch.  Certainly
      the same concepts of splitting the instruction stream into extended
      basic blocks is the same.  This patch does a bit better job with the
      documentation.  Also, I'm a bit more explicit about matching things
      up with the similar code from the regular CFG routines.
      
      What's missing at this point is any attempt to use DW_CFA_remember_state.
      I've deferred that for the moment because it's easy to test the state
      change code across epilogues, whereas the shrink-wrapping code is not
      in this tree and section switching is difficult to force.
      
              * dwarf2cfi.c: Include basic-block.h.
              (dw_label_info): Remove.
              (trace_work_list, trace_index): New.
              (remember_row, emit_cfa_remember): Remove.
              (dw_trace_info_hash, dw_trace_info_eq): New.
              (get_trace_index, get_trace_info): New.
              (save_point_p): New.
              (free_cfi_row): Remove.
              (add_cfi): Do not emit DW_CFA_remember_state.
              (cfa_row_equal_p): New.
              (barrier_args_size): Remove.
              (compute_barrier_args_size_1, compute_barrier_args_size): Remove.
              (dwarf2out_notice_stack_adjust): Don't compute_barrier_args_size.
              (maybe_record_trace_start, create_trace_edges, scan_trace): New.
              (dwarf2out_cfi_begin_epilogue): Remove.
              (dwarf2out_frame_debug_restore_state): Remove.
              (connect_traces, create_pseudo_cfg): New.
              (create_cfi_notes, execute_dwarf2_frame): Rewrite using traces.
              * Makefile.in (dwarf2cfi.o): Update.
      
      From-SVN: r176705
      Richard Henderson committed
    • dwarf2cfi: Introduce dw_trace_info. · 43215a89
      This patch only introduces the structure definition and adjusts
      the existing routines to use the new cur_trace global to access
      the variables that were moved into the structure.
      
              * dwarf2cfi.c (dw_trace_info): New.
              (dw_label_info): New.
              (cie_return_save): New.
              (cur_trace): New.
              (queued_args_size): Rename from args_size.  Update all users.
              (cfa_store, cfa_temp, regs_saved_in_regs): Remove.
              (def_cfa_1): Use cur_trace instead of cfa_*.
              (dwarf2out_stack_adjust, record_reg_saved_in_reg): Likewise.
              (clobbers_queued_reg_save, reg_saved_in): Likewise.
              (dwarf2out_frame_debug_expr): Likewise.
              (create_cie_data): Split out from ...
              (execute_dwarf2_frame): ... here.  Initialize cur_trace.
      
      From-SVN: r176704
      Richard Henderson committed
    • dwarf2cfi: Allocate reg_saved_in_data in the heap. · 6ffc63e1
              * dwarf2cfi.c (regs_saved_in_regs): Allocate from heap, not gc.
              Update all users to match.
              (execute_dwarf2_frame): Free reg_saved_in_data.
      
      From-SVN: r176703
      Richard Henderson committed
    • dwarf2cfi: Convert queued_reg_save to a VEC. · 999646c1
      Also, allocate it in the heap instead of garbage collected.
      
              * dwarf2cfi.c (queued_reg_save): Reorder for packing.  Don't GTY.
              (queued_reg_saves): Don't GTY.  Change to a VEC.
              (queue_reg_save): Update to match.
              (dwarf2out_flush_queued_reg_saves): Likewise.
              (clobbers_queued_reg_save): Likewise.
              (reg_saved_in): Likewise.
              (execute_dwarf2_frame): Free queued_reg_saves.
      
      From-SVN: r176702
      Richard Henderson committed
    • dwarf2cfi: Remove dw_cfi_row_ref typedef. · ce363ef2
              * dwarf2cfi.c (dw_cfi_row_ref): Remove.  Update all users.
      
      From-SVN: r176701
      Richard Henderson committed
    • dwarf2cfi: Implement change_cfi_row. · 57e16c96
      Add a generic function to adjust cfi state from one row to another.
      Use this to implement text section switching.  This will also be
      usable for arbitrary changes around a cfg for shrink-wrapping.
      
              * dwarf2cfi.c (add_cfi_args_size): Split out from...
              (dwarf2out_args_size): ... here.
              (add_cfi_restore): Split out from ...
              (dwarf2out_frame_debug_cfa_restore): ... here.
              (def_cfa_0): Split out from ...
              (def_cfa_1): ... here.
              (cfi_oprnd_equal_p, cfi_equal_p): New.
              (change_cfi_row): New.
              (add_cfis_to_fde): Set fde->dw_fde_switch_cfi_index.
              (create_cfi_notes): Use change_cfi_row at SWITCH_TEXT note.
              (output_cfis): Remove.
              * dwarf2out.c (output_fde): Simplify output_cfi loop.
              (dwarf2out_switch_text_section): Don't call output_cfis.
              (dw_val_equal_p, loc_descr_equal_p_1, loc_descr_equal_p): New.
              * dwarf2out.h: Update decls.
              (enum dw_val_class): Add dw_val_class_none.
      
      From-SVN: r176700
      Richard Henderson committed
    • dwarf2cfi: Populate CUR_ROW->REG_SAVE. · f1a0e830
      To be actually used by a subsequent patch.
      
              * dwarf2cfi.c (update_row_reg_save): New.
              (dwarf2out_frame_debug_cfa_expression): Use it.
              (dwarf2out_frame_debug_cfa_restore): Likewise.
              (reg_save): Likewise.  Do not emit DW_CFA_same_value.
      
      From-SVN: r176699
      Richard Henderson committed
    • dwarf2cfi: Rename cfi_insn to add_cfi_insn. · 141618e2
      Make it consistent with add_cfi_vec.
      
              * dwarf2cfi.c (add_cfi_insn): Rename from cfi_insn.  Update all users.
      
      From-SVN: r176698
      Richard Henderson committed