SDIsel processes llvm.dbg.declare by recording the variable debug information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc.

Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes.
For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2008-02-02 04:07:54 +00:00
parent 1cf47cb217
commit a844bdeab3
27 changed files with 137 additions and 22 deletions

View File

@ -844,6 +844,10 @@ public:
/// serialization of a DebugInfoDesc.
bool Verify(Value *V);
bool Verify(GlobalVariable *GV);
/// isVerified - Return true if the specified GV has already been
/// verified as a debug information descriptor.
bool isVerified(GlobalVariable *GV);
};
//===----------------------------------------------------------------------===//
@ -1073,7 +1077,11 @@ public:
/// Verify - Verify that a Value is debug information descriptor.
///
bool Verify(Value *V);
bool Verify(Value *V) { return VR.Verify(V); }
/// isVerified - Return true if the specified GV has already been
/// verified as a debug information descriptor.
bool isVerified(GlobalVariable *GV) { return VR.isVerified(GV); }
/// AnalyzeModule - Scan the module for global debug information.
///
@ -1197,7 +1205,7 @@ public:
/// RecordVariable - Indicate the declaration of a local variable.
///
void RecordVariable(Value *V, unsigned FrameIndex);
void RecordVariable(GlobalValue *GV, unsigned FrameIndex);
/// getRootScope - Return current functions root scope.
///