[PATCH] Fix bug 23851: Preserve metadata for the unswitched branch in loop-unswitch

Weiming Zhao weimingz at codeaurora.org
Wed Jun 17 22:30:26 PDT 2015


1. White list the metadata to be copied. Currently, prof and dbg nodes are copied.
2. Handle the case if True/False is swapped in the new branch
3. I prefer passing "Instruction*" instead of "SmallVectorImpl< std::pair< unsigned, MDNode * >> &MDs"  because 1) the latter is much longer 2) each call site needs to prepare the vector and call getAllMetadata().


http://reviews.llvm.org/D10458

Files:
  lib/Transforms/Scalar/LoopUnswitch.cpp
  test/Transforms/LoopUnswitch/2015-06-17-Metadata.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10458.27914.patch
Type: text/x-patch
Size: 12581 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150618/973b3250/attachment.bin>


More information about the llvm-commits mailing list