Robert Stevenson
2014-Oct-02 14:19 UTC
[LLVMdev] Autotuning parameters/heuristics within LLVM
Hi, I am planning to begin a project to explore the space of tuning LLVM internals in an effort to increase performance. I am wondering if anyone can point to me any parameterizations, heuristics, or priorities functions within LLVM that can be tuned/adjusted. So far, I'm considering BranchProbabilityInfo and InlineCost. Does anyone have any other suggestions? Thanks, Robert
Dear Robert, a while ago, we had this idea of using compiler optimizations to increase the performance of *verifying* an app, instead of the performance of *executing* it. We found that there were a number of settings that had an effect on verification performance: - The amount of loop unswitching -loop-unswitch-threshold=... - The amount of loop unrolling -unroll-threshold=... - The amount of function inlining -inline-threshold=... - The amount of jump threading -jump-threading-threshold=... - Whether to favor branches or select instructions -phi-node-folding-threshold=... -max-phi-to-fold-per-bb=... The effect that these had on verification (in our case, exhaustive symbolic testing) was quite drastic, with speedups of 95x in some cases. The core idea behind the work is that compilers use *cost models* that tell them how expensive an operation is. For verification, the costs are different. I’m writing you because these settings also have an impact en execution performance. If you find other parameters that have large effects, I’d be thrilled to hear about it. Cheers, Jonas PS: more details on our experiments: http://infoscience.epfl.ch/record/186012?ln=en -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141003/23565cb1/attachment.html>
John Criswell
2014-Oct-03 13:15 UTC
[LLVMdev] Autotuning parameters/heuristics within LLVM
Dear Jonas, Very cool. I've added a link to your paper on the LLVM publications page. Please feel free to email the list about other papers you or your group at EPFL publish that use LLVM; we love adding to the links on the Publications page. Regards, John Criswell On 10/3/14, 4:00 AM, Jonas Wagner wrote:> > Dear Robert, > > a while ago, we had this idea of using compiler optimizations to > increase the performance of /verifying/ an app, instead of the > performance of /executing/ it. We found that there were a number of > settings that had an effect on verification performance: > > * The amount of loop unswitching |-loop-unswitch-threshold=...| > * The amount of loop unrolling |-unroll-threshold=...| > * The amount of function inlining |-inline-threshold=...| > * The amount of jump threading |-jump-threading-threshold=...| > * Whether to favor branches or select instructions > |-phi-node-folding-threshold=... -max-phi-to-fold-per-bb=...| > > The effect that these had on verification (in our case, exhaustive > symbolic testing) was quite drastic, with speedups of 95x in some cases. > > The core idea behind the work is that compilers use /cost models/ that > tell them how expensive an operation is. For verification, the costs > are different. I'm writing you because these settings also have an > impact en execution performance. If you find other parameters that > have large effects, I'd be thrilled to hear about it. > > Cheers, > Jonas > > PS: more details on our experiments: > http://infoscience.epfl.ch/record/186012?ln=en > <http://infoscience.epfl.ch/record/186012?ln=en%3F> > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-- John Criswell Assistant Professor Department of Computer Science, University of Rochester http://www.cs.rochester.edu/u/criswell -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141003/9997098c/attachment.html>