}
const Type *DestTy = cast<PointerType>(CI->getType())->getValueType();
+ if (isa<ArrayType>(DestTy)) {
+ cerr << "Avoided malloc conversion because of type: " << DestTy
+ << " TODO.\n";
+ return false;
+ }
if (TD.getTypeSize(DestTy) == Size && DestTy != ResultTy) {
// Does the size of the allocated type match the number of bytes
// allocated?
}
#endif
+#if 1
} else if (MallocInst *MI = dyn_cast<MallocInst>(I)) {
if (PeepholeMallocInst(BB, BI)) return true;
PRINT_PEEPHOLE2("add-to-gep:out", GEP, I);
return true;
}
+#endif
}
return false;