26 std::vector<std::string> unwindset_loops =
29 for(
auto &val : unwindset_loops)
31 unsigned thread_nr = 0;
32 bool thread_nr_set =
false;
34 if(!val.empty() && isdigit(val[0]) && val.find(
":") != std::string::npos)
36 std::string nr = val.substr(0, val.find(
":"));
39 val.erase(0, nr.size() + 1);
42 if(val.rfind(
":") != std::string::npos)
44 std::string
id = val.substr(0, val.rfind(
":"));
45 std::string uw_string = val.substr(val.rfind(
":") + 1);
70 thread_loop_map.find(std::pair<irep_idt, unsigned>(loop_id, thread_nr));
90 std::ifstream
file(file_name);
94 throw "cannot open file "+file_name;
96 std::stringstream buffer;
97 buffer <<
file.rdbuf();
std::wstring widen(const char *s)
unsigned unsafe_string2unsigned(const std::string &str, int base)
nonstd::optional< T > optionalt
optionalt< unsigned > global_limit
void parse_unwindset_file(const std::string &file_name)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
void parse_unwindset(const std::string &unwindset)
void split_string(const std::string &s, char delim, std::vector< std::string > &result, bool strip, bool remove_empty)
Given a string s, split into a sequence of substrings when separated by specified delimiter.
thread_loop_mapt thread_loop_map
void parse_unwind(const std::string &unwind)
optionalt< unsigned > get_limit(const irep_idt &loop, unsigned thread_id) const