<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 29, 2016, at 8:32 AM, Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><br class="Apple-interchange-newline">On Sep 29, 2016, at 12:28 AM, Daniel Berlin <<a href="mailto:dannyb@google.com" class="">dannyb@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Sep 28, 2016 at 11:01 PM, Mehdi Amini<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:mehdi.amini@apple.com" target="_blank" class="">mehdi.amini@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">Hi,<br class=""><br class="">After this commit, an LTO link of llvm-tblgen with debug info is trigger many more calls to strlen().<br class="">It is not calling it 21928214 (~22M) times, versus 12585102 (12.5M) before. And the livedebugvalues pass gets >3x slower (it is still only 3% of the total link time though).<br class=""><br class="">Is it expected?<br class=""></blockquote><div class=""><br class=""></div><div class="">3x slower seems a bit much, but it is actually solving the dataflow problem correctly now, instead of just dropping info on the floor somewhat randomly in certain cases.</div><div class=""><br class=""></div><div class="">I expect this is all taken care of by the followup adrian had though, right?<br class=""></div></div></div></div></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span class="" style="font-family: monospace;">Mehdi, could you try and re-run the benchmark with a revision after r</span><span class="" style="font-family: monospace;">282611? I'm hoping that this offsets the extra cost of </span><font face="monospace" class="">r282506.</font></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span class="" style="font-family: monospace;"><br class=""></span></div></div></blockquote><div><br class=""></div><div>Just counting the number of strlen(), it goes down from 22M calls to 11.5M, pretty efficient!</div><div><br class=""></div><div>Thanks,</div><div><br class=""></div><div><br class=""></div><div>— </div><div>Mehdi</div><div><br class=""></div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><font face="monospace" class="">-- adrian</font></div><br class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><div class=""> <br class=""></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><br class="">The object file produced is slightly larger (31052564 after vs 30953876 before), which is due to the expected “better” debug info I guess.<br class=""><br class="">—<br class="">Mehdi<br class=""><br class="">> On Sep 27, 2016, at 9:46 AM, Keith Walker via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a>> wrote:<br class="">><br class="">> Author: kwalker<br class="">> Date: Tue Sep 27 11:46:07 2016<br class="">> New Revision: 282506<br class="">><br class="">> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=282506&view=rev" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project?rev=282506&view=rev</a><br class="">> Log:<br class="">> Propagate DBG_VALUE entries when there are unvisited predecessors<br class="">><br class="">> Variables are sometimes missing their debug location information in<br class="">> blocks in which the variables should be available. This would occur<br class="">> when one or more predecessor blocks had not yet been visited by the<br class="">> routine which propagated the information from predecessor blocks.<br class="">><br class="">> This is addressed by only considering predecessor blocks which have<br class="">> already been visited.<br class="">><br class="">> The solution to this problem was suggested by Daniel Berlin on the<br class="">> LLVM developer mailing list.<br class="">><br class="">> Differential Revision:<span class="Apple-converted-space"> </span><a href="https://reviews.llvm.org/D24927" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/<wbr class="">D24927</a><br class="">><br class="">> Added:<br class="">>    llvm/trunk/test/CodeGen/ARM/<wbr class="">dbg-range-extension.mir<br class="">> Modified:<br class="">>    llvm/trunk/lib/CodeGen/<wbr class="">LiveDebugValues.cpp<br class="">><br class="">> Modified: llvm/trunk/lib/CodeGen/<wbr class="">LiveDebugValues.cpp<br class="">> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugValues.cpp?rev=282506&r1=282505&r2=282506&view=diff" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project/llvm/trunk/lib/<wbr class="">CodeGen/LiveDebugValues.cpp?<wbr class="">rev=282506&r1=282505&r2=<wbr class="">282506&view=diff</a><br class="">> ==============================<wbr class="">==============================<wbr class="">==================<br class="">> --- llvm/trunk/lib/CodeGen/<wbr class="">LiveDebugValues.cpp (original)<br class="">> +++ llvm/trunk/lib/CodeGen/<wbr class="">LiveDebugValues.cpp Tue Sep 27 11:46:07 2016<br class="">> @@ -201,7 +201,8 @@ private:<br class="">>                 VarLocInMBB &OutLocs, VarLocMap &VarLocIDs);<br class="">><br class="">>   bool join(MachineBasicBlock &MBB, VarLocInMBB &OutLocs, VarLocInMBB &InLocs,<br class="">> -            const VarLocMap &VarLocIDs);<br class="">> +            const VarLocMap &VarLocIDs,<br class="">> +            SmallPtrSet<const MachineBasicBlock *, 16> &Visited);<br class="">><br class="">>   bool ExtendRanges(MachineFunction &MF);<br class="">><br class="">> @@ -368,7 +369,8 @@ bool LiveDebugValues::transfer(<wbr class="">MachineIn<br class="">> /// inserting a new DBG_VALUE instruction at the start of the @MBB - if the same<br class="">> /// source variable in all the predecessors of @MBB reside in the same location.<br class="">> bool LiveDebugValues::join(<wbr class="">MachineBasicBlock &MBB, VarLocInMBB &OutLocs,<br class="">> -                           VarLocInMBB &InLocs, const VarLocMap &VarLocIDs) {<br class="">> +                           VarLocInMBB &InLocs, const VarLocMap &VarLocIDs,<br class="">> +                           SmallPtrSet<const MachineBasicBlock *, 16> &Visited) {<br class="">>   DEBUG(dbgs() << "join MBB: " << MBB.getName() << "\n");<br class="">>   bool Changed = false;<br class="">><br class="">> @@ -376,21 +378,32 @@ bool LiveDebugValues::join(<wbr class="">MachineBasicB<br class="">><br class="">>   // For all predecessors of this MBB, find the set of VarLocs that<br class="">>   // can be joined.<br class="">> +  int NumVisited = 0;<br class="">>   for (auto p : MBB.predecessors()) {<br class="">> +    // Ignore unvisited predecessor blocks.  As we are processing<br class="">> +    // the blocks in reverse post-order any unvisited block can<br class="">> +    // be considered to not remove any incoming values.<br class="">> +    if (!Visited.count(p))<br class="">> +      continue;<br class="">>     auto OL = OutLocs.find(p);<br class="">>     // Join is null in case of empty OutLocs from any of the pred.<br class="">>     if (OL == OutLocs.end())<br class="">>       return false;<br class="">><br class="">> -    // Just copy over the Out locs to incoming locs for the first predecessor.<br class="">> -    if (p == *MBB.pred_begin()) {<br class="">> +    // Just copy over the Out locs to incoming locs for the first visited<br class="">> +    // predecessor, and for all other predecessors join the Out locs.<br class="">> +    if (!NumVisited)<br class="">>       InLocsT = OL->second;<br class="">> -      continue;<br class="">> -    }<br class="">> -    // Join with this predecessor.<br class="">> -    InLocsT &= OL->second;<br class="">> +    else<br class="">> +      InLocsT &= OL->second;<br class="">> +    NumVisited++;<br class="">>   }<br class="">><br class="">> +  // As we are processing blocks in reverse post-order we<br class="">> +  // should have processed at least one predecessor, unless it<br class="">> +  // is the entry block which has no predecessor.<br class="">> +  assert((NumVisited || MBB.pred_empty()) &&<br class="">> +         "Should have processed at least one predecessor");<br class="">>   if (InLocsT.empty())<br class="">>     return false;<br class="">><br class="">> @@ -463,6 +476,7 @@ bool LiveDebugValues::ExtendRanges(<wbr class="">Machi<br class="">>   // To solve it, we perform join() and transfer() using the two worklist method<br class="">>   // until the ranges converge.<br class="">>   // Ranges have converged when both worklists are empty.<br class="">> +  SmallPtrSet<const MachineBasicBlock *, 16> Visited;<br class="">>   while (!Worklist.empty() || !Pending.empty()) {<br class="">>     // We track what is on the pending worklist to avoid inserting the same<br class="">>     // thing twice.  We could avoid this with a custom priority queue, but this<br class="">> @@ -472,8 +486,8 @@ bool LiveDebugValues::ExtendRanges(<wbr class="">Machi<br class="">>     while (!Worklist.empty()) {<br class="">>       MachineBasicBlock *MBB = OrderToBB[Worklist.top()];<br class="">>       Worklist.pop();<br class="">> -      MBBJoined = join(*MBB, OutLocs, InLocs, VarLocIDs);<br class="">> -<br class="">> +      MBBJoined = join(*MBB, OutLocs, InLocs, VarLocIDs, Visited);<br class="">> +      Visited.insert(MBB);<br class="">>       if (MBBJoined) {<br class="">>         MBBJoined = false;<br class="">>         Changed = true;<br class="">><br class="">> Added: llvm/trunk/test/CodeGen/ARM/<wbr class="">dbg-range-extension.mir<br class="">> URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/ARM/dbg-range-extension.mir?rev=282506&view=auto" rel="noreferrer" target="_blank" class="">http://llvm.org/viewvc/llvm-<wbr class="">project/llvm/trunk/test/<wbr class="">CodeGen/ARM/dbg-range-<wbr class="">extension.mir?rev=282506&view=<wbr class="">auto</a><br class="">> ==============================<wbr class="">==============================<wbr class="">==================<br class="">> --- llvm/trunk/test/CodeGen/ARM/<wbr class="">dbg-range-extension.mir (added)<br class="">> +++ llvm/trunk/test/CodeGen/ARM/<wbr class="">dbg-range-extension.mir Tue Sep 27 11:46:07 2016<br class="">> @@ -0,0 +1,282 @@<br class="">> +# RUN: llc -mtriple=arm-eabi -run-pass=livedebugvalues %s -o - | FileCheck %s<br class="">> +#<br class="">> +# Check that the debug information for variables are propagated into the correct blocks.<br class="">> +#<br class="">> +# Generated from the C source:<br class="">> +#<br class="">> +# int func2(int,  int);<br class="">> +# void func(int a) {<br class="">> +#   int b = func2(10, 11);<br class="">> +#   if (a) {<br class="">> +#     int c = func2(12, 13);<br class="">> +#     for(int i = 1; i < a; i++) {<br class="">> +#       func2(i, i+b);<br class="">> +#     }<br class="">> +#     func2(b,c);<br class="">> +#   }<br class="">> +#   func2(b,a);<br class="">> +# }<br class="">> +<br class="">> +# CHECK: [[VAR_A:![0-9]+]] = !DILocalVariable(name: "a",<br class="">> +# CHECK: [[VAR_B:![0-9]+]] = !DILocalVariable(name: "b",<br class="">> +# CHECK: [[VAR_C:![0-9]+]] = !DILocalVariable(name: "c",<br class="">> +# CHECK: [[VAR_I:![0-9]+]] = !DILocalVariable(name: "i",<br class="">> +<br class="">> +# CHECK: bb.0.entry<br class="">> +# CHECK: DBG_VALUE debug-use %r0, debug-use _, [[VAR_A]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_A:%r[0-9]+]], debug-use _, [[VAR_A]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_B:%r[0-9]+]], debug-use _, [[VAR_B]]<br class="">> +<br class="">> +# CHECK: bb.1.if.then<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_B]], debug-use _, [[VAR_B]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_A]], debug-use _, [[VAR_A]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_C:%r[0-9]+]], debug-use _, [[VAR_C]]<br class="">> +# CHECK: DBG_VALUE 1, 0, [[VAR_I]]<br class="">> +<br class="">> +# CHECK: bb.2.for.body<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_I:%r[0-9]+]], debug-use _, [[VAR_I]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_C]], debug-use _, [[VAR_C]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_B]], debug-use _, [[VAR_B]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_A]], debug-use _, [[VAR_A]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_I]], debug-use _, [[VAR_I]]<br class="">> +<br class="">> +# CHECK: bb.3.for.cond<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_C]], debug-use _, [[VAR_C]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_B]], debug-use _, [[VAR_B]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_A]], debug-use _, [[VAR_A]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_I]], debug-use _, [[VAR_I]]<br class="">> +<br class="">> +# CHECK: bb.4.for.cond.cleanup<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_I]], debug-use _, [[VAR_I]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_C]], debug-use _, [[VAR_C]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_B]], debug-use _, [[VAR_B]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_A]], debug-use _, [[VAR_A]]<br class="">> +<br class="">> +# CHECK: bb.5.if.end<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_B]], debug-use _, [[VAR_B]]<br class="">> +# CHECK: DBG_VALUE debug-use [[REG_A]], debug-use _, [[VAR_A]]<br class="">> +--- |<br class="">> +  ; ModuleID = '/data/kwalker/work/<wbr class="">OpenSource-llvm/llvm/test/<wbr class="">CodeGen/ARM/dbg-range-<wbr class="">extension.ll'<br class="">> +  source_filename = "/data/kwalker/work/<wbr class="">OpenSource-llvm/llvm/test/<wbr class="">CodeGen/ARM/dbg-range-<wbr class="">extension.ll"<br class="">> +  target datalayout = "e-m:e-p:32:32-i64:64-v128:64:<wbr class="">128-a:0:32-n32-S64"<br class="">> +  target triple = "arm---eabi"<br class="">> +<br class="">> +  ; Function Attrs: minsize nounwind optsize<br class="">> +  define void @func(i32 %a) local_unnamed_addr #0 !dbg !8 {<br class="">> +  entry:<br class="">> +    tail call void @llvm.dbg.value(metadata i32 %a, i64 0, metadata !13, metadata !20), !dbg !21<br class="">> +    %call = tail call i32 @func2(i32 10, i32 11) #0, !dbg !22<br class="">> +    tail call void @llvm.dbg.value(metadata i32 %call, i64 0, metadata !14, metadata !20), !dbg !23<br class="">> +    %tobool = icmp eq i32 %a, 0, !dbg !24<br class="">> +    br i1 %tobool, label %if.end, label %if.then, !dbg !25<br class="">> +<br class="">> +  if.then:                                          ; preds = %entry<br class="">> +    %call1 = tail call i32 @func2(i32 12, i32 13) #0, !dbg !26<br class="">> +    tail call void @llvm.dbg.value(metadata i32 %call1, i64 0, metadata !15, metadata !20), !dbg !27<br class="">> +    tail call void @llvm.dbg.value(metadata i32 1, i64 0, metadata !18, metadata !20), !dbg !28<br class="">> +    br label %for.cond, !dbg !29<br class="">> +<br class="">> +  for.cond:                                         ; preds = %for.body, %if.then<br class="">> +    %i.0 = phi i32 [ 1, %if.then ], [ %inc, %for.body ]<br class="">> +    tail call void @llvm.dbg.value(metadata i32 %i.0, i64 0, metadata !18, metadata !20), !dbg !28<br class="">> +    %cmp = icmp slt i32 %i.0, %a, !dbg !30<br class="">> +    br i1 %cmp, label %for.body, label %for.cond.cleanup, !dbg !33<br class="">> +<br class="">> +  for.cond.cleanup:                                 ; preds = %for.cond<br class="">> +    %call3 = tail call i32 @func2(i32 %call, i32 %call1) #0, !dbg !34<br class="">> +    br label %if.end, !dbg !35<br class="">> +<br class="">> +  for.body:                                         ; preds = %for.cond<br class="">> +    %0 = add i32 %call, %i.0, !dbg !36<br class="">> +    %call2 = tail call i32 @func2(i32 %i.0, i32 %0) #0, !dbg !36<br class="">> +    %inc = add nuw nsw i32 %i.0, 1, !dbg !38<br class="">> +    tail call void @llvm.dbg.value(metadata i32 %inc, i64 0, metadata !18, metadata !20), !dbg !28<br class="">> +    br label %for.cond, !dbg !40, !llvm.loop !41<br class="">> +<br class="">> +  if.end:                                           ; preds = %for.cond.cleanup, %entry<br class="">> +    %call4 = tail call i32 @func2(i32 %call, i32 %a) #0, !dbg !43<br class="">> +    ret void, !dbg !44<br class="">> +  }<br class="">> +<br class="">> +  ; Function Attrs: minsize optsize<br class="">> +  declare i32 @func2(i32, i32) local_unnamed_addr #1<br class="">> +<br class="">> +  ; Function Attrs: nounwind readnone<br class="">> +  declare void @llvm.dbg.value(metadata, i64, metadata, metadata) #2<br class="">> +<br class="">> +  ; Function Attrs: nounwind<br class="">> +  declare void @llvm.stackprotector(i8*, i8**) #3<br class="">> +<br class="">> +  attributes #0 = { minsize nounwind optsize }<br class="">> +  attributes #1 = { minsize optsize }<br class="">> +  attributes #2 = { nounwind readnone }<br class="">> +  attributes #3 = { nounwind }<br class="">> +<br class="">> +  !<a href="http://llvm.dbg.cu/" rel="noreferrer" target="_blank" class="">llvm.dbg.cu</a><span class="Apple-converted-space"> </span>= !{!0}<br class="">> +  !llvm.module.flags = !{!3, !4, !5, !6}<br class="">> +  !llvm.ident = !{!7}<br class="">> +<br class="">> +  !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)<br class="">> +  !1 = !DIFile(filename: "loop.c", directory: "/tmp")<br class="">> +  !2 = !{}<br class="">> +  !3 = !{i32 2, !"Dwarf Version", i32 4}<br class="">> +  !4 = !{i32 2, !"Debug Info Version", i32 3}<br class="">> +  !5 = !{i32 1, !"wchar_size", i32 4}<br class="">> +  !6 = !{i32 1, !"min_enum_size", i32 4}<br class="">> +  !7 = !{!"clang version 4.0.0 (<a href="http://llvm.org/git/clang.git" rel="noreferrer" target="_blank" class="">http://llvm.org/git/clang.git</a><span class="Apple-converted-space"> </span>b8f10df3679b36f51e1de7c4351b82<wbr class="">d297825089) (<a href="http://llvm.org/git/llvm.git" rel="noreferrer" target="_blank" class="">http://llvm.org/git/llvm.git</a><span class="Apple-converted-space"> </span>c2a5d16d1e3b8c49f5bbb1ff87a76a<wbr class="">c4f88edb89)"}<br class="">> +  !8 = distinct !DISubprogram(name: "func", scope: !1, file: !1, line: 2, type: !9, isLocal: false, isDefinition: true, scopeLine: 2, flags: DIFlagPrototyped, isOptimized: true, unit: !0, variables: !12)<br class="">> +  !9 = !DISubroutineType(types: !10)<br class="">> +  !10 = !{null, !11}<br class="">> +  !11 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)<br class="">> +  !12 = !{!13, !14, !15, !18}<br class="">> +  !13 = !DILocalVariable(name: "a", arg: 1, scope: !8, file: !1, line: 2, type: !11)<br class="">> +  !14 = !DILocalVariable(name: "b", scope: !8, file: !1, line: 3, type: !11)<br class="">> +  !15 = !DILocalVariable(name: "c", scope: !16, file: !1, line: 5, type: !11)<br class="">> +  !16 = distinct !DILexicalBlock(scope: !17, file: !1, line: 4, column: 9)<br class="">> +  !17 = distinct !DILexicalBlock(scope: !8, file: !1, line: 4, column: 6)<br class="">> +  !18 = !DILocalVariable(name: "i", scope: !19, file: !1, line: 6, type: !11)<br class="">> +  !19 = distinct !DILexicalBlock(scope: !16, file: !1, line: 6, column: 3)<br class="">> +  !20 = !DIExpression()<br class="">> +  !21 = !DILocation(line: 2, column: 15, scope: !8)<br class="">> +  !22 = !DILocation(line: 3, column: 17, scope: !8)<br class="">> +  !23 = !DILocation(line: 3, column: 13, scope: !8)<br class="">> +  !24 = !DILocation(line: 4, column: 6, scope: !17)<br class="">> +  !25 = !DILocation(line: 4, column: 6, scope: !8)<br class="">> +  !26 = !DILocation(line: 5, column: 11, scope: !16)<br class="">> +  !27 = !DILocation(line: 5, column: 7, scope: !16)<br class="">> +  !28 = !DILocation(line: 6, column: 11, scope: !19)<br class="">> +  !29 = !DILocation(line: 6, column: 7, scope: !19)<br class="">> +  !30 = !DILocation(line: 6, column: 20, scope: !31)<br class="">> +  !31 = !DILexicalBlockFile(scope: !32, file: !1, discriminator: 1)<br class="">> +  !32 = distinct !DILexicalBlock(scope: !19, file: !1, line: 6, column: 3)<br class="">> +  !33 = !DILocation(line: 6, column: 3, scope: !31)<br class="">> +  !34 = !DILocation(line: 9, column: 3, scope: !16)<br class="">> +  !35 = !DILocation(line: 10, column: 2, scope: !16)<br class="">> +  !36 = !DILocation(line: 7, column: 4, scope: !37)<br class="">> +  !37 = distinct !DILexicalBlock(scope: !32, file: !1, line: 6, column: 30)<br class="">> +  !38 = !DILocation(line: 6, column: 26, scope: !39)<br class="">> +  !39 = !DILexicalBlockFile(scope: !32, file: !1, discriminator: 3)<br class="">> +  !40 = !DILocation(line: 6, column: 3, scope: !39)<br class="">> +  !41 = distinct !{!41, !42}<br class="">> +  !42 = !DILocation(line: 6, column: 3, scope: !16)<br class="">> +  !43 = !DILocation(line: 11, column: 2, scope: !8)<br class="">> +  !44 = !DILocation(line: 12, column: 1, scope: !8)<br class="">> +<br class="">> +...<br class="">> +---<br class="">> +name:            func<br class="">> +alignment:       2<br class="">> +exposesReturnsTwice: false<br class="">> +legalized:       false<br class="">> +regBankSelected: false<br class="">> +selected:        false<br class="">> +tracksRegLiveness: false<br class="">> +liveins:<br class="">> +  - { reg: '%r0' }<br class="">> +calleeSavedRegisters: [ '%lr', '%d8', '%d9', '%d10', '%d11', '%d12', '%d13',<br class="">> +                        '%d14', '%d15', '%q4', '%q5', '%q6', '%q7', '%r4',<br class="">> +                        '%r5', '%r6', '%r7', '%r8', '%r9', '%r10', '%r11',<br class="">> +                        '%s16', '%s17', '%s18', '%s19', '%s20', '%s21',<br class="">> +                        '%s22', '%s23', '%s24', '%s25', '%s26', '%s27',<br class="">> +                        '%s28', '%s29', '%s30', '%s31', '%d8_d10', '%d9_d11',<br class="">> +                        '%d10_d12', '%d11_d13', '%d12_d14', '%d13_d15',<br class="">> +                        '%q4_q5', '%q5_q6', '%q6_q7', '%q4_q5_q6_q7', '%r4_r5',<br class="">> +                        '%r6_r7', '%r8_r9', '%r10_r11', '%d8_d9_d10', '%d9_d10_d11',<br class="">> +                        '%d10_d11_d12', '%d11_d12_d13', '%d12_d13_d14',<br class="">> +                        '%d13_d14_d15', '%d8_d10_d12', '%d9_d11_d13', '%d10_d12_d14',<br class="">> +                        '%d11_d13_d15', '%d8_d10_d12_d14', '%d9_d11_d13_d15',<br class="">> +                        '%d9_d10', '%d11_d12', '%d13_d14', '%d9_d10_d11_d12',<br class="">> +                        '%d11_d12_d13_d14' ]<br class="">> +frameInfo:<br class="">> +  isFrameAddressTaken: false<br class="">> +  isReturnAddressTaken: false<br class="">> +  hasStackMap:     false<br class="">> +  hasPatchPoint:   false<br class="">> +  stackSize:       24<br class="">> +  offsetAdjustment: 0<br class="">> +  maxAlignment:    4<br class="">> +  adjustsStack:    true<br class="">> +  hasCalls:        true<br class="">> +  maxCallFrameSize: 0<br class="">> +  hasOpaqueSPAdjustment: false<br class="">> +  hasVAStart:      false<br class="">> +  hasMustTailInVarArgFunc: false<br class="">> +stack:<br class="">> +  - { id: 0, type: spill-slot, offset: -4, size: 4, alignment: 4, callee-saved-register: '%lr' }<br class="">> +  - { id: 1, type: spill-slot, offset: -8, size: 4, alignment: 4, callee-saved-register: '%r11' }<br class="">> +  - { id: 2, type: spill-slot, offset: -12, size: 4, alignment: 4, callee-saved-register: '%r7' }<br class="">> +  - { id: 3, type: spill-slot, offset: -16, size: 4, alignment: 4, callee-saved-register: '%r6' }<br class="">> +  - { id: 4, type: spill-slot, offset: -20, size: 4, alignment: 4, callee-saved-register: '%r5' }<br class="">> +  - { id: 5, type: spill-slot, offset: -24, size: 4, alignment: 4, callee-saved-register: '%r4' }<br class="">> +body:             |<br class="">> +  bb.0.entry:<br class="">> +    successors: %bb.5.if.end, %bb.1.if.then<br class="">> +    liveins: %r0, %r4, %r5, %r6, %r7, %r11, %lr<br class="">> +<br class="">> +    %sp = frame-setup STMDB_UPD %sp, 14, _, killed %r4, killed %r5, killed %r6, killed %r7, killed %r11, killed %lr<br class="">> +    frame-setup CFI_INSTRUCTION def_cfa_offset 24<br class="">> +    frame-setup CFI_INSTRUCTION offset %lr, -4<br class="">> +    frame-setup CFI_INSTRUCTION offset %r11, -8<br class="">> +    frame-setup CFI_INSTRUCTION offset %r7, -12<br class="">> +    frame-setup CFI_INSTRUCTION offset %r6, -16<br class="">> +    frame-setup CFI_INSTRUCTION offset %r5, -20<br class="">> +    frame-setup CFI_INSTRUCTION offset %r4, -24<br class="">> +    DBG_VALUE debug-use %r0, debug-use _, !13, !20, debug-location !21<br class="">> +    %r4 = MOVr killed %r0, 14, _, _<br class="">> +    DBG_VALUE debug-use %r4, debug-use _, !13, !20, debug-location !21<br class="">> +    %r0 = MOVi 10, 14, _, _, debug-location !22<br class="">> +    %r1 = MOVi 11, 14, _, _, debug-location !22<br class="">> +    BL @func2, csr_aapcs, implicit-def dead %lr, implicit %sp, implicit killed %r0, implicit killed %r1, implicit-def %sp, implicit-def %r0, debug-location !22<br class="">> +    %r5 = MOVr killed %r0, 14, _, _, debug-location !22<br class="">> +    DBG_VALUE debug-use %r5, debug-use _, !14, !20, debug-location !23<br class="">> +    CMPri %r4, 0, 14, _, implicit-def %cpsr, debug-location !25<br class="">> +    Bcc %bb.5.if.end, 0, killed %cpsr<br class="">> +<br class="">> +  bb.1.if.then:<br class="">> +    successors: %bb.3.for.cond<br class="">> +    liveins: %r4, %r5<br class="">> +<br class="">> +    %r0 = MOVi 12, 14, _, _, debug-location !26<br class="">> +    %r1 = MOVi 13, 14, _, _, debug-location !26<br class="">> +    BL @func2, csr_aapcs, implicit-def dead %lr, implicit %sp, implicit killed %r0, implicit killed %r1, implicit-def %sp, implicit-def %r0, debug-location !26<br class="">> +    %r6 = MOVr killed %r0, 14, _, _, debug-location !26<br class="">> +    DBG_VALUE debug-use %r6, debug-use _, !15, !20, debug-location !27<br class="">> +    %r7 = MOVi 1, 14, _, _<br class="">> +    DBG_VALUE 1, 0, !18, !20, debug-location !28<br class="">> +    B %bb.3.for.cond<br class="">> +<br class="">> +  bb.2.for.body:<br class="">> +    successors: %bb.3.for.cond<br class="">> +    liveins: %r4, %r5, %r6, %r7<br class="">> +<br class="">> +    %r1 = ADDrr %r5, %r7, 14, _, _, debug-location !36<br class="">> +    %r0 = MOVr %r7, 14, _, _, debug-location !36<br class="">> +    BL @func2, csr_aapcs, implicit-def dead %lr, implicit %sp, implicit killed %r0, implicit killed %r1, implicit-def %sp, implicit-def dead %r0, debug-location !36<br class="">> +    %r7 = ADDri killed %r7, 1, 14, _, _, debug-location !38<br class="">> +    DBG_VALUE debug-use %r7, debug-use _, !18, !20, debug-location !28<br class="">> +<br class="">> +  bb.3.for.cond:<br class="">> +    successors: %bb.2.for.body, %bb.4.for.cond.cleanup<br class="">> +    liveins: %r4, %r5, %r6, %r7<br class="">> +<br class="">> +    DBG_VALUE debug-use %r7, debug-use _, !18, !20, debug-location !28<br class="">> +    CMPrr %r7, %r4, 14, _, implicit-def %cpsr, debug-location !33<br class="">> +    Bcc %bb.2.for.body, 11, killed %cpsr, debug-location !33<br class="">> +<br class="">> +  bb.4.for.cond.cleanup:<br class="">> +    successors: %bb.5.if.end<br class="">> +    liveins: %r4, %r5, %r6<br class="">> +<br class="">> +    %r0 = MOVr %r5, 14, _, _, debug-location !34<br class="">> +    %r1 = MOVr killed %r6, 14, _, _, debug-location !34<br class="">> +    BL @func2, csr_aapcs, implicit-def dead %lr, implicit %sp, implicit killed %r0, implicit killed %r1, implicit-def %sp, implicit-def dead %r0, debug-location !34<br class="">> +<br class="">> +  bb.5.if.end:<br class="">> +    liveins: %r4, %r5<br class="">> +<br class="">> +    %r0 = MOVr killed %r5, 14, _, _, debug-location !43<br class="">> +    %r1 = MOVr killed %r4, 14, _, _, debug-location !43<br class="">> +    %sp = LDMIA_UPD %sp, 14, _, def %r4, def %r5, def %r6, def %r7, def %r11, def %lr, debug-location !43<br class="">> +    TAILJMPd @func2, implicit %sp, implicit %sp, implicit killed %r0, implicit killed %r1, debug-location !43<br class="">> +<br class="">> +...<br class="">><br class="">><br class="">> ______________________________<wbr class="">_________________<br class="">> llvm-commits mailing list<br class="">><span class="Apple-converted-space"> </span><a href="mailto:llvm-commits@lists.llvm.org" class="">llvm-commits@lists.llvm.org</a><br class="">><span class="Apple-converted-space"> </span><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/<wbr class="">mailman/listinfo/llvm-commits</a></blockquote></div></div></div></div></blockquote></div></blockquote></div><br class=""></body></html>