<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>I have a Vim plugin that does basically the same thing. It would just be nice to have it in something like Godbolt so you can share with others (and especially if it can highlight the SIL corresponding with a given line like it does for assembly).<br></div>
<div><br></div>
<div>-Kevin Ballard<br></div>
<div><br></div>
<div>On Fri, Jun 23, 2017, at 01:35 AM, Alex Blewitt wrote:<br></div>
<blockquote type="cite"><div>If you're interested in just having a look at SIL output, then I put a very basic GUI wrapper around invocations of swiftc -emit-sil and friends:<br></div>
<div><br></div>
<div><a href="https://github.com/alblue/SILInspector">https://github.com/alblue/SILInspector</a><br></div>
<div><br></div>
<div>It also supports piping them through the demangler and whether or not to enable optimisations, so you can see the effect of the options on the generated code. In addition, it prints out the command that is run at the bottom so you can do the same yourself outside of the GUI.<br></div>
<div><br></div>
<div>Alex<br></div>
<div><div><br></div>
<div><blockquote type="cite"><div>On 23 Jun 2017, at 02:58, Kevin Ballard via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>&gt; wrote:<br></div>
<div><br></div>
<div><div><div>That's pretty cool.<br></div>
<div><br></div>
<div>Any plans on adding support for looking at the SIL output?<br></div>
<div><br></div>
<div>-Kevin Ballard<br></div>
<div><br></div>
<div>On Thu, Jun 22, 2017, at 10:24 AM, Adam Nemecek via swift-evolution wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div>Howdy,<br></div>
<div>Matt Godbolt and I have added Swift support to his compiler explorer project<br></div>
<div><br></div>
<div><a href="https://swift.godbolt.org/">https://swift.godbolt.org/</a><br></div>
<div><br></div>
<div>It let's you interactively explore assembly emitted by the Swift compiler.&nbsp;<br></div>
<div><br></div>
<div>Right now, if you want the compiler to emit Intel syntax instructions, pass "-emit-assembly -Xllvm --x86-asm-syntax=intel" to the compiler as a command line argument in the text field in the top right corner.<br></div>
<div><br></div>
<div>Note that right now it's might still be kinda rough around the edges.<br></div>
<div><br></div>
<div>You can contribute to the project here&nbsp;<a href="https://github.com/mattgodbolt/compiler-explorer">https://github.com/mattgodbolt/compiler-explorer</a><br></div>
<div><br></div>
<div>Adam<br></div>
</div>
<div><u>_______________________________________________</u><br></div>
<div>swift-evolution mailing list<br></div>
<div><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br></div>
<div><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br></div>
</blockquote><div><br></div>
</div>
<div>_______________________________________________<br></div>
<div>swift-evolution mailing list<br></div>
<div><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br></div>
<div>https://lists.swift.org/mailman/listinfo/swift-evolution<br></div>
</div>
</blockquote></div>
</div>
</blockquote><div><br></div>
</body>
</html>