Dan Gohman
c8d97f931b
SIMD type capitalization.
2015-07-13 12:17:51 -07:00
Alon Zakai
31864ad633
handle empty else blocks, and refactor the handling of empty blocks in if, do and whiles
2015-06-17 13:17:38 -07:00
Alon Zakai
c8696d4126
do not evaporate a necessary ; symbol when minifying after an if #3520
2015-06-08 17:59:56 -07:00
Alon Zakai
19f7e03f1a
DEBUGGING option for native optimizer
2015-06-08 17:36:59 -07:00
Dan Gohman
d479449624
Disable the (name+num)+num = name+newnum optimization.
...
This optimization reassociates the addition and can introduce situations
where intermediate computation wraps around the address space, creating
inefficiency in JS engines which are optimized for no-wraparound cases.
In its place, the fastcomp backend is being enhanced to fold
getelementptrs with constant bases, which is the main case where the
above optimization happens in practice.
2015-05-06 10:28:20 -07:00
Alon Zakai
43daa664ac
fix native eliminator bug with a call with no side effects being entirely removable #3430 ; 1.32.1
2015-05-01 14:39:01 -07:00
Aidan Hobson Sayers
b6cedc489c
Add profiling drilldown for registerizeHarder
2015-04-22 14:17:34 +01:00
Aidan Hobson Sayers
75b690f34a
Add high level profiling for optimizer stages
2015-04-22 14:17:25 +01:00
Alon Zakai
70c9532d03
Merge branch 'aphs-optimize-optimizer-3' of https://github.com/aidanhs/emscripten into incoming
2015-04-21 16:38:06 -07:00
Aidan Hobson Sayers
3bc4e10319
Use an actual set for readability, no perf change
2015-04-21 23:26:24 +01:00
Bruce Mitchener
0077db3a68
Remove optimizeShifts from JS optimizer.
...
This optimization was not valid for asm.js code.
2015-04-21 15:54:10 +07:00
Aidan Hobson Sayers
59cbef4336
Eliminate never-conflicting variables from checks
2015-04-20 22:38:54 +01:00
Aidan Hobson Sayers
be5ad2489d
Turn junctionVariables into a vector, rename some variables
2015-04-20 22:38:54 +01:00
Aidan Hobson Sayers
cf4630e0dc
Make sorting much faster
2015-04-20 22:38:54 +01:00
Aidan Hobson Sayers
9bce71d8e6
Use a bool vector to represent a set
2015-04-20 22:38:54 +01:00
Aidan Hobson Sayers
8976a15156
Reserve memory beforehand, reuse memory where possible
2015-04-20 22:38:54 +01:00
Aidan Hobson Sayers
2b34f1b6a3
Pre-reserve space in junctionVariables
2015-04-20 22:38:53 +01:00
Aidan Hobson Sayers
093d3d59ea
Terminate loop as soon as a conflict is found
2015-04-18 02:52:14 +01:00
Aidan Hobson Sayers
9c720cab90
Put all reserving of set space in once place
2015-04-18 02:52:14 +01:00
Aidan Hobson Sayers
06d364ad4d
Ensure we don't query map on every junction var access
2015-04-18 02:52:14 +01:00
Aidan Hobson Sayers
46d27ea0ba
Pre-compute possible links and conflicts when considering a junction
2015-04-18 02:52:14 +01:00
Aidan Hobson Sayers
294cfa07e9
Remove useless constructor parameter
2015-04-18 02:51:58 +01:00
Aidan Hobson Sayers
3766eac755
Never bother analysing exit_junction
...
In addition, rearrange loops to always run one pass of junction analysis
without needing the checkedLive member variable
2015-04-18 02:38:10 +01:00
Aidan Hobson Sayers
b75bb47f9d
Remove temporary variable
2015-04-15 23:30:58 +01:00
Aidan Hobson Sayers
3f5a78f33e
Use an ordered set rather than a vector and unordered set
2015-04-15 23:21:13 +01:00
Aidan Hobson Sayers
25999c92d3
Make DEAD_FUNCTIONS work, add test
2015-04-06 20:55:27 +01:00
Jukka Jylänki
8bd951eafa
Clean up Visual Studio 2013 analyzer warning C6308: 'realloc' might return null pointer: assigning null pointer to 'storage', which is passed as an argument to 'realloc', will cause the original memory block to be leaked.
2015-03-16 03:02:12 +02:00
Jukka Jylänki
faf40ac77a
Clean up Visual Studio 2013 build warning C4146: unary minus operator applied to unsigned type, result still unsigned.
2015-03-16 02:00:46 +02:00
Alon Zakai
d17c42f131
update cashew
2015-03-14 20:38:57 -07:00
Alon Zakai
423277d556
fix memory allocation off-by-one bug in native optimizer
2015-03-14 20:34:57 -07:00
Dan Gohman
74b929b818
Fix the correctness condition for the x << 24 >> 24 & 255 optimization.
2015-03-11 13:29:18 -07:00
Dan Gohman
1bec35045e
Optimize x << 24 >> 24 & 255 => x & 255.
2015-03-10 11:05:03 -07:00
Alon Zakai
36d3bc8dde
update simd coercion handling in optimizer to latest simd spec; 1.29.10
2015-02-18 16:12:00 -08:00
Alon Zakai
9b4cde5aca
update cashew to fix #3129 issue; handle |if () {} else ;|
2015-01-31 17:25:58 -08:00
Alon Zakai
6b2dcd86da
update cashew
2015-01-30 11:24:19 -08:00
Alon Zakai
7fb1e1f38e
update cashew
2015-01-27 14:33:04 -08:00
Alon Zakai
b9f1cab1dd
handle empty toplevels in native optimizer, which can happen in very unoptimized code; fixes #3154
2015-01-27 14:31:17 -08:00
Alon Zakai
2e023139a7
update cashew
2015-01-23 13:13:58 -08:00
Alon Zakai
0d9691fd43
do not turn labeled one-time-loops into labeled blocks if there is a label-less break or continue on them
2015-01-23 12:49:14 -08:00
Alon Zakai
6eb8567a3c
switch labeled one-time loops to labeled blocks, to reduce code size
2015-01-22 17:36:02 -08:00
Alon Zakai
f91fb1357d
update cashew; label is not statable
2015-01-22 17:35:03 -08:00
Alon Zakai
b900bdd510
update cashew; labeled block support
2015-01-22 15:50:31 -08:00
Alon Zakai
91118ff758
fix optimizeFrounds in native optimizer, and add test for actually emitting |= f0|
2015-01-20 17:32:23 -08:00
Alon Zakai
5d66b59df4
handle dangerous sub-ifs aside from the final child, when deciding which if braces can be removed
2015-01-16 11:31:59 -08:00
Alon Zakai
b54c201176
update cashew to handle braces in nested ifs properly, and add testcase
2015-01-15 17:30:56 -08:00
Alon Zakai
46f8909bbd
commented out code to sort registerizeHarder variables by whether they are params; results are mixed
2015-01-07 13:45:31 -08:00
Alon Zakai
c7bcc95b79
update cashew
2015-01-03 14:26:04 -08:00
Alon Zakai
251b96a43d
update cashew
2015-01-03 13:56:53 -08:00
Jukka Jylänki
0fc516f95c
Print native optimizer invocations on EM_BUILD_VERBOSE=3
2014-12-20 13:51:00 -05:00
Jukka Jylänki
7169a02895
Add better handling of Windows \r\n on input file read to avoid \r characters in memory.
2014-12-20 13:51:00 -05:00