[PATCH] D14122: [SimplifyCFG] Trim duplicate basic blocks in switch cases

Dylan McKay via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 19:20:51 PDT 2015


dylanmckay updated this revision to Diff 38618.
dylanmckay added a comment.

Added flags to ARM and AArch64 tests as suggested by Tim - this fixes the tests.

Added a hidden command line parameter to disable duplicate basic block merging. This fixes the two broken X86 tests, which were trivially broken due to basic block renaming. This also fixes CoveredLookupTable.ll for the same reason.

- Moved basic block comparison into a method on BasicBlock
- Removed redundant braces
- Changed assert message


http://reviews.llvm.org/D14122

Files:
  include/llvm/IR/BasicBlock.h
  lib/IR/BasicBlock.cpp
  lib/Transforms/Utils/SimplifyCFG.cpp
  test/CodeGen/AArch64/arm64-jumptable.ll
  test/CodeGen/ARM/jump-table-islands-split.ll
  test/Transforms/SimplifyCFG/CoveredLookupTable.ll
  test/Transforms/SimplifyCFG/X86/switch-table-bug.ll
  test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
  test/Transforms/SimplifyCFG/switch-duplicate-successors.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14122.38618.patch
Type: text/x-patch
Size: 8918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151028/c3b0e0fe/attachment.bin>


More information about the llvm-commits mailing list