[PATCH] D12065: [WinEHPrepare] Fix catchret successor phi demotion

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 16 17:30:19 PDT 2015


JosephTremoulet added a comment.

If I'm understanding correctly, you're suggesting that we could use the same slot to demote %x that we use to demote %y, and then instead of inserting loads in each predecessor of %join (which requires splitting edges) we could just insert a load at the top of %join?  I do think that's legal, and by static count it eliminates a load but by dynamic count it doesn't.  I think what we could do to get cases like this is check to see if any to values we're demoting appear as arguments to the same phi and have non-interfering liveranges, and if so coalesce their spill slots and (split predecessors of the phi if it has incoming values we're not demoting and) insert a single load after the join rather than one load per pred.  No, the TODOs already in the code don't cover that, LMK if you think it's worth adding one (or if I've misunderstood what you're suggesting).


http://reviews.llvm.org/D12065





More information about the llvm-commits mailing list