Add pass to promote sret.
authorDevang Patel <dpatel@apple.com>
Fri, 29 Feb 2008 23:34:08 +0000 (23:34 +0000)
committerDevang Patel <dpatel@apple.com>
Fri, 29 Feb 2008 23:34:08 +0000 (23:34 +0000)
commitca891ecf9152791f72f33a0dafff6b4a022642ee
tree91294af9c6a7a3266599ad4428b4644173a985df
parent8213f9cf94c740d078b444ecb125b9a581350837
Add pass to promote sret.
This pass transforms

  %struct._Point = type { i32, i32, i32, i32, i32, i32 }
  define internal void @foo(%struct._Point* sret  %agg.result)

into

  %struct._Point = type { i32, i32, i32, i32, i32, i32 }
  define internal %struct._Point @foo()

This pass updates foo() clients appropriately to use
getresult instruction to extract return values.

This pass is not yet ready for prime time.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47776 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/IPO.h
lib/Transforms/IPO/StructRetPromotion.cpp [new file with mode: 0644]