[llvm] [NFC][DominanceFrontier] Replace std::map with DenseMap for DomSetMapType (PR #70403)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 19:28:13 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: Wenju He (wenju-he)
<details>
<summary>Changes</summary>
DenseMap is preferred according to llvm CodingStandards.
---
Full diff: https://github.com/llvm/llvm-project/pull/70403.diff
1 Files Affected:
- (modified) llvm/include/llvm/Analysis/DominanceFrontier.h (+2-2)
``````````diff
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 *>;
``````````
</details>
https://github.com/llvm/llvm-project/pull/70403
More information about the llvm-commits
mailing list