[PATCH] D16911: [RS4GC] Pass DenseMap by reference, NFC

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 4 17:39:38 PST 2016

JosephTremoulet created this revision.
JosephTremoulet added reviewers: sanjoy, reames.
JosephTremoulet added a subscriber: llvm-commits.

Passing the rematerialized values map to insertRematerializationStores by
value looks to be a simple oversight; update it to pass by reference.



Index: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
--- lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -1617,11 +1617,10 @@
 // Helper function for the "relocationViaAlloca". Similar to the
 // "insertRelocationStores" but works for rematerialized values.
-static void
-  RematerializedValueMapTy RematerializedValues,
-  DenseMap<Value *, Value *> &AllocaMap,
-  DenseSet<Value *> &VisitedLiveValues) {
+static void insertRematerializationStores(
+    const RematerializedValueMapTy &RematerializedValues,
+    DenseMap<Value *, Value *> &AllocaMap,
+    DenseSet<Value *> &VisitedLiveValues) {
   for (auto RematerializedValuePair: RematerializedValues) {
     Instruction *RematerializedValue = RematerializedValuePair.first;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16911.46983.patch
Type: text/x-patch
Size: 898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160205/7422fc31/attachment.bin>

More information about the llvm-commits mailing list