<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jan 24, 2012, at 10:25 AM, Chad Rosier wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><base href="x-msg://1781/"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>On Jan 23, 2012, at 9:46 PM, Zino Benaissa wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 16px; "><b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: Tahoma, sans-serif; "> Jakob Stoklund Olesen [mailto:stoklund@2pi.dk] </span></span><span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "></span><span class="Apple-style-span" style="font-family: 'Times New Roman', serif; font-size: 16px; ">If you don't mind, I would like you to run a couple of experiments to better understand why this change improves some benchmarks.</span><span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div lang="EN-US" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="WordSection1" style="page: WordSection1; "><div style="font-family: Helvetica; font-size: medium; font-weight: normal; "><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; text-indent: 0in; "><span style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125); "><span>Ø<span style="font: normal normal normal 7pt/normal 'Times New Roman'; ">   <span class="Apple-converted-space"> </span></span></span></span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Sure,  please let me know what you find.</span></div></div></div></div></div></span></blockquote><div><br></div><div>Just to be clear, I believe Jakob was suggesting *you* run the experiments.</div></div></div></div></blockquote><div><br></div><div>Oh, sorry if that wasn't clear.</div><div><br></div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; font-family: Helvetica; "><div lang="EN-US" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="WordSection1" style="page: WordSection1; "><div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">First of all, is the regHasSizeImpact() hook necessary? Do you get significantly different results if you pretend this function always returns 2?<o:p></o:p></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="color: rgb(31, 73, 125); "><o:p> </o:p></span></div><div style="margin-top: 0in; margin-right: 0in; margin-left: 0in; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; text-indent: 0in; "><span style="font-size: 11pt; font-family: Wingdings; color: rgb(31, 73, 125); "><span>Ø<span style="font: normal normal normal 7pt/normal 'Times New Roman'; ">   <span class="Apple-converted-space"> </span></span></span></span><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">For my experiments,  precision is quite important to maximize code size gains.</span></div></div></div></div></div></span></blockquote></div></div></div></blockquote><div><br></div><div>The thing is, the function is using information that isn't yet available at RA time. For example, you look at <kill> flags, but they will be changed by the post-RA scheduler moving instructions around. You look at load/store offsets, but they are not filled in until PEI runs. You can't really know which instructions can be converted to 2-address form until after RA etc.</div><div><br></div><div>So basically, regHasSizeImpact() returns a guess, it has to.</div><div><br></div><div>Another guess that is much faster to compute is '2'.</div><div><br></div><div>I want to know which guess is better, because if there is only a small difference, we can leave out a lot of code and save compile time.</div><div><br></div><div>/jakob</div><div><br></div></div></body></html>