This is an archive of the discontinued LLVM Phabricator instance.

[mips] interAptiv based generic schedule model
ClosedPublic

Authored by sdardis on Aug 16 2016, 6:00 AM.

Details

Summary

This scheduler describes a processor which covers all MIPS ISAs based
around the interAptiv and P5600 timings.

Diff Detail

Event Timeline

sdardis updated this revision to Diff 68168.Aug 16 2016, 6:00 AM
sdardis retitled this revision from to [mips] interAptiv based generic schedule model.
sdardis updated this object.
sdardis added reviewers: dsanders, vkalintiris.
sdardis set the repository for this revision to rL LLVM.
sdardis added a subscriber: llvm-commits.
dsanders accepted this revision.Aug 16 2016, 7:24 AM
dsanders edited edge metadata.

LGTM with the ResourceCycles corrected, a couple other minor changes, and an explanation for the dsr-fixed-objects.ll change

lib/Target/Mips/Mips.td
194

If MipsGenericItineraries is no longer used can we delete it (in a follow-up patch)?

lib/Target/Mips/MipsScheduleGeneric.td
202–203

Could you uncomment these and add II_MFHC0 to the microMIPSR6 definitions? We don't seem to have MFHC0 for the other ISA's it exists for.

260

Indentation

349–380

I doubt these are working as intended since there are two ResourceCycles elements but only one resource and ResourceCycles are paired up with the resources. I think the current definition for GenericWriteFPUSqrtD is saying that it consumes the GenericFPUDivSqrt resource for a single cycle which is equivalent to a fully-pipelined divide path.

I think you need to remove each of the '1' elements since these corresponded with an issue port on the P5600 definitions.

Likewise for GenericDiv other places where ResourceCycles is set.

436

Indentation

440

Indentation

test/DebugInfo/Mips/dsr-fixed-objects.ll
32

Could you explain why this changed?

This revision is now accepted and ready to land.Aug 16 2016, 7:24 AM
sdardis added inline comments.Aug 25 2016, 3:50 AM
test/DebugInfo/Mips/dsr-fixed-objects.ll
32

This change occurred as an instruction moved before a label.

dsanders added inline comments.Aug 25 2016, 10:49 AM
test/DebugInfo/Mips/dsr-fixed-objects.ll
32

Ok, thanks.

sdardis updated this revision to Diff 69992.Sep 1 2016, 5:30 AM
sdardis edited edge metadata.
sdardis removed rL LLVM as the repository for this revision.

Addressed review comments.

This revision was automatically updated to reflect the committed changes.
tfiala added a subscriber: tfiala.Sep 1 2016, 8:39 AM

Our LLDB Xcode build seems to be failing on not finding MipsScheduleGeneric.td:

[1776/2600] Building CXX object lib/Target/Lanai/CMakeFiles/LLVMLanaiCodeGen.dir/LanaiDelaySlotFiller.cpp.o
FAILED: cd /Volumes/Data/src/lldb-llvm.org/lldb/llvm-build/Release+Asserts/x86_64/lib/Target/Mips && /Volumes/Data/src/lldb-llvm.org/lldb/llvm-build/Release+Asserts/x86_64/bin/llvm-tblgen -gen-fast-isel -I /Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target/Mips -I /Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target -I /Volumes/Data/src/lldb-llvm.org/lldb/llvm/include /Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target/Mips/Mips.td -o /Volumes/Data/src/lldb-llvm.org/lldb/llvm-build/Release+Asserts/x86_64/lib/Target/Mips/MipsGenFastISel.inc.tmp
/Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target/Mips/Mips.td:62:9: error: Could not find include file 'MipsScheduleGeneric.td'
include "MipsScheduleGeneric.td"
        ^
/Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target/Mips/Mips.td:62:9: error: Unexpected input at top level
include "MipsScheduleGeneric.td"
        ^
FAILED: cd /Volumes/Data/src/lldb-llvm.org/lldb/llvm-build/Release+Asserts/x86_64/lib/Target/Mips && /Volumes/Data/src/lldb-llvm.org/lldb/llvm-build/Release+Asserts/x86_64/bin/llvm-tblgen -gen-asm-matcher -I /Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target/Mips -I /Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target -I /Volumes/Data/src/lldb-llvm.org/lldb/llvm/include /Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target/Mips/Mips.td -o /Volumes/Data/src/lldb-llvm.org/lldb/llvm-build/Release+Asserts/x86_64/lib/Target/Mips/MipsGenAsmMatcher.inc.tmp
/Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target/Mips/Mips.td:62:9: error: Could not find include file 'MipsScheduleGeneric.td'
include "MipsScheduleGeneric.td"
        ^
/Volumes/Data/src/lldb-llvm.org/lldb/llvm/lib/Target/Mips/Mips.td:62:9: error: Unexpected input at top level
include "MipsScheduleGeneric.td"
        ^
ninja: build stopped: subcommand failed.

This might just need a clean build, looking into that now.

I included that missing file in rL280377 . Sorry about the breakage.

tfiala added a comment.Sep 1 2016, 9:02 AM

I included that missing file in rL280377 . Sorry about the breakage.

That seems to have fixed it, thanks!