This is the mail archive of the gcc-patches@gcc.gnu.org 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]

Re: PATCH: minor C++ front end compile speed improvement



On Dec 1, 2004, at 3:28 PM, Matt Austern wrote:


On Dec 1, 2004, at 2:44 PM, Fariborz Jahanian wrote:


On Dec 1, 2004, at 2:38 PM, Matt Austern wrote:

No! It reduces one branch with no branch. We're already checking to see whether this variable is NULL. We're not adding any new tests.



I do not have the patch handy, But macro has a branch in it.


#define ORIGINAL_NAMESPACE(NODE)  \
  (DECL_NAMESPACE_ALIAS (NODE) ? DECL_NAMESPACE_ALIAS (NODE) : (NODE))

And you are putting an if-then-else around it.

No. The "if" was already there. All I'm doing is adding an else clause, so that we don't use this macro in cases where we know for a fact it will do nothing.

The else clause causes a branch around the macro for cases where we know that macro does noting.


- fariborz


--Matt




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