* Lowering of types?
@ 2005-06-02 9:21 Richard Guenther
2005-06-02 18:07 ` Richard Henderson
0 siblings, 1 reply; 5+ messages in thread
From: Richard Guenther @ 2005-06-02 9:21 UTC (permalink / raw)
To: gcc
Hi!
During type checking of the middle-end in the tree-optimizers
we run into type mismatches like
fold_binary (code=PLUS_EXPR, type=0x4037e438,
op0=0x404a6940, op1=0x404a6d40)
with the types
(gdb) call debug_tree (type)
<integer_type 0x4037e438 gcov_position_t sizes-gimplified asm_written
public unsigned SI
size <integer_cst 0x40142408 type <integer_type 0x4014a288
bit_size_type> constant invariant 32>
unit size <integer_cst 0x40142198 type <integer_type 0x4014a21c
unsigned int> constant invariant 4>
align 32 symtab 1077408160 alias set -1 precision 32 min <integer_cst
0x40142480 0> max <integer_cst 0x40142468 4294967295>>
(gdb) call debug_tree (op0)
<ssa_name 0x404a6940
type <integer_type 0x4037e438 gcov_position_t sizes-gimplified
asm_written public unsigned SI
size <integer_cst 0x40142408 constant invariant 32>
unit size <integer_cst 0x40142198 constant invariant 4>
align 32 symtab 1077408160 alias set -1 precision 32 min
<integer_cst 0x40142480 0> max <integer_cst 0x40142468 4294967295>>
visited var <var_decl 0x403be21c D.5122> def_stmt <modify_expr
0x403bc57c>
version 19>
(gdb) call debug_tree (op1)
<ssa_name 0x404a6d40
type <integer_type 0x4014a57c unsigned int sizes-gimplified
asm_written public unsigned SI
size <integer_cst 0x40142408 constant invariant 32>
unit size <integer_cst 0x40142198 constant invariant 4>
align 32 symtab 1075589640 alias set -1 precision 32 min
<integer_cst 0x40142480 0> max <integer_cst 0x40142468 4294967295>
pointer_to_this <pointer_type 0x402b93cc>>
visited var <var_decl 0x403be0d8 D.5119> def_stmt <modify_expr
0x403bc4ec>
version 5>
which do not match, but still only differ in "name" -- so the
question is can we / do we want to lower types like gcov_position_t
to their (correctly qualified) main variant (or whatever else is
suitable) f.i. during gimplification to allow the optimizers create
strictly typed trees?
Richard.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Lowering of types?
2005-06-02 9:21 Lowering of types? Richard Guenther
@ 2005-06-02 18:07 ` Richard Henderson
2005-06-02 18:46 ` Richard Guenther
0 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2005-06-02 18:07 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc
On Thu, Jun 02, 2005 at 11:21:31AM +0200, Richard Guenther wrote:
> During type checking of the middle-end in the tree-optimizers
> we run into type mismatches like
This isn't a type mismatch if the compatible_p langhook says
they aren't. Which I expect is true.
> question is can we / do we want to lower types like gcov_position_t
> to their (correctly qualified) main variant (or whatever else is
> suitable) f.i. during gimplification to allow the optimizers create
> strictly typed trees?
I wouldn't think so, no.
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Lowering of types?
2005-06-02 18:07 ` Richard Henderson
@ 2005-06-02 18:46 ` Richard Guenther
2005-06-02 19:07 ` Richard Henderson
2005-06-03 0:41 ` Geoffrey Keating
0 siblings, 2 replies; 5+ messages in thread
From: Richard Guenther @ 2005-06-02 18:46 UTC (permalink / raw)
To: Richard Henderson, Richard Guenther, gcc
On 6/2/05, Richard Henderson <rth@redhat.com> wrote:
> On Thu, Jun 02, 2005 at 11:21:31AM +0200, Richard Guenther wrote:
> > During type checking of the middle-end in the tree-optimizers
> > we run into type mismatches like
>
> This isn't a type mismatch if the compatible_p langhook says
> they aren't. Which I expect is true.
What exactly does it mean to the middle-end, if the compatible_p
langhook says true? Does it mean if the middle-end exchanges one
type for the other there should be no observable effects (correctness
wise) down the road?
Thanks for clarifying,
Richard.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Lowering of types?
2005-06-02 18:46 ` Richard Guenther
@ 2005-06-02 19:07 ` Richard Henderson
2005-06-03 0:41 ` Geoffrey Keating
1 sibling, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2005-06-02 19:07 UTC (permalink / raw)
To: Richard Guenther; +Cc: Richard Guenther, gcc
On Thu, Jun 02, 2005 at 08:46:25PM +0200, Richard Guenther wrote:
> Does it mean if the middle-end exchanges one
> type for the other there should be no observable effects (correctness
> wise) down the road?
Yes.
r~
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Lowering of types?
2005-06-02 18:46 ` Richard Guenther
2005-06-02 19:07 ` Richard Henderson
@ 2005-06-03 0:41 ` Geoffrey Keating
1 sibling, 0 replies; 5+ messages in thread
From: Geoffrey Keating @ 2005-06-03 0:41 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc
Richard Guenther <richard.guenther@gmail.com> writes:
> On 6/2/05, Richard Henderson <rth@redhat.com> wrote:
> > On Thu, Jun 02, 2005 at 11:21:31AM +0200, Richard Guenther wrote:
> > > During type checking of the middle-end in the tree-optimizers
> > > we run into type mismatches like
> >
> > This isn't a type mismatch if the compatible_p langhook says
> > they aren't. Which I expect is true.
>
> What exactly does it mean to the middle-end, if the compatible_p
> langhook says true? Does it mean if the middle-end exchanges one
> type for the other there should be no observable effects (correctness
> wise) down the road?
If the middle-end exchanges values of one type for the other there
should be no problems. Swapping the actual types could cause
problems, for instance if you replace a complete structure with an
incomplete version.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-06-03 0:41 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-02 9:21 Lowering of types? Richard Guenther
2005-06-02 18:07 ` Richard Henderson
2005-06-02 18:46 ` Richard Guenther
2005-06-02 19:07 ` Richard Henderson
2005-06-03 0:41 ` Geoffrey Keating
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).