Coder Social home page Coder Social logo

Comments (3)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
When -O2 is replaced with -O0 it works. Perhaps some buggy optimization in GCC?

Original comment by [email protected] on 31 May 2010 at 12:14

from fog.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Is this issue still valid?

I did some changes, but I don't know if it's affected.

Original comment by kobalicek.petr on 22 Jul 2010 at 4:45

from fog.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 23, 2024
Still valid.

I replaced some of the macros with the code, added some printf()s there and 
this is what I got:

L1 - cMaskOpaque_small_begin: w = -11
L2 - cMaskOpaque_small_skip: w = -14
A3 - about to goto cMaskOpaque_main_skip, w = -18
L3 - cMaskOpaque_main_skip: w = -18
A4 - about to goto cMaskOpaque_small_begin, w = -14
L1 - cMaskOpaque_small_begin: w = -14
L2 - cMaskOpaque_small_skip: w = -18
A3 - about to goto cMaskOpaque_main_skip, w = -22
L3 - cMaskOpaque_main_skip: w = -22
A4 - about to goto cMaskOpaque_small_begin, w = -18
L1 - cMaskOpaque_small_begin: w = -18
L2 - cMaskOpaque_small_skip: w = -22
A3 - about to goto cMaskOpaque_main_skip, w = -26
L3 - cMaskOpaque_main_skip: w = -26
A4 - about to goto cMaskOpaque_small_begin, w = -22
L1 - cMaskOpaque_small_begin: w = -22
L2 - cMaskOpaque_small_skip: w = -26
A3 - about to goto cMaskOpaque_main_skip, w = -30
L3 - cMaskOpaque_main_skip: w = -30
A4 - about to goto cMaskOpaque_small_begin, w = -26
L1 - cMaskOpaque_small_begin: w = -26
L2 - cMaskOpaque_small_skip: w = -30
A3 - about to goto cMaskOpaque_main_skip, w = -34
L3 - cMaskOpaque_main_skip: w = -34
A4 - about to goto cMaskOpaque_small_begin, w = -30
L1 - cMaskOpaque_small_begin: w = -30
L2 - cMaskOpaque_small_skip: w = -34
A3 - about to goto cMaskOpaque_main_skip, w = -38
L3 - cMaskOpaque_main_skip: w = -38
A4 - about to goto cMaskOpaque_small_begin, w = -34
L1 - cMaskOpaque_small_begin: w = -34
L2 - cMaskOpaque_small_skip: w = -38
A3 - about to goto cMaskOpaque_main_skip, w = -42
L3 - cMaskOpaque_main_skip: w = -42
A4 - about to goto cMaskOpaque_small_begin, w = -38

// -- still decreasing w, lots and lots of printf()s here

L1 - cMaskOpaque_small_begin: w = -303766
L2 - cMaskOpaque_small_skip: w = -303770
A3 - about to goto cMaskOpaque_main_skip, w = -303774
L3 - cMaskOpaque_main_skip: w = -303774
A4 - about to goto cMaskOpaque_small_begin, w = -303770
L1 - cMaskOpaque_small_begin: w = -303770
L2 - cMaskOpaque_small_skip: w = -303774
A3 - about to goto cMaskOpaque_main_skip, w = -303778
L3 - cMaskOpaque_main_skip: w = -303778
A4 - about to goto cMaskOpaque_small_begin, w = -303774

// !!! Crash here !!! gdb output:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7b4cd2d in 
Fog::RasterEngine::CompositeBaseFuncsSSE2<Fog::RasterEngine::CompositeScreenSSE2
>::xrgb32_cblit_prgb32_span(unsigned char*, Fog::RasterSolid const*, Fog::Span 
const*, Fog::RasterClosure const*) ()
   from /home/jardik/Projects/fog-build/libFog.so

Looking at the output of DEBUG build (which works) there is not that much 
printf()s in a single function execution and "w" never decreases that much. For 
me it looks like some kind of compiler failure when there is lots of inlining - 
and gcc failes to inline some functions:

[ 73%] Building CXX object 
CMakeFiles/Fog.dir/Fog/Graphics/RasterEngine/Init_SSE2.cpp.o
In file included from 
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Init_SSE2.cpp:51:0:
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
: In static member function ‘static void 
Fog::RasterEngine::CompositeClearSSE2::prgb32_vblit_span(uint8_t*, const 
Fog::Span*, const Fog::RasterClosure*)’:
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
:71:28: warning: inlining failed in call to ‘static void 
Fog::RasterEngine::CompositeClearSSE2::prgb32_cblit_span(uint8_t*, const 
Fog::RasterSolid*, const Fog::Span*, const Fog::RasterClosure*)’: --param 
max-inline-insns-single limit reached
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
:253:48: warning: called from here
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
: In static member function ‘static void 
Fog::RasterEngine::CompositeClearSSE2::xrgb32_vblit_span(uint8_t*, const 
Fog::Span*, const Fog::RasterClosure*)’:
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
:269:28: warning: inlining failed in call to ‘static void 
Fog::RasterEngine::CompositeClearSSE2::xrgb32_cblit_span(uint8_t*, const 
Fog::RasterSolid*, const Fog::Span*, const Fog::RasterClosure*)’: --param 
max-inline-insns-single limit reached
/home/jardik/Projects/fog/Fog/Fog/Graphics/RasterEngine/Composite_SSE2_Clear_p.h
:457:48: warning: called from here

Original comment by [email protected] on 31 Oct 2010 at 9:00

Attachments:

from fog.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.