[PATCH] D137234: [CodeGenPrep] Change ValueToSExts from DeseMap to MapVector

Haohai, Wen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 2 01:43:01 PDT 2022


HaohaiWen created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
HaohaiWen requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

mergeSExts iterates throught ValueToSExts. Using DenseMap result in
unstable optimization path so that output IR may vary even if the input
IR is same.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137234

Files:
  llvm/lib/CodeGen/CodeGenPrepare.cpp


Index: llvm/lib/CodeGen/CodeGenPrepare.cpp
===================================================================
--- llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -287,7 +287,7 @@
 using TypeIsSExt = PointerIntPair<Type *, 2, ExtType>;
 using InstrToOrigTy = DenseMap<Instruction *, TypeIsSExt>;
 using SExts = SmallVector<Instruction *, 16>;
-using ValueToSExts = DenseMap<Value *, SExts>;
+using ValueToSExts = MapVector<Value *, SExts>;
 
 class TypePromotionTransaction;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137234.472535.patch
Type: text/x-patch
Size: 508 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221102/3a8e3838/attachment.bin>


More information about the llvm-commits mailing list