[LLVMdev] Optimization of array access
Michael.Smith at synopsys.com
Mon Nov 21 12:20:10 PST 2011
Dead Code Elimination. I’m going to try re-working it following some of the insights Don Quixote provided.
From: Cameron Zwarich [mailto:zwarich at apple.com]
Sent: Monday, November 21, 2011 12:17 PM
To: Michael Smith
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] Optimization of array access
Where does the -time-passes option say the time is going?
Sent from my iPhone
On Nov 21, 2011, at 8:58 AM, Michael Smith <Michael.Smith at synopsys.com<mailto:Michael.Smith at synopsys.com>> wrote:
I’ve attached a 2 examples of patterns for updating an array. They’re simplified examples of some code generation I’m doing where I need to pass a large, unknown number of arguments (ints, doubles, pointers to other information) to a function.
The two patterns are:
Stack = 0;
Stack = 1;
Stack = 42;
Int I = 0;
Stack[i++] = 0;
Stack[i++] = 1;
Stack[i++] = 42;
I’ve found that the optimizer is much faster at handling the 2nd pattern than the 1st. With 3000 assignments - as in the examples attached – “opt –std-compile-opts –S func1.ll –o func1.opt” takes 10 seconds, while func2.ll takes 0.2s. Anyone have any ideas why?
I’ve tested with LLVM 2.9, and LLVM 3.0 RC1.
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev