Skip to content

Commit

Permalink
Merge pull request #110 from nanocoh/main
Browse files Browse the repository at this point in the history
disable bne env
  • Loading branch information
nanocoh authored Sep 29, 2024
2 parents 6f96428 + adcd75c commit d036c35
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/apps/naja_edit/NajaEdit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,16 @@ int main(int argc, char* argv[]) {
SPDLOG_INFO(oss.str());
}
}

bool useBNE = true;
if (std::getenv("NAJA_DISABLE_BNE")) {
useBNE = false;
}
if (optimizationType == OptimizationType::DLE) {
naja::NajaPerf::Scope scope("Optimization_DLE");
const auto start{std::chrono::steady_clock::now()};
SPDLOG_INFO("Starting removal of loadless logic");
LoadlessLogicRemover remover;
remover.setNormalizedUniquification(useBNE);
remover.process();
const auto end{std::chrono::steady_clock::now()};
const std::chrono::duration<double> elapsed_seconds{end - start};
Expand All @@ -408,10 +412,13 @@ int main(int argc, char* argv[]) {
spdlog::info("Starting full optimization (constant propagation and removal of loadless logic)");
ConstantPropagation cp;
cp.setTruthTableEngine(true);
cp.setNormalizedUniquification(useBNE);
cp.run();
ReductionOptimization reductionOptimization(cp.getPartialConstantReaders());
reductionOptimization.setNormalizedUniquification(useBNE);
reductionOptimization.run();
LoadlessLogicRemover remover;
remover.setNormalizedUniquification(useBNE);
remover.process();
const auto end{std::chrono::steady_clock::now()};
const std::chrono::duration<double> elapsed_seconds{end - start};
Expand Down

0 comments on commit d036c35

Please sign in to comment.