Re: Check whether a function is a pure function

2023-10-17 Thread Richard Biener via Gcc
On Tue, Oct 17, 2023 at 11:21 AM Hanke Zhang via Gcc wrote: > > Hi, I'm trying to write a pass to erase some useless functions or to > put it another way, detect whether a function is pure or not. (Of > course I know some passes can do the clean after inline) > > Here is the problem I got, If a fu

Check whether a function is a pure function

2023-10-17 Thread Hanke Zhang via Gcc
Hi, I'm trying to write a pass to erase some useless functions or to put it another way, detect whether a function is pure or not. (Of course I know some passes can do the clean after inline) Here is the problem I got, If a function satisfy the following points, can it be considered safe to delete