r177819 - Make clang to mark static stack allocations with lifetime markers to enable a more aggressive stack coloring.
Nadav Rotem
nrotem at apple.com
Mon Mar 25 11:45:15 PDT 2013
It sounds like one of the IR-level optimization breaks when lifetime markers are added. Do you know which optimization it may be ? I see the name "SROA" in the _correct_ version of the IR. Is there another optimization that may mess with vector loads ?
On Mar 25, 2013, at 11:27 AM, Ulrich Weigand <Ulrich.Weigand at de.ibm.com> wrote:
> Nadav Rotem <nrotem at apple.com> wrote on 25.03.2013 19:22:00:
>
>> Thanks for looking at this failure. Does the IR look correct ?
>
> No ... the arguments to printf are reversed already in the IR,
> as output via clang -S -emit-llvm.
>
> Before the change we had:
>
>> - %sumV.sroa.0.0.vec.extract = extractelement <8 x double> %add, i32 0
>> - %sumV.sroa.0.8.vec.extract = extractelement <8 x double> %add, i32 1
>> - %sumV.sroa.0.16.vec.extract = extractelement <8 x double> %add, i32 2
>> - %sumV.sroa.0.24.vec.extract = extractelement <8 x double> %add, i32 3
>> - %sumV.sroa.0.32.vec.extract = extractelement <8 x double> %add, i32 4
>> - %sumV.sroa.0.40.vec.extract = extractelement <8 x double> %add, i32 5
>> - %sumV.sroa.0.48.vec.extract = extractelement <8 x double> %add, i32 6
>> - %sumV.sroa.0.56.vec.extract = extractelement <8 x double> %add, i32 7
>> - %call.i = tail call signext i32 (i8*, ...)* @printf(i8* getelementptr
>> inbounds ([25 x i8]* @.str, i64 0, i64 0), double
>> %sumV.sroa.0.0.vec.extract, double %sumV.s
>> roa.0.8.vec.extract, double %sumV.sroa.0.16.vec.extract, double
>> %sumV.sroa.0.24.vec.extract, double %sumV.sroa.0.32.vec.extract, double
>> %sumV.sroa.0.40.vec.extract,
>> double %sumV.sroa.0.48.vec.extract, double %sumV.sroa.0.56.vec.extract)
> #1
>
> so the first printf element is extractelement <8 x double> %add, i32 0
>
>
> After the change we have:
>
>> + %bitcast = extractelement <8 x double> %add, i32 7
>> + %11 = extractelement <8 x double> %add, i32 6
>> + %12 = extractelement <8 x double> %add, i32 5
>> + %13 = extractelement <8 x double> %add, i32 4
>> + %14 = extractelement <8 x double> %add, i32 3
>> + %15 = extractelement <8 x double> %add, i32 2
>> + %16 = extractelement <8 x double> %add, i32 1
>> + %17 = extractelement <8 x double> %add, i32 0
>> + %call.i = call signext i32 (i8*, ...)* @printf(i8* getelementptr
>> inbounds ([25 x i8]* @.str, i64 0, i64 0), double %bitcast, double %11,
>> double %12, double %13, d
>> ouble %14, double %15, double %16, double %17) #1
>
> so the first printf element is extractelement <8 x double> %add, i32 7
>
>
> The PowerPC assembler output in both cases correctly reflects the IR.
>
> Bye,
> Ulrich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130325/62e72cb0/attachment.html>
More information about the cfe-commits
mailing list