Skip to content

Commit

Permalink
Merge pull request #2117 from Shaikh-Ubaid/remove_unused_var
Browse files Browse the repository at this point in the history
Refactor: Remove unused var from pass_loop_unroll()
  • Loading branch information
certik authored Jul 6, 2023
2 parents 6000a9f + fa2cbc4 commit 4667708
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/libasr/pass/loop_unroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,14 @@ class LoopUnrollVisitor : public PassUtils::PassVisitor<LoopUnrollVisitor>
{
private:

std::string rl_path;

int64_t unroll_factor;

ASRUtils::ExprStmtDuplicator node_duplicator;

public:

LoopUnrollVisitor(Allocator &al_, const std::string& rl_path_,
size_t unroll_factor_) :
PassVisitor(al_, nullptr), rl_path(rl_path_),
LoopUnrollVisitor(Allocator &al_, size_t unroll_factor_) :
PassVisitor(al_, nullptr),
unroll_factor(unroll_factor_), node_duplicator(al_)
{
pass_result.reserve(al, 1);
Expand Down Expand Up @@ -107,9 +104,7 @@ class LoopUnrollVisitor : public PassUtils::PassVisitor<LoopUnrollVisitor>

void pass_loop_unroll(Allocator &al, ASR::TranslationUnit_t &unit,
const LCompilers::PassOptions& pass_options) {
std::string rl_path = pass_options.runtime_library_dir;
int64_t unroll_factor = pass_options.unroll_factor;
LoopUnrollVisitor v(al, rl_path, unroll_factor);
LoopUnrollVisitor v(al, pass_options.unroll_factor);
v.visit_TranslationUnit(unit);
}

Expand Down

0 comments on commit 4667708

Please sign in to comment.