summaryrefslogtreecommitdiffstats
path: root/gcc/auto-inc-dec.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-14 20:12:09 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2009-05-14 20:12:09 +0000
commitca4bb7ac44cd91cba27662f1238caf05096a17f4 (patch)
tree0b90588a7b0702944abe9637040b125558cb57d2 /gcc/auto-inc-dec.c
parent728685bbda158208d835c77bffe20e38e2737c5d (diff)
downloadppe42-gcc-ca4bb7ac44cd91cba27662f1238caf05096a17f4.tar.gz
ppe42-gcc-ca4bb7ac44cd91cba27662f1238caf05096a17f4.zip
* auto-inc-dec.c: Fix pass description, remove apparent
accidental duplication. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@147541 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/auto-inc-dec.c')
-rw-r--r--gcc/auto-inc-dec.c64
1 files changed, 13 insertions, 51 deletions
diff --git a/gcc/auto-inc-dec.c b/gcc/auto-inc-dec.c
index c871baa8aad..08beda22a03 100644
--- a/gcc/auto-inc-dec.c
+++ b/gcc/auto-inc-dec.c
@@ -46,6 +46,7 @@ along with GCC; see the file COPYING3. If not see
There are (4) basic forms that are matched:
+ (1) FORM_PRE_ADD
a <- b + c
...
*a
@@ -55,6 +56,9 @@ along with GCC; see the file COPYING3. If not see
a <- b
...
*(a += c) pre
+
+
+ (2) FORM_PRE_INC
a += c
...
*a
@@ -62,18 +66,24 @@ along with GCC; see the file COPYING3. If not see
becomes
*(a += c) pre
+
+
+ (3) FORM_POST_ADD
*a
...
b <- a + c
- for this case to be true, b must not be assigned or used between
- the *a and the assignment to b. B must also be a Pmode reg.
+ (For this case to be true, b must not be assigned or used between
+ the *a and the assignment to b. B must also be a Pmode reg.)
becomes
b <- a
...
*(b += c) post
+
+
+ (4) FORM_POST_INC
*a
...
a <- a + c
@@ -99,56 +109,8 @@ along with GCC; see the file COPYING3. If not see
The is one special case: if a already had an offset equal to it +-
its width and that offset is equal to -c when the increment was
before the ref or +c if the increment was after the ref, then if we
- can do the combination but switch the pre/post bit.
-
- (1) FORM_PRE_ADD
-
- a <- b + c
- ...
- *(a - c)
-
- becomes
-
- a <- b
- ...
- *(a += c) post
-
- (2) FORM_PRE_INC
-
- a += c
- ...
- *(a - c)
-
- becomes
-
- *(a += c) post
+ can do the combination but switch the pre/post bit. */
- (3) FORM_POST_ADD
-
- *(a + c)
- ...
- b <- a + c
-
- for this case to be true, b must not be assigned or used between
- the *a and the assignment to b. B must also be a Pmode reg.
-
- becomes
-
- b <- a
- ...
- *(b += c) pre
-
-
- (4) FORM_POST_INC
-
- *(a + c)
- ...
- a <- a + c
-
- becomes
-
- *(a += c) pre
-*/
#ifdef AUTO_INC_DEC
enum form
OpenPOWER on IntegriCloud