> > > I'm curious why you ever get a ggc_freed decl here.
> >
> > It seems that the overloaded interface of RVV has been registered 
> > repeatedly, resulting
> > in invalid registrations except for the first registration, and these 
> > invalid registrations
> > have been ggc_freed. But anyway, I think it is necessary to do a check 
> > here. I think using
> > "integer_zero_node" is to meet the needs, although direct return would be 
> > better.
> 
> But there isn't any way to check whether 'decl' has been freed ...
> just make sure it isn't - you
> should not even have a reference to it.
> Richard.

I'm trying to understand what you mean. You mean that directly using 
"integer_zero_node" to
overwrite decl will not guarantee whether the memory of the original decl has 
been properly
cleaned up, right?

If so, then the current method is really not appropriate. Maybe I should check 
whether
the function has been registered before registering the current function. If it 
has
been registered, I will skip it directly. This will lead to a decrease in 
efficiency.
I am not sure whether this is appropriate. In fact, I see a similar patch on 
aarch64:

https://github.com/gcc-mirror/gcc/commit/685d822e524cc8b2726ad6c44c2ccaabe55a198c

Or any other comments?

BR
Jin

Reply via email to