<div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Thanks, that was a really helpful suggestion. If you're curious- here are some of the high cost areas:</div><div><br></div><div><span style="font-family:monospace,monospace">===-------------------------------------------------------------------------===<br>                                 DWARF Emission<br>===-------------------------------------------------------------------------===<br>  Total Execution Time: 2.0117 seconds (2.0185 wall clock)<br><br>   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---<br>   0.7977 ( 64.4%)   0.4517 ( 58.4%)   1.2494 ( 62.1%)   1.2557 ( 62.2%)  Debug Info Emission<br>   0.4383 ( 35.4%)   0.3221 ( 41.6%)   0.7603 ( 37.8%)   0.7608 ( 37.7%)  DWARF Exception Writer<br>   0.0019 (  0.2%)   0.0000 (  0.0%)   0.0019 (  0.1%)   0.0019 (  0.1%)  DWARF Debug Writer<br>   1.2379 (100.0%)   0.7738 (100.0%)   2.0117 (100.0%)   2.0185 (100.0%)  Total<br>===-------------------------------------------------------------------------===<br>                      ... Pass execution timing report ...<br>===-------------------------------------------------------------------------===<br>  Total Execution Time: 10.3340 seconds (10.3289 wall clock)<br><br>   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---<br>   2.4747 ( 31.5%)   1.6998 ( 68.5%)   4.1744 ( 40.4%)   4.1745 ( 40.4%)  X86 Assembly Printer<br>   2.3159 ( 29.5%)   0.0103 (  0.4%)   2.3262 ( 22.5%)   2.3262 ( 22.5%)  Coroutine Splitting<br>   1.4348 ( 18.3%)   0.4092 ( 16.5%)   1.8440 ( 17.8%)   1.8428 ( 17.8%)  X86 DAG->DAG Instruction Selection<br>   0.1875 (  2.4%)   0.0384 (  1.5%)   0.2259 (  2.2%)   0.2252 (  2.2%)  Fast Register Allocator</span><br></div><div><br></div><div><br></div><div>I'm curious about the X86 Assembly Printer. What is it doing? The module in question has some inline assembly in it. So I would think that LLVM would parse it and then render it as machine code - at what point does it get printed?</div><div><br></div><div>As for Coroutine Splitting - is this about as fast as it will get? If not then what's the point of LLVM having coroutines? Frontends would be better off implementing coroutines on top of structs, like Rust does.<br></div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 11, 2018 at 9:01 PM Friedman, Eli <<a href="mailto:efriedma@codeaurora.org">efriedma@codeaurora.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_-2366245185200558050moz-cite-prefix">On 9/11/2018 5:48 PM, Andrew Kelley via
      llvm-dev wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">
          <div dir="ltr">
            <div><span style="font-family:monospace,monospace">Here is
                some timing information from running the Zig standard
                library tests:<br>
              </span></div>
            <div dir="ltr"><span style="font-family:monospace,monospace"><br>
              </span></div>
            <div dir="ltr"><span style="font-family:monospace,monospace">$
                ./zig test ../std/index.zig --enable-timing-info<br>
                                Name       Start         End   
                Duration     Percent<br>
                          Initialize      0.0000      0.0010     
                0.0010      0.0001<br>
                   Semantic Analysis      0.0010      0.9968     
                0.9958      0.1192<br>
                     Code Generation      0.9968      1.4000     
                0.4032      0.0483<br>
                    LLVM Emit Output      1.4000      8.1759     
                6.7760      0.8112<br>
                  Build Dependencies      8.1759      8.3341     
                0.1581      0.0189<br>
                           LLVM Link      8.3341      8.3530     
                0.0189      0.0023<br>
                               Total      0.0000      8.3530     
                8.3530      1.0000<br>
              </span></div>
            <div dir="ltr"><span style="font-family:monospace,monospace"><br>
              </span></div>
            <div><span style="font-family:monospace,monospace">81% of
                the time was spent waiting for LLVM to turn a Module
                into an object file. This is with optimizations off,
                FastISel, no module verification, etc.</span></div>
            <div><span style="font-family:monospace,monospace"><br>
              </span></div>
            <div><span style="font-family:monospace,monospace">How can I
                speed this up? Any tips or things to look into?</span></div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    First step is probably setting TimePassesIsEnabled to true and
    looking at the output.  It's hard to say where the time is going
    without any numbers.<br>
    <br>
    -Eli<br>
    <pre class="m_-2366245185200558050moz-signature" cols="72">-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
  </div>

</blockquote></div>