summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-05-25 21:01:51 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-05-25 21:01:51 +0000
commit53a6672e21afae9d808ef229c045e65be337d166 (patch)
tree157c118eea19c8599777dd30e2a1b3a699fb247e /llvm/lib/Transforms
parent3d4f3a0da90bd1a34ff3ef4c3b99c1dbcca2e6cb (diff)
downloadbcm5719-llvm-53a6672e21afae9d808ef229c045e65be337d166.tar.gz
bcm5719-llvm-53a6672e21afae9d808ef229c045e65be337d166.zip
ValueMaterializer: fuse materializeDeclFor and materializeInitFor (NFC)
They were originally separated to handle the co-recursion between the ValueMapper and the ValueMaterializer. This recursion does not exist anymore: the ValueMapper now uses a Worklist and the ValueMaterializer is scheduling job on the Worklist. Differential Revision: http://reviews.llvm.org/D20593 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 270758
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Utils/ValueMapper.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp
index 272891fc16a..9c2e4edd5f0 100644
--- a/llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -29,8 +29,6 @@ using namespace llvm;
// Out of line method to get vtable etc for class.
void ValueMapTypeRemapper::anchor() {}
void ValueMaterializer::anchor() {}
-void ValueMaterializer::materializeInitFor(GlobalValue *New, GlobalValue *Old) {
-}
namespace {
@@ -365,11 +363,7 @@ Value *Mapper::mapValue(const Value *V) {
if (auto *Materializer = getMaterializer()) {
if (Value *NewV =
Materializer->materializeDeclFor(const_cast<Value *>(V))) {
- getVM()[V] = NewV;
- if (auto *NewGV = dyn_cast<GlobalValue>(NewV))
- Materializer->materializeInitFor(
- NewGV, cast<GlobalValue>(const_cast<Value *>(V)));
- return NewV;
+ return getVM()[V] = NewV;
}
}
OpenPOWER on IntegriCloud