[llvm-commits] Handling of DebugLocs during CSE of SelectionDAG nodes.
Devang Patel
dpatel at apple.com
Tue Nov 1 11:18:12 PDT 2011
On Oct 31, 2011, at 10:30 AM, Kyriakos Georgiou wrote:
> Regarding thread :
>
> http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-September/043205.html
>
> the approach of throwing away the line number information on the merged node is
> implemented in the attached patch.
+ if (SDNode *ON = CSEMap.FindNodeOrInsertPos(ID, IP)) {
+ DebugLoc dlN = N->getDebugLoc();
+ DebugLoc dlON = ON->getDebugLoc();
+ // Throw away the line number information on the merged node since it is
+ // not possible to preserve the information that operation is associated
+ // with multiple lines. This will make the debugger work better at -O0.
+ if (!(dlON.isUnknown()) && (OptLevel != CodeGenOpt::None) && (dlN != dlON)) {
+ ON->setDebugLoc(DebugLoc());
+ }
This logic could be separated out in a utility function.
Do you have any test cases ?
-
Devang
More information about the llvm-commits
mailing list