similar to: [LLVMdev] Failed to Unroll a Seemingly Simple Loop

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Failed to Unroll a Seemingly Simple Loop"

2015 Mar 16
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
----- Original Message ----- > From: "Jingyue Wu" <jingyue at google.com> > To: "Daniel Berlin" <dberlin at dberlin.org>, "Mark Heffernan" <meheff at google.com>, "Hal Finkel" <hfinkel at anl.gov> > Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Sent: Friday, March 13, 2015 1:31:59 PM >
2015 Mar 13
3
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
On Fri, Mar 13, 2015 at 10:16 AM Mark Heffernan <meheff at google.com> wrote: > On Thu, Mar 12, 2015 at 2:34 PM, Hal Finkel <hfinkel at anl.gov> wrote: > >> It is not clear to me at all that preventing the merging is the right >> solution. There are a large number of analysis, including alias analysis, >> and optimizations that use GetUnderlyingObject, and
2015 Mar 12
3
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
I think it would make sense for (1) and (2). I am not sure if (3) is feasible in instcombine. (I am not too familiar with LoopInfo) For the Octasic's Opus platform, I modified shouldMergeGEPs in our fork to: if (GEP.hasAllZeroIndices() && !Src.hasAllZeroIndices() && !Src.hasOneUse()) return false; return Src.hasAllConstantIndices(); // was return false;
2015 Mar 12
2
[LLVMdev] Question about shouldMergeGEPs in InstructionCombining
Hi Mark, It is not clear to me at all that preventing the merging is the right solution. There are a large number of analysis, including alias analysis, and optimizations that use GetUnderlyingObject, and related routines to search back through GEPs. They only do this up to some small finite depth (six, IIRC). So reducing the GEP depth is likely the right solution for InstCombine (which has the
2014 Jul 17
4
[LLVMdev] Removing metadata in a pass
Is it OK to remove metadata in an optimization pass? The context is patch http://reviews.llvm.org/D4571 which removes loop unrolling hint metadata after using it to avoid unrolling more than the hint suggests. This is a potential problem because loop unrolling can be run more than once. Example: a loop annotated with "#pragma clang loop unroll_count(2)" which adds hint metadata to the
2014 Jul 23
2
[LLVMdev] Adding custom #pragma for clang
I'd like to add a custom #pragma directive in clang for research purposes. I'm familiar with the LLVM pass-writing interface but new to the rest of LLVM and clang. I've looked into Simone Pellegrini's work on a #pragma interface (https://github.com/motonacciu/clomp and http://llvm.org/devmtg/2013-04/pellegrini-slides.pdf), but I'm in no position to determine if this approach
2014 Jan 16
11
[LLVMdev] Loop unrolling opportunity in SPEC's libquantum with profile info
I am starting to use the sample profiler to analyze new performance opportunities. The loop unroller has popped up in several of the benchmarks I'm running. In particular, libquantum. There is a ~12% opportunity when the runtime unroller is triggered. This helps functions like quantum_sigma_x (http://sourcecodebrowser.com/libquantum/0.2.4/gates_8c_source.html#l00149). The function accounts
2015 Oct 12
2
question about llvm partial unrolling/runtime unrolling
Hi, I am trying to do loop unrolling with loops that don't have constant loop counter. It is highly appreciated if anyone can help me on this. What I want to do is to turn loop (n) { <loop body> } into loop (n/4) { <loop body> <loop body> <loop body> <loop body> } loop (n%4) { <loop
2010 Jul 01
2
[LLVMdev] Fail to unroll loop on simple examples.
Hi all, I have tried to use the loop-unroll pass on a large example, but without success. So I have tried on smaller examples, and I did not get more success. My simplest example is attached. It comes from this C code (using llvm-gcc, but similar result with clang): int main (int argc, char *argv[]) { int i; for (i = 0; i!=5; ++i) {} return 0; } I use this command (version 2.8svn, from
2015 Oct 16
2
question about llvm partial unrolling/runtime unrolling
Hi Hal, I did opt.exe -S -debug -loop-unroll -unroll-runtime=true -unroll-count=4 csShader.ll and it prints out: Args: opt.exe -S -debug -loop-unroll -unroll-runtime=true -unroll-count=4 csShader.ll Loop Unroll: F[build_cs_5_0] Loop %loop_entry Loop Size = 82 partially unrolling with count: 1 Thanks, Frances On Thu, Oct 15, 2015 at 9:35 PM, Hal Finkel <hfinkel at anl.gov>
2010 Jul 01
0
[LLVMdev] Fail to unroll loop on simple examples.
[I am a newcomer to llvm, so don't believe me.] Hi Claude, I added -debug to the command line in an attempt to study your example, and got out this: Loop Unroll: F[main] Loop %bb1 Loop Size = 4 Can't unroll; loop not terminated by a conditional branch. The source code for that is on line 116 (or so) in lib/Transforms/Utils/LoopUnroll.cpp Based on a quick look at the source code,
2004 Nov 19
1
[LLVMdev] Loop unroll : approximate loop size for loops with debug info?
Hi, just a quick question about the intent of the ApproximateLoopSize() function in LoopUnroll.cpp: If a loop contains debug stoppoint intrinsics, does it make sense to count them? My understanding is that they are removed when not running under llvm-db anyway, so we probably shouldn't make size judgements based on them. Is that right, or am I missing something? Anyway, if I'm right,
2014 Jan 15
2
[LLVMdev] Loop unrolling a function
The loop rotation pass does modify the function, which I'm guessing means that a FunctionPassManager can be used to run LoopPasses (this is not obvious to me after looking through the FunctionPassManager code). Unfortunately none of the other passes I'm using (ScalarEvolution, LCSSA, IndVarSimplify, and LoopUnroll) appear to have an effect. I verified that the function can be loop
2011 May 04
1
[LLVMdev] Loop-Unroll optimization
1. You should run the passes in the same opt command, for passes like loops which is an analysis pass provides results to the following passes. 2. You can pass a -debug flag to opt to see the some debugging info. 3. I tried this opt -mem2reg -loops -loopsimplify -loop-unroll -unroll-count=3 -debug loop.o -o tt.bc and got this message. Loop Size = 14 Can't unroll; loop not terminated by
2014 Jan 15
3
[LLVMdev] Loop unrolling a function
Hi all, I'm attempting to perform loop unrolling on a single function using the C++ API. Maybe I missed something in the docs, but I cannot figure out a way to do this. The function I'm working with is very simple, containing a single for loop and not much else. I compiled the function to IR using clang with no optimizations enabled. My initial plan was to first run the IndVarSimplify
2011 May 03
0
[LLVMdev] Loop-Unroll optimization
Even after all the sequence of commands below bit-code is not showing any effect of loop-unrolling *manish at manish:~/Test2$ llvm-gcc-4.2 -O2 -emit-llvm Hello.c -c -o Hello.bc* *manish at manish:~/Test2$ opt-2.8 -loops Hello.bc -o Hello1.bc* *manish at manish:~/Test2$ opt-2.8 -loopsimplify Hello1.bc -o Hello2.bc* *manish at manish:~/Test2$ opt-2.8 -indvars Hello2.bc -o Hello3.bc* *manish at
2008 May 07
8
[LLVMdev] [PATCH] Split LoopUnroll pass into mechanism and policy
Hello Matthijs, Separating mechanism from policy is a good thing for the LoopUnroll pass. Instead of moving the policy to a subclass though, I think it'd be better to move the mechanism, the unrollLoop function, out to be a standalone utility function, with the LoopInfo object passed in explicitly. FoldBlockIntoPredecessor would also be good to make into a standalone utility function, since
2008 Feb 05
3
[LLVMdev] 2.2 Prerelease (version 2) available for testing
LLVMers, The next version of the 2.2 prerelease is available for testing: http://llvm.org/prereleases/2.2/ Please see my last email for testing directions: http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-January/012249.html Please complete all testing by February 10th at 5PM PST. Thanks! -Tanya
2013 Feb 13
3
[LLVMdev] Overhauling the command-line processing/codegen options code
Is anyone currently working on overhauling the command-line processing code? We're currently having some design issues with this component, and I'd like to start a larger conversation on it. For context, I am talking from an "LLVM as a library" perspective instead of an "LLVM as a set of tools" perspective. In a nut-shell, the problems we are facing are as follows:
2014 Jan 21
5
[LLVMdev] Loop unrolling opportunity in SPEC's libquantum with profile info
On 16/01/2014, 23:47 , Andrew Trick wrote: > > On Jan 15, 2014, at 4:13 PM, Diego Novillo <dnovillo at google.com > <mailto:dnovillo at google.com>> wrote: > >> Chandler also pointed me at the vectorizer, which has its own >> unroller. However, the vectorizer only unrolls enough to serve the >> target, it's not as general as the runtime-triggered