Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
13 changes: 13 additions & 0 deletions src/ssa/local_ssa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ void local_SSAt::build_SSA()
build_function_call(i_it);
// build_unknown_objs(i_it);
collect_record_frees(i_it);

if (options.get_bool_option("competition-mode"))
disable_unsupported_instructions(i_it);
}

// collect custom templates in loop heads
Expand Down Expand Up @@ -1644,3 +1647,13 @@ bool local_SSAt::can_reuse_symderef(

return true;
}

void local_SSAt::disable_unsupported_instructions(locationt loc)
{
if (loc->is_other())
{
auto st = loc->get_code().get_statement();
if(st=="array_copy" || st=="array_replace")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could file an issue for support of memcpy?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: #160.

assert(false);
}
}
3 changes: 3 additions & 0 deletions src/ssa/local_ssa.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ class local_SSAt
void build_assertions(locationt loc);
void build_unknown_objs(locationt loc);

// competition-mode specific checks
void disable_unsupported_instructions(locationt loc);

void collect_allocation_guards(const code_assignt &assign, locationt loc);
void get_alloc_guard_rec(const exprt &expr, exprt old_guard);
void collect_record_frees(locationt loc);
Expand Down