[LLVMdev] Proposal: extended MDString syntax

Bob Wilson bob.wilson at apple.com
Sun Jun 30 21:44:11 PDT 2013


On Jun 27, 2013, at 3:22 PM, Dan Gohman <dan433584 at gmail.com> wrote:
> 
> This is an interesting point. I tend to think of CodeGen as being an analysis of LLVM IR, and while it can diverge somewhat, the ways in which it diverges are usually constrained in some ways, and that leveraging information already available in LLVM IR was practical. However, In a world where CodeGen is doing things like restructuring loops, this seems less practical.

The work that we did last summer was assuming that IR is always available, but there’s nothing fundamental in the approach that requires that.  It just reflects the way code-gen works right now.

> 
> Bob, I look forward to seeing the patches you have.

I’ve attached four patches that should be good enough to give you a rough idea.  These were developed together with Bin Zeng during his internship at Apple last summer, but we couldn’t commit them at the time because yamlio wasn’t done.  I haven’t had a chance to update these since last summer, so I doubt if they build or even apply cleanly now.

The first 3 patches just set up the basic support for using yaml files, along with wiring up the -stop-after llc command-line option to control which passes are run.  See my earlier comments about that for more details.

The 4th patch adds the machine-level IR just using the existing “print” method.  You can look at the output but there’s no support in that patch for reading it back in.  Bin went on to implement a parser to handle that format, but I haven’t included his patches for that part because I’m not convinced that’s the right way to go.  We certainly want the machine instructions to be readable but a little more structure would be good.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130630/96c88ff5/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-CodeGenIRWriter.patch
Type: application/octet-stream
Size: 10167 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130630/96c88ff5/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130630/96c88ff5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Record-StopAfter.patch
Type: application/octet-stream
Size: 7159 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130630/96c88ff5/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130630/96c88ff5/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Rename-StopAfter.patch
Type: application/octet-stream
Size: 1356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130630/96c88ff5/attachment-0002.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130630/96c88ff5/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Add-MachineFunctions.patch
Type: application/octet-stream
Size: 3885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130630/96c88ff5/attachment-0003.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130630/96c88ff5/attachment-0004.html>


More information about the llvm-dev mailing list