home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 1,522 of 2,753   
   Ian Lance Taylor to gaurav   
   Re: Compiler support for multicore archi   
   18 Nov 08 21:41:40   
   
   From: ian@airs.com   
      
   gaurav  writes:   
      
   > What different things can a compiler do to make mutithreaded programs   
   > run better on multicore? Isnt it much depends on the threading   
   > library , OS and the programmar instead on compiler ?   
      
   In general, yes, it is.  However, it's worth noting that one key   
   element of modern multithreaded programming does require compiler   
   support: Thread Local Storage.  This permits C/C++ programmers to   
   write, e.g.,   
       __thread int x;   
   to declare a thread local variable.  The compiler has to generate the   
   right code sequences to access this variable, including support for   
   different TLS models.   
      
   The compiler must also provide access to basic synchronization   
   mechanisms, such as the __sync_ intrinsic functions originally defined   
   by Intel.   
      
   Ian   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca