Commit 471db8cb authored by guruhegde's avatar guruhegde

Annotation detectio fix bug

when call is for mem barrier, called function object is null
parent f80977db
......@@ -154,7 +154,7 @@ void detectBatchParameters(Function * F, SmallPtrSet<Value *, 4> & BatchParamete
// Check whether var.annotation or not
auto * Callee = CI->getCalledFunction();
if (!Callee->isIntrinsic() ||
if (!Callee || !Callee->isIntrinsic() ||
Callee->getIntrinsicID() != varAnnotationIntrinsic) continue;
// Get annotation string literal
......
......@@ -99,9 +99,12 @@ int main(int argc, char * argv[]) {
}
if (FnStr.second.compare("tas_batch_maker") == 0) {
errs() << "Non batch function " << FnStr.first->getName() << "\n";
errs() << "Running block predication\n";
tas::BlockPredication BP (FnStr.first);
auto res = BP.run();
// Make Batch version
errs() << "Running batching\n";
tas::BatchMaker BM(FnStr.first);
auto BatchFunc = BM.run();
errs() << BatchFunc->getName() << "\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment