#
d934cb88 |
| 24-Feb-2017 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Basic support for Wasm object file encoding.
With the "wasm32-unknown-unknown-wasm" triple, this allows writing out simple wasm object files, and is another step in a larger series tow
[WebAssembly] Basic support for Wasm object file encoding.
With the "wasm32-unknown-unknown-wasm" triple, this allows writing out simple wasm object files, and is another step in a larger series toward migrating from ELF to general wasm object support. Note that this code and the binary format itself is still experimental.
llvm-svn: 296190
show more ...
|
#
18eafb6c |
| 22-Feb-2017 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Add skeleton MC support for the Wasm container format
This just adds the basic skeleton for supporting a new object file format. All of the actual encoding will be implemented in follo
[WebAssembly] Add skeleton MC support for the Wasm container format
This just adds the basic skeleton for supporting a new object file format. All of the actual encoding will be implemented in followup patches.
Differential Revision: https://reviews.llvm.org/D26722
llvm-svn: 295803
show more ...
|
Revision tags: llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1 |
|
#
1b637458 |
| 07-Jan-2017 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Add a pass to create wrappers for function bitcasts.
WebAssembly requires caller and callee signatures to match exactly. In LLVM, there are a variety of circumstances where signatures
[WebAssembly] Add a pass to create wrappers for function bitcasts.
WebAssembly requires caller and callee signatures to match exactly. In LLVM, there are a variety of circumstances where signatures may be mismatched in practice, and one can bitcast a function address to another type to call it as that type. This patch adds a pass which replaces bitcasted function addresses with wrappers to replace the bitcasts.
This doesn't catch everything, but it does match many common cases.
llvm-svn: 291315
show more ...
|
Revision tags: llvmorg-3.9.1, llvmorg-3.9.1-rc3 |
|
#
66caac57 |
| 03-Dec-2016 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Eliminate an ad-hoc command-line argument.
Use the target triple to determine whether to run the explicit-locals pass, rather than using a separate command-line argument.
llvm-svn: 28
[WebAssembly] Eliminate an ad-hoc command-line argument.
Use the target triple to determine whether to run the explicit-locals pass, rather than using a separate command-line argument.
llvm-svn: 288602
show more ...
|
Revision tags: llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
4fc4e42d |
| 24-Oct-2016 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Add an option to make get_local/set_local explicit.
This patch adds a pass, controlled by an option and off by default for now, for making implicit get_local/set_local explicit. This s
[WebAssembly] Add an option to make get_local/set_local explicit.
This patch adds a pass, controlled by an option and off by default for now, for making implicit get_local/set_local explicit. This simplifies emitting wasm with MC.
Differential Revision: https://reviews.llvm.org/D25836
llvm-svn: 285009
show more ...
|
#
6f69783f |
| 21-Oct-2016 |
Derek Schuff <dschuff@google.com> |
[WebAssembly] Fix for 0xc call_indirect changes
Summary: Need to reorder the operands to have the callee as the last argument. Adds a pseudo-instruction, and a pass to lower it into a real call_indi
[WebAssembly] Fix for 0xc call_indirect changes
Summary: Need to reorder the operands to have the callee as the last argument. Adds a pseudo-instruction, and a pass to lower it into a real call_indirect.
This is the first of two options for how to fix the problem.
Reviewers: dschuff, sunfish
Subscribers: jfb, beanz, mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D25708
llvm-svn: 284840
show more ...
|
#
f42454b9 |
| 09-Oct-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
Move the global variables representing each Target behind accessor function
This avoids "static initialization order fiasco"
Differential Revision: https://reviews.llvm.org/D25412
llvm-svn: 283702
|
#
e040533e |
| 03-Oct-2016 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Update to more stack-machine-oriented terminology.
WebAssembly has officially switched from being an AST to being a stack machine. Update various bits of terminology and README.md entr
[WebAssembly] Update to more stack-machine-oriented terminology.
WebAssembly has officially switched from being an AST to being a stack machine. Update various bits of terminology and README.md entries accordingly.
llvm-svn: 283154
show more ...
|
#
c0f18172 |
| 01-Sep-2016 |
Heejin Ahn <aheejin@gmail.com> |
[WebAssembly] Add asm.js-style setjmp/longjmp handling for wasm (reland r280302)
Summary: This patch adds asm.js-style setjmp/longjmp handling support for WebAssembly. It also uses JavaScript's try
[WebAssembly] Add asm.js-style setjmp/longjmp handling for wasm (reland r280302)
Summary: This patch adds asm.js-style setjmp/longjmp handling support for WebAssembly. It also uses JavaScript's try and catch mechanism.
Reviewers: jpp, dschuff
Subscribers: jfb, dschuff
Differential Revision: https://reviews.llvm.org/D24121
llvm-svn: 280415
show more ...
|
#
10a70867 |
| 01-Sep-2016 |
Heejin Ahn <aheejin@gmail.com> |
Revert "Add asm.js-style setjmp/longjmp handling for wasm"
This reverts commit r280302, it broke the integration tests.
llvm-svn: 280329
|
#
23d57103 |
| 31-Aug-2016 |
Heejin Ahn <aheejin@gmail.com> |
Add asm.js-style setjmp/longjmp handling for wasm
Summary: This patch adds asm.js-style setjmp/longjmp handling support for WebAssembly. It also uses JavaScript's try and catch mechanism.
Reviewers
Add asm.js-style setjmp/longjmp handling for wasm
Summary: This patch adds asm.js-style setjmp/longjmp handling support for WebAssembly. It also uses JavaScript's try and catch mechanism.
Reviewers: jpp, dschuff
Subscribers: jfb, dschuff
Differential Revision: https://reviews.llvm.org/D23928
llvm-svn: 280302
show more ...
|
#
1eb47368 |
| 25-Aug-2016 |
Matthias Braun <matze@braunis.de> |
MachineFunctionProperties/MIRParser: Rename AllVRegsAllocated->NoVRegs, compute it
Rename AllVRegsAllocated to NoVRegs. This avoids the connotation of running after register and simply describes tha
MachineFunctionProperties/MIRParser: Rename AllVRegsAllocated->NoVRegs, compute it
Rename AllVRegsAllocated to NoVRegs. This avoids the connotation of running after register and simply describes that no vregs are used in a machine function. With that we can simply compute the property and do not need to dump/parse it in .mir files.
Differential Revision: http://reviews.llvm.org/D23850
llvm-svn: 279698
show more ...
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2 |
|
#
ccdceda1 |
| 18-Aug-2016 |
Derek Schuff <dschuff@google.com> |
[WebAssembly] Refactor WebAssemblyLowerEmscriptenException pass for setjmp/longjmp
This patch changes the code structure of WebAssemblyLowerEmscriptenException pass to support both exception handlin
[WebAssembly] Refactor WebAssemblyLowerEmscriptenException pass for setjmp/longjmp
This patch changes the code structure of WebAssemblyLowerEmscriptenException pass to support both exception handling and setjmp/longjmp. It also changes the name of the pass and the source file.
1. Change the file/pass name to WebAssemblyLowerEmscriptenExceptions -> WebAssemblyLowerEmscriptenEHSjLj to make it clear that it supports both EH and SjLj 2. List function / global variable names at the top so they can be changed easily 3. Some cosmetic changes
Patch by Heejin Ahn
Differential Revision: https://reviews.llvm.org/D23588
llvm-svn: 279075
show more ...
|
#
53b9af02 |
| 09-Aug-2016 |
Derek Schuff <dschuff@google.com> |
[WebAssembly] Fix bugs in WebAssemblyLowerEmscriptenExceptions pass
* Delete extra '_' prefixes from JS library function names. fixImports() function in JS glue code deals with this for wasm. * Ch
[WebAssembly] Fix bugs in WebAssemblyLowerEmscriptenExceptions pass
* Delete extra '_' prefixes from JS library function names. fixImports() function in JS glue code deals with this for wasm. * Change command-line option names in order to be consistent with asm.js. * Add missing lowering code for llvm.eh.typeid.for intrinsics * Delete commas in mangled function names * Fix a function argument attributes bug. Because we add the pointer to the original callee as the first argument of invoke wrapper, all argument attribute indices have to be incremented by one.
Patch by Heejin Ahn
Differential Revision: https://reviews.llvm.org/D23258
llvm-svn: 278081
show more ...
|
#
f41f67d3 |
| 01-Aug-2016 |
Derek Schuff <dschuff@google.com> |
[WebAssembly] Add asm.js-style exception handling support
Summary: This patch includes asm.js-style exception handling support for WebAssembly. The WebAssembly MVP does not have any support for unwi
[WebAssembly] Add asm.js-style exception handling support
Summary: This patch includes asm.js-style exception handling support for WebAssembly. The WebAssembly MVP does not have any support for unwinding or non-local control flow. In order to support C++ exceptions, emscripten currently uses JavaScript exceptions along with some support code (written in JavaScript) that is bundled by emscripten with the generated code. This scheme lowers exception-related instructions for wasm such that wasm modules can be compatible with emscripten's existing scheme and share the support code.
Patch by Heejin Ahn
Differential Revision: https://reviews.llvm.org/D22958
llvm-svn: 277391
show more ...
|
Revision tags: llvmorg-3.9.0-rc1, llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
b7c2400f |
| 21-May-2016 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Optimize away return instructions using fallthroughs.
This saves a small amount of code size, and is a first small step toward passing values on the stack across block boundaries.
Dif
[WebAssembly] Optimize away return instructions using fallthroughs.
This saves a small amount of code size, and is a first small step toward passing values on the stack across block boundaries.
Differential Review: http://reviews.llvm.org/D20450
llvm-svn: 270294
show more ...
|
#
41133a3e |
| 19-May-2016 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Update WebAssembly target for r269988.
llvm-svn: 270017
|
#
1aaf87e9 |
| 17-May-2016 |
Derek Schuff <dschuff@google.com> |
Factor PrologEpilogInserter around spilling, frame finalization, and scavenging
PrologEpilogInserter has these 3 phases, which are related, but not all of them are needed by all targets. This patch
Factor PrologEpilogInserter around spilling, frame finalization, and scavenging
PrologEpilogInserter has these 3 phases, which are related, but not all of them are needed by all targets. This patch reorganizes PEI's varous functions around those phases for more clear separation. It also introduces a new TargetMachine hook, usesPhysRegsForPEI, which is true for non-virtual targets. When it is true, all the phases operate as before, and PEI requires the AllVRegsAllocated property on MachineFunctions. Otherwise, CSR spilling and scavenging are skipped and only prolog/epilog insertion/frame finalization is done.
Differential Revision: http://reviews.llvm.org/D18366
llvm-svn: 269750
show more ...
|
#
0cfb5f85 |
| 10-May-2016 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Move register stackification and coloring to a late phase.
Move the register stackification and coloring passes to run very late, after PEI, tail duplication, and most other passes. Th
[WebAssembly] Move register stackification and coloring to a late phase.
Move the register stackification and coloring passes to run very late, after PEI, tail duplication, and most other passes. This means that all code emitted and expanded by those passes is now exposed to these passes. This also eliminates the need for prologue/epilogue code to be manually stackified, which significantly simplifies the code.
This does require running LiveIntervals a second time. It's useful to think of these late passes not as late optimization passes, but as a domain-specific compression algorithm based on knowledge of liveness information. It's used to compress the code after all conventional optimizations are complete, which is why it uses LiveIntervals at a phase when actual optimization passes don't typically need it.
Differential Revision: http://reviews.llvm.org/D20075
llvm-svn: 269012
show more ...
|
#
31d19d43 |
| 10-May-2016 |
Matthias Braun <matze@braunis.de> |
CodeGen: Move TargetPassConfig from Passes.h to an own header; NFC
Many files include Passes.h but only a fraction needs to know about the TargetPassConfig class. Move it into an own header. Also re
CodeGen: Move TargetPassConfig from Passes.h to an own header; NFC
Many files include Passes.h but only a fraction needs to know about the TargetPassConfig class. Move it into an own header. Also rename Passes.cpp to TargetPassConfig.cpp while we are at it.
llvm-svn: 269011
show more ...
|
#
fe71ec77 |
| 19-Apr-2016 |
Sanjoy Das <sanjoy@playingwithpointers.com> |
Disable the PatchableFunction pass for NVPTX & Wasm
PatchableFunction requires AllVRegsAllocated that these targets don't provide.
llvm-svn: 266720
|
#
b550cb17 |
| 18-Apr-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
[NFC] Header cleanup
Removed some unused headers, replaced some headers with forward class declarations.
Found using simple scripts like this one: clear && ack --cpp -l '#include "llvm/ADT/IndexedM
[NFC] Header cleanup
Removed some unused headers, replaced some headers with forward class declarations.
Found using simple scripts like this one: clear && ack --cpp -l '#include "llvm/ADT/IndexedMap.h"' | xargs grep -L 'IndexedMap[<]' | xargs grep -n --color=auto 'IndexedMap'
Patch by Eugene Kosov <claprix@yandex.ru>
Differential Revision: http://reviews.llvm.org/D19219
From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266595
show more ...
|
#
ecabac62 |
| 28-Mar-2016 |
Derek Schuff <dschuff@google.com> |
[WebAssembly] Remove duplicate disabling of passes
Also put all the disabled passes together
llvm-svn: 264684
|
#
ad154c83 |
| 28-Mar-2016 |
Derek Schuff <dschuff@google.com> |
Introduce MachineFunctionProperties and the AllVRegsAllocated property
MachineFunctionProperties represents a set of properties that a MachineFunction can have at particular points in time. Existing
Introduce MachineFunctionProperties and the AllVRegsAllocated property
MachineFunctionProperties represents a set of properties that a MachineFunction can have at particular points in time. Existing examples of this idea are MachineRegisterInfo::isSSA() and MachineRegisterInfo::tracksLiveness() which will eventually be switched to use this mechanism. This change introduces the AllVRegsAllocated property; i.e. the property that all virtual registers have been allocated and there are no VReg operands left.
With this mechanism, passes can declare that they require a particular property to be set, or that they set or clear properties by implementing e.g. MachineFunctionPass::getRequiredProperties(). The MachineFunctionPass base class verifies that the requirements are met, and handles the setting and clearing based on the delcarations. Passes can also directly query and update the current properties of the MF if they want to have conditional behavior.
This change annotates the target-independent post-regalloc passes; future changes will also annotate target-specific ones.
Reviewers: qcolombet, hfinkel
Differential Revision: http://reviews.llvm.org/D18421
llvm-svn: 264593
show more ...
|
#
d7a2eea6 |
| 09-Mar-2016 |
Dan Gohman <dan433584@gmail.com> |
[WebAssembly] Implement irreducible control flow.
This implements a very simple conservative transformation that doesn't require more than linear code size growth. There's room for much more optimiz
[WebAssembly] Implement irreducible control flow.
This implements a very simple conservative transformation that doesn't require more than linear code size growth. There's room for much more optimization in this space.
llvm-svn: 262982
show more ...
|