[PATCH] D48277: [DebugInfo] Keep DBG_VALUE undef in LiveDebugVariables

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 18 10:45:44 PDT 2018


bjope added inline comments.


================
Comment at: lib/CodeGen/LiveDebugVariables.cpp:1097
+    if (Loc.isUndef())
+      continue;
     unsigned NewLocNo = LocNoMap[Loc.locNo()];
----------------
aprantl wrote:
> Just for my understanding: What is preventing you from adding the undef location into the map?
The reason afaik: locNo() is ~0U for isUndef() (that is actually how undef is identified). So adding it to the LocNoMap, which actually is implemented as a vector and not a map, would make that vector very long.

Maybe that can be solved somehow :
- chopping off another bit in DbgValueLocation to describe IsUndef similar to WasIndirect
- or by reserving locNo 0 for isUndef instead of using ~0U)
- or is it possible to use a map instead of a vector to implement the LocNoMap


https://reviews.llvm.org/D48277





More information about the llvm-commits mailing list