From lattner at cs.uiuc.edu Mon Sep 22 13:28:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 13:28:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/CompileFail/2003-09-22-CompositeExprValue.cpp Message-ID: <200309221827.NAA03811@neo.cs.uiuc.edu> Changes in directory llvm/test/Regression/C++Frontend/CompileFail: 2003-09-22-CompositeExprValue.cpp added (r1.1) --- Log message: new testcase that crashes the C++ frontend, found by John --- Diffs of the changes: Index: llvm/test/Regression/C++Frontend/CompileFail/2003-09-22-CompositeExprValue.cpp diff -c /dev/null llvm/test/Regression/C++Frontend/CompileFail/2003-09-22-CompositeExprValue.cpp:1.1 *** /dev/null Mon Sep 22 13:27:30 2003 --- llvm/test/Regression/C++Frontend/CompileFail/2003-09-22-CompositeExprValue.cpp Mon Sep 22 13:27:20 2003 *************** *** 0 **** --- 1,9 ---- + struct duration { + duration operator/=(int c) { + return *this; + } + }; + + void a000090() { + duration() /= 1; + } From lattner at cs.uiuc.edu Mon Sep 22 14:51:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 14:51:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile Message-ID: <200309221950.OAA21353@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CINT2000/252.eon: Makefile updated: 1.1 -> 1.2 --- Log message: Annoyingly, not all .cc files in the eon distro are compilable: explictly list filenames --- Diffs of the changes: Index: llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile diff -u llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile:1.1 llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile:1.2 --- llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile:1.1 Sun Sep 21 13:45:09 2003 +++ llvm/test/Programs/External/SPEC/CINT2000/252.eon/Makefile Mon Sep 22 14:50:18 2003 @@ -3,6 +3,50 @@ #STDOUT_FILENAME = cccp.out # Yes, we know this is an old crufty C++ benchmark. Don't tell us about it GCC! -CPPFLAGS = -Wno-deprecated +CPPFLAGS = -Wno-deprecated -Wno-non-template-friend + +Source = $(addprefix $(SPEC_BENCH_DIR)/src/, \ + ggCoverageSolidTexture.cc ggPathDielectricMaterial.cc ggBox2.cc \ + ggBox3.cc ggRasterSurfaceTexture.cc ggJitterSample1.cc \ + ggNRooksSample2.cc ggJitterSample2.cc ggRGBFPixel.cc \ + ggRotatingPinholeCamera.cc ggRandomSample2.cc ggRandomSample3.cc \ + ggSolidNoise2.cc ggSolidNoise3.cc ggSolidTexture.cc \ + ggOakSolidTexture.cc ggSpecularMaterial.cc ggNA.cc ggMaterial.cc \ + ggDiffuseMaterial.cc ggDielectricMaterial.cc ggConductorMaterial.cc \ + ggEdgeDiscrepancy.cc ggPolishedMaterial.cc ggFrameInterpolation.cc \ + ggQuaternion.cc ggSpline.cc ggONB2.cc ggONB3.cc ggFrame2.cc \ + ggFrame3.cc ggHMatrix3.cc ggSphere.cc ggRGBE.cc ggGamma.cc \ + ggBRDF.cc ggDiffuseBRDF.cc ggPhongBRDF.cc ggPolishedBRDF.cc \ + ggCamera.cc ggPinholeCamera.cc ggThinLensCamera.cc ggErr.cc \ + ggPixelFilter.cc ggTrianglePixelFilter.cc ggBoxPixelFilter.cc \ + ggFormat.cc ggGeometry.cc ggHAffineMatrix3.cc ggHShearMatrix3.cc \ + ggHBoxMatrix3.cc ggHPerspectiveMatrix3.cc ggHTranslationMatrix3.cc \ + ggHRigidBodyMatrix3.cc ggHRotationMatrix3.cc ggHScaleMatrix3.cc \ + ggHPoint3.cc ggPoint2.cc ggPoint3.cc ggOptics.cc ggPlane.cc \ + ggPolygon.cc ggGrayPixel_x.cc ggRGBPixel_x.cc \ + ggRay2.cc ggRay3.cc ggBoardFloorSolidTexture.cc ggVector2.cc \ + ggVector3.cc ggString.cc ggFineSpectrum.cc ggSpectrum.cc eon.cc \ + eonImageCalculator.cc mrObjectRecord.cc mrCoarsePixelRenderer.cc \ + mrIndirectPixelRenderer.cc mrRushmeierPixelRenderer.cc \ + mrBruteForcePixelRenderer.cc mrKajiyaPixelRenderer.cc \ + mrCookPixelRenderer.cc mrGrid.cc mrScene.cc mrCamera.cc \ + mrTriangle.cc mrFastTriangle.cc mrPolygon.cc mrXYDisk.cc \ + mrXZDisk.cc mrYZDisk.cc mrPhongAreaXYRectangleLuminaire.cc \ + mrPhongAreaXZRectangleLuminaire.cc \ + mrPhongAreaYZRectangleLuminaire.cc mrEmitter.cc mrImposter.cc \ + mrLinkedObjects.cc mrBox.cc mrXCylinder.cc mrYCylinder.cc \ + mrZCylinder.cc mrDiffuseAreaZCylinderLuminaire.cc \ + mrDiffuseCosineZCylinderLuminaire.cc \ + mrDiffuseVisibleAreaZCylinderLuminaire.cc mrXEllipticalCylinder.cc \ + mrYEllipticalCylinder.cc mrZEllipticalCylinder.cc \ + mrSpotAreaXYDiskLuminaire.cc mrDiffuseAreaXYRectangleLuminaire.cc \ + mrDiffuseAreaXZRectangleLuminaire.cc \ + mrDiffuseAreaYZRectangleLuminaire.cc mrSurfaceList.cc \ + mrDiffuseAreaTriangleLuminaire.cc mrDiffuseAreaSphereLuminaire.cc \ + mrDiffuseCosineSphereLuminaire.cc \ + mrDiffuseSolidAngleSphereLuminaire.cc mrShellLuminaire.cc \ + mrInstance.cc mrMaterial.cc mrPhongAreaTriangleLuminaire.cc \ + mrSolidTexture.cc mrSphere.cc mrSurface.cc mrSurfaceTexture.cc \ + mrXYRectangle.cc mrXZRectangle.cc mrYZRectangle.cc myrand.cc) include ../../Makefile.spec From lattner at cs.uiuc.edu Mon Sep 22 15:22:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 15:22:01 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/gccld.cpp Message-ID: <200309222021.PAA22295@apoc.cs.uiuc.edu> Changes in directory llvm/tools/gccld: gccld.cpp updated: 1.51 -> 1.52 --- Log message: Minor cleanups: * Local header file goes at top * Remove unneeded #includes * Wrap code at 80 columns * Declare variables where they are used * 'register' is not needed * Use 'unsigned' instead of 'int' variables where possible --- Diffs of the changes: Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.51 llvm/tools/gccld/gccld.cpp:1.52 --- llvm/tools/gccld/gccld.cpp:1.51 Fri Sep 19 15:24:23 2003 +++ llvm/tools/gccld/gccld.cpp Mon Sep 22 15:21:34 2003 @@ -13,6 +13,7 @@ // //===----------------------------------------------------------------------===// +#include "gccld.h" #include "llvm/Transforms/Utils/Linker.h" #include "llvm/Module.h" #include "llvm/PassManager.h" @@ -25,13 +26,9 @@ #include "Support/SystemUtils.h" #include "Support/CommandLine.h" #include "Support/Signals.h" -#include "Config/unistd.h" -#include "gccld.h" #include #include -#include -#include namespace { cl::list @@ -68,7 +65,8 @@ " library, not an executable")); cl::opt - Native("native", cl::desc("Generate a native binary instead of a shell script")); + Native("native", + cl::desc("Generate a native binary instead of a shell script")); // Compatibility options that are ignored but supported by LD cl::opt @@ -135,15 +133,10 @@ char ** CopyEnv (char ** const envp) { - // The new environment list - char ** newenv; - - // The number of entries in the old environment list - int entries; - // // Count the number of entries in the old list; // + unsigned entries; // The number of entries in the old environment list for (entries = 0; envp[entries] != NULL; entries++) { ; @@ -165,6 +158,7 @@ // // Allocate a new environment list. // + char **newenv; if ((newenv = new (char *) [entries]) == NULL) { return NULL; @@ -211,18 +205,9 @@ void RemoveEnv (const char * name, char ** const envp) { - // Pointer for scanning arrays - register char * p; - - // Index for selecting elements of the environment array - register int index; - - for (index=0; envp[index] != NULL; index++) - { - // + for (unsigned index=0; envp[index] != NULL; index++) { // Find the first equals sign in the array and make it an EOS character. - // - p = strchr (envp[index], '='); + char *p = strchr (envp[index], '='); if (p == NULL) { continue; @@ -232,7 +217,6 @@ *p = '\0'; } - // // Compare the two strings. If they are equal, zap this string. // Otherwise, restore it. // @@ -272,8 +256,8 @@ Libraries.end()); // Link in all of the files - LinkFiles (argv[0], Composite.get(), InputFilenames, Verbose); - LinkLibraries (argv[0], Composite.get(), Libraries, LibPaths, Verbose, Native); + LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose); + LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths, Verbose, Native); // Link in all of the libraries next... @@ -296,8 +280,7 @@ // // Generate the bytecode file. // - if (GenerateBytecode (Composite.get(), Strip, !NoInternalize, &Out)) - { + if (GenerateBytecode (Composite.get(), Strip, !NoInternalize, &Out)) { Out.close(); return PrintAndReturn(argv[0], "error generating bytcode"); } @@ -318,8 +301,7 @@ // // Otherwise, create a script that will run the bytecode through the JIT. // - if (Native) - { + if (Native) { // Name of the Assembly Language output file std::string AssemblyFile = OutputFilename + ".s"; @@ -335,30 +317,25 @@ std::string llc=FindExecutable ("llc", argv[0]); std::string gcc=FindExecutable ("gcc", argv[0]); if (llc.empty()) - { return PrintAndReturn (argv[0], "Failed to find llc"); - } if (gcc.empty()) - { return PrintAndReturn (argv[0], "Failed to find gcc"); - } // // Generate an assembly language file for the bytecode. // if (Verbose) std::cout << "Generating Assembly Code\n"; - GenerateAssembly (AssemblyFile, RealBytecodeOutput, llc, envp); + GenerateAssembly(AssemblyFile, RealBytecodeOutput, llc, envp); if (Verbose) std::cout << "Generating Native Code\n"; - GenerateNative (OutputFilename, AssemblyFile, Libraries, LibPaths, gcc, envp); + GenerateNative(OutputFilename, AssemblyFile, Libraries, LibPaths, + gcc, envp); // // Remove the assembly language file. // removeFile (AssemblyFile); - } - else - { + } else { // Output the script to start the program... std::ofstream Out2(OutputFilename.c_str()); if (!Out2.good()) From lattner at cs.uiuc.edu Mon Sep 22 15:28:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 15:28:02 2003 Subject: [llvm-commits] CVS: llvm/utils/TableGen/InstrSelectorEmitter.cpp Message-ID: <200309222027.PAA30554@apoc.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: InstrSelectorEmitter.cpp updated: 1.33 -> 1.34 --- Log message: Squelch warning --- Diffs of the changes: Index: llvm/utils/TableGen/InstrSelectorEmitter.cpp diff -u llvm/utils/TableGen/InstrSelectorEmitter.cpp:1.33 llvm/utils/TableGen/InstrSelectorEmitter.cpp:1.34 --- llvm/utils/TableGen/InstrSelectorEmitter.cpp:1.33 Thu Aug 21 10:59:16 2003 +++ llvm/utils/TableGen/InstrSelectorEmitter.cpp Mon Sep 22 15:27:10 2003 @@ -210,6 +210,7 @@ } else { Arg->dump(); error("Unknown leaf value for tree pattern!"); + return 0; } // Apply the type cast... From lattner at cs.uiuc.edu Mon Sep 22 15:34:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 15:34:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200309222033.PAA19232@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.122 -> 1.123 --- Log message: Squelch warning --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.122 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.123 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.122 Fri Sep 19 14:05:02 2003 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Sep 22 15:33:21 2003 @@ -707,7 +707,7 @@ case Instruction::And: Code = LHSCode & RHSCode; break; case Instruction::Or: Code = LHSCode | RHSCode; break; case Instruction::Xor: Code = LHSCode ^ RHSCode; break; - default: assert(0 && "Illegal logical opcode!"); + default: assert(0 && "Illegal logical opcode!"); return 0; } Value *RV = getSetCCValue(Code, LHS, RHS); From lattner at cs.uiuc.edu Mon Sep 22 15:34:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 15:34:03 2003 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp Message-ID: <200309222033.PAA20011@apoc.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Interpreter.cpp updated: 1.12 -> 1.13 --- Log message: Squelch warning --- Diffs of the changes: Index: llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp:1.12 llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp:1.13 --- llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp:1.12 Fri Sep 5 13:42:00 2003 +++ llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp Mon Sep 22 15:33:34 2003 @@ -14,7 +14,7 @@ /// create - Create a new interpreter object. This can never fail. /// ExecutionEngine *Interpreter::create(Module *M, bool TraceMode){ - bool isLittleEndian; + bool isLittleEndian = false; switch (M->getEndianness()) { case Module::LittleEndian: isLittleEndian = true; break; case Module::BigEndian: isLittleEndian = false; break; @@ -25,7 +25,7 @@ break; } - bool isLongPointer; + bool isLongPointer = false; switch (M->getPointerSize()) { case Module::Pointer32: isLongPointer = false; break; case Module::Pointer64: isLongPointer = true; break; From brukman at cs.uiuc.edu Mon Sep 22 16:57:06 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 16:57:06 2003 Subject: [llvm-commits] CVS: llvm/CREDITS.TXT Message-ID: <200309222156.QAA27448@zion.cs.uiuc.edu> Changes in directory llvm: CREDITS.TXT added (r1.1) --- Log message: Keep all the contributors in one place, instead of all over the code base. --- Diffs of the changes: Index: llvm/CREDITS.TXT diff -c /dev/null llvm/CREDITS.TXT:1.1 *** /dev/null Mon Sep 22 16:56:18 2003 --- llvm/CREDITS.TXT Mon Sep 22 16:56:08 2003 *************** *** 0 **** --- 1,44 ---- + Inspired by the CREDITS file from the Linux source tree, this file is, + likewise, at least a partial list of people who have contributed to the LLVM + project. The format and the next paragraph are stolen directly from that file. + + The list sorted by name and formatted to allow easy grepping and beautification + by scripts. The fields are: name (N), email (E), web-address (W), PGP key ID + and fingerprint (P), description (D), and snail-mail address (S). + + N: Vikram Adve + E: vadve at cs.uiuc.edu + W: http://www.cs.uiuc.edu/~vadve/ + D: The Sparc64 backend, provider of much wisdom, and motivator for LLVM + + N: Misha Brukman + E: brukman at uiuc.edu + W: http://misha.brukman.net + D: Portions of X86 and Sparc JIT compilers, various other hacks + + N: Cameron Buschardt + D: Author of the mem2reg pass + + N: Casey Carter + D: Fixes to the Reassociation pass, various improvement patches + + N: Brian Gaeke + E: gaeke at uiuc.edu + W: http://www.students.uiuc.edu/~gaeke/ + D: Portions of X86 static and JIT compilers, reoptimizer framework cleanups + + N: Chris Lattner + E: sabre at nondot.org + W: http://nondot.org/~sabre/ + D: Primary architect of LLVM + + N: Ruchira Sasanka + E: sasanka at uiuc.edu + D: Graph coloring register allocator for the Sparc64 backend + + N: Anand Shukla + E: ashukla at cs.uiuc.edu + D: The paths pass + + N: Bill Wendling + D: The Lower Setjmp/Longjmp pass From brukman at cs.uiuc.edu Mon Sep 22 16:58:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 16:58:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/LowerSetJmp.cpp Message-ID: <200309222157.QAA27477@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: LowerSetJmp.cpp updated: 1.3 -> 1.4 --- Log message: Credits are now in top-level CREDITS.TXT --- Diffs of the changes: Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.3 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.4 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.3 Sat Sep 20 09:38:44 2003 +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Mon Sep 22 16:57:15 2003 @@ -17,8 +17,6 @@ // original except block being executed if it isn't a longjmp except // that is handled by that function. // -// This pass was contributed to LLVM by Bill Wendling. -// //===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===// From brukman at cs.uiuc.edu Mon Sep 22 16:59:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 16:59:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/Reassociate.cpp Message-ID: <200309222158.QAA27500@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: Reassociate.cpp updated: 1.23 -> 1.24 --- Log message: Credits now go into the top-level CREDITS.TXT --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/Reassociate.cpp diff -u llvm/lib/Transforms/Scalar/Reassociate.cpp:1.23 llvm/lib/Transforms/Scalar/Reassociate.cpp:1.24 --- llvm/lib/Transforms/Scalar/Reassociate.cpp:1.23 Mon Aug 18 09:33:38 2003 +++ llvm/lib/Transforms/Scalar/Reassociate.cpp Mon Sep 22 16:57:56 2003 @@ -14,9 +14,6 @@ // (starting at 2), which effectively gives values in deep loops higher rank // than values not in loops. // -// This code was originally written by Chris Lattner, and was then cleaned up -// and perfected by Casey Carter. -// //===----------------------------------------------------------------------===// #include "llvm/Transforms/Scalar.h" From lattner at cs.uiuc.edu Mon Sep 22 16:59:09 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 16:59:09 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll Message-ID: <200309222158.QAA23072@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Inline: 2003-09-22-PHINodesInExceptionDest.ll added (r1.1) --- Log message: new testcase which crashes the inliner, thanks Bugpoint! --- Diffs of the changes: Index: llvm/test/Regression/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll diff -c /dev/null llvm/test/Regression/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll:1.1 *** /dev/null Mon Sep 22 16:58:56 2003 --- llvm/test/Regression/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll Mon Sep 22 16:58:46 2003 *************** *** 0 **** --- 1,26 ---- + ; RUN: llvm-as < %s | opt -inline -disable-output + + implementation + + int %main() { + entry: + invoke void %__main( ) + to label %Call2Invoke except label %LongJmpBlkPre + + Call2Invoke: + br label %LongJmpBlkPre + + LongJmpBlkPre: + %i.3 = phi uint [ 0, %entry ], [ 0, %Call2Invoke ] ; [#uses=0] + ret int 0 + } + + void %__main() { + call void %__llvm_getGlobalCtors( ) + call void %__llvm_getGlobalDtors( ) + ret void + } + + declare void %__llvm_getGlobalCtors() + + declare void %__llvm_getGlobalDtors() From lattner at cs.uiuc.edu Mon Sep 22 17:00:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 17:00:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/InlineFunction.cpp Message-ID: <200309222159.QAA23084@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: InlineFunction.cpp updated: 1.8 -> 1.9 --- Log message: Fix bug: Inline/2003-09-22-PHINodesInExceptionDest.ll ... by making sure to update PHI nodes to take into consideration the extra edges we get if we inline a call instruction through an invoke. --- Diffs of the changes: Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.8 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.9 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.8 Sun Sep 14 21:10:16 2003 +++ llvm/lib/Transforms/Utils/InlineFunction.cpp Mon Sep 22 16:59:27 2003 @@ -47,7 +47,9 @@ // this is an invoke instruction or a call instruction. BasicBlock *InvokeDest = 0; // Exception handling destination + std::vector InvokeDestPHIValues; // Values for PHI nodes in InvokeDest BasicBlock *AfterCallBB; + if (InvokeInst *II = dyn_cast(TheCall)) { AfterCallBB = II->getNormalDest(); InvokeDest = II->getExceptionalDest(); @@ -55,8 +57,18 @@ // Add an unconditional branch to make this look like the CallInst case... new BranchInst(AfterCallBB, TheCall); + // If there are PHI nodes in the exceptional destination block, we need to + // keep track of which values came into them from this invoke, then remove + // the entry for this block. + for (BasicBlock::iterator I = InvokeDest->begin(); + PHINode *PN = dyn_cast(I); ++I) { + // Save the value to use for this edge... + InvokeDestPHIValues.push_back(PN->getIncomingValueForBlock(OrigBB)); + } + // Remove (unlink) the InvokeInst from the function... OrigBB->getInstList().remove(TheCall); + } else { // It's a call // If this is a call instruction, we need to split the basic block that the // call lives in. @@ -178,7 +190,7 @@ // If we just inlined a call due to an invoke instruction, scan the inlined // function checking for function calls that should now be made into invoke // instructions, and for unwind's which should be turned into branches. - if (InvokeDest) + if (InvokeDest) { for (Function::iterator BB = LastBlock, E = Caller->end(); BB != E; ++BB) { for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ) { // We only need to check for function calls: inlined invoke instructions @@ -203,6 +215,13 @@ BB->getInstList().pop_back(); Split->getInstList().pop_front(); // Delete the original call + // Update any PHI nodes in the exceptional block to indicate that + // there is now a new entry in them. + unsigned i = 0; + for (BasicBlock::iterator I = InvokeDest->begin(); + PHINode *PN = dyn_cast(I); ++I, ++i) + PN->addIncoming(InvokeDestPHIValues[i], BB); + // This basic block is now complete, start scanning the next one. break; } else { @@ -222,6 +241,14 @@ } } + // Now that everything is happy, we have one final detail. The PHI nodes in + // the exception destination block still have entries due to the original + // invoke instruction. Eliminate these entries (which might even delete the + // PHI node) now. + for (BasicBlock::iterator I = InvokeDest->begin(); + PHINode *PN = dyn_cast(I); ++I) + PN->removeIncomingValue(OrigBB); + } // Now that the function is correct, make it a little bit nicer. In // particular, move the basic blocks inserted from the end of the function // into the space made by splitting the source basic block. From brukman at cs.uiuc.edu Mon Sep 22 17:06:01 2003 From: brukman at cs.uiuc.edu (Michael Brukman) Date: Mon Sep 22 17:06:01 2003 Subject: [llvm-commits] CVS: llvm/www/www-index.html Message-ID: <200309222205.RAA24281@tank.cs.uiuc.edu> Changes in directory llvm/www: www-index.html updated: 1.50 -> 1.51 --- Log message: Contributor info is now in the CREDITS.TXT in the top-level llvm source dir. --- Diffs of the changes: Index: llvm/www/www-index.html diff -u llvm/www/www-index.html:1.50 llvm/www/www-index.html:1.51 --- llvm/www/www-index.html:1.50 Fri Sep 12 18:37:25 2003 +++ llvm/www/www-index.html Mon Sep 22 17:05:15 2003 @@ -167,31 +167,18 @@ Contributors + height="34">Funding - The following people have made significant contributions to the - LLVM project:
    -
  • Chris - Lattner - Primary architect of LLVM
  • -
  • Vikram - Adve - The Sparc64 backend, provider - of much wisdom, and motivator for LLVM
  • -
  • Ruchira Sasanka - Graph coloring register - allocator for the Sparc64 backend
  • -
  • Anand Shukla - Author of the paths - pass
  • -
  • Cameron Buschardt - Author of the mem2reg - pass
  • -
  • Misha Brukman - - Portions of the X86 and Sparc Just-In-Time compilers
  • -
  • Brian - Gaeke - Portions of the X86 Just-In-Time - and static compilers
  • -
+ This work is sponsored by an NSF CAREER award (grant + #EIA-0093426), and supported in part by the NSF Next Generation + Software Program (grant #EIA-0103756), the NSF Operating Systems + and Compilers program (grant #CCR-9988482), by the NSF Embedded + Systems Program (grant #CCR-0209202), and by the MARCO/DARPA Center for Circuits, Systems and + Software (C2S2).

@@ -371,23 +358,6 @@ processor architectures (or architectural components) from user-level code.

- - - - - Funding - - - - This work is sponsored by an NSF CAREER award (grant - #EIA-0093426), and supported in part by the NSF Next Generation - Software Program (grant #EIA-0103756), the NSF Operating Systems - and Compilers program (grant #CCR-9988482), by the NSF Embedded - Systems Program (grant #CCR-0209202), and by the MARCO/DARPA Center for Circuits, Systems and - Software (C2S2).

From lattner at cs.uiuc.edu Mon Sep 22 17:23:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 17:23:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll Message-ID: <200309222222.RAA28691@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/Inline: 2003-09-22-PHINodesInNormalInvokeDest.ll added (r1.1) --- Log message: new testcase, reduced by bugpoint --- Diffs of the changes: Index: llvm/test/Regression/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll diff -c /dev/null llvm/test/Regression/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll:1.1 *** /dev/null Mon Sep 22 17:22:51 2003 --- llvm/test/Regression/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll Mon Sep 22 17:22:41 2003 *************** *** 0 **** --- 1,24 ---- + ; RUN: llvm-as < %s | opt -inline -disable-output + implementation + + int %main() { + entry: + invoke void %__main( ) + to label %else except label %RethrowExcept + + else: + %i.2 = phi int [ 36, %entry ], [ %i.2, %LJDecisionBB ] + br label %LJDecisionBB + + LJDecisionBB: + br label %else + + RethrowExcept: + ret int 0 + } + + void %__main() { + ret void + } + + From lattner at cs.uiuc.edu Mon Sep 22 17:36:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 17:36:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/InlineFunction.cpp Message-ID: <200309222235.RAA29841@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: InlineFunction.cpp updated: 1.9 -> 1.10 --- Log message: Fix bug: Inline/2003-09-22-PHINodesInNormalInvokeDest.ll --- Diffs of the changes: Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.9 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.10 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.9 Mon Sep 22 16:59:27 2003 +++ llvm/lib/Transforms/Utils/InlineFunction.cpp Mon Sep 22 17:35:39 2003 @@ -51,11 +51,16 @@ BasicBlock *AfterCallBB; if (InvokeInst *II = dyn_cast(TheCall)) { - AfterCallBB = II->getNormalDest(); InvokeDest = II->getExceptionalDest(); // Add an unconditional branch to make this look like the CallInst case... - new BranchInst(AfterCallBB, TheCall); + BranchInst *NewBr = new BranchInst(II->getNormalDest(), TheCall); + + // Split the basic block. This guarantees that no PHI nodes will have to be + // updated due to new incoming edges, and make the invoke case more + // symmetric to the call case. + AfterCallBB = OrigBB->splitBasicBlock(NewBr, + CalledFunc->getName()+".entry"); // If there are PHI nodes in the exceptional destination block, we need to // keep track of which values came into them from this invoke, then remove From lattner at cs.uiuc.edu Mon Sep 22 18:32:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 18:32:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/InlineFunction.cpp Message-ID: <200309222331.SAA07103@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: InlineFunction.cpp updated: 1.10 -> 1.11 --- Log message: Fix bugs in the last change --- Diffs of the changes: Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.10 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.11 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.10 Mon Sep 22 17:35:39 2003 +++ llvm/lib/Transforms/Utils/InlineFunction.cpp Mon Sep 22 18:30:59 2003 @@ -68,7 +68,7 @@ for (BasicBlock::iterator I = InvokeDest->begin(); PHINode *PN = dyn_cast(I); ++I) { // Save the value to use for this edge... - InvokeDestPHIValues.push_back(PN->getIncomingValueForBlock(OrigBB)); + InvokeDestPHIValues.push_back(PN->getIncomingValueForBlock(AfterCallBB)); } // Remove (unlink) the InvokeInst from the function... @@ -252,7 +252,7 @@ // PHI node) now. for (BasicBlock::iterator I = InvokeDest->begin(); PHINode *PN = dyn_cast(I); ++I) - PN->removeIncomingValue(OrigBB); + PN->removeIncomingValue(AfterCallBB); } // Now that the function is correct, make it a little bit nicer. In // particular, move the basic blocks inserted from the end of the function From brukman at cs.uiuc.edu Mon Sep 22 18:36:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 18:36:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/ModuleProvider.h Message-ID: <200309222335.SAA18573@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: ModuleProvider.h updated: 1.1 -> 1.2 --- Log message: Materialize the module before releasing it. --- Diffs of the changes: Index: llvm/include/llvm/ModuleProvider.h diff -u llvm/include/llvm/ModuleProvider.h:1.1 llvm/include/llvm/ModuleProvider.h:1.2 --- llvm/include/llvm/ModuleProvider.h:1.1 Thu Sep 18 11:16:32 2003 +++ llvm/include/llvm/ModuleProvider.h Mon Sep 22 18:35:23 2003 @@ -11,17 +11,16 @@ class Module; class AbstractModuleProvider { - Module *M; - protected: + Module *TheModule; AbstractModuleProvider(); public: virtual ~AbstractModuleProvider(); - /// getModule - returns the module this provider is encapsulating + /// getModule - returns the module this provider is encapsulating. /// - Module* getModule() { return M; } + Module* getModule() { return TheModule; } /// materializeFunction - make sure the given function is fully read. /// @@ -33,7 +32,13 @@ /// releaseModule - no longer delete the Module* when provider is destroyed. /// - Module* releaseModule() { Module *tempM = M; M = 0; return tempM; } + virtual Module* releaseModule() { + // Since we're losing control of this Module, we must hand it back complete + materializeModule(); + Module *tempM = TheModule; + TheModule = 0; + return tempM; + } }; From brukman at cs.uiuc.edu Mon Sep 22 18:37:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 18:37:00 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Primitives.h Message-ID: <200309222336.SAA18586@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bytecode: Primitives.h updated: 1.10 -> 1.11 --- Log message: Converted tabs to spaces. --- Diffs of the changes: Index: llvm/include/llvm/Bytecode/Primitives.h diff -u llvm/include/llvm/Bytecode/Primitives.h:1.10 llvm/include/llvm/Bytecode/Primitives.h:1.11 --- llvm/include/llvm/Bytecode/Primitives.h:1.10 Mon Aug 18 09:27:44 2003 +++ llvm/include/llvm/Bytecode/Primitives.h Mon Sep 22 18:35:54 2003 @@ -21,7 +21,7 @@ //===----------------------------------------------------------------------===// static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - unsigned &Result) { + unsigned &Result) { if (Buf+4 > EndBuf) return true; #ifdef ENDIAN_LITTLE Result = *(unsigned*)Buf; @@ -33,7 +33,7 @@ } static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - uint64_t &Result) { + uint64_t &Result) { if (Buf+8 > EndBuf) return true; #ifdef ENDIAN_LITTLE @@ -47,12 +47,12 @@ } static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - int &Result) { + int &Result) { return read(Buf, EndBuf, (unsigned &)Result); } static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - int64_t &Result) { + int64_t &Result) { return read(Buf, EndBuf, (uint64_t &)Result); } @@ -60,7 +60,7 @@ // read_vbr - Read an unsigned integer encoded in variable bitrate format. // static inline bool read_vbr(const unsigned char *&Buf, - const unsigned char *EndBuf, unsigned &Result) { + const unsigned char *EndBuf, unsigned &Result) { unsigned Shift = Result = 0; do { @@ -72,7 +72,7 @@ } static inline bool read_vbr(const unsigned char *&Buf, - const unsigned char *EndBuf, uint64_t &Result) { + const unsigned char *EndBuf, uint64_t &Result) { unsigned Shift = 0; Result = 0; do { @@ -84,7 +84,7 @@ // read_vbr (signed) - Read a signed number stored in sign-magnitude format static inline bool read_vbr(const unsigned char *&Buf, - const unsigned char *EndBuf, int &Result) { + const unsigned char *EndBuf, int &Result) { unsigned R; if (read_vbr(Buf, EndBuf, R)) return true; if (R & 1) @@ -97,7 +97,7 @@ static inline bool read_vbr(const unsigned char *&Buf, - const unsigned char *EndBuf, int64_t &Result) { + const unsigned char *EndBuf, int64_t &Result) { uint64_t R; if (read_vbr(Buf, EndBuf, R)) return true; if (R & 1) @@ -110,13 +110,13 @@ // align32 - Round up to multiple of 32 bits... static inline bool align32(const unsigned char *&Buf, - const unsigned char *EndBuf) { + const unsigned char *EndBuf) { Buf = (const unsigned char *)((unsigned long)(Buf+3) & (~3UL)); return Buf > EndBuf; } static inline bool read(const unsigned char *&Buf, const unsigned char *EndBuf, - std::string &Result, bool Aligned = true) { + std::string &Result, bool Aligned = true) { unsigned Size; if (read_vbr(Buf, EndBuf, Size)) return true; // Failure reading size? if (Buf+Size > EndBuf) return true; // Size invalid? @@ -131,8 +131,8 @@ } static inline bool input_data(const unsigned char *&Buf, - const unsigned char *EndBuf, - void *Ptr, void *End, bool Align = false) { + const unsigned char *EndBuf, + void *Ptr, void *End, bool Align = false) { unsigned char *Start = (unsigned char *)Ptr; unsigned Amount = (unsigned char *)End - Start; if (Buf+Amount > EndBuf) return true; @@ -245,7 +245,7 @@ } static inline void output(const std::string &s, std::deque &Out, - bool Aligned = true) { + bool Aligned = true) { unsigned Len = s.length(); output_vbr(Len, Out); // Strings may have an arbitrary length... Out.insert(Out.end(), s.begin(), s.end()); @@ -255,7 +255,7 @@ } static inline void output_data(void *Ptr, void *End, - std::deque &Out, + std::deque &Out, bool Align = false) { #ifdef ENDIAN_LITTLE Out.insert(Out.end(), (unsigned char*)Ptr, (unsigned char*)End); From brukman at cs.uiuc.edu Mon Sep 22 18:37:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 18:37:02 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Reader.h Message-ID: <200309222336.SAA18611@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bytecode: Reader.h updated: 1.10 -> 1.11 --- Log message: Added functions to perform streaming function loading, doxygenified comments. --- Diffs of the changes: Index: llvm/include/llvm/Bytecode/Reader.h diff -u llvm/include/llvm/Bytecode/Reader.h:1.10 llvm/include/llvm/Bytecode/Reader.h:1.11 --- llvm/include/llvm/Bytecode/Reader.h:1.10 Tue Apr 22 13:03:13 2003 +++ llvm/include/llvm/Bytecode/Reader.h Mon Sep 22 18:36:33 2003 @@ -12,23 +12,39 @@ #ifndef LLVM_BYTECODE_READER_H #define LLVM_BYTECODE_READER_H +#include "llvm/ModuleProvider.h" #include #include -class Module; +/// +/// +AbstractModuleProvider* +getBytecodeModuleProvider(const std::string &Filename); -// Parse and return a class... -// -Module *ParseBytecodeFile(const std::string &Filename, +/// +/// +AbstractModuleProvider* +getBytecodeBufferModuleProvider(const unsigned char *Buffer, + unsigned BufferSize, + const std::string &ModuleID); + +/// Parse the given bytecode file +/// +Module* ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr = 0); -Module *ParseBytecodeBuffer(const unsigned char *Buffer, unsigned BufferSize, + +/// Parse a given bytecode buffer +/// +Module* ParseBytecodeBuffer(const unsigned char *Buffer, + unsigned BufferSize, const std::string &ModuleID, std::string *ErrorStr = 0); -// ReadArchiveFile - Read bytecode files from the specfied .a file, returning -// true on error, or false on success. -// -bool ReadArchiveFile(const std::string &Filename, std::vector &Objects, +/// ReadArchiveFile - Read bytecode files from the specfied .a file, returning +/// true on error, or false on success. +/// +bool ReadArchiveFile(const std::string &Filename, + std::vector &Objects, std::string *ErrorStr = 0); #endif From brukman at cs.uiuc.edu Mon Sep 22 18:39:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 18:39:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp ReadConst.cpp Reader.cpp ReaderInternals.h Message-ID: <200309222338.SAA18647@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderWrappers.cpp added (r1.1) ReadConst.cpp updated: 1.52 -> 1.53 Reader.cpp updated: 1.61 -> 1.62 ReaderInternals.h updated: 1.41 -> 1.42 --- Log message: * Cleaned up code: - no more passing around a string pointer to set errors - no more returning booleans and checking for errors, we use C++ exceptions * Broke functionality into 2 new classes, one reads from file, one from a stream * Implemented lazy function streaming - the parser can read in a function at-a-time --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -c /dev/null llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.1 *** /dev/null Mon Sep 22 18:38:33 2003 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Mon Sep 22 18:38:23 2003 *************** *** 0 **** --- 1,170 ---- + #include "ReaderInternals.h" + #include "Support/StringExtras.h" + #include "Config/fcntl.h" + #include "Config/unistd.h" + #include "Config/sys/mman.h" + + #define CHECK_ALIGN32(begin,end) \ + if (align32(begin,end)) \ + throw std::string("Alignment error: ReaderWrappers.cpp:" + \ + utostr((unsigned)__LINE__)); + + namespace { + + /// BytecodeFileReader - parses a bytecode file from a file + /// + class BytecodeFileReader : public BytecodeParser { + private: + unsigned char *Buffer; + int Length; + + BytecodeFileReader(const BytecodeFileReader&); // Do not implement + void operator=(BytecodeFileReader &BFR); // Do not implement + + public: + BytecodeFileReader(const std::string &Filename); + ~BytecodeFileReader(); + + }; + + /// BytecodeStdinReader - parses a bytecode file from stdin + /// + class BytecodeStdinReader : public BytecodeParser { + private: + std::vector FileData; + unsigned char *FileBuf; + + BytecodeStdinReader(const BytecodeStdinReader&); // Do not implement + void operator=(BytecodeStdinReader &BFR); // Do not implement + + public: + BytecodeStdinReader(); + ~BytecodeStdinReader(); + }; + + /// FDHandle - Simple handle class to make sure a file descriptor gets closed + /// when the object is destroyed. + /// + class FDHandle { + int FD; + public: + FDHandle(int fd) : FD(fd) {} + operator int() const { return FD; } + ~FDHandle() { + if (FD != -1) close(FD); + } + }; + } + + BytecodeFileReader::BytecodeFileReader(const std::string &Filename) { + FDHandle FD = open(Filename.c_str(), O_RDONLY); + if (FD == -1) + throw std::string("Error opening file!"); + + // Stat the file to get its length... + struct stat StatBuf; + if (fstat(FD, &StatBuf) == -1 || StatBuf.st_size == 0) + throw std::string("Error stat'ing file!"); + + // mmap in the file all at once... + Length = StatBuf.st_size; + unsigned char *Buffer = (unsigned char*)mmap(0, Length, PROT_READ, + MAP_PRIVATE, FD, 0); + if (Buffer == (unsigned char*)MAP_FAILED) + throw std::string("Error mmapping file!"); + + // Parse the bytecode we mmapped in + ParseBytecode(Buffer, Length, Filename); + } + + BytecodeFileReader::~BytecodeFileReader() { + // Unmmap the bytecode... + munmap((char*)Buffer, Length); + } + + + #define ALIGN_PTRS 0 + + BytecodeStdinReader::BytecodeStdinReader() { + int BlockSize; + unsigned char Buffer[4096*4]; + + // Read in all of the data from stdin, we cannot mmap stdin... + while ((BlockSize = read(0 /*stdin*/, Buffer, 4096*4))) { + if (BlockSize == -1) + throw std::string("Error reading from stdin!"); + + FileData.insert(FileData.end(), Buffer, Buffer+BlockSize); + } + + if (FileData.empty()) + throw std::string("Standard Input empty!"); + + #if ALIGN_PTRS + FileBuf = (unsigned char*)mmap(0, FileData.size(), PROT_READ|PROT_WRITE, + MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); + assert((Buf != (unsigned char*)-1) && "mmap returned error!"); + memcpy(Buf, &FileData[0], FileData.size()); + #else + FileBuf = &FileData[0]; + #endif + + #if 0 + // Allocate a new buffer to hold the bytecode... + unsigned char *ParseBegin=0; + unsigned Offset=0; + if ((intptr_t)Buffer & 3) { + delete [] Buffer; + Buffer = new unsigned char[Length+4]; + Offset = 4-((intptr_t)Buffer & 3); // Make sure it's aligned + } + memcpy(Buffer+Offset, Buf, Length); // Copy it over + ParseBegin = Buffer+Offset; + #endif + + ParseBytecode(FileBuf, FileData.size(), ""); + } + + BytecodeStdinReader::~BytecodeStdinReader() { + #if ALIGN_PTRS + munmap((char*)FileBuf, FileData.size()); // Free mmap'd data area + #endif + } + + /// + /// + AbstractModuleProvider* + getBytecodeBufferModuleProvider(const unsigned char *Buffer, unsigned Length, + const std::string &ModuleID) { + CHECK_ALIGN32(Buffer, Buffer+Length); + BytecodeParser *Parser = new BytecodeParser(); + Parser->ParseBytecode(Buffer, Length, ModuleID); + return Parser; + } + + Module *ParseBytecodeBuffer(const unsigned char *Buffer, unsigned Length, + const std::string &ModuleID, std::string *ErrorStr){ + AbstractModuleProvider *AMP = + getBytecodeBufferModuleProvider(Buffer, Length, ModuleID); + Module *M = AMP->releaseModule(); + delete AMP; + return M; + } + + + /// Parse and return a class file... + /// + AbstractModuleProvider* + getBytecodeModuleProvider(const std::string &Filename) { + if (Filename != std::string("-")) // Read from a file... + return new BytecodeFileReader(Filename); + else // Read from stdin + return new BytecodeStdinReader(); + } + + Module *ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr) { + AbstractModuleProvider *AMP = getBytecodeModuleProvider(Filename); + Module *M = AMP->releaseModule(); + delete AMP; + return M; + } Index: llvm/lib/Bytecode/Reader/ReadConst.cpp diff -u llvm/lib/Bytecode/Reader/ReadConst.cpp:1.52 llvm/lib/Bytecode/Reader/ReadConst.cpp:1.53 --- llvm/lib/Bytecode/Reader/ReadConst.cpp:1.52 Thu Sep 11 17:31:21 2003 +++ llvm/lib/Bytecode/Reader/ReadConst.cpp Mon Sep 22 18:38:23 2003 @@ -16,7 +16,7 @@ const Type *BytecodeParser::parseTypeConstant(const unsigned char *&Buf, const unsigned char *EndBuf) { unsigned PrimType; - if (read_vbr(Buf, EndBuf, PrimType)) return 0; + if (read_vbr(Buf, EndBuf, PrimType)) throw Error_readvbr; const Type *Val = 0; if ((Val = Type::getPrimitiveType((Type::PrimitiveID)PrimType))) @@ -124,7 +124,7 @@ // with a new resolved concrete type. // void debug_type_tables(); -bool BytecodeParser::parseTypeConstants(const unsigned char *&Buf, +void BytecodeParser::parseTypeConstants(const unsigned char *&Buf, const unsigned char *EndBuf, TypeValuesListTy &Tab, unsigned NumEntries) { @@ -139,7 +139,7 @@ // for (unsigned i = 0; i < NumEntries; ++i) { const Type *NewTy = parseTypeConstant(Buf, EndBuf), *OldTy = Tab[i].get(); - if (NewTy == 0) return true; + if (NewTy == 0) throw std::string("Parsed invalid type."); BCR_TRACE(4, "#" << i << ": Read Type Constant: '" << NewTy << "' Replacing: " << OldTy << "\n"); @@ -163,11 +163,10 @@ BCR_TRACE(5, (void*)Tab[i].get() << " - " << Tab[i].get() << "\n"); } debug_type_tables(); - return false; } -bool BytecodeParser::parseConstantValue(const unsigned char *&Buf, +void BytecodeParser::parseConstantValue(const unsigned char *&Buf, const unsigned char *EndBuf, const Type *Ty, Constant *&V) { @@ -175,28 +174,28 @@ // a ConstantExpr can be of any type, and has no explicit value. // unsigned isExprNumArgs; // 0 if not expr; numArgs if is expr - if (read_vbr(Buf, EndBuf, isExprNumArgs)) return true; + if (read_vbr(Buf, EndBuf, isExprNumArgs)) throw Error_readvbr; if (isExprNumArgs) { // FIXME: Encoding of constant exprs could be much more compact! unsigned Opcode; std::vector ArgVec; ArgVec.reserve(isExprNumArgs); - if (read_vbr(Buf, EndBuf, Opcode)) return true; + if (read_vbr(Buf, EndBuf, Opcode)) throw Error_readvbr; // Read the slot number and types of each of the arguments for (unsigned i = 0; i != isExprNumArgs; ++i) { unsigned ArgValSlot, ArgTypeSlot; - if (read_vbr(Buf, EndBuf, ArgValSlot)) return true; - if (read_vbr(Buf, EndBuf, ArgTypeSlot)) return true; + if (read_vbr(Buf, EndBuf, ArgValSlot)) throw Error_readvbr; + if (read_vbr(Buf, EndBuf, ArgTypeSlot)) throw Error_readvbr; const Type *ArgTy = getType(ArgTypeSlot); - if (ArgTy == 0) return true; + if (ArgTy == 0) throw std::string("Argument type slot not found."); BCR_TRACE(4, "CE Arg " << i << ": Type: '" << ArgTy << "' slot: " << ArgValSlot << "\n"); // Get the arg value from its slot if it exists, otherwise a placeholder Constant *C = getConstantValue(ArgTy, ArgValSlot); - if (C == 0) return true; + if (C == 0) throw std::string("No arg value or placeholder found."); ArgVec.push_back(C); } @@ -210,15 +209,15 @@ } else { // All other 2-operand expressions V = ConstantExpr::get(Opcode, ArgVec[0], ArgVec[1]); } - return false; + return; } // Ok, not an ConstantExpr. We now know how to read the given type... switch (Ty->getPrimitiveID()) { case Type::BoolTyID: { unsigned Val; - if (read_vbr(Buf, EndBuf, Val)) return true; - if (Val != 0 && Val != 1) return true; + if (read_vbr(Buf, EndBuf, Val)) throw Error_readvbr; + if (Val != 0 && Val != 1) throw std::string("Invalid boolean value read."); V = ConstantBool::get(Val == 1); break; } @@ -227,15 +226,16 @@ case Type::UShortTyID: case Type::UIntTyID: { unsigned Val; - if (read_vbr(Buf, EndBuf, Val)) return true; - if (!ConstantUInt::isValueValidForType(Ty, Val)) return true; + if (read_vbr(Buf, EndBuf, Val)) throw Error_readvbr; + if (!ConstantUInt::isValueValidForType(Ty, Val)) + throw std::string("Invalid unsigned byte/short/int read."); V = ConstantUInt::get(Ty, Val); break; } case Type::ULongTyID: { uint64_t Val; - if (read_vbr(Buf, EndBuf, Val)) return true; + if (read_vbr(Buf, EndBuf, Val)) throw Error_readvbr; V = ConstantUInt::get(Ty, Val); break; } @@ -245,22 +245,23 @@ case Type::IntTyID: { case Type::LongTyID: int64_t Val; - if (read_vbr(Buf, EndBuf, Val)) return true; - if (!ConstantSInt::isValueValidForType(Ty, Val)) return true; + if (read_vbr(Buf, EndBuf, Val)) throw Error_readvbr; + if (!ConstantSInt::isValueValidForType(Ty, Val)) + throw std::string("Invalid signed byte/short/int/long read."); V = ConstantSInt::get(Ty, Val); break; } case Type::FloatTyID: { float F; - if (input_data(Buf, EndBuf, &F, &F+1)) return true; + if (input_data(Buf, EndBuf, &F, &F+1)) throw Error_inputdata; V = ConstantFP::get(Ty, F); break; } case Type::DoubleTyID: { double Val; - if (input_data(Buf, EndBuf, &Val, &Val+1)) return true; + if (input_data(Buf, EndBuf, &Val, &Val+1)) throw Error_inputdata; V = ConstantFP::get(Ty, Val); break; } @@ -276,9 +277,9 @@ std::vector Elements; while (NumElements--) { // Read all of the elements of the constant. unsigned Slot; - if (read_vbr(Buf, EndBuf, Slot)) return true; + if (read_vbr(Buf, EndBuf, Slot)) throw Error_readvbr; Constant *C = getConstantValue(AT->getElementType(), Slot); - if (!C) return true; + if (!C) throw std::string("Unable to get const value of array slot."); Elements.push_back(C); } V = ConstantArray::get(AT, Elements); @@ -292,9 +293,9 @@ std::vector Elements; for (unsigned i = 0; i < ET.size(); ++i) { unsigned Slot; - if (read_vbr(Buf, EndBuf, Slot)) return true; + if (read_vbr(Buf, EndBuf, Slot)) throw Error_readvbr; Constant *C = getConstantValue(ET[i], Slot); - if (!C) return true; + if (!C) throw std::string("Could not read const value in struct slot."); Elements.push_back(C); } @@ -308,7 +309,7 @@ if (HasImplicitZeroInitializer) SubClass = 1; else - if (read_vbr(Buf, EndBuf, SubClass)) return true; + if (read_vbr(Buf, EndBuf, SubClass)) throw Error_readvbr; switch (SubClass) { case 0: // ConstantPointerNull value... @@ -317,19 +318,20 @@ case 1: { // ConstantPointerRef value... unsigned Slot; - if (read_vbr(Buf, EndBuf, Slot)) return true; + if (read_vbr(Buf, EndBuf, Slot)) throw Error_readvbr; BCR_TRACE(4, "CPR: Type: '" << Ty << "' slot: " << Slot << "\n"); // Check to see if we have already read this global variable... Value *Val = getValue(PT, Slot, false); GlobalValue *GV; if (Val) { - if (!(GV = dyn_cast(Val))) return true; + if (!(GV = dyn_cast(Val))) + throw std::string("Value of ConstantPointerRef not in ValueTable!"); BCR_TRACE(5, "Value Found in ValueTable!\n"); } else if (RevisionNum > 0) { // Revision #0 could have forward references to globals that were weird. // We got rid of this in subsequent revs. - return true; + throw std::string("Forward references to globals not allowed."); } else { // Nope... find or create a forward ref. for it GlobalRefsType::iterator I = GlobalRefs.find(std::make_pair(PT, Slot)); @@ -359,7 +361,7 @@ default: BCR_TRACE(5, "UNKNOWN Pointer Constant Type!\n"); - return true; + throw std::string("Unknown pointer constant type."); } break; } @@ -368,41 +370,41 @@ std::cerr << __FILE__ << ":" << __LINE__ << ": Don't know how to deserialize constant value of type '" << Ty->getName() << "'\n"; - return true; + throw std::string("Don't know how to deserialize constant value of type '"+ + Ty->getName()); } - - return false; } -bool BytecodeParser::ParseGlobalTypes(const unsigned char *&Buf, +void BytecodeParser::ParseGlobalTypes(const unsigned char *&Buf, const unsigned char *EndBuf) { ValueTable T; - return ParseConstantPool(Buf, EndBuf, T, ModuleTypeValues); + ParseConstantPool(Buf, EndBuf, T, ModuleTypeValues); } -bool BytecodeParser::ParseConstantPool(const unsigned char *&Buf, +void BytecodeParser::ParseConstantPool(const unsigned char *&Buf, const unsigned char *EndBuf, - ValueTable &Tab, - TypeValuesListTy &TypeTab) { + ValueTable &Tab, + TypeValuesListTy &TypeTab) { while (Buf < EndBuf) { unsigned NumEntries, Typ; if (read_vbr(Buf, EndBuf, NumEntries) || - read_vbr(Buf, EndBuf, Typ)) return true; + read_vbr(Buf, EndBuf, Typ)) throw Error_readvbr; const Type *Ty = getType(Typ); - if (Ty == 0) return true; + if (Ty == 0) throw std::string("Invalid type read."); BCR_TRACE(3, "Type: '" << Ty << "' NumEntries: " << NumEntries << "\n"); if (Typ == Type::TypeTyID) { - if (parseTypeConstants(Buf, EndBuf, TypeTab, NumEntries)) return true; + parseTypeConstants(Buf, EndBuf, TypeTab, NumEntries); } else { for (unsigned i = 0; i < NumEntries; ++i) { - Constant *C; + Constant *C; int Slot; - if (parseConstantValue(Buf, EndBuf, Ty, C)) return true; + parseConstantValue(Buf, EndBuf, Ty, C); assert(C && "parseConstantValue returned NULL!"); - BCR_TRACE(4, "Read Constant: '" << *C << "'\n"); - if ((Slot = insertValue(C, Tab)) == -1) return true; + BCR_TRACE(4, "Read Constant: '" << *C << "'\n"); + if ((Slot = insertValue(C, Tab)) == -1) + throw std::string("Could not insert value into ValueTable."); // If we are reading a function constant table, make sure that we adjust // the slot number to be the real global constant number. @@ -414,6 +416,5 @@ } } - if (Buf > EndBuf) return true; - return false; + if (Buf > EndBuf) throw std::string("Read past end of buffer."); } Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.61 llvm/lib/Bytecode/Reader/Reader.cpp:1.62 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.61 Thu Sep 11 17:31:21 2003 +++ llvm/lib/Bytecode/Reader/Reader.cpp Mon Sep 22 18:38:23 2003 @@ -11,37 +11,44 @@ //===----------------------------------------------------------------------===// #include "ReaderInternals.h" -#include "Config/sys/mman.h" #include "llvm/Bytecode/Reader.h" #include "llvm/Bytecode/Format.h" -#include "llvm/Module.h" #include "llvm/Constants.h" #include "llvm/iPHINode.h" #include "llvm/iOther.h" -#include "Config/sys/types.h" -#include "Config/sys/stat.h" -#include "Config/fcntl.h" +#include "llvm/Module.h" +#include "Support/StringExtras.h" #include "Config/unistd.h" +#include "Config/sys/mman.h" +#include "Config/sys/stat.h" +#include "Config/sys/types.h" #include +#include + +#define CHECK_ALIGN32(begin,end) \ + if (align32(begin,end)) \ + throw std::string("Alignment error: Reader.cpp:" + \ + utostr((unsigned)__LINE__)); -bool BytecodeParser::getTypeSlot(const Type *Ty, unsigned &Slot) { +void +BytecodeParser::getTypeSlot(const Type *Ty, unsigned &Slot) { if (Ty->isPrimitiveType()) { Slot = Ty->getPrimitiveID(); } else { // Check the function level types first... TypeValuesListTy::iterator I = find(FunctionTypeValues.begin(), - FunctionTypeValues.end(), Ty); + FunctionTypeValues.end(), Ty); if (I != FunctionTypeValues.end()) { - Slot = FirstDerivedTyID+ModuleTypeValues.size()+ - (&*I - &FunctionTypeValues[0]); + Slot = FirstDerivedTyID + ModuleTypeValues.size() + + (&*I - &FunctionTypeValues[0]); } else { I = find(ModuleTypeValues.begin(), ModuleTypeValues.end(), Ty); - if (I == ModuleTypeValues.end()) return true; // Didn't find type! + if (I == ModuleTypeValues.end()) + throw std::string("Didn't find type in ModuleTypeValues."); Slot = FirstDerivedTyID + (&*I - &ModuleTypeValues[0]); } } //cerr << "getTypeSlot '" << Ty->getName() << "' = " << Slot << "\n"; - return false; } const Type *BytecodeParser::getType(unsigned ID) { @@ -61,7 +68,7 @@ !cast(Val)->isNullValue()) && "Cannot read null values from bytecode!"); unsigned type; - if (getTypeSlot(Val->getType(), type)) return -1; + getTypeSlot(Val->getType(), type); assert(type != Type::TypeTyID && "Types should never be insertValue'd!"); if (ValueTab.size() <= type) { @@ -72,11 +79,11 @@ } //cerr << "insertValue Values[" << type << "][" << ValueTab[type].size() - // << "] = " << Val << "\n"; + // << "] = " << Val << "\n"; ValueTab[type]->push_back(Val); bool HasOffset = HasImplicitZeroInitializer && - !Val->getType()->isPrimitiveType(); + !Val->getType()->isPrimitiveType(); return ValueTab[type]->size()-1 + HasOffset; } @@ -86,9 +93,8 @@ Value *Val) { assert(&ValueTab == &ModuleValues && "Can only setValueTo on Module values!"); unsigned type; - if (getTypeSlot(Val->getType(), type)) - assert(0 && "getTypeSlot failed!"); - + getTypeSlot(Val->getType(), type); + assert((!HasImplicitZeroInitializer || Slot != 0) && "Cannot change zero init"); assert(type < ValueTab.size() && Slot <= ValueTab[type]->size()); @@ -98,10 +104,9 @@ Value *BytecodeParser::getValue(const Type *Ty, unsigned oNum, bool Create) { unsigned Num = oNum; unsigned type; // The type plane it lives in... + getTypeSlot(Ty, type); - if (getTypeSlot(Ty, type)) return 0; - - if (type == Type::TypeTyID) { // The 'type' plane has implicit values + if (type == Type::TypeTyID) { // The 'type' plane has implicit values assert(Create == false); if (Num < Type::NumPrimitiveIDs) { const Type *T = Type::getPrimitiveType((Type::PrimitiveID)Num); @@ -111,11 +116,11 @@ // Otherwise, derived types need offset... Num -= FirstDerivedTyID; - // Is it a module level type? + // Is it a module-level type? if (Num < ModuleTypeValues.size()) return (Value*)ModuleTypeValues[Num].get(); - // Nope, is it a function level type? + // Nope, is it a function-level type? Num -= ModuleTypeValues.size(); if (Num < FunctionTypeValues.size()) return (Value*)FunctionTypeValues[Num].get(); @@ -184,8 +189,7 @@ } -bool BytecodeParser::postResolveValues(ValueTable &ValTab) { - bool Error = false; +void BytecodeParser::postResolveValues(ValueTable &ValTab) { while (!ValTab.empty()) { ValueList &DL = *ValTab.back(); ValTab.pop_back(); @@ -197,83 +201,77 @@ Value *NewDef = getValue(D->getType(), IDNumber, false); if (NewDef == 0) { - Error = true; // Unresolved thinger - std::cerr << "Unresolvable reference found: <" - << *D->getType() << ">:" << IDNumber <<"!\n"; + throw std::string("Unresolvable reference found: <" + + D->getType()->getName() + ">:" +utostr(IDNumber)+"."); } else { - // Fixup all of the uses of this placeholder def... + // Fixup all of the uses of this placeholder def... D->replaceAllUsesWith(NewDef); // Now that all the uses are gone, delete the placeholder... // If we couldn't find a def (error case), then leak a little - delete D; // memory, 'cause otherwise we can't remove all uses! + delete D; // memory, 'cause otherwise we can't remove all uses! } } delete &DL; } - - return Error; } -bool BytecodeParser::ParseBasicBlock(const unsigned char *&Buf, - const unsigned char *EndBuf, - BasicBlock *&BB) { - BB = new BasicBlock(); +std::auto_ptr +BytecodeParser::ParseBasicBlock(const unsigned char *&Buf, + const unsigned char *EndBuf) { + std::auto_ptr BB(new BasicBlock()); while (Buf < EndBuf) { Instruction *Inst; - if (ParseInstruction(Buf, EndBuf, Inst)) { - delete BB; - return true; - } + ParseInstruction(Buf, EndBuf, Inst); - if (Inst == 0) { delete BB; return true; } - if (insertValue(Inst, Values) == -1) { delete BB; return true; } + if (Inst == 0) { throw std::string("Could not parse Instruction."); } + if (insertValue(Inst, Values) == -1) { + throw std::string("Could not insert value."); + } BB->getInstList().push_back(Inst); - BCR_TRACE(4, Inst); } - return false; + return BB; } -bool BytecodeParser::ParseSymbolTable(const unsigned char *&Buf, +void BytecodeParser::ParseSymbolTable(const unsigned char *&Buf, const unsigned char *EndBuf, - SymbolTable *ST) { + SymbolTable *ST) { while (Buf < EndBuf) { // Symtab block header: [num entries][type id number] unsigned NumEntries, Typ; if (read_vbr(Buf, EndBuf, NumEntries) || - read_vbr(Buf, EndBuf, Typ)) return true; + read_vbr(Buf, EndBuf, Typ)) throw Error_readvbr; const Type *Ty = getType(Typ); - if (Ty == 0) return true; + if (Ty == 0) throw std::string("Invalid type read in symbol table."); BCR_TRACE(3, "Plane Type: '" << Ty << "' with " << NumEntries << - " entries\n"); + " entries\n"); for (unsigned i = 0; i < NumEntries; ++i) { // Symtab entry: [def slot #][name] unsigned slot; - if (read_vbr(Buf, EndBuf, slot)) return true; + if (read_vbr(Buf, EndBuf, slot)) throw Error_readvbr; std::string Name; if (read(Buf, EndBuf, Name, false)) // Not aligned... - return true; + throw std::string("Buffer not aligned."); Value *V = getValue(Ty, slot, false); // Find mapping... if (V == 0) { - BCR_TRACE(3, "FAILED LOOKUP: Slot #" << slot << "\n"); - return true; + BCR_TRACE(3, "FAILED LOOKUP: Slot #" << slot << "\n"); + throw std::string("Failed value look-up."); } BCR_TRACE(4, "Map: '" << Name << "' to #" << slot << ":" << *V; - if (!isa(V)) std::cerr << "\n"); + if (!isa(V)) std::cerr << "\n"); V->setName(Name, ST); } } - if (Buf > EndBuf) return true; - return false; + if (Buf > EndBuf) throw std::string("Tried to read past end of buffer."); } void BytecodeParser::ResolveReferencesToValue(Value *NewV, unsigned Slot) { @@ -295,114 +293,124 @@ GlobalRefs.erase(I); // Remove the map entry for it } +void +BytecodeParser::ParseFunction(const unsigned char *&Buf, + const unsigned char *EndBuf) { + if (FunctionSignatureList.empty()) + throw std::string("FunctionSignatureList empty!"); -bool BytecodeParser::ParseFunction(const unsigned char *&Buf, - const unsigned char *EndBuf) { - // Clear out the local values table... - if (FunctionSignatureList.empty()) { - Error = "Function found, but FunctionSignatureList empty!"; - return true; // Unexpected function! - } + Function *F = FunctionSignatureList.back().first; + unsigned FunctionSlot = FunctionSignatureList.back().second; + FunctionSignatureList.pop_back(); + + // Save the information for future reading of the function + LazyFunctionInfo *LFI = new LazyFunctionInfo(); + LFI->Buf = Buf; LFI->EndBuf = EndBuf; LFI->FunctionSlot = FunctionSlot; + LazyFunctionLoadMap[F] = LFI; + // Pretend we've `parsed' this function + Buf = EndBuf; +} + +void BytecodeParser::materializeFunction(Function* F) { + // Find {start, end} pointers and slot in the map. If not there, we're done. + std::map::iterator Fi = + LazyFunctionLoadMap.find(F); + if (Fi == LazyFunctionLoadMap.end()) return; + + LazyFunctionInfo *LFI = Fi->second; + const unsigned char *Buf = LFI->Buf; + const unsigned char *EndBuf = LFI->EndBuf; + unsigned FunctionSlot = LFI->FunctionSlot; + LazyFunctionLoadMap.erase(Fi); + delete LFI; GlobalValue::LinkageTypes Linkage = GlobalValue::ExternalLinkage; if (!hasInternalMarkerOnly) { unsigned LinkageType; - if (read_vbr(Buf, EndBuf, LinkageType)) return true; - if (LinkageType & ~0x3) return true; + if (read_vbr(Buf, EndBuf, LinkageType)) + throw std::string("ParseFunction: Error reading from buffer."); + if (LinkageType & ~0x3) + throw std::string("Invalid linkage type for Function."); Linkage = (GlobalValue::LinkageTypes)LinkageType; } else { // We used to only support two linkage models: internal and external unsigned isInternal; - if (read_vbr(Buf, EndBuf, isInternal)) return true; + if (read_vbr(Buf, EndBuf, isInternal)) + throw std::string("ParseFunction: Error reading from buffer."); if (isInternal) Linkage = GlobalValue::InternalLinkage; } - Function *F = FunctionSignatureList.back().first; - unsigned FunctionSlot = FunctionSignatureList.back().second; - FunctionSignatureList.pop_back(); F->setLinkage(Linkage); const FunctionType::ParamTypes &Params =F->getFunctionType()->getParamTypes(); Function::aiterator AI = F->abegin(); for (FunctionType::ParamTypes::const_iterator It = Params.begin(); It != Params.end(); ++It, ++AI) { - if (insertValue(AI, Values) == -1) { - Error = "Error reading function arguments!\n"; - return true; - } + if (insertValue(AI, Values) == -1) + throw std::string("Error reading function arguments!"); } while (Buf < EndBuf) { unsigned Type, Size; const unsigned char *OldBuf = Buf; - if (readBlock(Buf, EndBuf, Type, Size)) { - Error = "Error reading Function level block!"; - return true; - } + readBlock(Buf, EndBuf, Type, Size); switch (Type) { - case BytecodeFormat::ConstantPool: + case BytecodeFormat::ConstantPool: { BCR_TRACE(2, "BLOCK BytecodeFormat::ConstantPool: {\n"); - if (ParseConstantPool(Buf, Buf+Size, Values, FunctionTypeValues)) - return true; + ParseConstantPool(Buf, Buf+Size, Values, FunctionTypeValues); break; + } case BytecodeFormat::BasicBlock: { BCR_TRACE(2, "BLOCK BytecodeFormat::BasicBlock: {\n"); - BasicBlock *BB; - if (ParseBasicBlock(Buf, Buf+Size, BB) || - insertValue(BB, Values) == -1) - return true; // Parse error... :( + std::auto_ptr BB = ParseBasicBlock(Buf, Buf+Size); + if (!BB.get() || insertValue(BB.get(), Values) == -1) + throw std::string("Parse error: BasicBlock"); - F->getBasicBlockList().push_back(BB); + F->getBasicBlockList().push_back(BB.release()); break; } - case BytecodeFormat::SymbolTable: + case BytecodeFormat::SymbolTable: { BCR_TRACE(2, "BLOCK BytecodeFormat::SymbolTable: {\n"); - if (ParseSymbolTable(Buf, Buf+Size, &F->getSymbolTable())) - return true; + ParseSymbolTable(Buf, Buf+Size, &F->getSymbolTable()); break; + } default: BCR_TRACE(2, "BLOCK :ignored! {\n"); Buf += Size; - if (OldBuf > Buf) return true; // Wrap around! + if (OldBuf > Buf) + throw std::string("Wrapped around reading bytecode."); break; } BCR_TRACE(2, "} end block\n"); - if (align32(Buf, EndBuf)) { - Error = "Error aligning Function level block!"; - return true; // Malformed bc file, read past end of block. - } + // Malformed bc file if read past end of block. + CHECK_ALIGN32(Buf, EndBuf); } - if (postResolveValues(LateResolveValues)) { - Error = "Error resolving function values!"; - return true; // Unresolvable references! - } + // Check for unresolvable references + postResolveValues(LateResolveValues); - ResolveReferencesToValue(F, FunctionSlot); + //ResolveReferencesToValue(F, FunctionSlot); - // Clear out function level types... + // Clear out function-level types... FunctionTypeValues.clear(); freeTable(Values); - return false; } -bool BytecodeParser::ParseModuleGlobalInfo(const unsigned char *&Buf, - const unsigned char *End){ - if (!FunctionSignatureList.empty()) { - Error = "Two ModuleGlobalInfo packets found!"; - return true; // Two ModuleGlobal blocks? - } +void BytecodeParser::ParseModuleGlobalInfo(const unsigned char *&Buf, + const unsigned char *End) { + if (!FunctionSignatureList.empty()) + throw std::string("Two ModuleGlobalInfo packets found!"); // Read global variables... unsigned VarType; - if (read_vbr(Buf, End, VarType)) return true; + if (read_vbr(Buf, End, VarType)) throw Error_readvbr; while (VarType != Type::VoidTyID) { // List is terminated by Void unsigned SlotNo; GlobalValue::LinkageTypes Linkage; @@ -421,10 +429,9 @@ } const Type *Ty = getType(SlotNo); - if (!Ty || !isa(Ty)) { - Error = "Global not pointer type! Ty = " + Ty->getDescription(); - return true; - } + if (!Ty || !isa(Ty)) + throw std::string("Global not pointer type! Ty = " + + Ty->getDescription()); const Type *ElTy = cast(Ty)->getElementType(); @@ -432,27 +439,27 @@ GlobalVariable *GV = new GlobalVariable(ElTy, VarType & 1, Linkage, 0, "", TheModule); int DestSlot = insertValue(GV, ModuleValues); - if (DestSlot == -1) return true; + if (DestSlot == -1) throw Error_DestSlot; BCR_TRACE(2, "Global Variable of type: " << *Ty << "\n"); ResolveReferencesToValue(GV, (unsigned)DestSlot); if (VarType & 2) { // Does it have an initializer? unsigned InitSlot; - if (read_vbr(Buf, End, InitSlot)) return true; + if (read_vbr(Buf, End, InitSlot)) throw Error_readvbr; GlobalInits.push_back(std::make_pair(GV, InitSlot)); } - if (read_vbr(Buf, End, VarType)) return true; + if (read_vbr(Buf, End, VarType)) throw Error_readvbr; } // Read the function objects for all of the functions that are coming unsigned FnSignature; - if (read_vbr(Buf, End, FnSignature)) return true; + if (read_vbr(Buf, End, FnSignature)) throw Error_readvbr; while (FnSignature != Type::VoidTyID) { // List is terminated by Void const Type *Ty = getType(FnSignature); if (!Ty || !isa(Ty) || !isa(cast(Ty)->getElementType())) { - Error = "Function not ptr to func type! Ty = " + Ty->getDescription(); - return true; + throw std::string("Function not ptr to func type! Ty = " + + Ty->getDescription()); } // We create functions by passing the underlying FunctionType to create... @@ -467,7 +474,7 @@ Function *Func = new Function(cast(Ty), GlobalValue::InternalLinkage, "", TheModule); int DestSlot = insertValue(Func, ModuleValues); - if (DestSlot == -1) return true; + if (DestSlot == -1) throw Error_DestSlot; ResolveReferencesToValue(Func, (unsigned)DestSlot); // Keep track of this information in a list that is emptied as functions are @@ -475,11 +482,11 @@ // FunctionSignatureList.push_back(std::make_pair(Func, DestSlot)); - if (read_vbr(Buf, End, FnSignature)) return true; + if (read_vbr(Buf, End, FnSignature)) throw Error_readvbr; BCR_TRACE(2, "Function of type: " << Ty << "\n"); } - if (align32(Buf, End)) return true; + CHECK_ALIGN32(Buf, End); // Now that the function signature list is set up, reverse it so that we can // remove elements efficiently from the back of the vector. @@ -489,13 +496,12 @@ // we don't understand, so we transparently ignore them. // Buf = End; - return false; } -bool BytecodeParser::ParseVersionInfo(const unsigned char *&Buf, +void BytecodeParser::ParseVersionInfo(const unsigned char *&Buf, const unsigned char *EndBuf) { unsigned Version; - if (read_vbr(Buf, EndBuf, Version)) return true; + if (read_vbr(Buf, EndBuf, Version)) throw Error_readvbr; // Unpack version number: low four bits are for flags, top bits = version Module::Endianness Endianness; @@ -519,7 +525,7 @@ // only valid with a 14 in the flags values. Also, it does not support // encoding zero initializers for arrays compactly. // - if (Version != 14) return true; // Unknown revision 0 flags? + if (Version != 14) throw std::string("Unknown revision 0 flags?"); HasImplicitZeroInitializer = false; Endianness = Module::BigEndian; PointerSize = Module::Pointer64; @@ -536,8 +542,7 @@ // having internal and external. break; default: - Error = "Unknown bytecode version number!"; - return true; + throw std::string("Unknown bytecode version number!"); } if (hasNoEndianness) Endianness = Module::AnyEndianness; @@ -549,66 +554,61 @@ BCR_TRACE(1, "Endianness/PointerSize = " << Endianness << "," << PointerSize << "\n"); BCR_TRACE(1, "HasImplicitZeroInit = " << HasImplicitZeroInitializer << "\n"); - return false; } -bool BytecodeParser::ParseModule(const unsigned char *Buf, +void BytecodeParser::ParseModule(const unsigned char *Buf, const unsigned char *EndBuf) { unsigned Type, Size; - if (readBlock(Buf, EndBuf, Type, Size)) return true; - if (Type != BytecodeFormat::Module || Buf+Size != EndBuf) { - Error = "Expected Module packet!"; - return true; // Hrm, not a class? - } + readBlock(Buf, EndBuf, Type, Size); + if (Type != BytecodeFormat::Module || Buf+Size != EndBuf) + throw std::string("Expected Module packet! B: "+ + utostr((unsigned)(intptr_t)Buf) + ", S: "+utostr(Size)+ + " E: "+utostr((unsigned)(intptr_t)EndBuf)); // Hrm, not a class? BCR_TRACE(0, "BLOCK BytecodeFormat::Module: {\n"); FunctionSignatureList.clear(); // Just in case... // Read into instance variables... - if (ParseVersionInfo(Buf, EndBuf)) return true; - if (align32(Buf, EndBuf)) return true; + ParseVersionInfo(Buf, EndBuf); + CHECK_ALIGN32(Buf, EndBuf); while (Buf < EndBuf) { const unsigned char *OldBuf = Buf; - if (readBlock(Buf, EndBuf, Type, Size)) return true; + readBlock(Buf, EndBuf, Type, Size); switch (Type) { case BytecodeFormat::GlobalTypePlane: BCR_TRACE(1, "BLOCK BytecodeFormat::GlobalTypePlane: {\n"); - if (ParseGlobalTypes(Buf, Buf+Size)) return true; + ParseGlobalTypes(Buf, Buf+Size); break; case BytecodeFormat::ModuleGlobalInfo: BCR_TRACE(1, "BLOCK BytecodeFormat::ModuleGlobalInfo: {\n"); - if (ParseModuleGlobalInfo(Buf, Buf+Size)) return true; + ParseModuleGlobalInfo(Buf, Buf+Size); break; case BytecodeFormat::ConstantPool: BCR_TRACE(1, "BLOCK BytecodeFormat::ConstantPool: {\n"); - if (ParseConstantPool(Buf, Buf+Size, ModuleValues, ModuleTypeValues)) - return true; + ParseConstantPool(Buf, Buf+Size, ModuleValues, ModuleTypeValues); break; case BytecodeFormat::Function: { BCR_TRACE(1, "BLOCK BytecodeFormat::Function: {\n"); - if (ParseFunction(Buf, Buf+Size)) - return true; // Error parsing function + ParseFunction(Buf, Buf+Size); break; } case BytecodeFormat::SymbolTable: BCR_TRACE(1, "BLOCK BytecodeFormat::SymbolTable: {\n"); - if (ParseSymbolTable(Buf, Buf+Size, &TheModule->getSymbolTable())) - return true; + ParseSymbolTable(Buf, Buf+Size, &TheModule->getSymbolTable()); break; default: - Error = "Expected Module Block!"; Buf += Size; - if (OldBuf > Buf) return true; // Wrap around! + if (OldBuf > Buf) throw std::string("Expected Module Block!"); break; } BCR_TRACE(1, "} end block\n"); - if (align32(Buf, EndBuf)) return true; + CHECK_ALIGN32(Buf, EndBuf); } // After the module constant pool has been read, we can safely initialize @@ -620,137 +620,36 @@ // Look up the initializer value... if (Value *V = getValue(GV->getType()->getElementType(), Slot, false)) { - if (GV->hasInitializer()) return true; + if (GV->hasInitializer()) + throw std::string("Global *already* has an initializer?!"); GV->setInitializer(cast(V)); } else - return true; + throw std::string("Cannot find initializer value."); } - if (!FunctionSignatureList.empty()) { // Expected more functions! - Error = "Function expected, but bytecode stream at end!"; - return true; - } + if (!FunctionSignatureList.empty()) + throw std::string("Function expected, but bytecode stream ended!"); BCR_TRACE(0, "} end block\n\n"); - return false; } -static inline Module *Error(std::string *ErrorStr, const char *Message) { - if (ErrorStr) *ErrorStr = Message; - return 0; -} - -Module *BytecodeParser::ParseBytecode(const unsigned char *Buf, - const unsigned char *EndBuf, - const std::string &ModuleID) { +void +BytecodeParser::ParseBytecode(const unsigned char *Buf, unsigned Length, + const std::string &ModuleID) { unsigned Sig; + unsigned char *EndBuf = (unsigned char*)(Buf + Length); // Read and check signature... if (read(Buf, EndBuf, Sig) || - Sig != ('l' | ('l' << 8) | ('v' << 16) | 'm' << 24)) - return ::Error(&Error, "Invalid bytecode signature!"); + Sig != ('l' | ('l' << 8) | ('v' << 16) | ('m' << 24))) + throw std::string("Invalid bytecode signature!"); TheModule = new Module(ModuleID); - if (ParseModule(Buf, EndBuf)) { + try { + ParseModule(Buf, EndBuf); + } catch (std::string &Error) { freeState(); // Must destroy handles before deleting module! delete TheModule; TheModule = 0; + throw Error; } - return TheModule; -} - - -Module *ParseBytecodeBuffer(const unsigned char *Buffer, unsigned Length, - const std::string &ModuleID, std::string *ErrorStr){ - BytecodeParser Parser; - unsigned char *PtrToDelete = 0; - if ((intptr_t)Buffer & 3) { // If the buffer is not 4 byte aligned... - // Allocate a new buffer to hold the bytecode... - PtrToDelete = new unsigned char[Length+4]; - unsigned Offset = 4-((intptr_t)PtrToDelete & 3); // Make sure it's aligned - memcpy(PtrToDelete+Offset, Buffer, Length); // Copy it over - Buffer = PtrToDelete+Offset; - } - - Module *R = Parser.ParseBytecode(Buffer, Buffer+Length, ModuleID); - if (ErrorStr) *ErrorStr = Parser.getError(); - - delete [] PtrToDelete; // Delete alignment buffer if necessary - return R; -} - - -/// FDHandle - Simple handle class to make sure a file descriptor gets closed -/// when the object is destroyed. -class FDHandle { - int FD; -public: - FDHandle(int fd) : FD(fd) {} - operator int() const { return FD; } - ~FDHandle() { - if (FD != -1) close(FD); - } -}; - -// Parse and return a class file... -// -Module *ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr) { - Module *Result = 0; - - if (Filename != std::string("-")) { // Read from a file... - FDHandle FD = open(Filename.c_str(), O_RDONLY); - if (FD == -1) - return Error(ErrorStr, "Error opening file!"); - - // Stat the file to get its length... - struct stat StatBuf; - if (fstat(FD, &StatBuf) == -1 || StatBuf.st_size == 0) - return Error(ErrorStr, "Error stat'ing file!"); - - // mmap in the file all at once... - int Length = StatBuf.st_size; - unsigned char *Buffer = (unsigned char*)mmap(0, Length, PROT_READ, - MAP_PRIVATE, FD, 0); - if (Buffer == (unsigned char*)MAP_FAILED) - return Error(ErrorStr, "Error mmapping file!"); - - // Parse the bytecode we mmapped in - Result = ParseBytecodeBuffer(Buffer, Length, Filename, ErrorStr); - - // Unmmap the bytecode... - munmap((char*)Buffer, Length); - } else { // Read from stdin - int BlockSize; - unsigned char Buffer[4096*4]; - std::vector FileData; - - // Read in all of the data from stdin, we cannot mmap stdin... - while ((BlockSize = read(0 /*stdin*/, Buffer, 4096*4))) { - if (BlockSize == -1) - return Error(ErrorStr, "Error reading from stdin!"); - - FileData.insert(FileData.end(), Buffer, Buffer+BlockSize); - } - - if (FileData.empty()) - return Error(ErrorStr, "Standard Input empty!"); - -#define ALIGN_PTRS 0 -#if ALIGN_PTRS - unsigned char *Buf = - (unsigned char*)mmap(0, FileData.size(), PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); - assert((Buf != (unsigned char*)-1) && "mmap returned error!"); - memcpy(Buf, &FileData[0], FileData.size()); -#else - unsigned char *Buf = &FileData[0]; -#endif - - Result = ParseBytecodeBuffer(Buf, FileData.size(), "", ErrorStr); - -#if ALIGN_PTRS - munmap((char*)Buf, FileData.size()); // Free mmap'd data area -#endif - } - - return Result; } Index: llvm/lib/Bytecode/Reader/ReaderInternals.h diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.41 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.42 --- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.41 Mon Sep 8 13:04:16 2003 +++ llvm/lib/Bytecode/Reader/ReaderInternals.h Mon Sep 22 18:38:23 2003 @@ -7,17 +7,20 @@ #ifndef READER_INTERNALS_H #define READER_INTERNALS_H -#include "llvm/Bytecode/Primitives.h" +#include "llvm/Constant.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" -#include "llvm/Constant.h" +#include "llvm/ModuleProvider.h" +#include "llvm/Bytecode/Primitives.h" #include #include +#include +class Module; // Enable to trace to figure out what the heck is going on when parsing fails //#define TRACE_LEVEL 10 -#if TRACE_LEVEL // ByteCodeReading_TRACEer +#if TRACE_LEVEL // ByteCodeReading_TRACEr #define BCR_TRACE(n, X) \ if (n < TRACE_LEVEL) std::cerr << std::string(n*2, ' ') << X #else @@ -35,15 +38,21 @@ }; }; -class BytecodeParser : public AbstractTypeUser { - std::string Error; // Error message string goes here... +struct LazyFunctionInfo { + const unsigned char *Buf, *EndBuf; + unsigned FunctionSlot; +}; + +class BytecodeParser : public AbstractTypeUser, public AbstractModuleProvider { + unsigned char *Buffer; BytecodeParser(const BytecodeParser &); // DO NOT IMPLEMENT void operator=(const BytecodeParser &); // DO NOT IMPLEMENT public: - BytecodeParser() { + BytecodeParser() : Buffer(0) { // Define this in case we don't see a ModuleGlobalInfo block. FirstDerivedTyID = Type::FirstDerivedTyID; } + ~BytecodeParser() { freeState(); } @@ -51,12 +60,21 @@ freeTable(Values); freeTable(LateResolveValues); freeTable(ModuleValues); + delete [] Buffer; + Buffer = 0; } - Module *ParseBytecode(const unsigned char *Buf, const unsigned char *EndBuf, - const std::string &ModuleID); + Module* releaseModule() { + // Since we're losing control of this Module, we must hand it back complete + materializeModule(); + freeState(); + Module *tempM = TheModule; + TheModule = 0; + return tempM; + } - std::string getError() const { return Error; } + void ParseBytecode(const unsigned char *Buf, unsigned Length, + const std::string &ModuleID); void dump() const { std::cerr << "BytecodeParser instance!\n"; @@ -80,8 +98,6 @@ } }; - Module *TheModule; // Current Module being read into... - // Information about the module, extracted from the bytecode revision number. unsigned char RevisionNum; // The rev # itself unsigned char FirstDerivedTyID; // First variable index to use for type @@ -120,6 +136,12 @@ // std::vector > GlobalInits; + // For lazy reading-in of functions, we need to save away several pieces of + // information about each function: its begin and end pointer in the buffer + // and its FunctionSlot. + // + std::map LazyFunctionLoadMap; + private: void freeTable(ValueTable &Tab) { while (!Tab.empty()) { @@ -128,27 +150,33 @@ } } - bool ParseModule (const unsigned char * Buf, const unsigned char *End); - bool ParseVersionInfo (const unsigned char *&Buf, const unsigned char *End); - bool ParseModuleGlobalInfo(const unsigned char *&Buf, const unsigned char *E); - bool ParseSymbolTable (const unsigned char *&Buf, const unsigned char *End, - SymbolTable *); - bool ParseFunction (const unsigned char *&Buf, const unsigned char *End); - bool ParseBasicBlock (const unsigned char *&Buf, const unsigned char *End, - BasicBlock *&); +public: + void ParseModule(const unsigned char * Buf, const unsigned char *End); + void materializeFunction(Function *F); + +private: + void ParseVersionInfo (const unsigned char *&Buf, const unsigned char *End); + void ParseModuleGlobalInfo(const unsigned char *&Buf, const unsigned char *E); + void ParseSymbolTable(const unsigned char *&Buf, const unsigned char *End, + SymbolTable *); + void ParseFunction(const unsigned char *&Buf, const unsigned char *End); + void ParseGlobalTypes(const unsigned char *&Buf, const unsigned char *EndBuf); + + std::auto_ptr + ParseBasicBlock(const unsigned char *&Buf, const unsigned char *End); + bool ParseInstruction (const unsigned char *&Buf, const unsigned char *End, Instruction *&); bool ParseRawInst (const unsigned char *&Buf, const unsigned char *End, RawInst &); - bool ParseGlobalTypes(const unsigned char *&Buf, const unsigned char *EndBuf); - bool ParseConstantPool(const unsigned char *&Buf, const unsigned char *EndBuf, - ValueTable &Tab, TypeValuesListTy &TypeTab); - bool parseConstantValue(const unsigned char *&Buf, const unsigned char *End, + void ParseConstantPool(const unsigned char *&Buf, const unsigned char *EndBuf, + ValueTable &Tab, TypeValuesListTy &TypeTab); + void parseConstantValue(const unsigned char *&Buf, const unsigned char *End, const Type *Ty, Constant *&V); - bool parseTypeConstants(const unsigned char *&Buf, + void parseTypeConstants(const unsigned char *&Buf, const unsigned char *EndBuf, - TypeValuesListTy &Tab, unsigned NumEntries); + TypeValuesListTy &Tab, unsigned NumEntries); const Type *parseTypeConstant(const unsigned char *&Buf, const unsigned char *EndBuf); @@ -158,9 +186,9 @@ int insertValue(Value *V, ValueTable &Table); // -1 = Failure void setValueTo(ValueTable &D, unsigned Slot, Value *V); - bool postResolveValues(ValueTable &ValTab); + void postResolveValues(ValueTable &ValTab); - bool getTypeSlot(const Type *Ty, unsigned &Slot); + void getTypeSlot(const Type *Ty, unsigned &Slot); // resolve all references to the placeholder (if any) for the given value void ResolveReferencesToValue(Value *Val, unsigned Slot); @@ -205,6 +233,11 @@ typedef PlaceholderDef BBPHolder; typedef PlaceholderDef ConstPHolder; +// Some common errors we find +static const std::string Error_readvbr = "read_vbr(): error reading."; +static const std::string Error_read = "read(): error reading."; +static const std::string Error_inputdata = "input_data(): error reading."; +static const std::string Error_DestSlot = "No destination slot found."; static inline unsigned getValueIDNumberFromPlaceHolder(Value *Val) { if (isa(Val)) @@ -217,16 +250,16 @@ } } -static inline bool readBlock(const unsigned char *&Buf, +static inline void readBlock(const unsigned char *&Buf, const unsigned char *EndBuf, - unsigned &Type, unsigned &Size) { + unsigned &Type, unsigned &Size) { #if DEBUG_OUTPUT bool Result = read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size); std::cerr << "StartLoc = " << ((unsigned)Buf & 4095) << " Type = " << Type << " Size = " << Size << endl; - return Result; + if (Result) throw Error_read; #else - return read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size); + if (read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size)) throw Error_read; #endif } From brukman at cs.uiuc.edu Mon Sep 22 18:41:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 18:41:02 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Reader.h Message-ID: <200309222340.SAA18684@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bytecode: Reader.h updated: 1.11 -> 1.12 --- Log message: Added doxygen comments for the streaming module provider. --- Diffs of the changes: Index: llvm/include/llvm/Bytecode/Reader.h diff -u llvm/include/llvm/Bytecode/Reader.h:1.11 llvm/include/llvm/Bytecode/Reader.h:1.12 --- llvm/include/llvm/Bytecode/Reader.h:1.11 Mon Sep 22 18:36:33 2003 +++ llvm/include/llvm/Bytecode/Reader.h Mon Sep 22 18:40:38 2003 @@ -16,28 +16,29 @@ #include #include -/// +/// getBytecodeModuleProvider - lazy function-at-a-time loading from a file /// AbstractModuleProvider* getBytecodeModuleProvider(const std::string &Filename); -/// +/// getBytecodeBufferModuleProvider - lazy function-at-a-time loading from a +/// buffer /// AbstractModuleProvider* getBytecodeBufferModuleProvider(const unsigned char *Buffer, unsigned BufferSize, - const std::string &ModuleID); + const std::string &ModuleID = ""); -/// Parse the given bytecode file +/// ParseBytecodeFile - Parse the given bytecode file /// Module* ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr = 0); -/// Parse a given bytecode buffer +/// ParseBytecodeBuffer - Parse a given bytecode buffer /// Module* ParseBytecodeBuffer(const unsigned char *Buffer, unsigned BufferSize, - const std::string &ModuleID, + const std::string &ModuleID = "", std::string *ErrorStr = 0); /// ReadArchiveFile - Read bytecode files from the specfied .a file, returning From lattner at cs.uiuc.edu Mon Sep 22 18:43:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Sep 22 18:43:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ArchiveReader.cpp Message-ID: <200309222342.SAA07359@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ArchiveReader.cpp updated: 1.5 -> 1.6 --- Log message: Update file header for renamed file --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ArchiveReader.cpp diff -u llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.5 llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.6 --- llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.5 Thu Sep 11 17:31:21 2003 +++ llvm/lib/Bytecode/Reader/ArchiveReader.cpp Mon Sep 22 18:42:00 2003 @@ -1,4 +1,4 @@ -//===- ReadArchive.cpp - Code to read LLVM bytecode from .a files ---------===// +//===- ArchiveReader.cpp - Code to read LLVM bytecode from .a files -------===// // // This file implements the ReadArchiveFile interface, which allows a linker to // read all of the LLVM bytecode files contained in a .a file. This file From brukman at cs.uiuc.edu Mon Sep 22 18:45:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 18:45:01 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/ModuleProvider.cpp Message-ID: <200309222344.SAA18763@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: ModuleProvider.cpp updated: 1.1 -> 1.2 --- Log message: * No longer initialize the module, a subclass is more suitable to do this because it can add a module ID which we do not have at this time. * Check to see if the module has been initialized when materializing it. --- Diffs of the changes: Index: llvm/lib/VMCore/ModuleProvider.cpp diff -u llvm/lib/VMCore/ModuleProvider.cpp:1.1 llvm/lib/VMCore/ModuleProvider.cpp:1.2 --- llvm/lib/VMCore/ModuleProvider.cpp:1.1 Thu Sep 18 11:17:06 2003 +++ llvm/lib/VMCore/ModuleProvider.cpp Mon Sep 22 18:44:13 2003 @@ -9,20 +9,20 @@ /// ctor - always have a valid Module /// -AbstractModuleProvider::AbstractModuleProvider() { - M = new Module(""); -} +AbstractModuleProvider::AbstractModuleProvider() : TheModule(0) { } /// dtor - when we leave, we take our Module with us /// AbstractModuleProvider::~AbstractModuleProvider() { - delete M; + delete TheModule; } /// materializeFunction - make sure the given function is fully read. /// void AbstractModuleProvider::materializeModule() { - for (Module::iterator i = M->begin(), e = M->end(); i != e; ++i) { + if (!TheModule) return; + + for (Module::iterator i = TheModule->begin(), e = TheModule->end(); + i != e; ++i) materializeFunction(i); - } } From brukman at cs.uiuc.edu Mon Sep 22 18:45:03 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 18:45:03 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Message-ID: <200309222344.SAA18782@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderWrappers.cpp updated: 1.1 -> 1.2 --- Log message: Added file header comment. --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.1 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.2 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.1 Mon Sep 22 18:38:23 2003 +++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Mon Sep 22 18:44:46 2003 @@ -1,3 +1,10 @@ +//===- ReaderWrappers.cpp - Parse bytecode from file or buffer -----------===// +// +// This file implements loading and parsing a bytecode file and parsing a +// bytecode module from a given buffer. +// +//===----------------------------------------------------------------------===// + #include "ReaderInternals.h" #include "Support/StringExtras.h" #include "Config/fcntl.h" From brukman at cs.uiuc.edu Mon Sep 22 18:51:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 18:51:00 2003 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Parser.cpp Message-ID: <200309222350.SAA18818@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Parser.cpp updated: 1.9 -> 1.10 --- Log message: Uppercase the acronym ASCII. --- Diffs of the changes: Index: llvm/lib/AsmParser/Parser.cpp diff -u llvm/lib/AsmParser/Parser.cpp:1.9 llvm/lib/AsmParser/Parser.cpp:1.10 --- llvm/lib/AsmParser/Parser.cpp:1.9 Fri Aug 30 17:52:23 2002 +++ llvm/lib/AsmParser/Parser.cpp Mon Sep 22 18:50:25 2003 @@ -9,7 +9,7 @@ #include "ParserInternals.h" using std::string; -// The useful interface defined by this file... Parse an ascii file, and return +// The useful interface defined by this file... Parse an ASCII file, and return // the internal representation in a nice slice'n'dice'able representation. // Module *ParseAssemblyFile(const string &Filename) { // throw (ParseException) From brukman at cs.uiuc.edu Mon Sep 22 18:59:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Sep 22 18:59:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderInternals.h Message-ID: <200309222358.SAA19337@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderInternals.h updated: 1.42 -> 1.43 --- Log message: Removed no longer used member variable. --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderInternals.h diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.42 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.43 --- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.42 Mon Sep 22 18:38:23 2003 +++ llvm/lib/Bytecode/Reader/ReaderInternals.h Mon Sep 22 18:58:08 2003 @@ -44,11 +44,10 @@ }; class BytecodeParser : public AbstractTypeUser, public AbstractModuleProvider { - unsigned char *Buffer; BytecodeParser(const BytecodeParser &); // DO NOT IMPLEMENT void operator=(const BytecodeParser &); // DO NOT IMPLEMENT public: - BytecodeParser() : Buffer(0) { + BytecodeParser() { // Define this in case we don't see a ModuleGlobalInfo block. FirstDerivedTyID = Type::FirstDerivedTyID; } @@ -60,8 +59,6 @@ freeTable(Values); freeTable(LateResolveValues); freeTable(ModuleValues); - delete [] Buffer; - Buffer = 0; } Module* releaseModule() { From brukman at cs.uiuc.edu Tue Sep 23 10:10:08 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 23 10:10:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Message-ID: <200309231509.KAA13998@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderWrappers.cpp updated: 1.2 -> 1.3 --- Log message: * Constantify arguments to copy function * Stop using a #define, make it an inline if statement --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.2 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.3 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.2 Mon Sep 22 18:44:46 2003 +++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Tue Sep 23 10:09:26 2003 @@ -11,11 +11,6 @@ #include "Config/unistd.h" #include "Config/sys/mman.h" -#define CHECK_ALIGN32(begin,end) \ - if (align32(begin,end)) \ - throw std::string("Alignment error: ReaderWrappers.cpp:" + \ - utostr((unsigned)__LINE__)); - namespace { /// BytecodeFileReader - parses a bytecode file from a file @@ -26,7 +21,7 @@ int Length; BytecodeFileReader(const BytecodeFileReader&); // Do not implement - void operator=(BytecodeFileReader &BFR); // Do not implement + void operator=(const BytecodeFileReader &BFR); // Do not implement public: BytecodeFileReader(const std::string &Filename); @@ -42,7 +37,7 @@ unsigned char *FileBuf; BytecodeStdinReader(const BytecodeStdinReader&); // Do not implement - void operator=(BytecodeStdinReader &BFR); // Do not implement + void operator=(const BytecodeStdinReader &BFR); // Do not implement public: BytecodeStdinReader(); @@ -143,7 +138,8 @@ AbstractModuleProvider* getBytecodeBufferModuleProvider(const unsigned char *Buffer, unsigned Length, const std::string &ModuleID) { - CHECK_ALIGN32(Buffer, Buffer+Length); + if (align32(Buffer, Buffer+Length) + throw std::string("Unaligned bytecode buffer."); BytecodeParser *Parser = new BytecodeParser(); Parser->ParseBytecode(Buffer, Length, ModuleID); return Parser; From lattner at cs.uiuc.edu Tue Sep 23 10:14:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Sep 23 10:14:02 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp PhyRegAlloc.h Message-ID: <200309231513.KAA17866@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.113 -> 1.114 PhyRegAlloc.h updated: 1.52 -> 1.53 --- Log message: Move getAnalysisUsage method from header to .cpp file. Add a normal file header comment --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.113 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.114 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.113 Sat Sep 20 22:57:37 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Tue Sep 23 10:13:04 2003 @@ -43,6 +43,12 @@ return new PhyRegAlloc (T); } +void PhyRegAlloc::getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired (); + AU.addRequired (); +} + + //---------------------------------------------------------------------------- // This method initially creates interference graphs (one in each reg class) Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.52 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.53 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.52 Sat Sep 20 21:51:00 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h Tue Sep 23 10:13:04 2003 @@ -1,20 +1,18 @@ -/* Title: PhyRegAlloc.h -*- C++ -*- - Author: Ruchira Sasanka - Date: Aug 20, 01 - Purpose: This is the main entry point for register allocation. - - Notes: - ===== - - * RegisterClasses: Each RegClass accepts a - TargetRegClass which contains machine specific info about that register - class. The code in the RegClass is machine independent and they use - access functions in the TargetRegClass object passed into it to get - machine specific info. - - * Machine dependent work: All parts of the register coloring algorithm - except coloring of an individual node are machine independent. -*/ +//===-- PhyRegAlloc.h - Graph Coloring Register Allocator -------*- c++ -*-===// +// +// This is the main entry point for register allocation. +// +// Notes: +// * RegisterClasses: Each RegClass accepts a +// TargetRegClass which contains machine specific info about that register +// class. The code in the RegClass is machine independent and they use +// access functions in the TargetRegClass object passed into it to get +// machine specific info. +// +// * Machine dependent work: All parts of the register coloring algorithm +// except coloring of an individual node are machine independent. +// +//===----------------------------------------------------------------------===// #ifndef PHYREGALLOC_H #define PHYREGALLOC_H @@ -91,10 +89,7 @@ /// virtual bool runOnFunction (Function &F); - virtual void getAnalysisUsage (AnalysisUsage &AU) const { - AU.addRequired (); - AU.addRequired (); - } + virtual void getAnalysisUsage (AnalysisUsage &AU) const; const char *getPassName () const { return "Traditional graph-coloring reg. allocator"; From criswell at cs.uiuc.edu Tue Sep 23 10:30:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Sep 23 10:30:01 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200309231529.KAA14323@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.28 -> 1.29 --- Log message: Added code that stops the configure script if a needed program is not found. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.28 llvm/configure:1.29 --- llvm/configure:1.28 Tue Sep 16 10:54:19 2003 +++ llvm/configure Tue Sep 23 10:28:49 2003 @@ -18468,6 +18468,7 @@ done done + test -z "$ac_cv_path_RPWD" && ac_cv_path_RPWD="false" ;; esac fi @@ -18481,6 +18482,13 @@ echo "${ECHO_T}no" >&6 fi +if test ${RPWD} = "false" +then + { { echo "$as_me:$LINENO: error: pwd required but not found" >&5 +echo "$as_me: error: pwd required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18507,6 +18515,7 @@ done done + test -z "$ac_cv_path_AR" && ac_cv_path_AR="false" ;; esac fi @@ -18520,6 +18529,13 @@ echo "${ECHO_T}no" >&6 fi +if test ${AR} = "false" +then + { { echo "$as_me:$LINENO: error: ar required but not found" >&5 +echo "$as_me: error: ar required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18546,6 +18562,7 @@ done done + test -z "$ac_cv_path_SED" && ac_cv_path_SED="false" ;; esac fi @@ -18559,6 +18576,13 @@ echo "${ECHO_T}no" >&6 fi +if test ${SED} = "false" +then + { { echo "$as_me:$LINENO: error: sed required but not found" >&5 +echo "$as_me: error: sed required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18585,6 +18609,7 @@ done done + test -z "$ac_cv_path_RM" && ac_cv_path_RM="false" ;; esac fi @@ -18598,6 +18623,13 @@ echo "${ECHO_T}no" >&6 fi +if test ${RM} = "false" +then + { { echo "$as_me:$LINENO: error: rm required but not found" >&5 +echo "$as_me: error: rm required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Extract the first word of "echo", so it can be a program name with args. set dummy echo; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18624,6 +18656,7 @@ done done + test -z "$ac_cv_path_ECHO" && ac_cv_path_ECHO="false" ;; esac fi @@ -18637,6 +18670,13 @@ echo "${ECHO_T}no" >&6 fi +if test ${ECHO} = "false" +then + { { echo "$as_me:$LINENO: error: echo required but not found" >&5 +echo "$as_me: error: echo required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18663,6 +18703,7 @@ done done + test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="false" ;; esac fi @@ -18676,6 +18717,13 @@ echo "${ECHO_T}no" >&6 fi +if test ${MKDIR} = "false" +then + { { echo "$as_me:$LINENO: error: mkdir required but not found" >&5 +echo "$as_me: error: mkdir required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Extract the first word of "date", so it can be a program name with args. set dummy date; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18702,6 +18750,7 @@ done done + test -z "$ac_cv_path_DATE" && ac_cv_path_DATE="false" ;; esac fi @@ -18715,6 +18764,13 @@ echo "${ECHO_T}no" >&6 fi +if test ${DATE} = "false" +then + { { echo "$as_me:$LINENO: error: date required but not found" >&5 +echo "$as_me: error: date required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18741,6 +18797,7 @@ done done + test -z "$ac_cv_path_MV" && ac_cv_path_MV="false" ;; esac fi @@ -18754,6 +18811,13 @@ echo "${ECHO_T}no" >&6 fi +if test ${MV} = "false" +then + { { echo "$as_me:$LINENO: error: mv required but not found" >&5 +echo "$as_me: error: mv required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18780,6 +18844,7 @@ done done + test -z "$ac_cv_path_DOT" && ac_cv_path_DOT="false" ;; esac fi @@ -18793,6 +18858,7 @@ echo "${ECHO_T}no" >&6 fi + # Extract the first word of "etags", so it can be a program name with args. set dummy etags; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18819,6 +18885,7 @@ done done + test -z "$ac_cv_path_ETAGS" && ac_cv_path_ETAGS="false" ;; esac fi @@ -18832,6 +18899,7 @@ echo "${ECHO_T}no" >&6 fi + # Extract the first word of "purify", so it can be a program name with args. set dummy purify; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18858,6 +18926,7 @@ done done + test -z "$ac_cv_path_PURIFY" && ac_cv_path_PURIFY="false" ;; esac fi @@ -18871,6 +18940,7 @@ echo "${ECHO_T}no" >&6 fi + # Extract the first word of "python", so it can be a program name with args. set dummy python; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18897,6 +18967,7 @@ done done + test -z "$ac_cv_path_PYTHON" && ac_cv_path_PYTHON="false" ;; esac fi @@ -18910,6 +18981,13 @@ echo "${ECHO_T}no" >&6 fi +if test ${PYTHON} = "false" +then + { { echo "$as_me:$LINENO: error: python required but not found" >&5 +echo "$as_me: error: python required but not found" >&2;} + { (exit 1); exit 1; }; } +fi + # Extract the first word of "qmtest", so it can be a program name with args. set dummy qmtest; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 @@ -18936,6 +19014,7 @@ done done + test -z "$ac_cv_path_QMTEST" && ac_cv_path_QMTEST="false" ;; esac fi @@ -18949,6 +19028,12 @@ echo "${ECHO_T}no" >&6 fi +if test ${QMTEST} = "false" +then + { { echo "$as_me:$LINENO: error: qmtest required but not found" >&5 +echo "$as_me: error: qmtest required but not found" >&2;} + { (exit 1); exit 1; }; } +fi pyversion=`$PYTHON -V 2>&1 | cut -d\ -f2` pymajor=`echo $pyversion | cut -d. -f1` From criswell at cs.uiuc.edu Tue Sep 23 10:30:05 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Sep 23 10:30:05 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200309231529.KAA14330@choi.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.20 -> 1.21 --- Log message: Added code that stops the configure script if a needed program is not found. --- Diffs of the changes: Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.20 llvm/autoconf/configure.ac:1.21 --- llvm/autoconf/configure.ac:1.20 Tue Sep 16 10:22:55 2003 +++ llvm/autoconf/configure.ac Tue Sep 23 10:28:52 2003 @@ -299,19 +299,71 @@ AC_PROG_LIBTOOL dnl Check for our special programs -AC_PATH_PROG(RPWD,[pwd]) -AC_PATH_PROG(AR,[ar]) -AC_PATH_PROG(SED,[sed]) -AC_PATH_PROG(RM,[rm]) -AC_PATH_PROG(ECHO,[echo]) -AC_PATH_PROG(MKDIR,[mkdir]) -AC_PATH_PROG(DATE,[date]) -AC_PATH_PROG(MV,[mv]) -AC_PATH_PROG(DOT,[dot]) -AC_PATH_PROG(ETAGS,[etags]) -AC_PATH_PROG(PURIFY,[purify]) -AC_PATH_PROG(PYTHON,[python]) -AC_PATH_PROG(QMTEST,[qmtest]) +AC_PATH_PROG(RPWD,[pwd],[false]) +if test ${RPWD} = "false" +then + AC_MSG_ERROR([pwd required but not found]) +fi + +AC_PATH_PROG(AR,[ar],[false]) +if test ${AR} = "false" +then + AC_MSG_ERROR([ar required but not found]) +fi + +AC_PATH_PROG(SED,[sed],[false]) +if test ${SED} = "false" +then + AC_MSG_ERROR([sed required but not found]) +fi + +AC_PATH_PROG(RM,[rm],[false]) +if test ${RM} = "false" +then + AC_MSG_ERROR([rm required but not found]) +fi + +AC_PATH_PROG(ECHO,[echo],[false]) +if test ${ECHO} = "false" +then + AC_MSG_ERROR([echo required but not found]) +fi + +AC_PATH_PROG(MKDIR,[mkdir],[false]) +if test ${MKDIR} = "false" +then + AC_MSG_ERROR([mkdir required but not found]) +fi + +AC_PATH_PROG(DATE,[date],[false]) +if test ${DATE} = "false" +then + AC_MSG_ERROR([date required but not found]) +fi + +AC_PATH_PROG(MV,[mv],[false]) +if test ${MV} = "false" +then + AC_MSG_ERROR([mv required but not found]) +fi + +AC_PATH_PROG(DOT,[dot],[false]) + +AC_PATH_PROG(ETAGS,[etags],[false]) + +AC_PATH_PROG(PURIFY,[purify],[false]) + +AC_PATH_PROG(PYTHON,[python],[false]) +if test ${PYTHON} = "false" +then + AC_MSG_ERROR([python required but not found]) +fi + +AC_PATH_PROG(QMTEST,[qmtest],[false]) +if test ${QMTEST} = "false" +then + AC_MSG_ERROR([qmtest required but not found]) +fi dnl Verify that the version of python available is high enough for qmtest pyversion=`$PYTHON -V 2>&1 | cut -d\ -f2` From lattner at cs.uiuc.edu Tue Sep 23 11:07:08 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Sep 23 11:07:08 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/C++Catch.cpp Message-ID: <200309231606.LAA19793@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp: C++Catch.cpp added (r1.1) --- Log message: New sjlj testcase --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/C++Catch.cpp diff -c /dev/null llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/C++Catch.cpp:1.1 *** /dev/null Tue Sep 23 11:06:12 2003 --- llvm/test/Programs/SingleSource/UnitTests/SetjmpLongjmp/C++Catch.cpp Tue Sep 23 11:06:02 2003 *************** *** 0 **** --- 1,30 ---- + #include + #include + + class C { + const char *name; + public: + C(const char *n) : name(n) {} + ~C() { printf("Destroying C in function %s\n", name); } + }; + + jmp_buf buf; + + void foo() + { + C Obj("foo"); + printf("Longjmping from foo() function\n"); + longjmp(buf, 37); + } + + int main() + { + try { + C Obj("main"); + if (!setjmp(buf)) foo(); + printf("longjmp throw NOT caught in catch(...) block\n"); + } catch(...) { + printf("Caught longjmp throw in catch(...) block\n"); + } + } + From brukman at cs.uiuc.edu Tue Sep 23 11:14:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 23 11:14:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Message-ID: <200309231613.LAA24833@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderWrappers.cpp updated: 1.3 -> 1.4 --- Log message: * Group class definitions & implementations together * Make sure we align the buffer we're given * Do not let exceptions propagate when the caller asks for a Module* * Add doxygenified comments to wrapper functions --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.3 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.4 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.3 Tue Sep 23 10:09:26 2003 +++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Tue Sep 23 11:13:28 2003 @@ -12,6 +12,18 @@ #include "Config/sys/mman.h" namespace { + /// FDHandle - Simple handle class to make sure a file descriptor gets closed + /// when the object is destroyed. + /// + class FDHandle { + int FD; + public: + FDHandle(int fd) : FD(fd) {} + operator int() const { return FD; } + ~FDHandle() { + if (FD != -1) close(FD); + } + }; /// BytecodeFileReader - parses a bytecode file from a file /// @@ -28,34 +40,6 @@ ~BytecodeFileReader(); }; - - /// BytecodeStdinReader - parses a bytecode file from stdin - /// - class BytecodeStdinReader : public BytecodeParser { - private: - std::vector FileData; - unsigned char *FileBuf; - - BytecodeStdinReader(const BytecodeStdinReader&); // Do not implement - void operator=(const BytecodeStdinReader &BFR); // Do not implement - - public: - BytecodeStdinReader(); - ~BytecodeStdinReader(); - }; - - /// FDHandle - Simple handle class to make sure a file descriptor gets closed - /// when the object is destroyed. - /// - class FDHandle { - int FD; - public: - FDHandle(int fd) : FD(fd) {} - operator int() const { return FD; } - ~FDHandle() { - if (FD != -1) close(FD); - } - }; } BytecodeFileReader::BytecodeFileReader(const std::string &Filename) { @@ -84,6 +68,72 @@ munmap((char*)Buffer, Length); } +//////////////////////////////////////////////////////////////////////////// + +namespace { + /// BytecodeBufferReader - parses a bytecode file from a buffer + /// + class BytecodeBufferReader : public BytecodeParser { + private: + const unsigned char *Buffer; + int Length; + bool MustDelete; + + BytecodeBufferReader(const BytecodeBufferReader&); // Do not implement + void operator=(const BytecodeBufferReader &BFR); // Do not implement + + public: + BytecodeBufferReader(const unsigned char *Buf, unsigned Length, + const std::string &ModuleID); + ~BytecodeBufferReader(); + + }; +} + +BytecodeBufferReader::BytecodeBufferReader(const unsigned char *Buf, + unsigned Len, + const std::string &ModuleID) +{ + // If not aligned, allocate a new buffer to hold the bytecode... + const unsigned char *ParseBegin = 0; + unsigned Offset = 0; + if ((intptr_t)Buf & 3) { + Length = Len+4; + Buffer = new unsigned char[Length]; + Offset = 4 - ((intptr_t)Buf & 3); // Make sure it's aligned + ParseBegin = Buffer + Offset; + memcpy((unsigned char*)ParseBegin, Buf, Len); // Copy it over + MustDelete = true; + } else { + // If we don't need to copy it over, just use the caller's copy + Buffer = Buf; + Length = Len; + MustDelete = false; + } + ParseBytecode(ParseBegin, Len, ModuleID); +} + +BytecodeBufferReader::~BytecodeBufferReader() { + if (MustDelete) delete [] Buffer; +} + + +namespace { + /// BytecodeStdinReader - parses a bytecode file from stdin + /// + class BytecodeStdinReader : public BytecodeParser { + private: + std::vector FileData; + unsigned char *FileBuf; + + BytecodeStdinReader(const BytecodeStdinReader&); // Do not implement + void operator=(const BytecodeStdinReader &BFR); // Do not implement + + public: + BytecodeStdinReader(); + ~BytecodeStdinReader(); + }; +} #define ALIGN_PTRS 0 @@ -95,7 +145,7 @@ while ((BlockSize = read(0 /*stdin*/, Buffer, 4096*4))) { if (BlockSize == -1) throw std::string("Error reading from stdin!"); - + FileData.insert(FileData.end(), Buffer, Buffer+BlockSize); } @@ -111,19 +161,6 @@ FileBuf = &FileData[0]; #endif -#if 0 - // Allocate a new buffer to hold the bytecode... - unsigned char *ParseBegin=0; - unsigned Offset=0; - if ((intptr_t)Buffer & 3) { - delete [] Buffer; - Buffer = new unsigned char[Length+4]; - Offset = 4-((intptr_t)Buffer & 3); // Make sure it's aligned - } - memcpy(Buffer+Offset, Buf, Length); // Copy it over - ParseBegin = Buffer+Offset; -#endif - ParseBytecode(FileBuf, FileData.size(), ""); } @@ -133,29 +170,37 @@ #endif } -/// -/// +///////////////////////////////////////////////////////////////////////////// +// +// Wrapper functions +// +///////////////////////////////////////////////////////////////////////////// + +/// getBytecodeBufferModuleProvider - lazy function-at-a-time loading from a +/// buffer AbstractModuleProvider* getBytecodeBufferModuleProvider(const unsigned char *Buffer, unsigned Length, const std::string &ModuleID) { - if (align32(Buffer, Buffer+Length) - throw std::string("Unaligned bytecode buffer."); - BytecodeParser *Parser = new BytecodeParser(); - Parser->ParseBytecode(Buffer, Length, ModuleID); - return Parser; + return new BytecodeBufferReader(Buffer, Length, ModuleID); } +/// ParseBytecodeBuffer - Parse a given bytecode buffer +/// Module *ParseBytecodeBuffer(const unsigned char *Buffer, unsigned Length, const std::string &ModuleID, std::string *ErrorStr){ - AbstractModuleProvider *AMP = - getBytecodeBufferModuleProvider(Buffer, Length, ModuleID); - Module *M = AMP->releaseModule(); - delete AMP; + Module *M = 0; + try { + AbstractModuleProvider *AMP = + getBytecodeBufferModuleProvider(Buffer, Length, ModuleID); + M = AMP->releaseModule(); + delete AMP; + } catch (std::string &err) { + return 0; + } return M; } - -/// Parse and return a class file... +/// getBytecodeModuleProvider - lazy function-at-a-time loading from a file /// AbstractModuleProvider* getBytecodeModuleProvider(const std::string &Filename) { @@ -165,9 +210,16 @@ return new BytecodeStdinReader(); } +/// ParseBytecodeFile - Parse the given bytecode file +/// Module *ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr) { - AbstractModuleProvider *AMP = getBytecodeModuleProvider(Filename); - Module *M = AMP->releaseModule(); - delete AMP; + Module *M = 0; + try { + AbstractModuleProvider *AMP = getBytecodeModuleProvider(Filename); + M = AMP->releaseModule(); + delete AMP; + } catch (std::string &err) { + return 0; + } return M; } From brukman at cs.uiuc.edu Tue Sep 23 11:16:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 23 11:16:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200309231615.LAA24865@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.62 -> 1.63 --- Log message: Suggestions made by Chris: * Instead of a #define, use inline function * Fix the name on the #define, errr... now inline function to be more logical: it doesn't CHECK the alignment, it PERFORMS the alignment * To get string name of a Type*, use getDescription(), not getName() --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.62 llvm/lib/Bytecode/Reader/Reader.cpp:1.63 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.62 Mon Sep 22 18:38:23 2003 +++ llvm/lib/Bytecode/Reader/Reader.cpp Tue Sep 23 11:15:29 2003 @@ -25,10 +25,11 @@ #include #include -#define CHECK_ALIGN32(begin,end) \ - if (align32(begin,end)) \ - throw std::string("Alignment error: Reader.cpp:" + \ - utostr((unsigned)__LINE__)); +static inline void ALIGN32(const unsigned char *&begin, + const unsigned char *end) { + if (align32(begin, end)) + throw std::string("Alignment error in buffer: read past end of block."); +} void BytecodeParser::getTypeSlot(const Type *Ty, unsigned &Slot) { @@ -202,7 +203,8 @@ Value *NewDef = getValue(D->getType(), IDNumber, false); if (NewDef == 0) { throw std::string("Unresolvable reference found: <" + - D->getType()->getName() + ">:" +utostr(IDNumber)+"."); + D->getType()->getDescription() + ">:" + + utostr(IDNumber) + "."); } else { // Fixup all of the uses of this placeholder def... D->replaceAllUsesWith(NewDef); @@ -389,7 +391,7 @@ BCR_TRACE(2, "} end block\n"); // Malformed bc file if read past end of block. - CHECK_ALIGN32(Buf, EndBuf); + ALIGN32(Buf, EndBuf); } // Check for unresolvable references @@ -486,7 +488,7 @@ BCR_TRACE(2, "Function of type: " << Ty << "\n"); } - CHECK_ALIGN32(Buf, End); + ALIGN32(Buf, End); // Now that the function signature list is set up, reverse it so that we can // remove elements efficiently from the back of the vector. @@ -570,7 +572,7 @@ // Read into instance variables... ParseVersionInfo(Buf, EndBuf); - CHECK_ALIGN32(Buf, EndBuf); + ALIGN32(Buf, EndBuf); while (Buf < EndBuf) { const unsigned char *OldBuf = Buf; @@ -608,7 +610,7 @@ break; } BCR_TRACE(1, "} end block\n"); - CHECK_ALIGN32(Buf, EndBuf); + ALIGN32(Buf, EndBuf); } // After the module constant pool has been read, we can safely initialize @@ -636,9 +638,11 @@ void BytecodeParser::ParseBytecode(const unsigned char *Buf, unsigned Length, const std::string &ModuleID) { - unsigned Sig; + unsigned char *EndBuf = (unsigned char*)(Buf + Length); + // Read and check signature... + unsigned Sig; if (read(Buf, EndBuf, Sig) || Sig != ('l' | ('l' << 8) | ('v' << 16) | ('m' << 24))) throw std::string("Invalid bytecode signature!"); From brukman at cs.uiuc.edu Tue Sep 23 11:18:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 23 11:18:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReadInst.cpp ReaderInternals.h Message-ID: <200309231618.LAA24897@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReadInst.cpp updated: 1.51 -> 1.52 ReaderInternals.h updated: 1.43 -> 1.44 --- Log message: Stop returning bool and pass Instruction by reference; return std::auto_ptr and use exceptions --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReadInst.cpp diff -u llvm/lib/Bytecode/Reader/ReadInst.cpp:1.51 llvm/lib/Bytecode/Reader/ReadInst.cpp:1.52 --- llvm/lib/Bytecode/Reader/ReadInst.cpp:1.51 Thu Sep 11 17:31:21 2003 +++ llvm/lib/Bytecode/Reader/ReadInst.cpp Tue Sep 23 11:17:50 2003 @@ -17,30 +17,32 @@ #include "llvm/iPHINode.h" #include "llvm/iOther.h" -bool BytecodeParser::ParseRawInst(const unsigned char *&Buf, - const unsigned char *EndBuf, - RawInst &Result) { +std::auto_ptr +BytecodeParser::ParseRawInst(const unsigned char *&Buf, + const unsigned char *EndBuf) { unsigned Op, Typ; - if (read(Buf, EndBuf, Op)) return true; + std::auto_ptr Result = std::auto_ptr(new RawInst()); + if (read(Buf, EndBuf, Op)) + throw std::string("Error reading from buffer."); // bits Instruction format: Common to all formats // -------------------------- // 01-00: Opcode type, fixed to 1. // 07-02: Opcode - Result.NumOperands = (Op >> 0) & 03; - Result.Opcode = (Op >> 2) & 63; + Result->NumOperands = (Op >> 0) & 03; + Result->Opcode = (Op >> 2) & 63; - switch (Result.NumOperands) { + switch (Result->NumOperands) { case 1: // bits Instruction format: // -------------------------- // 19-08: Resulting type plane // 31-20: Operand #1 (if set to (2^12-1), then zero operands) // - Result.Ty = getType((Op >> 8) & 4095); - Result.Arg1 = (Op >> 20) & 4095; - if (Result.Arg1 == 4095) // Handle special encoding for 0 operands... - Result.NumOperands = 0; + Result->Ty = getType((Op >> 8) & 4095); + Result->Arg1 = (Op >> 20) & 4095; + if (Result->Arg1 == 4095) // Handle special encoding for 0 operands... + Result->NumOperands = 0; break; case 2: // bits Instruction format: @@ -49,9 +51,9 @@ // 23-16: Operand #1 // 31-24: Operand #2 // - Result.Ty = getType((Op >> 8) & 255); - Result.Arg1 = (Op >> 16) & 255; - Result.Arg2 = (Op >> 24) & 255; + Result->Ty = getType((Op >> 8) & 255); + Result->Arg1 = (Op >> 16) & 255; + Result->Arg2 = (Op >> 24) & 255; break; case 3: // bits Instruction format: @@ -61,112 +63,121 @@ // 25-20: Operand #2 // 31-26: Operand #3 // - Result.Ty = getType((Op >> 8) & 63); - Result.Arg1 = (Op >> 14) & 63; - Result.Arg2 = (Op >> 20) & 63; - Result.Arg3 = (Op >> 26) & 63; + Result->Ty = getType((Op >> 8) & 63); + Result->Arg1 = (Op >> 14) & 63; + Result->Arg2 = (Op >> 20) & 63; + Result->Arg3 = (Op >> 26) & 63; break; case 0: Buf -= 4; // Hrm, try this again... - if (read_vbr(Buf, EndBuf, Result.Opcode)) return true; - Result.Opcode >>= 2; - if (read_vbr(Buf, EndBuf, Typ)) return true; - Result.Ty = getType(Typ); - if (Result.Ty == 0) return true; - if (read_vbr(Buf, EndBuf, Result.NumOperands)) return true; + if (read_vbr(Buf, EndBuf, Result->Opcode)) + throw std::string("Error reading from buffer."); + Result->Opcode >>= 2; + if (read_vbr(Buf, EndBuf, Typ)) + throw std::string("Error reading from buffer."); + Result->Ty = getType(Typ); + if (Result->Ty == 0) + throw std::string("Invalid type read in instruction."); + if (read_vbr(Buf, EndBuf, Result->NumOperands)) + throw std::string("Error reading from buffer."); - switch (Result.NumOperands) { + switch (Result->NumOperands) { case 0: - std::cerr << "Zero Arg instr found!\n"; - return true; // This encoding is invalid! + throw std::string("Zero-argument instruction found; this is invalid."); case 1: - if (read_vbr(Buf, EndBuf, Result.Arg1)) return true; + if (read_vbr(Buf, EndBuf, Result->Arg1)) + throw std::string("Error reading from buffer"); break; case 2: - if (read_vbr(Buf, EndBuf, Result.Arg1) || - read_vbr(Buf, EndBuf, Result.Arg2)) return true; + if (read_vbr(Buf, EndBuf, Result->Arg1) || + read_vbr(Buf, EndBuf, Result->Arg2)) + throw std::string("Error reading from buffer"); break; case 3: - if (read_vbr(Buf, EndBuf, Result.Arg1) || - read_vbr(Buf, EndBuf, Result.Arg2) || - read_vbr(Buf, EndBuf, Result.Arg3)) return true; + if (read_vbr(Buf, EndBuf, Result->Arg1) || + read_vbr(Buf, EndBuf, Result->Arg2) || + read_vbr(Buf, EndBuf, Result->Arg3)) + throw std::string("Error reading from buffer"); break; default: - if (read_vbr(Buf, EndBuf, Result.Arg1) || - read_vbr(Buf, EndBuf, Result.Arg2)) return true; + if (read_vbr(Buf, EndBuf, Result->Arg1) || + read_vbr(Buf, EndBuf, Result->Arg2)) + throw std::string("Error reading from buffer"); // Allocate a vector to hold arguments 3, 4, 5, 6 ... - Result.VarArgs = new std::vector(Result.NumOperands-2); - for (unsigned a = 0; a < Result.NumOperands-2; a++) - if (read_vbr(Buf, EndBuf, (*Result.VarArgs)[a])) return true; + Result->VarArgs = new std::vector(Result->NumOperands-2); + for (unsigned a = 0; a < Result->NumOperands-2; a++) + if (read_vbr(Buf, EndBuf, (*Result->VarArgs)[a])) + throw std::string("Error reading from buffer"); + break; } - if (align32(Buf, EndBuf)) return true; + if (align32(Buf, EndBuf)) + throw std::string("Unaligned bytecode buffer."); break; } #if 0 - std::cerr << "NO: " << Result.NumOperands << " opcode: " << Result.Opcode - << " Ty: " << Result.Ty->getDescription() << " arg1: "<< Result.Arg1 - << " arg2: " << Result.Arg2 << " arg3: " << Result.Arg3 << "\n"; + std::cerr << "NO: " << Result->NumOperands << " opcode: " << Result->Opcode + << " Ty: "<< Result->Ty->getDescription()<< " arg1: "<< Result->Arg1 + << " arg2: " << Result->Arg2 << " arg3: " << Result->Arg3 << "\n"; #endif - return false; + return Result; } bool BytecodeParser::ParseInstruction(const unsigned char *&Buf, const unsigned char *EndBuf, Instruction *&Res) { - RawInst Raw; - if (ParseRawInst(Buf, EndBuf, Raw)) - return true; - - if (Raw.Opcode >= Instruction::BinaryOpsBegin && - Raw.Opcode < Instruction::BinaryOpsEnd && Raw.NumOperands == 2) { - Res = BinaryOperator::create((Instruction::BinaryOps)Raw.Opcode, - getValue(Raw.Ty, Raw.Arg1), - getValue(Raw.Ty, Raw.Arg2)); + std::auto_ptr Raw = ParseRawInst(Buf, EndBuf); + + if (Raw->Opcode >= Instruction::BinaryOpsBegin && + Raw->Opcode < Instruction::BinaryOpsEnd && Raw->NumOperands == 2) { + Res = BinaryOperator::create((Instruction::BinaryOps)Raw->Opcode, + getValue(Raw->Ty, Raw->Arg1), + getValue(Raw->Ty, Raw->Arg2)); return false; - } + } Value *V; - switch (Raw.Opcode) { + switch (Raw->Opcode) { case Instruction::VarArg: case Instruction::Cast: { - V = getValue(Raw.Ty, Raw.Arg1); - const Type *Ty = getType(Raw.Arg2); + V = getValue(Raw->Ty, Raw->Arg1); + const Type *Ty = getType(Raw->Arg2); if (V == 0 || Ty == 0) { std::cerr << "Invalid cast!\n"; return true; } - if (Raw.Opcode == Instruction::Cast) + if (Raw->Opcode == Instruction::Cast) Res = new CastInst(V, Ty); else Res = new VarArgInst(V, Ty); return false; } case Instruction::PHINode: { - PHINode *PN = new PHINode(Raw.Ty); - switch (Raw.NumOperands) { + PHINode *PN = new PHINode(Raw->Ty); + switch (Raw->NumOperands) { case 0: case 1: case 3: std::cerr << "Invalid phi node encountered!\n"; delete PN; return true; - case 2: PN->addIncoming(getValue(Raw.Ty, Raw.Arg1), - cast(getValue(Type::LabelTy,Raw.Arg2))); + case 2: PN->addIncoming(getValue(Raw->Ty, Raw->Arg1), + cast(getValue(Type::LabelTy, + Raw->Arg2))); break; default: - PN->addIncoming(getValue(Raw.Ty, Raw.Arg1), - cast(getValue(Type::LabelTy, Raw.Arg2))); - if (Raw.VarArgs->size() & 1) { + PN->addIncoming(getValue(Raw->Ty, Raw->Arg1), + cast(getValue(Type::LabelTy, Raw->Arg2))); + if (Raw->VarArgs->size() & 1) { std::cerr << "PHI Node with ODD number of arguments!\n"; delete PN; return true; } else { - std::vector &args = *Raw.VarArgs; + std::vector &args = *Raw->VarArgs; for (unsigned i = 0; i < args.size(); i+=2) - PN->addIncoming(getValue(Raw.Ty, args[i]), + PN->addIncoming(getValue(Raw->Ty, args[i]), cast(getValue(Type::LabelTy, args[i+1]))); } - delete Raw.VarArgs; + delete Raw->VarArgs; break; } Res = PN; @@ -175,54 +186,54 @@ case Instruction::Shl: case Instruction::Shr: - Res = new ShiftInst((Instruction::OtherOps)Raw.Opcode, - getValue(Raw.Ty, Raw.Arg1), - getValue(Type::UByteTy, Raw.Arg2)); + Res = new ShiftInst((Instruction::OtherOps)Raw->Opcode, + getValue(Raw->Ty, Raw->Arg1), + getValue(Type::UByteTy, Raw->Arg2)); return false; case Instruction::Ret: - if (Raw.NumOperands == 0) { + if (Raw->NumOperands == 0) { Res = new ReturnInst(); return false; - } else if (Raw.NumOperands == 1) { - Res = new ReturnInst(getValue(Raw.Ty, Raw.Arg1)); return false; + } else if (Raw->NumOperands == 1) { + Res = new ReturnInst(getValue(Raw->Ty, Raw->Arg1)); return false; } break; case Instruction::Br: - if (Raw.NumOperands == 1) { - Res = new BranchInst(cast(getValue(Type::LabelTy, Raw.Arg1))); + if (Raw->NumOperands == 1) { + Res = new BranchInst(cast(getValue(Type::LabelTy,Raw->Arg1))); return false; - } else if (Raw.NumOperands == 3) { - Res = new BranchInst(cast(getValue(Type::LabelTy, Raw.Arg1)), - cast(getValue(Type::LabelTy, Raw.Arg2)), - getValue(Type::BoolTy , Raw.Arg3)); + } else if (Raw->NumOperands == 3) { + Res = new BranchInst(cast(getValue(Type::LabelTy, Raw->Arg1)), + cast(getValue(Type::LabelTy, Raw->Arg2)), + getValue(Type::BoolTy , Raw->Arg3)); return false; } break; case Instruction::Switch: { SwitchInst *I = - new SwitchInst(getValue(Raw.Ty, Raw.Arg1), - cast(getValue(Type::LabelTy, Raw.Arg2))); + new SwitchInst(getValue(Raw->Ty, Raw->Arg1), + cast(getValue(Type::LabelTy, Raw->Arg2))); Res = I; - if (Raw.NumOperands < 3) return false; // No destinations? Weird. + if (Raw->NumOperands < 3) return false; // No destinations? Weird. - if (Raw.NumOperands == 3 || Raw.VarArgs->size() & 1) { + if (Raw->NumOperands == 3 || Raw->VarArgs->size() & 1) { std::cerr << "Switch statement with odd number of arguments!\n"; delete I; return true; } - std::vector &args = *Raw.VarArgs; + std::vector &args = *Raw->VarArgs; for (unsigned i = 0; i < args.size(); i += 2) - I->addCase(cast(getValue(Raw.Ty, args[i])), + I->addCase(cast(getValue(Raw->Ty, args[i])), cast(getValue(Type::LabelTy, args[i+1]))); - delete Raw.VarArgs; + delete Raw->VarArgs; return false; } case Instruction::Call: { - Value *F = getValue(Raw.Ty, Raw.Arg1); + Value *F = getValue(Raw->Ty, Raw->Arg1); if (F == 0) return true; // Check to make sure we have a pointer to method type @@ -237,30 +248,30 @@ if (!FTy->isVarArg()) { FunctionType::ParamTypes::const_iterator It = PL.begin(); - switch (Raw.NumOperands) { + switch (Raw->NumOperands) { case 0: std::cerr << "Invalid call instruction encountered!\n"; return true; case 1: break; - case 2: Params.push_back(getValue(*It++, Raw.Arg2)); break; - case 3: Params.push_back(getValue(*It++, Raw.Arg2)); + case 2: Params.push_back(getValue(*It++, Raw->Arg2)); break; + case 3: Params.push_back(getValue(*It++, Raw->Arg2)); if (It == PL.end()) return true; - Params.push_back(getValue(*It++, Raw.Arg3)); break; + Params.push_back(getValue(*It++, Raw->Arg3)); break; default: - Params.push_back(getValue(*It++, Raw.Arg2)); + Params.push_back(getValue(*It++, Raw->Arg2)); { - std::vector &args = *Raw.VarArgs; + std::vector &args = *Raw->VarArgs; for (unsigned i = 0; i < args.size(); i++) { if (It == PL.end()) return true; Params.push_back(getValue(*It++, args[i])); if (Params.back() == 0) return true; } } - delete Raw.VarArgs; + delete Raw->VarArgs; } if (It != PL.end()) return true; } else { - if (Raw.NumOperands > 2) { - std::vector &args = *Raw.VarArgs; + if (Raw->NumOperands > 2) { + std::vector &args = *Raw->VarArgs; if (args.size() < 1) return true; if ((args.size() & 1) != 0) @@ -274,7 +285,7 @@ if (V == 0) return true; Params.push_back(V); } - delete Raw.VarArgs; + delete Raw->VarArgs; } } @@ -282,7 +293,7 @@ return false; } case Instruction::Invoke: { - Value *F = getValue(Raw.Ty, Raw.Arg1); + Value *F = getValue(Raw->Ty, Raw->Arg1); if (F == 0) return true; // Check to make sure we have a pointer to method type @@ -293,16 +304,16 @@ std::vector Params; const FunctionType::ParamTypes &PL = FTy->getParamTypes(); - std::vector &args = *Raw.VarArgs; + std::vector &args = *Raw->VarArgs; BasicBlock *Normal, *Except; if (!FTy->isVarArg()) { - if (Raw.NumOperands < 3) return true; + if (Raw->NumOperands < 3) return true; - Normal = cast(getValue(Type::LabelTy, Raw.Arg2)); - if (Raw.NumOperands == 3) - Except = cast(getValue(Type::LabelTy, Raw.Arg3)); + Normal = cast(getValue(Type::LabelTy, Raw->Arg2)); + if (Raw->NumOperands == 3) + Except = cast(getValue(Type::LabelTy, Raw->Arg3)); else { Except = cast(getValue(Type::LabelTy, args[0])); @@ -329,105 +340,105 @@ } } - if (Raw.NumOperands > 3) - delete Raw.VarArgs; + if (Raw->NumOperands > 3) + delete Raw->VarArgs; Res = new InvokeInst(F, Normal, Except, Params); return false; } case Instruction::Malloc: - if (Raw.NumOperands > 2) return true; - V = Raw.NumOperands ? getValue(Type::UIntTy, Raw.Arg1) : 0; - if (const PointerType *PTy = dyn_cast(Raw.Ty)) + if (Raw->NumOperands > 2) return true; + V = Raw->NumOperands ? getValue(Type::UIntTy, Raw->Arg1) : 0; + if (const PointerType *PTy = dyn_cast(Raw->Ty)) Res = new MallocInst(PTy->getElementType(), V); else return true; return false; case Instruction::Alloca: - if (Raw.NumOperands > 2) return true; - V = Raw.NumOperands ? getValue(Type::UIntTy, Raw.Arg1) : 0; - if (const PointerType *PTy = dyn_cast(Raw.Ty)) + if (Raw->NumOperands > 2) return true; + V = Raw->NumOperands ? getValue(Type::UIntTy, Raw->Arg1) : 0; + if (const PointerType *PTy = dyn_cast(Raw->Ty)) Res = new AllocaInst(PTy->getElementType(), V); else return true; return false; case Instruction::Free: - V = getValue(Raw.Ty, Raw.Arg1); + V = getValue(Raw->Ty, Raw->Arg1); if (!isa(V->getType())) return true; Res = new FreeInst(V); return false; case Instruction::GetElementPtr: { std::vector Idx; - if (!isa(Raw.Ty)) return true; - const CompositeType *TopTy = dyn_cast(Raw.Ty); + if (!isa(Raw->Ty)) return true; + const CompositeType *TopTy = dyn_cast(Raw->Ty); - switch (Raw.NumOperands) { + switch (Raw->NumOperands) { case 0: std::cerr << "Invalid getelementptr encountered!\n"; return true; case 1: break; case 2: if (!TopTy) return true; - Idx.push_back(V = getValue(TopTy->getIndexType(), Raw.Arg2)); + Idx.push_back(V = getValue(TopTy->getIndexType(), Raw->Arg2)); if (!V) return true; break; case 3: { if (!TopTy) return true; - Idx.push_back(V = getValue(TopTy->getIndexType(), Raw.Arg2)); + Idx.push_back(V = getValue(TopTy->getIndexType(), Raw->Arg2)); if (!V) return true; const Type *ETy = GetElementPtrInst::getIndexedType(TopTy, Idx, true); const CompositeType *ElTy = dyn_cast_or_null(ETy); if (!ElTy) return true; - Idx.push_back(V = getValue(ElTy->getIndexType(), Raw.Arg3)); + Idx.push_back(V = getValue(ElTy->getIndexType(), Raw->Arg3)); if (!V) return true; break; } default: if (!TopTy) return true; - Idx.push_back(V = getValue(TopTy->getIndexType(), Raw.Arg2)); + Idx.push_back(V = getValue(TopTy->getIndexType(), Raw->Arg2)); if (!V) return true; - std::vector &args = *Raw.VarArgs; + std::vector &args = *Raw->VarArgs; for (unsigned i = 0, E = args.size(); i != E; ++i) { - const Type *ETy = GetElementPtrInst::getIndexedType(Raw.Ty, Idx, true); + const Type *ETy = GetElementPtrInst::getIndexedType(Raw->Ty, Idx, true); const CompositeType *ElTy = dyn_cast_or_null(ETy); if (!ElTy) return true; Idx.push_back(V = getValue(ElTy->getIndexType(), args[i])); if (!V) return true; } - delete Raw.VarArgs; + delete Raw->VarArgs; break; } - Res = new GetElementPtrInst(getValue(Raw.Ty, Raw.Arg1), Idx); + Res = new GetElementPtrInst(getValue(Raw->Ty, Raw->Arg1), Idx); return false; } case 62: // volatile load case Instruction::Load: - if (Raw.NumOperands != 1) return true; - if (!isa(Raw.Ty)) return true; - Res = new LoadInst(getValue(Raw.Ty, Raw.Arg1), "", Raw.Opcode == 62); + if (Raw->NumOperands != 1) return true; + if (!isa(Raw->Ty)) return true; + Res = new LoadInst(getValue(Raw->Ty, Raw->Arg1), "", Raw->Opcode == 62); return false; case 63: // volatile store case Instruction::Store: { - if (!isa(Raw.Ty) || Raw.NumOperands != 2) return true; + if (!isa(Raw->Ty) || Raw->NumOperands != 2) return true; - Value *Ptr = getValue(Raw.Ty, Raw.Arg2); + Value *Ptr = getValue(Raw->Ty, Raw->Arg2); const Type *ValTy = cast(Ptr->getType())->getElementType(); - Res = new StoreInst(getValue(ValTy, Raw.Arg1), Ptr, Raw.Opcode == 63); + Res = new StoreInst(getValue(ValTy, Raw->Arg1), Ptr, Raw->Opcode == 63); return false; } case Instruction::Unwind: - if (Raw.NumOperands != 0) return true; + if (Raw->NumOperands != 0) return true; Res = new UnwindInst(); return false; - } // end switch(Raw.Opcode) + } // end switch(Raw->Opcode) - std::cerr << "Unrecognized instruction! " << Raw.Opcode + std::cerr << "Unrecognized instruction! " << Raw->Opcode << " ADDR = 0x" << (void*)Buf << "\n"; return true; } Index: llvm/lib/Bytecode/Reader/ReaderInternals.h diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.43 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.44 --- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.43 Mon Sep 22 18:58:08 2003 +++ llvm/lib/Bytecode/Reader/ReaderInternals.h Tue Sep 23 11:17:50 2003 @@ -164,8 +164,8 @@ bool ParseInstruction (const unsigned char *&Buf, const unsigned char *End, Instruction *&); - bool ParseRawInst (const unsigned char *&Buf, const unsigned char *End, - RawInst &); + std::auto_ptr ParseRawInst(const unsigned char *&Buf, + const unsigned char *End); void ParseConstantPool(const unsigned char *&Buf, const unsigned char *EndBuf, ValueTable &Tab, TypeValuesListTy &TypeTab); From brukman at cs.uiuc.edu Tue Sep 23 12:28:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 23 12:28:01 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-ar/llvm-ar.cpp Message-ID: <200309231727.MAA11876@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ar: llvm-ar.cpp updated: 1.2 -> 1.3 --- Log message: Squelch warning and delete extra space. --- Diffs of the changes: Index: llvm/tools/llvm-ar/llvm-ar.cpp diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.2 llvm/tools/llvm-ar/llvm-ar.cpp:1.3 --- llvm/tools/llvm-ar/llvm-ar.cpp:1.2 Fri Sep 12 22:18:56 2003 +++ llvm/tools/llvm-ar/llvm-ar.cpp Tue Sep 23 12:27:02 2003 @@ -277,12 +277,10 @@ sprintf(Hdr.gid, "%d", StatBuf.st_gid); //file member date in decimal - sprintf(Hdr.date,"%d", StatBuf.st_mtime); - + sprintf(Hdr.date,"%d", (int)StatBuf.st_mtime); //file member mode in OCTAL sprintf(Hdr.mode,"%d", StatBuf.st_mode); - //add our header trailer memcpy(Hdr.fmag,ARFMAG,sizeof(ARFMAG)); @@ -290,7 +288,6 @@ //write header to archive file ArchiveFile.write((char*)&Hdr, sizeof(Hdr)); - //open Member file for reading and copy to buffer int FD = open(Member.c_str(),O_RDONLY); if (FD == -1) { From brukman at cs.uiuc.edu Tue Sep 23 12:28:04 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 23 12:28:04 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/EmitAssembly.cpp Message-ID: <200309231727.MAA11897@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: EmitAssembly.cpp updated: 1.89 -> 1.90 --- Log message: Fix spelling. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/EmitAssembly.cpp diff -u llvm/lib/Target/Sparc/EmitAssembly.cpp:1.89 llvm/lib/Target/Sparc/EmitAssembly.cpp:1.90 --- llvm/lib/Target/Sparc/EmitAssembly.cpp:1.89 Mon Aug 18 09:32:23 2003 +++ llvm/lib/Target/Sparc/EmitAssembly.cpp Tue Sep 23 12:27:28 2003 @@ -500,7 +500,7 @@ unsigned N = 1; for (unsigned OpNum = 0; OpNum < MI->getNumOperands(); OpNum += N) if (! ((1 << OpNum) & Mask)) { // Ignore this operand? - if (NeedComma) toAsm << ", "; // Handle comma outputing + if (NeedComma) toAsm << ", "; // Handle comma outputting NeedComma = true; N = printOperands(MI, OpNum); } else From brukman at cs.uiuc.edu Tue Sep 23 12:29:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Sep 23 12:29:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInstrSelection.cpp SparcRegClassInfo.cpp Message-ID: <200309231728.MAA12161@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcInstrSelection.cpp updated: 1.118 -> 1.119 SparcRegClassInfo.cpp updated: 1.28 -> 1.29 --- Log message: Fixed spelling. --- Diffs of the changes: Index: llvm/lib/Target/Sparc/SparcInstrSelection.cpp diff -u llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.118 llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.119 --- llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.118 Tue Sep 16 00:56:22 2003 +++ llvm/lib/Target/Sparc/SparcInstrSelection.cpp Tue Sep 23 12:28:11 2003 @@ -177,7 +177,7 @@ Value* ptrVal = gepI->getPointerOperand(); InstrTreeNode* ptrChild = gepNode->leftChild(); - // Extract the index vector of the GEP instructin. + // Extract the index vector of the GEP instruction. // If all indices are constant and first index is zero, try to fold // in preceding GEPs with all constant indices. for (User::op_iterator OI=gepI->idx_begin(), OE=gepI->idx_end(); @@ -2917,7 +2917,7 @@ assert(numSubst > 0 && "Operand `dest' not replaced: probably bogus!"); // Left shift 32-N if size (N) is less than 32 bits. - // Use another tmp. virtual registe to represent this result. + // Use another tmp. virtual register to represent this result. if (destSize < 4) { srlArgToUse = new TmpInstruction(mcfi, dest->getType(), tmpI, NULL, "maskHi2"); Index: llvm/lib/Target/Sparc/SparcRegClassInfo.cpp diff -u llvm/lib/Target/Sparc/SparcRegClassInfo.cpp:1.28 llvm/lib/Target/Sparc/SparcRegClassInfo.cpp:1.29 --- llvm/lib/Target/Sparc/SparcRegClassInfo.cpp:1.28 Sun Sep 21 02:55:27 2003 +++ llvm/lib/Target/Sparc/SparcRegClassInfo.cpp Tue Sep 23 12:28:11 2003 @@ -76,7 +76,7 @@ } if (ColorFound) { - LR->setColor(c); // first color found in preffered order + LR->setColor(c); // first color found in preferred order if (DEBUG_RA) std::cerr << "\n Colored after first search with col " << c; } From lattner at cs.uiuc.edu Tue Sep 23 15:27:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Sep 23 15:27:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/IndVarsSimplify/2003-09-23-NotAtTop.ll Message-ID: <200309232026.PAA24831@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/IndVarsSimplify: 2003-09-23-NotAtTop.ll added (r1.1) --- Log message: new testcase --- Diffs of the changes: Index: llvm/test/Regression/Transforms/IndVarsSimplify/2003-09-23-NotAtTop.ll diff -c /dev/null llvm/test/Regression/Transforms/IndVarsSimplify/2003-09-23-NotAtTop.ll:1.1 *** /dev/null Tue Sep 23 15:26:48 2003 --- llvm/test/Regression/Transforms/IndVarsSimplify/2003-09-23-NotAtTop.ll Tue Sep 23 15:26:38 2003 *************** *** 0 **** --- 1,16 ---- + ; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep -C 1 Loop: | grep Canonical + + ; The indvar simplification code should ensure that the first PHI in the block + ; is the canonical one! + + int %test() { + br label %Loop + Loop: + %NonIndvar = phi int [200, %0], [%NonIndvarNext, %Loop] + %Canonical = phi int [0, %0], [%CanonicalNext, %Loop] + + %NonIndvarNext = div int %NonIndvar, 2 + %CanonicalNext = add int %Canonical, 1 + br label %Loop + } + From lattner at cs.uiuc.edu Tue Sep 23 15:27:06 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Sep 23 15:27:06 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <200309232026.PAA24838@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.37 -> 1.38 --- Log message: Fix bug: IndVarsSimplify/2003-09-23-NotAtTop.ll --- Diffs of the changes: Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.37 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.38 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.37 Fri Sep 12 11:45:01 2003 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Tue Sep 23 15:26:48 2003 @@ -76,8 +76,8 @@ // indvar. If we don't have one, add one now... if (!Canonical) { // Create the PHI node for the new induction variable, and insert the phi - // node at the end of the other phi nodes... - PHINode *PN = new PHINode(Type::UIntTy, "cann-indvar", AfterPHIIt); + // node at the start of the PHI nodes... + PHINode *PN = new PHINode(Type::UIntTy, "cann-indvar", Header->begin()); // Create the increment instruction to add one to the counter... Instruction *Add = BinaryOperator::create(Instruction::Add, PN, @@ -108,6 +108,12 @@ Canonical = &IndVars.back(); ++NumInserted; Changed = true; + } else { + // If we have a canonical induction variable, make sure that it is the first + // one in the basic block. + if (&Header->front() != Canonical->Phi) + Header->getInstList().splice(Header->begin(), Header->getInstList(), + Canonical->Phi); } DEBUG(std::cerr << "Induction variables:\n"); From lattner at cs.uiuc.edu Tue Sep 23 15:34:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Sep 23 15:34:01 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200309232033.PAA24859@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.30 -> 1.31 --- Log message: Make it detect failed builds better --- Diffs of the changes: Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.30 llvm/utils/NightlyTest.pl:1.31 --- llvm/utils/NightlyTest.pl:1.30 Sun Sep 14 01:00:49 2003 +++ llvm/utils/NightlyTest.pl Tue Sep 23 15:33:04 2003 @@ -197,7 +197,8 @@ my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$Prefix-Build-Log.txt"; my $BuildError = ""; -if (`grep '^gmake[^:]*: .*Error' $Prefix-Build-Log.txt | wc -l` + 0) { +if (`grep '^gmake[^:]*: .*Error' $Prefix-Build-Log.txt | wc -l` + 0 || + `grep '^gmake: \*\*\*.*Stop.`+0) { $BuildError = "

Build error: compilation " . "aborted

"; } From criswell at cs.uiuc.edu Tue Sep 23 15:47:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Sep 23 15:47:01 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200309232046.PAA03110@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.29 -> 1.30 --- Log message: If we fail to find python or qmtest, give a warning message instead of an error message. This should hopefully allow our nightly tester to run, which does not run the QMTest tests at present. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.29 llvm/configure:1.30 --- llvm/configure:1.29 Tue Sep 23 10:28:49 2003 +++ llvm/configure Tue Sep 23 15:46:32 2003 @@ -18983,9 +18983,8 @@ if test ${PYTHON} = "false" then - { { echo "$as_me:$LINENO: error: python required but not found" >&5 -echo "$as_me: error: python required but not found" >&2;} - { (exit 1); exit 1; }; } + { echo "$as_me:$LINENO: WARNING: python required but not found" >&5 +echo "$as_me: WARNING: python required but not found" >&2;} fi # Extract the first word of "qmtest", so it can be a program name with args. @@ -19030,9 +19029,8 @@ if test ${QMTEST} = "false" then - { { echo "$as_me:$LINENO: error: qmtest required but not found" >&5 -echo "$as_me: error: qmtest required but not found" >&2;} - { (exit 1); exit 1; }; } + { echo "$as_me:$LINENO: WARNING: qmtest required but not found" >&5 +echo "$as_me: WARNING: qmtest required but not found" >&2;} fi pyversion=`$PYTHON -V 2>&1 | cut -d\ -f2` From criswell at cs.uiuc.edu Tue Sep 23 15:47:04 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Sep 23 15:47:04 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200309232046.PAA03103@choi.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.21 -> 1.22 --- Log message: If we fail to find python or qmtest, give a warning message instead of an error message. This should hopefully allow our nightly tester to run, which does not run the QMTest tests at present. --- Diffs of the changes: Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.21 llvm/autoconf/configure.ac:1.22 --- llvm/autoconf/configure.ac:1.21 Tue Sep 23 10:28:52 2003 +++ llvm/autoconf/configure.ac Tue Sep 23 15:46:30 2003 @@ -356,13 +356,13 @@ AC_PATH_PROG(PYTHON,[python],[false]) if test ${PYTHON} = "false" then - AC_MSG_ERROR([python required but not found]) + AC_MSG_WARN([python required but not found]) fi AC_PATH_PROG(QMTEST,[qmtest],[false]) if test ${QMTEST} = "false" then - AC_MSG_ERROR([qmtest required but not found]) + AC_MSG_WARN([qmtest required but not found]) fi dnl Verify that the version of python available is high enough for qmtest From lattner at cs.uiuc.edu Tue Sep 23 16:00:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Sep 23 16:00:01 2003 Subject: [llvm-commits] CVS: llvm/CREDITS.TXT Message-ID: <200309232059.PAA24956@apoc.cs.uiuc.edu> Changes in directory llvm: CREDITS.TXT updated: 1.1 -> 1.2 --- Log message: Update email addr --- Diffs of the changes: Index: llvm/CREDITS.TXT diff -u llvm/CREDITS.TXT:1.1 llvm/CREDITS.TXT:1.2 --- llvm/CREDITS.TXT:1.1 Mon Sep 22 16:56:08 2003 +++ llvm/CREDITS.TXT Tue Sep 23 15:59:28 2003 @@ -41,4 +41,5 @@ D: The paths pass N: Bill Wendling +E: wendling at isanbard.org D: The Lower Setjmp/Longjmp pass From criswell at cs.uiuc.edu Tue Sep 23 16:20:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Sep 23 16:20:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Message-ID: <200309232119.QAA05804@choi.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderWrappers.cpp updated: 1.4 -> 1.5 --- Log message: Added code that ensures that we pass the beginning of the data buffer to the parsing routines regardless of whether the buffer is re-aligned or not. --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.4 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.5 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.4 Tue Sep 23 11:13:28 2003 +++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Tue Sep 23 16:19:11 2003 @@ -106,7 +106,7 @@ MustDelete = true; } else { // If we don't need to copy it over, just use the caller's copy - Buffer = Buf; + ParseBegin = Buffer = Buf; Length = Len; MustDelete = false; } From lattner at cs.uiuc.edu Tue Sep 23 17:03:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Sep 23 17:03:02 2003 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200309232202.RAA25338@apoc.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.31 -> 1.32 --- Log message: Fix bug in previous checkin --- Diffs of the changes: Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.31 llvm/utils/NightlyTest.pl:1.32 --- llvm/utils/NightlyTest.pl:1.31 Tue Sep 23 15:33:04 2003 +++ llvm/utils/NightlyTest.pl Tue Sep 23 17:02:01 2003 @@ -198,7 +198,7 @@ my $BuildError = ""; if (`grep '^gmake[^:]*: .*Error' $Prefix-Build-Log.txt | wc -l` + 0 || - `grep '^gmake: \*\*\*.*Stop.`+0) { + `grep '^gmake: \*\*\*.*Stop.' $Prefix-Build-Log.txt | wc -l`+0) { $BuildError = "

Build error: compilation " . "aborted

"; } From gaeke at cs.uiuc.edu Tue Sep 23 23:11:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Sep 23 23:11:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/InstIterator.h Message-ID: <200309240410.XAA16759@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: InstIterator.h updated: 1.5 -> 1.6 --- Log message: Fix a typo I happened to notice. Rename include guards in the "usual" manner. --- Diffs of the changes: Index: llvm/include/llvm/Support/InstIterator.h diff -u llvm/include/llvm/Support/InstIterator.h:1.5 llvm/include/llvm/Support/InstIterator.h:1.6 --- llvm/include/llvm/Support/InstIterator.h:1.5 Wed Apr 23 11:35:30 2003 +++ llvm/include/llvm/Support/InstIterator.h Tue Sep 23 23:09:50 2003 @@ -9,13 +9,13 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_INST_ITERATOR_H -#define LLVM_INST_ITERATOR_H +#ifndef LLVM_SUPPORT_INSTITERATOR_H +#define LLVM_SUPPORT_INSTITERATOR_H #include "llvm/BasicBlock.h" #include "llvm/Function.h" -// This class is implements inst_begin() & inst_end() for +// This class implements inst_begin() & inst_end() for // inst_iterator and const_inst_iterator's. // template From gaeke at cs.uiuc.edu Tue Sep 23 23:31:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Sep 23 23:31:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/IGNode.h Message-ID: <200309240430.XAA18556@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: IGNode.h updated: 1.15 -> 1.16 --- Log message: Remove some unused methods of class IGNode. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/IGNode.h diff -u llvm/lib/CodeGen/RegAlloc/IGNode.h:1.15 llvm/lib/CodeGen/RegAlloc/IGNode.h:1.16 --- llvm/lib/CodeGen/RegAlloc/IGNode.h:1.15 Sat Sep 20 21:31:15 2003 +++ llvm/lib/CodeGen/RegAlloc/IGNode.h Tue Sep 23 23:29:52 2003 @@ -95,28 +95,15 @@ // inline void decCurDegree() { assert(CurDegree > 0); --CurDegree; } - // The following methods call the methods in ParentLR // They are added to this class for convenience // If many of these are called within a single scope, // consider calling the methods directly on LR - - inline void setRegClass(RegClass *RC) { ParentLR->setRegClass(RC); } - - inline RegClass *getRegClass() const { return ParentLR->getRegClass(); } - inline bool hasColor() const { return ParentLR->hasColor(); } inline unsigned int getColor() const { return ParentLR->getColor(); } inline void setColor(unsigned Col) { ParentLR->setColor(Col); } - - inline void markForSpill() { ParentLR->markForSpill(); } - - inline void markForSaveAcrossCalls() { ParentLR->markForSaveAcrossCalls(); } - - inline unsigned int isCallInterference() const - { return ParentLR->isCallInterference(); } inline LiveRange *getParentLR() const { return ParentLR; } }; From lattner at cs.uiuc.edu Wed Sep 24 00:00:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 24 00:00:01 2003 Subject: [llvm-commits] CVS: llvm/www/www-index.html Message-ID: <200309240459.XAA03450@tank.cs.uiuc.edu> Changes in directory llvm/www: www-index.html updated: 1.51 -> 1.52 --- Log message: We support c++ too! --- Diffs of the changes: Index: llvm/www/www-index.html diff -u llvm/www/www-index.html:1.51 llvm/www/www-index.html:1.52 --- llvm/www/www-index.html:1.51 Mon Sep 22 17:05:15 2003 +++ llvm/www/www-index.html Tue Sep 23 23:59:15 2003 @@ -50,7 +50,7 @@ infrastructure - LLVM is also a collection of source code that implements the language and compilation strategy. The primary components of the LLVM - infrastructure are a GCC-based C front-end, a link-time + infrastructure are a GCC-based C & C++ front-end, a link-time optimization framework with a growing set of global and interprocedural analyses and transformations, static back-ends for the SPARC v9 and X86 architectures, a From gaeke at cs.uiuc.edu Wed Sep 24 12:51:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Sep 24 12:51:02 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Message-ID: <200309241750.MAA23283@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.114 -> 1.115 --- Log message: Use getRegClassID() instead of getRegClass()->getID(), since it's there. Shorten the markSuggestedColorUsable method. Add a switch for saving reg. alloc. state (coming soon). --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.114 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.115 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.114 Tue Sep 23 10:13:04 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Wed Sep 24 12:50:28 2003 @@ -39,6 +39,10 @@ clEnumValN(RA_DEBUG_Verbose, "v", "extra debug output"), 0)); +static cl::opt +SaveRegAllocState("save-ra-state", cl::Hidden, + cl::desc("write reg. allocator state into module")); + FunctionPass *getRegisterAllocator(TargetMachine &T) { return new PhyRegAlloc (T); } @@ -76,7 +80,7 @@ // if the Value * is not null, and LR is not yet written to the IGNodeList if (!(L->getUserIGNode()) ) { RegClass *const RC = // RegClass of first value in the LR - RegClassList[ L->getRegClass()->getID() ]; + RegClassList[ L->getRegClassID() ]; RC->addLRToIG(L); // add this LR to an IG } } @@ -427,7 +431,7 @@ // An operand may have a color whether or not it needs spilling if (LR->hasColor()) MInst->SetRegForOperand(OpNum, - MRI.getUnifiedRegNum(LR->getRegClass()->getID(), + MRI.getUnifiedRegNum(LR->getRegClassID(), LR->getColor())); } } @@ -675,7 +679,7 @@ // This may insert code before and after MInst to free up the value. If so, // this code should be first/last in the spill sequence before/after MInst. int TmpRegU=(LR->hasColor() - ? MRI.getUnifiedRegNum(LR->getRegClass()->getID(),LR->getColor()) + ? MRI.getUnifiedRegNum(LR->getRegClassID(),LR->getColor()) : getUsableUniRegAtMI(RegType, &LVSetBef, MInst, MIBef,MIAft)); // Set the operand first so that it this register does not get used @@ -1118,10 +1122,10 @@ //---------------------------------------------------------------------------- -// This method calls setSugColorUsable method of each live range. This -// will determine whether the suggested color of LR is really usable. -// A suggested color is not usable when the suggested color is volatile -// AND when there are call interferences +// This method determines whether the suggested color of each live range +// is really usable, and then calls its setSuggestedColorUsable() method to +// record the answer. A suggested color is NOT usable when the suggested color +// is volatile AND when there are call interferences. //---------------------------------------------------------------------------- void PhyRegAlloc::markUnusableSugColors() @@ -1132,16 +1136,10 @@ for (; HMI != HMIEnd ; ++HMI ) { if (HMI->first) { LiveRange *L = HMI->second; // get the LiveRange - if (L) { - if (L->hasSuggestedColor()) { - int RCID = L->getRegClass()->getID(); - if (MRI.isRegVolatile( RCID, L->getSuggestedColor()) && - L->isCallInterference() ) - L->setSuggestedColorUsable( false ); - else - L->setSuggestedColorUsable( true ); - } - } // if L->hasSuggestedColor() + if (L && L->hasSuggestedColor ()) + L->setSuggestedColorUsable + (!(MRI.isRegVolatile (L->getRegClassID (), L->getSuggestedColor ()) + && L->isCallInterference ())); } } // for all LR's in hash map } From gaeke at cs.uiuc.edu Wed Sep 24 13:10:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Sep 24 13:10:03 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp PhyRegAlloc.h Message-ID: <200309241809.NAA23432@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.115 -> 1.116 PhyRegAlloc.h updated: 1.53 -> 1.54 --- Log message: Untabify tabs in stuff I've recently added. Check in my register allocator state-saving code. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.115 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.116 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.115 Wed Sep 24 12:50:28 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Wed Sep 24 13:08:54 2003 @@ -20,6 +20,10 @@ #include "llvm/Function.h" #include "llvm/Type.h" #include "llvm/iOther.h" +#include "llvm/DerivedTypes.h" +#include "llvm/Constants.h" +#include "llvm/Support/InstIterator.h" +#include "llvm/Module.h" #include "Support/STLExtras.h" #include "Support/SetOperations.h" #include "Support/CommandLine.h" @@ -1137,9 +1141,9 @@ if (HMI->first) { LiveRange *L = HMI->second; // get the LiveRange if (L && L->hasSuggestedColor ()) - L->setSuggestedColorUsable - (!(MRI.isRegVolatile (L->getRegClassID (), L->getSuggestedColor ()) - && L->isCallInterference ())); + L->setSuggestedColorUsable + (!(MRI.isRegVolatile (L->getRegClassID (), L->getSuggestedColor ()) + && L->isCallInterference ())); } } // for all LR's in hash map } @@ -1173,6 +1177,145 @@ } +namespace { + /// AllocInfo - Structure representing one instruction's + /// operand's-worth of register allocation state. We create tables + /// made out of these data structures to generate mapping information + /// for this register allocator. (FIXME: This might move to a header + /// file at some point.) + /// + struct AllocInfo { + unsigned Instruction; + unsigned Operand; + unsigned AllocState; + int Placement; + AllocInfo (unsigned Instruction_, unsigned Operand_, + unsigned AllocState_, int Placement_) : + Instruction (Instruction_), Operand (Operand_), + AllocState (AllocState_), Placement (Placement_) { } + /// getConstantType - Return a StructType representing an AllocInfo + /// object. + /// + static StructType *getConstantType () { + std::vector TV; + TV.push_back (Type::UIntTy); + TV.push_back (Type::UIntTy); + TV.push_back (Type::UIntTy); + TV.push_back (Type::IntTy); + return StructType::get (TV); + } + /// toConstant - Convert this AllocInfo into an LLVM Constant of type + /// getConstantType(), and return the Constant. + /// + Constant *toConstant () const { + StructType *ST = getConstantType (); + std::vector CV; + CV.push_back (ConstantUInt::get (Type::UIntTy, Instruction)); + CV.push_back (ConstantUInt::get (Type::UIntTy, Operand)); + CV.push_back (ConstantUInt::get (Type::UIntTy, AllocState)); + CV.push_back (ConstantSInt::get (Type::IntTy, Placement)); + return ConstantStruct::get (ST, CV); + } + }; +} + +void PhyRegAlloc::saveState () +{ + std::vector state; + unsigned Insn = 0; + LiveRangeMapType::const_iterator HMIEnd = LRI->getLiveRangeMap ()->end (); + for (const_inst_iterator II=inst_begin (Fn), IE=inst_end (Fn); II != IE; ++II) + for (unsigned i = 0; i < (*II)->getNumOperands (); ++i) { + const Value *V = (*II)->getOperand (i); + // Don't worry about it unless it's something whose reg. we'll need. + if (!isa (V) && !isa (V)) + continue; + LiveRangeMapType::const_iterator HMI = LRI->getLiveRangeMap ()->find (V); + static const unsigned NotAllocated = 0, Allocated = 1, Spilled = 2; + unsigned AllocState = NotAllocated; + int Placement = -1; + if ((HMI != HMIEnd) && HMI->second) { + LiveRange *L = HMI->second; + assert ((L->hasColor () || L->isMarkedForSpill ()) + && "Live range exists but not colored or spilled"); + if (L->hasColor()) { + AllocState = Allocated; + Placement = MRI.getUnifiedRegNum (L->getRegClassID (), + L->getColor ()); + } else if (L->isMarkedForSpill ()) { + AllocState = Spilled; + assert (L->hasSpillOffset () + && "Live range marked for spill but has no spill offset"); + Placement = L->getSpillOffFromFP (); + } + } + state.push_back (AllocInfo (Insn, i, AllocState, + Placement).toConstant ()); + } + // Convert state into an LLVM ConstantArray, and put it in a + // ConstantStruct (named S) along with its size. + unsigned Size = state.size (); + ArrayType *AT = ArrayType::get (AllocInfo::getConstantType (), Size); + std::vector TV; + TV.push_back (Type::UIntTy); + TV.push_back (AT); + StructType *ST = StructType::get (TV); + std::vector CV; + CV.push_back (ConstantUInt::get (Type::UIntTy, Size)); + CV.push_back (ConstantArray::get (AT, state)); + Constant *S = ConstantStruct::get (ST, CV); + // Save S in the map containing register allocator state for this module. + FnAllocState[Fn] = S; +} + + +bool PhyRegAlloc::doFinalization (Module &M) { + if (!SaveRegAllocState) + return false; // Nothing to do here, unless we're saving state. + + // Convert FnAllocState to a single Constant array and add it + // to the Module. + ArrayType *AT = ArrayType::get (AllocInfo::getConstantType (), 0); + std::vector TV; + TV.push_back (Type::UIntTy); + TV.push_back (AT); + PointerType *PT = PointerType::get (StructType::get (TV)); + + std::vector allstate; + for (Module::iterator I = M.begin (), E = M.end (); I != E; ++I) { + Function *F = I; + if (FnAllocState.find (F) == FnAllocState.end ()) { + allstate.push_back (ConstantPointerNull::get (PT)); + } else { + GlobalVariable *GV = + new GlobalVariable (FnAllocState[F]->getType (), true, + GlobalValue::InternalLinkage, FnAllocState[F], + F->getName () + ".regAllocState", &M); + // Have: { uint, [Size x { uint, uint, uint, int }] } * + // Cast it to: { uint, [0 x { uint, uint, uint, int }] } * + Constant *CE = ConstantExpr::getCast (ConstantPointerRef::get (GV), PT); + allstate.push_back (CE); + } + } + + unsigned Size = allstate.size (); + // Final structure type is: + // { uint, [Size x { uint, [0 x { uint, uint, uint, int }] } *] } + std::vector TV2; + TV2.push_back (Type::UIntTy); + ArrayType *AT2 = ArrayType::get (PT, Size); + TV2.push_back (AT2); + StructType *ST2 = StructType::get (TV2); + std::vector CV2; + CV2.push_back (ConstantUInt::get (Type::UIntTy, Size)); + CV2.push_back (ConstantArray::get (AT2, allstate)); + new GlobalVariable (ST2, true, GlobalValue::InternalLinkage, + ConstantStruct::get (ST2, CV2), "_llvm_regAllocState", + &M); + return false; // No error. +} + + //---------------------------------------------------------------------------- // The entry point to Register Allocation //---------------------------------------------------------------------------- @@ -1243,6 +1386,10 @@ // color incoming args - if the correct color was not received // insert code to copy to the correct register colorIncomingArgs(); + + // Save register allocation state for this function in a Constant. + if (SaveRegAllocState) + saveState(); // Now update the machine code with register names and add any // additional code inserted by the register allocator to the instruction Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.53 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.54 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.53 Tue Sep 23 10:13:04 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h Wed Sep 24 13:08:54 2003 @@ -29,6 +29,7 @@ class MachineInstr; class LoopInfo; class RegClass; +class Constant; //---------------------------------------------------------------------------- // Class AddedInstrns: @@ -77,6 +78,8 @@ AddedInstrns AddedInstrAtEntry; // to store instrns added at entry const LoopInfo *LoopDepthCalc; // to calculate loop depths + std::map FnAllocState; + PhyRegAlloc(const PhyRegAlloc&); // DO NOT IMPLEMENT void operator=(const PhyRegAlloc&); // DO NOT IMPLEMENT public: @@ -89,6 +92,8 @@ /// virtual bool runOnFunction (Function &F); + virtual bool doFinalization (Module &M); + virtual void getAnalysisUsage (AnalysisUsage &AU) const; const char *getPassName () const { @@ -108,6 +113,7 @@ void addInterferencesForArgs(); void createIGNodeListsAndIGs(); void buildInterferenceGraphs(); + void saveState(); void setCallInterferences(const MachineInstr *MI, const ValueSet *LVSetAft); From gaeke at cs.uiuc.edu Wed Sep 24 13:17:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Sep 24 13:17:02 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Message-ID: <200309241816.NAA23674@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.116 -> 1.117 --- Log message: Update head-of-file comment. --- Diffs of the changes: Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.116 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.117 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.116 Wed Sep 24 13:08:54 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Wed Sep 24 13:16:23 2003 @@ -1,6 +1,15 @@ //===-- PhyRegAlloc.cpp ---------------------------------------------------===// // -// Register allocation for LLVM. +// Traditional graph-coloring global register allocator currently used +// by the SPARC back-end. +// +// NOTE: This register allocator has some special support +// for the Reoptimizer, such as not saving some registers on calls to +// the first-level instrumentation function. +// +// NOTE 2: This register allocator can save its state in a global +// variable in the module it's working on. This feature is not +// thread-safe; if you have doubts, leave it turned off. // //===----------------------------------------------------------------------===// From lattner at cs.uiuc.edu Wed Sep 24 17:04:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 24 17:04:01 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp Message-ID: <200309242203.RAA10305@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: BasicBlock.cpp updated: 1.32 -> 1.33 --- Log message: Do not use BasicBlock::succ_iterator --- Diffs of the changes: Index: llvm/lib/VMCore/BasicBlock.cpp diff -u llvm/lib/VMCore/BasicBlock.cpp:1.32 llvm/lib/VMCore/BasicBlock.cpp:1.33 --- llvm/lib/VMCore/BasicBlock.cpp:1.32 Sat Aug 23 22:41:39 2003 +++ llvm/lib/VMCore/BasicBlock.cpp Wed Sep 24 17:03:22 2003 @@ -241,8 +241,7 @@ // successors. If there were PHI nodes in the successors, then they need to // know that incoming branches will be from New, not from Old. // - for (BasicBlock::succ_iterator I = succ_begin(New), E = succ_end(New); - I != E; ++I) { + for (succ_iterator I = succ_begin(New), E = succ_end(New); I != E; ++I) { // Loop over any phi nodes in the basic block, updating the BB field of // incoming values... BasicBlock *Successor = *I; From brukman at cs.uiuc.edu Wed Sep 24 17:05:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Sep 24 17:05:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Message-ID: <200309242204.RAA13100@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderWrappers.cpp updated: 1.5 -> 1.6 --- Log message: * Eliminate BytecodeBufferReader::Length member variable * Kill unused ALIN_PTRS #define * Set the error string if user passed it in to be compatible with former API --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.5 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.6 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.5 Tue Sep 23 16:19:11 2003 +++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Wed Sep 24 17:04:02 2003 @@ -76,7 +76,6 @@ class BytecodeBufferReader : public BytecodeParser { private: const unsigned char *Buffer; - int Length; bool MustDelete; BytecodeBufferReader(const BytecodeBufferReader&); // Do not implement @@ -91,26 +90,23 @@ } BytecodeBufferReader::BytecodeBufferReader(const unsigned char *Buf, - unsigned Len, + unsigned Length, const std::string &ModuleID) { // If not aligned, allocate a new buffer to hold the bytecode... const unsigned char *ParseBegin = 0; - unsigned Offset = 0; if ((intptr_t)Buf & 3) { - Length = Len+4; - Buffer = new unsigned char[Length]; - Offset = 4 - ((intptr_t)Buf & 3); // Make sure it's aligned + Buffer = new unsigned char[Length+4]; + unsigned Offset = 4 - ((intptr_t)Buf & 3); // Make sure it's aligned ParseBegin = Buffer + Offset; - memcpy((unsigned char*)ParseBegin, Buf, Len); // Copy it over + memcpy((unsigned char*)ParseBegin, Buf, Length); // Copy it over MustDelete = true; } else { // If we don't need to copy it over, just use the caller's copy ParseBegin = Buffer = Buf; - Length = Len; MustDelete = false; } - ParseBytecode(ParseBegin, Len, ModuleID); + ParseBytecode(ParseBegin, Length, ModuleID); } BytecodeBufferReader::~BytecodeBufferReader() { @@ -131,12 +127,9 @@ public: BytecodeStdinReader(); - ~BytecodeStdinReader(); }; } -#define ALIGN_PTRS 0 - BytecodeStdinReader::BytecodeStdinReader() { int BlockSize; unsigned char Buffer[4096*4]; @@ -152,24 +145,10 @@ if (FileData.empty()) throw std::string("Standard Input empty!"); -#if ALIGN_PTRS - FileBuf = (unsigned char*)mmap(0, FileData.size(), PROT_READ|PROT_WRITE, - MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); - assert((Buf != (unsigned char*)-1) && "mmap returned error!"); - memcpy(Buf, &FileData[0], FileData.size()); -#else FileBuf = &FileData[0]; -#endif - ParseBytecode(FileBuf, FileData.size(), ""); } -BytecodeStdinReader::~BytecodeStdinReader() { -#if ALIGN_PTRS - munmap((char*)FileBuf, FileData.size()); // Free mmap'd data area -#endif -} - ///////////////////////////////////////////////////////////////////////////// // // Wrapper functions @@ -195,6 +174,7 @@ M = AMP->releaseModule(); delete AMP; } catch (std::string &err) { + if (ErrorStr) ErrorStr = err; return 0; } return M; @@ -219,6 +199,7 @@ M = AMP->releaseModule(); delete AMP; } catch (std::string &err) { + if (ErrorStr) ErrorStr = err; return 0; } return M; From lattner at cs.uiuc.edu Wed Sep 24 17:07:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 24 17:07:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp InstLoops.cpp ProfilePaths.cpp RetracePath.cpp Message-ID: <200309242206.RAA15865@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation/ProfilePaths: CombineBranch.cpp updated: 1.2 -> 1.3 InstLoops.cpp updated: 1.7 -> 1.8 ProfilePaths.cpp updated: 1.32 -> 1.33 RetracePath.cpp updated: 1.4 -> 1.5 --- Log message: Do not use BasicBlock::*_iterator, just use *_iterator itself. Isn't updating copy and pasted code a joy --- Diffs of the changes: Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp:1.2 llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp:1.3 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp:1.2 Fri Sep 5 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp Wed Sep 24 17:06:25 2003 @@ -57,8 +57,7 @@ time++; d[u]=time; - for(BasicBlock::succ_iterator vl = succ_begin(u), - ve = succ_end(u); vl != ve; ++vl){ + for (succ_iterator vl = succ_begin(u), ve = succ_end(u); vl != ve; ++vl){ BasicBlock *BB = *vl; Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp:1.7 llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp:1.8 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp:1.7 Fri Sep 5 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp Wed Sep 24 17:06:25 2003 @@ -58,8 +58,7 @@ time++; d[u]=time; - for(BasicBlock::succ_iterator vl = succ_begin(u), - ve = succ_end(u); vl != ve; ++vl){ + for(succ_iterator vl = succ_begin(u), ve = succ_end(u); vl != ve; ++vl){ BasicBlock *BB = *vl; if(color[BB]!=GREY && color[BB]!=BLACK){ Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.32 llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.33 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.32 Sat Sep 20 09:38:49 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp Wed Sep 24 17:06:25 2003 @@ -98,8 +98,7 @@ Node *nd=findBB(nodes, BB); assert(nd && "No node for this edge!"); - for(BasicBlock::succ_iterator s=succ_begin(BB), se=succ_end(BB); - s!=se; ++s){ + for(succ_iterator s=succ_begin(BB), se=succ_end(BB); s!=se; ++s){ Node *nd2=findBB(nodes,*s); assert(nd2 && "No node for this edge!"); Edge ed(nd,nd2,0); Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp:1.4 llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp:1.5 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp:1.4 Wed Apr 23 11:37:41 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp Wed Sep 24 17:06:25 2003 @@ -216,8 +216,7 @@ Node *nd=findBB(nodes, BB); assert(nd && "No node for this edge!"); - for(BasicBlock::succ_iterator s=succ_begin(BB), se=succ_end(BB); - s!=se; ++s){ + for(succ_iterator s=succ_begin(BB), se=succ_end(BB); s!=se; ++s){ if(triggerBBs[*s] == 9){ //if(!pathReg[M]){ //Get the path register for this! From lattner at cs.uiuc.edu Wed Sep 24 17:08:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 24 17:08:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp Message-ID: <200309242207.RAA19835@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: EmitFunctions.cpp updated: 1.10 -> 1.11 --- Log message: Use global *_iterator --- Diffs of the changes: Index: llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp diff -u llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.10 llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.11 --- llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.10 Fri Jul 18 15:55:26 2003 +++ llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp Wed Sep 24 17:07:33 2003 @@ -27,8 +27,7 @@ char doDFS(BasicBlock * node,std::map &color){ color[node] = GREY; - for(BasicBlock::succ_iterator vl = succ_begin(node), - ve = succ_end(node); vl != ve; ++vl){ + for(succ_iterator vl = succ_begin(node), ve = succ_end(node); vl != ve; ++vl){ BasicBlock *BB = *vl; From brukman at cs.uiuc.edu Wed Sep 24 17:11:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Sep 24 17:11:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Message-ID: <200309242210.RAA22768@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderWrappers.cpp updated: 1.6 -> 1.7 --- Log message: Actually assign the string correctly through the std::string pointer. --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.6 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.7 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.6 Wed Sep 24 17:04:02 2003 +++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Wed Sep 24 17:10:47 2003 @@ -174,7 +174,7 @@ M = AMP->releaseModule(); delete AMP; } catch (std::string &err) { - if (ErrorStr) ErrorStr = err; + if (ErrorStr) *ErrorStr = err; return 0; } return M; @@ -199,7 +199,7 @@ M = AMP->releaseModule(); delete AMP; } catch (std::string &err) { - if (ErrorStr) ErrorStr = err; + if (ErrorStr) *ErrorStr = err; return 0; } return M; From criswell at cs.uiuc.edu Wed Sep 24 17:16:00 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Sep 24 17:16:00 2003 Subject: [llvm-commits] CVS: llvm/www/docs/ReleaseTasks.html Message-ID: <200309242215.RAA03348@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: ReleaseTasks.html updated: 1.9 -> 1.10 --- Log message: Removed completed items. Adjusted priorities on currently outstanding items. Added new items which I think will now have higher priority for Release 1. --- Diffs of the changes: Index: llvm/www/docs/ReleaseTasks.html diff -u llvm/www/docs/ReleaseTasks.html:1.9 llvm/www/docs/ReleaseTasks.html:1.10 --- llvm/www/docs/ReleaseTasks.html:1.9 Mon Aug 25 11:51:44 2003 +++ llvm/www/docs/ReleaseTasks.html Wed Sep 24 17:15:35 2003 @@ -3,268 +3,205 @@ LLVM Public Release Project - - -
+ +

LLVM Public Release Project

-
- +
-
- - +
+ - - - + - - - + +
+
What is this?
-
    - - This document is a list of things to do before the LLVM project is -publicly released.  It will provide a checklist so that we know -what has been done and what is left to be done.  It will also keep -a "wishlist" of desirable features. - -

    -

    - + +This document is a list of things to do before the LLVM project is +publicly released.  It will provide a checklist so that we know +what has been done and what is left to be done.  It will also keep +a "wishlist" of desirable features. +

- - - - + - - - + +
+
Priorities
-
    - The - list of things to do... -

    -

    - +The +list of things to do... +

- - - - - + + - - - + +
   High Priority +
   High Priority
-
    -
      -
        - -
      -
    • Write regression tests.
    • - +
    • Test Suite
      • -
      • The gccld segfault from GlobalDCE.cpp.
      • -
      • The infinite loop for Tail Recursion.
      • -
      • The C++ constructor on dlopen() bug on Solaris.
        -
      • - -
      -
    • Get autoconf to configure source and build directories according - to normal autoconf procedures.
    • - -
        -
      • Get test tree to work properly when configuring for a different - object root.
      • -
      • Get lex/yacc/etc output to be placed into the build tree, not - the source tree.
        -
      • - -
      -
    • Test Suite
    • - -
        -
      • Move Test Suite to QMTest.
      • -
      • Add Feature and Regression tests to nightly tester.
        -
      • +
      • Finish QMTest Integration.
        +
      • +
      +
    • Documentation
    • +
        +
      • Write documentation on the LLVM tools.
      • +
      • Expand documentation on creating an LLVM project.
      • +
      • Create a FAQ for common problems.
        +
      • +
      • Review docs, ensuring that the information is up to date.
      • +
      • Add an install doc to the source tree (web version gets +updated in main branch).
        +
      -
    • Move the Reoptimizer code out of mainline CVS and the release.
    • +
    • Improve GCC C/C++ Front End
      +
    • +
    • Licenses
    • +
        +
      • Ensure all software in source tree has proper license.
      • -
      • Documentation
      • - +
        -
      • Write documentation on the LLVM tools.
      • -
      • Review docs, ensuring that the information is up to date.
      • - -
      -
    • GCC C Front End
      -
    • -
    • Licenses
    • - -
        -
      • Ensure all software in source tree has proper license.
        -
      • - -
      - -
        -
      • Check licenses in test/Programs to ensure everything is good.
      • -
      • Create license files for anything in the distribution that is - not under our license.
        -
      • - -
      -
    • Ensure SafeCode builds.
    • -
    • Create a system for managing development and releases - (i.e. CVS branching, labeling revisions, etc).
      -
    • - +
    • Check licenses in test/Programs to ensure everything is good.
    • +
    • Create license files for anything in the distribution that is +not under our license.
      +
    • +
    +
  • Ensure SafeCode builds.
  • +
  • Ensure SPEC works.
    +
  • +
  • Create a system for managing development and releases (i.e. CVS +branching, labeling revisions, etc).
  • +
  • Move utils/Burg, utils/Tblgen, and lib/Support into support/lib +and support/tools directory.
    +
- -

-

- +

- - - - - + + - - - + +
   Medium Priority +
   Medium Priority
-
    -
      -
    • Improve documentation on how to create an LLVM project.
      +
    • Improve documentation on how to create an LLVM project.
    • -
    • Testing
    • - +
    • Create an installer for the software.
    • +
    • Test Suite
    • +
        +
      • Add Feature and Regression tests to nightly tester.
      • +
      • Develop better QMTest database method.
        +
      • +
      +
    • Write regression tests.
    • +
        +
      • The gccld segfault from GlobalDCE.cpp.
      • +
      • The infinite loop for Tail Recursion.
      • +
      • The C++ constructor on dlopen() bug on Solaris.
      • +
      +
    +
      +
    • Release Management
    • +
    +
        -
      • Cleanup Reoptimizer tests so that they fit into the framework.
        -
      • - -
      -
    • Create an installer for the -software.
    • - - +
    • Find and implement a bug reporting system (i.e. Bugzilla).
    • +
- -

-

- +

- - - - - + + - - - + +
   Low Priority +
   Low Priority
-
    -
      -
    • GCC C Front End
    • - +
    • GCC C Front End
    • +
        +
      • Place the C front end into the CVS repository.
      • +
      • Ensure that the C front end compiles and installs nicely.
      • +
      • Add C++ support.
        +
      • +
      +
    • Make the projects/sample directory an actual example of LLVM +code.
    • +
    • Testing
    • +
        +
      • Create descriptions of what each test is doing (test +specifications).
        +
      • +
      • Test LLVM on various Linux distributions.
      • +
      • Test LLVM on various Solaris versions.
      • +
      • Test LLVM on Solaris/x86.
      • +
      • Cleanup Reoptimizer tests so that they fit into the framework.
      • +
      +
    • Licenses
      • -
      • Place the C front end into the CVS repository.
      • -
      • Ensure that the C front end compiles and installs nicely.
      • -
      • Add C++ support.
        -
      • - -
      -
    • Release Management
    • - -
        -
      • Find and implement a bug reporting system (i.e. Bugzilla).
      • - -
      -
    • Make the projects/sample directory an actual example of LLVM code.
    • -
    • Testing
    • - -
        -
      • Create descriptions of what each test is doing (test specifications).
        -
      • -
      • Test LLVM on various Linux distributions.
      • -
      • Test LLVM on various Solaris distributions.
      • -
      • Test LLVM on Solaris/x86.
        -
      • - -
      -
    • Licenses
    • - -
        -
      • Create a license for the UIUC specific LLVM code.
      • -
      • Add a license file to the distribution.
      • - file. - -
      -
    • Documentation
    • - -
        -
      • Create man pages for the LLVM utilities.
      • -
      • Create man pages for the LLVM libraries.
      • - -
      -
    • Rewrite this page without Netscape Composer :)
      -
    • - +
    • Create a license for the UIUC specific LLVM code.
    • +
    • Add a license file to the distribution file.
    • +
    +
  • Documentation
  • +
      +
    • Create man pages for the LLVM utilities.
    • +
    • Create man pages for the LLVM libraries.
    • +
    +
  • Rewrite this page without Netscape Composer :)
    +
- - +
John Criswell
- - Last modified: Sat May 31 14:54:03 CDT 2003

-
-
-
-
-
-
-
+ Last +modified: Sat May 31 14:54:03 CDT 2003

+
+
+
+
+
+
+
From lattner at cs.uiuc.edu Wed Sep 24 17:19:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 24 17:19:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/LoopInfo.cpp Message-ID: <200309242218.RAA01417@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: LoopInfo.cpp updated: 1.39 -> 1.40 --- Log message: Remove explicit use of BasicBlock::succ_iterator --- Diffs of the changes: Index: llvm/lib/Analysis/LoopInfo.cpp diff -u llvm/lib/Analysis/LoopInfo.cpp:1.39 llvm/lib/Analysis/LoopInfo.cpp:1.40 --- llvm/lib/Analysis/LoopInfo.cpp:1.39 Sun Aug 17 16:47:33 2003 +++ llvm/lib/Analysis/LoopInfo.cpp Wed Sep 24 17:18:35 2003 @@ -25,7 +25,7 @@ } bool Loop::isLoopExit(const BasicBlock *BB) const { - for (BasicBlock::succ_const_iterator SI = succ_begin(BB), SE = succ_end(BB); + for (succ_const_iterator SI = succ_begin(BB), SE = succ_end(BB); SI != SE; ++SI) { if (!contains(*SI)) return true; @@ -39,7 +39,7 @@ for (std::vector::const_iterator I = Blocks.begin(), E = Blocks.end(); I != E; ++I) - for (BasicBlock::succ_iterator SI = succ_begin(*I), SE = succ_end(*I); + for (succ_iterator SI = succ_begin(*I), SE = succ_end(*I); SI != SE; ++SI) if (*SI == H) ++NumBackEdges; From lattner at cs.uiuc.edu Wed Sep 24 17:35:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 24 17:35:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Message-ID: <200309242234.RAA27291@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderWrappers.cpp updated: 1.7 -> 1.8 --- Log message: Fix alignment problem --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.7 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.8 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.7 Wed Sep 24 17:10:47 2003 +++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Wed Sep 24 17:34:17 2003 @@ -97,7 +97,7 @@ const unsigned char *ParseBegin = 0; if ((intptr_t)Buf & 3) { Buffer = new unsigned char[Length+4]; - unsigned Offset = 4 - ((intptr_t)Buf & 3); // Make sure it's aligned + unsigned Offset = 4 - ((intptr_t)Buffer & 3); // Make sure it's aligned ParseBegin = Buffer + Offset; memcpy((unsigned char*)ParseBegin, Buf, Length); // Copy it over MustDelete = true; From lattner at cs.uiuc.edu Wed Sep 24 18:44:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 24 18:44:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200309242343.SAA30804@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.64 -> 1.65 --- Log message: DOn't crash if program calls the null pointer --- Diffs of the changes: Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.64 llvm/lib/Analysis/DataStructure/Local.cpp:1.65 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.64 Sat Sep 20 16:48:16 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Wed Sep 24 18:42:58 2003 @@ -443,8 +443,14 @@ RetVal = getValueDest(*I); DSNode *Callee = 0; - if (DisableDirectCallOpt || !isa(CS.getCalledValue())) + if (DisableDirectCallOpt || !isa(CS.getCalledValue())) { Callee = getValueDest(*CS.getCalledValue()).getNode(); + if (Callee == 0) { + std::cerr << "WARNING: Program is calling through a null pointer?\n" + << *I; + return; // Calling a null pointer? + } + } std::vector Args; Args.reserve(CS.arg_end()-CS.arg_begin()); From lattner at cs.uiuc.edu Wed Sep 24 23:15:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Sep 24 23:15:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Message-ID: <200309250414.XAA03329@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderWrappers.cpp updated: 1.8 -> 1.9 --- Log message: Define the instance variable Buffer, not the automatic variable Buffer. This was causing us to munmap random stuff, which is obviously bad. --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.8 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.9 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.8 Wed Sep 24 17:34:17 2003 +++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Wed Sep 24 23:13:53 2003 @@ -38,7 +38,6 @@ public: BytecodeFileReader(const std::string &Filename); ~BytecodeFileReader(); - }; } @@ -54,8 +53,8 @@ // mmap in the file all at once... Length = StatBuf.st_size; - unsigned char *Buffer = (unsigned char*)mmap(0, Length, PROT_READ, - MAP_PRIVATE, FD, 0); + Buffer = (unsigned char*)mmap(0, Length, PROT_READ, MAP_PRIVATE, FD, 0); + if (Buffer == (unsigned char*)MAP_FAILED) throw std::string("Error mmapping file!"); From criswell at cs.uiuc.edu Thu Sep 25 08:50:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 08:50:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/ReleaseTasks.html Message-ID: <200309251349.IAA08665@tank.cs.uiuc.edu> Changes in directory llvm/www/docs: ReleaseTasks.html updated: 1.10 -> 1.11 --- Log message: Made modifications recommended by Chris. Namely: o Remove stuff that has been done or is now irrelevant. o Add a reminder to create Release Notes for Release 1. --- Diffs of the changes: Index: llvm/www/docs/ReleaseTasks.html diff -u llvm/www/docs/ReleaseTasks.html:1.10 llvm/www/docs/ReleaseTasks.html:1.11 --- llvm/www/docs/ReleaseTasks.html:1.10 Wed Sep 24 17:15:35 2003 +++ llvm/www/docs/ReleaseTasks.html Thu Sep 25 08:49:37 2003 @@ -35,7 +35,8 @@ publicly released.  It will provide a checklist so that we know what has been done and what is left to be done.  It will also keep a "wishlist" of desirable features. -

+

+

@@ -50,7 +51,8 @@
    The list of things to do... -

    +

    +

@@ -75,6 +77,8 @@
  • Documentation
    • Write documentation on the LLVM tools.
    • +
    • Create release notes.
      +
    • Expand documentation on creating an LLVM project.
    • Create a FAQ for common problems.
    • @@ -105,7 +109,8 @@ and support/tools directory.
    -

    +

    +

    @@ -122,7 +127,6 @@
    • Improve documentation on how to create an LLVM project.
    • -
    • Create an installer for the software.
    • Test Suite
      • Add Feature and Regression tests to nightly tester.
      • @@ -131,8 +135,6 @@
    • Write regression tests.
      • -
      • The gccld segfault from GlobalDCE.cpp.
      • -
      • The infinite loop for Tail Recursion.
      • The C++ constructor on dlopen() bug on Solaris.
    @@ -144,7 +146,8 @@
  • Find and implement a bug reporting system (i.e. Bugzilla).
  • -

    +

    +

    @@ -163,11 +166,8 @@
    • Place the C front end into the CVS repository.
    • Ensure that the C front end compiles and installs nicely.
    • -
    • Add C++ support.
      -
    -
  • Make the projects/sample directory an actual example of LLVM -code.
  • +
  • Create an installer for the software.
  • Testing
    • Create descriptions of what each test is doing (test @@ -176,12 +176,8 @@
    • Test LLVM on various Linux distributions.
    • Test LLVM on various Solaris versions.
    • Test LLVM on Solaris/x86.
    • -
    • Cleanup Reoptimizer tests so that they fit into the framework.
    -
  • Licenses
    • -
    • Create a license for the UIUC specific LLVM code.
    • -
    • Add a license file to the distribution file.
  • Documentation
    • From criswell at cs.uiuc.edu Thu Sep 25 12:51:04 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 12:51:04 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/expectations.qmr Message-ID: <200309251741.MAA23449@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB: expectations.qmr updated: 1.1 -> 1.2 --- Log message: Marked all failing tests as expected failures. --- Diffs of the changes: Index: llvm/test/QMTestDB/expectations.qmr diff -u llvm/test/QMTestDB/expectations.qmr:1.1 llvm/test/QMTestDB/expectations.qmr:1.2 --- llvm/test/QMTestDB/expectations.qmr:1.1 Wed Aug 20 17:34:52 2003 +++ llvm/test/QMTestDB/expectations.qmr Thu Sep 25 12:41:32 2003 @@ -1,6 +1,6 @@ (cqm.test.result Result -qoq}q(U _Result__kindqUtestqU_Result__outcomeqUFAILqU_Result__annotationsq}U _Result__idq U®ression.analysis.dsgraphs.mustaliasq +qoq}q(U _Result__kindqUtestqU_Result__outcomeqUFAILqU_Result__annotationsq}U _Result__idq U1regression.transforms.correlatedexprs.nullpointerq U_Result__contextq (cqm.test.context Context -q o}q (U_Context__propertiesq}U_Context__temporariesq}ubub.(hoq}q(hhhUFAILqh}h U+regression.analysis.dsgraphs.incompletenodeqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U(hhhUFAIL! q?h}h U/regression.linker.2003-06-02-typeresolveproblemq at h (h o}qA(h}h}ubub.(hoqB}qC(hhhUFAILqDh}h U6regression.analysis.loopinfo.2003-05-15-nestingproblemqEh (h o}qF(h}h}ubub.(hoqG}qH(hhhUFAILqIh}h U.regression.transforms.adce.2002-07-29-segfaultqJh (h o}qK(h}h}ubub.(hoqL}qM(hhhUFAILqNh}h U®ression.analysis.dsgraphs.mustaliasqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhUFAILqSh}h U/regression.cbackend.2002-08-26-indirectcalltestqTh (h o}qU(h}h}ubub.(hoqV}qW(hhhUFAILqXh}h Ufeature.mc-code.constexprqYh (h o}qZ(h}h}ubub.(hoq[}q\(hhhUFAILq]h}h U=regression.transforms.correlatedexprs.2002-10-03-phipropogateq^h (h o}q_(h}h}ubub.(hoq`}qa(hhhUFAILqbh}h U7regression.transforms.levelraise.2002-05-02-missedraiseqch (h o}qd(h}h}ubub.(hoqe}qf(hhhUFAILqgh}h Uregression.transforms.levelraise.2002-05-02-badcasteliminationq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U6regression.assembler.2002-07-08-hugeperformanceproblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U:regression.cfrontend.2003-06-29-multiplefunctiondefinitionq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U6regression.transforms.levelraise.2002-02-11-arrayshapeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Umc-code.calltestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U=regression.transforms.level! raise.2002-07-18-missedallocaraiseq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Ufeature.asm.constexprq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U4regression.assembler.2003-06-30-recursivetypeproblemq?h (h o}q?(h}h}ubub. \ No newline at end of file From criswell at cs.uiuc.edu Thu Sep 25 12:51:10 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 12:51:10 2003 Subject: [llvm-commits] CVS: llvm/test/Feature/weirdnames.ll wierdnames.ll Message-ID: <200309251744.MAA23492@choi.cs.uiuc.edu> Changes in directory llvm/test/Feature: weirdnames.ll added (r1.1) wierdnames.ll (r1.1) removed --- Log message: Moved wierdnames.ll to weirdnames.ll. The new name is spelled correctly. --- Diffs of the changes: Index: llvm/test/Feature/weirdnames.ll diff -c /dev/null llvm/test/Feature/weirdnames.ll:1.1 *** /dev/null Thu Sep 25 12:44:42 2003 --- llvm/test/Feature/weirdnames.ll Thu Sep 25 12:44:32 2003 *************** *** 0 **** --- 1,5 ---- + ; Test using double quotes to form names that are not legal in the % form + + "&^ " = type { int } + "%.*+ foo" = global "&^ " { int 5 } + "0" = global float 0.0 ; This CANNOT be %0 From criswell at cs.uiuc.edu Thu Sep 25 12:51:21 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 12:51:21 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/feature.qms/asm.qms/weirdnames.qmt Message-ID: <200309251746.MAA24304@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/feature.qms/asm.qms: weirdnames.qmt added (r1.1) --- Log message: Adding the new weirdnames feature test. --- Diffs of the changes: Index: llvm/test/QMTestDB/feature.qms/asm.qms/weirdnames.qmt diff -c /dev/null llvm/test/QMTestDB/feature.qms/asm.qms/weirdnames.qmt:1.1 *** /dev/null Thu Sep 25 12:46:09 2003 --- llvm/test/QMTestDB/feature.qms/asm.qms/weirdnames.qmt Thu Sep 25 12:45:59 2003 *************** *** 0 **** --- 1,2 ---- + + .*bc.feature.weirdnamesweirdnames.bc From criswell at cs.uiuc.edu Thu Sep 25 12:51:24 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 12:51:24 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/feature.qms/asmdis.qms/weirdnames.qmt Message-ID: <200309251746.MAA24313@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/feature.qms/asmdis.qms: weirdnames.qmt added (r1.1) --- Log message: Adding the new weirdnames feature test. --- Diffs of the changes: Index: llvm/test/QMTestDB/feature.qms/asmdis.qms/weirdnames.qmt diff -c /dev/null llvm/test/QMTestDB/feature.qms/asmdis.qms/weirdnames.qmt:1.1 *** /dev/null Thu Sep 25 12:46:10 2003 --- llvm/test/QMTestDB/feature.qms/asmdis.qms/weirdnames.qmt Thu Sep 25 12:46:00 2003 *************** *** 0 **** --- 1,2 ---- + + weirdnames.ll.* From criswell at cs.uiuc.edu Thu Sep 25 12:51:28 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 12:51:28 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/feature.qms/c-code.qms/weirdnames.qmt Message-ID: <200309251746.MAA24320@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/feature.qms/c-code.qms: weirdnames.qmt added (r1.1) --- Log message: Adding the new weirdnames feature test. --- Diffs of the changes: Index: llvm/test/QMTestDB/feature.qms/c-code.qms/weirdnames.qmt diff -c /dev/null llvm/test/QMTestDB/feature.qms/c-code.qms/weirdnames.qmt:1.1 *** /dev/null Thu Sep 25 12:46:11 2003 --- llvm/test/QMTestDB/feature.qms/c-code.qms/weirdnames.qmt Thu Sep 25 12:46:01 2003 *************** *** 0 **** --- 1,2 ---- + + .*bc.feature.weirdnamesweirdnames.bc From criswell at cs.uiuc.edu Thu Sep 25 12:51:31 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 12:51:31 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/feature.qms/mc-code.qms/weirdnames.qmt Message-ID: <200309251746.MAA24327@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/feature.qms/mc-code.qms: weirdnames.qmt added (r1.1) --- Log message: Adding the new weirdnames feature test. --- Diffs of the changes: Index: llvm/test/QMTestDB/feature.qms/mc-code.qms/weirdnames.qmt diff -c /dev/null llvm/test/QMTestDB/feature.qms/mc-code.qms/weirdnames.qmt:1.1 *** /dev/null Thu Sep 25 12:46:12 2003 --- llvm/test/QMTestDB/feature.qms/mc-code.qms/weirdnames.qmt Thu Sep 25 12:46:02 2003 *************** *** 0 **** --- 1,2 ---- + + .*bc.feature.weirdnamesweirdnames.bc From criswell at cs.uiuc.edu Thu Sep 25 12:51:35 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 12:51:35 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/feature.qms/opt.qms/weirdnames.qmt Message-ID: <200309251746.MAA24334@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/feature.qms/opt.qms: weirdnames.qmt added (r1.1) --- Log message: Adding the new weirdnames feature test. --- Diffs of the changes: Index: llvm/test/QMTestDB/feature.qms/opt.qms/weirdnames.qmt diff -c /dev/null llvm/test/QMTestDB/feature.qms/opt.qms/weirdnames.qmt:1.1 *** /dev/null Thu Sep 25 12:46:14 2003 --- llvm/test/QMTestDB/feature.qms/opt.qms/weirdnames.qmt Thu Sep 25 12:46:04 2003 *************** *** 0 **** --- 1,2 ---- + + test/Feature/weirdnames.ll.* From criswell at cs.uiuc.edu Thu Sep 25 12:51:38 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 12:51:38 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/bc.qms/feature.qms/weirdnames.qma Message-ID: <200309251746.MAA24375@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/bc.qms/feature.qms: weirdnames.qma added (r1.1) --- Log message: Added a new bytecode resource for the new weirdnames feature test. --- Diffs of the changes: Index: llvm/test/QMTestDB/bc.qms/feature.qms/weirdnames.qma diff -c /dev/null llvm/test/QMTestDB/bc.qms/feature.qms/weirdnames.qma:1.1 *** /dev/null Thu Sep 25 12:46:24 2003 --- llvm/test/QMTestDB/bc.qms/feature.qms/weirdnames.qma Thu Sep 25 12:45:44 2003 *************** *** 0 **** --- 1,2 ---- + + weirdnames.bctest/Feature/weirdnames.ll From criswell at cs.uiuc.edu Thu Sep 25 12:59:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 12:59:02 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/expectations.qmr Message-ID: <200309251758.MAA02321@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB: expectations.qmr updated: 1.2 -> 1.3 --- Log message: Changed three tests which failed for a long time to pass now that they have been fixed. --- Diffs of the changes: Index: llvm/test/QMTestDB/expectations.qmr diff -u llvm/test/QMTestDB/expectations.qmr:1.2 llvm/test/QMTestDB/expectations.qmr:1.3 --- llvm/test/QMTestDB/expectations.qmr:1.2 Thu Sep 25 12:41:32 2003 +++ llvm/test/QMTestDB/expectations.qmr Thu Sep 25 12:57:52 2003 @@ -3,4 +3,4 @@ qoq}q(U _Result__kindqUtestqU_Result__outcomeqUFAILqU_Result__annotationsq}U _Result__idq U1regression.transforms.correlatedexprs.nullpointerq U_Result__contextq (cqm.test.context Context -q o}q (U_Context__propertiesq}U_Context__temporariesq}ubub.(hoq}q(hhhUFAILqh}h U*regression.transforms.correlatedexprs.whetqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U+regression.analysis.dsgraphs.incompletenodeqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U*regression.transforms.instcombine.cast-setqh (h o}q(h}h}ubub.(hoq}q (hhhUFAILq!h}h U%regression.transforms.instcombine.powq"h (h o}q#(h}h}ubub.(hoq$}q%(hhhUFAILq&h}h U,regression.transforms.mem2reg.differingtypesq'h (h o}q((h}h}ubub.(hoq)}q*(hhhUFAILq+h}h U.regression.transforms.correlatedexprs.looptestq,h (h o}q-(h}h}ubub.(hoq.}q/(hhhUFAILq0h}h U5regression.assembler.2003-04-15-constantinitassertionq1h (h o}q2(h}h}ubub.(hoq3}q4(hhhUFAILq5h}h U7regression.transforms.levelraise.2002-05-23-missedraiseq6h (h o}q7(h}h}ubub.(hoq8}q9(hhhUFAILq:h}h U7regression.transforms.levelraise.2002-04-16-missedraiseq;h (h o}q<(h}h}ubub.(hoq=}q>(hhhUFAIL! q?h}h U/regression.linker.2003-06-02-typeresolveproblemq at h (h o}qA(h}h}ubub.(hoqB}qC(hhhUFAILqDh}h U6regression.analysis.loopinfo.2003-05-15-nestingproblemqEh (h o}qF(h}h}ubub.(hoqG}qH(hhhUFAILqIh}h U.regression.transforms.adce.2002-07-29-segfaultqJh (h o}qK(h}h}ubub.(hoqL}qM(hhhUFAILqNh}h U®ression.analysis.dsgraphs.mustaliasqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhUFAILqSh}h U/regression.cbackend.2002-08-26-indirectcalltestqTh (h o}qU(h}h}ubub.(hoqV}qW(hhhUFAILqXh}h Ufeature.mc-code.constexprqYh (h o}qZ(h}h}ubub.(hoq[}q\(hhhUFAILq]h}h U=regression.transforms.correlatedexprs.2002-10-03-phipropogateq^h (h o}q_(h}h}ubub.(hoq`}qa(hhhUFAILqbh}h U7regression.transforms.levelraise.2002-05-02-missedraiseqch (h o}qd(h}h}ubub.(hoqe}qf(hhhUFAILqgh}h Uregression.transforms.levelraise.2002-05-02-badcasteliminationq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U6regression.assembler.2002-07-08-hugeperformanceproblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U:regression.cfrontend.2003-06-29-multiplefunctiondefinitionq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U6regression.transforms.levelraise.2002-02-11-arrayshapeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Umc-code.calltestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U=regression.transforms.level! raise.2002-07-18-missedallocaraiseq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Ufeature.asm.constexprq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U4regression.assembler.2003-06-30-recursivetypeproblemq?h (h o}q?(h}h}ubub. \ No newline at end of file +q o}q (U_Context__propertiesq}U_Context__temporariesq}ubub.(hoq}q(hhhUFAILqh}h U*regression.transforms.correlatedexprs.whetqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U+regression.analysis.dsgraphs.incompletenodeqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U%regression.transforms.instcombine.powqh (h o}q(h}h}ubub.(hoq}q (hhhUFAILq!h}h U,regression.transforms.mem2reg.differingtypesq"h (h o}q#(h}h}ubub.(hoq$}q%(hhhUFAILq&h}h U.regression.transforms.correlatedexprs.looptestq'h (h o}q((h}h}ubub.(hoq)}q*(hhhUFAILq+h}h U5regression.assembler.2003-04-15-constantinitassertionq,h (h o}q-(h}h}ubub.(hoq.}q/(hhhUFAILq0h}h U7regression.transforms.levelraise.2002-05-02-missedraiseq1h (h o}q2(h}h}ubub.(hoq3}q4(hhhUFAILq5h}h U/regression.linker.2003-06-02-typeresolveproblemq6h (h o}q7(h}h}ubub.(hoq8}q9(hhhUFAILq:h}h U7regression.transforms.levelraise.2002-05-23-missedraiseq;h (h o}q<(h}h}ubub.(hoq=}q>(hhhU! FAILq?h}h U.regression.transforms.adce.2002-07-29-segfaultq at h (h o}qA(h}h}ubub.(hoqB}qC(hhhUFAILqDh}h U®ression.analysis.dsgraphs.mustaliasqEh (h o}qF(h}h}ubub.(hoqG}qH(hhhUFAILqIh}h U/regression.cbackend.2002-08-26-indirectcalltestqJh (h o}qK(h}h}ubub.(hoqL}qM(hhhUFAILqNh}h Ufeature.mc-code.constexprqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhUFAILqSh}h U=regression.transforms.correlatedexprs.2002-10-03-phipropogateqTh (h o}qU(h}h}ubub.(hoqV}qW(hhhUFAILqXh}h Uregression.transforms.levelraise.2002-05-02-badcasteliminationq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUPASSq?h}h U4regression.assembler.2003-06-30-recursivetypeproblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U:regression.cfrontend.2003-06-29-multiplefunctiondefinitionq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U6regression.transforms.levelraise.2002-02-11-arrayshapeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U7regression.transforms.levelraise.2002-04-16-missedraiseq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Umc-code.calltestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U=regression.transf! orms.levelraise.2002-07-18-missedallocaraiseq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Ufeature.asm.constexprq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U*regression.transforms.instcombine.cast-setq?h (h o}q?(h}h}ubub. \ No newline at end of file From brukman at cs.uiuc.edu Thu Sep 25 13:11:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Sep 25 13:11:02 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/lli.cpp Message-ID: <200309251810.NAA18824@zion.cs.uiuc.edu> Changes in directory llvm/tools/lli: lli.cpp updated: 1.28 -> 1.29 --- Log message: To be consistent with the rest of LLVM codebase (and the rest of this file): * Changed tabs to spaces * Removed a space between a function call and its arguments (...) --- Diffs of the changes: Index: llvm/tools/lli/lli.cpp diff -u llvm/tools/lli/lli.cpp:1.28 llvm/tools/lli/lli.cpp:1.29 --- llvm/tools/lli/lli.cpp:1.28 Fri Sep 5 15:08:15 2003 +++ llvm/tools/lli/lli.cpp Thu Sep 25 13:10:34 2003 @@ -27,25 +27,25 @@ InputArgv(cl::ConsumeAfter, cl::desc("...")); cl::opt - MainFunction ("f", cl::desc("Function to execute"), cl::init("main"), - cl::value_desc("function name")); + MainFunction("f", cl::desc("Function to execute"), cl::init("main"), + cl::value_desc("function name")); cl::opt TraceMode("trace", cl::desc("Enable Tracing")); cl::opt ForceInterpreter("force-interpreter", - cl::desc("Force interpretation: disable JIT"), - cl::init(false)); + cl::desc("Force interpretation: disable JIT"), + cl::init(false)); } -static std::vector makeStringVector (const char **envp) { +static std::vector makeStringVector(const char **envp) { std::vector rv; for (unsigned i = 0; envp[i]; ++i) - rv.push_back (envp[i]); + rv.push_back(envp[i]); return rv; } static void *CreateArgv(ExecutionEngine *EE, - const std::vector &InputArgv) { + const std::vector &InputArgv) { if (EE->getTargetData().getPointerSize() == 8) { // 64 bit target? PointerTy *Result = new PointerTy[InputArgv.size()+1]; DEBUG(std::cerr << "ARGV = " << (void*)Result << "\n"); @@ -60,7 +60,7 @@ // Endian safe: Result[i] = (PointerTy)Dest; EE->StoreValueToMemory(PTOGV(Dest), (GenericValue*)(Result+i), - Type::LongTy); + Type::LongTy); } Result[InputArgv.size()] = 0; return Result; @@ -78,7 +78,7 @@ // Endian safe: Result[i] = (PointerTy)Dest; EE->StoreValueToMemory(PTOGV(Dest), (GenericValue*)(Result+i), - Type::IntTy); + Type::IntTy); } Result[InputArgv.size()] = 0; // null terminate it return Result; @@ -92,21 +92,21 @@ /// from calling FnName, or -1 and prints an error msg. if the named /// function cannot be found. /// -int callAsMain (ExecutionEngine *EE, Module *M, const std::string &FnName, - const std::vector &Args, - const std::vector &EnvVars) { - Function *Fn = M->getNamedFunction (FnName); +int callAsMain(ExecutionEngine *EE, Module *M, const std::string &FnName, + const std::vector &Args, + const std::vector &EnvVars) { + Function *Fn = M->getNamedFunction(FnName); if (!Fn) { std::cerr << "Function '" << FnName << "' not found in module.\n"; return -1; } std::vector GVArgs; GenericValue GVArgc; - GVArgc.IntVal = Args.size (); - GVArgs.push_back (GVArgc); // Arg #0 = argc. - GVArgs.push_back (PTOGV (CreateArgv (EE, Args))); // Arg #1 = argv. - GVArgs.push_back (PTOGV (CreateArgv (EE, EnvVars))); // Arg #2 = envp. - return EE->run (Fn, GVArgs).IntVal; + GVArgc.IntVal = Args.size(); + GVArgs.push_back(GVArgc); // Arg #0 = argc. + GVArgs.push_back(PTOGV(CreateArgv(EE, Args))); // Arg #1 = argv. + GVArgs.push_back(PTOGV(CreateArgv(EE, EnvVars))); // Arg #2 = envp. + return EE->run(Fn, GVArgs).IntVal; } //===----------------------------------------------------------------------===// @@ -114,7 +114,7 @@ // int main(int argc, char **argv, const char **envp) { cl::ParseCommandLineOptions(argc, argv, - " llvm interpreter & dynamic compiler\n"); + " llvm interpreter & dynamic compiler\n"); // Load the bytecode... std::string ErrorMsg; @@ -126,22 +126,22 @@ } ExecutionEngine *EE = - ExecutionEngine::create (M, ForceInterpreter, TraceMode); - assert (EE && "Couldn't create an ExecutionEngine, not even an interpreter?"); + ExecutionEngine::create(M, ForceInterpreter, TraceMode); + assert(EE && "Couldn't create an ExecutionEngine, not even an interpreter?"); // Add the module's name to the start of the vector of arguments to main(). // But delete .bc first, since programs (and users) might not expect to // see it. - const std::string ByteCodeFileSuffix (".bc"); - if (InputFile.rfind (ByteCodeFileSuffix) == - InputFile.length () - ByteCodeFileSuffix.length ()) { - InputFile.erase (InputFile.length () - ByteCodeFileSuffix.length ()); + const std::string ByteCodeFileSuffix(".bc"); + if (InputFile.rfind(ByteCodeFileSuffix) == + InputFile.length() - ByteCodeFileSuffix.length()) { + InputFile.erase(InputFile.length() - ByteCodeFileSuffix.length()); } InputArgv.insert(InputArgv.begin(), InputFile); // Run the main function! - int ExitCode = callAsMain (EE, M, MainFunction, InputArgv, - makeStringVector (envp)); + int ExitCode = callAsMain(EE, M, MainFunction, InputArgv, + makeStringVector(envp)); // Now that we are done executing the program, shut down the execution engine delete EE; From criswell at cs.uiuc.edu Thu Sep 25 14:11:04 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 14:11:04 2003 Subject: [llvm-commits] CVS: llvm/www/docs/CommandGuide/gccld.html Message-ID: <200309251910.OAA04126@choi.cs.uiuc.edu> Changes in directory llvm/www/docs/CommandGuide: gccld.html updated: 1.2 -> 1.3 --- Log message: Added information about the new -native option. Added information about how object files and libraries are found and loaded. --- Diffs of the changes: Index: llvm/www/docs/CommandGuide/gccld.html diff -u llvm/www/docs/CommandGuide/gccld.html:1.2 llvm/www/docs/CommandGuide/gccld.html:1.3 --- llvm/www/docs/CommandGuide/gccld.html:1.2 Thu Sep 11 15:23:51 2003 +++ llvm/www/docs/CommandGuide/gccld.html Thu Sep 25 14:10:25 2003 @@ -20,19 +20,61 @@ SYNOPSIS -gccld [options] < filename> +gccld [options] < filename> [ filename ...]

      DESCRIPTION

      -The gccld utility takes a set of LLVM bytecode files GCC and links them -together into a single LLVM bytecode file. It will link in any LLVM bytecode -libraries that are necessary to make a single LLVM "bytecode executable." +The gccld utility takes a set of LLVM bytecode files and links them together +into a single LLVM bytecode file. The output bytecode file can be another +bytecode library or an executable bytecode program. Using additional options, +gccld is able to produce native code executables.

      The gccld utility is primarily used by the GCC front end, and as such, attempts to mimic the interface provided by the default system linker so that it can act as a "drop-in" replacement. +

      +Search Order +

      +When looking for objects specified on the command line, gccld will search for +the object first in the current directory and then in the directory specified +by LLVM_LIB_SEARCH_PATH. If it cannot find the object, it fails. +

      +When looking for a library specified with the -l option, gccld first attempts +to load a file with that name from the current directory. If that fails, it +looks for lib<library>.bc, lib<library>.a, or +lib<library>.so, in that order, in each directory added to the library +search path with the -L option. These directories are searched in order they +were specified. If the library cannot be located, then gccld looks in the +directory specified by the LLVM_LIB_SEARCH_PATH environment variable. If it +does not find lib<library>.[bc | a | so] there, it fails. + +The -L option is global. It does not matter where it is specified in the list +of command line arguments; the directory is simply added to the search path and +is applied to all libraries, preceding or succeeding, in the command line. + +

      +Link order +

      +All object files are linked first in the order they were specified on the +command line. All library files are linked next. Some libraries may not be +linked into the object program; see below. + +

      +Library Linkage +

      +Object files and static bytecode objects are always linked into the output +file. Library archives (.a files) load only the objects within the archive +that define symbols needed by the output file. Hence, libraries should be +listed after the object files and libraries which need them; otherwise, the +library may not be linked in, and the dependent library will not have its +undefined symbols defined. + +

      +Native code generation +

      +The gccld program has limited support for native code generation.

      OPTIONS

      @@ -45,7 +87,7 @@
    • -o <filename>
      - Specify the output filename which will hold the assembled bytecode. + Specify the output filename which will hold the linked bytecode.

    • -stats @@ -85,9 +127,12 @@ Preserve the symbol names in list.

      -

    • -l=<library prefix> +
    • -l=<library>
      - Specify libraries to link to + Specify libraries to include when linking the output file. When linking, + gccld will first attempt to load a file with the pathname library. If that + fails, it will then attempt to load lib<library>.bc, + lib<library>.a, and lib<library>.so, in that order.

    • -link-as-library @@ -95,6 +140,11 @@ Link the .bc files together as a library, not an executable.

      +

    • -native +
      + Generate a native, machine code executable. +

      +

    • -s
      Strip symbol information from the generated executable. @@ -115,7 +165,13 @@

      SEE ALSO

      -llvm-dis +gccas + +

      +BUGS +

      +The -L option cannot be used for find native code libraries when using the +-native option.
      LLVM Team From criswell at cs.uiuc.edu Thu Sep 25 14:16:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 14:16:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/CommandGuide/gccld.html Message-ID: <200309251915.OAA12337@tank.cs.uiuc.edu> Changes in directory llvm/www/docs/CommandGuide: gccld.html updated: 1.3 -> 1.4 --- Log message: Added an explanation of gccld's behavior when linking in native mode. Also gives me an excuse to re-commit the file on Tank. --- Diffs of the changes: Index: llvm/www/docs/CommandGuide/gccld.html diff -u llvm/www/docs/CommandGuide/gccld.html:1.3 llvm/www/docs/CommandGuide/gccld.html:1.4 --- llvm/www/docs/CommandGuide/gccld.html:1.3 Thu Sep 25 14:10:25 2003 +++ llvm/www/docs/CommandGuide/gccld.html Thu Sep 25 14:14:51 2003 @@ -143,6 +143,14 @@
    • -native
      Generate a native, machine code executable. +

      + When generating native executables, gccld first checks for a bytecode version + of the library and links it in, if necessary. If the library is missing, + gccld skips it. Then, gccld links in the same libraries as native code. +

      + In this way, gccld should be able to link in optimized bytecode subsets of + common libraries and then link in any part of the library that hasn't been + converted to bytecode.

    • -s From lattner at cs.uiuc.edu Thu Sep 25 14:51:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Sep 25 14:51:01 2003 Subject: [llvm-commits] CVS: llvm/www/docs/CommandGuide/analyze.html extract.html gccas.html gccld.html llc.html lli.html llvmas.html llvmdis.html llvmlink.html opt.html Message-ID: <200309251950.OAA12522@tank.cs.uiuc.edu> Changes in directory llvm/www/docs/CommandGuide: analyze.html updated: 1.4 -> 1.5 extract.html updated: 1.1 -> 1.2 gccas.html updated: 1.2 -> 1.3 gccld.html updated: 1.4 -> 1.5 llc.html updated: 1.1 -> 1.2 lli.html updated: 1.2 -> 1.3 llvmas.html updated: 1.2 -> 1.3 llvmdis.html updated: 1.2 -> 1.3 llvmlink.html updated: 1.1 -> 1.2 opt.html updated: 1.2 -> 1.3 --- Log message: Change the heading of the page to reflect the tool name --- Diffs of the changes: Index: llvm/www/docs/CommandGuide/analyze.html diff -u llvm/www/docs/CommandGuide/analyze.html:1.4 llvm/www/docs/CommandGuide/analyze.html:1.5 --- llvm/www/docs/CommandGuide/analyze.html:1.4 Wed Sep 17 10:00:45 2003 +++ llvm/www/docs/CommandGuide/analyze.html Thu Sep 25 14:50:04 2003 @@ -1,12 +1,12 @@ -analyze +LLVM: analyze tool
      -

      Low Level Virtual Machine

      +

      LLVM: analyze tool


      Index: llvm/www/docs/CommandGuide/extract.html diff -u llvm/www/docs/CommandGuide/extract.html:1.1 llvm/www/docs/CommandGuide/extract.html:1.2 --- llvm/www/docs/CommandGuide/extract.html:1.1 Wed Sep 17 09:11:24 2003 +++ llvm/www/docs/CommandGuide/extract.html Thu Sep 25 14:50:04 2003 @@ -1,12 +1,12 @@ -extract +LLVM: extract tool
      -

      Low Level Virtual Machine

      +

      LLVM: extract tool


      Index: llvm/www/docs/CommandGuide/gccas.html diff -u llvm/www/docs/CommandGuide/gccas.html:1.2 llvm/www/docs/CommandGuide/gccas.html:1.3 --- llvm/www/docs/CommandGuide/gccas.html:1.2 Thu Sep 11 15:23:51 2003 +++ llvm/www/docs/CommandGuide/gccas.html Thu Sep 25 14:50:04 2003 @@ -1,12 +1,12 @@ -gccas +LLVM: gccas tool
      -

      Low Level Virtual Machine

      +

      LLVM: gccas tool


      Index: llvm/www/docs/CommandGuide/gccld.html diff -u llvm/www/docs/CommandGuide/gccld.html:1.4 llvm/www/docs/CommandGuide/gccld.html:1.5 --- llvm/www/docs/CommandGuide/gccld.html:1.4 Thu Sep 25 14:14:51 2003 +++ llvm/www/docs/CommandGuide/gccld.html Thu Sep 25 14:50:04 2003 @@ -1,12 +1,12 @@ -gccld +LLVM: gccld tool
      -

      Low Level Virtual Machine

      +

      LLVM: gccld tool


      Index: llvm/www/docs/CommandGuide/llc.html diff -u llvm/www/docs/CommandGuide/llc.html:1.1 llvm/www/docs/CommandGuide/llc.html:1.2 --- llvm/www/docs/CommandGuide/llc.html:1.1 Fri Sep 12 10:46:24 2003 +++ llvm/www/docs/CommandGuide/llc.html Thu Sep 25 14:50:04 2003 @@ -1,12 +1,12 @@ -llc +LLVM: llc tool
      -

      Low Level Virtual Machine

      +

      LLVM: llc tool


      Index: llvm/www/docs/CommandGuide/lli.html diff -u llvm/www/docs/CommandGuide/lli.html:1.2 llvm/www/docs/CommandGuide/lli.html:1.3 --- llvm/www/docs/CommandGuide/lli.html:1.2 Thu Sep 11 15:23:51 2003 +++ llvm/www/docs/CommandGuide/lli.html Thu Sep 25 14:50:04 2003 @@ -1,12 +1,12 @@ -lli +LLVM: lli tool
      -

      Low Level Virtual Machine

      +

      LLVM: lli tool


      Index: llvm/www/docs/CommandGuide/llvmas.html diff -u llvm/www/docs/CommandGuide/llvmas.html:1.2 llvm/www/docs/CommandGuide/llvmas.html:1.3 --- llvm/www/docs/CommandGuide/llvmas.html:1.2 Thu Sep 11 15:23:51 2003 +++ llvm/www/docs/CommandGuide/llvmas.html Thu Sep 25 14:50:04 2003 @@ -1,12 +1,12 @@ -llvm-as +LLVM: llvm-as tool
      -

      Low Level Virtual Machine

      +

      LLVM: llvm-as tool


      Index: llvm/www/docs/CommandGuide/llvmdis.html diff -u llvm/www/docs/CommandGuide/llvmdis.html:1.2 llvm/www/docs/CommandGuide/llvmdis.html:1.3 --- llvm/www/docs/CommandGuide/llvmdis.html:1.2 Thu Sep 11 15:23:52 2003 +++ llvm/www/docs/CommandGuide/llvmdis.html Thu Sep 25 14:50:04 2003 @@ -1,12 +1,12 @@ -llvm-dis +LLVM: llvm-dis tool
      -

      Low Level Virtual Machine

      +

      LLVM: llvm-dis tool


      Index: llvm/www/docs/CommandGuide/llvmlink.html diff -u llvm/www/docs/CommandGuide/llvmlink.html:1.1 llvm/www/docs/CommandGuide/llvmlink.html:1.2 --- llvm/www/docs/CommandGuide/llvmlink.html:1.1 Wed Sep 17 09:11:24 2003 +++ llvm/www/docs/CommandGuide/llvmlink.html Thu Sep 25 14:50:05 2003 @@ -1,12 +1,12 @@ -llvm-link +LLVM: llvm-link tool
      -

      Low Level Virtual Machine

      +

      LLVM: llvm-link tool


      Index: llvm/www/docs/CommandGuide/opt.html diff -u llvm/www/docs/CommandGuide/opt.html:1.2 llvm/www/docs/CommandGuide/opt.html:1.3 --- llvm/www/docs/CommandGuide/opt.html:1.2 Thu Sep 11 15:23:52 2003 +++ llvm/www/docs/CommandGuide/opt.html Thu Sep 25 14:50:05 2003 @@ -1,12 +1,12 @@ -opt +LLVM: opt tool
      -

      Low Level Virtual Machine

      +

      LLVM: opt tool


      From criswell at cs.uiuc.edu Thu Sep 25 19:54:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 19:54:02 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/QMTest/llvm.py Message-ID: <200309260053.TAA02260@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/QMTest: llvm.py updated: 1.7 -> 1.8 --- Log message: Added the ExecProgram() function, which better handles the creation of child processes to run LLVM programs. Modified the assembler/disassembler tests to use the new ExecProgram() function and to create output files in the temporary directory. --- Diffs of the changes: Index: llvm/test/QMTestDB/QMTest/llvm.py diff -u llvm/test/QMTestDB/QMTest/llvm.py:1.7 llvm/test/QMTestDB/QMTest/llvm.py:1.8 --- llvm/test/QMTestDB/QMTest/llvm.py:1.7 Tue Sep 16 09:57:49 2003 +++ llvm/test/QMTestDB/QMTest/llvm.py Thu Sep 25 19:52:59 2003 @@ -17,6 +17,61 @@ import filecmp import resource +# +# Function: ExecProgram () +# +# Description: +# Execute the specified program with the specified environment. +# +# Inputs: +# args - An array of arguments to the program. +# env - The environment passed to the new program. +# +# Outputs: +# None. +# +# Return value: +# 0 - The program executed successfully. +# 1 - The program failed. +# +def ExecProgram (args, env = os.environ): + + # + # Create a pipe to the new program. + # + (parent_in, child_out) = os.pipe () + + # + # Create a new child process. + # + child = os.fork() + if (child == 0): + # + # Construct new stdout, and stderr. + # + os.dup2 (1, child_out); + os.dup2 (2, child_out); + + # + # Execute the specified program. + # + os.execvpe (args[0], args, env) + + # + # Exit with failure if the exec failed for any reason. + # + os._exit (1) + + # + # Parent process. + # + + # + # Wait for the child process to exit. + # + (pid, status) = os.waitpid (child, 0) + return ((os.WIFEXITED(status)) and (os.WEXITSTATUS(status) != 0)) + ############################################################################## # # Class: AssembleTest @@ -598,37 +653,41 @@ input=testdir + '/' + self.assembly_file # + # Construct output filenames. + # + bc1 = context['tmpdir'] + '/bc.1' + bc2 = context['tmpdir'] + '/bc.2' + ll1 = context['tmpdir'] + '/ll.1' + ll2 = context['tmpdir'] + '/ll.2' + + # # Assemble the file. # - exit_status = os.spawnl (os.P_WAIT, as, as, input, '-f', '-o=bc.1') - if exit_status != 0: - result.Fail() + if (ExecProgram ((as, input, '-f', '-o', bc1))): + result.Fail () # # Disassemble the output. # - exit_status = os.spawnl (os.P_WAIT, dis, dis, 'bc.1', '-f', '-o=ll.1') - if exit_status != 0: + if (ExecProgram ((dis, bc1, '-f', '-o', ll1))): result.Fail() # # Assemble the program again. # - exit_status = os.spawnl (os.P_WAIT, as, as, 'll.1', '-f', '-o=bc.2') - if exit_status != 0: + if (ExecProgram ((as, ll1, '-f', '-o', bc2))): result.Fail() # # Disassemble the program one last time. # - exit_status = os.spawnl (os.P_WAIT, dis, dis, 'bc.2', '-f', '-o=ll.2') - if exit_status != 0: + if (ExecProgram ((dis, bc2, '-f', '-o', ll2))): result.Fail() # # Compare the LLVM assembly output to see if it is the same. # - exit_status = filecmp.cmp ('ll.1', 'll.2', 'false') + exit_status = filecmp.cmp (ll1, ll2, 'false') if exit_status == 0: result.Fail() return @@ -636,10 +695,10 @@ # # Cleanup the test. # - os.remove ('bc.1') - os.remove ('bc.2') - os.remove ('ll.1') - os.remove ('ll.2') + os.remove (bc1) + os.remove (bc2) + os.remove (ll1) + os.remove (ll2) return From criswell at cs.uiuc.edu Thu Sep 25 22:00:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Sep 25 22:00:02 2003 Subject: [llvm-commits] CVS: llvm/www/docs/CommandGuide/llvmas.html llvmdis.html Message-ID: <200309260259.VAA09250@choi.cs.uiuc.edu> Changes in directory llvm/www/docs/CommandGuide: llvmas.html updated: 1.3 -> 1.4 llvmdis.html updated: 1.3 -> 1.4 --- Log message: Added information about how llvm-as and llvm-dis select the input and output filenames. Corrected some typos in the llvm-dis documentation. --- Diffs of the changes: Index: llvm/www/docs/CommandGuide/llvmas.html diff -u llvm/www/docs/CommandGuide/llvmas.html:1.3 llvm/www/docs/CommandGuide/llvmas.html:1.4 --- llvm/www/docs/CommandGuide/llvmas.html:1.3 Thu Sep 25 14:50:04 2003 +++ llvm/www/docs/CommandGuide/llvmas.html Thu Sep 25 21:59:00 2003 @@ -20,15 +20,39 @@ SYNOPSIS -llvm-as [options] < filename> +llvm-as [options] [filename]

      DESCRIPTION

      -The llvm-as command is the LLVM assembler. It takes a human readable LLVM -assembly language file and translates it into LLVM bytecode. +The llvm-as command is the LLVM assembler. It reads a file containing human +readable LLVM assembly language, translates it to LLVM bytecode, and writes the +result into a file or to standard output. +

      + +If filename is omitted or is -, then llvm-as reads its input from standard +input. +

      -By default, llvm-as places its output into filename.bc. +If an output file is not specified with the -o option, then llvm-as sends its +output to a file or standard output by the following logic: + +

        +
      • + If the input is standard input, then the output is standard output. +

        + +

      • + If the input is a file that ends with .ll, then the output file is of + the same name, except that the suffix is changed to .bc. +

        + +

      • + If the input is a file that does not end with the .ll suffix, then the + output file has the same name as the input file, except that the .bc suffix + is appended. +

        +

      OPTIONS @@ -49,7 +73,8 @@
    • -o <filename>
      - Specify the output filename. + Specify the output filename. If filename is -, then llvm-as sends its + output to standard output.

    • -stats Index: llvm/www/docs/CommandGuide/llvmdis.html diff -u llvm/www/docs/CommandGuide/llvmdis.html:1.3 llvm/www/docs/CommandGuide/llvmdis.html:1.4 --- llvm/www/docs/CommandGuide/llvmdis.html:1.3 Thu Sep 25 14:50:04 2003 +++ llvm/www/docs/CommandGuide/llvmdis.html Thu Sep 25 21:59:00 2003 @@ -20,16 +20,39 @@ SYNOPSIS
    • -llvm-dis [options] < filename> +llvm-dis [options] [filename]

      DESCRIPTION

      The llvm-dis command is the LLVM disassembler. It takes an LLVM bytecode file -and converts it into one of several human readable formats. +and converts it into LLVM assembly language or C source code with equivalent +functionality. +

      + +If filename is omitted, llvm-dis reads its input from standard input. +

      + +The default output file for llvm-dis is determined by the following logic: +

        +
      • + If the input is standard input or the file -, then the output is standard + output. +

        + +

      • + If the input filename ends in .bc, then the output filename will be + identical, except that the .bc suffix will be replaced by the .ll or .c + suffix (for LLVM assembly language and C code, respectively). +

        + +

      • + If the input filename does not end in .bc, then the output filename will be + identical to the input filename, except that the .ll or .c suffix will be + appended to the filename (for LLVM assembly language and C code, + respectively). +
      -By default, llvm-dis places its output in filename.ll, removing the .bc suffix -if it exists.

      OPTIONS

      @@ -60,12 +83,13 @@
    • -o <filename>
      - Specify the output filename. + Specify the output filename. If filename is -, then the output is sent to + standard output.

      -

    • -time-pdisses +
    • -time-passes
      - Record the amount of time needed for each pdiss and print it to standard + Record the amount of time needed for each pass and print it to standard error.

    @@ -80,7 +104,7 @@

    SEE ALSO

    -llvm-dis +llvm-as
    LLVM Team From criswell at cs.uiuc.edu Fri Sep 26 08:59:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 08:59:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx Message-ID: <200309261358.IAA11338@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Assembler: 2002-04-07-HexFloatConstants.llx updated: 1.3 -> 1.4 --- Log message: Modified the test so that it puts temporary files into the temporary directory. --- Diffs of the changes: Index: llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx diff -u llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx:1.3 llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx:1.4 --- llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx:1.3 Mon Sep 15 15:01:21 2003 +++ llvm/test/Regression/Assembler/2002-04-07-HexFloatConstants.llx Fri Sep 26 08:58:44 2003 @@ -5,9 +5,9 @@ ; of the bug that was causing the Olden Health benchmark to output incorrect ; results! ; -; RUN: llvm-as < %s | opt -constprop | llvm-dis > s1 && \ -; RUN: llvm-as < %s | llvm-dis | llvm-as | opt -constprop | llvm-dis > s2 && \ -; RUN: diff s1 s2 +; RUN: llvm-as < %s | opt -constprop | llvm-dis > %t.1 && \ +; RUN: llvm-as < %s | llvm-dis | llvm-as | opt -constprop | llvm-dis > %t.2 && \ +; RUN: diff %t.1 %t.2 implementation From criswell at cs.uiuc.edu Fri Sep 26 09:33:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 09:33:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Regression/ Message-ID: <200309261432.JAA11491@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/Regression: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/Programs/SingleSource/Regression added to the repository --- Diffs of the changes: From lattner at cs.uiuc.edu Fri Sep 26 09:46:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Sep 26 09:46:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp Message-ID: <200309261445.JAA15798@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: Reader.cpp updated: 1.63 -> 1.64 --- Log message: Just rethrow previous exception instead of making a new one --- Diffs of the changes: Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.63 llvm/lib/Bytecode/Reader/Reader.cpp:1.64 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.63 Tue Sep 23 11:15:29 2003 +++ llvm/lib/Bytecode/Reader/Reader.cpp Fri Sep 26 09:44:52 2003 @@ -654,6 +654,6 @@ freeState(); // Must destroy handles before deleting module! delete TheModule; TheModule = 0; - throw Error; + throw; } } From criswell at cs.uiuc.edu Fri Sep 26 09:47:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 09:47:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Regression/Makefile Message-ID: <200309261446.JAA24205@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/Regression: Makefile updated: 1.4 -> 1.5 --- Log message: New Makefile for C++ program Regression Tests. --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/Regression/Makefile diff -u /dev/null llvm/test/Programs/SingleSource/Regression/Makefile:1.5 --- /dev/null Fri Sep 26 09:46:00 2003 +++ llvm/test/Programs/SingleSource/Regression/Makefile Fri Sep 26 09:45:50 2003 @@ -0,0 +1,10 @@ +# test/Regression/C++Frontend/Makefile +# +# This directory contains regression tests for the GCC C++ front-end for LLVM. +# These tests are C++ source files that are input to GCC and compiled to .ll +# files. After that, the files are assembled and executed by the LLVM backends. +# +LEVEL = ../../../.. +include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc +CFLAGS += -std=c99 + From criswell at cs.uiuc.edu Fri Sep 26 09:53:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 09:53:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Makefile Message-ID: <200309261452.JAA24231@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource: Makefile updated: 1.9 -> 1.10 --- Log message: Added new Regression tests to SingleSource. --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/Makefile diff -u llvm/test/Programs/SingleSource/Makefile:1.9 llvm/test/Programs/SingleSource/Makefile:1.10 --- llvm/test/Programs/SingleSource/Makefile:1.9 Wed Sep 10 11:56:59 2003 +++ llvm/test/Programs/SingleSource/Makefile Fri Sep 26 09:52:21 2003 @@ -1,5 +1,5 @@ LEVEL = ../../.. -PARALLEL_DIRS = UnitTests Benchmarks Gizmos CustomChecked +PARALLEL_DIRS = UnitTests Regression Benchmarks Gizmos CustomChecked LDFLAGS += -lm include Makefile.singlesrc From criswell at cs.uiuc.edu Fri Sep 26 09:54:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 09:54:02 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200309261453.JAA24247@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.30 -> 1.31 --- Log message: Added llvm/test/Programs/SingleSource/Regression/Makefile. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.30 llvm/configure:1.31 --- llvm/configure:1.30 Tue Sep 23 15:46:32 2003 +++ llvm/configure Fri Sep 26 09:53:13 2003 @@ -1950,6 +1950,9 @@ ac_config_commands="$ac_config_commands test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile" + ac_config_commands="$ac_config_commands test/Programs/SingleSource/Regression/Makefile" + + ac_config_commands="$ac_config_commands tools/Makefile" @@ -4390,7 +4393,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4393 "configure"' > conftest.$ac_ext + echo '#line 4396 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5231,7 +5234,7 @@ # Provide some information about the compiler. -echo "$as_me:5234:" \ +echo "$as_me:5237:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6240,11 +6243,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6243: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6246: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6247: \$? = $ac_status" >&5 + echo "$as_me:6250: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6472,11 +6475,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6475: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6478: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6479: \$? = $ac_status" >&5 + echo "$as_me:6482: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6539,11 +6542,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6542: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6545: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6546: \$? = $ac_status" >&5 + echo "$as_me:6549: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8551,7 +8554,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10791: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10792: \$? = $ac_status" >&5 + echo "$as_me:10795: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10852,11 +10855,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10855: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10858: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10859: \$? = $ac_status" >&5 + echo "$as_me:10862: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12095,7 +12098,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13021: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13022: \$? = $ac_status" >&5 + echo "$as_me:13025: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13082,11 +13085,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13085: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13088: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13089: \$? = $ac_status" >&5 + echo "$as_me:13092: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15026,11 +15029,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15029: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15032: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15033: \$? = $ac_status" >&5 + echo "$as_me:15036: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15258,11 +15261,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15261: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15264: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15265: \$? = $ac_status" >&5 + echo "$as_me:15268: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15325,11 +15328,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15328: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15331: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15332: \$? = $ac_status" >&5 + echo "$as_me:15335: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17337,7 +17340,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/autoconf: configure.ac updated: 1.22 -> 1.23 --- Log message: Added llvm/test/Programs/SingleSource/Regression/Makefile. --- Diffs of the changes: Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.22 llvm/autoconf/configure.ac:1.23 --- llvm/autoconf/configure.ac:1.22 Tue Sep 23 15:46:30 2003 +++ llvm/autoconf/configure.ac Fri Sep 26 09:53:17 2003 @@ -175,6 +175,7 @@ AC_CONFIG_MAKEFILE(test/Programs/SingleSource/CustomChecked/Makefile) AC_CONFIG_MAKEFILE(test/Programs/SingleSource/UnitTests/Makefile) AC_CONFIG_MAKEFILE(test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/SingleSource/Regression/Makefile) AC_CONFIG_MAKEFILE(tools/Makefile) AC_CONFIG_MAKEFILE(tools/analyze/Makefile) AC_CONFIG_MAKEFILE(tools/bugpoint/Makefile) From criswell at cs.uiuc.edu Fri Sep 26 09:59:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 09:59:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/C++Frontend/2003-05-14-array-init.cpp 2003-05-14-expr_stmt.cpp 2003-05-14-initialize-string.c 2003-05-21-BitfieldHandling.c 2003-05-21-UnionBitfields.c 2003-05-21-UnionTest.c 2003-05-22-LocalTypeTest.c 2003-05-22-VarSizeArray.c 2003-05-23-TransparentUnion.c 2003-06-08-BaseType.cpp 2003-06-08-VirtualFunctions.cpp 2003-06-13-Crasher.cpp 2003-06-16-InvalidInitializer.c 2003-06-16-VolatileError.c 2003-08-20-EnumSizeProblem.cpp ConstructorDestructorAttributes.c global_ctor.cpp global_type.cpp pointer_arithmetic.c pointer_member.cpp pointer_method.cpp Message-ID: <200309261458.JAA24291@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/C++Frontend: 2003-05-14-array-init.cpp (r1.1) removed 2003-05-14-expr_stmt.cpp (r1.1) removed 2003-05-14-initialize-string.c (r1.1) removed 2003-05-21-BitfieldHandling.c (r1.1) removed 2003-05-21-UnionBitfields.c (r1.2) removed 2003-05-21-UnionTest.c (r1.1) removed 2003-05-22-LocalTypeTest.c (r1.2) removed 2003-05-22-VarSizeArray.c (r1.2) removed 2003-05-23-TransparentUnion.c (r1.1) removed 2003-06-08-BaseType.cpp (r1.3) removed 2003-06-08-VirtualFunctions.cpp (r1.2) removed 2003-06-13-Crasher.cpp (r1.3) removed 2003-06-16-InvalidInitializer.c (r1.2) removed 2003-06-16-VolatileError.c (r1.1) removed 2003-08-20-EnumSizeProblem.cpp (r1.1) removed ConstructorDestructorAttributes.c (r1.1) removed global_ctor.cpp (r1.2) removed global_type.cpp (r1.2) removed pointer_arithmetic.c (r1.1) removed pointer_member.cpp (r1.3) removed pointer_method.cpp (r1.2) removed --- Log message: Removing these tests from the regressions directory. They now live in llvm/test/Programs/SingleSource/Regression alongside their UnitTest brethren. --- Diffs of the changes: From criswell at cs.uiuc.edu Fri Sep 26 11:33:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 11:33:02 2003 Subject: [llvm-commits] CVS: llvm/www/docs/CommandGuide/llvmlink.html opt.html Message-ID: <200309261632.LAA19135@tank.cs.uiuc.edu> Changes in directory llvm/www/docs/CommandGuide: llvmlink.html updated: 1.2 -> 1.3 opt.html updated: 1.3 -> 1.4 --- Log message: Added information on how input and output files are selected. Added information on where files are located by llvm-link. Added missing options. Re-worded some stuff so that it (hopefully) sounds better. --- Diffs of the changes: Index: llvm/www/docs/CommandGuide/llvmlink.html diff -u llvm/www/docs/CommandGuide/llvmlink.html:1.2 llvm/www/docs/CommandGuide/llvmlink.html:1.3 --- llvm/www/docs/CommandGuide/llvmlink.html:1.2 Thu Sep 25 14:50:05 2003 +++ llvm/www/docs/CommandGuide/llvmlink.html Fri Sep 26 11:32:00 2003 @@ -25,19 +25,29 @@ DESCRIPTION -The llvm-link command takes several LLVM bytecode files and links them together into a single LLVM bytecode file. +The llvm-link command takes several LLVM bytecode files and links them together +into a single LLVM bytecode file. It writes the output file to standard +output, unless the -o option is used to specify a filename. +

    + +The llvm-link command attempts to load the input files from the current +directory. If that fails, it attempts to locate each file within the +directories specified by the -L options on the command line. The library +search paths are global; each one is search for every input file if necessary. +The directories are searched in the order they were specified on the command +line.

    OPTIONS

      -
    • -L <pathname> +
    • -L <directory>
      - Specify a library search path. When looking for libraries, llvm-link - will look in pathname for libraries. This option can be specified - multiple times; llvm-link will search inside these directories in the - order in which they were specified on the command line. + Add the specified directory to the library search path. When looking for + libraries, llvm-link will look in pathname for libraries. This option can + be specified multiple times; llvm-link will search inside these directories + in the order in which they were specified on the command line.

    • -f @@ -48,26 +58,33 @@
    • -o <filename>
      - Output filename. + Output filename. If filename is -, then llvm-link will write its output to + standard output.

      -

    • -help +
    • -d +
      + If specified, llvm-link prints a human readable version of the output + bytecode file to standard error. +

      + +

    • -help
      Print a summary of command line options.

      -

    • -stats +
    • -stats
      Print statistics.

      -

    • -time-passes +
    • -time-passes
      Record the amount of time needed for each pass and print it to standard error.

      -

    • -v +
    • -v
      Verbose mode. Print information about what llvm-link is doing.
    @@ -82,7 +99,7 @@

    SEE ALSO

    -llvm-dis, lli +llvm-dis, lli, gccld
    LLVM Team Index: llvm/www/docs/CommandGuide/opt.html diff -u llvm/www/docs/CommandGuide/opt.html:1.3 llvm/www/docs/CommandGuide/opt.html:1.4 --- llvm/www/docs/CommandGuide/opt.html:1.3 Thu Sep 25 14:50:05 2003 +++ llvm/www/docs/CommandGuide/opt.html Fri Sep 26 11:32:00 2003 @@ -20,19 +20,27 @@ SYNOPSIS -opt [options] < filename> +opt [options] [filename]

    DESCRIPTION

    The opt command is the LLVM optimizer. It takes LLVM bytecode as input, runs -the specified optimizations on it, and then outputs the optimized code in LLVM +the specified optimizations on it, and then outputs the optimized LLVM bytecode. +

    -The optimizations available via opt depend upon what libraries it was linked -with, as well as any additional libraries that have been loaded with the -load -option. Use the -help option to determine what optimizations you can use. +The optimizations available via opt depend upon what libraries were linked +into it as well as any additional libraries that have been loaded with the +-load option. Use the -help option to determine what optimizations you can use. +

    +If no filename is specified on the command line, opt reads its input from +standard input. +

    + +If an output filename is not specified with the -o option, opt writes its +output to the standard output.

    OPTIONS

    From criswell at cs.uiuc.edu Fri Sep 26 11:45:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 11:45:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx Message-ID: <200309261644.LAA18298@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/CBackend: 2003-06-23-PromotedExprs.llx updated: 1.3 -> 1.4 --- Log message: Updated to generate temporary files in the temporary directory. --- Diffs of the changes: Index: llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx diff -u llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx:1.3 llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx:1.4 --- llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx:1.3 Mon Sep 15 15:01:52 2003 +++ llvm/test/Regression/CBackend/2003-06-23-PromotedExprs.llx Fri Sep 26 11:43:51 2003 @@ -1,7 +1,7 @@ -; RUN: llvm-as < %s | llvm-dis -c > f1.cbe.c -; RUN: gcc -B/usr/bin/ f1.cbe.c -o f1.cbe -; RUN: ./f1.cbe +; RUN: llvm-as < %s | llvm-dis -c > %t1.cbe.c +; RUN: gcc -B/usr/bin/ %t1.cbe.c -o %t1.cbe +; RUN: %t1.cbe bool %doTest(ubyte %x) { %dec.0 = add ubyte %x, 255 From criswell at cs.uiuc.edu Fri Sep 26 11:58:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 11:58:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/analysis.qms/dominators.qms/ Message-ID: <200309261657.LAA18395@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/analysis.qms/dominators.qms: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/QMTestDB/regression.qms/analysis.qms/dominators.qms added to the repository --- Diffs of the changes: From criswell at cs.uiuc.edu Fri Sep 26 11:58:05 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 11:58:05 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/analysis.qms/dominators.qms/2003-05-12-unreachablecode.qmt Message-ID: <200309261657.LAA18411@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/analysis.qms/dominators.qms: 2003-05-12-unreachablecode.qmt added (r1.1) --- Log message: Adding llvm/test/Regression/Analysis/Dominators/2003-05-12-UnreachableCode.ll to the QMTest test suite. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dominators.qms/2003-05-12-unreachablecode.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dominators.qms/2003-05-12-unreachablecode.qmt:1.1 *** /dev/null Fri Sep 26 11:57:48 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dominators.qms/2003-05-12-unreachablecode.qmt Fri Sep 26 11:57:38 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/Dominators/2003-05-12-UnreachableCode.ll From criswell at cs.uiuc.edu Fri Sep 26 12:00:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 12:00:02 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/analysis.qms/loopinfo.qms/ Message-ID: <200309261659.LAA18440@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/analysis.qms/loopinfo.qms: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/QMTestDB/regression.qms/analysis.qms/loopinfo.qms added to the repository --- Diffs of the changes: From criswell at cs.uiuc.edu Fri Sep 26 12:01:12 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 12:01:12 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/analysis.qms/loopinfo.qms/2003-05-15-nestingproblem.qmt Message-ID: <200309261700.MAA18458@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/analysis.qms/loopinfo.qms: 2003-05-15-nestingproblem.qmt added (r1.1) --- Log message: Addition of llvm/test/Regression/Analysis/LoopInfo/2003-05-15-NestingProblem.ll to the QMTest test suite. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/analysis.qms/loopinfo.qms/2003-05-15-nestingproblem.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/loopinfo.qms/2003-05-15-nestingproblem.qmt:1.1 *** /dev/null Fri Sep 26 12:00:19 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/loopinfo.qms/2003-05-15-nestingproblem.qmt Fri Sep 26 12:00:09 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/LoopInfo/2003-05-15-NestingProblem.ll From criswell at cs.uiuc.edu Fri Sep 26 12:01:18 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 12:01:18 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/ Message-ID: <200309261700.MAA18467@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms added to the repository --- Diffs of the changes: From criswell at cs.uiuc.edu Fri Sep 26 12:22:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 12:22:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-incompletetdpass.qmt 2003-06-29-nodecollapsing.qmt 2003-06-29-nodecollapsing2.qmt 2003-06-30-topdownresolve.qmt 2003-07-01-fieldcollapse.qmt 2003-07-16-constantexprcollapse.qmt buglobals.qmt constantize.qmt gcsetest.qmt globalsgraphfuncptr.qmt hardbucase.qmt incompletenode.qmt mustalias.qmt physicalsubtyping.qmt sccsimpleexample.qmt Message-ID: <200309261721.MAA18783@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms: 2003-06-29-incompletetdpass.qmt added (r1.1) 2003-06-29-nodecollapsing.qmt added (r1.1) 2003-06-29-nodecollapsing2.qmt added (r1.1) 2003-06-30-topdownresolve.qmt added (r1.1) 2003-07-01-fieldcollapse.qmt added (r1.1) 2003-07-16-constantexprcollapse.qmt added (r1.1) buglobals.qmt added (r1.1) constantize.qmt added (r1.1) gcsetest.qmt added (r1.1) globalsgraphfuncptr.qmt added (r1.1) hardbucase.qmt added (r1.1) incompletenode.qmt added (r1.1) mustalias.qmt added (r1.1) physicalsubtyping.qmt added (r1.1) sccsimpleexample.qmt added (r1.1) --- Log message: New QMTest test cases from llvm/test/Regression/Analysis/DSGraph. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-incompletetdpass.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-incompletetdpass.qmt:1.1 *** /dev/null Fri Sep 26 12:21:36 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-incompletetdpass.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/2003-06-29-IncompleteTDPass.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-nodecollapsing.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-nodecollapsing.qmt:1.1 *** /dev/null Fri Sep 26 12:21:36 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-nodecollapsing.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-nodecollapsing2.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-nodecollapsing2.qmt:1.1 *** /dev/null Fri Sep 26 12:21:36 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-29-nodecollapsing2.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/2003-06-29-NodeCollapsing2.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-30-topdownresolve.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-30-topdownresolve.qmt:1.1 *** /dev/null Fri Sep 26 12:21:36 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-06-30-topdownresolve.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/2003-06-30-TopDownResolve.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-07-01-fieldcollapse.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-07-01-fieldcollapse.qmt:1.1 *** /dev/null Fri Sep 26 12:21:36 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-07-01-fieldcollapse.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/2003-07-01-FieldCollapse.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-07-16-constantexprcollapse.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-07-16-constantexprcollapse.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/2003-07-16-constantexprcollapse.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/2003-07-16-ConstantExprCollapse.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/buglobals.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/buglobals.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/buglobals.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/buglobals.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/constantize.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/constantize.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/constantize.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/constantize.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/gcsetest.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/gcsetest.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/gcsetest.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/gcsetest.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/globalsgraphfuncptr.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/globalsgraphfuncptr.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/globalsgraphfuncptr.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/GlobalsGraphFuncPtr.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/hardbucase.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/hardbucase.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/hardbucase.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + test/Regression/Analysis/DSGraph/HardBUCase.ll.* Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/incompletenode.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/incompletenode.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/incompletenode.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/incompletenode.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/mustalias.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/mustalias.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/mustalias.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/mustalias.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/physicalsubtyping.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/physicalsubtyping.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/physicalsubtyping.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/PhysicalSubtyping.ll Index: llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/sccsimpleexample.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/sccsimpleexample.qmt:1.1 *** /dev/null Fri Sep 26 12:21:37 2003 --- llvm/test/QMTestDB/regression.qms/analysis.qms/dsgraph.qms/sccsimpleexample.qmt Fri Sep 26 12:21:26 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Analysis/DSGraph/SCCSimpleExample.ll From criswell at cs.uiuc.edu Fri Sep 26 13:05:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 13:05:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/expectations.qmr Message-ID: <200309261804.NAA25592@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB: expectations.qmr updated: 1.3 -> 1.4 --- Log message: Marked the following new tests as expected failures: regression.analysis.dsgraph.2003-07-16-constantexprcollapse regression.analysis.dsgraph.incompletenode regression.analysis.dsgraph.mustalias --- Diffs of the changes: Index: llvm/test/QMTestDB/expectations.qmr diff -u llvm/test/QMTestDB/expectations.qmr:1.3 llvm/test/QMTestDB/expectations.qmr:1.4 --- llvm/test/QMTestDB/expectations.qmr:1.3 Thu Sep 25 12:57:52 2003 +++ llvm/test/QMTestDB/expectations.qmr Fri Sep 26 13:04:44 2003 @@ -3,4 +3,4 @@ qoq}q(U _Result__kindqUtestqU_Result__outcomeqUFAILqU_Result__annotationsq}U _Result__idq U1regression.transforms.correlatedexprs.nullpointerq U_Result__contextq (cqm.test.context Context -q o}q (U_Context__propertiesq}U_Context__temporariesq}ubub.(hoq}q(hhhUFAILqh}h U*regression.transforms.correlatedexprs.whetqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U+regression.analysis.dsgraphs.incompletenodeqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U%regression.transforms.instcombine.powqh (h o}q(h}h}ubub.(hoq}q (hhhUFAILq!h}h U,regression.transforms.mem2reg.differingtypesq"h (h o}q#(h}h}ubub.(hoq$}q%(hhhUFAILq&h}h U.regression.transforms.correlatedexprs.looptestq'h (h o}q((h}h}ubub.(hoq)}q*(hhhUFAILq+h}h U5regression.assembler.2003-04-15-constantinitassertionq,h (h o}q-(h}h}ubub.(hoq.}q/(hhhUFAILq0h}h U7regression.transforms.levelraise.2002-05-02-missedraiseq1h (h o}q2(h}h}ubub.(hoq3}q4(hhhUFAILq5h}h U/regression.linker.2003-06-02-typeresolveproblemq6h (h o}q7(h}h}ubub.(hoq8}q9(hhhUFAILq:h}h U7regression.transforms.levelraise.2002-05-23-missedraiseq;h (h o}q<(h}h}ubub.(hoq=}q>(hhhU! FAILq?h}h U.regression.transforms.adce.2002-07-29-segfaultq at h (h o}qA(h}h}ubub.(hoqB}qC(hhhUFAILqDh}h U®ression.analysis.dsgraphs.mustaliasqEh (h o}qF(h}h}ubub.(hoqG}qH(hhhUFAILqIh}h U/regression.cbackend.2002-08-26-indirectcalltestqJh (h o}qK(h}h}ubub.(hoqL}qM(hhhUFAILqNh}h Ufeature.mc-code.constexprqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhUFAILqSh}h U=regression.transforms.correlatedexprs.2002-10-03-phipropogateqTh (h o}qU(h}h}ubub.(hoqV}qW(hhhUFAILqXh}h Uregression.transforms.levelraise.2002-05-02-badcasteliminationq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUPASSq?h}h U4regression.assembler.2003-06-30-recursivetypeproblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U:regression.cfrontend.2003-06-29-multiplefunctiondefinitionq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U6regression.transforms.levelraise.2002-02-11-arrayshapeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U7regression.transforms.levelraise.2002-04-16-missedraiseq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Umc-code.calltestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U=regression.transf! orms.levelraise.2002-07-18-missedallocaraiseq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Ufeature.asm.constexprq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U*regression.transforms.instcombine.cast-setq?h (h o}q?(h}h}ubub. \ No newline at end of file +q o}q (U_Context__propertiesq}U_Context__temporariesq}ubub.(hoq}q(hhhUFAILqh}h U*regression.transforms.correlatedexprs.whetqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U+regression.analysis.dsgraphs.incompletenodeqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U*regression.transforms.instcombine.cast-setqh (h o}q(h}h}ubub.(hoq}q (hhhUFAILq!h}h U%regression.transforms.instcombine.powq"h (h o}q#(h}h}ubub.(hoq$}q%(hhhUFAILq&h}h U,regression.transforms.mem2reg.differingtypesq'h (h o}q((h}h}ubub.(hoq)}q*(hhhUFAILq+h}h U.regression.transforms.correlatedexprs.looptestq,h (h o}q-(h}h}ubub.(hoq.}q/(hhhUFAILq0h}h U;regression.analysis.dsgraph.2003-07-16-constantexprcollapseq1h (h o}q2(h}h}ubub.(hoq3}q4(hhhUFAILq5h}h U5regression.assembler.2003-04-15-constantinitassertionq6h (h o}q7(h}h}ubub.(hoq8}q9(hhhUFAILq:h}h U7regression.transforms.levelraise.2002-04-16-missedraiseq;h (h o}q<(h}h}ubub.(hoq=}q>(hhhU! FAILq?h}h U/regression.linker.2003-06-02-typeresolveproblemq at h (h o}qA(h}h}ubub.(hoqB}qC(hhhUFAILqDh}h Uregression.transforms.levelraise.2002-05-02-badcasteliminationq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUPASSq?h}h U6regression.assembler.2002-07-08-hugeperformanceproblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U:regression.cfrontend.2003-06-29-multiplefunctiondefinitionq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U6regression.tra! nsforms.levelraise.2002-02-11-arrayshapeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U7regression.transforms.levelraise.2002-05-02-missedraiseq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Umc-code.calltestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h U=regression.transforms.levelraise.2002-07-18-missedallocaraiseq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h Ufeature.asm.constexprq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUPASSq?h}h U4regression.assembler.2003-06-30-recursivetypeproblemq?h (h o}q?(h}h}ubub. \ No newline at end of file From criswell at cs.uiuc.edu Fri Sep 26 13:26:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 13:26:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-21-environmenttest.qma 2003-08-23-deadblocktest.qma 2003-08-23-registerallocatephysreg.qma test-constantexpr.qma Message-ID: <200309261825.NAA26126@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms: 2003-08-21-environmenttest.qma added (r1.1) 2003-08-23-deadblocktest.qma added (r1.1) 2003-08-23-registerallocatephysreg.qma added (r1.1) test-constantexpr.qma added (r1.1) --- Log message: Added these tests to the QMTest test suite. --- Diffs of the changes: Index: llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-21-environmenttest.qma diff -c /dev/null llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-21-environmenttest.qma:1.1 *** /dev/null Fri Sep 26 13:25:05 2003 --- llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-21-environmenttest.qma Fri Sep 26 13:24:55 2003 *************** *** 0 **** --- 1,2 ---- + + 2003-08-21-environmenttest.bctest/Regression/Jello/2003-08-21-EnvironmentTest.ll Index: llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-23-deadblocktest.qma diff -c /dev/null llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-23-deadblocktest.qma:1.1 *** /dev/null Fri Sep 26 13:25:05 2003 --- llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-23-deadblocktest.qma Fri Sep 26 13:24:55 2003 *************** *** 0 **** --- 1,2 ---- + + 2003-08-23-deadblocktest.bctest/Regression/Jello/2003-08-23-DeadBlockTest.ll Index: llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-23-registerallocatephysreg.qma diff -c /dev/null llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-23-registerallocatephysreg.qma:1.1 *** /dev/null Fri Sep 26 13:25:05 2003 --- llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/2003-08-23-registerallocatephysreg.qma Fri Sep 26 13:24:55 2003 *************** *** 0 **** --- 1,2 ---- + + 2003-08-23-registerallocatephysreg.bctest/Regression/Jello/2003-08-23-RegisterAllocatePhysReg.ll Index: llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/test-constantexpr.qma diff -c /dev/null llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/test-constantexpr.qma:1.1 *** /dev/null Fri Sep 26 13:25:05 2003 --- llvm/test/QMTestDB/bc.qms/regression.qms/jello.qms/test-constantexpr.qma Fri Sep 26 13:24:55 2003 *************** *** 0 **** --- 1,2 ---- + + test-constantexpr.bctest/Regression/Jello/test-constantexpr.ll From criswell at cs.uiuc.edu Fri Sep 26 13:26:06 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 13:26:06 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-21-environmenttest.qmt 2003-08-23-deadblocktest.qmt 2003-08-23-registerallocatephysreg.qmt test-constantexpr.qmt Message-ID: <200309261825.NAA26148@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/jello.qms: 2003-08-21-environmenttest.qmt added (r1.1) 2003-08-23-deadblocktest.qmt added (r1.1) 2003-08-23-registerallocatephysreg.qmt added (r1.1) test-constantexpr.qmt added (r1.1) --- Log message: Added these tests to the QMTest test suite. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-21-environmenttest.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-21-environmenttest.qmt:1.1 *** /dev/null Fri Sep 26 13:25:39 2003 --- llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-21-environmenttest.qmt Fri Sep 26 13:25:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*bc.regression.jello.2003-08-21-environmenttest2003-08-21-environmenttest.bc Index: llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-23-deadblocktest.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-23-deadblocktest.qmt:1.1 *** /dev/null Fri Sep 26 13:25:39 2003 --- llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-23-deadblocktest.qmt Fri Sep 26 13:25:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Jello/2003-08-23-DeadBlockTest.llx Index: llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-23-registerallocatephysreg.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-23-registerallocatephysreg.qmt:1.1 *** /dev/null Fri Sep 26 13:25:39 2003 --- llvm/test/QMTestDB/regression.qms/jello.qms/2003-08-23-registerallocatephysreg.qmt Fri Sep 26 13:25:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*bc.regression.jello.2003-08-23-registerallocatephysreg2003-08-23-registerallocatephysreg.bc Index: llvm/test/QMTestDB/regression.qms/jello.qms/test-constantexpr.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/jello.qms/test-constantexpr.qmt:1.1 *** /dev/null Fri Sep 26 13:25:39 2003 --- llvm/test/QMTestDB/regression.qms/jello.qms/test-constantexpr.qmt Fri Sep 26 13:25:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*bc.regression.jello.test-constantexprtest-constantexpr.bc From criswell at cs.uiuc.edu Fri Sep 26 13:53:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 13:53:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Regression/C/ Message-ID: <200309261852.NAA26247@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/Regression/C: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/Programs/SingleSource/Regression/C added to the repository --- Diffs of the changes: From criswell at cs.uiuc.edu Fri Sep 26 13:53:06 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 13:53:06 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Regression/C++/ Message-ID: <200309261852.NAA26252@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/Regression/C++: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/Programs/SingleSource/Regression/C++ added to the repository --- Diffs of the changes: From criswell at cs.uiuc.edu Fri Sep 26 14:51:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 14:51:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Regression/Makefile Message-ID: <200309261950.OAA18413@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/Regression: Makefile added (r1.1) --- Log message: New Master Makefile for the SingleSource regression tests. We now support multiple language directories. --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/Regression/Makefile diff -c /dev/null llvm/test/Programs/SingleSource/Regression/Makefile:1.1 *** /dev/null Fri Sep 26 14:50:03 2003 --- llvm/test/Programs/SingleSource/Regression/Makefile Fri Sep 26 14:49:53 2003 *************** *** 0 **** --- 1,4 ---- + LEVEL = ../../../.. + DIRS=C++ C + include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc + From criswell at cs.uiuc.edu Fri Sep 26 14:51:06 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 14:51:06 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Regression/C/Makefile Message-ID: <200309261950.OAA18431@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/Regression/C: Makefile added (r1.1) --- Log message: Re-arranging regression tests to support multiple front-end languages. --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/Regression/C/Makefile diff -c /dev/null llvm/test/Programs/SingleSource/Regression/C/Makefile:1.1 *** /dev/null Fri Sep 26 14:50:59 2003 --- llvm/test/Programs/SingleSource/Regression/C/Makefile Fri Sep 26 14:50:49 2003 *************** *** 0 **** --- 1,3 ---- + LEVEL = ../../../../.. + include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc + From criswell at cs.uiuc.edu Fri Sep 26 14:52:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 14:52:02 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200309261951.OAA18458@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.31 -> 1.32 --- Log message: Moved llvm/test/Programs/SingleSource/Regression around a bit to support multiple languages. --- Diffs of the changes: Index: llvm/configure diff -u llvm/configure:1.31 llvm/configure:1.32 --- llvm/configure:1.31 Fri Sep 26 09:53:13 2003 +++ llvm/configure Fri Sep 26 14:51:41 2003 @@ -1953,6 +1953,12 @@ ac_config_commands="$ac_config_commands test/Programs/SingleSource/Regression/Makefile" + ac_config_commands="$ac_config_commands test/Programs/SingleSource/Regression/C/Makefile" + + + ac_config_commands="$ac_config_commands test/Programs/SingleSource/Regression/C++/Makefile" + + ac_config_commands="$ac_config_commands tools/Makefile" @@ -4393,7 +4399,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4396 "configure"' > conftest.$ac_ext + echo '#line 4402 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5234,7 +5240,7 @@ # Provide some information about the compiler. -echo "$as_me:5237:" \ +echo "$as_me:5243:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -6243,11 +6249,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6246: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6252: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6250: \$? = $ac_status" >&5 + echo "$as_me:6256: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6475,11 +6481,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6478: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6484: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6482: \$? = $ac_status" >&5 + echo "$as_me:6488: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6542,11 +6548,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6545: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6551: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6549: \$? = $ac_status" >&5 + echo "$as_me:6555: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8554,7 +8560,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10797: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10795: \$? = $ac_status" >&5 + echo "$as_me:10801: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10855,11 +10861,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10858: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10864: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10862: \$? = $ac_status" >&5 + echo "$as_me:10868: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12098,7 +12104,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13027: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13025: \$? = $ac_status" >&5 + echo "$as_me:13031: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13085,11 +13091,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13088: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13094: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13092: \$? = $ac_status" >&5 + echo "$as_me:13098: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15029,11 +15035,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15032: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15038: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15036: \$? = $ac_status" >&5 + echo "$as_me:15042: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15261,11 +15267,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15264: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15270: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15268: \$? = $ac_status" >&5 + echo "$as_me:15274: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -15328,11 +15334,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15331: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15337: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15335: \$? = $ac_status" >&5 + echo "$as_me:15341: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17340,7 +17346,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/test/Programs/SingleSource/Regression/C++: Makefile updated: 1.5 -> 1.6 --- Log message: Re-arranging regression tests to support multiple front-end languages. --- Diffs of the changes: Index: llvm/test/Programs/SingleSource/Regression/C++/Makefile diff -u llvm/test/Programs/SingleSource/Regression/C++/Makefile:1.5 llvm/test/Programs/SingleSource/Regression/C++/Makefile:1.6 --- llvm/test/Programs/SingleSource/Regression/C++/Makefile:1.5 Fri Sep 26 09:45:50 2003 +++ llvm/test/Programs/SingleSource/Regression/C++/Makefile Fri Sep 26 14:50:50 2003 @@ -4,7 +4,7 @@ # These tests are C++ source files that are input to GCC and compiled to .ll # files. After that, the files are assembled and executed by the LLVM backends. # -LEVEL = ../../../.. +LEVEL = ../../../../.. include $(LEVEL)/test/Programs/SingleSource/Makefile.singlesrc CFLAGS += -std=c99 From criswell at cs.uiuc.edu Fri Sep 26 14:52:11 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 14:52:11 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200309261951.OAA18467@choi.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.23 -> 1.24 --- Log message: Moved llvm/test/Programs/SingleSource/Regression around a bit to support multiple languages. --- Diffs of the changes: Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.23 llvm/autoconf/configure.ac:1.24 --- llvm/autoconf/configure.ac:1.23 Fri Sep 26 09:53:17 2003 +++ llvm/autoconf/configure.ac Fri Sep 26 14:51:42 2003 @@ -176,6 +176,8 @@ AC_CONFIG_MAKEFILE(test/Programs/SingleSource/UnitTests/Makefile) AC_CONFIG_MAKEFILE(test/Programs/SingleSource/UnitTests/SetjmpLongjmp/Makefile) AC_CONFIG_MAKEFILE(test/Programs/SingleSource/Regression/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/SingleSource/Regression/C/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/SingleSource/Regression/C++/Makefile) AC_CONFIG_MAKEFILE(tools/Makefile) AC_CONFIG_MAKEFILE(tools/analyze/Makefile) AC_CONFIG_MAKEFILE(tools/bugpoint/Makefile) From criswell at cs.uiuc.edu Fri Sep 26 15:10:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 15:10:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-20-opaquetyperesolve.qmt 2003-08-23-globalvarlinking.qmt 2003-08-23-recursiveopaquetyperesolve.qmt 2003-08-24-inheritptrsize.qmt 2003-08-28-typeresolvesglobal2.qmt 2003-08-28-typeresolvesglobal3.qmt 2003-08-28-typeresolvesglobal.qmt Message-ID: <200309262009.PAA30498@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/linker.qms: 2003-08-20-opaquetyperesolve.qmt added (r1.1) 2003-08-23-globalvarlinking.qmt added (r1.1) 2003-08-23-recursiveopaquetyperesolve.qmt added (r1.1) 2003-08-24-inheritptrsize.qmt added (r1.1) 2003-08-28-typeresolvesglobal2.qmt added (r1.1) 2003-08-28-typeresolvesglobal3.qmt added (r1.1) 2003-08-28-typeresolvesglobal.qmt added (r1.1) --- Log message: New tests added in October. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-20-opaquetyperesolve.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-20-opaquetyperesolve.qmt:1.1 *** /dev/null Fri Sep 26 15:09:32 2003 --- llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-20-opaquetyperesolve.qmt Fri Sep 26 15:09:22 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll Index: llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-23-globalvarlinking.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-23-globalvarlinking.qmt:1.1 *** /dev/null Fri Sep 26 15:09:32 2003 --- llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-23-globalvarlinking.qmt Fri Sep 26 15:09:22 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Linker/2003-08-23-GlobalVarLinking.ll Index: llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-23-recursiveopaquetyperesolve.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-23-recursiveopaquetyperesolve.qmt:1.1 *** /dev/null Fri Sep 26 15:09:32 2003 --- llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-23-recursiveopaquetyperesolve.qmt Fri Sep 26 15:09:22 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll Index: llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-24-inheritptrsize.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-24-inheritptrsize.qmt:1.1 *** /dev/null Fri Sep 26 15:09:32 2003 --- llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-24-inheritptrsize.qmt Fri Sep 26 15:09:22 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Linker/2003-08-24-InheritPtrSize.ll Index: llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-28-typeresolvesglobal2.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-28-typeresolvesglobal2.qmt:1.1 *** /dev/null Fri Sep 26 15:09:32 2003 --- llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-28-typeresolvesglobal2.qmt Fri Sep 26 15:09:22 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll Index: llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-28-typeresolvesglobal3.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-28-typeresolvesglobal3.qmt:1.1 *** /dev/null Fri Sep 26 15:09:32 2003 --- llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-28-typeresolvesglobal3.qmt Fri Sep 26 15:09:22 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll Index: llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-28-typeresolvesglobal.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-28-typeresolvesglobal.qmt:1.1 *** /dev/null Fri Sep 26 15:09:32 2003 --- llvm/test/QMTestDB/regression.qms/linker.qms/2003-08-28-typeresolvesglobal.qmt Fri Sep 26 15:09:22 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll From criswell at cs.uiuc.edu Fri Sep 26 15:21:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 15:21:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll 2003-08-23-GlobalVarLinking.ll 2003-08-23-RecursiveOpaqueTypeResolve.ll 2003-08-24-InheritPtrSize.ll 2003-08-28-TypeResolvesGlobal.ll 2003-08-28-TypeResolvesGlobal2.ll 2003-08-28-TypeResolvesGlobal3.ll Message-ID: <200309262020.PAA31111@choi.cs.uiuc.edu> Changes in directory llvm/test/Regression/Linker: 2003-08-20-OpaqueTypeResolve.ll updated: 1.2 -> 1.3 2003-08-23-GlobalVarLinking.ll updated: 1.3 -> 1.4 2003-08-23-RecursiveOpaqueTypeResolve.ll updated: 1.3 -> 1.4 2003-08-24-InheritPtrSize.ll updated: 1.2 -> 1.3 2003-08-28-TypeResolvesGlobal.ll updated: 1.2 -> 1.3 2003-08-28-TypeResolvesGlobal2.ll updated: 1.2 -> 1.3 2003-08-28-TypeResolvesGlobal3.ll updated: 1.2 -> 1.3 --- Log message: Updated these tests so that they use the new temporary directory as opposed to the old Output directory for temporary files. --- Diffs of the changes: Index: llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll diff -u llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll:1.2 llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll:1.3 --- llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll:1.2 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2003-08-20-OpaqueTypeResolve.ll Fri Sep 26 15:20:44 2003 @@ -1,7 +1,7 @@ -; RUN: llvm-as < %s > Output/%s.out1.bc -; RUN: echo "%S = type { int, int* }" | llvm-as > Output/%s.out2.bc -; RUN: llvm-link Output/%s.out[12].bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = type { int, int* }" | llvm-as > %t.out2.bc +; RUN: llvm-link %t.out[12].bc %T = type opaque %S = type { int, %T* } Index: llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll diff -u llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll:1.3 llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll:1.4 --- llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll:1.3 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2003-08-23-GlobalVarLinking.ll Fri Sep 26 15:20:44 2003 @@ -1,6 +1,6 @@ -; RUN: llvm-as < %s > Output/%s.out1.bc -; RUN: echo "%S = external global { int, opaque* } declare void %F(opaque*)" | llvm-as > Output/%s.out2.bc -; RUN: llvm-link Output/%s.out[12].bc | llvm-dis | not grep opaque +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = external global { int, opaque* } declare void %F(opaque*)" | llvm-as > %t.out2.bc +; RUN: llvm-link %t.out[12].bc | llvm-dis | not grep opaque ; After linking this testcase, there should be no opaque types left. The two ; S's should cause the opaque type to be resolved to 'int'. Index: llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll diff -u llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll:1.3 llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll:1.4 --- llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll:1.3 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2003-08-23-RecursiveOpaqueTypeResolve.ll Fri Sep 26 15:20:44 2003 @@ -1,8 +1,8 @@ ; It's a bad idea to go recursively traipsing through types without a safety ; net. -; RUN: llvm-as < %s > Output/%s.out1.bc -; RUN: echo "%S = type { %S*, int* }" | llvm-as > Output/%s.out2.bc -; RUN: llvm-link Output/%s.out[12].bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = type { %S*, int* }" | llvm-as > %t.out2.bc +; RUN: llvm-link %t.out[12].bc %S = type { %S*, opaque* } Index: llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll diff -u llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll:1.2 llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll:1.3 --- llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll:1.2 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2003-08-24-InheritPtrSize.ll Fri Sep 26 15:20:44 2003 @@ -1,9 +1,9 @@ ; Linking these a module with a specified pointer size to one without a ; specified pointer size should not cause a warning! -; RUN: llvm-as < %s > Output/%s.out1.bc -; RUN: echo "" | llvm-as > Output/%s.out2.bc -; RUN: llvm-link Output/%s.out[12].bc 2>&1 | not grep WARNING +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "" | llvm-as > %t.out2.bc +; RUN: llvm-link %t.out[12].bc 2>&1 | not grep WARNING target pointersize = 64 Index: llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll diff -u llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll:1.2 llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll:1.3 --- llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll:1.2 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal.ll Fri Sep 26 15:20:44 2003 @@ -1,6 +1,6 @@ -; RUN: llvm-as < %s > Output/%s.out1.bc -; RUN: echo "%S = type int" | llvm-as > Output/%s.out2.bc -; RUN: llvm-link Output/%s.out[21].bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = type int" | llvm-as > %t.out2.bc +; RUN: llvm-link %t.out[21].bc %S = type opaque Index: llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll diff -u llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll:1.2 llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll:1.3 --- llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll:1.2 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal2.ll Fri Sep 26 15:20:44 2003 @@ -1,6 +1,6 @@ -; RUN: llvm-as < %s > Output/%s.out1.bc -; RUN: echo "%S = type int" | llvm-as > Output/%s.out2.bc -; RUN: llvm-link Output/%s.out[21].bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = type int" | llvm-as > %t.out2.bc +; RUN: llvm-link %t.out[21].bc %S = type opaque Index: llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll diff -u llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll:1.2 llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll:1.3 --- llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll:1.2 Mon Sep 15 15:04:28 2003 +++ llvm/test/Regression/Linker/2003-08-28-TypeResolvesGlobal3.ll Fri Sep 26 15:20:44 2003 @@ -1,6 +1,6 @@ -; RUN: llvm-as < %s > Output/%s.out1.bc -; RUN: echo "%S = type int" | llvm-as > Output/%s.out2.bc -; RUN: llvm-link Output/%s.out[21].bc +; RUN: llvm-as < %s > %t.out1.bc +; RUN: echo "%S = type int" | llvm-as > %t.out2.bc +; RUN: llvm-link %t.out[21].bc %S = type opaque From criswell at cs.uiuc.edu Fri Sep 26 15:32:00 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 15:32:00 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/adce.qms/2003-09-10-unwindinstfail.qmt 2003-09-15-infloopcrash.qmt Message-ID: <200309262031.PAA31257@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/adce.qms: 2003-09-10-unwindinstfail.qmt added (r1.1) 2003-09-15-infloopcrash.qmt added (r1.1) --- Log message: Added new tests added in September. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/transforms.qms/adce.qms/2003-09-10-unwindinstfail.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/adce.qms/2003-09-10-unwindinstfail.qmt:1.1 *** /dev/null Fri Sep 26 15:31:28 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/adce.qms/2003-09-10-unwindinstfail.qmt Fri Sep 26 15:31:18 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/ADCE/2003-09-10-UnwindInstFail.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/adce.qms/2003-09-15-infloopcrash.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/adce.qms/2003-09-15-infloopcrash.qmt:1.1 *** /dev/null Fri Sep 26 15:31:28 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/adce.qms/2003-09-15-infloopcrash.qmt Fri Sep 26 15:31:18 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/ADCE/2003-09-15-InfLoopCrash.ll From criswell at cs.uiuc.edu Fri Sep 26 15:36:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 15:36:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/basicaa.qms/2003-09-19-localargument.qmt Message-ID: <200309262035.PAA31473@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/basicaa.qms: 2003-09-19-localargument.qmt added (r1.1) --- Log message: Adding test. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/transforms.qms/basicaa.qms/2003-09-19-localargument.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/basicaa.qms/2003-09-19-localargument.qmt:1.1 *** /dev/null Fri Sep 26 15:35:33 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/basicaa.qms/2003-09-19-localargument.qmt Fri Sep 26 15:35:23 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/2003-09-19-LocalArgument.ll From criswell at cs.uiuc.edu Fri Sep 26 15:51:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 15:51:02 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/ Message-ID: <200309262050.PAA31622@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms added to the repository --- Diffs of the changes: From criswell at cs.uiuc.edu Fri Sep 26 15:54:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 15:54:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt 2002-05-03-notoperator.qmt 2002-09-03-setcc-bools.qmt 2003-05-12-divideerror.qmt basictest.qmt logicaltest.qmt nottest.qmt phi.qmt remtest.qmt Message-ID: <200309262053.PAA31679@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms: 2002-05-03-dividebyzeroexception.qmt added (r1.1) 2002-05-03-notoperator.qmt added (r1.1) 2002-09-03-setcc-bools.qmt added (r1.1) 2003-05-12-divideerror.qmt added (r1.1) basictest.qmt added (r1.1) logicaltest.qmt added (r1.1) nottest.qmt added (r1.1) phi.qmt added (r1.1) remtest.qmt added (r1.1) --- Log message: Adding new Transforms tests. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt:1.1 *** /dev/null Fri Sep 26 15:53:16 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt Fri Sep 26 15:53:06 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/2002-05-03-DivideByZeroException.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-notoperator.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-notoperator.qmt:1.1 *** /dev/null Fri Sep 26 15:53:16 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-notoperator.qmt Fri Sep 26 15:53:06 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/2002-05-03-NotOperator.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-09-03-setcc-bools.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-09-03-setcc-bools.qmt:1.1 *** /dev/null Fri Sep 26 15:53:16 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-09-03-setcc-bools.qmt Fri Sep 26 15:53:06 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/2002-09-03-SetCC-Bools.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2003-05-12-divideerror.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2003-05-12-divideerror.qmt:1.1 *** /dev/null Fri Sep 26 15:53:16 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2003-05-12-divideerror.qmt Fri Sep 26 15:53:06 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/2003-05-12-DivideError.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/basictest.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/basictest.qmt:1.1 *** /dev/null Fri Sep 26 15:53:16 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/basictest.qmt Fri Sep 26 15:53:06 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/basictest.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/logicaltest.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/logicaltest.qmt:1.1 *** /dev/null Fri Sep 26 15:53:16 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/logicaltest.qmt Fri Sep 26 15:53:06 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/logicaltest.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/nottest.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/nottest.qmt:1.1 *** /dev/null Fri Sep 26 15:53:16 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/nottest.qmt Fri Sep 26 15:53:06 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/nottest.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/phi.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/phi.qmt:1.1 *** /dev/null Fri Sep 26 15:53:16 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/phi.qmt Fri Sep 26 15:53:06 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/phi.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/remtest.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/remtest.qmt:1.1 *** /dev/null Fri Sep 26 15:53:16 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/remtest.qmt Fri Sep 26 15:53:06 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/BasicAA/remtest.ll From criswell at cs.uiuc.edu Fri Sep 26 15:57:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 15:57:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt 2002-05-03-notoperator.qmt 2002-09-03-setcc-bools.qmt 2003-05-12-divideerror.qmt basictest.qmt logicaltest.qmt nottest.qmt phi.qmt remtest.qmt Message-ID: <200309262057.PAA02311@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms: 2002-05-03-dividebyzeroexception.qmt updated: 1.1 -> 1.2 2002-05-03-notoperator.qmt updated: 1.1 -> 1.2 2002-09-03-setcc-bools.qmt updated: 1.1 -> 1.2 2003-05-12-divideerror.qmt updated: 1.1 -> 1.2 basictest.qmt updated: 1.1 -> 1.2 logicaltest.qmt updated: 1.1 -> 1.2 nottest.qmt updated: 1.1 -> 1.2 phi.qmt updated: 1.1 -> 1.2 remtest.qmt updated: 1.1 -> 1.2 --- Log message: Corrected the pathnames to the source file. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt diff -u llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt:1.1 llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt:1.2 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt:1.1 Fri Sep 26 15:53:06 2003 +++ llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-dividebyzeroexception.qmt Fri Sep 26 15:56:49 2003 @@ -1,2 +1,2 @@ -.*test/Regression/Transforms/BasicAA/2002-05-03-DivideByZeroException.ll +.*test/Regression/Transforms/ConstProp/2002-05-03-DivideByZeroException.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-notoperator.qmt diff -u llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-notoperator.qmt:1.1 llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-notoperator.qmt:1.2 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-notoperator.qmt:1.1 Fri Sep 26 15:53:06 2003 +++ llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-05-03-notoperator.qmt Fri Sep 26 15:56:49 2003 @@ -1,2 +1,2 @@ -.*test/Regression/Transforms/BasicAA/2002-05-03-NotOperator.ll +.*test/Regression/Transforms/ConstProp/2002-05-03-NotOperator.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-09-03-setcc-bools.qmt diff -u llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-09-03-setcc-bools.qmt:1.1 llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-09-03-setcc-bools.qmt:1.2 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-09-03-setcc-bools.qmt:1.1 Fri Sep 26 15:53:06 2003 +++ llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2002-09-03-setcc-bools.qmt Fri Sep 26 15:56:49 2003 @@ -1,2 +1,2 @@ -.*test/Regression/Transforms/BasicAA/2002-09-03-SetCC-Bools.ll +.*test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2003-05-12-divideerror.qmt diff -u llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2003-05-12-divideerror.qmt:1.1 llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2003-05-12-divideerror.qmt:1.2 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2003-05-12-divideerror.qmt:1.1 Fri Sep 26 15:53:06 2003 +++ llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/2003-05-12-divideerror.qmt Fri Sep 26 15:56:49 2003 @@ -1,2 +1,2 @@ -.*test/Regression/Transforms/BasicAA/2003-05-12-DivideError.ll +.*test/Regression/Transforms/ConstProp/2003-05-12-DivideError.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/basictest.qmt diff -u llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/basictest.qmt:1.1 llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/basictest.qmt:1.2 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/basictest.qmt:1.1 Fri Sep 26 15:53:06 2003 +++ llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/basictest.qmt Fri Sep 26 15:56:49 2003 @@ -1,2 +1,2 @@ -.*test/Regression/Transforms/BasicAA/basictest.ll +.*test/Regression/Transforms/ConstProp/basictest.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/logicaltest.qmt diff -u llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/logicaltest.qmt:1.1 llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/logicaltest.qmt:1.2 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/logicaltest.qmt:1.1 Fri Sep 26 15:53:06 2003 +++ llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/logicaltest.qmt Fri Sep 26 15:56:49 2003 @@ -1,2 +1,2 @@ -.*test/Regression/Transforms/BasicAA/logicaltest.ll +.*test/Regression/Transforms/ConstProp/logicaltest.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/nottest.qmt diff -u llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/nottest.qmt:1.1 llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/nottest.qmt:1.2 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/nottest.qmt:1.1 Fri Sep 26 15:53:06 2003 +++ llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/nottest.qmt Fri Sep 26 15:56:49 2003 @@ -1,2 +1,2 @@ -.*test/Regression/Transforms/BasicAA/nottest.ll +.*test/Regression/Transforms/ConstProp/nottest.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/phi.qmt diff -u llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/phi.qmt:1.1 llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/phi.qmt:1.2 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/phi.qmt:1.1 Fri Sep 26 15:53:06 2003 +++ llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/phi.qmt Fri Sep 26 15:56:49 2003 @@ -1,2 +1,2 @@ -.*test/Regression/Transforms/BasicAA/phi.ll +.*test/Regression/Transforms/ConstProp/phi.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/remtest.qmt diff -u llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/remtest.qmt:1.1 llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/remtest.qmt:1.2 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/remtest.qmt:1.1 Fri Sep 26 15:53:06 2003 +++ llvm/test/QMTestDB/regression.qms/transforms.qms/constprop.qms/remtest.qmt Fri Sep 26 15:56:49 2003 @@ -1,2 +1,2 @@ -.*test/Regression/Transforms/BasicAA/remtest.ll +.*test/Regression/Transforms/ConstProp/remtest.ll From criswell at cs.uiuc.edu Fri Sep 26 16:02:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 16:02:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/constantmerge.qms/2002-09-23-cprupdate.qmt Message-ID: <200309262101.QAA05131@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/constantmerge.qms: 2002-09-23-cprupdate.qmt added (r1.1) --- Log message: Adding new test. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/transforms.qms/constantmerge.qms/2002-09-23-cprupdate.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/constantmerge.qms/2002-09-23-cprupdate.qmt:1.1 *** /dev/null Fri Sep 26 16:01:46 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/constantmerge.qms/2002-09-23-cprupdate.qmt Fri Sep 26 16:01:36 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/ConstantMerge/2002-09-23-CPR-Update.ll From criswell at cs.uiuc.edu Fri Sep 26 16:17:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 16:17:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/functionresolve.qms/2003-08-23-argumentwarning.qmt Message-ID: <200309262116.QAA05211@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/functionresolve.qms: 2003-08-23-argumentwarning.qmt added (r1.1) --- Log message: New test. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/transforms.qms/functionresolve.qms/2003-08-23-argumentwarning.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/functionresolve.qms/2003-08-23-argumentwarning.qmt:1.1 *** /dev/null Fri Sep 26 16:16:34 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/functionresolve.qms/2003-08-23-argumentwarning.qmt Fri Sep 26 16:16:24 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/FunctionResolve/2003-08-23-ArgumentWarning.ll From criswell at cs.uiuc.edu Fri Sep 26 16:22:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 16:22:02 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-14-inlinevalue.qmt 2003-09-22-phinodesinexceptiondest.qmt 2003-09-22-phinodesinnormalinvokedest.qmt cfg_preserve_test.qmt inline_dce.qmt invoke_test-1.qmt invoke_test-2.qmt invoke_test-3.qmt Message-ID: <200309262121.QAA08226@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms: 2003-09-14-inlinevalue.qmt added (r1.1) 2003-09-22-phinodesinexceptiondest.qmt added (r1.1) 2003-09-22-phinodesinnormalinvokedest.qmt added (r1.1) cfg_preserve_test.qmt added (r1.1) inline_dce.qmt added (r1.1) invoke_test-1.qmt added (r1.1) invoke_test-2.qmt added (r1.1) invoke_test-3.qmt added (r1.1) --- Log message: Added new inline transformation tests. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-14-inlinevalue.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-14-inlinevalue.qmt:1.1 *** /dev/null Fri Sep 26 16:21:39 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-14-inlinevalue.qmt Fri Sep 26 16:21:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/Inline/2003-09-14-InlineValue.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-22-phinodesinexceptiondest.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-22-phinodesinexceptiondest.qmt:1.1 *** /dev/null Fri Sep 26 16:21:39 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-22-phinodesinexceptiondest.qmt Fri Sep 26 16:21:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/Inline/2003-09-22-PHINodesInExceptionDest.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-22-phinodesinnormalinvokedest.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-22-phinodesinnormalinvokedest.qmt:1.1 *** /dev/null Fri Sep 26 16:21:39 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/2003-09-22-phinodesinnormalinvokedest.qmt Fri Sep 26 16:21:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/Inline/2003-09-22-PHINodesInNormalInvokeDest.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/cfg_preserve_test.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/cfg_preserve_test.qmt:1.1 *** /dev/null Fri Sep 26 16:21:39 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/cfg_preserve_test.qmt Fri Sep 26 16:21:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/Inline/cfg_preserve_test.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/inline_dce.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/inline_dce.qmt:1.1 *** /dev/null Fri Sep 26 16:21:39 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/inline_dce.qmt Fri Sep 26 16:21:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/Inline/inline_dce.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/invoke_test-1.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/invoke_test-1.qmt:1.1 *** /dev/null Fri Sep 26 16:21:39 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/invoke_test-1.qmt Fri Sep 26 16:21:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/Inline/invoke_test-1.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/invoke_test-2.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/invoke_test-2.qmt:1.1 *** /dev/null Fri Sep 26 16:21:39 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/invoke_test-2.qmt Fri Sep 26 16:21:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/Inline/invoke_test-2.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/invoke_test-3.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/invoke_test-3.qmt:1.1 *** /dev/null Fri Sep 26 16:21:39 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/inline.qms/invoke_test-3.qmt Fri Sep 26 16:21:29 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/Inline/invoke_test-3.ll From criswell at cs.uiuc.edu Fri Sep 26 16:28:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 16:28:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/instcombine.qms/2003-08-12-allocanonnull.qmt 2003-09-09-volatileloadelim.qmt Message-ID: <200309262127.QAA11174@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/instcombine.qms: 2003-08-12-allocanonnull.qmt added (r1.1) 2003-09-09-volatileloadelim.qmt added (r1.1) --- Log message: Added two new regression tests. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/transforms.qms/instcombine.qms/2003-08-12-allocanonnull.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/instcombine.qms/2003-08-12-allocanonnull.qmt:1.1 *** /dev/null Fri Sep 26 16:27:43 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/instcombine.qms/2003-08-12-allocanonnull.qmt Fri Sep 26 16:27:33 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll Index: llvm/test/QMTestDB/regression.qms/transforms.qms/instcombine.qms/2003-09-09-volatileloadelim.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/instcombine.qms/2003-09-09-volatileloadelim.qmt:1.1 *** /dev/null Fri Sep 26 16:27:43 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/instcombine.qms/2003-09-09-volatileloadelim.qmt Fri Sep 26 16:27:33 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/InstCombine/2003-09-09-VolatileLoadElim.ll From criswell at cs.uiuc.edu Fri Sep 26 16:32:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Sep 26 16:32:01 2003 Subject: [llvm-commits] CVS: llvm/test/QMTestDB/regression.qms/transforms.qms/loopprehreaders.qms/2003-08-15-preheadersfail.qmt Message-ID: <200309262131.QAA14246@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTestDB/regression.qms/transforms.qms/loopprehreaders.qms: 2003-08-15-preheadersfail.qmt added (r1.1) --- Log message: Adding new test. --- Diffs of the changes: Index: llvm/test/QMTestDB/regression.qms/transforms.qms/loopprehreaders.qms/2003-08-15-preheadersfail.qmt diff -c /dev/null llvm/test/QMTestDB/regression.qms/transforms.qms/loopprehreaders.qms/2003-08-15-preheadersfail.qmt:1.1 *** /dev/null Fri Sep 26 16:31:43 2003 --- llvm/test/QMTestDB/regression.qms/transforms.qms/loopprehreaders.qms/2003-08-15-preheadersfail.qmt Fri Sep 26 16:31:33 2003 *************** *** 0 **** --- 1,2 ---- + + .*test/Regression/Transforms/LoopPreheaders/2003-08-15-PreheadersFail.ll From brukman at cs.uiuc.edu Sat Sep 27 17:27:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Sat Sep 27 17:27:00 2003 Subject: [llvm-commits] CVS: llvm/tools/llee/ExecveHandler.c SysUtils.c Message-ID: <200309272226.RAA06970@zion.cs.uiuc.edu> Changes in directory llvm/tools/llee: ExecveHandler.c updated: 1.2 -> 1.3 SysUtils.c updated: 1.2 -> 1.3 --- Log message: Squelch warnings. --- Diffs of the changes: Index: llvm/tools/llee/ExecveHandler.c diff -u llvm/tools/llee/ExecveHandler.c:1.2 llvm/tools/llee/ExecveHandler.c:1.3 --- llvm/tools/llee/ExecveHandler.c:1.2 Fri Aug 15 18:31:16 2003 +++ llvm/tools/llee/ExecveHandler.c Sat Sep 27 17:26:37 2003 @@ -63,7 +63,7 @@ /* Read the header from the file */ ssize_t bytesRead = read(file, header, headerSize); close(file); - if (bytesRead != headerSize) return EIO; + if (bytesRead != (ssize_t)headerSize) return EIO; if (!memcmp(llvmHeader, header, headerSize)) { /* * This is a bytecode file, so execute the JIT with the program and Index: llvm/tools/llee/SysUtils.c diff -u llvm/tools/llee/SysUtils.c:1.2 llvm/tools/llee/SysUtils.c:1.3 --- llvm/tools/llee/SysUtils.c:1.2 Fri Aug 15 18:31:16 2003 +++ llvm/tools/llee/SysUtils.c Sat Sep 27 17:26:37 2003 @@ -42,7 +42,7 @@ char *FindExecutable(const char *ExeName) { /* Try to find the executable in the path */ const char *PathStr = getenv("PATH"); - if (PathStr == 0) return ""; + if (PathStr == 0) return 0; /* Now we have a colon separated list of directories to search, try them. */ unsigned PathLen = strlen(PathStr); @@ -51,7 +51,7 @@ const char *Colon = strchr(PathStr, ':'); /* Check to see if this first directory contains the executable... */ - unsigned DirLen = Colon ? (Colon-PathStr) : strlen(PathStr); + unsigned DirLen = Colon ? (unsigned)(Colon-PathStr) : strlen(PathStr); char *FilePath = alloca(sizeof(char) * (DirLen+1+strlen(ExeName)+1)); unsigned i, e; for (i = 0; i != DirLen; ++i)