<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 4/24/2012 10:58 AM, Andrew Trick wrote:
<blockquote
cite="mid:2A9716F3-2DC3-4B06-A103-F58143E51E0A@apple.com"
type="cite"><br>
<div>
<div>On Apr 24, 2012, at 7:54 AM, Sirish Pande <<a
moz-do-not-send="true" href="mailto:spande@codeaurora.org">spande@codeaurora.org</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000"> On 4/23/2012 3:26 PM,
Andrew Trick wrote:
<blockquote
cite="mid:14F368AF-A60C-4EDD-A6F0-C61E9DEA5891@apple.com"
type="cite"><br>
<div>
<div>On Apr 23, 2012, at 11:55 AM, Sirish Pande <<a
moz-do-not-send="true"
href="mailto:spande@codeaurora.org">spande@codeaurora.org</a>>
wrote:</div>
</div>
<div>
<div><br>
</div>
<div>+ VLIWScheduler->exitRegion();</div>
<div><br>
</div>
<div>I'm not sure why you would do this *before*
packetizing. It's ok if it works, just a little
misleading. You should probably add a call to
VLIWScheduler->finishBlock() somewhere.</div>
</div>
</blockquote>
<br>
Thanks for pointing out about the finishBlock(). I will add
finishBlock() at the end of PacketizeMI function. <br>
<br>
You probably know that we are getting the dependence
information from the scheduler. Once we have the dependence
info, along with the DFA resource manager, we can packetize
the way our architecture prefers. We are not using the
scheduler to *schedule* instructions during packetization.
Hence, we have enterRegion() and exitRegion() around
schedule. Esssentially, this logic is borrowed from around
line 200 of MachineScheduler.cpp<br>
</div>
</blockquote>
<div><br>
</div>
<div>After callling ScheduleDAGInstrs::exitRegion, no one should
refer DAG for that region (it happens to work, it's just a
minor abuse). Likewise, after calling finishBlock no one
should ask for the DAG's current block. I only mention this
because others are learning the API from your client.</div>
</div>
</blockquote>
<br>
Let me not abuse DAG then. Let me try to put call the exitRegion()
towards the end, run our hexagon test cases. If everything works
well (which I believe should), I will make sure that after
exitRegion, I do not refer DAG. <br>
<br>
<br>
<blockquote
cite="mid:2A9716F3-2DC3-4B06-A103-F58143E51E0A@apple.com"
type="cite">
<div><br>
<blockquote type="cite">
<div bgcolor="#FFFFFF" text="#000000">
<blockquote
cite="mid:14F368AF-A60C-4EDD-A6F0-C61E9DEA5891@apple.com"
type="cite">
<div>
<div><br>
</div>
<div>+ // Generate MI -> SU map.</div>
<div>+ //std::map <MachineInstr*, SUnit*>
MIToSUnit;</div>
<div>+ MIToSUnit.clear();</div>
<div>+ for (unsigned i = 0, e =
VLIWScheduler->SUnits.size(); i != e; ++i) {</div>
<div>+ SUnit *SU = &VLIWScheduler->SUnits[i];</div>
<div>+ MIToSUnit[SU->getInstr()] = SU;</div>
<div>+ }</div>
<div><br>
</div>
<div>I added ScheduleDAGInstrs::MISUnitMap so you
wouldn't need your own. I haven't tested it with a
PostRA scheduler, but would like to know if it doesn't
work.</div>
</div>
</blockquote>
<br>
Have you checked this functionality in? I don't see it.<br>
</div>
</blockquote>
<br>
</div>
<div>ScheduleDAGInstrs::initSUnits populates the map. I'm not sure
why that wouldn't work for you. Note that the ExitSU is not
mapped, but you're not really using ExitSU anyway.</div>
</blockquote>
<br>
Is it possible that you make initSUnits public? Since its protected
- I have to juggle around to access that function. <br>
<br>
<blockquote
cite="mid:2A9716F3-2DC3-4B06-A103-F58143E51E0A@apple.com"
type="cite">
<div><br>
</div>
<div>-Andy</div>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Qualcomm Innovation Center, Inc is a member of Code Aurora Forum</pre>
</body>
</html>