David Glanzman
2014-Jul-28 15:12 UTC
[LLVMdev] What is the quality of code generated by llc's cpp target?
I've been examining code generated by llc's cpp target to get a handle on using llvm. I'm seeing a lot of new-ing without delete-ing, no use of smart pointers which iirc was approved on the mailing list a while back. I'm not %100 confident in my own knowledge of llvm, so I was wondering if the cpp target is a reasonable guide. Does it produce generally up-to-date use of the APIs or am I better off avoiding it all together? Thanks, David -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140728/688308c9/attachment.html>
Tim Northover
2014-Jul-28 15:42 UTC
[LLVMdev] What is the quality of code generated by llc's cpp target?
On 28 July 2014 16:12, David Glanzman <gland at seas.upenn.edu> wrote:> Does it produce generally up-to-date use of the APIs or am I better off avoiding it all together?Somewhere between the two. It's definitely not an example of the best way to use the LLVM API (I'd say). It doesn't even use IRBuilder, let alone smart pointers. Its output is primarily driven by the need to be procedurally generated, rather than sane. I wouldn't even be surprised if it didn't compile. But even so it can be helpful for relationships between instructions and to find out class and function names. Worth a try if the API docs don't give you an answer immediately, in my view. Cheers. Tim.