mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-12 07:40:58 +00:00
Fix a problem where bad graphs could be generated
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b401e64971
commit
d8d97ce857
@ -126,7 +126,6 @@ public:
|
|||||||
// Figure out which edge this targets...
|
// Figure out which edge this targets...
|
||||||
unsigned Offset = std::distance(GTraits::child_begin(TargetNode),
|
unsigned Offset = std::distance(GTraits::child_begin(TargetNode),
|
||||||
TargetIt);
|
TargetIt);
|
||||||
if (Offset > 64) Offset = 64; // Targetting the truncated part?
|
|
||||||
DestPort = (int)Offset;
|
DestPort = (int)Offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,6 +159,9 @@ public:
|
|||||||
void emitEdge(const void *SrcNodeID, int SrcNodePort,
|
void emitEdge(const void *SrcNodeID, int SrcNodePort,
|
||||||
const void *DestNodeID, int DestNodePort,
|
const void *DestNodeID, int DestNodePort,
|
||||||
const std::string &Attrs) {
|
const std::string &Attrs) {
|
||||||
|
if (SrcNodePort > 64) return; // Eminating from truncated part?
|
||||||
|
if (DestNodePort > 64) DestNodePort = 64; // Targetting the truncated part?
|
||||||
|
|
||||||
O << "\tNode" << SrcNodeID;
|
O << "\tNode" << SrcNodeID;
|
||||||
if (SrcNodePort >= 0)
|
if (SrcNodePort >= 0)
|
||||||
O << ":g" << SrcNodePort;
|
O << ":g" << SrcNodePort;
|
||||||
|
@ -126,7 +126,6 @@ public:
|
|||||||
// Figure out which edge this targets...
|
// Figure out which edge this targets...
|
||||||
unsigned Offset = std::distance(GTraits::child_begin(TargetNode),
|
unsigned Offset = std::distance(GTraits::child_begin(TargetNode),
|
||||||
TargetIt);
|
TargetIt);
|
||||||
if (Offset > 64) Offset = 64; // Targetting the truncated part?
|
|
||||||
DestPort = (int)Offset;
|
DestPort = (int)Offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -160,6 +159,9 @@ public:
|
|||||||
void emitEdge(const void *SrcNodeID, int SrcNodePort,
|
void emitEdge(const void *SrcNodeID, int SrcNodePort,
|
||||||
const void *DestNodeID, int DestNodePort,
|
const void *DestNodeID, int DestNodePort,
|
||||||
const std::string &Attrs) {
|
const std::string &Attrs) {
|
||||||
|
if (SrcNodePort > 64) return; // Eminating from truncated part?
|
||||||
|
if (DestNodePort > 64) DestNodePort = 64; // Targetting the truncated part?
|
||||||
|
|
||||||
O << "\tNode" << SrcNodeID;
|
O << "\tNode" << SrcNodeID;
|
||||||
if (SrcNodePort >= 0)
|
if (SrcNodePort >= 0)
|
||||||
O << ":g" << SrcNodePort;
|
O << ":g" << SrcNodePort;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user