A new way of tracking variables (#23373)
authorBrian Bohe <brianbohe@gmail.com>
Fri, 29 Mar 2019 23:38:53 +0000 (16:38 -0700)
committerBruce Forstall <brucefo@microsoft.com>
Fri, 29 Mar 2019 23:38:53 +0000 (16:38 -0700)
commit493023e6e1bc03ec04ee4aa9f390e37dc4d0906e
treea7e0994c783217f0bcbc0fe23a2bbf5517a2b79d
parent1df87c785e0e43392abf4bcba56e2bf4d9249fd4
A new way of tracking variables (#23373)

* Defining VariableLiveRange class

* Adding some typedefs to avoid rewriting

* Defining VariableLiveDescriptor class

* Initializing VariableLiveRange structures before BasicBlock code is being generated

* Getting a siVarLoc for variable homes from a given LclVarDsc and stack level

* Defining VariableLiveKeeper class

* Reporting VariableLiveRanges on changes of variable livenesss or variable homes

* Adding USING_VARIABLE_LIVE_RANGE flag to enable disable VariableLiveRange

* Send VariableLiveRanges to debugger

* Reporting variable homes on prolog

* Wrong argument

* Miss to change variable homes count before sending them to debugger

* Adding dumper of VariableLiveRanges for each blocks and end of code generation

* Close all open VaribleLiveRanges on last BasicBlock

* Changing order of properties initialization on VariableLiveRange constructor

* Type error on assignation

* Rephrasing comments, moving dumps and fixing typos

* Changing const VARSET_TP* for VARSET_VALARG_TP on args

* Variable home was variable location in VariableLiveRange context

* Rephrase and rename of VariableLiveKeeper properties

* Missing some renames

* Adding const where BasicBlock should not be modified

* siBeginBlock and siInit have support for debug code for VariableLiveRange and siScope info

* Adding USING_VARIABLE_LIVE_RANGE flags on methods definition.

* Variable home -> variable location

* Renaming and rephrasing names and uses of VariableLiveRange

* Moving LiveRangeDumper ctor to class declation

* Removing destructors

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Removing blank spaces and reordering functions inside class definition

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Miss to increment the index after refactoring

* Logic for keeping the last BasicBlock end IL offset is shared between siScope and VariableLiverange for debug code

* Missing to print on debug the last block VariableLiveRanges

* Avoid updating VariableLiveRange when unspilling and dying at the same assembly instruction

* Rephrasing #ifs and #ifdefs

* Calling VariableLiveKeeper in one line

* Avoid copying siVarLoc on genSetScopeInfo

* Removing unused args from eeSetLVinfo

* Changing VariableLiveKeeper ctor

* Typo

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Updating VariableLiveDescriptor ctor

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Error on first argument

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Changing reference for pointer

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Renaming assembly offset -> native offset

* removing unnecesary comments and asserts

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Update VariableLiveRange dump message

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Moving VariableLiveRanges classes inside VariableLiveKeeper

* Wrong flag name

* Adding documentation about how we track variables for debug info

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Adding opened issues to doc file

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Changing dump tittle

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Renaming VariableLiveKeeper property

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Update documentation

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Updating comments on flags

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
* Setting Scope Info as default way of tracking variables for debug info

Signed-off-by: Brian Bohe <brianbohe@gmail.com>
17 files changed:
Documentation/design-docs/variabletracking.md [new file with mode: 0644]
src/jit/block.cpp
src/jit/block.h
src/jit/codegen.h
src/jit/codegenarmarch.cpp
src/jit/codegencommon.cpp
src/jit/codegeninterface.h
src/jit/codegenlinear.cpp
src/jit/codegenxarch.cpp
src/jit/compiler.cpp
src/jit/compiler.h
src/jit/compmemkind.h
src/jit/ee_il_dll.cpp
src/jit/jitstd/list.h
src/jit/lsra.cpp
src/jit/scopeinfo.cpp
src/jit/treelifeupdater.cpp