This is an archive of the discontinued LLVM Phabricator instance.

Introduce deoptimization operand bundles
ClosedPublic

Authored by sanjoy on Nov 10 2015, 1:15 PM.

Details

Summary

This change introduces the notion of "deoptimization" operand bundles.
LLVM can recognize and optimize these in more precise ways than it can a
generic "unknown" operand bundles.

The current form of this special recognition / optimization is an enum
entry in LLVMContext, a LangRef blurb and a verifier rule. Over time we
will teach LLVM to do more aggressive optimization around deoptimization
operand bundles, exploiting known facts about kinds of state
deoptimization operand bundles are allowed to track.

Diff Detail

Repository
rL LLVM

Event Timeline

sanjoy updated this revision to Diff 39847.Nov 10 2015, 1:15 PM
sanjoy retitled this revision from to Introduce deoptimization operand bundles.
sanjoy updated this object.
sanjoy added a subscriber: llvm-commits.
reames added inline comments.Nov 10 2015, 2:34 PM
docs/LangRef.rst
1508 ↗(On Diff #39847)

, unless the current frame is being deoptimized in which case return will never return to the compiled code of the caller function after the call.

lib/IR/LLVMContextImpl.cpp
50 ↗(On Diff #39847)

Why do this in the Impl rather than the Context as we do for attributes? I'd prefer consistency unless you have a good reason.

test/Verifier/operand-bundles.ll
38 ↗(On Diff #39847)

Can you add a passing test case too? Something to show the verifier *doesn't* reject a single valid deopt bundle?

sanjoy updated this revision to Diff 39875.Nov 10 2015, 5:44 PM
sanjoy marked 3 inline comments as done.
  • address review
reames accepted this revision.Nov 11 2015, 11:52 AM
reames edited edge metadata.

LGTM w/minor comment addressed.

include/llvm/IR/LLVMContext.h
70 ↗(On Diff #39875)

Doxygen comment /// please

This revision is now accepted and ready to land.Nov 11 2015, 11:52 AM
This revision was automatically updated to reflect the committed changes.