adding noalias attribute to uniform pointer parameters of export function

This commit is contained in:
Ilia Filippov
2014-01-15 15:15:42 +04:00
parent 0f56c11101
commit 9552fc0724

View File

@@ -502,8 +502,10 @@ Function::GenerateIR() {
#else
appFunction->setDoesNotThrow();
#endif
for (int i = 0; i < type->GetNumParameters(); i++) {
// We should iterate from 1 because zero parameter is return.
// We should iterate till getNumParams instead of getNumParams+1 because new
// function is export function and doesn't contain the last parameter "mask".
for (int i = 1; i < function->getFunctionType()->getNumParams(); i++) {
if (function->doesNotAlias(i)) {
appFunction->setDoesNotAlias(i);
}