Re: Nop insertion

Chris F Clark <>
Wed, 28 Oct 2009 12:49:46 -0400

          From comp.compilers

Related articles
Nop insertion (shrey) (2009-10-27)
Re: Nop insertion (Nils) (2009-10-28)
Re: Nop insertion (BGB / cr88192) (2009-10-28)
Re: Nop insertion (Walter Banks) (2009-10-28)
Re: Nop insertion (Chris F Clark) (2009-10-28)
Re: Nop insertion (George Neuner) (2009-10-29)
Re: Nop insertion (Pertti Kellomaki) (2009-10-29)
| List of all articles for this month |

From: Chris F Clark <>
Newsgroups: comp.compilers
Date: Wed, 28 Oct 2009 12:49:46 -0400
Organization: The World Public Access UNIX, Brookline, MA
References: 09-10-032
Keywords: architecture
Posted-Date: 30 Oct 2009 11:53:54 EDT

As our moderator says, it's normally done at assembly time, but that's
because the number of stall cycles is usually small (1-3 instructions)
and localized. Large stalls that are non-localized are not usually
handled by inserting fixed numbers of noops, especially not ones
crossing basic block (or whatever the coding unit is) boundary. I
have heard large precise timing models called "crystal clock"
architectures, refering to the fragiility of a clock made out of
glass. They are not robust, even with automated tool support.

At Intel, we have a crypto multiplier unit we put on certain chips and
it has a vary long latency, but we don't try to time it exactly even
though for any given multiplication there is a precise number of
cycles the multiplication will take. Doing so would only work for
very simple fixed architectures. The more out-of-order one allows,
the more variable the interactions can make the timing.

Thus, semaphores (and other locks) are good things. Use judiciously,
but use them.

Hope this helps,

Chris Clark email:
Compiler Resources, Inc. Web Site:
23 Bailey Rd voice: (508) 435-5016
Berlin, MA 01503 USA twitter: @intel_chris

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.