]> granicus.if.org Git - llvm/commitdiff
Revert "Make OrderedInstructions and OrderedBasicBlock use AssertingVH, to try and...
authorXin Tong <trent.xin.tong@gmail.com>
Wed, 28 Jun 2017 22:35:54 +0000 (22:35 +0000)
committerXin Tong <trent.xin.tong@gmail.com>
Wed, 28 Jun 2017 22:35:54 +0000 (22:35 +0000)
This reverts commit 50ec560f05dcb8a1be18be442660d0305bc7de25.

It catches some bug in NewGVN it seems. I am in middle of something and will not be able to investigate
Revert for now.

http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/6268

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306608 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/OrderedBasicBlock.h
include/llvm/Transforms/Utils/OrderedInstructions.h

index dc0d3263b675d2c513bc8657f3dbecf06fc2d7db..2e716af1f60ddbbf77f92dbeebb80a1ab337c6d8 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/IR/BasicBlock.h"
-#include "llvm/IR/ValueHandle.h"
 
 namespace llvm {
 
@@ -35,7 +34,7 @@ class BasicBlock;
 class OrderedBasicBlock {
 private:
   /// \brief Map a instruction to its position in a BasicBlock.
-  SmallDenseMap<AssertingVH<const Instruction>, unsigned, 32> NumberedInsts;
+  SmallDenseMap<const Instruction *, unsigned, 32> NumberedInsts;
 
   /// \brief Keep track of last instruction inserted into \p NumberedInsts.
   /// It speeds up queries for uncached instructions by providing a start point
index 5f0aece83dc64174f55e83d33424e39e8f35de63..64c6bcb68b189c4aa943011b241d9cc9305aa0f8 100644 (file)
 #include "llvm/Analysis/OrderedBasicBlock.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/Operator.h"
-#include "llvm/IR/ValueHandle.h"
 
 namespace llvm {
 
 class OrderedInstructions {
   /// Used to check dominance for instructions in same basic block.
-  mutable DenseMap<AssertingVH<const BasicBlock>,
-                   std::unique_ptr<OrderedBasicBlock>> OBBMap;
+  mutable DenseMap<const BasicBlock *, std::unique_ptr<OrderedBasicBlock>>
+      OBBMap;
 
   /// The dominator tree of the parent function.
   DominatorTree *DT;