6262#include " lib/Transforms/Secretize/Passes.h"
6363#include " lib/Transforms/StraightLineVectorizer/StraightLineVectorizer.h"
6464#include " lib/Transforms/UnusedMemRef/UnusedMemRef.h"
65+ #include " llvm/include/llvm/ADT/SmallVector.h" // from @llvm-project
6566#include " llvm/include/llvm/Support/CommandLine.h" // from @llvm-project
6667#include " llvm/include/llvm/Support/raw_ostream.h" // from @llvm-project
6768#include " mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h" // from @llvm-project
@@ -325,7 +326,7 @@ void tosaToBooleanTfhePipeline(const std::string &yosysFilesPath,
325326 // Wrap with secret.generic and then distribute-generic.
326327 pm.addPass (createWrapGeneric ());
327328 auto distributeOpts = secret::SecretDistributeGenericOptions{
328- .opsToDistribute = opsToDistribute};
329+ .opsToDistribute = llvm::to_vector ( opsToDistribute) };
329330 pm.addPass (secret::createSecretDistributeGeneric (distributeOpts));
330331 pm.addPass (createCanonicalizerPass ());
331332
@@ -418,7 +419,7 @@ void tosaToBooleanFpgaTfhePipeline(const std::string &yosysFilesPath,
418419
419420 pm.addPass (createWrapGeneric ());
420421 auto distributeOpts = secret::SecretDistributeGenericOptions{
421- .opsToDistribute = opsToDistribute};
422+ .opsToDistribute = llvm::to_vector ( opsToDistribute) };
422423 pm.addPass (secret::createSecretDistributeGeneric (distributeOpts));
423424 pm.addPass (createCanonicalizerPass ());
424425
@@ -502,7 +503,7 @@ void tosaToJaxitePipeline(const std::string &yosysFilesPath,
502503 // Cleanup
503504 pm.addPass (createMemrefGlobalReplacePass ());
504505 arith::ArithIntNarrowingOptions arithOps;
505- arithOps.bitwidthsSupported = bitWidths;
506+ arithOps.bitwidthsSupported = llvm::to_vector ( bitWidths) ;
506507 pm.addPass (arith::createArithIntNarrowing (arithOps));
507508 pm.addPass (createCanonicalizerPass ());
508509 pm.addPass (createSCCPPass ());
@@ -513,7 +514,7 @@ void tosaToJaxitePipeline(const std::string &yosysFilesPath,
513514 // Wrap with secret.generic and then distribute-generic.
514515 pm.addPass (createWrapGeneric ());
515516 auto distributeOpts = secret::SecretDistributeGenericOptions{
516- .opsToDistribute = opsToDistribute};
517+ .opsToDistribute = llvm::to_vector ( opsToDistribute) };
517518 pm.addPass (secret::createSecretDistributeGeneric (distributeOpts));
518519 pm.addPass (createCanonicalizerPass ());
519520 // Booleanize and Yosys Optimize
0 commit comments