This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to know which front end?
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: David Daney <ddaney at avtrex dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 28 Oct 2005 09:19:33 -0700
- Subject: Re: How to know which front end?
- References: <43624742.2090000@avtrex.com>
On Fri, Oct 28, 2005 at 08:44:02AM -0700, David Daney wrote:
> I am hacking up an optimization pass that re-writes some calls to
> libgcj. Since this pass is only useful if the source is generating
> calls to functions in libgcj, I only want to enable it if this is likely
> to be the case.
>
> Q: Is there some predicate that can be used in the gate of a tree
> optimizer to disable the pass if not being called via the java front-end?
I can't answer that question, but I wonder if this kind of rewrite
pass wouldn't be useful for other languages. For example, calls to
libstdc++ could be rewritten. There might be a general tree-rewriting
pass where the patterns to be matched are language-specific, but the
algorithm to do the pass is language-independent.