bugMIT/GNU Scheme - Bugs: bug #27885, last year's changes to global...

 
 

bug #27885: last year's changes to global primitives defeated LIAR's constant folding

Submitted by:  Taylor R. Campbell <riastradh>
Submitted on:  Fri 30 Oct 2009 09:18:00 PM UTC  
 
Category: compilerSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Suboptimal behavior
Status: FixedPrivacy: Public
Assigned to: Taylor R. Campbell <riastradh>Originator Name: 
Open/Closed: Closed
Keywords: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sun 01 Nov 2009 10:02:26 PM UTC, comment #2:

Should be fixed in commit 7451c947a397e4e68106dc9fb6afd324b949e167.

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.
Sat 31 Oct 2009 08:38:05 PM UTC, comment #1:

This is worse than I thought -- failure to fold constants causes more problems than just inefficiency:

(compile-procedure
(eval `(LAMBDA () (,(make-primitive-procedure 'INTEGER-MULTIPLY) 1 2))
(nearest-repl/environment)))
;CGEN-RINST: No matching rules (assign (register 19) (fixnum-2-args multiply-fixnum (object->fixnum (constant 1)) (object->fixnum (constant 2)) #t))

Remarkably, in the run-time system, the one use of INT:* following this pattern (in random.scm's LARGE-RANDOM-INTEGER) has operands exceeding 26 bits, so the i386 back end never complained, because RTL:CONSTANT-COST made RTL common subexpression elimination avoid this particular RTL instruction.

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.
Fri 30 Oct 2009 09:18:00 PM UTC, original submission:

Since most the values of most global variables that correspond with primitives are not actually primitives, but rather compiled procedures that invoke the primitives, LIAR's constant folder no longer believes them to be constant-foldable operators.

Taylor R. Campbell <riastradh>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by riastradh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 17 Dec 2011 03:26:41 AM UTCriastradhStatusReady For Test=>Fixed
      Assigned toNone=>riastradh
      Open/ClosedOpen=>Closed
    Sun 01 Nov 2009 10:02:26 PM UTCriastradhStatusNone=>Ready For Test
    Fri 30 Oct 2009 09:18:39 PM UTCriastradhCategoryNone=>compiler
      Item GroupNone=>Suboptimal behavior

    Back to the top


    Powered by Savane 3.1-cleanup1