[PATCH] D41860: [CallSiteSplitting] Support splitting of blocks with instrs before call.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 1 06:41:21 PST 2018
fhahn marked an inline comment as done.
fhahn added inline comments.
================
Comment at: lib/Transforms/Scalar/CallSiteSplitting.cpp:290
+ DenseMap<const Value *, Value *> Mapping;
+ for (const auto &KV : Remap)
+ Mapping[KV.first] = KV.second;
----------------
junbuml wrote:
> Isn't it possible to hold space for ValueToValueMapTy for each predecessor and pass its reference to DuplicateInstructionsInSplitBetween.
>
> For example, as we only support 2 predecessors for now, we can define Remaps as a fixed size array which has ValueToValueMapTy as its element, and then we can pass the reference of each array element to DuplicateInstructionsInSplitBetween for each predecessor.
I've changed it to use a fixed size array. I am not entirely happy with it, but it's definitely nicer than the duplication :)
https://reviews.llvm.org/D41860
More information about the llvm-commits
mailing list