Hi,

On 5 October 2016 at 18:07, Jean Guyomarc'h <jean.guyoma...@gmail.com>
wrote:

> Hi raster,
>
> any update on this? Until this is fixed, osx (and clang) builds are doomed
> :/
> Maybe we can blacklist compilers known to crash when using EINA_PREFETCH_*?
> It does not feel very elegant, but it would unbreak the build.
>

I hate this idea, plus the fallback code does not even compile (because {
list ?: } is not valid code).
I'll add a #ifdef __clang__. But we still need to report the bug to LLVM
maintainers.



Jean
>
> On Sun, Oct 2, 2016 at 4:01 PM, Jean Guyomarc'h <jean.guyoma...@gmail.com>
> wrote:
>
> > Ok, I haven't reported the bug yet (because it has to go through
> > Apple's bugtracker), and it's boring...
> > If you want your gold star, I can let you fill the bug report :-) You
> > introduced this after all :p
> > Jean
> >
> >
> > On Sun, Oct 2, 2016 at 3:49 PM, Carsten Haitzler <ras...@rasterman.com>
> > wrote:
> > > On Sun, 2 Oct 2016 10:21:01 +0200 "Jean Guyomarc'h" <
> > jean.guyoma...@gmail.com>
> > > said:
> > >
> > >> Congratulations, you found an llvm bug :D
> > >> llvm 8.0.0 on osx now segfaults when compiling a file with eina_list
> > >>
> > >> Llvm tells me to report the bug, so I will, but I wonder what we
> > >> should do to handle this...
> > >> Jean
> > >
> > > yup. same issue.
> > >
> > > 2 warnings generated.
> > > 2 warnings generated.
> > > 2 warnings generated.
> > > 2 warnings generated.
> > > #0 0x00007fc74e7707d8 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
> > (/usr/bin/../lib/libLLVM-3.8.so+0x5ef7d8)
> > > #1 0x00007fc74e76e3c6 llvm::sys::RunSignalHandlers() (/usr/bin/../lib/
> > libLLVM-3.8.so+0x5ed3c6)
> > > #2 0x00007fc74e76e5aa (/usr/bin/../lib/libLLVM-3.8.so+0x5ed5aa)
> > > #3 0x00007fc74d8770b0 __restore_rt (/usr/bin/../lib/libc.so.6+0x330b0)
> > > #4 0x00007fc74ec7fba7 llvm::SelectionDAGBuilder::getControlRoot()
> > (/usr/bin/../lib/libLLVM-3.8.so+0xafeba7)
> > > #5 0x00007fc74ecc32e3 llvm::SelectionDAGISel::
> > SelectBasicBlock(llvm::ilist_iterator<llvm::Instruction const>,
> > llvm::ilist_iterator<llvm::Instruction const>, bool&) (/usr/bin/../lib/
> > libLLVM-3.8.so+0xb422e3)
> > > #6 0x00007fc74ecc6395 llvm::SelectionDAGISel::
> > SelectAllBasicBlocks(llvm::Function const&)
> (/usr/bin/../lib/libLLVM-3.8.
> > so+0xb45395)
> > > #7 0x00007fc74ecc7d7c llvm::SelectionDAGISel::
> > runOnMachineFunction(llvm::MachineFunction&)
> (/usr/bin/../lib/libLLVM-3.8.
> > so+0xb46d7c)
> > > #8 0x00007fc74fba8b04 (/usr/bin/../lib/libLLVM-3.8.so+0x1a27b04)
> > > #9 0x00007fc74e8bd8c2 llvm::FPPassManager::
> runOnFunction(llvm::Function&)
> > (/usr/bin/../lib/libLLVM-3.8.so+0x73c8c2)
> > > #10 0x00007fc74e8bdc8b llvm::FPPassManager::runOnModule(llvm::Module&)
> > (/usr/bin/../lib/libLLVM-3.8.so+0x73cc8b)
> > > #11 0x00007fc74e8bdfb4 llvm::legacy::PassManagerImpl:
> :run(llvm::Module&)
> > (/usr/bin/../lib/libLLVM-3.8.so+0x73cfb4)
> > > #12 0x00000000006e9313 clang::EmitBackendOutput(
> clang::DiagnosticsEngine&,
> > clang::CodeGenOptions const&, clang::TargetOptions const&,
> > clang::LangOptions const&, llvm::StringRef, llvm::Module*,
> > clang::BackendAction, llvm::raw_pwrite_stream*)
> > (/usr/bin/clang-3.8+0x6e9313)
> > > #13 0x0000000000a42db1 (/usr/bin/clang-3.8+0xa42db1)
> > > #14 0x0000000000b8aaca clang::ParseAST(clang::Sema&, bool, bool)
> > (/usr/bin/clang-3.8+0xb8aaca)
> > > #15 0x00000000009c2a2e clang::FrontendAction::Execute()
> > (/usr/bin/clang-3.8+0x9c2a2e)
> > > #16 0x00000000009968a6 clang::CompilerInstance::ExecuteAction(clang::
> FrontendAction&)
> > (/usr/bin/clang-3.8+0x9968a6)
> > > #17 0x0000000000a41c33 clang::ExecuteCompilerInvocation(
> clang::CompilerInstance*)
> > (/usr/bin/clang-3.8+0xa41c33)
> > > #18 0x00000000006a7918 cc1_main(llvm::ArrayRef<char const*>, char
> > const*, void*) (/usr/bin/clang-3.8+0x6a7918)
> > > #19 0x00000000006a3b38 main (/usr/bin/clang-3.8+0x6a3b38)
> > > #20 0x00007fc74d864291 __libc_start_main (/usr/bin/../lib/libc.so.6+
> > 0x20291)
> > > #21 0x00000000006a5889 _start (/usr/bin/clang-3.8+0x6a5889)
> > > Stack dump:
> > > 0.      Program arguments: /usr/bin/clang-3.8 -cc1 -triple
> > x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
> > -disable-llvm-verifier -main-file-name ephysics_world.cpp
> > -mrelocation-model pic -pic-level 2 -mthread-model posix
> -mdisable-fp-elim
> > -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
> > -fuse-init-array -target-cpu x86-64 -dwarf-column-info
> -debugger-tuning=gdb
> > -ffunction-sections -fdata-sections -coverage-file
> > /home/raster/C/efl/src/lib/ephysics/.libs/lib_ephysics_
> > libephysics_la-ephysics_world.o -resource-dir
> /usr/bin/../lib/clang/3.8.1
> > -dependency-file lib/ephysics/.deps/lib_ephysics_libephysics_la-
> ephysics_world.Tpo
> > -sys-header-deps -MP -MT lib/ephysics/lib_ephysics_
> > libephysics_la-ephysics_world.lo -D HAVE_CONFIG_H -I . -I .. -I
> > ../src/lib/efl -I /usr/include/bullet -I ../src/lib/ephysics -I
> > ../src/lib/ephysics -I ../src/bindings/cxx/ephysics -I
> > ../src/bindings/ephysics -I ../src/lib/emile -I ../src/lib/emile -I
> > ../src/lib/eo -I ../src/lib/eo -I ../src/lib
> > >  /ecore -I ../src/lib/ecore -I ../src/lib/efl -I ../src/lib/efl -I
> > ../src/lib/evas -I ../src/lib/evas -I ../src/lib/eina -I ../src/lib/eina
> -D
> > EFL_EPHYSICS_BUILD=1 -D PIC -D PIC -internal-isystem
> > /bin/../lib64/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../
> include/c++/6.1.1
> > -internal-isystem /bin/../lib64/gcc/x86_64-pc-
> linux-gnu/6.1.1/../../../../
> > include/c++/6.1.1/x86_64-pc-linux-gnu -internal-isystem
> > /bin/../lib64/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../
> include/c++/6.1.1/backward
> > -internal-isystem /usr/local/include -internal-isystem
> > /usr/bin/../lib/clang/3.8.1/include -internal-externc-isystem /include
> > -internal-externc-isystem /usr/include -Wall -Wextra -Wpointer-arith
> > -Wno-missing-field-initializers -std=gnu++11 -fdeprecated-macro
> > -fdebug-compilation-dir /home/raster/C/efl/src -ferror-limit 19
> > -fmessage-length 196 -fvisibility hidden -fobjc-runtime=gcc
> > -fcxx-exceptions -fexceptions -fdiagnostics-show-option
> -fcolor-diagnostics
> > -o lib/ephysics/.libs/lib_ephysics_libephysics_la-ephysi
> > >  cs_world.o -x c++ lib/ephysics/ephysics_world.cpp
> > > 1.      <eof> parser at end of file
> > > 2.      Code generation
> > > 3.      Running pass 'Function Pass Manager' on module
> > 'lib/ephysics/ephysics_world.cpp'.
> > > 4.      Running pass 'X86 DAG->DAG Instruction Selection' on function
> > '@_Z16_simulate_worldsPv'
> > > clang-3.8: error: unable to execute command: Segmentation fault (core
> > dumped)
> > > clang-3.8: error: clang frontend command failed due to signal (use -v
> to
> > see invocation)
> > > clang version 3.8.1 (tags/RELEASE_381/final)
> > > Target: x86_64-unknown-linux-gnu
> > > Thread model: posix
> > > InstalledDir: /bin
> > > clang-3.8: note: diagnostic msg: PLEASE submit a bug report to
> > http://llvm.org/bugs/ and include the crash backtrace, preprocessed
> > source, and associated run script.
> > > clang-3.8: note: diagnostic msg:
> > > ********************
> > >
> > > PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
> > > Preprocessed source(s) and associated run script(s) are located at:
> > > clang-3.8: note: diagnostic msg: /tmp/ephysics_world-8afc31.cpp
> > > clang-3.8: note: diagnostic msg: /tmp/ephysics_world-8afc31.sh
> > > clang-3.8: note: diagnostic msg:
> > >
> > > ********************
> > > make[5]: *** [Makefile:46771: lib/ephysics/lib_ephysics_
> > libephysics_la-ephysics_world.lo] Error 1
> > >
> > >
> > >> On Sat, Oct 1, 2016 at 5:38 PM, Carsten Haitzler <
> ras...@rasterman.com>
> > wrote:
> > >> > raster pushed a commit to branch master.
> > >> >
> > >> > http://git.enlightenment.org/core/efl.git/commit/?id=
> > a2d507d3bfd12b84620eb7361b8fd8f3a5ba0dda
> > >> >
> > >> > commit a2d507d3bfd12b84620eb7361b8fd8f3a5ba0dda
> > >> > Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
> > >> > Date:   Sat Oct 1 17:51:25 2016 +0900
> > >> >
> > >> >     eina list - make use of prefetch for minor speedups
> > >> >
> > >> >     i see a speedup of about 8% over a series of list walking and
> > freeing
> > >> >     functions given this change. it's a small speedup but still not
> > too
> > >> >     shabby just for some prefetches thrown in. ymmv depending on
> > memory
> > >> >     subsystem, memory speed itself, cpu and architecture.
> > >> >
> > >> >     @optimize
> > >> > ---
> > >> >  src/lib/eina/eina_list.h | 34 +++++++++++++++++++++++++---------
> > >> >  1 file changed, 25 insertions(+), 9 deletions(-)
> > >> >
> > >> > diff --git a/src/lib/eina/eina_list.h b/src/lib/eina/eina_list.h
> > >> > index e35943e..146601d 100644
> > >> > --- a/src/lib/eina/eina_list.h
> > >> > +++ b/src/lib/eina/eina_list.h
> > >> > @@ -1411,12 +1411,16 @@ EAPI int
> >  eina_list_data_idx(const
> > >> > Eina_List *list, void *data)
> > >> >   *          For destructive operations such as this, consider
> > >> >   *          using EINA_LIST_FOREACH_SAFE().
> > >> >   */
> > >> > -#define EINA_LIST_FOREACH(list, l, data) \
> > >> > +#define EINA_LIST_FOREACH(list, l, _data)\
> > >> >    for (l = list,                         \
> > >> > -       data = eina_list_data_get(l);     \
> > >> > +       _data = eina_list_data_get(l),    \
> > >> > +       l ? (EINA_PREFETCH(l->next), EINA_PREFETCH(_data)) :
> > EINA_PREFETCH
> > >> > (l); \
> > >> > +                                         \
> > >> >         l;                                \
> > >> > +                                         \
> > >> >         l = eina_list_next(l),            \
> > >> > -       data = eina_list_data_get(l))
> > >> > +       _data = eina_list_data_get(l),    \
> > >> > +       l ? (EINA_PREFETCH(l->next), EINA_PREFETCH(_data)) :
> > EINA_PREFETCH
> > >> > (l))
> > >> >
> > >> >  /**
> > >> >   * @def EINA_LIST_REVERSE_FOREACH
> > >> > @@ -1469,12 +1473,14 @@ EAPI int
> >  eina_list_data_idx(const
> > >> > Eina_List *list, void *data)
> > >> >   *          For destructive operations such as this, consider
> > >> >   *          using EINA_LIST_REVERSE_FOREACH_SAFE().
> > >> >   */
> > >> > -#define EINA_LIST_REVERSE_FOREACH(list, l, data) \
> > >> > +#define EINA_LIST_REVERSE_FOREACH(list, l, _data)\
> > >> >    for (l = eina_list_last(list),                 \
> > >> > -       data = eina_list_data_get(l);             \
> > >> > +       _data = eina_list_data_get(l),            \
> > >> > +       l ? (EINA_PREFETCH(l->prev), EINA_PREFETCH(_data)) :
> > EINA_PREFETCH
> > >> > (l); \ l;                                        \
> > >> >         l = eina_list_prev(l),                    \
> > >> > -       data = eina_list_data_get(l))
> > >> > +       _data = eina_list_data_get(l),            \
> > >> > +       l ? (EINA_PREFETCH(l->prev), EINA_PREFETCH(_data)) :
> > EINA_PREFETCH
> > >> > (l))
> > >> >
> > >> >  /**
> > >> >   * @def EINA_LIST_FOREACH_SAFE
> > >> > @@ -1525,11 +1531,15 @@ EAPI int
> >  eina_list_data_idx(const
> > >> > Eina_List *list, void *data)
> > >> >  #define EINA_LIST_FOREACH_SAFE(list, l, l_next, data) \
> > >> >    for (l = list,                                      \
> > >> >         l_next = eina_list_next(l),                    \
> > >> > +       EINA_PREFETCH(l_next),                         \
> > >> >         data = eina_list_data_get(l);                  \
> > >> > +       EINA_PREFETCH(data),                           \
> > >> >         l;                                             \
> > >> >         l = l_next,                                    \
> > >> >         l_next = eina_list_next(l),                    \
> > >> > -       data = eina_list_data_get(l))
> > >> > +       EINA_PREFETCH(l_next),                         \
> > >> > +       data = eina_list_data_get(l),                  \
> > >> > +       EINA_PREFETCH(data))
> > >> >
> > >> >  /**
> > >> >   * @def EINA_LIST_REVERSE_FOREACH_SAFE
> > >> > @@ -1582,11 +1592,15 @@ EAPI int
> >  eina_list_data_idx(const
> > >> > Eina_List *list, void *data)
> > >> >  #define EINA_LIST_REVERSE_FOREACH_SAFE(list, l, l_prev, data) \
> > >> >    for (l = eina_list_last(list),                              \
> > >> >         l_prev = eina_list_prev(l),                            \
> > >> > +       EINA_PREFETCH(l_prev),                                 \
> > >> >         data = eina_list_data_get(l);                          \
> > >> > +       EINA_PREFETCH(data),                                   \
> > >> >         l;                                                     \
> > >> >         l = l_prev,                                            \
> > >> >         l_prev = eina_list_prev(l),                            \
> > >> > -       data = eina_list_data_get(l))
> > >> > +       EINA_PREFETCH(l_prev),                                 \
> > >> > +       data = eina_list_data_get(l),                          \
> > >> > +       EINA_PREFETCH(data))
> > >> >
> > >> >  /**
> > >> >   * @def EINA_LIST_FREE
> > >> > @@ -1624,9 +1638,11 @@ EAPI int
> >  eina_list_data_idx(const
> > >> > Eina_List *list, void *data)
> > >> >   * @see eina_list_free()
> > >> >   */
> > >> >  #define EINA_LIST_FREE(list, data)               \
> > >> > -  for (data = eina_list_data_get(list);          \
> > >> > +  for (data = eina_list_data_get(list),          \
> > >> > +       list ? EINA_PREFETCH((list)->next) : EINA_PREFETCH(list); \
> > >> >         list;                                     \
> > >> >         list = eina_list_remove_list(list, list), \
> > >> > +       list ? EINA_PREFETCH((list)->next) : EINA_PREFETCH(list), \
> > >> >         data = eina_list_data_get(list))
> > >> >
> > >> >  #include "eina_inline_list.x"
> > >> >
> > >> > --
> > >> >
> > >> >
> > >>
> > >
> > >
> > > --
> > > ------------- Codito, ergo sum - "I code, therefore I am"
> --------------
> > > The Rasterman (Carsten Haitzler)    ras...@rasterman.com
> > >
> >
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>


-- 
Jean-Philippe André
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to