llvm demo

Hi All,

One of possibly minor but a very cool things about LLVM has always
been the online demo on llvm.org.
Now that we have clang, I think it will be great if the demo allowed
to use it as C/C++ front-end.
This will be especially useful for testing what kind of C++ clang
accepts/can already handle.

Another nice thing would be for demo to accept llvm assembler source
(.ll), for example, to see what optimizations could do if one adds
some noalias/nocapture attribute in a strategically chosen place.
And while I'm dreaming, ability to manually specify optimization
passes manually would be great :slight_smile:

If you're wondering why don't I just install llvm and do whatever I
want with it, I did, of course. But sometimes I want to play with it
from a less capable device or from some PC I don't control, and that's
where the demo comes in handy.

Thanks in advance,
Eugene

Hi All,

One of possibly minor but a very cool things about LLVM has always
been the online demo on llvm.org.
Now that we have clang, I think it will be great if the demo allowed
to use it as C/C++ front-end.
This will be especially useful for testing what kind of C++ clang
accepts/can already handle.

I completely agree. There are lots of potential great enhancements for the demo page. The demo page now lives in llvm-www svn module, so if someone is interested in hacking on it, improvements would definitely be welcome! :slight_smile:

-Chris

Hi,

Here's a patch for online demo on llvm.org that
- Extends language selection to allow
  - A choice between clang and llvm-gcc
  - Entering llvm assembly directly (and uploading .ll and .bc files)
- Makes handling of uploaded files binary safe (mostly for bc files)
- Fixes code to produce valid xhtml 1.1
- Contains a lot of minor cleanup changes that make the patch big, sorry!

Should apply cleanly to trunk. I've tested it for a bit on my box, but
obviously someone needs to test it on llvm.org server to be sure that
it works properly.

Eugene

wwwdemo.diff (16.1 KB)

Eugene Toder wrote:

Hi,

Here's a patch for online demo on llvm.org that
- Extends language selection to allow
   - A choice between clang and llvm-gcc
   - Entering llvm assembly directly (and uploading .ll and .bc files)
- Makes handling of uploaded files binary safe (mostly for bc files)
- Fixes code to produce valid xhtml 1.1
- Contains a lot of minor cleanup changes that make the patch big, sorry!

Should apply cleanly to trunk. I've tested it for a bit on my box, but
obviously someone needs to test it on llvm.org server to be sure that
it works properly.

Hi Eugene. Have you looked at PR1440? There's a patch there which makes a number of changes that I'd like to apply first, but unfortunately when I did so it broke the demo page and without access to the logs I couldn't figure out why.

Sorry to cause a merge conflict, but I'd rather you iterated on top of that patch since it's already been reviewed and performs some refactoring of the demo script.