Hi Przemek,

> > ---
> > source\macro\win\msvc\macroy.c(3095) : warning C4701: potentially
> > uninitialized local variable 'hb_macrolval' used
> > source\vm\classes.c(462) : warning C4702: unreachable code
> > source\compiler\hbpcode.c(599) : warning C4702: unreachable code
> > source\compiler\hbpcode.c(549) : warning C4702: unreachable code
> > source\compiler\hbpcode.c(571) : warning C4702: unreachable code
> > source\vm\classes.c(2940) : warning C4702: unreachable code
> > source\compiler\win\msvc\harboury.c(7154) : warning C4701: potentially
> > uninitialized local variable 'hb_complval' used
>
> Wow, MS discovered Interprocedural Optimization (IPO).


:)


> This warnings are result of such optimization. Just simply now
> MS knows that hb_errInternal() does not return and mark all code
> below as unused.


Yeah, I know, I will now go an correct these warnings.


> IPO really nicely increase the speed. For speedtst and -gc3 it
> gives ~15 speed improvement.


Sounds good, I'll make some real life tests with a big app,
I'd also like to see how executable size is changed.


> > The more grave problem is that Harbour executables won't start,
>
> but show this instead:
> > ---
> > Unrecoverable error 9998: Screen driver initialization failure
> > ---
>
> Becase we have some GT and RDD C REQUESTs just after hb_errInternal().
> Now MSVC detects that this function never returns (it has at the and
> exit()) and simply removed all code which is after thius function,
> f.e. hbgtcore[3359]:
>   hb_errInternal( 9998, "Screen driver initialization failure", NULL, NULL
> );
>
>   /* force linking HB_GTSYS() */
>   HB_FUNC_EXEC( HB_GTSYS );
>
> If you want then you can cleanup all such bindings. But if MSVC
> tries to be more clever then programmers then it won't help and
> all such bindings in any locations will be pacified by optimizer.


Many thanks for the tip. I'll fix these.


> > http://msdn.microsoft.com/en-gb/magazine/cc301698.aspx
> > _______________________________________________
>
> As usual tone of words to describe very simple mechanism known from very
> long time. "We are the leaders, wait for us."


At least they've admitted they didn't invent it, albeit in a pretty
toned down fashion :) Anyhow this reading helped me to understand
the concept, the first few paragraph is enough, and one can ignore
all the .NET pitch (but in many ways it's related to Harbour pcode,
so it may be interesting still).

Brgds,
Viktor
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to