<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bcm5719-llvm/llvm/test/Transforms/ObjCARC, branch meklort-10.0.1</title>
<subtitle>Project Ortega BCM5719 LLVM</subtitle>
<id>https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1</id>
<link rel='self' href='https://git.raptorcs.com/git/bcm5719-llvm/atom?h=meklort-10.0.1'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/'/>
<updated>2019-11-19T20:02:01+00:00</updated>
<entry>
<title>llvm/ObjCARC: Eliminate inlined AutoreleaseRV calls</title>
<updated>2019-11-19T20:02:01+00:00</updated>
<author>
<name>Duncan P. N. Exon Smith</name>
<email>dexonsmith@apple.com</email>
</author>
<published>2019-11-18T01:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=3279724905c14a8db383ade53af40a0dd49504d8'/>
<id>urn:sha1:3279724905c14a8db383ade53af40a0dd49504d8</id>
<content type='text'>
Pair up inlined AutoreleaseRV calls with their matching RetainRV or
ClaimRV.

- RetainRV cancels out AutoreleaseRV.  Delete both instructions.
- ClaimRV is a peephole for RetainRV+Release.  Delete AutoreleaseRV and
  replace ClaimRV with Release.

This avoids problems where more aggressive inlining triggers memory
regressions.

This patch is happy to skip over non-callable instructions and non-ARC
intrinsics looking for the pair.  It is likely sound to also skip over
opaque function calls, but that's harder to reason about, and it's not
relevant to the goal here: if there's an opaque function call splitting
up a pair, it's very unlikely that a handshake would have happened
dynamically without inlining.

Note that this patch also subsumes the previous logic that looked
backwards from ReleaseRV.

https://reviews.llvm.org/D70370
rdar://problem/46509586
</content>
</entry>
<entry>
<title>[ObjC][ARC] Ignore lifetime markers between *ReturnValue calls</title>
<updated>2019-11-05T14:39:22+00:00</updated>
<author>
<name>Francis Visoiu Mistrih</name>
<email>francisvm@yahoo.com</email>
</author>
<published>2019-11-05T00:28:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=47d1029788b6744596bb1ab6791450eb32f2a488'/>
<id>urn:sha1:47d1029788b6744596bb1ab6791450eb32f2a488</id>
<content type='text'>
When eliminating a pair of

`llvm.objc.autoreleaseReturnValue`

followed by

`llvm.objc.retainAutoreleasedReturnValue`

we need to make sure that the instructions in between are safe to
ignore.

Other than bitcasts and useless GEPs, it's also safe to ignore lifetime
markers for both static allocas (lifetime.start/lifetime.end) and dynamic
allocas (stacksave/stackrestore).

These get added by the inliner as part of the return sequence and can
prevent the transformation from happening in practice.

Differential Revision: https://reviews.llvm.org/D69833
</content>
</entry>
<entry>
<title>[NFC][ObjC][ARC] Add tests for OptimizeRetainRVCall</title>
<updated>2019-11-05T14:39:22+00:00</updated>
<author>
<name>Francis Visoiu Mistrih</name>
<email>francisvm@yahoo.com</email>
</author>
<published>2019-11-05T00:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=68f39de042ef34ef17d93c18e80d42f2e1a970ab'/>
<id>urn:sha1:68f39de042ef34ef17d93c18e80d42f2e1a970ab</id>
<content type='text'>
Add tests for bitcasts + zero GEPs, and pre-commit tests for lifetime
markers.
</content>
</entry>
<entry>
<title>[ObjC][ARC] Skip debug instructions when computing the insert point of</title>
<updated>2019-09-19T20:58:51+00:00</updated>
<author>
<name>Akira Hatanaka</name>
<email>ahatanaka@apple.com</email>
</author>
<published>2019-09-19T20:58:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=75fbb171c3093cb325972b989f240383711635f4'/>
<id>urn:sha1:75fbb171c3093cb325972b989f240383711635f4</id>
<content type='text'>
objc_release calls

This fixes a bug where the presence of debug instructions would cause
ARC optimizer to change the order of retain and release calls.

rdar://problem/55319419

llvm-svn: 372352
</content>
</entry>
<entry>
<title>[FunctionAttrs] Annotate "willreturn" for intrinsics</title>
<updated>2019-07-28T06:09:56+00:00</updated>
<author>
<name>Hideto Ueno</name>
<email>uenoku.tokotoko@gmail.com</email>
</author>
<published>2019-07-28T06:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=cc0a4cdc890f738fc93916a8604301362bcc9d57'/>
<id>urn:sha1:cc0a4cdc890f738fc93916a8604301362bcc9d57</id>
<content type='text'>
Summary:
In D62801, new function attribute `willreturn` was introduced. In short, a function with `willreturn` is guaranteed to come back to the call site(more precise definition is in LangRef).

In this patch, willreturn is annotated for LLVM intrinsics.

Reviewers: jdoerfert

Reviewed By: jdoerfert

Subscribers: jvesely, nhaehnle, sstefan1, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D64904

llvm-svn: 367184
</content>
</entry>
<entry>
<title>[ObjC][ARC] Delete ObjC runtime calls on global variables annotated</title>
<updated>2019-06-14T22:06:32+00:00</updated>
<author>
<name>Akira Hatanaka</name>
<email>ahatanaka@apple.com</email>
</author>
<published>2019-06-14T22:06:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=a704a8f28c4f0ece30f77ab3faf70151bffb4b23'/>
<id>urn:sha1:a704a8f28c4f0ece30f77ab3faf70151bffb4b23</id>
<content type='text'>
with 'objc_arc_inert'

Those calls are no-ops, so they can be safely deleted.

rdar://problem/49839633

Differential Revision: https://reviews.llvm.org/D62433

llvm-svn: 363468
</content>
</entry>
<entry>
<title>[IR] Disallow llvm.global_ctors and llvm.global_dtors of the 2-field form in textual format</title>
<updated>2019-05-15T02:35:32+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2019-05-15T02:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=f4dfd63c74899e2953b176de2174ae7a8924a72c'/>
<id>urn:sha1:f4dfd63c74899e2953b176de2174ae7a8924a72c</id>
<content type='text'>
The 3-field form was introduced by D3499 in 2014 and the legacy 2-field
form was planned to be removed in LLVM 4.0

For the textual format, this patch migrates the existing 2-field form to
use the 3-field form and deletes the compatibility code.
test/Verifier/global-ctors-2.ll checks we have a friendly error message.

For bitcode, lib/IR/AutoUpgrade UpgradeGlobalVariables will upgrade the
2-field form (add i8* null as the third field).

Reviewed By: rnk, dexonsmith

Differential Revision: https://reviews.llvm.org/D61547

llvm-svn: 360742
</content>
</entry>
<entry>
<title>[ObjC][ARC] Let ARC optimizer bail out if the number of pointer states</title>
<updated>2019-04-25T19:42:55+00:00</updated>
<author>
<name>Akira Hatanaka</name>
<email>ahatanaka@apple.com</email>
</author>
<published>2019-04-25T19:42:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=8edf8f317b59e9a69823c816e850a04b9b6ae015'/>
<id>urn:sha1:8edf8f317b59e9a69823c816e850a04b9b6ae015</id>
<content type='text'>
it keeps track of becomes too large

ARC optimizer does a top-down and a bottom-up traversal of the whole
function to pair up retain and release instructions and remove them.
This can be expensive if the number of instructions in the function and
pointer states it tracks are large since it has to look at each pointer
state and determine whether the instruction being visited can
potentially use the pointer.

This patch adds a command line option that sets a limit to the number of
pointers it tracks.

rdar://problem/49477063

Differential Revision: https://reviews.llvm.org/D61100

llvm-svn: 359226
</content>
</entry>
<entry>
<title>[ObjC][ARC] Check the basic block size before calling</title>
<updated>2019-04-23T19:49:03+00:00</updated>
<author>
<name>Akira Hatanaka</name>
<email>ahatanaka@apple.com</email>
</author>
<published>2019-04-23T19:49:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=5c3117b0a98dd11717eaffd7fb583985d39544b2'/>
<id>urn:sha1:5c3117b0a98dd11717eaffd7fb583985d39544b2</id>
<content type='text'>
DominatorTree::dominate.

ARC contract pass has an optimization that replaces the uses of the
argument of an ObjC runtime function call with the call result.

For example:

; Before optimization
%1 = tail call i8* @foo1()
%2 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %1)
store i8* %1, i8** @g0, align 8

; After optimization
%1 = tail call i8* @foo1()
%2 = tail call i8* @llvm.objc.retainAutoreleasedReturnValue(i8* %1)
store i8* %2, i8** @g0, align 8 // %1 is replaced with %2

Before replacing the argument use, DominatorTree::dominate is called to
determine whether the user instruction is dominated by the ObjC runtime
function call instruction. The call to DominatorTree::dominate can be
expensive if the two instructions belong to the same basic block and the
size of the basic block is large. This patch checks the basic block size
and just bails out if the size exceeds the limit set by command line
option "arc-contract-max-bb-size".

rdar://problem/49477063

Differential Revision: https://reviews.llvm.org/D60900

llvm-svn: 359027
</content>
</entry>
<entry>
<title>Revert "Temporarily Revert "Add basic loop fusion pass.""</title>
<updated>2019-04-17T04:52:47+00:00</updated>
<author>
<name>Eric Christopher</name>
<email>echristo@gmail.com</email>
</author>
<published>2019-04-17T04:52:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/bcm5719-llvm/commit/?id=cee313d288a4faf0355d76fb6e0e927e211d08a5'/>
<id>urn:sha1:cee313d288a4faf0355d76fb6e0e927e211d08a5</id>
<content type='text'>
The reversion apparently deleted the test/Transforms directory.

Will be re-reverting again.

llvm-svn: 358552
</content>
</entry>
</feed>
