diff options
author | Keno Fischer <kfischer@college.harvard.edu> | 2016-01-07 22:39:11 +0000 |
---|---|---|
committer | Keno Fischer <kfischer@college.harvard.edu> | 2016-01-07 22:39:11 +0000 |
commit | ea33a258162a7af6ee400fca06ef917e0ba960db (patch) | |
tree | 19393c6707d8277bde1114a490586a7ad9d7d890 /llvm/lib/CodeGen/StackColoring.cpp | |
parent | 6e8526358fba6da130202b349a81af7fcf11a960 (diff) | |
download | bcm5719-llvm-ea33a258162a7af6ee400fca06ef917e0ba960db.tar.gz bcm5719-llvm-ea33a258162a7af6ee400fca06ef917e0ba960db.zip |
Temporarily revert r257105 "[Verifier] Check that debug values have proper size"
Looks like there's a case where clang generates debug info that triggers
the new verifier check. Reverting while investigating.
llvm-svn: 257107
Diffstat (limited to 'llvm/lib/CodeGen/StackColoring.cpp')
-rw-r--r-- | llvm/lib/CodeGen/StackColoring.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/StackColoring.cpp b/llvm/lib/CodeGen/StackColoring.cpp index 505d6fd8896..3541b33a844 100644 --- a/llvm/lib/CodeGen/StackColoring.cpp +++ b/llvm/lib/CodeGen/StackColoring.cpp @@ -21,6 +21,7 @@ // //===----------------------------------------------------------------------===// +#include "llvm/CodeGen/Passes.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/PostOrderIterator.h" @@ -39,7 +40,6 @@ #include "llvm/CodeGen/MachineMemOperand.h" #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineRegisterInfo.h" -#include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/PseudoSourceValue.h" #include "llvm/CodeGen/SlotIndexes.h" #include "llvm/CodeGen/StackProtector.h" @@ -47,7 +47,6 @@ #include "llvm/IR/Dominators.h" #include "llvm/IR/Function.h" #include "llvm/IR/Instructions.h" -#include "llvm/IR/IntrinsicInst.h" #include "llvm/IR/Module.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" @@ -495,21 +494,10 @@ void StackColoring::remapInstructions(DenseMap<int, int> &SlotRemap) { // upcoming replacement. SP->adjustForColoring(From, To); - // The new alloca might not be valid in a llvm.dbg.declare for this - // variable, so undef out the use to make the verifier happy. - AllocaInst *FromAI = const_cast<AllocaInst *>(From); - if (FromAI->isUsedByMetadata()) - ValueAsMetadata::handleRAUW(FromAI, UndefValue::get(FromAI->getType())); - for (auto &Use : FromAI->uses()) { - if (BitCastInst *BCI = dyn_cast<BitCastInst>(Use.get())) - if (BCI->isUsedByMetadata()) - ValueAsMetadata::handleRAUW(BCI, UndefValue::get(BCI->getType())); - } - // Note that this will not replace uses in MMOs (which we'll update below), // or anywhere else (which is why we won't delete the original // instruction). - FromAI->replaceAllUsesWith(Inst); + const_cast<AllocaInst *>(From)->replaceAllUsesWith(Inst); } // Remap all instructions to the new stack slots. |