Skip to content

Commit

Permalink
Remove fastcomp-only FAST_UNROLLED_MEMCPY_AND_MEMSET setting (#11861)
Browse files Browse the repository at this point in the history
See #11860
  • Loading branch information
kripken authored Aug 11, 2020
1 parent 45d3f10 commit de379ce
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 56 deletions.
47 changes: 0 additions & 47 deletions src/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -991,29 +991,6 @@ LibraryManager.library = {
num = (num-1)|0;
}
aligned_dest_end = (dest_end & -4)|0;
#if FAST_UNROLLED_MEMCPY_AND_MEMSET
block_aligned_dest_end = (aligned_dest_end - 64)|0;
while ((dest|0) <= (block_aligned_dest_end|0) ) {
{{{ makeSetValueAsm('dest', 0, makeGetValueAsm('src', 0, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 4, makeGetValueAsm('src', 4, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 8, makeGetValueAsm('src', 8, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 12, makeGetValueAsm('src', 12, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 16, makeGetValueAsm('src', 16, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 20, makeGetValueAsm('src', 20, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 24, makeGetValueAsm('src', 24, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 28, makeGetValueAsm('src', 28, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 32, makeGetValueAsm('src', 32, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 36, makeGetValueAsm('src', 36, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 40, makeGetValueAsm('src', 40, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 44, makeGetValueAsm('src', 44, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 48, makeGetValueAsm('src', 48, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 52, makeGetValueAsm('src', 52, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 56, makeGetValueAsm('src', 56, 'i32'), 'i32') }}};
{{{ makeSetValueAsm('dest', 60, makeGetValueAsm('src', 60, 'i32'), 'i32') }}};
dest = (dest+64)|0;
src = (src+64)|0;
}
#endif
while ((dest|0) < (aligned_dest_end|0) ) {
{{{ makeSetValueAsm('dest', 0, makeGetValueAsm('src', 0, 'i32'), 'i32') }}};
dest = (dest+4)|0;
Expand Down Expand Up @@ -1085,30 +1062,6 @@ LibraryManager.library = {
aligned_end = (end & -4)|0;
value4 = value | (value << 8) | (value << 16) | (value << 24);

#if FAST_UNROLLED_MEMCPY_AND_MEMSET
block_aligned_end = (aligned_end - 64)|0;

while((ptr|0) <= (block_aligned_end|0)) {
{{{ makeSetValueAsm('ptr', 0, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 4, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 8, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 12, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 16, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 20, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 24, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 28, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 32, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 36, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 40, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 44, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 48, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 52, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 56, 'value4', 'i32') }}};
{{{ makeSetValueAsm('ptr', 60, 'value4', 'i32') }}};
ptr = (ptr + 64)|0;
}
#endif

while ((ptr|0) < (aligned_end|0) ) {
{{{ makeSetValueAsm('ptr', 0, 'value4', 'i32') }}};
ptr = (ptr+4)|0;
Expand Down
10 changes: 2 additions & 8 deletions src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
//
// In general it is best to pass the same arguments at both compile and link
// time, as whether wasm object files are used or not affects when codegen
// happens (without wasm object files, or when using fastcomp, codegen is all
// during link; otherwise, it is during compile). Flags affecting codegen must
// happens (without wasm object files, codegen is done entirely during
// link; otherwise, it is during compile). Flags affecting codegen must
// be passed when codegen happens, so to let a build easily switch when codegen
// happens (LTO vs normal), pass the flags at both times. The flags are also
// annotated in this file:
Expand Down Expand Up @@ -149,12 +149,6 @@ var MALLOC = "dlmalloc";
// [link]
var ABORTING_MALLOC = 1;

// If 1, generated a version of memcpy() and memset() that unroll their
// copy sizes. If 0, optimizes for size instead to generate a smaller memcpy.
// This flag only has effect when targeting asm.js.
// [fastcomp-only]
var FAST_UNROLLED_MEMCPY_AND_MEMSET = 1;

// The initial amount of memory to use. Using more memory than this will
// cause us to expand the heap, which can be costly with typed arrays:
// we need to copy the old heap into a new one in that case.
Expand Down
1 change: 0 additions & 1 deletion tests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -9039,7 +9039,6 @@ def test_minimal_runtime_code_size(self):
'-s', 'GL_TRACK_ERRORS=0',
'-s', 'GL_SUPPORT_EXPLICIT_SWAP_CONTROL=0',
'-s', 'GL_POOL_TEMP_BUFFERS=0',
'-s', 'FAST_UNROLLED_MEMCPY_AND_MEMSET=0',
'-s', 'MIN_CHROME_VERSION=58',
'-s', 'NO_FILESYSTEM=1',
'--output_eol', 'linux',
Expand Down

0 comments on commit de379ce

Please sign in to comment.