<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div class="" id="yiv4488988253yui_3_16_0_1_1438807998720_2675"><div>Hello,</div><div id="yui_3_16_0_1_1438810030023_12132"><br></div><div id="yui_3_16_0_1_1438810030023_12133">Can anybody tell me the intent of the LibCallAliasAnalysis
class? I see that to instantiate it, it requires a class derived from the pure
virtual class LibCallInfo, but I cannot find any classes in the source tree
that derive from LibCallInfo. Is this derived class intended to be supplied
from a compiler front-end, library writer, or the llvm backend? </div></div><div class="" id="yiv4488988253yui_3_16_0_1_1438807998720_2679"> </div><div class="" id="yiv4488988253yui_3_16_0_1_1438807998720_2683">I was looking at a case similar to the following:</div><div class="" id="yiv4488988253yui_3_16_0_1_1438807998720_2683"><br class="" id="yui_3_16_0_1_1438810030023_12004"></div><div class="" id="yiv4488988253yui_3_16_0_1_1438807998720_2683"> #include <math.h></div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2687"><br class="" id="yui_3_16_0_1_1438810030023_12008"></div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2687">double x[1000], y[1000];</div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2691">double angle;</div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2695"> </div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2699">void rotate(int point_count) {</div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2703">
int i;</div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2707"> </div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2711">
for (i=0; i < point_count; i++) {</div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2715"> double tmp_x = x[i];</div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2719"> x[i] = tmp_x * cos(angle) - y[i] *
sin(angle);</div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2723"> y[i] = y[i] * cos(angle) + tmp_x *
sin(angle);</div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2727">
}</div><div class="" style="margin-left:.5in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2731">}</div><div class="" id="yiv4488988253yui_3_16_0_1_1438807998720_2735"> </div><div class="" id="yiv4488988253yui_3_16_0_1_1438807998720_2739" dir="ltr">In
this case, the queries done by getModRefInfo are unable
to avoid loading the ‘angle’ variable from memory for each call to
sin/cos.
Based on the comments in LibCallSemantics.h, it appears that
LibCallAliasAnalysis should
be able to handle this case by recognizing that sin/cos only affect
errno. However, I don’t see any way of enabling this analysis without an
appropriate derivation of LibCallInfo. Does anybody have info for using this analysis?</div><div class="" id="yiv4488988253yui_3_16_0_1_1438807998720_2743"><br></div>
<div class="" style="border:none;padding:0in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2753">Thanks,</div>
<div class="" style="border:none;padding:0in;" id="yiv4488988253yui_3_16_0_1_1438807998720_2757"><div id="yui_3_16_0_1_1438810030023_12075" dir="ltr">Chris</div></div></div></body></html>