Граф коммитов

404 Коммитов

Автор SHA1 Сообщение Дата
Ryan Kelly d55c07198d Add TODO about more permissive label handling in registerizeHarder 2014-01-23 22:37:37 +11:00
Ryan Kelly d21f2ea3ad Simplify handling of switch statements in registerizeHarder.
It now assumes they're of the very restricted for that's actually
produced by emscripten, which both simplified the code and uncovered
opportunities for further register reduction in a testcase.
2014-01-23 22:37:31 +11:00
Ryan Kelly a912e8271c Reduce memory usage when assigning registers in a block.
Rather than pre-calculating liveness states and then processing nodes
in execution order, we process nodes in reverse execution order and
use the liveness info implicit in this traversal.  Names are assigned
a register when they're used for the first time, and the register is
freed when we reach an assignment.
2014-01-23 22:32:40 +11:00
Alon Zakai 2266ef7cac assign to null to clear a local variable, avoid delete 2014-01-21 17:50:46 -08:00
Alon Zakai 55cadd9dc5 fix typo 2014-01-21 17:50:46 -08:00
Alon Zakai c744bcec81 avoid nonstandard use of splice 2014-01-21 17:50:46 -08:00
Alon Zakai b604a07c61 rename a variable to our conventions 2014-01-21 17:50:46 -08:00
Ryan Kelly 68d6af077f Registerize based on full liveness analysis.
This does a much-more-expensive but much-more-thorough registerization
pass based a live-variable analysis for each function.

azakai: perform this on -O3 and above
2014-01-21 17:50:46 -08:00
Ryan Kelly 7a8c26b65f Minify loop labels while we're minifying local names. 2014-01-21 17:43:09 +11:00
Ryan Kelly dd4745db3b Fix a param-handling bug in normalizeAsm 2014-01-20 21:50:09 +11:00
Alon Zakai dd7771e94e handle unsigned reads in safe heap 2014-01-17 16:12:09 -08:00
Alon Zakai d0342ae398 use double for float arguments to safe heap 2014-01-17 10:19:47 -08:00
Alon Zakai a310827131 enable a form of safe heap in asm, using js optimizer pass to ensure full coverage and support for fastcomp 2014-01-16 11:27:39 -08:00
Alon Zakai e14e6ea75c add todo 2014-01-15 21:35:30 -08:00
Alon Zakai 7600935358 Merge pull request #2016 from rfk/rfk/minify-names-separately
Split name-minification into a separate pass from registerization.
2014-01-15 21:33:17 -08:00
Ryan Kelly 375761d4a5 Address review comments. 2014-01-16 16:19:22 +11:00
Alon Zakai c7cb560f93 do not track eliminable variables from one switch statement to another, if they have any dependencies; fixes #2003 2014-01-15 21:06:50 -08:00
Ryan Kelly ba54ecbc93 Split name-minification into a separate pass from registerization. 2014-01-16 01:02:43 +11:00
Alon Zakai 60a86d0fcb fix aggressiveVariableElimination bug and add testing 2014-01-14 20:54:14 -08:00
Alon Zakai ed095a832d do minified name generation in js-optimizer.js, so that we have no more fixed limit on the # of minified names 2014-01-08 14:07:46 -08:00
Alon Zakai e4e8063f6d handle variables that assign a value including themselves in aggressiveVariableElimination 2014-01-07 14:05:53 -08:00
Alon Zakai 582e3e62db make aggressiveVariableElimination usable through a setting 2014-01-07 12:24:40 -08:00
Alon Zakai 9e1c9c1577 handle if-chains without an else in the outliner 2013-12-27 12:52:48 -08:00
Alon Zakai 59051ea514 remove outdated comment 2013-12-24 10:56:36 -08:00
Alon Zakai 508d4f0241 make eliminator not get confused by calls without a return but with a coercion 2013-12-23 18:42:28 -08:00
Alon Zakai 5f00b61350 don't get confused by temporary empty nodes when calculating assigns in the loop variable optimizer 2013-12-23 17:52:54 -08:00
Alon Zakai b86abc2ecf fix bug where close-together tempDoublePtr operations could cross each other 2013-12-23 15:43:01 -08:00
Alon Zakai 8825277bf3 comment on how tempDoublePtr is optimized 2013-12-22 21:29:26 -08:00
Dan Gohman 47e803a625 Optimize away masks on stores to HEAP8 and HEAP16.
Optimize HEAP8[i] = x & 255 to HEAP8[i] = x, and similar for HEAP16.
2013-12-19 15:28:27 -08:00
Alon Zakai e238b7e11f minify in asm arg coercions that denormalizeAsm generates, to handle Math.fround calls 2013-11-11 10:23:40 -08:00
Alon Zakai eb8172ed78 minify in asm var definitions that denormalizeAsm generates, to handle Math.fround calls 2013-11-11 10:06:29 -08:00
Alon Zakai d420405180 Math.* have no side effects 2013-11-09 09:55:18 -08:00
Alon Zakai 16a5d12dc1 consolidate side effect checking code 2013-11-09 09:29:34 -08:00
Alon Zakai e203c5b86c remove unneeded var 2013-11-09 09:22:24 -08:00
Alon Zakai 7f5c2dec95 optimize hasSideEffects 2013-11-09 09:21:25 -08:00
Alon Zakai 8d20a1424a fix float/int bitcast optimization to recognize and preserve Math_fround 2013-11-08 18:54:13 -08:00
Alon Zakai eb3ec20f8b fix registerize pass for float32 2013-11-08 18:18:12 -08:00
Alon Zakai d041b0fe9f initial work for float32 support in js optimizer 2013-11-08 18:08:42 -08:00
Alon Zakai c715cec68f invalidate calls on conditionals in js optimizer, to avoid eliminating into a non-executing code path 2013-11-08 14:54:18 -08:00
Alon Zakai 028a3210fc avoid X-(-Y) in js optimizer; fixes #1685 2013-10-09 13:22:24 -04:00
Alon Zakai 800ec1f87b look for metadata in js optimizer starting at the end 2013-10-06 10:33:50 -07:00
Alon Zakai 8b76d21dae update js optimizer tests 2013-10-03 10:53:57 -07:00
Alon Zakai c182633f18 emit final missing returns in compiler itself 2013-10-03 10:53:57 -07:00
Alon Zakai db47cbe4a2 assert on vars being in front of functions straight out of the js compiler 2013-10-02 17:31:37 -07:00
Alon Zakai 6e8ba9140b optimize Math.x to Math_x 2013-10-02 17:31:37 -07:00
Alon Zakai f2965d6c36 assert in normalizeAsm 2013-10-02 17:31:36 -07:00
Alon Zakai e48b5037b6 abort registerize at the proper early time when we need to 2013-09-11 21:33:56 -07:00
Alon Zakai b805225b2a disable registerize when seeing inline js in non-asm mode, as we do not protect it from replacements there; fixes #1614 2013-09-11 21:03:35 -07:00
Alon Zakai 139faf0677 fix outlining log message 2013-09-07 13:49:37 -07:00
Alon Zakai 490d55b399 properly outline the while (1) switch pattern 2013-09-06 21:56:41 -07:00