[PATCH] Fix PR 13987, compile time slow down on powerpc-apple-darwin

Ian Lance Taylor ian@wasabisystems.com
Fri Jun 11 14:28:00 GMT 2004


Segher Boessenkool <segher@kernel.crashing.org> writes:

> Also, there is this comment in hwint.h:
> 
> 
> /* Set HOST_WIDE_INT.  This should be the widest efficient host
>     integer type.  It can be 32 or 64 bits, except that if we are
>     targeting a machine with 64-bit size_t then it has to be 64 bits.
> 
>     With a sane ABI, 'long' is the largest efficient host integer type.
>     Thus, we use that unless we have to use 'long long' or '__int64'
>     because we're targeting a 64-bit machine from a 32-bit host.  */
> 
> 
> I see no way a specific system can currently override this.
> Should a mechanism for that be added, or should the comment
> be changed?

I think the comment is OK.  I don't think we need to override this.

We are looking for an integer which is fast even when targetting a
64-bit machine.  I think your suggestion of HOST_FAST_INT is
reasonable.  When targetting a 32-bit machine, HOST_FAST_INT and
HOST_WIDE_INT would normally be the same.  When targetting a 64-bit
machine, HOST_WIDE_INT must be 64 bits, but HOST_FAST_INT might be 32
bits.

There are popular targets which require a 64-bit HOST_WIDE_INT--
powerpc, mips, x86_64--so I think HOST_FAST_INT is a reasonable idea
to use in bitmap operations.

Ian



More information about the Gcc-patches mailing list