[llvm-commits] CVS: llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP/Makefile NP.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Oct 4 13:07:53 PDT 2004



Changes in directory llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP:

Makefile added (r1.1)
NP.cpp updated: 1.1 -> 1.2
---
Log message:

Update this benchmark to actually compile


---
Diffs of the changes:  (+24 -11)

Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP/Makefile
diff -c /dev/null llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP/Makefile:1.1
*** /dev/null	Mon Oct  4 15:07:50 2004
--- llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP/Makefile	Mon Oct  4 15:07:40 2004
***************
*** 0 ****
--- 1,12 ----
+ LEVEL = ../../../..
+ 
+ PROG     = np
+ #CPPFLAGS = -DVERSION='"1.00"' -DCOMPDATE="\"today\"" -DCFLAGS='""' -DHOSTNAME="\"thishost\"" 
+ LDFLAGS  = -lstdc++
+ ifdef LARGE_PROBLEM_SIZE
+ #RUN_OPTIONS = ref.in
+ else
+ #RUN_OPTIONS = test.in
+ endif
+ include $(LEVEL)/MultiSource/Makefile.multisrc
+ 


Index: llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP/NP.cpp
diff -u llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP/NP.cpp:1.1 llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP/NP.cpp:1.2
--- llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP/NP.cpp:1.1	Mon Oct  4 15:01:10 2004
+++ llvm-test/MultiSource/Benchmarks/Prolangs-C++/NP/NP.cpp	Mon Oct  4 15:07:40 2004
@@ -2,34 +2,35 @@
 //  Written by Hemant Pande, Rutgers University.  December 1994.  May be
 //  distributed freely, provided this comment is displayed at the top.
 // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 class True {
 public:
  True() {}
- virtual True *and (True *arg)
+ virtual True *and_m (True *arg)
  {
    return arg;
  }
-} true;
+} tru;
 
 class False : public True {
 public:
   False() {}
-  True *and (True *arg);
-} false;
+  True *and_m (True *arg);
+} fals;
 
-True *False::and (True *arg)
+True *False::and_m (True *arg)
 {
-   return &false;
+   return &fals;
 }
 
 True *v1, *nv1, *v2, *nv2, *v3, *nv3;
 True *c;
 
 main () {
-   if (0) {v1 = &true; nv1 = &false;} else {v1 = &false; nv1= &true;}
-   if (0) {v2 = &true; nv2 = &false;} else {v2 = &false; nv2 = &true;}
-   if (0) {v3 = &true; nv3 = &false;} else {v3 = &false; nv3 = &true;}
+   if (0) {v1 = &tru; nv1 = &fals;} else {v1 = &fals; nv1= &tru;}
+   if (0) {v2 = &tru; nv2 = &fals;} else {v2 = &fals; nv2 = &tru;}
+   if (0) {v3 = &tru; nv3 = &fals;} else {v3 = &fals; nv3 = &tru;}
    if (0) c = nv2; else if (0) c = v1; else c = v2;
-   if (0) c = c->and(nv3); else if (0) c = c->and(nv2); else c = c->and(v1);
-   if (0) c = c->and(v2); else if (0) c = c->and(nv1); else c = c->and(v3);
+   if (0) c = c->and_m(nv3); else if (0) c = c->and_m(nv2); else c = c->and_m(v1);
+   if (0) c = c->and_m(v2); else if (0) c = c->and_m(nv1); else c = c->and_m(v3);
 }






More information about the llvm-commits mailing list