[PATCH] fix for PR16393: miscompile with struct byval
Manman Ren
mren at apple.com
Thu Jul 11 17:53:28 PDT 2013
Attached patch after refactoring (at r186141).
The patch removes a rudimentary check in PEI: it is invalid when we have a
FrameDestroy <n> followed by a FrameSetup <m> in a single basic block.
Thanks,
Manman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: byval_spadj_pei2.patch
Type: application/octet-stream
Size: 2869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130711/5913f3b2/attachment.obj>
-------------- next part --------------
On Jul 11, 2013, at 4:43 PM, Jakob Stoklund Olesen wrote:
>
> On Jul 11, 2013, at 12:07 PM, Manman Ren <mren at apple.com> wrote:
>
> <byval_spadj_pei.patch>
>
> This patch is hard to review because of the structural changes.
>
> Could you extract this method first without changing the iteration order?
>
> Index: lib/CodeGen/PrologEpilogInserter.h
> ===================================================================
> --- lib/CodeGen/PrologEpilogInserter.h (revision 186057)
> +++ lib/CodeGen/PrologEpilogInserter.h (working copy)
> @@ -127,6 +127,8 @@
> void insertCSRSpillsAndRestores(MachineFunction &Fn);
> void calculateFrameObjectOffsets(MachineFunction &Fn);
> void replaceFrameIndices(MachineFunction &Fn);
> + void replaceFrameIndices(MachineBasicBlock *BB, MachineFunction &Fn,
> + int &SPAdj);
> void scavengeFrameVirtualRegs(MachineFunction &Fn);
> void insertPrologEpilogCode(MachineFunction &Fn);
>
> If you can do the refactoring without any functional change, we can review that change after you commit it.
>
> Thanks,
> /jakob
>
More information about the llvm-commits
mailing list