<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/CodeGen/LiveDebugValues.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[LiveDebugValues][NFC] Move LiveDebugValues source for refactor</title>
<updated>2020-08-22T11:58:30+00:00</updated>
<author>
<name>Jeremy Morse</name>
<email>jeremy.morse@sony.com</email>
</author>
<published>2020-08-22T11:53:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fba06e3c85aa2a5b720379ca74fb796eb4126790'/>
<id>fba06e3c85aa2a5b720379ca74fb796eb4126790</id>
<content type='text'>
This is a pure file move of LiveDebugValues.cpp ahead of the pass being
refactored, with an experimental new implementation to follow.

The motivation for these changes can be found here:

  http://lists.llvm.org/pipermail/llvm-dev/2020-June/142368.html

And the other related changes can be found in the phabricator stack for
this revision:

Differential Revision: https://reviews.llvm.org/D83304
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a pure file move of LiveDebugValues.cpp ahead of the pass being
refactored, with an experimental new implementation to follow.

The motivation for these changes can be found here:

  http://lists.llvm.org/pipermail/llvm-dev/2020-June/142368.html

And the other related changes can be found in the phabricator stack for
this revision:

Differential Revision: https://reviews.llvm.org/D83304
</pre>
</div>
</content>
</entry>
<entry>
<title>RegAlloc: Start using Register</title>
<updated>2020-06-30T16:13:08+00:00</updated>
<author>
<name>Matt Arsenault</name>
<email>Matthew.Arsenault@amd.com</email>
</author>
<published>2020-06-30T15:57:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b7f6ecf0c7d4ac86ed4983311d0501e75c659e25'/>
<id>b7f6ecf0c7d4ac86ed4983311d0501e75c659e25</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[DebugInfo] Update MachineInstr to help support variadic DBG_VALUE instructions</title>
<updated>2020-06-22T15:01:12+00:00</updated>
<author>
<name>stozer</name>
<email>stephen.tozer@sony.com</email>
</author>
<published>2020-06-22T15:01:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=539381da26096df54ccf862088c8242498a7dcae'/>
<id>539381da26096df54ccf862088c8242498a7dcae</id>
<content type='text'>
Following on from this RFC[0] from a while back, this is the first patch towards
implementing variadic debug values.

This patch specifically adds a set of functions to MachineInstr for performing
operations specific to debug values, and replacing uses of the more general
functions where appropriate. The most prevalent of these is replacing
getOperand(0) with getDebugOperand(0) for debug-value-specific code, as the
operands corresponding to values will no longer be at index 0, but index 2 and
upwards: getDebugOperand(x) == getOperand(x+2). Similar replacements have been
added for the other operands, along with some helper functions to replace
oft-repeated code and operate on a variable number of value operands.

[0] http://lists.llvm.org/pipermail/llvm-dev/2020-February/139376.html&lt;Paste&gt;

Differential Revision: https://reviews.llvm.org/D81852
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Following on from this RFC[0] from a while back, this is the first patch towards
implementing variadic debug values.

This patch specifically adds a set of functions to MachineInstr for performing
operations specific to debug values, and replacing uses of the more general
functions where appropriate. The most prevalent of these is replacing
getOperand(0) with getDebugOperand(0) for debug-value-specific code, as the
operands corresponding to values will no longer be at index 0, but index 2 and
upwards: getDebugOperand(x) == getOperand(x+2). Similar replacements have been
added for the other operands, along with some helper functions to replace
oft-repeated code and operate on a variable number of value operands.

[0] http://lists.llvm.org/pipermail/llvm-dev/2020-February/139376.html&lt;Paste&gt;

Differential Revision: https://reviews.llvm.org/D81852
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][LiveDebugValues] Document how LiveDebugValues operates</title>
<updated>2020-06-18T09:54:09+00:00</updated>
<author>
<name>Jeremy Morse</name>
<email>jeremy.morse@sony.com</email>
</author>
<published>2020-06-18T09:54:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3626eba11f2367da88ccb0280a34731243278034'/>
<id>3626eba11f2367da88ccb0280a34731243278034</id>
<content type='text'>
We're missing a plain English explanation of how this pass is supposed
to operate -- add one to the file comment.

Differential Revision: https://reviews.llvm.org/D80929
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're missing a plain English explanation of how this pass is supposed
to operate -- add one to the file comment.

Differential Revision: https://reviews.llvm.org/D80929
</pre>
</div>
</content>
</entry>
<entry>
<title>[LiveDebugValues] Fix output stream (NFC)</title>
<updated>2020-06-05T18:02:22+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-05-30T14:07:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d370088611873565d778add5a0a983fdb29d6872'/>
<id>d370088611873565d778add5a0a983fdb29d6872</id>
<content type='text'>
This should dump to the provided Out, rather than dbgs(), though
they coincide in current usage.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should dump to the provided Out, rather than dbgs(), though
they coincide in current usage.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LiveDebugValues] Remove PendingInLocs (NFC)</title>
<updated>2020-06-05T18:01:29+00:00</updated>
<author>
<name>Nikita Popov</name>
<email>nikita.ppv@gmail.com</email>
</author>
<published>2020-05-30T14:13:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6a5326492606d767a7eb94ef418799a95e02ed07'/>
<id>6a5326492606d767a7eb94ef418799a95e02ed07</id>
<content type='text'>
PendingInLocs ends up having the same value as InLocs, just computed
a bit more indirectly. It is a leftover of a previous implementation
approach.

This patch drops PendingInLocs, as well as the Diff and Removed
calulations, which are no longer needed.

Differential Revision: https://reviews.llvm.org/D80868
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PendingInLocs ends up having the same value as InLocs, just computed
a bit more indirectly. It is a leftover of a previous implementation
approach.

This patch drops PendingInLocs, as well as the Diff and Removed
calulations, which are no longer needed.

Differential Revision: https://reviews.llvm.org/D80868
</pre>
</div>
</content>
</entry>
<entry>
<title>[LiveDebugValues] Cache LexicalScopes::getMachineBasicBlocks, NFCI</title>
<updated>2020-06-04T23:58:45+00:00</updated>
<author>
<name>Vedant Kumar</name>
<email>vsk@apple.com</email>
</author>
<published>2020-05-28T22:57:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=198762680e1e66518ee531c9cce5bf1933accea3'/>
<id>198762680e1e66518ee531c9cce5bf1933accea3</id>
<content type='text'>
Summary:
Cache the results from getMachineBasicBlocks in LexicalScopes to speed
up UserValueScopes::dominates queries.  This replaces the caching done
in UserValueScopes. Compared to the old caching method, this reduces
memory traffic when a VarLoc is copied (e.g. when a VarLocMap grows),
and enables caching across basic blocks.

When compiling sqlite 3.5.7 (CTMark version), this patch reduces the
number of calls to getMachineBasicBlocks from 10,207 to 1,093. I also
measured a small compile-time reduction (~ 0.1% of total wall time, on
average, on my machine).

As a drive-by, I made the DebugLoc in UserValueScopes a const reference
to cut down on MetadataTracking traffic.

Reviewers: jmorse, Orlando, aprantl, nikic

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80957
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Cache the results from getMachineBasicBlocks in LexicalScopes to speed
up UserValueScopes::dominates queries.  This replaces the caching done
in UserValueScopes. Compared to the old caching method, this reduces
memory traffic when a VarLoc is copied (e.g. when a VarLocMap grows),
and enables caching across basic blocks.

When compiling sqlite 3.5.7 (CTMark version), this patch reduces the
number of calls to getMachineBasicBlocks from 10,207 to 1,093. I also
measured a small compile-time reduction (~ 0.1% of total wall time, on
average, on my machine).

As a drive-by, I made the DebugLoc in UserValueScopes a const reference
to cut down on MetadataTracking traffic.

Reviewers: jmorse, Orlando, aprantl, nikic

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80957
</pre>
</div>
</content>
</entry>
<entry>
<title>[LiveDebugValues] Remove early-exit when testing regmasks, NFC</title>
<updated>2020-06-01T22:16:10+00:00</updated>
<author>
<name>Vedant Kumar</name>
<email>vsk@apple.com</email>
</author>
<published>2020-05-30T05:47:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=776708b00bddb01f91b8d44f6853770966d335a5'/>
<id>776708b00bddb01f91b8d44f6853770966d335a5</id>
<content type='text'>
In transferRegisterDef, if the instruction has a regmask attached, we'll
check if any currently used register is clobbered by the regmask.

The early exit in this scan isn't necessary, costs a set lookup, and is
almost never taken [1]. Delete it.

[1]
http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp.html#L1136
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In transferRegisterDef, if the instruction has a regmask attached, we'll
check if any currently used register is clobbered by the regmask.

The early exit in this scan isn't necessary, costs a set lookup, and is
almost never taken [1]. Delete it.

[1]
http://lab.llvm.org:8080/coverage/coverage-reports/coverage/Users/buildslave/jenkins/workspace/coverage/llvm-project/llvm/lib/CodeGen/LiveDebugValues.cpp.html#L1136
</pre>
</div>
</content>
</entry>
<entry>
<title>[LiveDebugValues] Add LocIndex::u32_{location,index}_t types for readability, NFC</title>
<updated>2020-06-01T18:02:36+00:00</updated>
<author>
<name>Vedant Kumar</name>
<email>vsk@apple.com</email>
</author>
<published>2020-06-01T18:01:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=11c617c417766c7ff36a8fefb9bd2b608c971e19'/>
<id>11c617c417766c7ff36a8fefb9bd2b608c971e19</id>
<content type='text'>
This is per Adrian's suggestion in https://reviews.llvm.org/D80684.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is per Adrian's suggestion in https://reviews.llvm.org/D80684.
</pre>
</div>
</content>
</entry>
<entry>
<title>[LiveDebugValues] Speed up removeEntryValue, NFC</title>
<updated>2020-06-01T18:02:36+00:00</updated>
<author>
<name>Vedant Kumar</name>
<email>vsk@apple.com</email>
</author>
<published>2020-05-28T01:19:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2ecaf93525fe4b271117d3932118ecaccdacaa03'/>
<id>2ecaf93525fe4b271117d3932118ecaccdacaa03</id>
<content type='text'>
Summary:
Instead of iterating over all VarLoc IDs in removeEntryValue(), just
iterate over the interval reserved for entry value VarLocs. This changes
the iteration order, hence the test update -- otherwise this is NFC.

This appears to give an ~8.5x wall time speed-up for LiveDebugValues when
compiling sqlite3.c 3.30.1 with a Release clang (on my machine):

```
          ---User Time---   --System Time--   --User+System--   ---Wall Time--- --- Name ---
  Before: 2.5402 ( 18.8%)   0.0050 (  0.4%)   2.5452 ( 17.3%)   2.5452 ( 17.3%) Live DEBUG_VALUE analysis
   After: 0.2364 (  2.1%)   0.0034 (  0.3%)   0.2399 (  2.0%)   0.2398 (  2.0%) Live DEBUG_VALUE analysis
```

The change in removeEntryValue() is the only one that appears to affect
wall time, but for consistency (and to resolve a pending TODO), I made
the analogous changes for iterating over SpillLocKind VarLocs.

Reviewers: nikic, aprantl, jmorse, djtodoro

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80684
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Instead of iterating over all VarLoc IDs in removeEntryValue(), just
iterate over the interval reserved for entry value VarLocs. This changes
the iteration order, hence the test update -- otherwise this is NFC.

This appears to give an ~8.5x wall time speed-up for LiveDebugValues when
compiling sqlite3.c 3.30.1 with a Release clang (on my machine):

```
          ---User Time---   --System Time--   --User+System--   ---Wall Time--- --- Name ---
  Before: 2.5402 ( 18.8%)   0.0050 (  0.4%)   2.5452 ( 17.3%)   2.5452 ( 17.3%) Live DEBUG_VALUE analysis
   After: 0.2364 (  2.1%)   0.0034 (  0.3%)   0.2399 (  2.0%)   0.2398 (  2.0%) Live DEBUG_VALUE analysis
```

The change in removeEntryValue() is the only one that appears to affect
wall time, but for consistency (and to resolve a pending TODO), I made
the analogous changes for iterating over SpillLocKind VarLocs.

Reviewers: nikic, aprantl, jmorse, djtodoro

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80684
</pre>
</div>
</content>
</entry>
</feed>
