This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa-branch] Thoughts about the simplifier langhook

The previous implementation called the simplifier langhook from
c-decl.c directly.  This way, if a front-end didn't support
simplification, it would just return.

But now, we call a generic simplifier and the langhook is merely
used to help the generic code.  We get into several problems with
Objective-C because the front-end thinks that it can simplify the
code, when it really can't.  So now CCP is messing up just about
every other Objective C test because it's, inadvertently,
optimizing raw trees.

Thoughts on how to address this?  I agree that the current design
is the way to go long term, but we need to have a short term
workaround to avoid messing up Objective-C (until someone steps
in and writes a simplifier for it).

Maybe we could have another langhook that tells us if it's OK to
simplify that language?  I've now hacked simplify_function_tree
to return 0 if lang_hooks.simplify_expr == lhd_simplify_expr.
Atrocious, but it works and it doesn't seem much worse than
having a lang_hooks.can_simplify_p.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]