Commit
407b1e65a464081e28c325273b65e8eafdfad1d4
by kazu[StringExtras] Add a helper class for comma-separated lists
This patch introduces a helper class SubsequentDelim to simplify loops that generate a comma-separated lists.
For example, consider the following loop, taken from llvm/lib/CodeGen/MachineBasicBlock.cpp:
for (auto I = pred_begin(), E = pred_end(); I != E; ++I) { if (I != pred_begin()) OS << ", "; OS << printMBBReference(**I); }
The new class allows us to rewrite the loop as:
SubsequentDelim SD; for (auto I = pred_begin(), E = pred_end(); I != E; ++I) OS << SD << printMBBReference(**I);
where SD evaluates to the empty string for the first time and ", " for subsequent iterations.
Unlike interleaveComma, defined in llvm/include/llvm/ADT/STLExtras.h, SubsequentDelim can accommodate a wider variety of loops, including:
- those that conditionally skip certain items, - those that need iterators to call getSuccProbability(I), and - those that iterate over integer ranges.
As an example, this patch cleans up MachineBasicBlock::print.
Differential Revision: https://reviews.llvm.org/D94377
|
 | llvm/lib/CodeGen/MachineBasicBlock.cpp |
 | llvm/include/llvm/ADT/StringExtras.h |
 | llvm/unittests/ADT/StringExtrasTest.cpp |
Commit
02bc320545deb0212a43acae24fcf2383755d383
by iCGDebugInfo: Delete unused DIFile* parameter
|
 | clang/lib/CodeGen/CGDebugInfo.cpp |
 | clang/lib/CodeGen/CGDebugInfo.h |
Commit
4739dd67e7a08b715f1d23f71fb4af16007fe80a
by listmail[LoopDeletion] Break backedge of outermost loops when known not taken
This is a resubmit of dd6bb367 (which was reverted due to stage2 build failures in 7c63aac), with the additional restriction added to the transform to only consider outer most loops.
As shown in the added test case, ensuring LCSSA is up to date when deleting an inner loop is tricky as we may actually need to remove blocks from any outer loops, thus changing the exit block set. For the moment, just avoid transforming this case. I plan to return to this case in a follow up patch and see if we can do better.
Original commit message follows...
The basic idea is that if SCEV can prove the backedge isn't taken, we can go ahead and get rid of the backedge (and thus the loop) while leaving the rest of the control in place. This nicely handles cases with dispatch between multiple exits and internal side effects.
Differential Revision: https://reviews.llvm.org/D93906
|
 | llvm/include/llvm/Transforms/Utils/LoopUtils.h |
 | llvm/test/Transforms/IndVarSimplify/exit_value_test2.ll |
 | llvm/test/Transforms/LoopDeletion/zero-btc.ll |
 | llvm/lib/Transforms/Scalar/LoopDeletion.cpp |
 | llvm/lib/Transforms/Utils/LoopUtils.cpp |
 | llvm/test/Transforms/LoopDeletion/update-scev.ll |
Commit
d43a264a5dd3c72bf9dc663551c0993921b28136
by thakisRevert "[X86][SSE] Fold unpack(hop(),hop()) -> permute(hop())"
This reverts commit 80dee7965dffdfb866afa9d74f3a4a97453708b2. Makes clang sometimes hang forever. See https://bugs.chromium.org/p/chromium/issues/detail?id=1164786#c6 for a stand-alone repro.
|
 | llvm/lib/Target/X86/X86ISelLowering.cpp |
 | llvm/test/CodeGen/X86/horizontal-shuffle-2.ll |