[PATCH] D11421: New interface to enable shrink wrapping

Kit Barton kbarton at ca.ibm.com
Wed Jul 22 11:04:24 PDT 2015


kbarton created this revision.
kbarton added reviewers: qcolombet, echristo, hfinkel, wschmidt, nemanjai.
kbarton added a subscriber: llvm-commits.

This patch changes the interface to enable the shrink wrapping optimization. 
It adds a new constructor, which takes a std::function predicate function that is run at the beginning of shrink wrapping to determine whether the optimization should run on the given machine function. The std::function can be overridden by each target, allowing target-specific decisions to be made on each machine function. 

This is necessary for PowerPC, as the decision to run shrink wrapping is partially based on the ABI. Futhermore, this operates nicely with the GCC iFunc capability, which allows option overrides on a per-function basis.



http://reviews.llvm.org/D11421

Files:
  include/llvm/CodeGen/Passes.h
  lib/CodeGen/Passes.cpp
  lib/CodeGen/ShrinkWrap.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11421.30368.patch
Type: text/x-patch
Size: 6619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150722/231659c5/attachment.bin>


More information about the llvm-commits mailing list