This is an archive of the discontinued LLVM Phabricator instance.

[X86] Don't emit unreachable stack adjustments
ClosedPublic

Authored by rnk on Aug 28 2019, 2:22 PM.

Details

Summary

This is a minor improvement on our past attempts to do this. Fixes
PR43155.

Event Timeline

rnk created this revision.Aug 28 2019, 2:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2019, 2:22 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
hans accepted this revision.Aug 29 2019, 2:13 AM

lgtm

llvm/lib/Target/X86/X86FrameLowering.cpp
2555

nit: "blockEndIsUnreachable" feels like a more natural name to me (I almost read the current name like that before my eyes really focused)

2560

You used llvm::all_of above. Could llvm::all_of or std::all_of be used for both?

This revision is now accepted and ready to land.Aug 29 2019, 2:13 AM
rnk marked 2 inline comments as done.Aug 29 2019, 2:22 PM

Thanks!

llvm/lib/Target/X86/X86FrameLowering.cpp
2555

Works for me.

2560

The llvm variants take ranges. I'd have to standardize on std and use begin/end iterator pairs for this one. I'll do that.

This revision was automatically updated to reflect the committed changes.