[PATCH] D87233: [POC][DebugInfo] Use entry values within IR

Djordje Todorovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 5 05:25:54 PDT 2020


djtodoro added a comment.

I am about to post new set of patches addressing this problem. We are back to the initial idea that refers to extending the `llvm.dbg.value()` to hold info about the entry `Value`. We need to do that, since the current approach (by relying on the method that uses the `DILocalVariable*`) couldn't detect variable modifications (in an efficient way). Another advantage we are getting with this new approach is that we can handle local variables as well, if it can be expressed in terms of an entry value such as:

  void fn (int param) {
   ...
   int local = param + 2;
   ...

The idea is to extend the debug intrinsic with two extra operands:

1. 4th operand points to the `Value *` that holds the entry value the variable depends on
2. 5th the expression that applies to the entry `Value *` expressing a modification in terms of the entry value

In this initial stage, I am not handling the AutoUpgrade and bitcode backward compatibility. I will add that as well in following days, as well as some unit tests for the new functionality.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87233/new/

https://reviews.llvm.org/D87233



More information about the llvm-commits mailing list