mozilla/rust — pull request #7237 by dotdash (2013-06-19 18:36:11+00:00)
Title: Avoid unnecessary scratch datums for by-copy function arguments

Currently, by-copy function arguments are always stored into a scratch
datum, which serves two purposes. First, it is required to be able to
have a temporary cleanup, in case that the call fails before the callee
actually takes ownership of the value. Second, if the argument is to be
passed by reference, the copy is required, so that the function doesn't
get a reference to the original value.

But in case that the datum does not need a drop glue call and it is
passed by value, there's no need to perform the extra copy.

Reduces the time for the LLVM passes when compiling librustc by about
10%.