This is an archive of the discontinued LLVM Phabricator instance.

Add basic conditional branches in mips fast-isel
ClosedPublic

Authored by rkotler on Oct 2 2014, 11:13 AM.

Details

Summary

Implement the most basic form of conditional branches in Mips fast-isel.

Diff Detail

Event Timeline

rkotler updated this revision to Diff 14339.Oct 2 2014, 11:13 AM
rkotler retitled this revision from to Add basic conditional branches in mips fast-isel.
rkotler updated this object.
rkotler edited the test plan for this revision. (Show Details)
rkotler added a reviewer: dsanders.
rkotler added subscribers: mcrosier, rfuhler, Unknown Object (MLST).
mcrosier removed a subscriber: mcrosier.Oct 2 2014, 2:52 PM
dsanders accepted this revision.Oct 3 2014, 3:52 AM
dsanders edited edge metadata.

LGTM with a couple extra comments

lib/Target/Mips/MipsFastISel.cpp
345

This confused me for a moment. Could you make it a bit clearer that we're working on the else case at this point?

test/CodeGen/Mips/Fast-ISel/br1.ll
24

It's not necessary for this patch but this instruction is redundant and should be trivial to eliminate. Could you add a FIXME comment to this test?

This revision is now accepted and ready to land.Oct 3 2014, 3:52 AM
rkotler updated this revision to Diff 14605.Oct 8 2014, 2:34 PM
rkotler edited edge metadata.
  1. Add comment making clear the how the code for the basic branch is working. This particular part was copied from the PPC port but we will expand this soon to do more cases by porting the AARCH64 version of this routine.
  1. Add a FIXME to try and eliminate some unneeded code. This frequently happens in fast-isel because it's a simple one pass compiler.
rkotler updated this revision to Diff 14756.Oct 10 2014, 4:28 PM
  1. Added comment about true and false targets of the conditional expression.
  2. Added FIXME to the test case for a redundant instruction that we are generating.
rkotler closed this revision.Oct 10 2014, 6:05 PM