[LLVMdev] Dead Store Elimination
vborky at yahoo.com
Mon Sep 10 13:26:17 PDT 2012
The mem2reg pass did not help. Moving the alloca instructions into the
entry block did the trick.
One other thing I noticed is that if there was only one alloca, the dead
store is eliminated. Having the second one (does not matter which of the
two) prevents the elimination. Is this a bug?
On 9/10/12 8:16 AM, Duncan Sands wrote:
> Hi Vinayak,
>> Here is the result of optimization using the following passes:
> you should run the mem2reg pass too, and first.
>> ; <label>:7 ; preds =
>> %8 = alloca i64, align 8
> Put alloca instructions in the entry block if possible.
> Ciao, Duncan.
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev