This is an archive of the discontinued LLVM Phabricator instance.

Early exit with cheaper checks
ClosedPublic

Authored by hiraditya on Jul 20 2018, 2:40 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

hiraditya created this revision.Jul 20 2018, 2:40 PM

This is probably fine, but does it matter? i.e. you have compile time numbers?

This is probably fine, but does it matter? i.e. you have compile time numbers?

I dont have numbers, maybe you can help with that.

This is probably fine, but does it matter? i.e. you have compile time numbers?

I dont have numbers, maybe you can help with that.

I guess my question is, what's the motivation for this change? You found this by inspection?

hiraditya updated this revision to Diff 156621.Jul 20 2018, 3:25 PM

Adding BasicBlock::isEHPad back to preserve the semantics.

hiraditya added a comment.EditedJul 20 2018, 3:26 PM

This is probably fine, but does it matter? i.e. you have compile time numbers?

I dont have numbers, maybe you can help with that.

I guess my question is, what's the motivation for this change? You found this by inspection?

Yes. For basic blocks with large number of instructions before a callsite the previous approach may consume unnecessary cycles.

sebpop accepted this revision.Jul 20 2018, 6:22 PM

looks good

This revision is now accepted and ready to land.Jul 20 2018, 6:22 PM
This revision was automatically updated to reflect the committed changes.