[llvm] dbeaee6 - [NFC][DominanceFrontier] Replace std::map with DenseMap for DomSetMapType (#70403)

via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 29 18:41:47 PDT 2023


Author: Wenju He
Date: 2023-10-30T09:41:43+08:00
New Revision: dbeaee61af9985a8dcdbe363d40530792b7e7904

URL: https://github.com/llvm/llvm-project/commit/dbeaee61af9985a8dcdbe363d40530792b7e7904
DIFF: https://github.com/llvm/llvm-project/commit/dbeaee61af9985a8dcdbe363d40530792b7e7904.diff

LOG: [NFC][DominanceFrontier] Replace std::map with DenseMap for DomSetMapType (#70403)

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/DominanceFrontier.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/DominanceFrontier.h b/llvm/include/llvm/Analysis/DominanceFrontier.h
index 42ede2ac5ece38d..db0130e4804b801 100644
--- a/llvm/include/llvm/Analysis/DominanceFrontier.h
+++ b/llvm/include/llvm/Analysis/DominanceFrontier.h
@@ -17,6 +17,7 @@
 #ifndef LLVM_ANALYSIS_DOMINANCEFRONTIER_H
 #define LLVM_ANALYSIS_DOMINANCEFRONTIER_H
 
+#include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/GraphTraits.h"
 #include "llvm/ADT/SetVector.h"
 #include "llvm/Config/llvm-config.h"
@@ -24,7 +25,6 @@
 #include "llvm/Pass.h"
 #include "llvm/Support/GenericDomTree.h"
 #include <cassert>
-#include <map>
 #include <utility>
 
 namespace llvm {
@@ -42,7 +42,7 @@ class DominanceFrontierBase {
   // Dom set for a bb. Use SetVector to make iterating dom frontiers of a bb
   // deterministic.
   using DomSetType = SetVector<BlockT *>;
-  using DomSetMapType = std::map<BlockT *, DomSetType>; // Dom set map
+  using DomSetMapType = DenseMap<BlockT *, DomSetType>; // Dom set map
 
 protected:
   using BlockTraits = GraphTraits<BlockT *>;


        


More information about the llvm-commits mailing list