@@ -61,8 +61,35 @@ struct pass_data
/* Flags indicating common sets things to do before and after. */
unsigned int todo_flags_start;
unsigned int todo_flags_finish;
+
+ /* Fields intended to make it easier to locate the implementation of
+ specific passes within gcc's sources. */
+
+ /* Name of the opt_pass subclass. */
+ const char *classname;
+
+ /* Source location of this pass_data instance. */
+ const char *filename;
+ int line_num;
};
+/* A macro for initializing instances of struct pass_data,
+ supplying __FILE__ and __LINE__. */
+
+#define PASS_DATA_INIT(TYPE, NAME, OPTINFO_FLAGS, TV_ID, \
+ PROPERTIES_REQUIRED, \
+ PROPERTIES_PROVIDED, \
+ PROPERTIES_DESTROYED, \
+ TODO_FLAGS_START, TODO_FLAGS_FINISH, \
+ CLASSNAME) \
+ { (TYPE), (NAME), (OPTINFO_FLAGS), (TV_ID), \
+ (PROPERTIES_REQUIRED), \
+ (PROPERTIES_PROVIDED), \
+ (PROPERTIES_DESTROYED), \
+ (TODO_FLAGS_START), (TODO_FLAGS_FINISH), \
+ (CLASSNAME), \
+ (__FILE__), (__LINE__) }
+
namespace gcc
{
class context;