[ARM] Pass a callback to FunctionPass constructors to enable skipping execution
authorAkira Hatanaka <ahatanaka@apple.com>
Mon, 8 Jun 2015 18:50:43 +0000 (18:50 +0000)
committerAkira Hatanaka <ahatanaka@apple.com>
Mon, 8 Jun 2015 18:50:43 +0000 (18:50 +0000)
commitfa6bc2e94d3a98eda4ddfb05d3190ee221fa6fc6
tree2322aadd8f579ea8d9ad80cb4748d34ea65c2967
parentd354befbbbbd95a8ebcf3d8db3bf3deef2033ff1
[ARM] Pass a callback to FunctionPass constructors to enable skipping execution
on a per-function basis.

Previously some of the passes were conditionally added to ARM's pass pipeline
based on the target machine's subtarget. This patch makes changes to add those
passes unconditionally and execute them conditonally based on the predicate
functor passed to the pass constructors. This enables running different sets of
passes for different functions in the module.

rdar://problem/20542263

Differential Revision: http://reviews.llvm.org/D8717

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239325 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/Passes.h
include/llvm/Transforms/Scalar.h
lib/CodeGen/IfConversion.cpp
lib/CodeGen/MachineInstrBundle.cpp
lib/Target/ARM/ARM.h
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/ARM/Thumb2SizeReduction.cpp
lib/Transforms/Scalar/SimplifyCFGPass.cpp
test/CodeGen/ARM/ifcvt-callback.ll [new file with mode: 0644]