> 
> The patch only ever skips just one conversion, never a chain of them and
> deliberately so, for the reasons shown in the example.
> 
> However, I have just realized that combining pass_through jump functions
> during inlining may unfortunately have exactly the same effect, so we
> indeed need to be more careful.

Ah, right.  I was thinking if I can trigger someting like this and this
option did not came to my mind.
> 
> The motivating example converts a bool (integer with precision one) to
> an int, so what about the patch below which allows converting between
> integers and to a higher precision?  (Assuming the patch will pass
> bootstrap and testing on x86_64-linux which is underway).

Allowing only conversion that monotonously increase precision looks.
Perhaps Richi may have opinion here.
In a way this is similar to what we do in gimple_call_builtin that has
some type checking and also allows widening conversions.  So perhaps
this can be unified.

I just noticed that testusite has few examples that, for example, define

void *calloc (long, long)

and this makes the test fail since parameter is really unsigned long
and in the turn we disable some calloc optimizations even though this
does not affect code generation.  Some passes use
gimple_call_builtin while other look up callee decl by hand. 

Honza

Reply via email to