diff options
author | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-06 20:03:45 +0000 |
---|---|---|
committer | zlomek <zlomek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-02-06 20:03:45 +0000 |
commit | 5923a5e78781a98a9fbb1acaa222864c23cc26ef (patch) | |
tree | f57616e19dba86e71b7eabf273b9af5e97701906 /gcc/rtl.h | |
parent | 8fbae57a60f4a7f74f72b76640db315db50139cd (diff) | |
download | gcc-5923a5e78781a98a9fbb1acaa222864c23cc26ef.tar.gz |
Josef Zlomek <zlomekj@suse.cz>
* Makefile.in (var-tracking.o): New.
* common.opt (fvar-tracking): New.
* flags.h (flag_var_tracking): New.
* gengtype.c (adjust_field_rtx_def): NOTE_INSN_VAR_LOCATION was added.
* opts.c (common_handle_option): Add OPT_fvar_tracking.
* print-rtl.c (print_rtx): NOTE_INSN_VAR_LOCATION was added.
* rtl.c (note_insn_name): Likewise.
* rtl.def (VAR_LOCATION): New.
* rtl.h (NOTE_VAR_LOCATION): New.
(NOTE_VAR_LOCATION_DECL): New.
(NOTE_VAR_LOCATION_LOC): New.
(enum insn_note): NOTE_INSN_VAR_LOCATION was added.
(variable_tracking_main): New exported function.
* timevar.def (TV_VAR_TRACKING): New.
* toplev.c (enum dump_file_index): Added DFI_vartrack.
(dump_file): "vartrack" was added (-dV).
(flag_var_tracking): New.
(f_options): "var-tracking" was added.
(rest_of_handle_variable_tracking): New function.
(rest_of_compilation): Run variable tracking.
(process_options): If user has not specified flag_var_tracking set it
according to optimize, debug_info_level and debug_hooks.
* tree.h (frame_base_decl): New.
* var-tracking.c: New file.
* config/ia64/ia64.c (ia64_flag_var_tracking): New variable.
(ia64_override_options): Set flags to run variable tracking in machine
dependent reorg instead of toplev.c.
(ia64_reorg): Run variable tracking if wanted.
* doc/invoke.texi: Mention variable tracking in -dV,
add and -fvar-tracking.
* doc/passes.texi: Added variable tracking pass.
Daniel Berlin <dberlin@dberlin.org>
* debug.h (struct gcc_debug_hooks): Added var_location debug hook.
* dbxout.c (dbx_debug_hooks): Likewise.
(xcoff_debug): Likewise.
* debug.c (do_nothing_debug_hooks): Likewise.
* dwarf2out.c (dwarf2_debug_hooks): Likewise.
* dwarfout.c (dwarf_debug_hooks): Likewise.
* sdbout.c (sdb_debug_hooks): Likewise.
* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
* final.c (final_scan_insn): Call var_location debug hook for each
NOTE_INSN_VAR_LOCATION.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@77418 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r-- | gcc/rtl.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h index 13fd72ba26f..05ad03d2f27 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -819,6 +819,7 @@ extern const char * const reg_note_name[]; #define NOTE_EXPECTED_VALUE(INSN) XCEXP (INSN, 4, NOTE) #define NOTE_PREDICTION(INSN) XCINT (INSN, 4, NOTE) #define NOTE_PRECONDITIONED(INSN) XCINT (INSN, 4, NOTE) +#define NOTE_VAR_LOCATION(INSN) XCEXP (INSN, 4, NOTE) /* In a NOTE that is a line number, this is the line number. Other kinds of NOTEs are identified by negative numbers here. */ @@ -834,6 +835,12 @@ extern const char * const reg_note_name[]; #define NOTE_PREDICTION_FLAGS(INSN) (XCINT(INSN, 4, NOTE)&0xff) #define NOTE_PREDICT(ALG,FLAGS) ((ALG<<8)+(FLAGS)) +/* Variable declaration and the location of a variable. */ +#define NOTE_VAR_LOCATION_DECL(INSN) (XCTREE (XCEXP (INSN, 4, NOTE), \ + 0, VAR_LOCATION)) +#define NOTE_VAR_LOCATION_LOC(INSN) (XCEXP (XCEXP (INSN, 4, NOTE), \ + 1, VAR_LOCATION)) + /* Codes that appear in the NOTE_LINE_NUMBER field for kinds of notes that are not line numbers. @@ -917,6 +924,9 @@ enum insn_note /* Record a prediction. Uses NOTE_PREDICTION. */ NOTE_INSN_PREDICTION, + /* The location of a variable. */ + NOTE_INSN_VAR_LOCATION, + NOTE_INSN_MAX }; @@ -2343,4 +2353,7 @@ extern bool expensive_function_p (int); /* In tracer.c */ extern void tracer (void); +/* In var-tracking.c */ +extern void variable_tracking_main (void); + #endif /* ! GCC_RTL_H */ |