[LLVMdev] Optimization of array access

Eli Friedman eli.friedman at gmail.com
Mon Nov 21 14:13:49 PST 2011


On Mon, Nov 21, 2011 at 1:56 PM, Michael Smith
<Michael.Smith at synopsys.com> wrote:
> Tried 5 and 50, doesn't seem to make any difference.

Hmm... probably some other quadratic algorithm, then.

-Eli

> -----Original Message-----
> From: Eli Friedman [mailto:eli.friedman at gmail.com]
> Sent: Monday, November 21, 2011 1:20 PM
> To: Michael Smith
> Cc: Cameron Zwarich; llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] Optimization of array access
>
> On Mon, Nov 21, 2011 at 1:03 PM, Michael Smith
> <Michael.Smith at synopsys.com> wrote:
>> Sorry, Dead Store Elimination.
>
> Hmm... does tweaking the value of BlockScanLimit in
> MemoryDependenceAnalysis.cpp help?
>
> -Eli
>
>>
>>
>>
>> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
>> Behalf Of Michael Smith
>> Sent: Monday, November 21, 2011 12:20 PM
>> To: Cameron Zwarich
>>
>> Cc: llvmdev at cs.uiuc.edu
>> Subject: Re: [LLVMdev] Optimization of array access
>>
>>
>>
>> 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>
>> 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] = 0;
>>
>>                 Stack[1] = 1;
>>
>>                 Stack[2] = 42;
>>
>> And
>>
>>                 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.
>>
>>
>>
>> Regards,
>>
>> Michael
>>
>> <opt.zip>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>




More information about the llvm-dev mailing list