fix: use ref to PatternRewriter in NativeCodeCall

This commit is contained in:
youben11
2021-09-16 08:40:01 +01:00
committed by Ayoub Benaissa
parent 7a48900fae
commit 09ad814e95
2 changed files with 10 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ convertTypeEncryptedIntegerToGLWE(mlir::MLIRContext *context,
return GLWECipherTextType::get(context, -1, -1, -1, eint.getWidth());
}
mlir::Value createZeroGLWEOpFromHLFHE(mlir::PatternRewriter rewriter,
mlir::Value createZeroGLWEOpFromHLFHE(mlir::PatternRewriter &rewriter,
mlir::Location loc,
mlir::OpResult result) {
mlir::SmallVector<mlir::Value> args{};
@@ -34,7 +34,7 @@ mlir::Value createZeroGLWEOpFromHLFHE(mlir::PatternRewriter rewriter,
}
template <class Operator>
mlir::Value createGLWEOpFromHLFHE(mlir::PatternRewriter rewriter,
mlir::Value createGLWEOpFromHLFHE(mlir::PatternRewriter &rewriter,
mlir::Location loc, mlir::Value arg0,
mlir::Value arg1, mlir::OpResult result) {
mlir::SmallVector<mlir::Value, 2> args{arg0, arg1};
@@ -48,7 +48,7 @@ mlir::Value createGLWEOpFromHLFHE(mlir::PatternRewriter rewriter,
}
mlir::Value
createApplyLookupTableGLWEOpFromHLFHE(mlir::PatternRewriter rewriter,
createApplyLookupTableGLWEOpFromHLFHE(mlir::PatternRewriter &rewriter,
mlir::Location loc, mlir::Value arg0,
mlir::Value arg1, mlir::OpResult result) {
mlir::SmallVector<mlir::Value, 2> args{arg0, arg1};

View File

@@ -78,7 +78,7 @@ CleartextType convertCleartextTypeFromType(mlir::MLIRContext *context,
return nullptr;
}
mlir::Value createZeroLWEOpFromMidLFHE(mlir::PatternRewriter rewriter,
mlir::Value createZeroLWEOpFromMidLFHE(mlir::PatternRewriter &rewriter,
mlir::Location loc,
mlir::OpResult result) {
mlir::SmallVector<mlir::Value> args{};
@@ -92,7 +92,7 @@ mlir::Value createZeroLWEOpFromMidLFHE(mlir::PatternRewriter rewriter,
}
template <class Operator>
mlir::Value createLowLFHEOpFromMidLFHE(mlir::PatternRewriter rewriter,
mlir::Value createLowLFHEOpFromMidLFHE(mlir::PatternRewriter &rewriter,
mlir::Location loc, mlir::Value arg0,
mlir::Value arg1,
mlir::OpResult result) {
@@ -106,7 +106,7 @@ mlir::Value createLowLFHEOpFromMidLFHE(mlir::PatternRewriter rewriter,
}
mlir::Value createAddPlainLweCiphertextWithGlwe(
mlir::PatternRewriter rewriter, mlir::Location loc, mlir::Value arg0,
mlir::PatternRewriter &rewriter, mlir::Location loc, mlir::Value arg0,
mlir::Value arg1, mlir::OpResult result, mlir::Type encryptedType) {
PlaintextType encoded_type =
convertPlaintextTypeFromType(rewriter.getContext(), encryptedType);
@@ -125,7 +125,7 @@ mlir::Value createAddPlainLweCiphertextWithGlwe(
return op.getODSResults(0).front();
}
mlir::Value createAddPlainLweCiphertext(mlir::PatternRewriter rewriter,
mlir::Value createAddPlainLweCiphertext(mlir::PatternRewriter &rewriter,
mlir::Location loc, mlir::Value arg0,
mlir::Value arg1,
mlir::OpResult result) {
@@ -134,7 +134,7 @@ mlir::Value createAddPlainLweCiphertext(mlir::PatternRewriter rewriter,
glwe);
}
mlir::Value createSubIntLweCiphertext(mlir::PatternRewriter rewriter,
mlir::Value createSubIntLweCiphertext(mlir::PatternRewriter &rewriter,
mlir::Location loc, mlir::Value arg0,
mlir::Value arg1, mlir::OpResult result) {
auto arg1_type = arg1.getType();
@@ -147,7 +147,7 @@ mlir::Value createSubIntLweCiphertext(mlir::PatternRewriter rewriter,
result, arg1_type);
}
mlir::Value createMulClearLweCiphertext(mlir::PatternRewriter rewriter,
mlir::Value createMulClearLweCiphertext(mlir::PatternRewriter &rewriter,
mlir::Location loc, mlir::Value arg0,
mlir::Value arg1,
mlir::OpResult result) {
@@ -210,7 +210,7 @@ mlir::Value createMulClearLweCiphertext(mlir::PatternRewriter rewriter,
// } : (!LowLFHE.lwe_ciphertext<600, 4>, !LowLFHE.glwe_ciphertext)
// ->!LowLFHE.lwe_ciphertext<2048, 4>
// ```
mlir::Value createPBS(mlir::PatternRewriter rewriter, mlir::Location loc,
mlir::Value createPBS(mlir::PatternRewriter &rewriter, mlir::Location loc,
mlir::Value ct, mlir::Value table, mlir::IntegerAttr k,
mlir::IntegerAttr polynomialSize,
mlir::IntegerAttr levelKS, mlir::IntegerAttr baseLogKS,