Re: Odd behaviour with OP_SCAST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris Li wrote:
[...]
> Sparse assume that float and double have different size than int.
> On the linearized instruction level, it does not have the full type
> information any more. All it got is the size of the type. So it is
> tricky to distinguish int vs float.

Here's another one; and this is with a stock unmodified sparse, too, so
I know it's not my fault.

extern double pow(double x, double y);
double d(double p)
{ return pow(2, p); }

-->

	call.64     %r2 <- pow, $2, %arg1
	ret.64      %r2

(Again with test-unssa, which seems to be convenient for displaying
intermediate code.)

[...]
> The change require the instruction to have more type
> information than size. I am tempting to just put a full
> ctype pointer there.

In fact, that's what I've got in the private patch I'm using for Clue,
although I'm only using it for determining the types of pseudos; I just
hacked alloc_typed_instruction() (which knows the type) to add it. No
other changes.

(This, BTW, is for a Clue backend that targets C. Yes, I can now compile
C into C, which I'm sure might be useful to *someone*... due to getting
ints and doubles confused some of the benchmarks are producing the wrong
results, but the Whetstone one appears to be reasonably intact and
*claims* that C compiled via sparse and Clue into C gets about 90% of
the performance of direct compilation. Even though the benchmark is
known to be poor and unreliable anyway, that's still indicative of
sparse doing a pretty decent job...)

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "All power corrupts, but we need electricity." --- Diana Wynne Jones,
│ _Archer's Goon_

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux