[PATCH] D126115: [BOLT] Increase coverage of shrink wrapping [5/5]

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 20 20:25:16 PDT 2022


rafauler created this revision.
rafauler added reviewers: Amir, maksfb, yota9, ayermolo, zr33.
Herald added a subscriber: pengfei.
Herald added a project: All.
rafauler requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Add -experimental-shrink-wrapping flag to control when we
want to move callee-saved registers even when addresses of the stack
frame are captured and used in pointer arithmetic, making it more
challenging to do alias analysis to prove that we do not access
optimized stack positions. This alias analysis is not yet implemented,
hence, it is experimental. In practice, though, no compiler would emit
code to do pointer arithmetic to access a saved callee-saved register
unless there is a memory bug or we are failing to identify a
callee-saved reg, so I'm not sure how useful it would be to formally
prove that.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126115

Files:
  bolt/include/bolt/Passes/FrameAnalysis.h
  bolt/lib/Passes/FrameAnalysis.cpp
  bolt/lib/Passes/FrameOptimizer.cpp
  bolt/lib/Passes/ShrinkWrapping.cpp
  bolt/lib/Target/X86/X86MCPlusBuilder.cpp
  bolt/test/X86/frame-opt-lea.s
  bolt/test/X86/shrinkwrapping-lea.s
  bolt/test/X86/shrinkwrapping-mov.s
  bolt/test/X86/shrinkwrapping-popf.s
  bolt/test/X86/shrinkwrapping-restore-position.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126115.431120.patch
Type: text/x-patch
Size: 14335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220521/e0e2e6ab/attachment.bin>


More information about the llvm-commits mailing list