Add Constant Hoisting Pass
authorJuergen Ributzka <juergen@apple.com>
Fri, 24 Jan 2014 20:18:00 +0000 (20:18 +0000)
committerJuergen Ributzka <juergen@apple.com>
Fri, 24 Jan 2014 20:18:00 +0000 (20:18 +0000)
commit96172cb4a44d890263c9054df35739a60569d4a5
tree70ad93330d578a0eb2ea4be59c6d552ddcffd7da
parent86720f7c65c4481c8d8518d71e2bdce59a85969e
Add Constant Hoisting Pass

Retry commit r200022 with a fix for the build bot errors. Constant expressions
have (unlike instructions) module scope use lists and therefore may have users
in different functions. The fix is to simply ignore these out-of-function uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200034 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/CodeGen/SelectionDAG.h
include/llvm/CodeGen/SelectionDAGNodes.h
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
include/llvm/Transforms/Scalar.h
lib/Analysis/TargetTransformInfo.cpp
lib/CodeGen/Passes.cpp
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/CodeGen/SelectionDAG/SelectionDAG.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/X86/X86TargetTransformInfo.cpp
lib/Transforms/Scalar/CMakeLists.txt
lib/Transforms/Scalar/CodeGenPrepare.cpp
lib/Transforms/Scalar/ConstantHoisting.cpp [new file with mode: 0644]
lib/Transforms/Scalar/Scalar.cpp
test/CodeGen/ARM/memcpy-inline.ll
test/CodeGen/X86/large-constants.ll [new file with mode: 0644]