llvm-6502/include/llvm/Transforms/Utils
Preston Gurd 2e2efd9600 Generic Bypass Slow Div
- CodeGenPrepare pass for identifying div/rem ops
- Backend specifies the type mapping using addBypassSlowDivType
- Enabled only for Intel Atom with O2 32-bit -> 8-bit
- Replace IDIV with instructions which test its value and use DIVB if the value
is positive and less than 256.
- In the case when the quotient and remainder of a divide are used a DIV
and a REM instruction will be present in the IR. In the non-Atom case
they are both lowered to IDIVs and CSE removes the redundant IDIV instruction,
using the quotient and remainder from the first IDIV. However,
due to this optimization CSE is not able to eliminate redundant
IDIV instructions because they are located in different basic blocks.
This is overcome by calculating both the quotient (DIV) and remainder (REM)
in each basic block that is inserted by the optimization and reusing the result
values when a subsequent DIV or REM instruction uses the same operands.
- Test cases check for the presents of the optimization when calculating
either the quotient, remainder,  or both.

Patch by Tyler Nowicki!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163150 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-04 18:22:17 +00:00
..
AddrModeMatcher.h land David Blaikie's patch to de-constify Type, with a few tweaks. 2011-07-18 04:54:35 +00:00
BasicBlockUtils.h Make MemoryBuiltins aware of TargetLibraryInfo. 2012-08-29 15:32:21 +00:00
BuildLibCalls.h add EmitStrNLen() 2012-07-25 17:18:59 +00:00
BypassSlowDivision.h Generic Bypass Slow Div 2012-09-04 18:22:17 +00:00
Cloning.h Add support for disabling llvm.lifetime intrinsics in the AlwaysInliner. These 2012-02-25 02:56:01 +00:00
CmpInstAnalysis.h Refactor code used in InstCombine::FoldAndOfICmps to new file. 2011-12-17 01:20:32 +00:00
CodeExtractor.h Remove excess semi-colons to quiet warnings. 2012-05-08 20:45:04 +00:00
Local.h Make MemoryBuiltins aware of TargetLibraryInfo. 2012-08-29 15:32:21 +00:00
ModuleUtils.h [asan] fix a bug (issue 19) where dlclose and the following mmap caused a false positive. compiler part. 2011-12-15 21:59:03 +00:00
PromoteMemToReg.h Remove a stale forward declaration. 2012-05-14 18:03:19 +00:00
SimplifyIndVar.h Remove unused simplifyIVUsers 2012-03-22 17:47:30 +00:00
SSAUpdater.h Make headers standalone, move a virtual method out of line. 2011-11-14 17:22:45 +00:00
SSAUpdaterImpl.h Fix SSAUpdaterImpl's RecordMatchingPHI to record exactly the 2012-02-03 01:07:01 +00:00
UnifyFunctionExitNodes.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
UnrollLoop.h Add -unroll-runtime for unrolling loops with run-time trip counts. 2011-12-09 06:19:40 +00:00
ValueMapper.h Switch to WeakVHs in the value mapper, and aggressively prune dead basic 2012-03-28 08:38:27 +00:00