예제 #1
0
파일: main.cpp 프로젝트: xjtunk/llvm-power
int main(int argc, char *argv[])
{
  unsigned long long now;
  unsigned long long latency;
  FunctionalUnitManager fum("fu.txt");

  fum.dumpFunctionalUnits();

  // let's turn off the adder
  now = 100;
  
  
  #define ISSUE(mask, time) { fum.processAtIssue(mask, time); cout<<"ISSUE @ "<<time<<" Total Power: "<<fum.getTotalPower(time)<<endl; fum.dumpStats(time);} 
  #define COMMIT(mask, time) { fum.processAtCommit(mask, time); cout<<"COMMIT @ "<<time<<" Total Power: "<<fum.getTotalPower(time)<<endl; fum.dumpStats(time);} 
  
	ISSUE(OFF, 100);
	ISSUE(ADD, 110);
	COMMIT(OFF, 130);

	ISSUE(ADD , 200);

	
	
  return 0;
}
예제 #2
0
파일: spill.c 프로젝트: alwendt/chop
main() 
{
for (j = 0;  j < 2; j++) {
    i = foo() + (j ? j + fee() + fie() : k) + fum();
    printf("%d ", i);
    }
printf("\n");
}
예제 #3
0
파일: pr57548.C 프로젝트: 0day-ci/gcc
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* { dg-require-ifunc "" }  */

int fum (); // Extra declaration that is merged with the second one.
int fum () __attribute__ ((target("default")));


int fum () __attribute__((target( "mmx")));
int fum () __attribute__((target( "popcnt")));
int fum () __attribute__((target( "sse")));
int fum () __attribute__((target( "sse2")));
int fum () __attribute__((target( "sse3")));
int fum () __attribute__((target( "ssse3")));
int fum () __attribute__((target( "sse4.1")));
int fum () __attribute__((target( "sse4.2")));
int fum () __attribute__((target( "avx")));
int fum () __attribute__((target( "avx2")));

int fum () __attribute__((target("arch=core2")));
int fum () __attribute__((target("arch=corei7")));
int fum () __attribute__((target("arch=atom")));

int (*p)() = &fum;

int j = fum();