ADT
        arm-eh
        ast-experimental
        enum
        forall-pointer-decay
        jacob/cs343-translation
        jenkins-sandbox
        new-ast
        new-ast-unique-expr
        pthread-emulation
        qualifiedEnum
      
      
        
          | 
            Last change
 on this file since 1aa6ecb was             fe065c3, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago           | 
        
        
          | 
             
new CFA generator and qthreads tests 
 
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            394 bytes
           | 
        
      
      
| Rev | Line |   | 
|---|
| [fe065c3] | 1 | #include "../bench.h"
 | 
|---|
 | 2 | 
 | 
|---|
 | 3 | typedef struct {
 | 
|---|
 | 4 |         void * next;
 | 
|---|
 | 5 | } GreatSuspender;
 | 
|---|
 | 6 | 
 | 
|---|
 | 7 | void comain( GreatSuspender * this ) {
 | 
|---|
 | 8 |     if ( __builtin_expect(this->next != 0, 1) ) goto *(this->next);
 | 
|---|
 | 9 |     this->next = &&s1;
 | 
|---|
 | 10 |         for () {
 | 
|---|
 | 11 |             return;
 | 
|---|
 | 12 |           s1: ;
 | 
|---|
 | 13 |         }
 | 
|---|
 | 14 | }
 | 
|---|
 | 15 | 
 | 
|---|
 | 16 | int main(int argc, char* argv[]) {
 | 
|---|
 | 17 |     GreatSuspender s = { 0 };
 | 
|---|
 | 18 | 
 | 
|---|
 | 19 |         BENCH(
 | 
|---|
 | 20 |                 for ( i; n ) {
 | 
|---|
 | 21 |                         comain( &s );
 | 
|---|
 | 22 |                 },
 | 
|---|
 | 23 |                 result
 | 
|---|
 | 24 |         )
 | 
|---|
 | 25 | 
 | 
|---|
 | 26 |         printf("%g\n", result);
 | 
|---|
 | 27 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.