IR: RF_IgnoreMissingValues => RF_IgnoreMissingLocals, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 7 Apr 2016 00:26:43 +0000 (00:26 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 7 Apr 2016 00:26:43 +0000 (00:26 +0000)
commitda68cbc4ad104a98182d44bb66aa08048f2cc061
tree31ecd7aacfa7351c45e203a52e137514c46e65a4
parent5d4d715b99ea46ccaef99c987c4b2dddd7cc739b
IR: RF_IgnoreMissingValues => RF_IgnoreMissingLocals, NFC

Clarify what this RemapFlag actually means.

  - Change the flag name to match its intended behaviour.
  - Clearly document that it's not supposed to affect globals.
  - Add a host of FIXMEs to indicate how to fix the behaviour to match
    the intent of the flag.

RF_IgnoreMissingLocals should only affect the behaviour of
RemapInstruction for function-local operands; namely, for operands of
type Argument, Instruction, and BasicBlock.  Currently, it is *only*
passed into RemapInstruction calls (and the transitive MapValue calls
that it makes).

When I split Metadata from Value I didn't understand the flag, and I
used it in a bunch of places for "global" metadata.

This commit doesn't have any functionality change, but prepares to
cleanup MapMetadata and MapValue.

llvm-svn: 265628
llvm/include/llvm/Transforms/Utils/ValueMapper.h
llvm/lib/CodeGen/WinEHPrepare.cpp
llvm/lib/Linker/IRMover.cpp
llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
llvm/lib/Transforms/Scalar/LoopRotation.cpp
llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
llvm/lib/Transforms/Utils/CloneFunction.cpp
llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/lib/Transforms/Utils/ValueMapper.cpp