<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">
<!--
p
{margin-top:0;
margin-bottom:0}
p
{margin-top:0;
margin-bottom:0}
p
{margin-top:0;
margin-bottom:0}
p
{margin-top:0;
margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi<br>
<br>
I have brought everything together in this email.<br>
<br>
The problem<br>
========<br>
Take the following DAG (arrow to predecessor):<br>
<font face="Courier New"><br>
SetUp2 SetUp1<br>
^ ^<br>
| |<br>
| |<br>
Destroy2---->PredSU <----SU<br>
^ ^ ^<br>
| | |<br>
| | |<br>
----------- | ---------<br>
| | |<br>
Destroy1<br>
^<br>
|<br>
</font><br>
In this example there are two successors of 'PredSU' with type<br>
getCallFrameDestroyOpcode (Destroy) and one is a successor of the other.<br>
Taking the successor of the two Destroys (Destroy1), noted that it's<br>
matching getCallFrameSetupOpcode (Setup1) is a predecessor of 'SU'.<br>
In this situation, re-routing the dependency on 'PredSU' through 'SU' will<br>
cause a dead lock Viz:<br>
<br>
<font face="Courier New"> SetUp2 PredSU SetUp1<br>
^ ^ ^<br>
| | |<br>
| | |<br>
Destroy2-----> SU -------<br>
^ ^ ^<br>
| | |<br>
| | |<br>
----------- | |<br>
| | |<br>
Destroy1<br>
^<br>
|<br>
</font><br>
<br>
Outstanding issues<br>
============<br>
<br>
1. Is it too aggressive in searching predecessors and successors?<br>
Should the algorithm give up and assume the worst if the depth of search reaches a predefined limit?<br>
<br>
2. Should the initial search for 'SetUp1' and 'Destroy1' only search along chains? viz conditional upon II->isCtrl()<br>
<br>
3. Is it possible to input a DAG for testing?<br>
What is the best way to construct the test case?<br>
Using an IR as input does not guarantee the required DAG will be output for testing.<br>
<br>
4. Where should the test be placed?<br>
(How do I test for no-assert?)<br>
<br>
Please do comment.<br>
<br>
Robert<br>
<br>
</div>
</body>
</html>