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: CONST_CALL_P no longer means constant call?


> This is not actually so easy in the compiler right now. Even for CONST_CALL_P
> call insn no part of compiler actually moves/avoids the stores, since it has
> hidden reference to the outgoing args, that may be on the stack, so even
> in sched no movements across writes is done. Currently no infrastructure
> is present to distinguish outgoing args memory references, So all const
> calls are handled as pure calls independently on my pathces.

I haven't given these a lot of thought, however it should be possible
to move const calls across writes to global memory with the current
information available to the compiler.

> Currently only bit distinguishing between const and pure calls is in
> the cse, and this one don't use CALL insn at all, instead of it reffers
> to the LIBCALL notes. This is actually why compiler required almost no
> changes to plug in the pure calls.

That may be (I haven't audited the code), however the definition for
const calls certainly allows for the compiler to be more aggressive.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------


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