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.
This will add shrink wrapping all the time. I think it makes more sense to guard this by (getOptLevel() != CodeGenOpt::None), as is done below for addMachineLateOptimization().
I will make this change in the next revision.