[llvm] r175023 - Debug Info: LiveDebugVarible can remove DBG_VALUEs, make sure we emit them back.
Eric Christopher
echristo at gmail.com
Tue Feb 12 18:37:07 PST 2013
On Tue, Feb 12, 2013 at 5:14 PM, Manman Ren <mren at apple.com> wrote:
> Author: mren
> Date: Tue Feb 12 19:14:49 2013
> New Revision: 175023
>
> URL: http://llvm.org/viewvc/llvm-project?rev=175023&view=rev
> Log:
> Debug Info: LiveDebugVarible can remove DBG_VALUEs, make sure we emit them
> back.
>
> RegisterCoalescer used to depend on LiveDebugVariable. LDV removes
> DBG_VALUEs
> without emitting them at the end.
>
>
This isn't quite what's going on, it's mostly that we kept adding all the
information and then never bothered to emit it.
> We fix this by removing LDV from RegisterCoalescer. Also add an assertion
> to
> make sure we call emitDebugValues if DBG_VALUEs are removed at
> runOnMachineFunction.
>
> rdar://problem/13183203
> Reviewed by Andy & Jakob
>
>
For function parameters this is still somewhat of a hack. The correct way
to fix this is to change the representation we use for function arguments
to use the incoming value and track that for location information - it
would obviate the need to scan through the function collecting function
parameters as if they were local variables. Also, it shouldn't depend upon
whether or not we're enabling misched or not, a simple testcase should be
an unused parameter and dce.
+define void @Proc8(i32* nocapture %Array1Par, [51 x i32]* nocapture
%Array2Par, i32 %IntParI1, i32 %IntParI2) nounwind optsize ssp uwtable {
You also shouldn't need ssp/uwtable on this.
> class LiveDebugVariables : public MachineFunctionPass {
> void *pImpl;
> + /// Whether emitDebugValues is called.
> + bool EmitDone;
> + /// Whether the machine function is modified during the pass.
> + bool ModifiedMF;
>
Any reason why these aren't going into the pass impl?
Jakob: It looks like we don't need the value renaming machinery any more,
i.e.
void LiveDebugVariables::renameRegister(unsigned OldReg, unsigned NewReg,
unsigned SubIdx)
since I'm guessing the register allocator keeps the virtual register map up
to date that we use later when we actually run the pass? If so, Manman, can
you delete the now dead code?
Thanks!
-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130212/d688cac9/attachment.html>
More information about the llvm-commits
mailing list