Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Reflect instruction renaming in code (#2128) | Heejin Ahn | 2019-05-21 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Reflected new renamed instruction names in code and tests: - `get_local` -> `local.get` - `set_local` -> `local.set` - `tee_local` -> `local.tee` - `get_global` -> `global.get` - `set_global` -> `global.set` - `current_memory` -> `memory.size` - `grow_memory` -> `memory.grow` - Removed APIs related to old instruction names in Binaryen.js and added APIs with new names if they are missing. - Renamed `typedef SortedVector LocalSet` to `SetsOfLocals` to prevent name clashes. - Resolved several TODO renaming items in wasm-binary.h: - `TableSwitch` -> `BrTable` - `I32ConvertI64` -> `I32WrapI64` - `I64STruncI32` -> `I64SExtendI32` - `I64UTruncI32` -> `I64UExtendI32` - `F32ConvertF64` -> `F32DemoteI64` - `F64ConvertF32` -> `F64PromoteF32` - Renamed `BinaryenGetFeatures` and `BinaryenSetFeatures` to `BinaryenModuleGetFeatures` and `BinaryenModuleSetFeatures` for consistency. | ||||
* | Emscripten stack simplification (#1870) | Alon Zakai | 2019-01-16 | 1 | -0/+3 |
| | | | | | | This takes advantage of the recent memory simplification in emscripten, where JS static allocation is done at compile time. That means we know the stack's initial location at compile time, and can apply it. This is the binaryen side of that: * asm2wasm support for asm.js globals with an initial value var X = Y; where Y is not 0 (which is what the stack now is). * wasm-emscripten-finalize support for a flag --initial-stack-pointer=X, and remove the old code to import the stack's initial location. | ||||
* | fix sign detection of a floating-point mod ; fixes kripken/emscripten#7123 ↵ | Alon Zakai | 2018-09-15 | 1 | -0/+8 |
| | | | | (#1681) | ||||
* | optimize helper funcs (like i32-div) if created in asm2wasm, so they are ↵ | Alon Zakai | 2017-10-04 | 1 | -1/+6 |
| | | | | consistently handled regardless of whether we optimize in parallel or not (#1208) | ||||
* | precompute-propagate pass (#1179) | Alon Zakai | 2017-09-12 | 1 | -11/+50 |
| | | | | | | | Implements #1172: this adds a variant of precompute, "precompute-propagate", which also does constant propagation. Precompute by itself just runs the interpreter on each expression and sees if it is in fact a constant; precompute-propagate also looks at the graph of connections between get and set locals, and propagates those constant values. This helps with cases as noticed in #1168 - while in most cases LLVM will do this already, it's important when inlining, e.g. inlining of the clamping math functions. This new pass is run when inlining, and otherwise only in -O3/-Oz, as it does increase compilation time noticeably if run on everything (and for almost no benefit if LLVM has run). Most of the code here is just refactoring out from the ssa pass the get/set graph computation, so it can now be used by both the ssa pass and precompute-propagate. | ||||
* | Improve and enable inlining pass (#966) | Alon Zakai | 2017-08-07 | 1 | -0/+1 |
| | | | | | | | | * improve inlining pass to inline single-use functions that are fairly small, which makes it useful for removing unnecessary global constructors from clang. add an inlining-optimizing pass that also optimizes where it inlined, as new opportunities arise. enable that it by default in O2+ * fix a bug where we didn't run all passes properly - refactor addDefaultGlobalOptimizationPasses() into a pre and post version. we can only run the post version in incremental optimizing builds (functions appear one by one, we optimize them first, and do global stuff when all are done), but can run both when doing a full optimize * copy in inlining, allowing multiple inlinings of the same function in the future | ||||
* | fix import type detection of calls in comma operators; when the parent is a ↵ | Alon Zakai | 2017-07-27 | 1 | -0/+7 |
| | | | | comma, it can't be a coersion (or that would have been the parent), so there is no coercion, so the result type is none (#1115) | ||||
* | fix f32 frem in asm2wasm #1105 (#1106) | Alon Zakai | 2017-07-20 | 1 | -1/+4 |
| | |||||
* | fix merge-blocks logic in call, call_indirect, select, we need to avoid any ↵ | Alon Zakai (kripken) | 2017-07-14 | 1 | -0/+7 |
| | | | | danger of moving something past a side effect ; also fix an asm2wasm bug with call_indirect fixups; the call target may be a block, which we need to look through | ||||
* | asm2wasm: properly infer return type of a call inside a sequence (#1006) | Alon Zakai | 2017-05-09 | 1 | -0/+12 |
| | |||||
* | fix autoDrop, now that we properly set block types, unreachable can easily ↵ | Alon Zakai | 2017-05-09 | 1 | -0/+15 |
| | | | | happen, and autoDrop wasn't handling it (#1005) | ||||
* | add test for f64-to-int signed/unsigned | Alon Zakai (kripken) | 2017-04-18 | 1 | -0/+11 |
| | |||||
* | add sqrt test (#912) | Alon Zakai | 2017-02-16 | 1 | -1/+11 |
| | |||||
* | lower min and max in asm2wasm in wasm f*.min/max | Alon Zakai | 2016-12-07 | 1 | -0/+9 |
| | |||||
* | make legalizeJSInterface handle f32s as well, which are not valid in asm.js ffis | Alon Zakai | 2016-12-07 | 1 | -1/+8 |
| | |||||
* | convert ftCall_* and mftCall_* into table calls | Alon Zakai | 2016-12-07 | 1 | -1/+7 |
| | |||||
* | support asm.js numeric exports by creating a global and exporting that | Alon Zakai | 2016-12-07 | 1 | -1/+1 |
| | |||||
* | support assigns of f32 to HEAP64 in asm2wasm (#830) | Alon Zakai | 2016-11-07 | 1 | -1/+6 |
| | |||||
* | handle a label setting inside the if-body of a label value in ↵ | Alon Zakai | 2016-11-06 | 1 | -1/+32 |
| | | | | RelooperJumpThreading | ||||
* | Fixes fround of an unsigned integer (#821) | Alon Zakai | 2016-11-04 | 1 | -0/+9 |
| | | | | | | | | * fix fround of unsigned * add testing for f32 ops, and remove a duplicate test (now that f32 is on by default in wasm, we don't need to check with and without PRECISE_F32) * update wasm.js and binaryen.js | ||||
* | fix large f32 consts, fixes #817 (#820) | Alon Zakai | 2016-11-01 | 1 | -0/+4 |
| | |||||
* | Optimize out bool & 1 (#804) | Alon Zakai | 2016-10-25 | 1 | -24/+33 |
| | | | | | | * asm.js corrections to unit.asm.js test * optimize out bool&1 | ||||
* | run remove-unused-functions by default | Alon Zakai | 2016-10-14 | 1 | -1/+1 |
| | |||||
* | optimize if(const) | Alon Zakai | 2016-09-24 | 1 | -6/+6 |
| | |||||
* | precompute void expressions too | Alon Zakai | 2016-09-24 | 1 | -2/+2 |
| | |||||
* | replace two drops in an if-else with one on the if | Alon Zakai | 2016-09-23 | 1 | -0/+14 |
| | |||||
* | autoDrop fix | Alon Zakai | 2016-09-23 | 1 | -0/+15 |
| | |||||
* | drop if-else arms as necessary | Alon Zakai | 2016-09-13 | 1 | -0/+15 |
| | |||||
* | update br type when turning it into a br_if in remove-unused-brs | Alon Zakai | 2016-09-13 | 1 | -0/+17 |
| | |||||
* | thread relooper jumps | Alon Zakai | 2016-09-12 | 1 | -11/+115 |
| | |||||
* | run another optimize-expressions at the end of asm2wasm | Alon Zakai | 2016-09-10 | 1 | -0/+21 |
| | |||||
* | sort locals by number of total copies | Alon Zakai | 2016-09-10 | 1 | -0/+24 |
| | |||||
* | take into account removed copies even when number of locals is the same, in ↵ | Alon Zakai | 2016-09-09 | 1 | -0/+22 |
| | | | | coalesce-locals | ||||
* | autodrop if body if no else | Alon Zakai | 2016-09-07 | 1 | -0/+5 |
| | |||||
* | add a test | Alon Zakai | 2016-09-07 | 1 | -1/+5 |
| | |||||
* | track globals in EffectAnalyzer | Alon Zakai | 2016-09-07 | 1 | -0/+13 |
| | |||||
* | optimize loads+shifts into signed loads | Alon Zakai | 2016-09-07 | 1 | -0/+12 |
| | |||||
* | Add a ReFinalize helper, and use that to properly handle asm.js imports ↵ | Alon Zakai | 2016-09-07 | 1 | -0/+6 |
| | | | | whose return value is polymorphic | ||||
* | support HEAP8[x | 0| notation in asm2wasm | Alon Zakai | 2016-09-07 | 1 | -0/+5 |
| | |||||
* | when replacing an if with its condition (when it has no body), we must drop it | Alon Zakai | 2016-09-07 | 1 | -0/+11 |
| | |||||
* | add a test for loop finalization | Alon Zakai | 2016-09-07 | 1 | -0/+16 |
| | |||||
* | handle asm.js globals that are set and the return value used | Alon Zakai | 2016-09-07 | 1 | -0/+11 |
| | |||||
* | set type of calls to their target, instead of the previous behavior where ↵ | Alon Zakai | 2016-09-07 | 1 | -0/+10 |
| | | | | the asm.js context informed us. this lets us add drops where necessary | ||||
* | add drop and tee expressions | Alon Zakai | 2016-09-07 | 1 | -0/+10 |
| | |||||
* | handle param overloading in asm2wasm ffis (#629) | Alon Zakai | 2016-07-12 | 1 | -0/+2 |
| | |||||
* | fix br_if with value optimization in remove-unused-brs | Alon Zakai | 2016-06-11 | 1 | -0/+12 |
| | |||||
* | if we use the zero-init value of a local, we cannot coalesce it with a param ↵ | Alon Zakai | 2016-06-01 | 1 | -0/+13 |
| | | | | (#556) | ||||
* | handle duplicate exports in asm2wasm | Alon Zakai | 2016-05-31 | 1 | -1/+8 |
| | |||||
* | move blocks outside in merge-blocks so that they can be merged later | Alon Zakai | 2016-05-24 | 1 | -1/+7 |
| | |||||
* | don't depend on asm.js type detection in binary formation in asm2wasm, use ↵ | Alon Zakai | 2016-05-22 | 1 | -0/+7 |
| | | | | the full asm global info we have (#535) |