This is an archive of the discontinued LLVM Phabricator instance.

[Packetizer] Increase the size of DFAInput bitfield to allow up to 32 units
AbandonedPublic

Authored by ThomasRaoux on Jul 29 2019, 4:34 PM.

Details

Reviewers
jmolloy
kparzysz
Summary

For a new backend in progress we need more than 16 functional units. In order to support that we need to make DFAInput 128 bits. I'm using a pair of uint64_t to be able to keep most of the logic unchanged. It could easily be extended to a general larger tuple if needed.

Diff Detail

Repository
rL LLVM

Event Timeline

ThomasRaoux created this revision.Jul 29 2019, 4:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 29 2019, 4:34 PM
jmolloy accepted this revision.Jul 30 2019, 1:53 AM

LGTM. I had a look at changing this to use APInt instead, because that seems a little nicer, but this turns out to be nontrivial.

I think really this code needs to be able to distinguish between functional units that need packetizing (VLIW slots) and functional units that are just ... functional units (for the purposes of scheduling).

This revision is now accepted and ready to land.Jul 30 2019, 1:53 AM
jmolloy added inline comments.Jul 30 2019, 2:09 AM
llvm/lib/CodeGen/DFAPacketizer.cpp
56

static

llvm/utils/TableGen/DFAPacketizerEmitter.cpp
68

Formatting is off here.

298

Don't you need InsnInput.second here?

This seems to hang when compiling HexagonInstrInfo.cpp.

To clarify: clang-8 hangs on HexagonInstrInfo.cpp when compiling current master branch with this patch applied.

This seems to hang when compiling HexagonInstrInfo.cpp.

I noticed that this change makes the static table twice as large and slow downs significantly compilation time when for files including it. I'm looking at an alternative solution. I might just work around the problem on my side as a different solution would be much more invasive.

I'll update the review once I get more data.

ThomasRaoux abandoned this revision.Sep 2 2019, 9:34 PM