[llvm] r306608 - Revert "Make OrderedInstructions and OrderedBasicBlock use AssertingVH, to try and catch mistakes"

Xin Tong via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 15:35:54 PDT 2017


Author: trentxintong
Date: Wed Jun 28 15:35:54 2017
New Revision: 306608

URL: http://llvm.org/viewvc/llvm-project?rev=306608&view=rev
Log:
Revert "Make OrderedInstructions and OrderedBasicBlock use AssertingVH, to try and catch mistakes"

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

Modified:
    llvm/trunk/include/llvm/Analysis/OrderedBasicBlock.h
    llvm/trunk/include/llvm/Transforms/Utils/OrderedInstructions.h

Modified: llvm/trunk/include/llvm/Analysis/OrderedBasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/OrderedBasicBlock.h?rev=306608&r1=306607&r2=306608&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/OrderedBasicBlock.h (original)
+++ llvm/trunk/include/llvm/Analysis/OrderedBasicBlock.h Wed Jun 28 15:35:54 2017
@@ -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

Modified: llvm/trunk/include/llvm/Transforms/Utils/OrderedInstructions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/OrderedInstructions.h?rev=306608&r1=306607&r2=306608&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/OrderedInstructions.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/OrderedInstructions.h Wed Jun 28 15:35:54 2017
@@ -24,14 +24,13 @@
 #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;




More information about the llvm-commits mailing list