[LLVMdev] scoreboard hazard det. and instruction groupings

Hal Finkel hfinkel at anl.gov
Mon Jun 11 12:20:12 PDT 2012


On Mon, 11 Jun 2012 14:02:58 -0500
Anshuman Dasgupta <adasgupt at codeaurora.org> wrote:

> Hal,
> 
> On 6/11/2012 12:48 PM, Andrew Trick wrote:
> > Ignoring compile time for a moment, I think an advantage of a DFA
> > is modeling a situation where the hardware can assign resources to
> > best fit the entire group rather then one instruction at a time.
> > For example, if InstA requires either Unit0 or Unit1, and InstB
> > requires Unit0, is {InstA, InstB} a valid group? Depending on your
> > cpu, a DFA could either recognize that it's valid, or give you a
> > chance to reorder the instructions within a group once they've been
> > selected.
> >
> 
> I would recommend the DFA mechanism as well from what you've
> described. It considers all permutations of mapping instructions to
> functional units. To add to what Andrew said, note that the DFA
> answers the question of whether there exists a legal mapping of a
> group of instructions to functional units. It does not, however,
> return a legal mapping. Will that be sufficient for what you want?

Yes, I generally don't need the mapping, the core will do that
in hardware. But I do need to know which instructions can be grouped
together, and to get the groupings.

On some targets, the order of the instructions matters (for example, on
the G5, the instructions are in groups of 5, and a branch must always
be in the last slot). But that is somewhat higher level than the
functional units themselves, and should be pretty easy to figure out.

So do you use the regular bottom-up scheduling first and then use the
DFA after that?

Thanks again,
Hal

> 
> -Anshu
> 



-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-dev mailing list