This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Increase coverage of shrink wrapping [2/5]
ClosedPublic

Authored by rafauler on May 20 2022, 8:22 PM.

Details

Summary

Increase coverage of isStackAccess(), making frame opt able
to analyze more functions.

While this has been empirically determined to be one of the most
frequent instructions that need to be analyzed by shrink wrapping in
our use cases, it would be great to have a way of deriving this
information automatically, based on TableGen. I'm not sure this can be
done at the moment, so we rely expanding our logic here.

Diff Detail

Event Timeline

rafauler created this revision.May 20 2022, 8:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2022, 8:22 PM
Herald added a subscriber: pengfei. · View Herald Transcript
rafauler requested review of this revision.May 20 2022, 8:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2022, 8:22 PM
Amir accepted this revision.May 20 2022, 11:39 PM

LGTM but didn't check every new line.

bolt/lib/Target/X86/X86MCPlusBuilder.cpp
1100

There might be a way to fetch memory access size: D126116 (WIP).
Regarding the rest of the fields: IsLoad/IsStore are straightforward. StoreFromReg and IsSimple are somewhat difficult. Let's address them later.

I think it's best to pull this diff in, and remove it later with D126116 after NFC testing.

This revision is now accepted and ready to land.May 20 2022, 11:39 PM
This revision was landed with ongoing or failed builds.Jul 11 2022, 5:33 PM
This revision was automatically updated to reflect the committed changes.