Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It may be possible, but it might not amount to much.</p> <p>You have to understand that the very goal of <a href="http://llvm.org/docs/Passes.html" rel="nofollow">optimizations</a> is to <em>alter the code</em> to make it better (by some metric); and alteration means that the resulting code may not be meaningfully mapped to source code afterwards.</p> <p>Some examples:</p> <ul> <li>Dead Code Elimination and the like will remove existing code, this mainly affect an attempt to place a breakpoint at a given source-line since there may not be code for that line</li> <li>Common Sub-Expression Elimination will create new temporary variables <em>out of the blue</em> to compute a sub-expression only once; those sub-expressions may have originally appeared in multiple expressions spread throughout the source code so the new instructions belong to multiple lines... or none at all</li> <li>Invariant Hoisting or Loop Rotation will change the order in which expressions are computed compared with the original source code so that you might see code executed at line 3 then 6 then 4, 5, 7...</li> <li>Loop Unrolling will copy/paste the body of a loop multiple times</li> </ul> <p>And of course, those are <em>local</em> to a function, you also to have to account for</p> <ul> <li>Function Inlining will copy paste the body of a function at the call site</li> <li>Function Merging will take two different functions and remove one of them, forwarding its calls to the other (because they have the same behavior, of course)</li> </ul> <p>After all that, is it even meaningful to try and reason in terms of source code ? No, not really. And of course I did not even account for the fact that all those transformations occurred on the Intermediate Representation and that the final emission of assembly code will scramble things even further (Strength Reduction, yeah!).</p> <p>Honestly, even if <code>addr2line</code> gives you some line, I would doubt its result... and then what is the point of asking in the first place ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload