<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
P {
MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
LINE-HEIGHT: 1.5; FONT-FAMILY: ΢ÈíÑźÚ; COLOR: #000000; FONT-SIZE: 10.5pt
}
</STYLE>
<META name=GENERATOR content="MSHTML 8.00.7601.17514"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>My name is Sida Li and I am a senior student from Peking University in
China. I am interested in the idea that
improved application of GLSL complier optimizations.</DIV>
<DIV> </DIV>
<DIV>I have downloaded the source code and read some parts of the it. First let
me talk about my understanding about the problem.</DIV>
<DIV> </DIV>
<DIV>The loop we try to improve should be in the main.cpp:</DIV>
<DIV> </DIV>
<DIV>
<DIV style="FONT-FAMILY: Courier New"> do {</DIV>
<DIV
style="FONT-FAMILY: Courier New"> progress = do_common_optimization(shader->ir, false, false, 32);</DIV>
<DIV style="FONT-FAMILY: Courier New"> } while (progress);</DIV>
<DIV style="FONT-FAMILY: Courier New"> </DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ">In the function do_common_optimization, all
optimization passes are called in a certain order. As the loop goes in a few
times, some optimization passes do not contribute to optimizing the code since
the original unoptimized code has been optimized and no more code that can be
optimized by these optimization passes is generated by other optimization
passes. So time spending on these optimization passes is wasted.</DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ"> </DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ">The goal is to f<SPAN
style="TEXT-ALIGN: left; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 10.5pt ΢ÈíÑźÚ; WHITE-SPACE: normal; FLOAT: none; LETTER-SPACING: normal; COLOR: #000000; WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">ind
a static ordering, with possible repeats, of optimization passes that does not
compromise the quality of the generated code. I find it difficult to
start because a single optimization pass or a combo of optimization passes
may generate some code that can be optimized by other optimization pass, which
can not be decided before.</SPAN></DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ"><SPAN
style="TEXT-ALIGN: left; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 10.5pt ΢ÈíÑźÚ; WHITE-SPACE: normal; FLOAT: none; LETTER-SPACING: normal; COLOR: #000000; WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></SPAN> </DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ"><SPAN
style="TEXT-ALIGN: left; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 10.5pt ΢ÈíÑźÚ; WHITE-SPACE: normal; FLOAT: none; LETTER-SPACING: normal; COLOR: #000000; WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">Can
you give me some advice?</SPAN></DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ"><SPAN
style="TEXT-ALIGN: left; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 10.5pt ΢ÈíÑźÚ; WHITE-SPACE: normal; FLOAT: none; LETTER-SPACING: normal; COLOR: #000000; WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></SPAN> </DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ"><SPAN
style="TEXT-ALIGN: left; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 10.5pt ΢ÈíÑźÚ; WHITE-SPACE: normal; FLOAT: none; LETTER-SPACING: normal; COLOR: #000000; WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px"></SPAN> </DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ"><SPAN
style="TEXT-ALIGN: left; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 10.5pt ΢ÈíÑźÚ; WHITE-SPACE: normal; FLOAT: none; LETTER-SPACING: normal; COLOR: #000000; WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">Best
regards,</SPAN></DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ"><SPAN
style="TEXT-ALIGN: left; TEXT-TRANSFORM: none; TEXT-INDENT: 0px; DISPLAY: inline !important; FONT: 10.5pt ΢ÈíÑźÚ; WHITE-SPACE: normal; FLOAT: none; LETTER-SPACING: normal; COLOR: #000000; WORD-SPACING: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px">Sida
Li</SPAN></DIV>
<DIV style="FONT-FAMILY: ΢ÈíÑźÚ"> </DIV></DIV></BODY></HTML>