Re: kernel vm question

From: Dag-Erling Smørgrav (des_at_des.no)
Date: 01/28/05

  • Next message: Seán C. Farley: "initiate_write_inodeblock_ufs2() panic in 5-STABLE"
    To: Jacques Fourie <jf@trispen.com>
    Date: Fri, 28 Jan 2005 13:11:20 +0100
    
    

    des@des.no (Dag-Erling Smørgrav) writes:
    > David Schultz <das@FreeBSD.ORG> writes:
    > > When the line is there, the compiler is probably smart enough to
    > > realize that 'x=y; y=x' is (usually) a no-op, so it optimizes away
    > > both statements.
    > Wrong. The compiler is free to optimize away the second statement
    > provided that neither x nor y is declared volatile, but it cannot
    > optimize away the first statement.

    I should add: unless it can determine with absolute certainty that x
    is not referenced later.

    DES

    -- 
    Dag-Erling Smørgrav - des@des.no
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Seán C. Farley: "initiate_write_inodeblock_ufs2() panic in 5-STABLE"

    Relevant Pages

    • Re: GJournal (hopefully) final patches.
      ... Dag-Erling Smørgrav wrote: ... compiler from telling you about bugs in your code. ... It also prevents the compiler's optimizer from assuming that a pointer dereference may impact datatypes of other sizes. ... Since there exists C code that changes, say, int16_t's or int32_t's one byte at a time, using that flag prevents the compiler from generating buggy executables from C sources which do not adhere to the assumptions made by "strict aliasing". ...
      (freebsd-current)
    • Re: kernel vm question
      ... David Schultz writes: ... The compiler is free to optimize away the second statement ... DES ... To unsubscribe, ...
      (freebsd-hackers)
    • Re: backup archive format saved to disk
      ... If there was a prospect of reviving the compiler (I suspect it's not ... run a computer installation during the mainframe era that are ... marketing server consolodation and virturalizing everything but that's ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: backup archive format saved to disk
      ... If there was a prospect of reviving the compiler (I suspect it's not ... But to succeed in today's language market, it would probably have to be ... To me that leaves Fortran and Python ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: Size of assembly programs...
      ... The idea that a good optimizing compiler can do as ... I don't think there's any doubt that a good assembler programmer can, ... a software implementation of DES (although even the best assembler ... double width integer multiplication available on many CPUs - if you're ...
      (comp.lang.asm.x86)