init_stringpool() 초기화
심벌테이블로 사용하는 ht를 초기화
ident_hash에 2^14(16k) 크기의 엔트리를 만들고 string_stack을 초기화 합니다.
struct ht 와 obstack은 내부에 여러 구조체를 포함하는 복잡한 형태를 보이므로 다음과
같이 분량을 나누어 조사하기로 했습니다.
(Mr.Lee)전반 cpp_buffer, lexer_state, line_maps, _cpp_buff
(Ms.Song)후반 cpp_context, directive, cpp_hashnode, cpp_token, tokenrun
(Mr.Park)obstack, cpp_options
linemap_init()
linemap 구조체 초기화
realloc_for_line_map 함수를 설정
init_ttree()
다음의 해시테이블을 초기화
type_hash_table, debug_expr_for_decl, value_expr_for_decl, init_priority_for_decl, restrict_base_for_decl
int_cst_hash_table, int_cst_node
역시나 각 해시테이블의 정확한 용도는 알기가 어렵네요... 이것도 아무나 한가하신분이
조사해서 설명해 주시면 좋겠네여 ...
tree_contain_struct 초기화
add_params()
언어 의존적인 파라미터에 언어 독립적인 파리미터 값을 추가하며 파리미터는
command-line에서 ---param <name>=<value> 형태로 입력이 가능하다는군여
param.def 참조
init_ggc_heuristics()
gnu garbage collector에 사용할 전체 메모리 및 힙 메모리 의 최대값 계산후 parameter로 설정
("ggc-min-expand", ggc_min_expand_heuristic())
("ggc-min-heapsize", ggc_min_heapsize_heuristic())
init_optimization_passes ()
최적화 pass를 list 엮는다. 전역변수로 지정된 3개의 도입부에 엮어둔다.
all_lowering_passes, all_ipa_passes, all_passes
decode_options()
command-line 옵션 처리
먼저 최적화 옵션을 처리하고 이후에 handle_options() 함수를 호출하여 나머지 옵션을 처리한다.
최적화 옵션 -O0, -O1, -O2, -Os, -O3
숫자값이 3보다 커도 상관은 없으나 3과 동일하게 처리됨
-Os 는 -O2와 거의 동일하나 코드의 크기가 증가하는 최적화는 수행하지 않는다.
각 최적화 옵션이 설정하는 최적화 관련 플래그들은 다음과 같습니다.
( 너무 많아서 하나하나 어떤 최적화인지 자세히 보기는 힘들군요... )
-O1
flag_defer_pop ,flag_delayed_branch,flag_omit_frame_pointer
,flag_guess_branch_prob flag_cprop_registers ,flag_if_conversion ,
flag_if_conversion2 ,flag_ipa_pure_const flag_ipa_reference ,flag_split_wide_types
,flag_tree_ccp ,flag_tree_dce ,flag_tree_dom, flag_tree_dse ,flag_tree_ter ,flag_tree_sra
,flag_tree_copyrename ,flag_tree_fre
flag_tree_copy_prop ,flag_tree_sink ,flag_tree_salias
-O2
flag_inline_small_functions ,flag_thread_jumps ,
flag_crossjumping ,flag_optimize_sibling_calls
flag_forward_propagate ,flag_cse_follow_jumps
flag_gcse ,flag_expensive_optimizations
flag_rerun_cse_after_loop ,flag_caller_saves
flag_peephole2 ,flag_schedule_insns flag_schedule_insns_after_reload ,flag_regmove
flag_strict_aliasing ,flag_strict_overflow
flag_delete_null_pointer_checks ,
flag_reorder_blocks ,flag_reorder_functions
flag_tree_store_ccp ,flag_tree_vrp
-O3
flag_predictive_commoning ,flag_inline_functions
flag_unswitch_loops flag_gcse_after_reload ,flag_tree_vectorize
no optimization, -O1, -Os
align_loops, align_jumps ,align_labels ,align_functions
flag_reorder_blocks, flag_reorder_blocks_and_partition
-Os
flag_inline_functions
no optimazation
flag_no_inline, warn_inline
그럼 담주에 뵙도록 하지요...
심벌테이블로 사용하는 ht를 초기화
ident_hash에 2^14(16k) 크기의 엔트리를 만들고 string_stack을 초기화 합니다.
struct ht 와 obstack은 내부에 여러 구조체를 포함하는 복잡한 형태를 보이므로 다음과
같이 분량을 나누어 조사하기로 했습니다.
(Mr.Lee)전반 cpp_buffer, lexer_state, line_maps, _cpp_buff
(Ms.Song)후반 cpp_context, directive, cpp_hashnode, cpp_token, tokenrun
(Mr.Park)obstack, cpp_options
linemap_init()
linemap 구조체 초기화
realloc_for_line_map 함수를 설정
init_ttree()
다음의 해시테이블을 초기화
type_hash_table, debug_expr_for_decl, value_expr_for_decl, init_priority_for_decl, restrict_base_for_decl
int_cst_hash_table, int_cst_node
역시나 각 해시테이블의 정확한 용도는 알기가 어렵네요... 이것도 아무나 한가하신분이
조사해서 설명해 주시면 좋겠네여 ...
tree_contain_struct 초기화
add_params()
언어 의존적인 파라미터에 언어 독립적인 파리미터 값을 추가하며 파리미터는
command-line에서 ---param <name>=<value> 형태로 입력이 가능하다는군여
param.def 참조
init_ggc_heuristics()
gnu garbage collector에 사용할 전체 메모리 및 힙 메모리 의 최대값 계산후 parameter로 설정
("ggc-min-expand", ggc_min_expand_heuristic())
("ggc-min-heapsize", ggc_min_heapsize_heuristic())
init_optimization_passes ()
최적화 pass를 list 엮는다. 전역변수로 지정된 3개의 도입부에 엮어둔다.
all_lowering_passes, all_ipa_passes, all_passes
decode_options()
command-line 옵션 처리
먼저 최적화 옵션을 처리하고 이후에 handle_options() 함수를 호출하여 나머지 옵션을 처리한다.
최적화 옵션 -O0, -O1, -O2, -Os, -O3
숫자값이 3보다 커도 상관은 없으나 3과 동일하게 처리됨
-Os 는 -O2와 거의 동일하나 코드의 크기가 증가하는 최적화는 수행하지 않는다.
각 최적화 옵션이 설정하는 최적화 관련 플래그들은 다음과 같습니다.
( 너무 많아서 하나하나 어떤 최적화인지 자세히 보기는 힘들군요... )
-O1
flag_defer_pop ,flag_delayed_branch,flag_omit_frame_pointer
,flag_guess_branch_prob flag_cprop_registers ,flag_if_conversion ,
flag_if_conversion2 ,flag_ipa_pure_const flag_ipa_reference ,flag_split_wide_types
,flag_tree_ccp ,flag_tree_dce ,flag_tree_dom, flag_tree_dse ,flag_tree_ter ,flag_tree_sra
,flag_tree_copyrename ,flag_tree_fre
flag_tree_copy_prop ,flag_tree_sink ,flag_tree_salias
-O2
flag_inline_small_functions ,flag_thread_jumps ,
flag_crossjumping ,flag_optimize_sibling_calls
flag_forward_propagate ,flag_cse_follow_jumps
flag_gcse ,flag_expensive_optimizations
flag_rerun_cse_after_loop ,flag_caller_saves
flag_peephole2 ,flag_schedule_insns flag_schedule_insns_after_reload ,flag_regmove
flag_strict_aliasing ,flag_strict_overflow
flag_delete_null_pointer_checks ,
flag_reorder_blocks ,flag_reorder_functions
flag_tree_store_ccp ,flag_tree_vrp
-O3
flag_predictive_commoning ,flag_inline_functions
flag_unswitch_loops flag_gcse_after_reload ,flag_tree_vectorize
no optimization, -O1, -Os
align_loops, align_jumps ,align_labels ,align_functions
flag_reorder_blocks, flag_reorder_blocks_and_partition
-Os
flag_inline_functions
no optimazation
flag_no_inline, warn_inline
그럼 담주에 뵙도록 하지요...
댓글 4
-
송선희
2008.12.01 22:25
우와~~~ 짝짝짝 완벽하세요~~하하 -
이수연
2008.12.03 21:45
struct cpp_reader {} 구조체에 포함된 내부 구조체 중에서 cset_converter, deps, pragma_entry, cpp_callbacks, cpp_options 구조체는 우님께서 완벽하게 조사해 오시겠다고 하시네여 으흐흐;;; -
박은병
2008.12.04 01:47
으흐흐....멋쟁이.......쵝오~~^^ -
송선희
2008.12.05 10:53
역시 저도 한 주 스터디 해보고 바로 깨달았습니다.
바쁜 직장인들이 많으므로 스터디 과제는 무리라는 것을,,, ㅜ
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
공지 | [공지] 컴파일러 및 가상머신 스터디 관련 Q&A 게시판 입니다. | woos | 2016.04.09 | 393 |
68 | 스터디 장소 | 슈민 | 2016.04.30 | 162 |
67 | LLVM 최적화 패치 제출까지의 순서 정리 | marcII | 2024.03.19 | 193 |
66 | 2017년 06/16일 스터디 컴파일러 VM스터디 [1] | June | 2017.06.16 | 196 |
65 | [컴파일러/가상머신] 170526 진도 [4] | pororo | 2017.05.27 | 202 |
64 | [컴파일러/가상머신] 170602 진도 [3] | pororo | 2017.06.03 | 208 |
63 | [컴파일러/VM] 170707 스터디 내용 | pororo | 2017.07.10 | 209 |
62 | 05/12 컴파일러 스터디 진도 | pororo | 2017.05.13 | 238 |
61 | [컴파일러/VM] 170623 오늘 모임은 취소되었습니다. [3] | pororo | 2017.06.23 | 240 |
60 | [컴파일러/가상머신] 2회차 진행내용 공유 [8] | spike | 2017.05.20 | 270 |
59 | 스터디 공간 정리 [3] | Kyoo | 2016.04.24 | 326 |
58 | 혹시 이 책 보신분 계신지 궁금합니다. [1] | marc | 2023.02.22 | 400 |
57 | [컴파일러] 170721 스터디 내용 | pororo | 2017.07.23 | 446 |
56 | 이번 컴파일러 스터디와 관련해서 LLVM에 대해 찾아보았습니다 [1] | 자이 | 2017.05.19 | 854 |
55 | simplify 에 대해 ChatGPT에게 물어봤습니다. [7] | marcII | 2023.03.19 | 872 |
54 | 조언 구합니다. 백창우씨 외 많은 선배님들께 [5] | 슈민 | 2016.06.06 | 929 |
53 | Compiler (LLVM) 교재 선정 [7] | 슈민 | 2016.04.27 | 978 |
52 | 스터디 교재 관련 의견 취합 [23] | 남현우 | 2016.04.24 | 1174 |
51 | llvm IR | 자이 | 2017.05.19 | 1213 |
50 | 저번 스터디 토의 내용입니다. | 민재원 | 2013.06.11 | 1799 |
.