[PATCH] [SimplifyCFG] threshold for folding branches with common destination
resistor at mac.com
Mon Sep 29 21:30:07 PDT 2014
On Sep 29, 2014, at 2:33 PM, Jingyue Wu <jingyue at google.com> wrote:
> Hi Owen,
> I made the threshold a pass paramter in this patch. However, it doesn't look
> pretty because there are several layers between createCFGSimplificationPass and
> the actual use of this threshold (e.g. CFGSimplifyPass and SimplifyCFGOpt).
> What are the benefits of having these pass parameters? I saw other passes such
> as JumpThreading and LoopUnroll have such pass parameters too, but none of them
> seem actually used. One way I can think of using that is target-specific code
> can create these passes with a customized threshold, but in that case, I feel
> TargetTransformInfo would be a better home.
The use case is for embedded uses of LLVM, to allow the client to have programmatic control. We do something similar with loop unrolling thresholds, and I’d like to evolve the rest of the passes in that direction as well.
More information about the llvm-commits