mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Replacing -O2 with -O3. ./benchmarks/jerry/loop_arithmetics_1kk.js: 2.97 -> 2.79.
This commit is contained in:
parent
b260f2458e
commit
701f03309a
@ -164,7 +164,7 @@ CFLAGS_WERROR ?= -Werror
|
||||
CFLAGS_WFATAL_ERRORS ?= -Wfatal-errors
|
||||
|
||||
# Optimizations
|
||||
CFLAGS_OPTIMIZE ?= -O2 -flto
|
||||
CFLAGS_OPTIMIZE ?= -O3 -flto
|
||||
CFLAGS_NO_OPTIMIZE ?= -O0
|
||||
LDFLAGS_OPTIMIZE ?=
|
||||
LDFLAGS_NO_OPTIMIZE ?=
|
||||
|
||||
@ -37,6 +37,19 @@ extern void *memset(void *s, int c, size_t n);
|
||||
*/
|
||||
extern void *memmove(void *s1, const void*s2, size_t n);
|
||||
|
||||
#ifdef __GNUC__
|
||||
/*
|
||||
* Making GCC not to replace:
|
||||
* - __memcpy -> call to memcpy;
|
||||
* - __memset -> call to memset;
|
||||
* - __memmove -> call to memmove.
|
||||
*/
|
||||
CALL_PRAGMA(GCC diagnostic push)
|
||||
CALL_PRAGMA(GCC diagnostic ignored "-Wpragmas")
|
||||
CALL_PRAGMA(GCC push_options)
|
||||
CALL_PRAGMA(GCC optimize ("-fno-tree-loop-distribute-patterns"))
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
/**
|
||||
* memcpy alias to __memcpy (for compiler usage)
|
||||
*/
|
||||
@ -66,6 +79,12 @@ void* memmove(void *s1, /**< destination*/
|
||||
{
|
||||
return __memmove(s1, s2, n);
|
||||
} /* memmove */
|
||||
|
||||
#ifdef __GNUC__
|
||||
CALL_PRAGMA(GCC pop_options)
|
||||
CALL_PRAGMA(GCC diagnostic pop)
|
||||
#endif /* __GNUC__ */
|
||||
|
||||
#endif /* LIBC_MUSL */
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user