HomePhabricator

IRMover: Steal arguments when moving functions, NFC

Authored by dexonsmith on Apr 5 2016, 11:38 PM.

Description

IRMover: Steal arguments when moving functions, NFC

Instead of copying arguments from the source function to the
destination, steal them. This has a few advantages.

  • The ValueMap doesn't need to be seeded with (or cleared of) Arguments.
  • Often the destination function won't have created any arguments yet, so this avoids malloc traffic.
  • Argument names don't need to be copied.

Because argument lists are lazy, this required a new
Function::stealArgumentListFrom helper.

llvm-svn: 265519

Details

Committed
dexonsmithApr 5 2016, 11:38 PM
Parents
rG5811c40bb37f: [modules] Continue factoring encoding of AST records out of ASTWriter.
Branches
Unknown
Tags
Unknown