This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

rtl.scm fix: excessive optimisation optimism


Hi -

The following patch to cgen/rtl.scm weakens the optimism of the
sfmt sim-related optimization.  It treats as different two
instructions that write to memory in different widths but are
otherwise identical.  (The sfmt fields didn't include the mode part,
so one h-memory-FOO matched another h-memory-FOO, leading to
collapsed -> erroneous writeback functions in the parexec case.)

As usual, ports unaffected by this bug don't need to be regenerated.


- FChE


2001-06-01  Frank Ch. Eigler  <fche@redhat.com>

	* rtl.scm (hw): Encode hw access mode into <operand> name, since this
	is required for multi-mode hw types (memory).

Index: rtl.scm
===================================================================
RCS file: /cvs/src/src/cgen/rtl.scm,v
retrieving revision 1.3
diff -u -r1.3 rtl.scm
--- rtl.scm	2001/01/29 18:56:26	1.3
+++ rtl.scm	2001/06/01 21:19:18
@@ -1996,8 +1996,9 @@
     (if (not hw)
 	(parse-error "hw" "invalid hardware element" hw-name))
 
-    (let ((mode (if (eq? mode-name 'DFLT) (hw-mode hw) (mode:lookup mode-name)))
-	  (result (new <operand>))) ; ??? lookup-for-new?
+    (let* ((mode (if (eq? mode-name 'DFLT) (hw-mode hw) (mode:lookup mode-name)))
+	   (hw-name-with-mode (symbol-append hw-name '- (obj:name mode)))
+	   (result (new <operand>))) ; ??? lookup-for-new?
 
       (if (not mode)
 	  (parse-error "hw" "invalid mode" mode-name))
@@ -2035,7 +2036,7 @@
 
       ; The name of the operand must include the index so that multiple copies
       ; of a hardware object (e.g. h-gr[0], h-gr[14]) can be distinguished.
-      (let ((name (-rtx-hw-name hw hw-name index-arg)))
+      (let ((name (-rtx-hw-name hw hw-name-with-mode index-arg)))
 	(send result 'set-name! name)
 	(op:set-sem-name! result name))
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]