This is an archive of the discontinued LLVM Phabricator instance.

[mips] Emit the .insn directive for empty basic blocks.
ClosedPublic

Authored by vkalintiris on May 6 2015, 8:26 AM.

Details

Summary

In microMIPS, labels need to know whether they are on code or data. This is
indicated with STO_MIPS_MICROMIPS and can be inferred by being followed
by instructions. For empty basic blocks, we can ensure this by emitting the
.insn directive after the label.

Also, this fixes some failures in our out-of-tree MIPS buildbots, for the
exception handling regression tests under: SingleSource/Regression/C++/EH

Diff Detail

Repository
rL LLVM

Event Timeline

vkalintiris updated this revision to Diff 25050.May 6 2015, 8:26 AM
vkalintiris retitled this revision from to [mips] Emit the .insn directive for empty basic blocks..
vkalintiris updated this object.
vkalintiris edited the test plan for this revision. (Show Details)
vkalintiris added a reviewer: dsanders.
vkalintiris added a subscriber: Unknown Object (MLST).
dsanders accepted this revision.May 6 2015, 9:09 AM
dsanders edited edge metadata.

LGTM with a couple nits.

Also, this fixes some failures in our out-of-tree MIPS buildbots, for the
exception handling regression tests under: SingleSource/Regression/C++/EH

This should mention that it's the microMIPS buildbots in particular.

test/CodeGen/Mips/insn-zero-size-bb.ll
5–6 ↗(On Diff #25050)

Nit: This comment isn't quite right since we emit .insn for empty BB's on all subtargets. I think you mean it only matters for microMIPS and MIPS16.

This revision is now accepted and ready to land.May 6 2015, 9:09 AM
This revision was automatically updated to reflect the committed changes.