search for: licms

Displaying 20 results from an estimated 802 matches for "licms".

Did you mean: licm
2013 Oct 31
3
[LLVMdev] LICM and SCEV AA?
Hello, We currently generate suboptimal code for this loop: for (int i = 1; i < LEN; i++) { a[i] = a[0] + b[i]; } The largest problem is that we won't vectorize the loop because the loop vectorizer does not grok the independence of a[i] and a[0] (note that i starts at 1 in this loop). While we can probably fix the vectorizer to handle this, I don't think that is the right place for
2013 Nov 02
0
[LLVMdev] LICM and SCEV AA?
On Oct 31, 2013, at 6:06 AM, Hal Finkel <hfinkel at anl.gov> wrote: > Hello, > > We currently generate suboptimal code for this loop: > > for (int i = 1; i < LEN; i++) { > a[i] = a[0] + b[i]; > } > > The largest problem is that we won't vectorize the loop because the loop vectorizer does not grok the independence of a[i] and a[0] (note that i starts at
2013 Jul 31
4
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
On 07/30/2013 09:44 PM, Chris Lattner wrote: > > On Jul 30, 2013, at 10:19 AM, Shuxin Yang <shuxin.llvm at gmail.com> wrote: > >> The pro for running LICM early is that it may move big redundant stuff out of loop nest. You never know >> how big it is. In case you are lucky , you can move lot of stuff out of >> loop, the loop may become much smaller and hence
2013 Nov 02
1
[LLVMdev] LICM and SCEV AA?
Sent from my iPhone > On Nov 2, 2013, at 1:52 AM, Andrew Trick <atrick at apple.com> wrote: > > >> On Oct 31, 2013, at 6:06 AM, Hal Finkel <hfinkel at anl.gov> wrote: >> >> Hello, >> >> We currently generate suboptimal code for this loop: >> >> for (int i = 1; i < LEN; i++) { >> a[i] = a[0] + b[i]; >> } >>
2010 Nov 24
3
[LLVMdev] Question regarding the alias analysis chaining behaviour
Hi, I am using LLVM 2.4 on a Linux RHEL5 machine. I was trying to figure out how the chaining of the alias analysis passes works in LLVM. Here are the command I used to test the chaining part. 1. ./opt hello_world_1_nest_func.bc -o hello_world_1_nest_func_AA.bc -no-aa -anders-aa -licm Result: Anderson's AA and No Alias Analysis both are called. 2. ./opt hello_world_1_nest_func.bc -o
2014 Dec 15
2
[LLVMdev] Modularizing LICM
Hi, I'm writing a new loop pass, and has a need to call LICM(Loop Invariant Code Motion) 'PromoteAliasSet' on modified loop. For now I didn't found any why to call 'PromoteAliasSet' from my pass explicitly. The only way is to schedule LICM pass after my pass. For some reason my pass need more control and preferring to call LICM 'PromoteAliasSet' instead running
2014 Dec 22
2
[LLVMdev] Modularizing LICM
One way you could go is to expose the interface in include/llvm/Transforms/Utils/LoopUtils.h. There's a similar approach in the LCSSA and LoopSimplify passes, both define functions used by other passes (e.g LoopUnroll and LICM). On Fri, Dec 19, 2014 at 10:58 PM, Philip Reames <listmail at philipreames.com> wrote: > I've come across similar use cases recently. In particular,
2010 Aug 15
2
[LLVMdev] a LICM bug (in LLVM-2.7)?
I am studying the Transform/Scalar/LICM.cpp pass, and wrote a simple test program to validate. void testLICM(void){ int i,N=100; int data; for(i=0;i<N;i++){ data = 1; printf("i: %d\n",i); } printf("data: %d\n", data); } I expect the "data=1" will be moved out of loop (either hoist or sink). However, to my surprise, that statement
2011 Aug 22
1
[LLVMdev] Infinite loop when adding a new analysis pass
I am trying to add an analysis pass as a FunctionPass, and let LICM (LoopPass) depends upon it. So in LICM.cpp, I have the following: virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); AU.addRequired<DominatorTree>(); AU.addRequired<LoopInfo>(); AU.addRequiredID(LoopSimplifyID); AU.addRequired<AliasAnalysis>();
2013 Jul 31
0
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
On 7/31/13 4:30 PM, Tobias Grosser wrote: > On 07/30/2013 09:44 PM, Chris Lattner wrote: >> >> On Jul 30, 2013, at 10:19 AM, Shuxin Yang <shuxin.llvm at gmail.com> wrote: >> >>> The pro for running LICM early is that it may move big redundant >>> stuff out of loop nest. You never know >>> how big it is. In case you are lucky , you can move
2015 Feb 11
3
[LLVMdev] question about licm
----- Original Message ----- > From: "Ashutosh Nema" <Ashutosh.Nema at amd.com> > To: "songlh" <songlh at cs.wisc.edu>, llvmdev at cs.uiuc.edu > Sent: Wednesday, February 11, 2015 3:20:27 AM > Subject: Re: [LLVMdev] question about licm > > Hi, > > LICM can only hoist instructions which dominates all loop exit > blocks. > In this case
2010 Aug 15
0
[LLVMdev] a LICM bug (in LLVM-2.7)?
I don't think licm looks at loads/stores to allocas -- these are usually handled by mem2reg which happens much earlier (if you run your example with -mem2reg you'll see it already deleted the store). In fact, licm sinks the stores by converting them to stores to allocas first and running mem2reg on that. If you change your example to void testLICM(int* restrict p) { int i,N=100;
2011 Dec 14
2
[LLVMdev] Adding dependency on MemoryDependenceAnalysis pass to LICM causes opt to get stuck in addPass
I'm attempting to add some support for hoisting/sinking of memory-using intrinsics in loops, and so I want to use MemoryDependenceAnalysis in LICM, but when I modify getAnalysisUsge to include this : virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); AU.addRequired<DominatorTree>(); AU.addRequired<LoopInfo>();
2015 Feb 11
2
[LLVMdev] question about licm
hi, I applied licm with basicaa on the following codes: int j = atoi(argc[1]); int lower[] = {10, 9, 8, 7, 6, 5, 4, 3, 2, 1}; int upper[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; for(i = lower[j]; a[i] < 100 && i < upper[j]; i ++); I notice that upper[j] is not hoisted out from the loop. Is this because j could be larger than 10? Thanks a lot! Best,
2017 Apr 26
1
Function LICM for readonly, nocapture functions
Hey all, I was doing some investigation of LICM and I ran into something that seems a bit odd to me. Suppose I was looking at the following code snippet: #define N 1000 int main() { int B[N]; char A[N]; for(int i=0; i<N; i++) { B[i] = strlen(A); } return B[0]+B[N-1]; } Among other optimizations that I may want to happen, I'd hope that the call to strlen could be
2016 Feb 10
2
LoopIdiomRegognize vs Preserved
Hi, On 02/10/2016 01:23 AM, haicheng at codeaurora.org wrote: > Thank you, Mikael. I can reproduce what you saw and am looking into it. Great! > Just curious, why do you run loop-deletion before licm and loop-idiom? As part of our internal testing we use Csmith to generate C-programs and then we run the compiler with random generated compiler flags on that input. This bug was
2013 Jul 30
3
[LLVMdev] IR Passes and TargetTransformInfo: Straw Man
On 7/30/13 7:35 AM, Krzysztof Parzyszek wrote: > On 7/29/2013 6:28 PM, Andrew Trick wrote: >> >> You mean that LICM and Unswitching should be left for later? For the >> purpose of exposing scalar optimizations, I'm not sure I agree with >> that but I'd be interested in examples. > > Optimizations like LICM, and unswitching can potentially damage >
2013 Nov 11
2
[LLVMdev] What's the Alias Analysis does clang use ?
Hi, LLVM community: I found basicaa seems not to tell must-not-alias for __restrict__ arguments in c/c++. It only compares two pointers and the underlying objects they point to. I wonder how clang does alias analysis for c/c++ keyword restrict. let assume we compile the following code: $cat myalias.cc float foo(float * __restrict__ v0, float * __restrict__ v1, float * __restrict__ v2, float *
2017 May 30
4
RFC: Replace usage of Alias Set Tracker with MemorySSA in LICM
Hi, I wanted to give a heads-up that I've been looking into replacing the AliasSetTracker(AST) with MemorySSA in the Loop Invariant Code Motion (LICM) pass. I would love to get feedback on the best way to incrementally push in this change. Motivation: There has been an outstanding issue with using the Alias Set Tracker due to its expensive construction time (quadratic). We've had test
2020 Mar 21
4
questionabout loop rotation
Hi Stefanos, Thanks for your comments. I added both as reviewer. > One question though. Are you sure that this: > This helps with LICM when instructions inside a conditional is loop invariantĀ  > is not achieved with the current LoopRotate pass? Because AFAIK, it does. Basically it inserts > a guard (that branches to the preheader) and then passes like LICM hoist invariant