1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib/Transforms
Akira Hatanaka a30499dbf2 [ObjC][ARC] Don't remove autoreleaseRV/retainRV pairs if the call isn't
a tail call

This reapplies the patch in https://reviews.llvm.org/rG1f5b471b8bf4,
which was reverted because it was causing crashes.

https://bugs.chromium.org/p/chromium/issues/detail?id=1061289#c2

Check that HasSafePathToCall is true before checking the call is a tail
call.

Original commit message:

Previosly ARC optimizer removed the autoreleaseRV/retainRV pair in the
following code, which caused the object returned by @something to be
placed in the autorelease pool because the call to @something isn't a
tail call:

```
  %call = call i8* @something(...)
  %2 = call i8* @objc_retainAutoreleasedReturnValue(i8* %call)
  %3 = call i8* @objc_autoreleaseReturnValue(i8* %2)
  ret i8* %3
```

Fix the bug by checking whether @something is a tail call.

rdar://problem/59275894
2020-03-13 13:52:14 -07:00
..
AggressiveInstCombine [ConstantFolding] Always return something from ConstantFoldConstant 2020-03-04 18:24:47 +01:00
CFGuard Add missing newlines at EOF; NFC 2020-02-12 15:57:25 +00:00
Coroutines [Coroutines] Optimized coroutine elision based on reachability 2020-03-05 14:43:50 +08:00
Hello
InstCombine [SVE] Update API ConstantVector::getSplat() to use ElementCount. 2020-03-12 13:22:41 -07:00
Instrumentation Reland: [Coverage] Revise format to reduce binary size 2020-02-28 18:12:04 -08:00
IPO [Attributor] Detect possibly unbounded cycles in functions 2020-03-13 11:17:33 -05:00
ObjCARC [ObjC][ARC] Don't remove autoreleaseRV/retainRV pairs if the call isn't 2020-03-13 13:52:14 -07:00
Scalar [LoopInterchange] Fix interchanging contents of preheader BBs 2020-03-13 15:59:37 -04:00
Utils [SimplifyCFG] fix formatting; NFC 2020-03-13 14:12:28 -04:00
Vectorize [SLPVectorizer][SVE] Bail out early for scalable vector. 2020-03-13 11:23:31 -07:00
CMakeLists.txt Add Windows Control Flow Guard checks (/guard:cf). 2019-10-28 15:19:39 +00:00
LLVMBuild.txt Add Windows Control Flow Guard checks (/guard:cf). 2019-10-28 15:19:39 +00:00