[PATCH] D38631: [SimplifyCFG] use pass options and remove the latesimplifycfg pass

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 09:24:17 PDT 2017


spatel created this revision.
Herald added subscribers: javed.absar, mcrosier, mehdi_amini.
Herald added a reviewer: deadalnix.

This is no-functional-change-intended, but there's enough churn here that I thought it would be best to do this as a preliminary patch for https://reviews.llvm.org/D38566.

This is repackaging the functionality of https://reviews.llvm.org/D30333 (defer switch-to-lookup-tables) and https://reviews.llvm.org/D35411 (defer folding unconditional branches) with pass parameters rather than a named "latesimplifycfg" pass. Now that we have individual options to control the functionality, we could decouple when these fire (but that's an independent patch if desired). The next planned step would be to add another option bit to disable the sinking transform mentioned in https://reviews.llvm.org/D38566.

As mentioned in https://reviews.llvm.org/D38138, I don't know if it's intentional or oversight that we don't have a "latesimplifycfg" equivalent invocation with the new pass manager pipeline. To make that explicit, I removed the default constructor used by that PM, so we'd be aware that we're always creating an "early" (ie, not fully functional) version of the simplifycfg pass.


https://reviews.llvm.org/D38631

Files:
  include/llvm-c/Transforms/Scalar.h
  include/llvm/InitializePasses.h
  include/llvm/LinkAllPasses.h
  include/llvm/Transforms/Scalar.h
  include/llvm/Transforms/Scalar/SimplifyCFG.h
  include/llvm/Transforms/Utils/Local.h
  lib/LTO/LTOCodeGenerator.cpp
  lib/Passes/PassBuilder.cpp
  lib/Passes/PassRegistry.def
  lib/Target/AArch64/AArch64TargetMachine.cpp
  lib/Target/ARM/ARMTargetMachine.cpp
  lib/Transforms/IPO/PassManagerBuilder.cpp
  lib/Transforms/Scalar/Scalar.cpp
  lib/Transforms/Scalar/SimplifyCFGPass.cpp
  test/CodeGen/AArch64/cmpxchg-idioms.ll
  test/Transforms/LoopVectorize/X86/float-induction-x86.ll
  test/Transforms/LoopVectorize/float-induction.ll
  test/Transforms/SimplifyCFG/ARM/switch-to-lookup-table.ll
  test/Transforms/SimplifyCFG/CoveredLookupTable.ll
  test/Transforms/SimplifyCFG/X86/disable-lookup-table.ll
  test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll
  test/Transforms/SimplifyCFG/X86/switch-table-bug.ll
  test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll
  test/Transforms/SimplifyCFG/multiple-phis.ll
  test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll
  test/Transforms/SimplifyCFG/rangereduce.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38631.118013.patch
Type: text/x-patch
Size: 33519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171006/9eb95cdc/attachment.bin>


More information about the llvm-commits mailing list