[PATCH] fix for PR16393: miscompile with struct byval
Jim Grosbach
grosbach at apple.com
Fri Jul 12 13:54:31 PDT 2013
Hi Manman,
This looks really good and I’m happy with the general approach. One minor note is that I don’t think you need to use a DenseMap<> between the SPAdj values and the MBB pointers. Instead you can just allocate a SmallVector<unsigned> and index it via MachineBasicBlock::Number. MachineFunction::getNumBlockIDs() will give you how many entries to allocate into the vector (it’s >= the number of MBBs since the numbering may have gaps if an MBB was deleted).
-Jim
On Jul 11, 2013, at 9:15 PM, Manman Ren <mren at apple.com> wrote:
>
> On Jul 11, 2013, at 6:40 PM, Jakob Stoklund Olesen wrote:
>
>>
>> On Jul 11, 2013, at 12:07 PM, Manman Ren <mren at apple.com> wrote:
>>
>>> Modify MachineVerifier to make sure
>>> 1> on every path through the CFG, a FrameSetup <n> is always followed by a
>>> FrameDestroy <n> and a FrameDestroy is always followed by a FrameSetup.
>>> 2> stack adjustments are identical on all CFG edges to a merge point.
>>
>> One more thing: You need to verify that the frame is destroyed at the end of a return block.
> Good point, I can add this extra check.
>
> Manman
>
>>
>> /jakob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130712/b462ede3/attachment.html>
More information about the llvm-commits
mailing list