<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm/lib/CodeGen/LiveRangeEdit.cpp, branch release-3.2</title>
<subtitle>Unofficial llvm GIT mirror used in EmbToolkit
</subtitle>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/'/>
<entry>
<title>Avoid rematerializing a redef immediately after the old def.</title>
<updated>2012-10-16T22:51:58+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-10-16T22:51:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=320db3f8052c9f506d9ea043ba5da534df40aa08'/>
<id>320db3f8052c9f506d9ea043ba5da534df40aa08</id>
<content type='text'>
PR14098 contains an example where we would rematerialize a MOV8ri
immediately after the original instruction:

  %vreg7:sub_8bit&lt;def&gt; = MOV8ri 9; GR32_ABCD:%vreg7
  %vreg22:sub_8bit&lt;def&gt; = MOV8ri 9; GR32_ABCD:%vreg7

Besides being pointless, it is also wrong since the original instruction
only redefines part of the register, and the value read by the new
instruction is wrong.

The problem was the LiveRangeEdit::allUsesAvailableAt() didn't
special-case OrigIdx == UseIdx and found the wrong SSA value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166068 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
PR14098 contains an example where we would rematerialize a MOV8ri
immediately after the original instruction:

  %vreg7:sub_8bit&lt;def&gt; = MOV8ri 9; GR32_ABCD:%vreg7
  %vreg22:sub_8bit&lt;def&gt; = MOV8ri 9; GR32_ABCD:%vreg7

Besides being pointless, it is also wrong since the original instruction
only redefines part of the register, and the value read by the new
instruction is wrong.

The problem was the LiveRangeEdit::allUsesAvailableAt() didn't
special-case OrigIdx == UseIdx and found the wrong SSA value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166068 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove LIS::isAllocatable() and isReserved() helpers.</title>
<updated>2012-10-15T22:14:34+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-10-15T22:14:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=790047620a8f31cee1841c06c9e5e7688166ad93'/>
<id>790047620a8f31cee1841c06c9e5e7688166ad93</id>
<content type='text'>
All callers can simply use the corresponding MRI functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165985 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All callers can simply use the corresponding MRI functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165985 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid dereferencing a NULL pointer.</title>
<updated>2012-09-27T16:34:19+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-09-27T16:34:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=ddc26d89362330995f59ad29eb8bb439a817050b'/>
<id>ddc26d89362330995f59ad29eb8bb439a817050b</id>
<content type='text'>
Fixes PR13943.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164778 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes PR13943.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164778 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid creating dangling physreg live ranges during DCE.</title>
<updated>2012-08-02T16:36:47+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-08-02T16:36:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=e2b83ab056836067e2c86ef22223a4c29fe267ce'/>
<id>e2b83ab056836067e2c86ef22223a4c29fe267ce</id>
<content type='text'>
LiveRangeEdit::eliminateDeadDefs() can delete a dead instruction that
reads unreserved physregs. This would leave the corresponding regunit
live interval dangling because we don't have shrinkToUses() for physical
registers.

Fix this problem by turning the instruction into a KILL instead of
deleting it. This happens in a landing pad in
test/CodeGen/X86/2012-05-19-CoalescerCrash.ll:

  %vreg27&lt;def,dead&gt; = COPY %EDX&lt;kill&gt;; GR32:%vreg27

becomes:

  KILL %EDX&lt;kill&gt;

An upcoming fix to the machine verifier will catch problems like this by
verifying regunit live intervals.

This fixes PR13498. I am not including the test case from the PR since
we already have one exposing the problem once the verifier is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161182 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LiveRangeEdit::eliminateDeadDefs() can delete a dead instruction that
reads unreserved physregs. This would leave the corresponding regunit
live interval dangling because we don't have shrinkToUses() for physical
registers.

Fix this problem by turning the instruction into a KILL instead of
deleting it. This happens in a landing pad in
test/CodeGen/X86/2012-05-19-CoalescerCrash.ll:

  %vreg27&lt;def,dead&gt; = COPY %EDX&lt;kill&gt;; GR32:%vreg27

becomes:

  KILL %EDX&lt;kill&gt;

An upcoming fix to the machine verifier will catch problems like this by
verifying regunit live intervals.

This fixes PR13498. I am not including the test case from the PR since
we already have one exposing the problem once the verifier is fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161182 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid folding loads that are unsafe to move.</title>
<updated>2012-07-20T21:29:31+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-07-20T21:29:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=2ec0cda5d5ede57022eb7dc5e7170f4fa420cb2b'/>
<id>2ec0cda5d5ede57022eb7dc5e7170f4fa420cb2b</id>
<content type='text'>
LiveRangeEdit::foldAsLoad() can eliminate a register by folding a load
into its only use. Only do that when the load is safe to move, and it
won't extend any live ranges.

This fixes PR13414.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160575 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LiveRangeEdit::foldAsLoad() can eliminate a register by folding a load
into its only use. Only do that when the load is safe to move, and it
won't extend any live ranges.

This fixes PR13414.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160575 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Use MRI::isConstantPhysReg() to check remat feasibility.</title>
<updated>2012-06-22T17:31:01+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-06-22T17:31:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=834a9cdbb78c1a16c8ceecb018a324a3ba31c365'/>
<id>834a9cdbb78c1a16c8ceecb018a324a3ba31c365</id>
<content type='text'>
Don't depend on LiveIntervals::hasInterval() to determine if a physreg
is reserved and constant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159013 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't depend on LiveIntervals::hasInterval() to determine if a physreg
is reserved and constant.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159013 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Only erase virtregs with no uses left.</title>
<updated>2012-05-22T14:52:12+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-05-22T14:52:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=76ff7418361c1c80ce9d018bce63511a70bd7390'/>
<id>76ff7418361c1c80ce9d018bce63511a70bd7390</id>
<content type='text'>
Also make sure registers aren't erased twice if the dead def mentions
the register twice.

This fixes PR12911.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157254 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also make sure registers aren't erased twice if the dead def mentions
the register twice.

This fixes PR12911.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157254 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix 12892.</title>
<updated>2012-05-19T23:34:59+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-05-19T23:34:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=7ebed91fddbcd259d03c4b438719ac1ce2a4fc87'/>
<id>7ebed91fddbcd259d03c4b438719ac1ce2a4fc87</id>
<content type='text'>
Dead code elimination during coalescing could cause a virtual register
to be split into connected components. The following rewriting would be
confused about the already joined copies present in the code, but
without a corresponding value number in the live range.

Erase all joined copies instantly when joining intervals such that the
MI and LiveInterval representations are always in sync.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157135 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Dead code elimination during coalescing could cause a virtual register
to be split into connected components. The following rewriting would be
confused about the already joined copies present in the code, but
without a corresponding value number in the live range.

Erase all joined copies instantly when joining intervals such that the
MI and LiveInterval representations are always in sync.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157135 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow LiveRangeEdit to be created with a NULL parent.</title>
<updated>2012-05-19T05:25:46+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-05-19T05:25:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=20942dcd8634ad75091fe89669868cfebf74e869'/>
<id>20942dcd8634ad75091fe89669868cfebf74e869</id>
<content type='text'>
The dead code elimination with callbacks is still useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157100 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dead code elimination with callbacks is still useful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157100 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Modernize naming convention for class members.</title>
<updated>2012-05-18T22:10:15+00:00</updated>
<author>
<name>Jakob Stoklund Olesen</name>
<email>stoklund@2pi.dk</email>
</author>
<published>2012-05-18T22:10:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/llvm/commit/?id=c696c8bd35a8ab293879e821142dd9136201f16e'/>
<id>c696c8bd35a8ab293879e821142dd9136201f16e</id>
<content type='text'>
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157079 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157079 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
</feed>
