LLVM IR SDK

LLVM IR SDK is a rich LLVM IR editor plugin for Eclipse

Download and Installation

Initial Installation

Requirements:
  1. Java 1.6 or newer.
  2. Eclipse 3.8 or newer (any package). See below if you have an older Eclipse version.
Eclipse update site: http://amishne.github.com/llvm-ir-editor/update
Click here if not familiar with the Eclipse plugin installation procedure.

Updating to a Newer Version

From inside Eclipse, select Help → Check for Updates.

Features

Syntax Highlighting

Syntax highlighting which is aware of the semantic differences between elements that syntactically appear the same (e.g. basic block references and parameter references).


More information Less information

Aware of the complex type system


Fully configurable


Configured via a simple GUI dialog

Showing Definitions On Hovers

Hovering over value references shows their entire definition in a handy popup


More information Less information

Also works for basic blocks and functions (with scrollbars if necessary)


Also works for named user-defined types


Also works for (some) keywords

Inferring Anonymous Element Names

The editor can autonomously infer the names of anonymous values


More information Less information

Also identifies and can offer fixes for out-of-sequence names


Occurrence Marking

Occurrence highlighting marks the definition and all the references for the value under the cursor, with a different color for the definition. This is an optional feature and is easily toggled with a toolbar button.

File Outline and Folding

An outline of the current file can be displayed side-by-side with the code, with two-way linking between the element under the cursor and the element selected in the outline view.


More information Less information

The same hierarchy can be used to "fold" function bodies and basic blocks to only appear on one line, to save screen space


Type Checking

Verifies that every usage of a value is correct according to its type.


Syntax Checking

Provides basic syntax error checking, identifying malformed files.


More information Less information

Also provides useful hints for some syntax errors.


Content Assist

Ctrl+space opens a context-aware popup box with value suggestions


More information Less information

Will not suggest values outside the current scope


Also works for non-value syntactic elements, such as instruction opcodes


Per-Instruction Validation

Every instruction has its own validation check to verify it is being used legally


More information Less information

With some of the validation checks, such as for phi nodes, extending beyond simple type checks


Control Flow Awareness

The editor is aware of the flow between basic blocks and can provide warnings and errors for problem in that flow, for example for a non-dominated use.


More information Less information

With special rules for phi nodes


And providing warnings for unreachable basic blocks


Quickfix for Common Code Insertion

For example, a quickfix option can generate function declarations directly from function calls.


More information Less information

Another quickfix option can insert conversion for incorrect types


Unused Values Detection

Unused values generate warnings.


More information Less information

Also works for unused parameter


FAQ

Is this plugin free to use?

Yes, it is completely free to use (as well as to modify - it's an open-source project).

Does this require an installation of LLVM?

No, it is completely independent, the only requirements are the ones listed above in the installation section.

If the editor reports an error, does this mean this won't be accepted by LLVM? If it doesn't, does it mean it will?

Although it is not guaranteed, the purpose of this plugin is to get as close as possible to this state from both directions.

Which version of the IR is this editor compatible with?

The editor is compatible with the IR of versions 3.2 to 3.4.

How stable is this plugin? How robust for handling large files?

This project is in beta phase, and the editor does occasionally produce an error dialog or hang for a few seconds, particularly when editing files (as opposed to just reading them). If this happens to you, please open a bug about it.
The editor's performance depends on the machine, but it can get sluggish when operating on files with thousands of lines.

Do I really have to install Java and Eclipse for this editor?

Yes, this plugin is deeply integrated with Eclipse, which in turn requires Java. However:
  1. Neither Java nor Eclipse require actual installation, they can just be uncompressed somewhere and executed there.
  2. It's possible to download the relatively-lightweight Eclipse Platform Runtime Binary and install the plugin on top of it, no need for one of the packaged versions.

Can I install this plugin on Eclipse versions earlier than 3.8?

You should be able to install it on Eclipse 3.5 or later, but you have to manually add this additional update site first (via Preferences → Install/Update → Available Software Sites → Add...): http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/.

I've found a bug!

Please first check the open issue list and verify it isn't already there. If it isn't, please either open an issue on Github or send an e-mail to the maintainer (first_name.last_name@company.com, where first_name, last_name and company are listed on the github user page).

The quality of the project will never improve if no bugs are reported, so if you find it useful please open bug reports for every little problem you encounter.

I'd like to request a feature.

Please first check the open issue list and verify it isn't already there. If it isn't, please either open an issue on Github or send an e-mail to the maintainer (first_name.last_name@company.com, where first_name, last_name and company are listed on the github user page).

I've installed the plugin succesfully, but it doesn't seem to be working at all!

Make sure your Eclipse is running on top of Java 1.6 or newer. Here are instructions on how to select a vm, and here's how to edit eclipse.ini to always select a given vm.

I've installed the plugin succesfully and I'm running Java 1.6 or newer, but .ll files still open with a different editor.

Your .ll files might be associated with another editor in Eclipse. Right-click an .ll file and select "open with → llvm ir editor".

Developers

Visit the Github site for source code, issue list and developer FAQ.
Fork me on GitHub