This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Add support for instruction clusters
Needs ReviewPublic

Authored by evandro on Jul 10 2017, 4:32 PM.

Details

Summary

Perform the clustering of instructions in the scheduler by using information from the machine model.

Diff Detail

Repository
rL LLVM

Event Timeline

evandro created this revision.Jul 10 2017, 4:32 PM
javed.absar added inline comments.Jul 12 2017, 3:27 PM
llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
242

May be I am bit confused here, but should it not be SDep(Def, SDep::Artificial) ?
Please consider rewording the comment to make the intention clearer, if possible.

evandro added inline comments.Jul 13 2017, 2:24 PM
llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
242

For each instruction, go over its predecessors looking for any instruction that's clustered to it. Then, go over the successors of the clustered instruction and bind them to the original instruction.

javed.absar added inline comments.Jul 14 2017, 3:55 AM
llvm/lib/CodeGen/ScheduleDAGInstrs.cpp
242

Thanks, much clearer. May this reply could be added as comment.

evandro marked 3 inline comments as done.Jul 14 2017, 8:30 AM
evandro updated this revision to Diff 106644.Jul 14 2017, 8:32 AM

Address feedback by @javed.absar.

MatzeB edited edge metadata.Jul 19 2017, 4:32 PM

I'm not sure I like this:

  • It introduces a new word "cluster", so we end up having the words "MacroFusion" and "Cluster" around which appear to mean the same thing?
  • Using computeOperandLatency() to compute something called cluster feels out of place, similar with getReadAdvanceCycles
fhahn resigned from this revision.Dec 15 2017, 12:34 PM