This is an archive of the discontinued LLVM Phabricator instance.

ARM: provide a generic hint intrinsic
ClosedPublic

Authored by abdulras on Apr 24 2014, 3:17 PM.

Details

Summary

Introduce the llvm.arm.hint(i32) intrinsic that can be used to inject hints into
the instruction stream. This is particularly useful for generating IR from a
compiler where the user may inject an intrinsic (e.g. __yield). These are then
pattern substituted into the correct instruction which already existed.

Diff Detail

Event Timeline

abdulras updated this revision to Diff 8817.Apr 24 2014, 3:17 PM
abdulras retitled this revision from to ARM: provide a generic hint intrinsic.
abdulras updated this object.
abdulras edited the test plan for this revision. (Show Details)
abdulras added a reviewer: t.p.northover.
abdulras set the repository for this revision to rL LLVM.
abdulras added a subscriber: Unknown Object (MLST).Apr 24 2014, 3:20 PM
t.p.northover edited edge metadata.Apr 25 2014, 2:11 AM

Hi Saleem,

It mostly looks straightforward, but I'd make the patterns more generic: hints 0-5 already have defined meanings, but the whole point of the instruction is that it's more generic than that. There's no particular reason to exclude any number in the space.

Cheers.

Tim.

lib/Target/ARM/ARMInstrInfo.td
1845–1850

I'd put the pattern into the generic HINT instruction: hints 0-5 have fairly tied down meanings, but the whole point of the mechanism is that it's more generic than that.

abdulras accepted this revision.Apr 25 2014, 10:33 AM
abdulras added a reviewer: abdulras.

Committed with the suggested changes as SVN r207242.

This revision is now accepted and ready to land.Apr 25 2014, 10:33 AM
abdulras closed this revision.Apr 25 2014, 10:33 AM