[Announcement] Godbolt Compiler Explorer adds Swift support

Howdy,
Matt Godbolt and I have added Swift support to his compiler explorer project

It let's you interactively explore assembly emitted by the Swift compiler.

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.

Note that right now it's might still be kinda rough around the edges.

You can contribute to the project here

Adam

Awesome! :)

3.1.1 is a great start — any plans to include recent nightly builds of the
compiler, similar to IBM's Swift Sandbox
<https://swift.sandbox.bluemix.net/&gt;?

···

On Thu, Jun 22, 2017 at 10:24 AM, Adam Nemecek via swift-evolution < swift-evolution@swift.org> wrote:

Howdy,
Matt Godbolt and I have added Swift support to his compiler explorer
project

https://swift.godbolt.org/

It let's you interactively explore assembly emitted by the Swift compiler.

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.

Note that right now it's might still be kinda rough around the edges.

You can contribute to the project here MattGo (Mathieu Gautier) · GitHub
dbolt/compiler-explorer

Adam

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

This is really cool! I second Jacob’s request for nightlies.

Many things in the Swift compiler are architected similarly to Clang (inspired by Clang), so hopefully any features the explorer can do for C++ it could do for Swift as well. The swift compiler dump ASTs similarly to Clang with e.g. -dump-ast. I’m not sure what “Show optimization output” is supposed to do, as I can’t seem to make it work even for C++ using Clang, but swiftc also supports emitting SIL and LLVM IR.

···

On Jun 22, 2017, at 10:24 AM, Adam Nemecek via swift-evolution <swift-evolution@swift.org> wrote:

Howdy,
Matt Godbolt and I have added Swift support to his compiler explorer project

https://swift.godbolt.org/

It let's you interactively explore assembly emitted by the Swift compiler.

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.

Note that right now it's might still be kinda rough around the edges.

You can contribute to the project here GitHub - compiler-explorer/compiler-explorer: Run compilers interactively from your web browser and interact with the assembly

Adam
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

That's pretty cool.

Any plans on adding support for looking at the SIL output?

-Kevin Ballard

On Thu, Jun 22, 2017, at 10:24 AM, Adam Nemecek via swift-evolution wrote:> Howdy,

···

Matt Godbolt and I have added Swift support to his compiler
explorer project>
https://swift.godbolt.org/

It let's you interactively explore assembly emitted by the Swift
compiler.>
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.>
Note that right now it's might still be kinda rough around the edges.>
You can contribute to the project here
https://github.com/mattgodbolt/compiler-explorer&gt;
Adam
_________________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

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:

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.

Alex

···

On 23 Jun 2017, at 02:58, Kevin Ballard via swift-evolution <swift-evolution@swift.org> wrote:

That's pretty cool.

Any plans on adding support for looking at the SIL output?

-Kevin Ballard

On Thu, Jun 22, 2017, at 10:24 AM, Adam Nemecek via swift-evolution wrote:

Howdy,
Matt Godbolt and I have added Swift support to his compiler explorer project

https://swift.godbolt.org/

It let's you interactively explore assembly emitted by the Swift compiler.

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.

Note that right now it's might still be kinda rough around the edges.

You can contribute to the project here GitHub - compiler-explorer/compiler-explorer: Run compilers interactively from your web browser and interact with the assembly

Adam
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org <mailto:swift-evolution@swift.org>
https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

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).
-Kevin Ballard

···

On Fri, Jun 23, 2017, at 01:35 AM, Alex Blewitt wrote:

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:>
GitHub - alblue/SILInspector: An application for experimenting with Swift's Intermediate Language

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.>
Alex

On 23 Jun 2017, at 02:58, Kevin Ballard via swift-evolution <swift- >> evolution@swift.org> wrote:>>
That's pretty cool.

Any plans on adding support for looking at the SIL output?

-Kevin Ballard

On Thu, Jun 22, 2017, at 10:24 AM, Adam Nemecek via swift-
evolution wrote:>>> Howdy,

Matt Godbolt and I have added Swift support to his compiler explorer
>>>
https://swift.godbolt.org/

It let's you interactively explore assembly emitted by the Swift
compiler.>>>
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.>>>
Note that right now it's might still be kinda rough around the
edges.>>>
You can contribute to the project here
https://github.com/mattgodbolt/compiler-explorer&gt;&gt;&gt;
Adam
_________________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution