[PATCH] D99546: [llvm][ValueMap] Share the value map between MappingContext

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 29 15:42:44 PDT 2021


dexonsmith added a comment.

Note this somewhat convoluted mapping context code was added in f0d73f95c15f909c6034f1735632695248bb75a8 to deal with comdats, but it has been long enough I don't remember precisely why the comdat tests failed without it. It'd be great to simplify this if we can...



================
Comment at: llvm/test/Linker/global-alias-value-map.ll:6
+
+@"$ss8SIMDMaskVyxGs11SIMDStoragessADPy6ScalarQzSicigTW.ptrauth" = dso_local local_unnamed_addr constant i8* bitcast (void (i1*, i64, i64*, i64*, i8**)* @"$ss8SIMDMaskVyxGs11SIMDStoragessADPy6ScalarQzSicigTW" to i8*)
+
----------------
Please simplify the symbol names in the testcase; I'd suggest something like:
```
@dsolocal = ...
@alias = ...
@constant1 = ...
@constant2 = ...
define @function(...) { ... }
declare @external(...)
```


================
Comment at: llvm/test/Linker/global-alias-value-map.ll:10-12
+@"$ss27ExpressibleByIntegerLiteralMp" = constant <{ i32, i32 }> <{ i32 0, i32 trunc (i64 sub (i64 ptrtoint (<{ i32, i32 }>* @"$ss35_ExpressibleByBuiltinIntegerLiteralMp" to i64), i64 ptrtoint (i32* getelementptr inbounds (<{ i32, i32 }>, <{ i32, i32 }>* @"$ss27ExpressibleByIntegerLiteralMp", i32 0, i32 0) to i64)) to i32)}>
+
+@"$ss35_ExpressibleByBuiltinIntegerLiteralMp" = constant <{ i32, i32 }> <{ i32 0, i32 0 }>
----------------
I wonder, can this be reduced further by inlining the second constant into the first?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99546/new/

https://reviews.llvm.org/D99546



More information about the llvm-commits mailing list