[PATCH] Change representation of instruction ranges where	variable is accessible.
    Alexey Samsonov 
    vonosmas at gmail.com
       
    Tue May 27 15:37:06 PDT 2014
    
    
  
Thanks for the review!
================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:1385
@@ -1384,3 @@
-        assert(MI.getNumOperands() > 1 && "Invalid machine instruction!");
-        // Keep track of user variables in order of appearance. Create the
-        // empty history for each variable so that the order of keys in
----------------
David Blaikie wrote:
> Alexey Samsonov wrote:
> > David Blaikie wrote:
> > > Did the need for this ahead-of-time initialization of the MapVector go away in your change? How?
> > Yes, it went away. Need for ahead-of-time initialization is somewhat ugly, this really should be responsibility of calculateDbgValueHistory().
> > 
> > calculateDbgValueHistory() traverses all machine instructions in function, and the first time we see a DBG_VALUE for a new variable, it will
> > be added to map by the call to "startInstrRange()".
> > 
> Was there a reason this wasn't possible previously? (I seem to recall this was kept around in the previous commit to provide stability to the output? - why is the "on first use" order stable now?)
> 
> It might've been helpful to pull this out as a separate commit if it's an isolated piece of cleanup (if it's not isolated I wouldn't mind unedrstanding what is it about the rest of your change that changed things here so that this was no longer needed)
Good point, looks like it's possible with current code as well (apparently, it became possible as code evolved during the review).
I will put this into a separate commit.
http://reviews.llvm.org/D3861
    
    
More information about the llvm-commits
mailing list