[llvm-dev] Rewriting opt-viewer in C++

Adam Nemet via llvm-dev llvm-dev at lists.llvm.org
Mon Nov 14 09:12:58 PST 2016


Again I am still undecided which way this should go but I was also wondering about the speed difference if we used the C-based parser in PyYAML (http://pyyaml.org/wiki/LibYAML <http://pyyaml.org/wiki/LibYAML>).

> On Nov 13, 2016, at 12:19 AM, Adam Nemet <anemet at apple.com> wrote:
> 
> Hi Bob,
> 
> I am glad you’re finding opt-viewer useful.  I am generally fine this being rewritten in C++.  The idea was that once the prototype proves itself to be useful this would be considered.
> 
> Do you have ideas how to get syntax highlighting implemented?  In Python, Pygments makes this easy.
> 
> Another usage model I was considering is for people who ssh to remote servers for their builds.  In this case it should be easy in Python to have  a simple HTTP server started in opt-viewer.
> 
> On the other hand, I am not sure if we have precedence to ship tools written in Python in LLVM so we may *have to* move. 
> 
> Adam
> 
>> On Nov 11, 2016, at 11:50 PM, Bob Haarman <llvm at inglorion.net <mailto:llvm at inglorion.net>> wrote:
>> 
>> Hi Adam,
>> 
>> Thank you for writing opt-viewer! I've been playing around with it and found it helps me understand what optimizations were performed, which were missed, and why, as well as easily navigate to the relevant code. Wanting to use it on larger projects, I found that it can take a while to analyze the optimization reports. Since there doesn't seem to be too much code in it yet, I figured it wouldn't be too much work to implement the same functionality in C++, which should give us a nice speedup compared to the current Python implementation. I have something that implements most of the functionality: the index page is generated and links to lines on source pages, which are also generated, but I haven't gotten to annotations on source pages yet. I expect to put up some code for review next week, but wanted to post here in case others are thinking along similar lines so we can hopefully avoid duplicating effort.
>> 
>> Cheers,
>> 
>> Bob
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161114/dc8df8bd/attachment-0001.html>


More information about the llvm-dev mailing list