mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-04 06:09:05 +00:00
7d6eb5a018
This obviously helps a lot if the division would be turned into a libcall (think i64 udiv on i386), but div is also one of the few remaining instructions on modern CPUs that become more expensive when the bitwidth gets bigger. This also helps register pressure on i386 when dividing chars, divb needs two 8-bit parts of a 16 bit register as input where divl uses two registers. int foo(unsigned char a) { return a/10; } int bar(unsigned char a, unsigned char b) { return a/b; } compiles into (x86_64) _foo: imull $205, %edi, %eax shrl $11, %eax ret _bar: movzbl %dil, %eax divb %sil, %al movzbl %al, %eax ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130615 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
ADCE | ||
ArgumentPromotion | ||
BlockPlacement | ||
BranchFolding | ||
CodeExtractor | ||
CodeGenPrepare | ||
ConstantMerge | ||
ConstProp | ||
CorrelatedValuePropagation | ||
DeadArgElim | ||
DeadStoreElimination | ||
EarlyCSE | ||
FunctionAttrs | ||
GlobalDCE | ||
GlobalOpt | ||
GVN | ||
IndVarSimplify | ||
Inline | ||
InstCombine | ||
InstSimplify | ||
Internalize | ||
IPConstantProp | ||
JumpThreading | ||
LCSSA | ||
LICM | ||
LoopDeletion | ||
LoopIdiom | ||
LoopRotate | ||
LoopSimplify | ||
LoopStrengthReduce | ||
LoopUnroll | ||
LoopUnswitch | ||
LowerAtomic | ||
LowerInvoke | ||
LowerSetJmp | ||
LowerSwitch | ||
Mem2Reg | ||
MemCpyOpt | ||
MergeFunc | ||
PhaseOrdering | ||
PruneEH | ||
Reassociate | ||
ScalarRepl | ||
SCCP | ||
SimplifyCFG | ||
SimplifyLibCalls | ||
Sink | ||
StripSymbols | ||
TailCallElim | ||
TailDup |