Revamp the ValueMapper interfaces in a couple ways:
1. Take a flags argument instead of a bool. This makes it more clear to the reader what it is used for. 2. Add a flag that says that "remapping a value not in the map is ok". 3. Reimplement MapValue to share a bunch of code and be a lot more efficient. For lookup failures, don't drop null values into the map. 4. Using the new flag a bunch of code can vaporize in LinkModules and LoopUnswitch, kill it. No functionality change. llvm-svn: 123058
Showing
- llvm/include/llvm/Transforms/Utils/ValueMapper.h 21 additions, 2 deletionsllvm/include/llvm/Transforms/Utils/ValueMapper.h
- llvm/lib/Linker/LinkModules.cpp 6 additions, 29 deletionsllvm/lib/Linker/LinkModules.cpp
- llvm/lib/Transforms/Scalar/LoopRotation.cpp 1 addition, 1 deletionllvm/lib/Transforms/Scalar/LoopRotation.cpp
- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp 1 addition, 14 deletionsllvm/lib/Transforms/Scalar/LoopUnswitch.cpp
- llvm/lib/Transforms/Utils/CloneFunction.cpp 11 additions, 11 deletionsllvm/lib/Transforms/Utils/CloneFunction.cpp
- llvm/lib/Transforms/Utils/CloneModule.cpp 4 additions, 4 deletionsllvm/lib/Transforms/Utils/CloneModule.cpp
- llvm/lib/Transforms/Utils/ValueMapper.cpp 64 additions, 105 deletionsllvm/lib/Transforms/Utils/ValueMapper.cpp
Loading
Please register or sign in to comment