LibCallAliasAnalysis class instantiation parameter


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?

I was looking at a case similar to the following:

#include <math.h>

double x[1000], y[1000];
double angle;

void rotate(int point_count) {
int i;

for (i=0; i < point_count; i++) {
double tmp_x = x[i];
x[i] = tmp_x * cos(angle) - y[i] * sin(angle);
y[i] = y[i] * cos(angle) + tmp_x * sin(angle);

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?