[InstCombine] Introducing Aggressive Instruction Combine pass (-aggressive-instcombine).
authorAmjad Aboud <amjad.aboud@intel.com>
Wed, 24 Jan 2018 12:42:42 +0000 (12:42 +0000)
committerAmjad Aboud <amjad.aboud@intel.com>
Wed, 24 Jan 2018 12:42:42 +0000 (12:42 +0000)
commite4453233d78788989c4bf2ff927a9e67433fb63d
tree852418eb4b403be8210679108562c8ddd6fb0033
parentf26df4783132de2a534572a53847716a89d98339
[InstCombine] Introducing Aggressive Instruction Combine pass (-aggressive-instcombine).

Combine expression patterns to form expressions with fewer, simple instructions.
This pass does not modify the CFG.

For example, this pass reduce width of expressions post-dominated by TruncInst
into smaller width when applicable.

It differs from instcombine pass in that it contains pattern optimization that
requires higher complexity than the O(1), thus, it should run fewer times than
instcombine pass.

Differential Revision: https://reviews.llvm.org/D38313

llvm-svn: 323321
24 files changed:
llvm/docs/Passes.rst
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h [new file with mode: 0644]
llvm/include/llvm/Transforms/Scalar.h
llvm/lib/LTO/LLVMBuild.txt
llvm/lib/Passes/LLVMBuild.txt
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombine.cpp [new file with mode: 0644]
llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h [new file with mode: 0644]
llvm/lib/Transforms/AggressiveInstCombine/CMakeLists.txt [new file with mode: 0644]
llvm/lib/Transforms/AggressiveInstCombine/LLVMBuild.txt [new file with mode: 0644]
llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp [new file with mode: 0644]
llvm/lib/Transforms/CMakeLists.txt
llvm/lib/Transforms/IPO/LLVMBuild.txt
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
llvm/lib/Transforms/LLVMBuild.txt
llvm/lib/Transforms/Scalar/LLVMBuild.txt
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-lto-defaults.ll
llvm/test/Other/new-pm-thinlto-defaults.ll
llvm/test/Transforms/AggressiveInstCombine/trunc_multi_uses.ll [new file with mode: 0644]
llvm/tools/opt/CMakeLists.txt
llvm/tools/opt/opt.cpp