[PATCH] fix for PR16393: miscompile with struct byval

Jakob Stoklund Olesen jolesen at apple.com
Mon Jul 8 13:47:46 PDT 2013


On Jul 8, 2013, at 1:01 PM, Jim Grosbach <grosbach at apple.com> wrote:

> I haven’t followed closely enough to know all the recent details, but I don’t like the idea of having a property on MachineBasicBlock. I much prefer the pseudo-instruction to that.

Same here.

> My only hesitation about teaching PEI to do a CFG walk is that it’s adding a non-trivial bit of complexity, especially in the presence of crazy CFGs with computed-gotos and such in them. In theory, those shouldn’t interact with stack adjustments, but in practice?

By complexity, do you mean compile time or amount of PEI code required?

I am not really concerned about compile time. We’re already (at least) linear in the number of CFG edges, and this won’t add much to that term.

As for code complexity, this will certainly make PEI more complex, but I think it is comparable to all the places that would need to learn how to maintain the SET_SP_ADJ invariants. I’d prefer to have the mess all in one place.

> The only bit I feel strongly about is that I agree we should have something that tries to verify those three invariants.

Definitely. It would probably be a good thing to add to the machine code verifier no matter what we decide to do with PEI.

/jakob





More information about the llvm-commits mailing list