mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Implement "superhero" strength reduction, or full strength
reduction of address calculations down to basic pointer arithmetic. This is currently off by default, as it needs a few other features before it becomes generally useful. And even when enabled, full strength reduction is only performed when it doesn't increase register pressure, and when several other conditions are true. This also factors out a bunch of exisiting LSR code out of StrengthReduceStridedIVUsers into separate functions, and tidies up IV insertion. This actually decreases register pressure even in non-superhero mode. The change in iv-users-in-other-loops.ll is an example of this; there are two more adds because there are two fewer leas, and there is less spilling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65108 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
; RUN: llvm-as < %s | opt -loop-reduce | llvm-dis | \
|
||||
; RUN: grep {add i32 %iv.*inc, 1}
|
||||
; RUN: grep {add i32 %lsr.iv.next, 1}
|
||||
;
|
||||
; Make sure that the use of the IV outside of the loop (the store) uses the
|
||||
; post incremented value of the IV, not the preincremented value. This
|
||||
|
||||
Reference in New Issue
Block a user