This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 1/3] make pattern_regs a vec
On 07/27/2016 07:17 PM, Trevor Saunders wrote:
On Wed, Jul 27, 2016 at 04:15:02PM -0600, Jeff Law wrote:
On 07/24/2016 03:10 PM, email@example.com wrote:
From: Trevor Saunders <firstname.lastname@example.org>
2016-07-24 Trevor Saunders <email@example.com>
* store-motion.c (struct st_expr): Make pattern_regs a vector.
(extract_mentioned_regs): Append to a vector instead of
returning a rtx_expr_list.
This is fine. Though one has to wonder if a different representation than
lists/vecs would work better given the walks. A bitmap for example might
work well since I think we just need to track register #s.
yeah, I just noticed there's actually a comment suggesting a regset
should be used.
I didn't even see that comment :-)
I also noticed free_st_expr_entry needs to release the vec, I'll be
happy when we use auto_vec and stuff more and this sort of thing is
impossible. I guess this used to work because the gc just cleaned up
after us being sloppy. Anyway that seems pretty obvious so I'm tempted
to commit this as is in furtherance of killing rtl lists, and then we
can worry about making it a bitmap some other time.
Fine with me.