Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor: Remove unused var from pass_loop_unroll() #2117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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