1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
llvm-mirror/lib
Akira Hatanaka ca4f080a72 [ObjCARC] Do not turn a call to @objc_autoreleaseReturnValue into a call
to @objc_autorelease if its operand is a PHI and the PHI has an
equivalent value that is used by a return instruction.

For example, ARC optimizer shouldn't replace the call in the following
example, as doing so breaks the AutoreleaseRV/RetainRV optimization:

  %v1 = bitcast i32* %v0 to i8*
  br label %bb3
bb2:
  %v3 = bitcast i32* %v2 to i8*
  br label %bb3
bb3:
  %p = phi i8* [ %v1, %bb1 ], [ %v3, %bb2 ]
  %retval = phi i32* [ %v0, %bb1 ], [ %v2, %bb2 ] ; equivalent to %p
  %v4 = tail call i8* @objc_autoreleaseReturnValue(i8* %p)
  ret i32* %retval

Also, make sure ObjCARCContract replaces @objc_autoreleaseReturnValue's
operand uses with its value so that the call gets tail-called.

rdar://problem/15894705

llvm-svn: 323009
2018-01-19 23:51:13 +00:00
..
Analysis [InstSimplify] use m_Specific and commutative matcher to reduce code; NFCI 2018-01-19 16:12:55 +00:00
AsmParser Allow dso_local on ifunc. 2018-01-12 17:03:43 +00:00
BinaryFormat
Bitcode [NFC] fix trivial typos in comments 2018-01-17 12:29:38 +00:00
CodeGen Add optional DICompileUnit to DIBuilder + make outliner debug info use it 2018-01-19 21:21:49 +00:00
DebugInfo [DWARFv5] Number the line-table's directory array correctly. 2018-01-18 20:33:35 +00:00
Demangle
ExecutionEngine Fix -Wunused-variable. 2018-01-19 22:56:04 +00:00
Fuzzer
FuzzMutate
IR Add optional DICompileUnit to DIBuilder + make outliner debug info use it 2018-01-19 21:21:49 +00:00
IRReader
LineEditor
Linker Fix crash when linking metadata with ODR type uniquing 2018-01-09 18:32:53 +00:00
LTO Don't drop dso_local in LTO. 2018-01-18 05:38:43 +00:00
MC [WebAssembly] MC: Start table at offset 1 rather than 0 2018-01-19 18:57:01 +00:00
Object [WebAssembly] Remove debug names from symbol table 2018-01-17 19:28:43 +00:00
ObjectYAML [WebAssembly] Add COMDAT support 2018-01-09 23:43:14 +00:00
Option [Option] For typo '-foo', suggest '--foo' 2018-01-09 19:38:04 +00:00
Passes Add a pass to generate synthetic function entry counts. 2018-01-09 19:39:35 +00:00
ProfileData Remove superfluous copies in sample profiling. 2017-12-28 18:10:41 +00:00
Support Fallback option for colorized output when terminfo isn't available 2018-01-19 17:10:55 +00:00
TableGen Avoid int to string conversion in Twine or raw_ostream contexts. 2017-12-28 16:58:54 +00:00
Target [SystemZ] Prefer LOCHI over generating IPM sequences 2018-01-19 20:56:04 +00:00
Testing
ToolDrivers
Transforms [ObjCARC] Do not turn a call to @objc_autoreleaseReturnValue into a call 2018-01-19 23:51:13 +00:00
WindowsManifest
XRay
CMakeLists.txt
LLVMBuild.txt