This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Is it possible to have non-optimised block within a source file.


> To: gcc@gcc.gnu.org
> From: "Richard J Moore" <richardj_moore@uk.ibm.com>
> Date: Thu, 21 Jun 2001 13:53:58 +0100

> I have a need to ask the compiler not to optimise certain sections
> of code within a source file.

Instead of going in this direction, I think you may be more mileage
going a different route.  One reason to not favor going this route is
that the above is so poorly specified that I don't have a good notion
of what you mean, nor would the compiler.

> Why I ask these questions is because I'd like the ability to jump
> from an in-line assembler section to a c coded block.

Before going down that path, I'd recommend exposing the jump to the
compiler through the use of if, or goto in the higher level language.
Do that, and then explain the problems that develop and we can try and
solve those.  Those are the real problems.

This concept is called, stop lying to the optimizer.  The reason why
you want to, is because everytime you do, it will hurt.  If you are
patient and explain what your doing to the optimizer, it will not hurt
you as often.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]