软件学报
軟件學報
연건학보
JOURNAL OF SOFTWARE
2005年
2期
194-204
,共11页
陈永健%舒继武%李建江%王鼎兴
陳永健%舒繼武%李建江%王鼎興
진영건%서계무%리건강%왕정흥
OpenMP%编译%过程间分析%全局嵌套类型%OpenMP翻译
OpenMP%編譯%過程間分析%全跼嵌套類型%OpenMP翻譯
OpenMP%편역%과정간분석%전국감투류형%OpenMP번역
OpenMP%compiler%interprocedural analysis%global nesting type%OpenMP translation
由于指导语句动态嵌套与绑定规则的存在,OpenMP程序中线程的一些上下文只能在运行时刻才能完全确定.然而,通过编译时刻的静态分析可以部分确定指导语句的嵌套类型,这些信息可以用于指导后续的编译与优化.由于函数调用的存在,嵌套与绑定常常会跨越过程边界,除了通常的局部和全局分析之外,还需要过程间分析的支持.通过在通常的过程间分析的基础上附加信息,可以使得嵌套类型信息在过程调用图中进行传播.将这些全局信息与过程内的局部信息结合起来,就可以在编译时刻确定语句的嵌套类型.结果表明,编译时刻的嵌套类型分析可以有效地确定通常的科学与工程计算程序中指导语句的嵌套类型,基于嵌套类型的翻译与优化可以同时减少运行时开销和目标代码长度.
由于指導語句動態嵌套與綁定規則的存在,OpenMP程序中線程的一些上下文隻能在運行時刻纔能完全確定.然而,通過編譯時刻的靜態分析可以部分確定指導語句的嵌套類型,這些信息可以用于指導後續的編譯與優化.由于函數調用的存在,嵌套與綁定常常會跨越過程邊界,除瞭通常的跼部和全跼分析之外,還需要過程間分析的支持.通過在通常的過程間分析的基礎上附加信息,可以使得嵌套類型信息在過程調用圖中進行傳播.將這些全跼信息與過程內的跼部信息結閤起來,就可以在編譯時刻確定語句的嵌套類型.結果錶明,編譯時刻的嵌套類型分析可以有效地確定通常的科學與工程計算程序中指導語句的嵌套類型,基于嵌套類型的翻譯與優化可以同時減少運行時開銷和目標代碼長度.
유우지도어구동태감투여방정규칙적존재,OpenMP정서중선정적일사상하문지능재운행시각재능완전학정.연이,통과편역시각적정태분석가이부분학정지도어구적감투류형,저사신식가이용우지도후속적편역여우화.유우함수조용적존재,감투여방정상상회과월과정변계,제료통상적국부화전국분석지외,환수요과정간분석적지지.통과재통상적과정간분석적기출상부가신식,가이사득감투류형신식재과정조용도중진행전파.장저사전국신식여과정내적국부신식결합기래,취가이재편역시각학정어구적감투류형.결과표명,편역시각적감투류형분석가이유효지학정통상적과학여공정계산정서중지도어구적감투류형,기우감투류형적번역여우화가이동시감소운행시개소화목표대마장도.
Because of the rules of dynamic directive nesting and binding, some of the thread context in OpenMP programs can only be totally determined at runtime. However, by compiling time static analysis, nesting type can be partly determined and this information can be passed to other compiling phases to guide later translation and optimizations. Since the binding and nesting may span the procedure boundaries through calls, local and global analyses are not enough. It is the interprocedural analysis that provides the most required ability. By integrating information into traditional interprocedural analysis, the nesting type information of procedures is propagated along call graphs. And later translation and optimization phases can bind this global information with local information inside the procedure to determine the nesting types at compiling time. The results demonstrate that in typical science and engineering workload the nesting type is highly determinable at compiling time, and the application of this information may achieve less runtime overhead and the reduced code size.