@@ -1087,7 +1087,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
1087
1087
auto oneC = initBuilder.create <LLVM::ConstantOp>(
1088
1088
op->getLoc (), i32Ty, rewriter.getI32IntegerAttr (1 ));
1089
1089
auto regNull =
1090
- initBuilder.create <LLVM::NullOp >(op->getLoc (), regStatePtrTy);
1090
+ initBuilder.create <LLVM::ZeroOp >(op->getLoc (), regStatePtrTy);
1091
1091
auto regGep = initBuilder.create <LLVM::GEPOp>(
1092
1092
op->getLoc (), regStatePtrTy, regNull, ArrayRef<Value>({oneC}));
1093
1093
auto regSize =
@@ -1157,7 +1157,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
1157
1157
op.getLoc (), i32Ty, rewriter.getI32IntegerAttr (1 ));
1158
1158
auto twoC = initBuilder.create <LLVM::ConstantOp>(
1159
1159
op.getLoc (), i64Ty, rewriter.getI32IntegerAttr (2 ));
1160
- auto nullPtr = initBuilder.create <LLVM::NullOp >(
1160
+ auto nullPtr = initBuilder.create <LLVM::ZeroOp >(
1161
1161
op.getLoc (), LLVM::LLVMPointerType::get (underlyingTy));
1162
1162
auto sizeGep = initBuilder.create <LLVM::GEPOp>(
1163
1163
op.getLoc (), LLVM::LLVMPointerType::get (underlyingTy), nullPtr,
@@ -1210,7 +1210,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
1210
1210
rewriter.getI32IntegerAttr (arrayTy.getNumElements ()));
1211
1211
1212
1212
// Get element size.
1213
- auto null = initBuilder.create <LLVM::NullOp >(
1213
+ auto null = initBuilder.create <LLVM::ZeroOp >(
1214
1214
op.getLoc (), LLVM::LLVMPointerType::get (arrayTy));
1215
1215
auto gepFirst = initBuilder.create <LLVM::GEPOp>(
1216
1216
op.getLoc (), LLVM::LLVMPointerType::get (arrayTy.getElementType ()),
@@ -1227,7 +1227,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
1227
1227
auto zeroC = initBuilder.create <LLVM::ConstantOp>(
1228
1228
op.getLoc (), i32Ty, rewriter.getI32IntegerAttr (0 ));
1229
1229
1230
- auto null = initBuilder.create <LLVM::NullOp >(
1230
+ auto null = initBuilder.create <LLVM::ZeroOp >(
1231
1231
op.getLoc (), LLVM::LLVMPointerType::get (structTy));
1232
1232
for (size_t i = 0 , e = structTy.getBody ().size (); i < e; ++i) {
1233
1233
auto oneC = initBuilder.create <LLVM::ConstantOp>(
@@ -1243,7 +1243,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
1243
1243
op.getLoc (), i32Ty, gepElem);
1244
1244
1245
1245
// Get element size.
1246
- auto elemNull = initBuilder.create <LLVM::NullOp >(
1246
+ auto elemNull = initBuilder.create <LLVM::ZeroOp >(
1247
1247
op.getLoc (), LLVM::LLVMPointerType::get (structTy.getBody ()[i]));
1248
1248
auto gepElemSize = initBuilder.create <LLVM::GEPOp>(
1249
1249
op.getLoc (), LLVM::LLVMPointerType::get (structTy.getBody ()[i]),
@@ -1283,7 +1283,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
1283
1283
1284
1284
// Malloc space for the process state.
1285
1285
auto procStateNullPtr =
1286
- initBuilder.create <LLVM::NullOp >(op->getLoc (), procStatePtrTy);
1286
+ initBuilder.create <LLVM::ZeroOp >(op->getLoc (), procStatePtrTy);
1287
1287
auto procStateGep = initBuilder.create <LLVM::GEPOp>(
1288
1288
op->getLoc (), procStatePtrTy, procStateNullPtr,
1289
1289
ArrayRef<Value>({oneC}));
@@ -1307,7 +1307,7 @@ struct InstOpConversion : public ConvertToLLVMPattern {
1307
1307
1308
1308
// Malloc space for the senses table.
1309
1309
auto sensesNullPtr =
1310
- initBuilder.create <LLVM::NullOp >(op->getLoc (), sensesPtrTy);
1310
+ initBuilder.create <LLVM::ZeroOp >(op->getLoc (), sensesPtrTy);
1311
1311
auto sensesGep = initBuilder.create <LLVM::GEPOp>(
1312
1312
op->getLoc (), sensesPtrTy, sensesNullPtr, ArrayRef<Value>({oneC}));
1313
1313
auto sensesSize =
@@ -1512,7 +1512,7 @@ struct DrvOpConversion : public ConvertToLLVMPattern {
1512
1512
op->getLoc (), i32Ty, rewriter.getI32IntegerAttr (1 ));
1513
1513
auto eightC = rewriter.create <LLVM::ConstantOp>(
1514
1514
op->getLoc (), i64Ty, rewriter.getI64IntegerAttr (8 ));
1515
- auto nullPtr = rewriter.create <LLVM::NullOp >(op->getLoc (), llvmPtrTy);
1515
+ auto nullPtr = rewriter.create <LLVM::ZeroOp >(op->getLoc (), llvmPtrTy);
1516
1516
auto gepOne = rewriter.create <LLVM::GEPOp>(
1517
1517
op->getLoc (), llvmPtrTy, nullPtr, ArrayRef<Value>(oneC));
1518
1518
auto toInt =
0 commit comments