Re: Question about optimizing dynamic_cast call in C++ at GIMPLE Level

2025-01-18 Thread Hanke Zhang via Gcc
Hi Florian, Thank you very much for your reply. This is not related to ELF. What I am trying to do is simply obtain the 'Derived' type node from the parameter that is retrieved via the '__dynamic_cast' call. I believe this should be a relatively simple coding problem. However, I am not very fami

Re: Question about optimizing dynamic_cast call in C++ at GIMPLE Level

2025-01-18 Thread Florian Weimer via Gcc
* Hanke Zhang via Gcc: > I have recently been delving into optimizing dynamic_cast calls in C++ > within the context of GIMPLE code. In particular, for scenarios > involving single inheritance, I'm aiming to convert the following > code: > > _1 = __dynamic_cast (obj_1(D), &_ZTI7Base, &_ZTI10Derive

Question about optimizing dynamic_cast call in C++ at GIMPLE Level

2025-01-18 Thread Hanke Zhang via Gcc
Hi, I have recently been delving into optimizing dynamic_cast calls in C++ within the context of GIMPLE code. In particular, for scenarios involving single inheritance, I'm aiming to convert the following code: _1 = __dynamic_cast (obj_1(D), &_ZTI7Base, &_ZTI10Derived, 0); if (_1!= 0B) into a mo