<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/59213>59213</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            opt-viewer.py mark parts of the line
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ibogosavljevic
      </td>
    </tr>
</table>

<pre>
    Currently, when compiler optimization reports is generated using `-fsave-optimization-record` and fed into `opt-viewer.py` tool, the tool shows only the line number of the `DebugLoc`, not the part of the line.

For example, the information in the `.yaml` file is like this:
```
Pass:            gvn
Name:            LoadClobbered
DebugLoc:        { File: compiler-optimizations.cpp, Line: 208, Column: 14 }
Function:        _Z20test_pointeraliasingP6string
Args:
  - String:          'load of type '
  - Type:            'i8*'
  - String:          ' not eliminated'
  - String:          ' because it is clobbered by '
  - ClobberedBy:     store
    DebugLoc:        { File: compiler-optimizations.cpp, Line: 208, Column: 19 }
```

And `opt-viewer.py` generates the following text: `load of type i8* not eliminated because it is clobbered by store`. But the information is missing the column part, i.e. column 14 for the eliminated load and column 19 for the eliminated store. The line information is present there, but not the column information.

It would be very useful to mark this somehow. For example, instead of printing `+ load of type i8* not eliminated because it is clobbered by store`, where `+` and `store` are hyperlinks. When the user clicks the hyperlink, some kind of marker appears to mark that place (e.g. flashing cursor).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1VVmL4zgQ_jX2i4jxkcsPfuikaRholoEdWNiXQbbLtiayZCQ5Ge-v3yo57hzbLPuwE0Isq746vrpS6noqjqMxoJycgvTILh0oVul-EBIM04MTvfiLO6EVMzBo4ywTlrWgwHAHNRutUC0LtvGqsfwMq3uNlYFKmxqFjKuaNQgXymlCI2x1FnABEw0TAZzWkvy7DvyZ2U5fLNNKTv5OCgVMjX1JUTX-CtVeoRzbd13hkZSVdl4ycOMWFClGQfwaxC_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