[PATCH] D37284: [cfi] Fixed non-determinism in codegen due to DenseSet iteration order

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 18:08:54 PDT 2017


mgrang created this revision.

Repository:
  rL LLVM

https://reviews.llvm.org/D37284

Files:
  lib/Transforms/IPO/CrossDSOCFI.cpp


Index: lib/Transforms/IPO/CrossDSOCFI.cpp
===================================================================
--- lib/Transforms/IPO/CrossDSOCFI.cpp
+++ lib/Transforms/IPO/CrossDSOCFI.cpp
@@ -13,8 +13,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Transforms/IPO/CrossDSOCFI.h"
-#include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/EquivalenceClasses.h"
+#include "llvm/ADT/SetVector.h"
 #include "llvm/ADT/Statistic.h"
 #include "llvm/IR/Constant.h"
 #include "llvm/IR/Constants.h"
@@ -81,7 +81,7 @@
 void CrossDSOCFI::buildCFICheck(Module &M) {
   // FIXME: verify that __cfi_check ends up near the end of the code section,
   // but before the jump slots created in LowerTypeTests.
-  llvm::DenseSet<uint64_t> TypeIds;
+  SetVector<uint64_t> TypeIds;
   SmallVector<MDNode *, 2> Types;
   for (GlobalObject &GO : M.global_objects()) {
     Types.clear();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37284.113183.patch
Type: text/x-patch
Size: 914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170830/a03eb684/attachment.bin>


More information about the llvm-commits mailing list