GCC Wikia
Default (トーク | 投稿記録)
1行目: 1行目:
  +
{{header}}
 
  +
== このページを編集する際は,[[編集に関する方針]]に従ってください. ==
   
 
== 概要 ==
 
== 概要 ==
9行目: 10行目:
   
 
== 実装 ==
 
== 実装 ==
とりあえず,時間計測関係は無視しよう (ひとりごと)
 
 
<code>
 
<code>
  +
 
# とりあえず,時間計測関係は無視しよう (ひとりごと)
  +
 
1924 static void
 
1924 static void
 
1925 do_compile (void)
 
1925 do_compile (void)
 
1926 {
 
1926 {
1927 /* Initialize timing first. The C front ends read the main file in
+
1927 /* Initialize timing first. The C front ends read the main file in
1928 the post_options hook, and C++ does file timings. */
+
1928 the post_options hook, and C++ does file timings. */
 
1929 if ([[time_report]] || ![[quiet_flag]] || [[flag_detailed_statistics]])
 
1929 if ([[time_report]] || ![[quiet_flag]] || [[flag_detailed_statistics]])
 
1930 [[timevar_init]] ();
 
1930 [[timevar_init]] ();
1931 [[timevar_start]] ([[TV_TOTAL]]);
+
1931 [[timevar_start]] ([[TV_TOTAL>timevar_id_t]]);
 
1932
 
1932
 
1933 [[process_options]] ();
 
1933 [[process_options]] ();
 
1934
 
1934
1935 /* Don't do any more if an error has already occurred. */
+
1935 /* Don't do any more if an error has already occurred. */
 
1936 if (![[errorcount]])
 
1936 if (![[errorcount]])
 
1937 {
 
1937 {
1938 /* This must be run always, because it is needed to compute the FP
+
1938 /* This must be run always, because it is needed to compute the FP
1939 predefined macros, such as __LDBL_MAX__, for targets using non
+
1939 predefined macros, such as __LDBL_MAX__, for targets using non
1940 default FP formats. */
+
1940 default FP formats. */
 
1941 [[init_adjust_machine_modes]] ();
 
1941 [[init_adjust_machine_modes]] ();
 
1942
 
1942
1943 /* Set up the back-end if requested. */
+
1943 /* Set up the back-end if requested. */
 
1944 if (![[no_backend]])
 
1944 if (![[no_backend]])
 
1945 [[backend_init]] ();
 
1945 [[backend_init]] ();
 
1946
 
1946
  +
</code>
 
*各言語に固有の初期化処理.言語に応じてどの呼び出す関数を変えるために,[[struct lang_hooks]]構造体のインスタンスを作り,処理に対応する関数ポインタで初期化したりする.
+
*各言語に固有の初期化処理.言語に応じてどの呼び出す関数を変えるために,struct lang_hooks 構造体のインスタンスを作り,処理に対応する関数ポインタで初期化したりする.
  +
<code>
 
1947 /* Language-dependent initialization. Returns true on success. */
+
1947 /* Language-dependent initialization. Returns true on success. */
 
1948 if ([[lang_dependent_init]] ([[main_input_filename]]))
 
1948 if ([[lang_dependent_init]] ([[main_input_filename]]))
 
1949 [[compile_file]] ();
 
1949 [[compile_file]] ();
44行目: 47行目:
 
1952 }
 
1952 }
 
1953
 
1953
1954 /* Stop timing and print the times. */
+
1954 /* Stop timing and print the times. */
1955 [[timevar_stop]] ([[TV_TOTAL]]);
+
1955 [[timevar_stop]] ([[TV_TOTAL>timevar_id_t]]);
 
1956 [[timevar_print]] (stderr);
 
1956 [[timevar_print]] (stderr);
 
1957 }
 
1957 }
  +
 
</code>
 
</code>
   
  +
{{related}}
 
  +
[[特別:Whatlinkshere/Tree|{{int:Whatlinkshere}}]]

2007年9月28日 (金) 00:00時点における版

このページを編集する際は,編集に関する方針に従ってください.

概要

引数

  • void

実装

# とりあえず,時間計測関係は無視しよう (ひとりごと)

1924 static void
1925 do_compile (void)
1926 {
 1927   /* Initialize timing first.  The C front ends read the main file in
 1928      the post_options hook, and C++ does file timings.  */
1929   if (time_report || !quiet_flag  || flag_detailed_statistics)
1930     timevar_init ();
1931   timevar_start ([[TV_TOTAL>timevar_id_t]]);
1932 
1933   process_options ();
1934 
 1935   /* Don't do any more if an error has already occurred.  */
1936   if (!errorcount)
1937     {
 1938       /* This must be run always, because it is needed to compute the FP
 1939          predefined macros, such as __LDBL_MAX__, for targets using non
 1940          default FP formats.  */
1941       init_adjust_machine_modes ();
1942 
 1943       /* Set up the back-end if requested.  */
1944       if (!no_backend)
1945         backend_init ();
1946 

*各言語に固有の初期化処理.言語に応じてどの呼び出す関数を変えるために,struct lang_hooks 構造体のインスタンスを作り,処理に対応する関数ポインタで初期化したりする.

 1947       /* Language-dependent initialization.  Returns true on success.  */
1948       if (lang_dependent_init (main_input_filename))
1949         compile_file ();
1950 
1951       finalize ();
1952     }
1953 
 1954   /* Stop timing and print the times.  */
1955   timevar_stop ([[TV_TOTAL>timevar_id_t]]);
1956   timevar_print (stderr);
1957 }


リンク元