Displaying 7 results from an estimated 7 matches for "typhandl".
Did you mean:
typhandle
2011 Apr 07
1
[LLVMdev] Incompatible types at call site
Hi Arushi,
> I got this from C code compiled by llvm-gcc.
>
> There is a consistent prototype for the function
>
> TypHandle Cyclotomic ( hdRes, n, m )
> TypHandle hdRes;
> long n, m;
I just remembered that Kernighan and Ritchie style declarations like this don't
have the semantics you might expect. In particular this is not equivalent to
saying
TypHandle Cy...
2011 Apr 06
0
[LLVMdev] Incompatible types at call site
...they are the same but differ on
> 64 bit
> platforms. Of course it could also be a compiler bug. You got this from
> compiling Fortran with dragonegg, right? What was the original code?
>
I got this from C code compiled by llvm-gcc.
There is a consistent prototype for the function
TypHandle Cyclotomic ( hdRes, n, m )
TypHandle hdRes;
long n, m;
the call looks as follows,
hdI = ProdCyc( hdI, Cyclotomic( HdResult, n, 1 ) );
which is basically
Cyclotomic( HdResult, n, 1 );
The problem is the fact that it interprets 1 as an int32 instead of an...
2011 Apr 06
3
[LLVMdev] Incompatible types at call site
Hi Arushi,
> When it asks for the castOpcode, it assumes both types are unsigned(indicated by
> the false arguments).
>
> Is it correct to assume this?
yes, because the behaviour of the original code was undefined.
Ciao, Duncan.
PS: This is the sort of thing that happens when a function is declared with a
prototype such as
void *Cyclotomic(void *, long, int)
but the function
2013 May 06
3
[LLVMdev] Do we abuse the "nsw" flag
...ail to run
with reference input.
The root cause is that the compiler mistakenly optimizes expr "x * y
/ y" into x where the x*y is blindly
flagged with nsw without any analysis.
The preproceeded code is excerpted bellow:
cat -n integer.i
---------------------------------
2361 TypHandle ProdInt ( hdL, hdR )
2362 TypHandle hdL, hdR;
2363 {
....
2373 if ( (int)hdL & (int)hdR & 1 ) {
2374
2375
2376 i = ((int)hdL - 1) * ((int)hdR >> 1); /* !!! No barbaric
NSW, please !!! */
2377 if ( ((int)hdR >> 1) == 0 || i / ((int)hdR >> 1) ==
(...
2011 Apr 06
2
[LLVMdev] Incompatible types at call site
Hi Arushi,
> I got this from C code compiled by llvm-gcc.
>
> There is a consistent prototype for the function
>
> TypHandle Cyclotomic ( hdRes, n, m )
> TypHandle hdRes;
> long n, m;
>
> the call looks as follows,
> hdI = ProdCyc( hdI, Cyclotomic( HdResult, n, 1 ) );
I bet the call occurs before the function is defined. In this case C treats
the callee as bei...
2011 Apr 06
0
[LLVMdev] Incompatible types at call site
On Wed, Apr 6, 2011 at 8:35 AM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Arushi,
>
>
> I got this from C code compiled by llvm-gcc.
>>
>> There is a consistent prototype for the function
>>
>> TypHandle Cyclotomic ( hdRes, n, m )
>> TypHandle hdRes;
>> long n, m;
>>
>> the call looks as follows,
>> hdI = ProdCyc( hdI, Cyclotomic( HdResult, n, 1 ) );
>>
>
> I bet the call occurs before the function is defined. In t...
2013 May 06
0
[LLVMdev] Do we abuse the "nsw" flag
...gt; The root cause is that the compiler mistakenly optimizes expr "x * y / y" into x where the x*y is blindly
> flagged with nsw without any analysis.
>
> The preproceeded code is excerpted bellow:
>
> cat -n integer.i
> ---------------------------------
> 2361 TypHandle ProdInt ( hdL, hdR )
> 2362 TypHandle hdL, hdR;
> 2363 {
> ....
> 2373 if ( (int)hdL & (int)hdR & 1 ) {
> 2374
> 2375
> 2376 i = ((int)hdL - 1) * ((int)hdR >> 1); /* !!! No barbaric NSW, please !!! */
> 2377 if ( ((int)hdR >> 1)...