[llvm-dev] [DWARF] prologue_end fix not working for VLIW
via llvm-dev
llvm-dev at lists.llvm.org
Thu Aug 9 09:48:14 PDT 2018
> -----Original Message-----
> From: Verena Beckham [mailto:verena at codeplay.com]
> Sent: Thursday, August 09, 2018 11:42 AM
> To: llvm-dev at lists.llvm.org
> Cc: Robinson, Paul
> Subject: [DWARF] prologue_end fix not working for VLIW
>
> Hi,
>
> I found that prologue_end markers where badly placed in my test, and
> applied https://reviews.llvm.org/D41762 in the hope that it would fix it
> (I'm on 4.0.1).
> However, this fix doesn't work for VLIW architectures. At this point
> we're iterating over bundles, not MachineInstructions, and the
> FrameSetup flag is set on MachineInstructions, not bundles.
> If bundling happens in the prologue we might insert the prologue_end
> marker too early.
> Instead, we need to check whether all instructions in the bundle (if
> bundled) have the FrameSetup flag.
> This assumes we want the prologue_end marker just before the first
> instruction not in the prologue. I couldn't find anything official about
> the placement in this case in the DWARF spec.
prologue_end should identify the first instruction that is not part
of the prologue. The interaction with bundles is deliberately not
part of the spec, as DWARF cannot anticipate the relevant factors for
all possible VLIW architectures.
For a previous compiler I worked on, we used low-order instruction
address bits as an instruction-within-bundle index, which allowed the
line table to identify individual instructions within a bundle. These
were not real instruction addresses, obviously, but the compiler and
debugger agreed to that convention and it worked very well. Whether
that's appropriate for your case, and whether you can persuade LLVM to
do something like that, is a different story.
Good luck, and feel free to ask questions here.
--paulr
> Since I am working on a custom target I'm afraid I can't provide any
> test cases...
>
> Thanks,
>
> --
> Verena Beckham
>
> Senior Principal Software Engineer, Compilers
>
> Codeplay Software Ltd
> Level C, Argyle House, 3 Lady Lawson Street, Edinburgh, EH3 9DR
> Tel: 0131 466 0503
> Fax: 0131 557 6600
> Website: http://www.codeplay.com
>
> This email and any attachments may contain confidential and /or
> privileged information and is for use by the addressee only. If you
> are not the intended recipient, please notify Codeplay Software Ltd
> immediately and delete the message from your computer. You may not copy
> or forward it,or use or disclose its contents to any other person. Any
> views or other information in this message which do not relate to our
> business are not authorized by Codeplay software Ltd, nor does this
> message form part of any contract unless so stated.
> As internet communications are capable of data corruption Codeplay
> Software Ltd does not accept any responsibility for any changes made to
> this message after it was sent. Please note that Codeplay Software Ltd
> does not accept any liability or responsibility for viruses and it is
> your responsibility to scan any attachments.
> Company registered in England and Wales, number: 04567874
> Registered office: Regent house, 316 Beulah Hill, London, United
> Kingdom, SE19 3HF
More information about the llvm-dev
mailing list