Commit d564f690 authored by Robert Ricci's avatar Robert Ricci

Change to the way we handle trivial links - add a new flag that can

go on the end of a link line in the top file, trivial_ok . This means
that it's okay to map the virtual link to a trivial link. By default,
it will not be permissible to use trivial links.

Right now, however, trivial links are OK by default, but that will
change once assign_wrapper flags all simulated links as trivial_ok .
parent 783adeac
......@@ -45,6 +45,10 @@ CXXFLAGS += -DFIND_PNODE_SEARCH -DNO_REVERT
# for now because it breaks vclasses
#CXXFLAGS += -DPER_VNODE_TT -DSMART_UNMAP
# Temporary, until assign_wrapper is changed to mark simulated links as
# trivial_ok
CXXFLAGS += -DALLOW_TRIVIAL_DEFAULT
# If you're looking to turn on or off USE_OPTIMAL, its now a cmdline
# option. Use OP={0,1} on the command line at run time... :)
......
......@@ -182,6 +182,11 @@ int parse_top(tb_vgraph &VG, istream& i)
l->no_connection = false;
l->name = name;
l->allow_delayed = true;
#ifdef ALLOW_TRIVIAL_DEFAULT
l->allow_trivial = true;
#else
l->allow_trivial = false;
#endif
l->emulated = false;
for (unsigned int i = 7;i < parsed_line.size();++i) {
......@@ -189,6 +194,8 @@ int parse_top(tb_vgraph &VG, istream& i)
l->allow_delayed = false;
} else if (parsed_line[i].compare("emulated") == 0) {
l->emulated = true;
} else if (parsed_line[i].compare("trivial_ok") == 0) {
l->allow_trivial = true;
} else {
top_error("bad link line, unknown tag: " <<
parsed_line[i] << ".");
......
......@@ -538,7 +538,7 @@ int add_node(vvertex vv,pvertex pv, bool deterministic)
if (dest_pv == pv) {
SDEBUG(cerr << " trivial link" << endl);
if (allow_trivial_links) {
if (allow_trivial_links && vlink->allow_trivial) {
vlink->link_info.type = tb_link_info::LINK_TRIVIAL;
} else {
SADD(SCORE_NO_CONNECTION);
......
......@@ -115,6 +115,7 @@ public:
bool no_connection; // true if this link should be satisfied
// but isn't.
bool allow_delayed; // can this vlink by a delayed link
bool allow_trivial; // can this vlink be a trivial link?
vvertex src, dst; // Source and destination for this link
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment