1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test
Robert Lougher a83e090ac2 [TailCallElim] Enable marking of calls with byval as tails
In r339636 the alias analysis rules were changed with regards to tail calls
and byval arguments. Previously, tail calls were assumed not to alias
allocas from the current frame. This has been updated, to not assume this
for arguments with the byval attribute.

This patch aligns TailCallElim with the new rule. Tail marking can now be
more aggressive and mark more calls as tails, e.g.:

define void @test() {
  %f = alloca %struct.foo
  call void @bar(%struct.foo* byval %f)
  ret void
}

define void @test2(%struct.foo* byval %f) {
  call void @bar(%struct.foo* byval %f)
  ret void
}

define void @test3(%struct.foo* byval %f) {
  %agg.tmp = alloca %struct.foo
  %0 = bitcast %struct.foo* %agg.tmp to i8*
  %1 = bitcast %struct.foo* %f to i8*
  call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* %1, i64 40, i1 false)
  call void @bar(%struct.foo* byval %agg.tmp)
  ret void
}

The problematic case where a byval parameter is captured by a call is still
handled correctly, and will not be marked as a tail (see PR7272).

llvm-svn: 343986
2018-10-08 18:03:40 +00:00
..
Analysis
Assembler
Bindings
Bitcode
BugPoint
CodeGen AMDGPU/GlobalISel: Select amdgcn.cvt.pkrtz to 64-bit instructions 2018-10-08 17:49:29 +00:00
DebugInfo Don't use back-quotes in a run line. 2018-10-08 15:14:05 +00:00
Demangle
Examples
ExecutionEngine
Feature
FileCheck
Instrumentation
Integer
JitListener
Linker
LTO [ThinLTO] Keep non-prevailing (linkonce|weak)_odr symbols live 2018-10-08 15:12:48 +00:00
MC [AsmParser] Return an error in the case of empty symbol ref in an expression 2018-10-08 10:28:11 +00:00
Object [llvm-ar] Use POSIX-specified timestamps for 'tv'. 2018-10-05 23:25:39 +00:00
ObjectYAML
Other Fix incorrect Twine usage in CFGPrinter 2018-10-08 17:29:39 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen
ThinLTO/X86 Fix test case for @r343970 2018-10-08 16:38:00 +00:00
tools [llvm-ar] Use POSIX-specified timestamps for 'tv'. 2018-10-05 23:25:39 +00:00
Transforms [TailCallElim] Enable marking of calls with byval as tails 2018-10-08 18:03:40 +00:00
Unit
Verifier [machineverifier] Detect PHI's that are preceeded by non-PHI's 2018-10-03 22:05:31 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg.py
lit.site.cfg.py.in
TestRunner.sh