This is an archive of the discontinued LLVM Phabricator instance.

[LoongArch] Optimize stack realignment using BSTRINS instruction
ClosedPublic

Authored by wangleiat on Aug 20 2023, 8:30 PM.

Details

Summary

Prior to this change, stack realignment was achieved using the SRLI/SLLI
instructions in two steps. With this patch, stack realignment is
optimized using a single BSTRINS instruction.

Diff Detail

Event Timeline

wangleiat created this revision.Aug 20 2023, 8:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2023, 8:30 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
wangleiat requested review of this revision.Aug 20 2023, 8:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2023, 8:30 PM
xen0n accepted this revision.Aug 20 2023, 9:06 PM

LGTM. Thanks!

This revision is now accepted and ready to land.Aug 20 2023, 9:06 PM
SixWeining accepted this revision.Aug 21 2023, 4:39 AM
SixWeining added inline comments.
llvm/lib/Target/LoongArch/LoongArchFrameLowering.cpp
301

How about renaming it to Align?

wangleiat updated this revision to Diff 551987.Aug 21 2023, 4:51 AM

Address @SixWeining's comments.

wangleiat marked an inline comment as done.Aug 21 2023, 4:52 AM