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] Disable CSE skip-blocks


> That depends on your definition of an extended basic block.  

I was using the definition that was in most common use at the time the
code was written.  A "basic block" means code delimited (ignoring exceptions
and such) by a label or jump.  An "extended basic block" means code delimited
by labels.

> GCC just rescans from the first instruction, and *that* is why it is slow.

Right.

> Removing skip-blocks makes it *much* easier to re-implement GCC's CSE
> pass to work on extended basic blocks in linear time.

Sure, but you could do a lot better if you got rid of both of them.  Then
you'd store global equivalent information at the start of each basic
block (here using the current cfg definition) and CSE would do all its
work locally starting with that data for each basic block.  And it would
be able to do one block at a time.

This would produce *better* code than today, rather than missing some cases.

> We miss some very basic constant propagations across the boundaries of
> extended basic blocks (my definition ;-). 

But these would be caught if that information were recorded someplace
when the global optimizer sees it.


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