From gaeke at cs.uiuc.edu Mon Nov 10 01:10:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Nov 10 01:10:01 2003 Subject: [llvm-commits] CVS: reopt/test/TEST.reopt.Makefile Message-ID: <200311100709.BAA09839@seraph.cs.uiuc.edu> Changes in directory reopt/test: TEST.reopt.Makefile updated: 1.4 -> 1.5 --- Log message: Link in as many libraries as are needed to get my reoptimizer hacks to link. Ugh. Also, pretty up the status messages, and add support for diffing the output of the reoptimized version against the llc version. --- Diffs of the changes: (+26 -14) Index: reopt/test/TEST.reopt.Makefile diff -u reopt/test/TEST.reopt.Makefile:1.4 reopt/test/TEST.reopt.Makefile:1.5 --- reopt/test/TEST.reopt.Makefile:1.4 Wed Aug 27 15:40:56 2003 +++ reopt/test/TEST.reopt.Makefile Mon Nov 10 01:08:51 2003 @@ -4,10 +4,10 @@ # output is 1) any debug output the reoptimizer outputs, if its debug flags # are set # 2) no core dumps unless the unaltered program also dumps core -# 3) same output as unaltered program -# -# Admittedly this is pretty weak but it serves as a kind of "hello -# world"-level test. +# 3) same output as program compiled with llc, without reoptimizer +# This makefile will check 3) for you, which effectively implies checking +# 2); it will (erroneously) assume things have broken if you turn on +# debug flags, though. # ##===----------------------------------------------------------------------===## @@ -21,9 +21,16 @@ $(REOPTLIBDIR)/scratchmemory.o # Libraries that contain common LLVM code the Reoptimizer depends on -REOPTIMIZER_LLVM_SUPPORT_LIBS = $(DESTLIBCURRENT)/libscalaropts.a \ - $(DESTLIBCURRENT)/libtransformutils.a $(DESTLIBCURRENT)/vmcore.o \ - $(DESTLIBCURRENT)/libsupport.a $(DESTLIBCURRENT)/bcreader.o +REOPTIMIZER_LLVM_SUPPORT_LIBS = \ + $(DESTLIBCURRENT)/vmcore.o \ + $(DESTLIBCURRENT)/bcreader.o $(DESTLIBCURRENT)/bcwriter.o \ + $(DESTLIBCURRENT)/sparc.o $(DESTLIBCURRENT)/sched.o \ + $(DESTLIBCURRENT)/libsupport.a $(DESTLIBCURRENT)/select.o \ + $(DESTLIBCURRENT)/target.o $(DESTLIBCURRENT)/libregalloc.a \ + $(DESTLIBCURRENT)/livevar.o $(DESTLIBCURRENT)/codegen.o \ + $(DESTLIBCURRENT)/libscalaropts.a \ + $(DESTLIBCURRENT)/libtransformutils.a \ + $(DESTLIBCURRENT)/libanalysis.a # Solaris libraries that the Reoptimizer depends on REOPTIMIZER_SOLARIS_SUPPORT_LIBS = -lcpc -lm -lrt -lmalloc @@ -40,8 +47,8 @@ .PRECIOUS: Output/%.out-reopt-llc $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \ -test.$(TEST).%: Output/%.out-reopt-llc - @echo "=========================================" +test.$(TEST).%: Output/%.diff-reopt-llc + @echo "===== Finished running Reoptimizer tests for $(TESTNAME) =====" # 1. Run the necessary opt passes over the bytecode, then... # 1a. Compile it with LLC, using the SPARC backend's special option to @@ -49,9 +56,10 @@ # compile times significantly. $(PROGRAMS_TO_TEST:%=Output/%.reopt-llc.s): \ Output/%.reopt-llc.s: Output/%.llvm.bc - @echo "=========================================" - @echo "Compiling Reoptimizer version of '$(TESTNAME)'" - -$(LOPT) -q -inline -lowerswitch -branch-combine -emitfuncs -instloops $< | $(LLC) $(LLCFLAGS) -disable-sched -disable-strip -f -enable-maps -o $@ + @echo "===== Building Reoptimizer version of $(TESTNAME) =====" + -$(LOPT) -q -inline -lowerswitch -branch-combine -emitfuncs -instloops $< |\ + $(LLC) $(LLCFLAGS) -disable-sched -disable-strip -f -enable-maps \ + -save-ra-state -o $@ # 2. Link the instrumented binary with the necessary parts of the # compiler. @@ -62,7 +70,11 @@ # 3. Run the reoptimized version. $(PROGRAMS_TO_TEST:%=Output/%.out-reopt-llc): \ Output/%.out-reopt-llc: Output/%.reopt-llc - @echo "Running Reoptimizer version of '$(TESTNAME)'" + @echo "===== Running Reoptimizer version of $(TESTNAME) =====" -$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS) - @echo "Output in" `pwd`/$@ + +# 4. Diff it against the plain old llc version +$(PROGRAMS_TO_TEST:%=Output/%.diff-reopt-llc): \ +Output/%.diff-reopt-llc: Output/%.out-llc Output/%.out-reopt-llc + -$(DIFFPROG) reopt-llc $* $(HIDEDIFF) From gaeke at cs.uiuc.edu Mon Nov 10 01:13:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Mon Nov 10 01:13:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Message-ID: <200311100712.BAA09854@seraph.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: PhyRegAlloc.cpp updated: 1.128 -> 1.129 --- Log message: Fix problems linking against the reoptimizer; _llvm_regAllocState must have externally-visible linkage, and SaveStateToModule must default to true for llc. I don't remember why I made it const; perhaps it should be deconstified. --- Diffs of the changes: (+2 -2) Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.128 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.129 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.128 Sun Nov 9 18:05:25 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Mon Nov 10 01:12:01 2003 @@ -53,7 +53,7 @@ /// allocator's state after it has done its job. This is a hack. /// PhyRegAlloc::SavedStateMapTy ExportedFnAllocState; -const bool SaveStateToModule = false; +const bool SaveStateToModule = true; static cl::opt DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA), @@ -1286,7 +1286,7 @@ std::vector CV2; CV2.push_back (ConstantUInt::get (Type::UIntTy, Size)); CV2.push_back (ConstantArray::get (AT2, allstate)); - new GlobalVariable (ST2, true, GlobalValue::InternalLinkage, + new GlobalVariable (ST2, true, GlobalValue::ExternalLinkage, ConstantStruct::get (ST2, CV2), "_llvm_regAllocState", &M); return false; // No error. From lattner at cs.uiuc.edu Mon Nov 10 12:09:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 12:09:01 2003 Subject: [llvm-commits] CVS: poolalloc/include/poolalloc/PoolAllocate.h Message-ID: <200311101808.MAA21114@zion.cs.uiuc.edu> Changes in directory poolalloc/include/poolalloc: PoolAllocate.h updated: 1.13 -> 1.14 --- Log message: Sometimes I feel never quite happy with my sets --- Diffs of the changes: (+3 -1) Index: poolalloc/include/poolalloc/PoolAllocate.h diff -u poolalloc/include/poolalloc/PoolAllocate.h:1.13 poolalloc/include/poolalloc/PoolAllocate.h:1.14 --- poolalloc/include/poolalloc/PoolAllocate.h:1.13 Sun Nov 9 19:25:38 2003 +++ poolalloc/include/poolalloc/PoolAllocate.h Mon Nov 10 12:08:48 2003 @@ -185,7 +185,9 @@ /// list. void InitializeAndDestroyPools(Function &F, const std::vector &NodesToPA, - std::map &PoolDescriptors); + std::map &PoolDescriptors, + std::set > &PoolUses, + std::set > &PoolFrees); }; #endif From lattner at cs.uiuc.edu Mon Nov 10 12:10:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 12:10:01 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311101809.MAA21138@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.37 -> 1.38 --- Log message: Implement intelligent placement of poolinit/destroy's. This does not yet elide any poolfree's though. --- Diffs of the changes: (+182 -31) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.37 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.38 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.37 Sun Nov 9 19:25:28 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 12:09:42 2003 @@ -7,15 +7,19 @@ #define DEBUG_TYPE "PoolAllocation" #include "poolalloc/PoolAllocate.h" -#include "llvm/Transforms/Utils/Cloning.h" -#include "llvm/Analysis/DataStructure.h" -#include "llvm/Analysis/DSGraph.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Instructions.h" #include "llvm/Module.h" +#include "llvm/Analysis/DataStructure.h" +#include "llvm/Analysis/DSGraph.h" +#include "llvm/Support/CFG.h" #include "llvm/Target/TargetData.h" +#include "llvm/Transforms/Utils/BasicBlockUtils.h" +#include "llvm/Transforms/Utils/Cloning.h" +#include "Support/CommandLine.h" #include "Support/Debug.h" +#include "Support/DepthFirstIterator.h" #include "Support/VectorExtras.h" #include "Support/Statistic.h" using namespace PA; @@ -25,7 +29,8 @@ namespace { Statistic<> NumArgsAdded("poolalloc", "Number of function arguments added"); Statistic<> NumCloned ("poolalloc", "Number of functions cloned"); - Statistic<> NumPools ("poolalloc", "Number of poolinit's inserted"); + Statistic<> NumPools ("poolalloc", "Number of pools allocated"); + Statistic<> NumPoolFree ("poolalloc", "Number of poolfree's elided"); const Type *VoidPtrTy; @@ -38,6 +43,9 @@ RegisterOpt X("poolalloc", "Pool allocate disjoint data structures"); + + cl::opt DisableInitDestroyOpt("poolalloc-force-simple-pool-init", + cl::desc("Always insert poolinit/pooldestroy calls at start and exit of functions")); } void PoolAllocate::getAnalysisUsage(AnalysisUsage &AU) const { @@ -543,7 +551,21 @@ // Create pool construction/destruction code if (!NodesToPA.empty()) - InitializeAndDestroyPools(NewF, NodesToPA, FI.PoolDescriptors); + InitializeAndDestroyPools(NewF, NodesToPA, FI.PoolDescriptors, + PoolUses, PoolFrees); +} + +template +static void AllOrNoneInSet(IteratorTy S, IteratorTy E, + std::set &Blocks, bool &AllIn, + bool &NoneIn) { + AllIn = true; + NoneIn = true; + for (; S != E; ++S) + if (Blocks.count(*S)) + NoneIn = false; + else + AllIn = false; } /// InitializeAndDestroyPools - This inserts calls to poolinit and pooldestroy @@ -551,41 +573,170 @@ /// void PoolAllocate::InitializeAndDestroyPools(Function &F, const std::vector &NodesToPA, - std::map &PoolDescriptors) { + std::map &PoolDescriptors, + std::set > &PoolUses, + std::set > &PoolFrees) { TargetData &TD = getAnalysis(); - - // Insert poolinit calls after all of the allocas... - Instruction *InsertPoint; - for (BasicBlock::iterator I = F.front().begin(); - isa(InsertPoint = I); ++I) - /*empty*/; + std::vector PoolInitPoints; + std::vector PoolDestroyPoints; + + if (DisableInitDestroyOpt) { + // Insert poolinit calls after all of the allocas... + Instruction *InsertPoint; + for (BasicBlock::iterator I = F.front().begin(); + isa(InsertPoint = I); ++I) + /*empty*/; + PoolInitPoints.push_back(InsertPoint); + + for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + if (isa(BB->getTerminator())) + PoolDestroyPoints.push_back(BB->getTerminator()); + } // Insert all of the poolalloc calls in the start of the function. for (unsigned i = 0, e = NodesToPA.size(); i != e; ++i) { DSNode *Node = NodesToPA[i]; - // Create a new alloca instruction for the pool... - Value *PD = PoolDescriptors[Node]; - Value *ElSize; + Value *ElSize = + ConstantUInt::get(Type::UIntTy, Node->getType()->isSized() ? + TD.getTypeSize(Node->getType()) : 4); - // Void types in DS graph are never used - if (Node->getType() != Type::VoidTy) { - ElSize = ConstantUInt::get(Type::UIntTy, TD.getTypeSize(Node->getType())); - } else { - ElSize = ConstantUInt::get(Type::UIntTy, 1); - } + AllocaInst *PD = cast(PoolDescriptors[Node]); + + // Convert the PoolUses/PoolFrees sets into something specific to this pool. + std::set UsingBlocks; + std::set FreeingBlocks; - // Insert the call to initialize the pool... - new CallInst(PoolInit, make_vector(PD, ElSize, 0), "", InsertPoint); - } + std::set >::iterator PUI = + PoolUses.lower_bound(std::make_pair(PD, (Instruction*)0)); + if (PUI != PoolUses.end() && PUI->first < PD) ++PUI; + for (; PUI != PoolUses.end() && PUI->first == PD; ++PUI) + UsingBlocks.insert(PUI->second->getParent()); + + std::set >::iterator PFI = + PoolFrees.lower_bound(std::make_pair(PD, (CallInst*)0)); + if (PFI != PoolFrees.end() && PFI->first < PD) ++PFI; + for (; PFI != PoolFrees.end() && PFI->first == PD; ++PFI) + FreeingBlocks.insert(PUI->second->getParent()); + + // To calculate all of the basic blocks which require the pool to be + // initialized before, do a depth first search on the CFG from the using + // blocks. + std::set InitializedBefore; + std::set DestroyedAfter; + for (std::set::iterator I = UsingBlocks.begin(), + E = UsingBlocks.end(); I != E; ++I) { + for (df_ext_iterator > + DI = df_ext_begin(*I, InitializedBefore), + DE = df_ext_end(*I, InitializedBefore); DI != DE; ++DI) + /* empty */; + + for (idf_ext_iterator > + DI = idf_ext_begin(*I, DestroyedAfter), + DE = idf_ext_end(*I, DestroyedAfter); DI != DE; ++DI) + /* empty */; + } - // Loop over all of the return nodes in the CFG... - for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) - if (isa(BB->getTerminator())) - for (unsigned i = 0, e = NodesToPA.size(); i != e; ++i) - // Insert the pooldestroy call for this pool. - new CallInst(PoolDestroy, make_vector(PoolDescriptors[NodesToPA[i]], 0), - "", BB->getTerminator()); + // Now that we have created the sets, intersect them. + std::set LiveBlocks; + std::set_intersection(InitializedBefore.begin(), InitializedBefore.end(), + DestroyedAfter.begin(), DestroyedAfter.end(), + std::inserter(LiveBlocks, LiveBlocks.end())); + InitializedBefore.clear(); + DestroyedAfter.clear(); + + // Keep track of the blocks we have inserted poolinit/destroy in + std::set PoolInitInsertedBlocks, PoolDestroyInsertedBlocks; + + std::cerr << "POOL: " << PD->getName() << " information:\n"; + std::cerr << " Live in blocks: "; + for (std::set::iterator I = LiveBlocks.begin(), + E = LiveBlocks.end(); I != E; ++I) { + BasicBlock *BB = *I; + TerminatorInst *Term = BB->getTerminator(); + std::cerr << BB->getName() << " "; + + // Check the predecessors of this block. If any preds are not in the + // set, or if there are no preds, insert a pool init. + bool AllIn, NoneIn; + AllOrNoneInSet(pred_begin(BB), pred_end(BB), LiveBlocks, AllIn, NoneIn); + + if (NoneIn) { + if (!PoolInitInsertedBlocks.count(BB)) { + BasicBlock::iterator It = BB->begin(); + // Move through all of the instructions not in the pool + while (!PoolUses.count(std::make_pair(PD, It))) + ++It; // Advance past non-users + PoolInitPoints.push_back(It); + PoolInitInsertedBlocks.insert(BB); + } + } else if (!AllIn) { + TryAgainPred: + for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) + if (!LiveBlocks.count(*PI) && !PoolInitInsertedBlocks.count(*PI)) { + if (SplitCriticalEdge(BB, PI)) + // If the critical edge was split, *PI was invalidated + goto TryAgainPred; + + // Insert at the end of the predecessor, before the terminator. + PoolInitPoints.push_back((*PI)->getTerminator()); + PoolInitInsertedBlocks.insert(*PI); + } + } + // Check the successors of this block. If some succs are not in the set, + // insert destroys on those successor edges. If all succs are not in the + // set, insert a destroy in this block. + AllOrNoneInSet(succ_begin(BB), succ_end(BB), LiveBlocks, AllIn, NoneIn); + + if (NoneIn) { + // Insert before the terminator. + if (!PoolDestroyInsertedBlocks.count(BB)) { + BasicBlock::iterator It = Term; + + // Rewind to the first using insruction + while (!PoolUses.count(std::make_pair(PD, It))) + --It; + + // Insert after the first using instruction + PoolDestroyPoints.push_back(++It); + PoolDestroyInsertedBlocks.insert(BB); + } + } else if (!AllIn) { + for (succ_iterator SI = succ_begin(BB), E = succ_end(BB); SI != E; ++SI) + if (!LiveBlocks.count(*SI) && !PoolDestroyInsertedBlocks.count(*SI)) { + // If this edge is critical, split it. + SplitCriticalEdge(BB, SI); + + // Insert at entry to the successor, but after any PHI nodes. + BasicBlock::iterator It = (*SI)->begin(); + while (isa(It)) ++It; + PoolDestroyPoints.push_back(It); + PoolDestroyInsertedBlocks.insert(*SI); + } + } + } + std::cerr << "\n Init in blocks: "; + + // Insert the calls to initialize the pool... + for (unsigned i = 0, e = PoolInitPoints.size(); i != e; ++i) { + new CallInst(PoolInit, make_vector((Value*)PD, ElSize, 0), "", + PoolInitPoints[i]); + std::cerr << PoolInitPoints[i]->getParent()->getName() << " "; + } + PoolInitPoints.clear(); + + std::cerr << "\n Destroy in blocks: "; + + // Loop over all of the places to insert pooldestroy's... + for (unsigned i = 0, e = PoolDestroyPoints.size(); i != e; ++i) { + // Insert the pooldestroy call for this pool. + new CallInst(PoolDestroy, make_vector((Value*)PD, 0), "", + PoolDestroyPoints[i]); + std::cerr << PoolDestroyPoints[i]->getParent()->getName() << " "; + } + PoolDestroyPoints.clear(); + std::cerr << "\n\n"; + } } From lattner at cs.uiuc.edu Mon Nov 10 12:10:05 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 12:10:05 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Message-ID: <200311101809.MAA21127@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: TransformFunctionBody.cpp updated: 1.5 -> 1.6 --- Log message: Do not add a use of the instruction being deleted!! --- Diffs of the changes: (+5 -4) Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.5 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.6 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.5 Sun Nov 9 19:25:28 2003 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Mon Nov 10 12:09:07 2003 @@ -290,8 +290,6 @@ // NB: PH is zero even if the node is collapsed if (PH == 0) return; - AddPoolUse(MI, PH, PoolUses); - std::string Name = MI.getName(); MI.setName(""); // Insert a call to poolalloc @@ -303,8 +301,11 @@ AllocSize = BinaryOperator::create(Instruction::Mul, AllocSize, MI.getOperand(0), "sizetmp", &MI); - Value *V = new CallInst(PAInfo.PoolAlloc, make_vector(PH, AllocSize, 0), - Name, &MI); + Instruction *V = new CallInst(PAInfo.PoolAlloc, make_vector(PH, AllocSize, 0), + Name, &MI); + + AddPoolUse(*V, PH, PoolUses); + // Cast to the appropriate type if necessary Value *Casted = V; From lattner at cs.uiuc.edu Mon Nov 10 13:01:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 13:01:01 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp TransformFunctionBody.cpp Message-ID: <200311101900.NAA22800@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.38 -> 1.39 TransformFunctionBody.cpp updated: 1.6 -> 1.7 --- Log message: Pool allocate collapsed nodes! --- Diffs of the changes: (+3 -31) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.38 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.39 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.38 Mon Nov 10 12:09:42 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 13:00:32 2003 @@ -178,9 +178,6 @@ ProcessFunctionBody(*I, FI != FuncMap.end() ? *FI->second : *I); } - if (CollapseFlag) - std::cerr << "Pool Allocation successful!" - << " However all data structures may not be pool allocated\n"; return true; } Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.6 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.7 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.6 Mon Nov 10 12:09:07 2003 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Mon Nov 10 13:00:32 2003 @@ -91,35 +91,11 @@ return G.getScalarMap()[V]; } - DSNodeHandle& getTDDSNodeHFor(Value *V) { - if (!FI.NewToOldValueMap.empty()) { - // If the NewToOldValueMap is in effect, use it. - std::map::iterator I = FI.NewToOldValueMap.find(V); - if (I != FI.NewToOldValueMap.end()) - V = (Value*)I->second; - } - - return TDG.getScalarMap()[V]; - } - Value *getPoolHandle(Value *V) { DSNode *Node = getDSNodeHFor(V).getNode(); // Get the pool handle for this DSNode... std::map::iterator I = FI.PoolDescriptors.find(Node); - - if (I != FI.PoolDescriptors.end()) { - // Check that the node pointed to by V in the TD DS graph is not - // collapsed - DSNode *TDNode = getTDDSNodeHFor(V).getNode(); - if (TDNode && TDNode->getType() != Type::VoidTy) - return I->second; - - PAInfo.CollapseFlag = 1; - return 0; - } - else - return 0; - + return I != FI.PoolDescriptors.end() ? I->second : 0; } bool isFuncPtr(Value *V); @@ -167,9 +143,8 @@ // if V is not a constant DSNode *DSN = TDG.getNodeForValue(V).getNode(); - if (!DSN) { - return 0; - } + if (!DSN) return 0; + const std::vector &Callees = DSN->getGlobals(); if (Callees.size() > 0) { Function *calledF = dyn_cast(*Callees.begin()); From lattner at cs.uiuc.edu Mon Nov 10 13:02:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 13:02:02 2003 Subject: [llvm-commits] CVS: poolalloc/include/poolalloc/PoolAllocate.h Message-ID: <200311101901.NAA22812@zion.cs.uiuc.edu> Changes in directory poolalloc/include/poolalloc: PoolAllocate.h updated: 1.14 -> 1.15 --- Log message: Remove the collapsed flag, which was never initialized, so always printed the message --- Diffs of the changes: (+0 -5) Index: poolalloc/include/poolalloc/PoolAllocate.h diff -u poolalloc/include/poolalloc/PoolAllocate.h:1.14 poolalloc/include/poolalloc/PoolAllocate.h:1.15 --- poolalloc/include/poolalloc/PoolAllocate.h:1.14 Mon Nov 10 12:08:48 2003 +++ poolalloc/include/poolalloc/PoolAllocate.h Mon Nov 10 13:00:55 2003 @@ -111,11 +111,6 @@ // on this map. std::map EqClass2LastPoolArg; - // Exception flags - // CollapseFlag set if all data structures are not pool allocated, due to - // collapsing of nodes in the DS graph - unsigned CollapseFlag; - public: bool run(Module &M); From lattner at cs.uiuc.edu Mon Nov 10 13:40:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 13:40:02 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311101939.NAA27940@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.39 -> 1.40 --- Log message: Make sure to remove pool frees which are not in regions of the CFG where the pool is live --- Diffs of the changes: (+21 -10) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.39 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.40 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.39 Mon Nov 10 13:00:32 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 13:39:12 2003 @@ -565,6 +565,16 @@ AllIn = false; } +static void DeleteIfIsPoolFree(Instruction *I, AllocaInst *PD, + std::set > &PoolFrees) { + if (CallInst *CI = dyn_cast(I)) + if (PoolFrees.count(std::make_pair(PD, CI))) { + PoolFrees.erase(std::make_pair(PD, CI)); + I->getParent()->getInstList().erase(I); + ++NumPoolFree; + } +} + /// InitializeAndDestroyPools - This inserts calls to poolinit and pooldestroy /// into the function to initialize and destroy the pools in the NodesToPA list. /// @@ -603,20 +613,13 @@ // Convert the PoolUses/PoolFrees sets into something specific to this pool. std::set UsingBlocks; - std::set FreeingBlocks; - + std::set >::iterator PUI = PoolUses.lower_bound(std::make_pair(PD, (Instruction*)0)); if (PUI != PoolUses.end() && PUI->first < PD) ++PUI; for (; PUI != PoolUses.end() && PUI->first == PD; ++PUI) UsingBlocks.insert(PUI->second->getParent()); - std::set >::iterator PFI = - PoolFrees.lower_bound(std::make_pair(PD, (CallInst*)0)); - if (PFI != PoolFrees.end() && PFI->first < PD) ++PFI; - for (; PFI != PoolFrees.end() && PFI->first == PD; ++PFI) - FreeingBlocks.insert(PUI->second->getParent()); - // To calculate all of the basic blocks which require the pool to be // initialized before, do a depth first search on the CFG from the using // blocks. @@ -664,7 +667,8 @@ BasicBlock::iterator It = BB->begin(); // Move through all of the instructions not in the pool while (!PoolUses.count(std::make_pair(PD, It))) - ++It; // Advance past non-users + // Advance past non-users deleting any pool frees that we run across + DeleteIfIsPoolFree(It++, PD, PoolFrees); PoolInitPoints.push_back(It); PoolInitInsertedBlocks.insert(BB); } @@ -694,7 +698,7 @@ // Rewind to the first using insruction while (!PoolUses.count(std::make_pair(PD, It))) - --It; + DeleteIfIsPoolFree(It--, PD, PoolFrees); // Insert after the first using instruction PoolDestroyPoints.push_back(++It); @@ -735,5 +739,12 @@ } PoolDestroyPoints.clear(); std::cerr << "\n\n"; + + // Delete any pool frees which are not in live blocks. + std::set >::iterator PFI = + PoolFrees.lower_bound(std::make_pair(PD, (CallInst*)0)); + if (PFI != PoolFrees.end() && PFI->first < PD) ++PFI; + for (; PFI != PoolFrees.end() && PFI->first == PD; ) + DeleteIfIsPoolFree((PFI++)->second, PD, PoolFrees); } } From criswell at cs.uiuc.edu Mon Nov 10 13:43:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Nov 10 13:43:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/Makefile PoolAllocator.cpp PoolAllocator.h Message-ID: <200311101942.NAA16781@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: Makefile added (r1.1) PoolAllocator.cpp added (r1.1) PoolAllocator.h added (r1.1) --- Log message: Adding initial version of Free List Pool Allocation. Important changes suggested by Vikram will be coming soon. --- Diffs of the changes: (+327 -0) Index: poolalloc/runtime/FreeListAllocator/Makefile diff -c /dev/null poolalloc/runtime/FreeListAllocator/Makefile:1.1 *** /dev/null Mon Nov 10 13:42:49 2003 --- poolalloc/runtime/FreeListAllocator/Makefile Mon Nov 10 13:42:39 2003 *************** *** 0 **** --- 1,9 ---- + LEVEL = ../.. + BYTECODE_LIBRARY=1 + SHARED_LIBRARY=1 + LIBRARYNAME=poolalloc_rt + + include $(LEVEL)/Makefile.common + + # Always build optimized and debug versions + all:: $(LIBNAME_OBJO) $(LIBNAME_OBJG) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -c /dev/null poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.1 *** /dev/null Mon Nov 10 13:42:49 2003 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Mon Nov 10 13:42:39 2003 *************** *** 0 **** --- 1,272 ---- + //===- PoolAllocatorChained.cpp - Implementation of poolallocator runtime -===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file is one possible implementation of the LLVM pool allocator runtime + // library. + // + //===----------------------------------------------------------------------===// + + #include "PoolAllocator.h" + #include + #include + #include + + #undef assert + #define assert(X) + + typedef union + { + unsigned char * memory; + struct NodeHeader * header; + } NodePointer; + + struct NodeHeader + { + // Pointer to the slab which owns me + struct SlabHeader * Slab; + + // Pointer to the next node on the free list + NodePointer Next; + }; + + //===----------------------------------------------------------------------===// + // + // PoolSlab implementation + // + //===----------------------------------------------------------------------===// + struct SlabHeader + { + // Number of nodes per slab + unsigned int NodesPerSlab; + + // The size of each node + unsigned int NodeSize; + + // Reference Count + unsigned int LiveNodes; + + // Pointer to the next slab + struct SlabHeader * Next; + + // Pointer to the list of nodes + NodePointer Nodes; + }; + + // + // Function: createSlab () + // + // Description: + // Allocate memory for a new slab and initialize the slab. + // + struct SlabHeader * + createSlab (unsigned int NodeSize) + { + // Pointer to the new Slab + struct SlabHeader * NewSlab; + + // Pointer to the new node + struct NodeHeader NewNode; + + // The number of elements in the slab + const unsigned int NodesPerSlab = 128; + + // Pointers and index for initializing memory + NodePointer p; + unsigned int index; + + // + // Allocate a piece of memory for the new slab. + // + NewSlab = (struct SlabHeader *) malloc (sizeof (struct SlabHeader)); + assert (NewSlab != NULL); + + // + // Initialize the contents of the slab. + // + NewSlab->NodeSize = NodeSize; + NewSlab->NodesPerSlab = NodesPerSlab; + NewSlab->LiveNodes = 0; + NewSlab->Next = NULL; + + // + // Allocate enough memory for all the nodes. + // + NewSlab->Nodes.memory = (unsigned char *) malloc ((sizeof (struct NodeHeader) + NodeSize) * NodesPerSlab); + assert (NewSlab->Nodes.memory != NULL); + + // + // Initialize each node in the list. + // + for (p = NewSlab->Nodes, index = 0; index < NodesPerSlab; index++) + { + p.header->Slab = NewSlab; + if (index == (NodesPerSlab - 1)) + { + p.header->Next.memory = NULL; + } + else + { + p.header->Next.memory = (p.memory += (sizeof (struct NodeHeader) + NodeSize)); + } + } + + return NewSlab; + } + + // + // Function: slabAlloc() + // + // Description: + // Increase the slab's reference count. + // + void + slabAlloc (SlabHeader * Slab) + { + Slab->LiveNodes++; + return; + } + + // + // Function: slabFree () + // + // Description: + // Decrease the slab's reference count. + // + void + slabFree (SlabHeader * Slab) + { + Slab->LiveNodes--; + return; + } + + //===----------------------------------------------------------------------===// + // + // Pool allocator library implementation + // + //===----------------------------------------------------------------------===// + + // poolinit - Initialize a pool descriptor to empty + // + void poolinit(PoolTy *Pool, unsigned int NodeSize) + { + assert(Pool && "Null pool pointer passed into poolinit!\n"); + + // We must alway return unique pointers, even if they asked for 0 bytes + Pool->NodeSize = NodeSize ? NodeSize : 1; + Pool->Slabs = NULL; + Pool->FreeList = NULL; + Pool->FreeablePool = 1; + + return; + } + + void poolmakeunfreeable(PoolTy *Pool) + { + assert(Pool && "Null pool pointer passed in to poolmakeunfreeable!\n"); + Pool->FreeablePool = 0; + } + + // pooldestroy - Release all memory allocated for a pool + // + void pooldestroy(PoolTy *Pool) + { + // Pointer to scan Slab list + struct SlabHeader * Slabp; + + assert(Pool && "Null pool pointer passed in to pooldestroy!\n"); + for (Slabp = Pool->Slabs; Slabp != NULL; Slabp=Slabp->Next) + { + free (Slabp); + } + + return; + } + + void * + poolalloc(PoolTy *Pool) + { + assert(Pool && "Null pool pointer passed in to poolalloc!\n"); + + // + // If there isn't an available block, we need a new slab. + // + if (Pool->FreeList == NULL) + { + // + // Create a new slab and add it to the list. + // + struct SlabHeader * NewSlab = createSlab (Pool->NodeSize); + if (Pool->Slabs == NULL) + { + Pool->Slabs = NewSlab; + } + else + { + NewSlab->Next = Pool->Slabs; + Pool->Slabs = NewSlab; + } + + // + // Take the linked list of nodes inside the slab and add them to the + // free list. + // + Pool->FreeList = Pool->Slabs->Nodes.header; + } + + // + // Increase the slab's reference count. + // + slabAlloc (Pool->FreeList->Slab); + + // + // Grab the first element from the free list and return it. + // + NodePointer MemoryBlock; + + MemoryBlock.header = Pool->FreeList; + Pool->FreeList=Pool->FreeList->Next.header; + return (MemoryBlock.memory += sizeof (struct NodeHeader)); + } + + void * + poolallocarray(PoolTy* Pool, unsigned Size) + { + assert(Pool && "Null pool pointer passed into poolallocarray!\n"); + assert (0 && "Not implemented yet") + return NULL; + } + + void + poolfree (PoolTy * Pool, void * Block) + { + assert(Pool && "Null pool pointer passed in to poolfree!\n"); + assert(Block && "Null pool pointer passed in to poolfree!\n"); + + // Pointer to the node corresponding to this memory block + NodePointer Node; + + // + // Find the header of the memory block. + // + Node.memory = (unsigned char *)(Block) - (sizeof (struct NodeHeader)); + + // + // Decrease the slab's reference count. + // + slabFree (Node.header->Slab); + + // + // Add the node back to the free list. + // + Node.header->Next.header = Pool->FreeList; + Pool->FreeList = Node.header; + + return; + } + Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -c /dev/null poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.1 *** /dev/null Mon Nov 10 13:42:49 2003 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h Mon Nov 10 13:42:39 2003 *************** *** 0 **** --- 1,46 ---- + //===- PoolAllocator.h - Pool allocator runtime interface file --*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file defines the interface which is implemented by the LLVM pool + // allocator runtime library. + // + //===----------------------------------------------------------------------===// + + #ifndef POOLALLOCATOR_RUNTIME_H + #define POOLALLOCATOR_RUNTIME_H + + struct SlabHeader; + struct NodeHeader; + + typedef struct PoolTy { + // NodeSize - Keep track of the object size tracked by this pool + unsigned NodeSize; + + // Pointer to the list of slabs allocated for this pool + struct SlabHeader * Slabs; + + // Pointer to the free list of nodes + struct NodeHeader * FreeList; + + // FreeablePool - Set to false if the memory from this pool cannot be freed + // before destroy. + // + unsigned FreeablePool; + } PoolTy; + + extern "C" { + void poolinit(PoolTy *Pool, unsigned NodeSize); + void poolmakeunfreeable(PoolTy *Pool); + void pooldestroy(PoolTy *Pool); + void *poolalloc(PoolTy *Pool); + void poolfree(PoolTy *Pool, void *Node); + void* poolallocarray(PoolTy* Pool, unsigned Size); + } + + #endif From criswell at cs.uiuc.edu Mon Nov 10 13:43:04 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Nov 10 13:43:04 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/ Message-ID: <200311101942.NAA16761@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: --- Log message: Directory /home/vadve/vadve/Research/DynOpt/CVSRepository/poolalloc/runtime/FreeListAllocator added to the repository --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Mon Nov 10 13:53:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 13:53:02 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311101952.NAA28642@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.40 -> 1.41 --- Log message: DEBUGify printouts --- Diffs of the changes: (+9 -11) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.40 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.41 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.40 Mon Nov 10 13:39:12 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 13:52:23 2003 @@ -502,9 +502,7 @@ // Void types in DS graph are never used if (Node->getType() == Type::VoidTy) - std::cerr << "Node collapsing in '" << F.getName() - << "'. All Data Structures may not be pool allocated\n"; - + std::cerr << "Node collapsing in '" << F.getName() << "'\n"; ++NumPools; // Update the PoolDescriptors map @@ -649,13 +647,13 @@ // Keep track of the blocks we have inserted poolinit/destroy in std::set PoolInitInsertedBlocks, PoolDestroyInsertedBlocks; - std::cerr << "POOL: " << PD->getName() << " information:\n"; - std::cerr << " Live in blocks: "; + DEBUG(std::cerr << "POOL: " << PD->getName() << " information:\n"); + DEBUG(std::cerr << " Live in blocks: "); for (std::set::iterator I = LiveBlocks.begin(), E = LiveBlocks.end(); I != E; ++I) { BasicBlock *BB = *I; TerminatorInst *Term = BB->getTerminator(); - std::cerr << BB->getName() << " "; + DEBUG(std::cerr << BB->getName() << " "); // Check the predecessors of this block. If any preds are not in the // set, or if there are no preds, insert a pool init. @@ -718,27 +716,27 @@ } } } - std::cerr << "\n Init in blocks: "; + DEBUG(std::cerr << "\n Init in blocks: "); // Insert the calls to initialize the pool... for (unsigned i = 0, e = PoolInitPoints.size(); i != e; ++i) { new CallInst(PoolInit, make_vector((Value*)PD, ElSize, 0), "", PoolInitPoints[i]); - std::cerr << PoolInitPoints[i]->getParent()->getName() << " "; + DEBUG(std::cerr << PoolInitPoints[i]->getParent()->getName() << " "); } PoolInitPoints.clear(); - std::cerr << "\n Destroy in blocks: "; + DEBUG(std::cerr << "\n Destroy in blocks: "); // Loop over all of the places to insert pooldestroy's... for (unsigned i = 0, e = PoolDestroyPoints.size(); i != e; ++i) { // Insert the pooldestroy call for this pool. new CallInst(PoolDestroy, make_vector((Value*)PD, 0), "", PoolDestroyPoints[i]); - std::cerr << PoolDestroyPoints[i]->getParent()->getName() << " "; + DEBUG(std::cerr << PoolDestroyPoints[i]->getParent()->getName() << " "); } PoolDestroyPoints.clear(); - std::cerr << "\n\n"; + DEBUG(std::cerr << "\n\n"); // Delete any pool frees which are not in live blocks. std::set >::iterator PFI = From lattner at cs.uiuc.edu Mon Nov 10 14:05:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 14:05:03 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311102004.OAA29448@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.41 -> 1.42 --- Log message: Oops, only delete poolfrees which are not in live blocks --- Diffs of the changes: (+5 -2) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.41 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.42 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.41 Mon Nov 10 13:52:23 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 14:04:39 2003 @@ -742,7 +742,10 @@ std::set >::iterator PFI = PoolFrees.lower_bound(std::make_pair(PD, (CallInst*)0)); if (PFI != PoolFrees.end() && PFI->first < PD) ++PFI; - for (; PFI != PoolFrees.end() && PFI->first == PD; ) - DeleteIfIsPoolFree((PFI++)->second, PD, PoolFrees); + for (; PFI != PoolFrees.end() && PFI->first == PD; ) { + CallInst *PoolFree = (PFI++)->second; + if (!LiveBlocks.count(PoolFree->getParent())) + DeleteIfIsPoolFree(PoolFree, PD, PoolFrees); + } } } From lattner at cs.uiuc.edu Mon Nov 10 14:52:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 14:52:03 2003 Subject: [llvm-commits] CVS: poolalloc/include/poolalloc/PoolAllocate.h Message-ID: <200311102051.OAA31271@zion.cs.uiuc.edu> Changes in directory poolalloc/include/poolalloc: PoolAllocate.h updated: 1.15 -> 1.16 --- Log message: new method --- Diffs of the changes: (+2 -0) Index: poolalloc/include/poolalloc/PoolAllocate.h diff -u poolalloc/include/poolalloc/PoolAllocate.h:1.15 poolalloc/include/poolalloc/PoolAllocate.h:1.16 --- poolalloc/include/poolalloc/PoolAllocate.h:1.15 Mon Nov 10 13:00:55 2003 +++ poolalloc/include/poolalloc/PoolAllocate.h Mon Nov 10 14:51:01 2003 @@ -183,6 +183,8 @@ std::map &PoolDescriptors, std::set > &PoolUses, std::set > &PoolFrees); + + void CalculateLivePoolFreeBlocks(std::set &LiveBlocks,Value *PD); }; #endif From lattner at cs.uiuc.edu Mon Nov 10 14:53:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 14:53:01 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311102052.OAA31280@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.42 -> 1.43 --- Log message: Implement the 'poolfree' optimization: poolfree's which occur between the 'last' potentially-allocating instruction and the pool-destroy can be deleted. This is a simple, local, implementation. --- Diffs of the changes: (+28 -3) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.42 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.43 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.42 Mon Nov 10 14:04:39 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 14:52:05 2003 @@ -573,6 +573,23 @@ } } +void PoolAllocate::CalculateLivePoolFreeBlocks(std::set&LiveBlocks, + Value *PD) { + for (Value::use_iterator I = PD->use_begin(), E = PD->use_end(); I != E; ++I){ + // The only users of the pool should be call instructions. + CallInst *U = cast(*I); + if (U->getCalledValue() != PoolFree && U->getCalledValue() != PoolDestroy) { + // This block and every block that can reach this block must keep pool + // frees. + for (idf_ext_iterator > + DI = idf_ext_begin(U->getParent(), LiveBlocks), + DE = idf_ext_end(U->getParent(), LiveBlocks); DI != DE; ++DI) + /* empty */; + } + } +} + + /// InitializeAndDestroyPools - This inserts calls to poolinit and pooldestroy /// into the function to initialize and destroy the pools in the NodesToPA list. /// @@ -735,17 +752,25 @@ PoolDestroyPoints[i]); DEBUG(std::cerr << PoolDestroyPoints[i]->getParent()->getName() << " "); } - PoolDestroyPoints.clear(); DEBUG(std::cerr << "\n\n"); - // Delete any pool frees which are not in live blocks. + // We are allowed to delete any pool frees which occur between the last call + // to poolalloc, and the call to pooldestroy. Figure out which basic blocks + // have this property for this pool. + std::set PoolFreeLiveBlocks; + CalculateLivePoolFreeBlocks(PoolFreeLiveBlocks, PD); + PoolDestroyPoints.clear(); + + // Delete any pool frees which are not in live blocks, for correctness. std::set >::iterator PFI = PoolFrees.lower_bound(std::make_pair(PD, (CallInst*)0)); if (PFI != PoolFrees.end() && PFI->first < PD) ++PFI; for (; PFI != PoolFrees.end() && PFI->first == PD; ) { CallInst *PoolFree = (PFI++)->second; - if (!LiveBlocks.count(PoolFree->getParent())) + if (!LiveBlocks.count(PoolFree->getParent()) || + !PoolFreeLiveBlocks.count(PoolFree->getParent())) DeleteIfIsPoolFree(PoolFree, PD, PoolFrees); } + } } From criswell at cs.uiuc.edu Mon Nov 10 15:58:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Nov 10 15:58:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp PoolAllocator.h Message-ID: <200311102157.PAA20319@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.1 -> 1.2 PoolAllocator.h updated: 1.1 -> 1.2 --- Log message: Made the slab header contiguous with the rest of the slab. Removed reference counts on slabs as they are currently unused. Modified my funky union pointer cast thing to be worse than before. --- Diffs of the changes: (+38 -41) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.1 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.2 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.1 Mon Nov 10 13:42:39 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Mon Nov 10 15:57:48 2003 @@ -20,21 +20,12 @@ #undef assert #define assert(X) -typedef union +typedef union { - unsigned char * memory; - struct NodeHeader * header; + unsigned char * header; + unsigned char ** next; } NodePointer; -struct NodeHeader -{ - // Pointer to the slab which owns me - struct SlabHeader * Slab; - - // Pointer to the next node on the free list - NodePointer Next; -}; - //===----------------------------------------------------------------------===// // // PoolSlab implementation @@ -55,7 +46,7 @@ struct SlabHeader * Next; // Pointer to the list of nodes - NodePointer Nodes; + unsigned char Data []; }; // @@ -70,20 +61,22 @@ // Pointer to the new Slab struct SlabHeader * NewSlab; - // Pointer to the new node - struct NodeHeader NewNode; - // The number of elements in the slab const unsigned int NodesPerSlab = 128; // Pointers and index for initializing memory NodePointer p; - unsigned int index; + + // + // Determine the size of the slab. + // + int slab_size = ((sizeof (unsigned char *) + NodeSize) * NodesPerSlab) + + sizeof (struct SlabHeader); // // Allocate a piece of memory for the new slab. // - NewSlab = (struct SlabHeader *) malloc (sizeof (struct SlabHeader)); + NewSlab = (struct SlabHeader *) malloc (slab_size); assert (NewSlab != NULL); // @@ -95,27 +88,28 @@ NewSlab->Next = NULL; // - // Allocate enough memory for all the nodes. - // - NewSlab->Nodes.memory = (unsigned char *) malloc ((sizeof (struct NodeHeader) + NodeSize) * NodesPerSlab); - assert (NewSlab->Nodes.memory != NULL); - - // // Initialize each node in the list. // - for (p = NewSlab->Nodes, index = 0; index < NodesPerSlab; index++) + p.header = &(NewSlab->Data[0]); + while (p.header < (&(NewSlab->Data[0]) + slab_size - sizeof (struct SlabHeader))) { - p.header->Slab = NewSlab; - if (index == (NodesPerSlab - 1)) - { - p.header->Next.memory = NULL; - } - else - { - p.header->Next.memory = (p.memory += (sizeof (struct NodeHeader) + NodeSize)); - } + // + // Calculate the position of the next header and put its address in + // this current header. + // + *(p.next) = p.header + (sizeof (unsigned char *) + NodeSize); + + // + // Move on to the next header. + // + p.header = *(p.next); } + p.header = (&(NewSlab->Data[0]) + slab_size - sizeof (struct SlabHeader) + - sizeof (unsigned char *) + - NodeSize); + *(p.next) = NULL; + return NewSlab; } @@ -216,13 +210,15 @@ // Take the linked list of nodes inside the slab and add them to the // free list. // - Pool->FreeList = Pool->Slabs->Nodes.header; + Pool->FreeList = &(Pool->Slabs->Data[0]); } // // Increase the slab's reference count. // +#if 0 slabAlloc (Pool->FreeList->Slab); +#endif /* 0 */ // // Grab the first element from the free list and return it. @@ -230,8 +226,8 @@ NodePointer MemoryBlock; MemoryBlock.header = Pool->FreeList; - Pool->FreeList=Pool->FreeList->Next.header; - return (MemoryBlock.memory += sizeof (struct NodeHeader)); + Pool->FreeList=*(MemoryBlock.next); + return (MemoryBlock.header += sizeof (unsigned char *)); } void * @@ -254,17 +250,19 @@ // // Find the header of the memory block. // - Node.memory = (unsigned char *)(Block) - (sizeof (struct NodeHeader)); + Node.header = (unsigned char *)(Block) - (sizeof (unsigned char *)); +#if 0 // // Decrease the slab's reference count. // slabFree (Node.header->Slab); +#endif /* 0 */ // // Add the node back to the free list. // - Node.header->Next.header = Pool->FreeList; + *(Node.next) = Pool->FreeList; Pool->FreeList = Node.header; return; Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.1 poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.2 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.1 Mon Nov 10 13:42:39 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.h Mon Nov 10 15:57:48 2003 @@ -16,7 +16,6 @@ #define POOLALLOCATOR_RUNTIME_H struct SlabHeader; -struct NodeHeader; typedef struct PoolTy { // NodeSize - Keep track of the object size tracked by this pool @@ -26,7 +25,7 @@ struct SlabHeader * Slabs; // Pointer to the free list of nodes - struct NodeHeader * FreeList; + unsigned char * FreeList; // FreeablePool - Set to false if the memory from this pool cannot be freed // before destroy. From criswell at cs.uiuc.edu Mon Nov 10 16:32:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Nov 10 16:32:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PageManager.cpp PageManager.h PoolAllocator.cpp Message-ID: <200311102231.QAA20391@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PageManager.cpp added (r1.1) PageManager.h added (r1.1) PoolAllocator.cpp updated: 1.2 -> 1.3 --- Log message: Initial checkin of PageManager code. Created a simplistic and non-working version of pool alloc'ed array. --- Diffs of the changes: (+178 -5) Index: poolalloc/runtime/FreeListAllocator/PageManager.cpp diff -c /dev/null poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.1 *** /dev/null Mon Nov 10 16:31:21 2003 --- poolalloc/runtime/FreeListAllocator/PageManager.cpp Mon Nov 10 16:31:11 2003 *************** *** 0 **** --- 1,108 ---- + //===- PageManager.cpp - Implementation of the page allocator -------------===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file implements the PageManager.h interface. + // + //===----------------------------------------------------------------------===// + + #include "PageManager.h" + #ifndef _POSIX_MAPPED_FILES + #define _POSIX_MAPPED_FILES + #endif + #include "Support/MallocAllocator.h" + #include "Config/unistd.h" + #include "Config/sys/mman.h" + #include + #include + + // Define this if we want to use memalign instead of mmap to get pages. + // Empirically, this slows down the pool allocator a LOT. + #define USE_MEMALIGN 0 + + unsigned PageSize = 0; + + // Explicitly use the malloc allocator here, to avoid depending on the C++ + // runtime library. + typedef std::vector > FreePagesListType; + static FreePagesListType *FreePages = 0; + + void InitializePageManager() { + if (!PageSize) PageSize = sysconf(_SC_PAGESIZE); + } + + #if !USE_MEMALIGN + static void *GetPages(unsigned NumPages) { + #if defined(i386) || defined(__i386__) || defined(__x86__) + /* Linux and *BSD tend to have these flags named differently. */ + #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) + # define MAP_ANONYMOUS MAP_ANON + #endif /* defined(MAP_ANON) && !defined(MAP_ANONYMOUS) */ + #elif defined(sparc) || defined(__sparc__) || defined(__sparcv9) + /* nothing */ + #else + std::cerr << "This architecture is not supported by the pool allocator!\n"; + abort(); + #endif + + #if defined(__linux__) + #define fd 0 + #else + #define fd -1 + #endif + + void *pa = mmap(0, NumPages*PageSize, PROT_READ|PROT_WRITE|PROT_EXEC, + MAP_PRIVATE|MAP_ANONYMOUS, fd, 0); + assert(pa != MAP_FAILED && "MMAP FAILED!"); + return pa; + } + #endif + + + /// AllocatePage - This function returns a chunk of memory with size and + /// alignment specified by PageSize. + void *AllocatePage() { + #if USE_MEMALIGN + void *Addr; + posix_memalign(&Addr, PageSize, PageSize); + return Addr; + #else + if (FreePages && !FreePages->empty()) { + void *Result = FreePages->back(); + FreePages->pop_back(); + return Result; + } + + // Allocate several pages, and put the extras on the freelist... + unsigned NumToAllocate = 8; + char *Ptr = (char*)GetPages(NumToAllocate); + + if (!FreePages) { + // Avoid using operator new! + FreePages = (FreePagesListType*)malloc(sizeof(FreePagesListType)); + // Use placement new now. + new (FreePages) std::vector >(); + } + for (unsigned i = 1; i != NumToAllocate; ++i) + FreePages->push_back(Ptr+i*PageSize); + return Ptr; + #endif + } + + + /// FreePage - This function returns the specified page to the pagemanager for + /// future allocation. + void FreePage(void *Page) { + #if USE_MEMALIGN + free(Page); + #else + assert(FreePages && "No pages allocated!"); + FreePages->push_back(Page); + //munmap(Page, 1); + #endif + } Index: poolalloc/runtime/FreeListAllocator/PageManager.h diff -c /dev/null poolalloc/runtime/FreeListAllocator/PageManager.h:1.1 *** /dev/null Mon Nov 10 16:31:21 2003 --- poolalloc/runtime/FreeListAllocator/PageManager.h Mon Nov 10 16:31:11 2003 *************** *** 0 **** --- 1,37 ---- + //===- PageManager.h - Allocates memory on page boundaries ------*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file defines the interface used by the pool allocator to allocate memory + // on large alignment boundaries. + // + //===----------------------------------------------------------------------===// + + #ifndef PAGEMANAGER_H + #define PAGEMANAGER_H + + /// InitializePageManager - This function must be called before any other page + /// manager accesses are performed. It may be called multiple times. + /// + void InitializePageManager(); + + /// PageSize - Contains the size of the unit of memory allocated by + /// AllocatePage. This is a value that is typically several kilobytes in size, + /// and is guaranteed to be a power of two. + /// + extern unsigned PageSize; + + /// AllocatePage - This function returns a chunk of memory with size and + /// alignment specified by getPageSize(). + void *AllocatePage(); + + /// FreePage - This function returns the specified page to the pagemanager for + /// future allocation. + void FreePage(void *Page); + + #endif Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.2 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.3 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.2 Mon Nov 10 15:57:48 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Mon Nov 10 16:31:11 2003 @@ -56,14 +56,11 @@ // Allocate memory for a new slab and initialize the slab. // struct SlabHeader * -createSlab (unsigned int NodeSize) +createSlab (unsigned int NodeSize, unsigned int NodesPerSlab = 128) { // Pointer to the new Slab struct SlabHeader * NewSlab; - // The number of elements in the slab - const unsigned int NodesPerSlab = 128; - // Pointers and index for initializing memory NodePointer p; @@ -230,12 +227,43 @@ return (MemoryBlock.header += sizeof (unsigned char *)); } +// +// Function: poolallocarray () +// +// Description: +// Allocate an array of contiguous nodes. +// +// FIXME: +// This algorithm is not very space efficient. This needs to be fixed. +// void * poolallocarray(PoolTy* Pool, unsigned Size) { assert(Pool && "Null pool pointer passed into poolallocarray!\n"); - assert (0 && "Not implemented yet") + assert (0 && "I don't work yet\n"); + +#if 0 + // + // Create a new slab and add it to the list. + // + struct SlabHeader * NewSlab = createSlab (Pool->NodeSize, Size); + if (Pool->Slabs == NULL) + { + Pool->Slabs = NewSlab; + } + else + { + NewSlab->Next = Pool->Slabs; + Pool->Slabs = NewSlab; + } + + // + // Return the list of blocks to the caller. + // + return (&(Pool->Slabs->Data[0])); +#else /* 0 */ return NULL; +#endif /* 0 */ } void From lattner at cs.uiuc.edu Mon Nov 10 16:46:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 16:46:04 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/PoolAllocator/PageManager.cpp Message-ID: <200311102245.QAA20535@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/PoolAllocator: PageManager.cpp updated: 1.4 -> 1.5 --- Log message: There is no need to get execute permissions --- Diffs of the changes: (+1 -1) Index: poolalloc/runtime/PoolAllocator/PageManager.cpp diff -u poolalloc/runtime/PoolAllocator/PageManager.cpp:1.4 poolalloc/runtime/PoolAllocator/PageManager.cpp:1.5 --- poolalloc/runtime/PoolAllocator/PageManager.cpp:1.4 Sat Nov 8 21:09:21 2003 +++ poolalloc/runtime/PoolAllocator/PageManager.cpp Mon Nov 10 16:44:59 2003 @@ -56,7 +56,7 @@ #define fd -1 #endif - void *pa = mmap(0, NumPages*PageSize, PROT_READ|PROT_WRITE|PROT_EXEC, + void *pa = mmap(0, NumPages*PageSize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, fd, 0); assert(pa != MAP_FAILED && "MMAP FAILED!"); return pa; From lattner at cs.uiuc.edu Mon Nov 10 16:46:06 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 16:46:06 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PageManager.cpp Message-ID: <200311102245.QAA20528@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PageManager.cpp updated: 1.1 -> 1.2 --- Log message: There is no need to get execute permissions --- Diffs of the changes: (+1 -1) Index: poolalloc/runtime/FreeListAllocator/PageManager.cpp diff -u poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.1 poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.2 --- poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.1 Mon Nov 10 16:31:11 2003 +++ poolalloc/runtime/FreeListAllocator/PageManager.cpp Mon Nov 10 16:44:57 2003 @@ -56,7 +56,7 @@ #define fd -1 #endif - void *pa = mmap(0, NumPages*PageSize, PROT_READ|PROT_WRITE|PROT_EXEC, + void *pa = mmap(0, NumPages*PageSize, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, fd, 0); assert(pa != MAP_FAILED && "MMAP FAILED!"); return pa; From criswell at cs.uiuc.edu Mon Nov 10 17:13:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Nov 10 17:13:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311102312.RAA26651@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.3 -> 1.4 --- Log message: Moved the free list allocator to use the PageManager. Now slabs are allocated on page boundaries. --- Diffs of the changes: (+19 -3) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.3 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.4 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.3 Mon Nov 10 16:31:11 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Mon Nov 10 17:12:02 2003 @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "PoolAllocator.h" +#include "PageManager.h" #include #include #include @@ -56,7 +57,7 @@ // Allocate memory for a new slab and initialize the slab. // struct SlabHeader * -createSlab (unsigned int NodeSize, unsigned int NodesPerSlab = 128) +createSlab (unsigned int NodeSize, unsigned int NodesPerSlab = 0) { // Pointer to the new Slab struct SlabHeader * NewSlab; @@ -65,15 +66,25 @@ NodePointer p; // + // Determine how many nodes should exist within a slab. + // + if (NodesPerSlab == 0) + { + NodesPerSlab = (PageSize - sizeof (struct SlabHeader)) / (sizeof (unsigned char *) + NodeSize); + } + + // // Determine the size of the slab. // int slab_size = ((sizeof (unsigned char *) + NodeSize) * NodesPerSlab) + sizeof (struct SlabHeader); + assert (slab_size <= PageSize); + // // Allocate a piece of memory for the new slab. // - NewSlab = (struct SlabHeader *) malloc (slab_size); + NewSlab = (struct SlabHeader *) AllocatePage (); assert (NewSlab != NULL); // @@ -154,6 +165,11 @@ Pool->FreeList = NULL; Pool->FreeablePool = 1; + // + // Initialize the page manager. + // + InitializePageManager (); + return; } @@ -173,7 +189,7 @@ assert(Pool && "Null pool pointer passed in to pooldestroy!\n"); for (Slabp = Pool->Slabs; Slabp != NULL; Slabp=Slabp->Next) { - free (Slabp); + FreePage (Slabp); } return; From brukman at cs.uiuc.edu Mon Nov 10 18:06:03 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Nov 10 18:06:03 2003 Subject: [llvm-commits] CVS: llvm/Makefile.rules Message-ID: <200311110005.SAA23250@zion.cs.uiuc.edu> Changes in directory llvm: Makefile.rules updated: 1.157 -> 1.158 --- Log message: Shorten the "updating Makefile" status print-out. --- Diffs of the changes: (+1 -1) Index: llvm/Makefile.rules diff -u llvm/Makefile.rules:1.157 llvm/Makefile.rules:1.158 --- llvm/Makefile.rules:1.157 Sun Nov 9 15:36:19 2003 +++ llvm/Makefile.rules Mon Nov 10 18:05:29 2003 @@ -819,7 +819,7 @@ # If the Makefile in the source tree has been updated, copy it over into the # build tree. Makefile :: $(BUILD_SRC_DIR)/Makefile - @${ECHO} "===== Makefile out of date, updating from source dir: `dirname $<` =====" + @${ECHO} "===== Updating Makefile from source dir: `dirname $<` =====" cp -f $< $@ # From brukman at cs.uiuc.edu Mon Nov 10 18:15:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Nov 10 18:15:01 2003 Subject: [llvm-commits] CVS: llvm/docs/ProgrammersManual.html Message-ID: <200311110014.SAA28504@zion.cs.uiuc.edu> Changes in directory llvm/docs: ProgrammersManual.html updated: 1.49 -> 1.50 --- Log message: Added link to ``CVS Branching and Tags Primer''. --- Diffs of the changes: (+15 -0) Index: llvm/docs/ProgrammersManual.html diff -u llvm/docs/ProgrammersManual.html:1.49 llvm/docs/ProgrammersManual.html:1.50 --- llvm/docs/ProgrammersManual.html:1.49 Fri Nov 7 13:25:45 2003 +++ llvm/docs/ProgrammersManual.html Mon Nov 10 18:14:41 2003 @@ -166,6 +166,7 @@ the subject that you can get, so it will not be discussed in this document.

Here are some useful links:

+

  1. Dinkumware C++ Library reference - an excellent reference for the STL and other parts of @@ -194,6 +195,20 @@ href="CodingStandards.html">LLVM Coding Standards guide which focuses on how to write maintainable code more than where to put your curly braces.

    + + +
       + +Other useful references +

      + +LLVM is currently using CVS as its source versioning system. You may find this +reference handy:

      + +

        +
      1. CVS Branch and Tag +Primer
      2. +

    From lattner at cs.uiuc.edu Mon Nov 10 18:49:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 18:49:02 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311110048.SAA02370@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.43 -> 1.44 --- Log message: Fix problem handling invoke instrs --- Diffs of the changes: (+6 -5) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.43 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.44 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.43 Mon Nov 10 14:52:05 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 18:47:53 2003 @@ -576,14 +576,15 @@ void PoolAllocate::CalculateLivePoolFreeBlocks(std::set&LiveBlocks, Value *PD) { for (Value::use_iterator I = PD->use_begin(), E = PD->use_end(); I != E; ++I){ - // The only users of the pool should be call instructions. - CallInst *U = cast(*I); - if (U->getCalledValue() != PoolFree && U->getCalledValue() != PoolDestroy) { + // The only users of the pool should be call & invoke instructions. + CallSite U = CallSite::get(*I); + if (U.getCalledValue() != PoolFree && U.getCalledValue() != PoolDestroy) { // This block and every block that can reach this block must keep pool // frees. for (idf_ext_iterator > - DI = idf_ext_begin(U->getParent(), LiveBlocks), - DE = idf_ext_end(U->getParent(), LiveBlocks); DI != DE; ++DI) + DI = idf_ext_begin(U.getInstruction()->getParent(), LiveBlocks), + DE = idf_ext_end(U.getInstruction()->getParent(), LiveBlocks); + DI != DE; ++DI) /* empty */; } } From criswell at cs.uiuc.edu Mon Nov 10 21:46:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Nov 10 21:46:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp PoolAllocator.h Message-ID: <200311110345.VAA00600@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.4 -> 1.5 PoolAllocator.h updated: 1.2 -> 1.3 --- Log message: Modified the slab structure so that it looks like this: Slab Header Array of Links pointing to the next data block Array of data blocks with 1-1 correspondence with Array of Links. So, for example, Link[n] points to the data block that is after data block[n] in this slab. This had to be done to provide array support (where I need contiguous data blocks). Data blocks with headers are not contiguous data blocks. :( --- Diffs of the changes: (+66 -42) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.4 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.5 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.4 Mon Nov 10 17:12:02 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Mon Nov 10 21:45:37 2003 @@ -16,17 +16,10 @@ #include "PageManager.h" #include #include -#include #undef assert #define assert(X) -typedef union -{ - unsigned char * header; - unsigned char ** next; -} NodePointer; - //===----------------------------------------------------------------------===// // // PoolSlab implementation @@ -46,8 +39,11 @@ // Pointer to the next slab struct SlabHeader * Next; + // Pointer to the data area (will be in the same page) + unsigned char * Data; + // Pointer to the list of nodes - unsigned char Data []; + NodePointer BlockList []; }; // @@ -64,6 +60,7 @@ // Pointers and index for initializing memory NodePointer p; + unsigned int index; // // Determine how many nodes should exist within a slab. @@ -94,34 +91,48 @@ NewSlab->NodesPerSlab = NodesPerSlab; NewSlab->LiveNodes = 0; NewSlab->Next = NULL; + NewSlab->Data = (unsigned char *)NewSlab + sizeof (struct SlabHeader) + ((NodesPerSlab) * sizeof (NodePointer)); // // Initialize each node in the list. // - p.header = &(NewSlab->Data[0]); - while (p.header < (&(NewSlab->Data[0]) + slab_size - sizeof (struct SlabHeader))) + for (index = 0; index < NodesPerSlab - 1; index++) { - // - // Calculate the position of the next header and put its address in - // this current header. - // - *(p.next) = p.header + (sizeof (unsigned char *) + NodeSize); - - // - // Move on to the next header. - // - p.header = *(p.next); + NewSlab->BlockList[index].Next = &(NewSlab->BlockList[index + 1]); } - - p.header = (&(NewSlab->Data[0]) + slab_size - sizeof (struct SlabHeader) - - sizeof (unsigned char *) - - NodeSize); - *(p.next) = NULL; + NewSlab->BlockList[NodesPerSlab - 1].Next = NULL; return NewSlab; } // +// Function: BlockOwner () +// +// Description: +// Find the slab that owns this block. +// +struct SlabHeader * +BlockOwner (NodePointer p) +{ + // + // Convert the node pointer into a slab pointer. + // + return reinterpret_cast(reinterpret_cast(p.Next) & ~(PageSize - 1)); +} + +// +// Function: DataOwner () +// +// Description: +// This function finds the slab that owns this data block. +// +struct SlabHeader * +DataOwner (void * p) +{ + return reinterpret_cast(reinterpret_cast(p) & ~(PageSize - 1)); +} + +// // Function: slabAlloc() // // Description: @@ -162,7 +173,7 @@ // We must alway return unique pointers, even if they asked for 0 bytes Pool->NodeSize = NodeSize ? NodeSize : 1; Pool->Slabs = NULL; - Pool->FreeList = NULL; + Pool->FreeList.Next = NULL; Pool->FreeablePool = 1; // @@ -173,7 +184,8 @@ return; } -void poolmakeunfreeable(PoolTy *Pool) +void +poolmakeunfreeable(PoolTy *Pool) { assert(Pool && "Null pool pointer passed in to poolmakeunfreeable!\n"); Pool->FreeablePool = 0; @@ -181,7 +193,8 @@ // pooldestroy - Release all memory allocated for a pool // -void pooldestroy(PoolTy *Pool) +void +pooldestroy(PoolTy *Pool) { // Pointer to scan Slab list struct SlabHeader * Slabp; @@ -203,7 +216,7 @@ // // If there isn't an available block, we need a new slab. // - if (Pool->FreeList == NULL) + if (Pool->FreeList.Next == NULL) { // // Create a new slab and add it to the list. @@ -223,7 +236,7 @@ // Take the linked list of nodes inside the slab and add them to the // free list. // - Pool->FreeList = &(Pool->Slabs->Data[0]); + Pool->FreeList.Next = &(NewSlab->BlockList[0]); } // @@ -234,13 +247,21 @@ #endif /* 0 */ // - // Grab the first element from the free list and return it. + // Determine which slab owns this block. // - NodePointer MemoryBlock; + struct SlabHeader * slabp = BlockOwner (Pool->FreeList); - MemoryBlock.header = Pool->FreeList; - Pool->FreeList=*(MemoryBlock.next); - return (MemoryBlock.header += sizeof (unsigned char *)); + // + // Find the data block that corresponds with this pointer. + // + void * Data = (slabp->Data + (Pool->NodeSize * (Pool->FreeList.Next - &(slabp->BlockList[0])))); + + // + // Unlink the first block. + // + Pool->FreeList.Next = Pool->FreeList.Next->Next; + + return Data; } // @@ -288,13 +309,12 @@ assert(Pool && "Null pool pointer passed in to poolfree!\n"); assert(Block && "Null pool pointer passed in to poolfree!\n"); - // Pointer to the node corresponding to this memory block - NodePointer Node; - // // Find the header of the memory block. // - Node.header = (unsigned char *)(Block) - (sizeof (unsigned char *)); + struct SlabHeader * slabp = DataOwner (Block); + NodePointer Node; + Node.Next = &(slabp->BlockList[((unsigned char *)Block - slabp->Data)/Pool->NodeSize]); #if 0 // @@ -306,8 +326,8 @@ // // Add the node back to the free list. // - *(Node.next) = Pool->FreeList; - Pool->FreeList = Node.header; + Node.Next->Next = Pool->FreeList.Next; + Pool->FreeList.Next = Node.Next; return; } Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.2 poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.3 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.2 Mon Nov 10 15:57:48 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.h Mon Nov 10 21:45:37 2003 @@ -16,6 +16,10 @@ #define POOLALLOCATOR_RUNTIME_H struct SlabHeader; +typedef struct NodePointer +{ + struct NodePointer * Next; +} NodePointer; typedef struct PoolTy { // NodeSize - Keep track of the object size tracked by this pool @@ -25,7 +29,7 @@ struct SlabHeader * Slabs; // Pointer to the free list of nodes - unsigned char * FreeList; + struct NodePointer FreeList; // FreeablePool - Set to false if the memory from this pool cannot be freed // before destroy. From criswell at cs.uiuc.edu Mon Nov 10 22:33:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Nov 10 22:33:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311110432.WAA02277@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.5 -> 1.6 --- Log message: Added array support that works but needs much improvement. --- Diffs of the changes: (+20 -18) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.5 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.6 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.5 Mon Nov 10 21:45:37 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Mon Nov 10 22:32:15 2003 @@ -27,6 +27,9 @@ //===----------------------------------------------------------------------===// struct SlabHeader { + // Flags whether this is an array + unsigned char IsArray; + // Number of nodes per slab unsigned int NodesPerSlab; @@ -87,6 +90,7 @@ // // Initialize the contents of the slab. // + NewSlab->IsArray = 0; NewSlab->NodeSize = NodeSize; NewSlab->NodesPerSlab = NodesPerSlab; NewSlab->LiveNodes = 0; @@ -274,33 +278,20 @@ // This algorithm is not very space efficient. This needs to be fixed. // void * -poolallocarray(PoolTy* Pool, unsigned Size) +poolallocarray(PoolTy* Pool, unsigned ArraySize) { assert(Pool && "Null pool pointer passed into poolallocarray!\n"); - assert (0 && "I don't work yet\n"); -#if 0 // - // Create a new slab and add it to the list. + // Create a new slab and mark it as an array. // - struct SlabHeader * NewSlab = createSlab (Pool->NodeSize, Size); - if (Pool->Slabs == NULL) - { - Pool->Slabs = NewSlab; - } - else - { - NewSlab->Next = Pool->Slabs; - Pool->Slabs = NewSlab; - } + struct SlabHeader * NewSlab = createSlab (Pool->NodeSize, ArraySize); + NewSlab->IsArray = 1; // // Return the list of blocks to the caller. // - return (&(Pool->Slabs->Data[0])); -#else /* 0 */ - return NULL; -#endif /* 0 */ + return (&(NewSlab->Data[0])); } void @@ -313,6 +304,17 @@ // Find the header of the memory block. // struct SlabHeader * slabp = DataOwner (Block); + + // + // If the owner is an array, just nuke the whole thing for now. + // FIXME: Inefficient! Danger Will Robinson! + // + if (slabp->IsArray) + { + FreePage (slabp); + return; + } + NodePointer Node; Node.Next = &(slabp->BlockList[((unsigned char *)Block - slabp->Data)/Pool->NodeSize]); From lattner at cs.uiuc.edu Mon Nov 10 23:09:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 23:09:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h Message-ID: <200311110508.XAA20260@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSGraph.h updated: 1.61 -> 1.62 --- Log message: Add new method --- Diffs of the changes: (+9 -0) Index: llvm/include/llvm/Analysis/DSGraph.h diff -u llvm/include/llvm/Analysis/DSGraph.h:1.61 llvm/include/llvm/Analysis/DSGraph.h:1.62 --- llvm/include/llvm/Analysis/DSGraph.h:1.61 Sun Nov 2 16:27:15 2003 +++ llvm/include/llvm/Analysis/DSGraph.h Mon Nov 10 23:08:36 2003 @@ -254,6 +254,15 @@ NodeMapTy& CompletedNodeMap, unsigned CloneFlags = 0); + + /// computeNodeMapping - Given roots in two different DSGraphs, traverse the + /// nodes reachable from the two graphs, computing the mapping of nodes from + /// the first to the second graph. + /// + static void computeNodeMapping(const DSNodeHandle &NH1, + const DSNodeHandle &NH2, NodeMapTy &NodeMap); + + /// cloneInto - Clone the specified DSGraph into the current graph. The /// translated ScalarMap for the old function is filled into the OldValMap /// member, and the translated ReturnNodes map is returned into ReturnNodes. From lattner at cs.uiuc.edu Mon Nov 10 23:10:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 23:10:00 2003 Subject: [llvm-commits] CVS: poolalloc/include/poolalloc/PoolAllocate.h Message-ID: <200311110509.XAA20439@zion.cs.uiuc.edu> Changes in directory poolalloc/include/poolalloc: PoolAllocate.h updated: 1.16 -> 1.17 --- Log message: Implement global pools more efficiently by making the pool descriptors global variables, which do not need to be passed around as arguments! --- Diffs of the changes: (+26 -10) Index: poolalloc/include/poolalloc/PoolAllocate.h diff -u poolalloc/include/poolalloc/PoolAllocate.h:1.16 poolalloc/include/poolalloc/PoolAllocate.h:1.17 --- poolalloc/include/poolalloc/PoolAllocate.h:1.16 Mon Nov 10 14:51:01 2003 +++ poolalloc/include/poolalloc/PoolAllocate.h Mon Nov 10 23:09:44 2003 @@ -85,10 +85,6 @@ std::map FunctionInfo; - void buildIndirectFunctionSets(Module &M); - - void FindFunctionPoolArgs(Function &F); - // Debug function to print the FuncECs void printFuncECs(); @@ -101,16 +97,21 @@ // the same function pointer are in the same class. EquivalenceClasses FuncECs; - // Map from an Indirect call site to the set of Functions that it can point to + /// Map from an Indirect call site to the set of Functions that it can point + /// to. std::multimap CallSiteTargets; - // This maps an equivalence class to the last pool argument number for that - // class. This is used because the pool arguments for all functions within - // an equivalence class is passed to all the functions in that class. - // If an equivalence class does not require pool arguments, it is not - // on this map. + /// This maps an equivalence class to the last pool argument number for that + /// class. This is used because the pool arguments for all functions within + /// an equivalence class is passed to all the functions in that class. + /// If an equivalence class does not require pool arguments, it is not + /// on this map. std::map EqClass2LastPoolArg; + /// GlobalNodes - For each node (with an H marker) in the globals graph, this + /// map contains the global variable that holds the pool descriptor for the + /// node. + std::map GlobalNodes; public: bool run(Module &M); @@ -148,6 +149,21 @@ /// them. /// void AddPoolPrototypes(); + + /// BuildIndirectFunctionSets - Iterate over the module looking for indirect + /// calls to functions + void BuildIndirectFunctionSets(Module &M); + + /// SetupGlobalPools - Create global pools for all DSNodes in the globals + /// graph which contain heap objects. If a global variable points to a piece + /// of memory allocated from the heap, this pool gets a global lifetime. + /// + /// This method returns true if correct pool allocation of the module cannot + /// be performed because there is no main function for the module and there + /// are global pools. + bool SetupGlobalPools(Module &M); + + void FindFunctionPoolArgs(Function &F); /// MakeFunctionClone - If the specified function needs to be modified for /// pool allocation support, make a clone of it, adding additional arguments From lattner at cs.uiuc.edu Mon Nov 10 23:10:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 23:10:03 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200311110509.XAA20278@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.125 -> 1.126 --- Log message: Add new method for computing node mappings. This is used by the pool allocator --- Diffs of the changes: (+31 -0) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.125 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.126 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.125 Sun Nov 2 16:27:28 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Mon Nov 10 23:08:59 2003 @@ -1638,3 +1638,34 @@ OldRetNodes.clear(); removeTriviallyDeadNodes(); } + +/// computeNodeMapping - Given roots in two different DSGraphs, traverse the +/// nodes reachable from the two graphs, computing the mapping of nodes from +/// the first to the second graph. +/// +void DSGraph::computeNodeMapping(const DSNodeHandle &NH1, + const DSNodeHandle &NH2, NodeMapTy &NodeMap) { + DSNode *N1 = NH1.getNode(), *N2 = NH2.getNode(); + if (N1 == 0 || N2 == 0) return; + + DSNodeHandle &Entry = NodeMap[N1]; + if (Entry.getNode()) { + // Termination of recursion! + assert(Entry.getNode() == N2 && + Entry.getOffset() == (NH1.getOffset()+NH2.getOffset()) && + "Inconsistent mapping detected!"); + return; + } + + Entry.setNode(N2); + Entry.setOffset(NH1.getOffset()+NH2.getOffset()); + + // Loop over all of the fields that N1 and N2 have in common, recursively + // mapping the edges together now. + int N2Idx = NH2.getOffset()-NH1.getOffset(); + unsigned N2Size = N2->getSize(); + for (unsigned i = 0, e = N1->getSize(); i < e; i += DS::PointerSize) + if (unsigned(N2Idx)+i < N2Size) + computeNodeMapping(N1->getLink(i), N2->getLink(N2Idx+i), NodeMap); +} + From lattner at cs.uiuc.edu Mon Nov 10 23:11:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Nov 10 23:11:01 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311110510.XAA20464@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.44 -> 1.45 --- Log message: Implement global pools more efficiently by making the pool descriptors global variables, which do not need to be passed around as arguments! Also, add a PASS_ALL_ARGUMENTS macro that safecode can use to get arguments passed into functions which do not call malloc and free, but use the memory objects in some way. --- Diffs of the changes: (+212 -122) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.44 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.45 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.44 Mon Nov 10 18:47:53 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Mon Nov 10 23:10:27 2003 @@ -24,6 +24,12 @@ #include "Support/Statistic.h" using namespace PA; +// PASS_ALL_ARGUMENTS - If this is set to true, pass in pool descriptors for all +// DSNodes in a function, even if there are no allocations or frees in it. This +// is useful for SafeCode. +#define PASS_ALL_ARGUMENTS 0 + + const Type *PoolAllocate::PoolDescPtrTy = 0; namespace { @@ -54,6 +60,93 @@ AU.addRequired(); } +bool PoolAllocate::run(Module &M) { + if (M.begin() == M.end()) return false; + CurModule = &M; + BU = &getAnalysis(); + + AddPoolPrototypes(); + BuildIndirectFunctionSets(M); + + if (SetupGlobalPools(M)) + return true; + + // Loop over the functions in the original program finding the pool desc. + // arguments necessary for each function that is indirectly callable. + // For each equivalence class, make a list of pool arguments and update + // the PoolArgFirst and PoolArgLast values for each function. + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) + if (!I->isExternal()) + FindFunctionPoolArgs(*I); + + std::map FuncMap; + + // Now clone a function using the pool arg list obtained in the previous pass + // over the modules. Loop over only the function initially in the program, + // don't traverse newly added ones. If the function needs new arguments, make + // its clone. + Module::iterator LastOrigFunction = --M.end(); + for (Module::iterator I = M.begin(); ; ++I) { + if (!I->isExternal()) + if (Function *R = MakeFunctionClone(*I)) + FuncMap[I] = R; + if (I == LastOrigFunction) break; + } + + ++LastOrigFunction; + + // Now that all call targets are available, rewrite the function bodies of the + // clones. + for (Module::iterator I = M.begin(); I != LastOrigFunction; ++I) + if (!I->isExternal()) { + std::map::iterator FI = FuncMap.find(I); + ProcessFunctionBody(*I, FI != FuncMap.end() ? *FI->second : *I); + } + + return true; +} + +static void GetNodesReachableFromGlobals(DSGraph &G, + hash_set &NodesFromGlobals) { + for (DSGraph::ScalarMapTy::iterator I = G.getScalarMap().begin(), + E = G.getScalarMap().end(); I != E; ++I) + if (isa(I->first)) // Found a global + I->second.getNode()->markReachableNodes(NodesFromGlobals); +} + +// AddPoolPrototypes - Add prototypes for the pool functions to the specified +// module and update the Pool* instance variables to point to them. +// +void PoolAllocate::AddPoolPrototypes() { + if (VoidPtrTy == 0) { + VoidPtrTy = PointerType::get(Type::SByteTy); + PoolDescType = + StructType::get(make_vector(VoidPtrTy, VoidPtrTy, + Type::UIntTy, Type::UIntTy, 0)); + PoolDescPtrTy = PointerType::get(PoolDescType); + } + + CurModule->addTypeName("PoolDescriptor", PoolDescType); + + // Get poolinit function... + PoolInit = CurModule->getOrInsertFunction("poolinit", Type::VoidTy, + PoolDescPtrTy, Type::UIntTy, 0); + + // Get pooldestroy function... + PoolDestroy = CurModule->getOrInsertFunction("pooldestroy", Type::VoidTy, + PoolDescPtrTy, 0); + + // The poolalloc function + PoolAlloc = CurModule->getOrInsertFunction("poolalloc", + VoidPtrTy, PoolDescPtrTy, + Type::UIntTy, 0); + + // Get the poolfree function... + PoolFree = CurModule->getOrInsertFunction("poolfree", Type::VoidTy, + PoolDescPtrTy, VoidPtrTy, 0); +} + + // Prints out the functions mapped to the leader of the equivalence class they // belong to. void PoolAllocate::printFuncECs() { @@ -75,14 +168,13 @@ } } -void PoolAllocate::buildIndirectFunctionSets(Module &M) { - // Iterate over the module looking for indirect calls to functions - +// BuildIndirectFunctionSets - Iterate over the module looking for indirect +// calls to functions +void PoolAllocate::BuildIndirectFunctionSets(Module &M) { // Get top down DSGraph for the functions TDDS = &getAnalysis(); for (Module::iterator MI = M.begin(), ME = M.end(); MI != ME; ++MI) { - DEBUG(std::cerr << "Processing indirect calls function:" << MI->getName() << "\n"); @@ -128,83 +220,70 @@ DEBUG(printFuncECs()); } -bool PoolAllocate::run(Module &M) { - if (M.begin() == M.end()) return false; - CurModule = &M; - BU = &getAnalysis(); - - if (VoidPtrTy == 0) { - VoidPtrTy = PointerType::get(Type::SByteTy); - PoolDescType = - StructType::get(make_vector(VoidPtrTy, VoidPtrTy, - Type::UIntTy, Type::UIntTy, 0)); - PoolDescPtrTy = PointerType::get(PoolDescType); +// SetupGlobalPools - Create global pools for all DSNodes in the globals graph +// which contain heap objects. If a global variable points to a piece of memory +// allocated from the heap, this pool gets a global lifetime. This is +// implemented by making the pool descriptor be a global variable of it's own, +// and initializing the pool on entrance to main. Note that we never destroy +// the pool, because it has global lifetime. +// +// This method returns true if correct pool allocation of the module cannot be +// performed because there is no main function for the module and there are +// global pools. +// +bool PoolAllocate::SetupGlobalPools(Module &M) { + // Get the globals graph for the program. + DSGraph &GG = BU->getGlobalsGraph(); + + // Get all of the nodes reachable from globals. + hash_set GlobalHeapNodes; + GetNodesReachableFromGlobals(GG, GlobalHeapNodes); + + // Filter out all nodes which have no heap allocations merged into them. + for (hash_set::iterator I = GlobalHeapNodes.begin(), + E = GlobalHeapNodes.end(); I != E; ) { + hash_set::iterator Last = I++; + if (!(*Last)->isHeapNode()) + GlobalHeapNodes.erase(Last); + } + + // If we don't need to create any global pools, exit now. + if (GlobalHeapNodes.empty()) return false; + + // Otherwise get the main function to insert the poolinit calls. + Function *MainFunc = M.getMainFunction(); + if (MainFunc == 0 || MainFunc->isExternal()) { + std::cerr << "Cannot pool allocate this program: it has global " + << "pools but no 'main' function yet!\n"; + return true; } - - AddPoolPrototypes(); - buildIndirectFunctionSets(M); - std::map FuncMap; + BasicBlock::iterator InsertPt = MainFunc->getEntryBlock().begin(); + while (isa(InsertPt)) ++InsertPt; + + TargetData &TD = getAnalysis(); - // Loop over the functions in the original program finding the pool desc. - // arguments necessary for each function that is indirectly callable. - // For each equivalence class, make a list of pool arguments and update - // the PoolArgFirst and PoolArgLast values for each function. - Module::iterator LastOrigFunction = --M.end(); - for (Module::iterator I = M.begin(); ; ++I) { - if (!I->isExternal()) - FindFunctionPoolArgs(*I); - if (I == LastOrigFunction) break; - } + // Loop over all of the pools, creating a new global pool descriptor, + // inserting a new entry in GlobalNodes, and inserting a call to poolinit in + // main. + for (hash_set::iterator I = GlobalHeapNodes.begin(), + E = GlobalHeapNodes.end(); I != E; ++I) { + GlobalVariable *GV = + new GlobalVariable(PoolDescType, false, GlobalValue::InternalLinkage, + Constant::getNullValue(PoolDescType), "GlobalPool",&M); + GlobalNodes[*I] = GV; - // Now clone a function using the pool arg list obtained in the previous - // pass over the modules. - // Loop over only the function initially in the program, don't traverse newly - // added ones. If the function uses memory, make its clone. - for (Module::iterator I = M.begin(); ; ++I) { - if (!I->isExternal()) - if (Function *R = MakeFunctionClone(*I)) - FuncMap[I] = R; - if (I == LastOrigFunction) break; + Value *ElSize = + ConstantUInt::get(Type::UIntTy, (*I)->getType()->isSized() ? + TD.getTypeSize((*I)->getType()) : 4); + new CallInst(PoolInit, make_vector((Value*)GV, ElSize, 0), "", InsertPt); } - - ++LastOrigFunction; - // Now that all call targets are available, rewrite the function bodies of the - // clones. - for (Module::iterator I = M.begin(); I != LastOrigFunction; ++I) - if (!I->isExternal()) { - std::map::iterator FI = FuncMap.find(I); - ProcessFunctionBody(*I, FI != FuncMap.end() ? *FI->second : *I); - } - - return true; + return false; } -// AddPoolPrototypes - Add prototypes for the pool functions to the specified -// module and update the Pool* instance variables to point to them. -// -void PoolAllocate::AddPoolPrototypes() { - CurModule->addTypeName("PoolDescriptor", PoolDescType); - - // Get poolinit function... - PoolInit = CurModule->getOrInsertFunction("poolinit", Type::VoidTy, - PoolDescPtrTy, Type::UIntTy, 0); - // Get pooldestroy function... - PoolDestroy = CurModule->getOrInsertFunction("pooldestroy", Type::VoidTy, - PoolDescPtrTy, 0); - - // The poolalloc function - PoolAlloc = CurModule->getOrInsertFunction("poolalloc", - VoidPtrTy, PoolDescPtrTy, - Type::UIntTy, 0); - - // Get the poolfree function... - PoolFree = CurModule->getOrInsertFunction("poolfree", Type::VoidTy, - PoolDescPtrTy, VoidPtrTy, 0); -} // Inline the DSGraphs of functions corresponding to the potential targets at // indirect call sites into the DS Graph of the callee. @@ -252,41 +331,24 @@ } void PoolAllocate::FindFunctionPoolArgs(Function &F) { - DSGraph &G = BU->getDSGraph(F); // Inline the potential targets of indirect calls hash_set visitedFuncs; InlineIndirectCalls(F, G, visitedFuncs); - // The DSGraph is merged with the globals graph. - G.mergeInGlobalsGraph(); - - // The nodes reachable from globals need to be recognized as potential - // arguments. This is required because, upon merging in the globals graph, - // the nodes pointed to by globals that are not live are not marked - // incomplete. - hash_set NodesFromGlobals; - for (DSGraph::ScalarMapTy::iterator I = G.getScalarMap().begin(), - E = G.getScalarMap().end(); I != E; ++I) - if (isa(I->first)) { // Found a global - DSNodeHandle &GH = I->second; - GH.getNode()->markReachableNodes(NodesFromGlobals); - } - // At this point the DS Graphs have been modified in place including - // information about globals as well as indirect calls, making it useful - // for pool allocation + // information about indirect calls, making it useful for pool allocation. std::vector &Nodes = G.getNodes(); - if (Nodes.empty()) return ; // No memory activity, nothing is required + if (Nodes.empty()) return; // No memory activity, nothing is required FuncInfo &FI = FunctionInfo[&F]; // Create a new entry for F FI.Clone = 0; - // Initialize the PoolArgFirst and PoolArgLast for the function depending - // on whether there have been other functions in the equivalence class - // that have pool arguments so far in the analysis. + // Initialize the PoolArgFirst and PoolArgLast for the function depending on + // whether there have been other functions in the equivalence class that have + // pool arguments so far in the analysis. if (!FuncECs.findClass(&F)) { FI.PoolArgFirst = FI.PoolArgLast = 0; } else { @@ -304,35 +366,40 @@ hash_set &MarkedNodes = FI.MarkedNodes; // Mark globals and incomplete nodes as live... (this handles arguments) - if (F.getName() != "main") - for (unsigned i = 0, e = Nodes.size(); i != e; ++i) { - if (Nodes[i]->isGlobalNode() && !Nodes[i]->isIncomplete()) - DEBUG(std::cerr << "Global node is not Incomplete\n"); - if ((Nodes[i]->isIncomplete() || Nodes[i]->isGlobalNode() || - NodesFromGlobals.count(Nodes[i])) && Nodes[i]->isHeapNode()) - Nodes[i]->markReachableNodes(MarkedNodes); + if (F.getName() != "main") { + // All DSNodes reachable from arguments must be passed in. + for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) { + DSGraph::ScalarMapTy::iterator AI = G.getScalarMap().find(I); + if (AI != G.getScalarMap().end()) + if (DSNode *N = AI->second.getNode()) + N->markReachableNodes(MarkedNodes); } + } // Marked the returned node as alive... if (DSNode *RetNode = G.getReturnNodeFor(F).getNode()) - if (RetNode->isHeapNode()) - RetNode->markReachableNodes(MarkedNodes); + RetNode->markReachableNodes(MarkedNodes); - if (MarkedNodes.empty()) // We don't need to clone the function if there - return; // are no incoming arguments to be added. - - // Erase any marked node that is not a heap node + // Calculate which DSNodes are reachable from globals. If a node is reachable + // from a global, we will create a global pool for it, so no argument passage + // is required. + hash_set NodesFromGlobals; + GetNodesReachableFromGlobals(G, NodesFromGlobals); + // Remove any nodes reachable from a global. These nodes will be put into + // global pools, which do not require arguments to be passed in. Also, erase + // any marked node that is not a heap node. Since no allocations or frees + // will be done with it, it needs no argument. for (hash_set::iterator I = MarkedNodes.begin(), - E = MarkedNodes.end(); I != E; ) { - // erase invalidates hash_set iterators if the iterator points to the - // element being erased - if (!(*I)->isHeapNode()) - MarkedNodes.erase(I++); - else - ++I; + E = MarkedNodes.end(); I != E; ) { + DSNode *N = *I++; + if ((!N->isHeapNode() && !PASS_ALL_ARGUMENTS) || NodesFromGlobals.count(N)) + MarkedNodes.erase(N); } + if (MarkedNodes.empty()) // We don't need to clone the function if there + return; // are no incoming arguments to be added. + FI.PoolArgLast += MarkedNodes.size(); // Update the equivalence class last pool argument information @@ -380,8 +447,7 @@ } if (FI.ArgNodes.empty()) return 0; // No nodes to be pool allocated! - } - else { + } else { // This function is a member of an equivalence class and needs to be cloned ArgTys.reserve(OldFuncTy->getParamTypes().size() + EqClass2LastPoolArg[FuncECs.findClass(&F)] + 1); @@ -423,8 +489,7 @@ if (FuncECs.findClass(&F)) { // If the function belongs to an equivalence class - for (int i = 0; i <= EqClass2LastPoolArg[FuncECs.findClass(&F)]; ++i, - ++NI) + for (int i = 0; i <= EqClass2LastPoolArg[FuncECs.findClass(&F)]; ++i, ++NI) NI->setName("PDa"); NI = New->abegin(); @@ -525,14 +590,37 @@ hash_set &MarkedNodes = FI.MarkedNodes; DEBUG(std::cerr << "[" << F.getName() << "] Pool Allocate: "); + + // Calculate which DSNodes are reachable from globals. If a node is reachable + // from a global, we will create a global pool for it, so no argument passage + // is required. + DSGraph &GG = BU->getGlobalsGraph(); + DSGraph::NodeMapTy GlobalsGraphNodeMapping; + for (DSGraph::ScalarMapTy::iterator I = G.getScalarMap().begin(), + E = G.getScalarMap().end(); I != E; ++I) + if (GlobalValue *GV = dyn_cast(I->first)) { + // Map all node reachable from this global to the corresponding nodes in + // the globals graph. + DSGraph::computeNodeMapping(I->second.getNode(), GG.getNodeForValue(GV), + GlobalsGraphNodeMapping); + } // Loop over all of the nodes which are non-escaping, adding pool-allocatable // ones to the NodesToPA vector. std::vector NodesToPA; for (unsigned i = 0, e = Nodes.size(); i != e; ++i) - if (Nodes[i]->isHeapNode() && // Pick nodes with heap elems - !MarkedNodes.count(Nodes[i])) // Can't be marked - NodesToPA.push_back(Nodes[i]); + // We only need to make a pool if there is a heap object in it... + if (Nodes[i]->isHeapNode()) + if (GlobalsGraphNodeMapping.count(Nodes[i])) { + // If it is a global pool, set up the pool descriptor appropriately. + DSNode *GGN = GlobalsGraphNodeMapping[Nodes[i]].getNode(); + assert(GGN && GlobalNodes[GGN] && "No global node found??"); + FI.PoolDescriptors[Nodes[i]] = GlobalNodes[GGN]; + } else if (!MarkedNodes.count(Nodes[i])) { + // Otherwise, if it was not passed in from outside the function, it must + // be a local pool! + NodesToPA.push_back(Nodes[i]); + } DEBUG(std::cerr << NodesToPA.size() << " nodes to pool allocate\n"); if (!NodesToPA.empty()) // Insert pool alloca's @@ -759,7 +847,10 @@ // to poolalloc, and the call to pooldestroy. Figure out which basic blocks // have this property for this pool. std::set PoolFreeLiveBlocks; - CalculateLivePoolFreeBlocks(PoolFreeLiveBlocks, PD); + if (!DisableInitDestroyOpt) + CalculateLivePoolFreeBlocks(PoolFreeLiveBlocks, PD); + else + PoolFreeLiveBlocks = LiveBlocks; PoolDestroyPoints.clear(); // Delete any pool frees which are not in live blocks, for correctness. @@ -772,6 +863,5 @@ !PoolFreeLiveBlocks.count(PoolFree->getParent())) DeleteIfIsPoolFree(PoolFree, PD, PoolFrees); } - } } From criswell at cs.uiuc.edu Mon Nov 10 23:47:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Nov 10 23:47:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311110546.XAA05059@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.6 -> 1.7 --- Log message: Implemented a performance enhancement suggested by Professor Adve: Data is first allocated from the most recently allocated slab before checking the free list (which essentially becomes a recycled data block list). This saves time when initializing a slab since an entire slab does not need to be made into a linked list upon creation. --- Diffs of the changes: (+35 -29) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.6 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.7 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.6 Mon Nov 10 22:32:15 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Mon Nov 10 23:46:11 2003 @@ -7,7 +7,7 @@ // //===----------------------------------------------------------------------===// // -// This file is one possible implementation of the LLVM pool allocator runtime +// This file is yet another implementation of the LLVM pool allocator runtime // library. // //===----------------------------------------------------------------------===// @@ -28,17 +28,17 @@ struct SlabHeader { // Flags whether this is an array - unsigned char IsArray; + unsigned int IsArray; // Number of nodes per slab unsigned int NodesPerSlab; - // The size of each node - unsigned int NodeSize; - // Reference Count unsigned int LiveNodes; + // Next free data block + unsigned int NextFreeData; + // Pointer to the next slab struct SlabHeader * Next; @@ -91,21 +91,11 @@ // Initialize the contents of the slab. // NewSlab->IsArray = 0; - NewSlab->NodeSize = NodeSize; NewSlab->NodesPerSlab = NodesPerSlab; - NewSlab->LiveNodes = 0; + NewSlab->NextFreeData = NewSlab->LiveNodes = 0; NewSlab->Next = NULL; NewSlab->Data = (unsigned char *)NewSlab + sizeof (struct SlabHeader) + ((NodesPerSlab) * sizeof (NodePointer)); - // - // Initialize each node in the list. - // - for (index = 0; index < NodesPerSlab - 1; index++) - { - NewSlab->BlockList[index].Next = &(NewSlab->BlockList[index + 1]); - } - NewSlab->BlockList[NodesPerSlab - 1].Next = NULL; - return NewSlab; } @@ -218,7 +208,27 @@ assert(Pool && "Null pool pointer passed in to poolalloc!\n"); // - // If there isn't an available block, we need a new slab. + // Check to see if we have a slab. If we don't, get one. + // + if (Pool->Slabs == NULL) + { + Pool->Slabs = createSlab (Pool->NodeSize); + } + + // + // Determine whether we can allocate from the current slab. + // + if (Pool->Slabs->NextFreeData < Pool->Slabs->NodesPerSlab) + { + // + // Return the block and increment the index of the next free data block. + // + return (Pool->Slabs->Data + (Pool->NodeSize * Pool->Slabs->NextFreeData++)); + } + + // + // We have a slab, but it doesn't have any new blocks. + // Check the free list to see if we can use any recycled blocks. // if (Pool->FreeList.Next == NULL) { @@ -226,21 +236,13 @@ // Create a new slab and add it to the list. // struct SlabHeader * NewSlab = createSlab (Pool->NodeSize); - if (Pool->Slabs == NULL) - { - Pool->Slabs = NewSlab; - } - else - { - NewSlab->Next = Pool->Slabs; - Pool->Slabs = NewSlab; - } + NewSlab->Next = Pool->Slabs; + Pool->Slabs = NewSlab; // - // Take the linked list of nodes inside the slab and add them to the - // free list. + // Return the block and increment the index of the next free data block. // - Pool->FreeList.Next = &(NewSlab->BlockList[0]); + return (Pool->Slabs->Data + (Pool->NodeSize * Pool->Slabs->NextFreeData++)); } // @@ -273,6 +275,10 @@ // // Description: // Allocate an array of contiguous nodes. +// +// Inputs: +// Pool - The pool from which to allocate memory. +// ArraySize - The size of the array in number of elements (not bytes). // // FIXME: // This algorithm is not very space efficient. This needs to be fixed. From lattner at cs.uiuc.edu Tue Nov 11 00:12:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 00:12:02 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Message-ID: <200311110611.AAA23765@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: TransformFunctionBody.cpp updated: 1.7 -> 1.8 --- Log message: Minor cleanups --- Diffs of the changes: (+6 -8) Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.7 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.8 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.7 Mon Nov 10 13:00:32 2003 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Tue Nov 11 00:11:35 2003 @@ -473,9 +473,9 @@ // For all globals map getDSNodeForGlobal(g)->CG.getDSNodeForGlobal(g) for (DSGraph::ScalarMapTy::iterator SMI = G.getScalarMap().begin(), SME = G.getScalarMap().end(); SMI != SME; ++SMI) - if (isa(SMI->first)) { + if (GlobalValue *GV = dyn_cast(SMI->first)) { CalcNodeMapping(SMI->second, - CG.getScalarMap()[SMI->first], NodeMapping); + CG.getScalarMap()[GV], NodeMapping); } unsigned idx = CFI->PoolArgFirst; @@ -484,16 +484,15 @@ // CFI. for (unsigned i = 0, e = CFI->ArgNodes.size(); i != e; ++i, ++idx) { if (NodeMapping.count(CFI->ArgNodes[i])) { - assert(NodeMapping.count(CFI->ArgNodes[i]) && "Node not in mapping!"); DSNode *LocalNode = NodeMapping.find(CFI->ArgNodes[i])->second; if (LocalNode) { assert(FI.PoolDescriptors.count(LocalNode) && "Node not pool allocated?"); PoolArgs[idx] = FI.PoolDescriptors.find(LocalNode)->second; - } - else + } else { // LocalNode is null when a constant is passed in as a parameter PoolArgs[idx] = Constant::getNullValue(PoolAllocate::PoolDescPtrTy); + } } else { PoolArgs[idx] = Constant::getNullValue(PoolAllocate::PoolDescPtrTy); } @@ -591,9 +590,8 @@ // For all globals map getDSNodeForGlobal(g)->CG.getDSNodeForGlobal(g) for (DSGraph::ScalarMapTy::iterator SMI = G.getScalarMap().begin(), SME = G.getScalarMap().end(); SMI != SME; ++SMI) - if (isa(SMI->first)) - CalcNodeMapping(SMI->second, - CG.getScalarMap()[SMI->first], NodeMapping); + if (GlobalValue *GV = dyn_cast(SMI->first)) + CalcNodeMapping(SMI->second, CG.getScalarMap()[GV], NodeMapping); // Okay, now that we have established our mapping, we can figure out which // pool descriptors to pass in... From criswell at cs.uiuc.edu Tue Nov 11 10:01:03 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Nov 11 10:01:03 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolSlab.h PoolAllocator.cpp PoolAllocator.h Message-ID: <200311111600.KAA08457@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolSlab.h added (r1.1) PoolAllocator.cpp updated: 1.7 -> 1.8 PoolAllocator.h updated: 1.3 -> 1.4 --- Log message: Moved Slab structure definitions to PoolSlab.h. Added code to re-use arrays. --- Diffs of the changes: (+123 -33) Index: poolalloc/runtime/FreeListAllocator/PoolSlab.h diff -c /dev/null poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.1 *** /dev/null Tue Nov 11 10:00:06 2003 --- poolalloc/runtime/FreeListAllocator/PoolSlab.h Tue Nov 11 09:59:55 2003 *************** *** 0 **** --- 1,79 ---- + //===- Slab.h - Implementation of poolallocator runtime -------------------===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This header file defines structures used internally by the free list pool + // allocator library. + // + //===----------------------------------------------------------------------===// + + #ifndef _POOLSLAB_H + #define _POOLSLAB_H + + #include "PoolAllocator.h" + #include "PageManager.h" + #include + #include + + #undef assert + #define assert(X) + + //===----------------------------------------------------------------------===// + // + // Defintion of Slab Data Structures + // + //===----------------------------------------------------------------------===// + + // + // Provide a pointer type that points to pointers of itself. + // + typedef struct NodePointer + { + struct NodePointer * Next; + } NodePointer; + + // + // Structure: SlabHeader + // + // Description: + // This structure defines the beginning of a memory slab. A memory slab + // consists of book keeping information, a list of pointers, and a list of + // data blocks. + // + // There is a 1 to 1 correspondence between the pointers and the data blocks. + // Pointer[x] points to Pointer[y] if Data[y] is linked after Data[x] in a + // linked list. In other words, Pointer[x] is the "next" pointer for Data[x]. + // + // The slab is allocated on a page boundary, so it is easy to find match + // pointers to blocks if you know the offset of one of them. + // + struct SlabHeader + { + // Flags whether this is an array + unsigned int IsArray; + + // Number of nodes per slab + unsigned int NodesPerSlab; + + // Reference Count + unsigned int LiveNodes; + + // Next free data block + unsigned int NextFreeData; + + // Pointer to the next slab + struct SlabHeader * Next; + + // Pointer to the data area (will be in the same page) + unsigned char * Data; + + // Pointer to the list of nodes + NodePointer BlockList []; + }; + + #endif /* _POOLSLAB_H */ Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.7 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.8 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.7 Mon Nov 10 23:46:11 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Tue Nov 11 09:59:55 2003 @@ -14,6 +14,7 @@ #include "PoolAllocator.h" #include "PageManager.h" +#include "PoolSlab.h" #include #include @@ -25,29 +26,6 @@ // PoolSlab implementation // //===----------------------------------------------------------------------===// -struct SlabHeader -{ - // Flags whether this is an array - unsigned int IsArray; - - // Number of nodes per slab - unsigned int NodesPerSlab; - - // Reference Count - unsigned int LiveNodes; - - // Next free data block - unsigned int NextFreeData; - - // Pointer to the next slab - struct SlabHeader * Next; - - // Pointer to the data area (will be in the same page) - unsigned char * Data; - - // Pointer to the list of nodes - NodePointer BlockList []; -}; // // Function: createSlab () @@ -166,7 +144,7 @@ // We must alway return unique pointers, even if they asked for 0 bytes Pool->NodeSize = NodeSize ? NodeSize : 1; - Pool->Slabs = NULL; + Pool->Slabs = Pool->ArraySlabs = NULL; Pool->FreeList.Next = NULL; Pool->FreeablePool = 1; @@ -289,6 +267,37 @@ assert(Pool && "Null pool pointer passed into poolallocarray!\n"); // + // Scan the list of array slabs to see if there is one that fits. + // + struct SlabHeader * Slabp = Pool->ArraySlabs; + struct SlabHeader * Prevp = NULL; + + for (; Slabp != NULL; Prevp = Slabp, Slabp=Slabp->Next) + { + // + // Check to see if this slab has enough room. + // + if (Slabp->NodesPerSlab >= ArraySize) + { + if (Prevp == NULL) + { + // + // This is the first item. Change the head of the list. + // + Pool->ArraySlabs = Slabp->Next; + } + else + { + // + // This is some other item. Modify the preceding item. + // + Prevp->Next = Slabp->Next; + } + return (&(Slabp->Data[0])); + } + } + + // // Create a new slab and mark it as an array. // struct SlabHeader * NewSlab = createSlab (Pool->NodeSize, ArraySize); @@ -304,7 +313,7 @@ poolfree (PoolTy * Pool, void * Block) { assert(Pool && "Null pool pointer passed in to poolfree!\n"); - assert(Block && "Null pool pointer passed in to poolfree!\n"); + assert(Block && "Null block pointer passed in to poolfree!\n"); // // Find the header of the memory block. @@ -312,15 +321,18 @@ struct SlabHeader * slabp = DataOwner (Block); // - // If the owner is an array, just nuke the whole thing for now. - // FIXME: Inefficient! Danger Will Robinson! + // If the owning slab is an array, add it back to the free array list. // if (slabp->IsArray) { - FreePage (slabp); + slabp->Next = Pool->ArraySlabs; + Pool->ArraySlabs = slabp; return; } + // + // Find the node pointer that corresponds to this data block. + // NodePointer Node; Node.Next = &(slabp->BlockList[((unsigned char *)Block - slabp->Data)/Pool->NodeSize]); Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.3 poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.4 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.3 Mon Nov 10 21:45:37 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.h Tue Nov 11 09:59:55 2003 @@ -15,11 +15,7 @@ #ifndef POOLALLOCATOR_RUNTIME_H #define POOLALLOCATOR_RUNTIME_H -struct SlabHeader; -typedef struct NodePointer -{ - struct NodePointer * Next; -} NodePointer; +#include "PoolSlab.h" typedef struct PoolTy { // NodeSize - Keep track of the object size tracked by this pool @@ -27,6 +23,9 @@ // Pointer to the list of slabs allocated for this pool struct SlabHeader * Slabs; + + // List of slabs used to hold arrays + struct SlabHeader * ArraySlabs; // Pointer to the free list of nodes struct NodePointer FreeList; From criswell at cs.uiuc.edu Tue Nov 11 10:13:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Nov 11 10:13:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311111612.KAA09020@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.8 -> 1.9 --- Log message: When allocating arrays, round the number of nodes per slab up to the maximum that the slab can hold. This keeps us from wasting space by allowing us to re-use the entire slab used by a previous array. The NodesPerSlab value will become more important later when we allow slabs to contain multiple, contiguous memory pages. --- Diffs of the changes: (+19 -4) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.8 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.9 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.8 Tue Nov 11 09:59:55 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Tue Nov 11 10:12:14 2003 @@ -36,6 +36,9 @@ struct SlabHeader * createSlab (unsigned int NodeSize, unsigned int NodesPerSlab = 0) { + // Maximum number of nodes per slab + unsigned int MaxNodesPerSlab; + // Pointer to the new Slab struct SlabHeader * NewSlab; @@ -46,10 +49,22 @@ // // Determine how many nodes should exist within a slab. // - if (NodesPerSlab == 0) - { - NodesPerSlab = (PageSize - sizeof (struct SlabHeader)) / (sizeof (unsigned char *) + NodeSize); - } + MaxNodesPerSlab = (PageSize - sizeof (struct SlabHeader)) / (sizeof (unsigned char *) + NodeSize); + assert ((MaxNodesPerSlab >= NodesPerSlab) && "Too many nodes requested"); + + // + // Regardless of what the caller asked for, allocate the maximum number of + // nodes available in a page. + // + // This is the default behavior for regular nodes, and for arrays, we want to + // round up to the nearest slab so that we don't waste space when we use the + // array memory. + // + // FIXME: + // Specifying the number of nodes that you want will come into play once + // we allow pool allocations to span multiple memory pages. + // + NodesPerSlab = MaxNodesPerSlab; // // Determine the size of the slab. From lattner at cs.uiuc.edu Tue Nov 11 11:34:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 11:34:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/Makefile Message-ID: <200311111733.LAA12551@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime: Makefile updated: 1.2 -> 1.3 --- Log message: Build John's runtime --- Diffs of the changes: (+1 -1) Index: poolalloc/runtime/Makefile diff -u poolalloc/runtime/Makefile:1.2 poolalloc/runtime/Makefile:1.3 --- poolalloc/runtime/Makefile:1.2 Mon Aug 11 17:06:53 2003 +++ poolalloc/runtime/Makefile Tue Nov 11 11:33:44 2003 @@ -6,6 +6,6 @@ # # List all of the subdirectories that we will compile. # -DIRS=PoolAllocator +DIRS=PoolAllocator FreeListAllocator include $(LEVEL)/Makefile.common From lattner at cs.uiuc.edu Tue Nov 11 11:35:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 11:35:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/Makefile Message-ID: <200311111733.LAA12712@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: Makefile updated: 1.1 -> 1.2 --- Log message: Name it something different though! --- Diffs of the changes: (+1 -1) Index: poolalloc/runtime/FreeListAllocator/Makefile diff -u poolalloc/runtime/FreeListAllocator/Makefile:1.1 poolalloc/runtime/FreeListAllocator/Makefile:1.2 --- poolalloc/runtime/FreeListAllocator/Makefile:1.1 Mon Nov 10 13:42:39 2003 +++ poolalloc/runtime/FreeListAllocator/Makefile Tue Nov 11 11:33:49 2003 @@ -1,7 +1,7 @@ LEVEL = ../.. BYTECODE_LIBRARY=1 SHARED_LIBRARY=1 -LIBRARYNAME=poolalloc_rt +LIBRARYNAME=poolalloc_fl_rt include $(LEVEL)/Makefile.common From criswell at cs.uiuc.edu Tue Nov 11 12:04:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Nov 11 12:04:01 2003 Subject: [llvm-commits] CVS: poolalloc/autoconf/configure.ac Message-ID: <200311111803.MAA02913@choi.cs.uiuc.edu> Changes in directory poolalloc/autoconf: configure.ac updated: 1.3 -> 1.4 --- Log message: Add the Free List Pool Allocator to the list of stuff to compile. --- Diffs of the changes: (+1 -0) Index: poolalloc/autoconf/configure.ac diff -u poolalloc/autoconf/configure.ac:1.3 poolalloc/autoconf/configure.ac:1.4 --- poolalloc/autoconf/configure.ac:1.3 Tue Sep 30 11:31:25 2003 +++ poolalloc/autoconf/configure.ac Tue Nov 11 12:03:08 2003 @@ -26,6 +26,7 @@ AC_CONFIG_MAKEFILE(lib/PoolAllocate/Makefile) AC_CONFIG_MAKEFILE(runtime/Makefile) AC_CONFIG_MAKEFILE(runtime/PoolAllocator/Makefile) +AC_CONFIG_MAKEFILE(runtime/FreeListAllocator/Makefile) AC_CONFIG_MAKEFILE(test/Makefile) AC_CONFIG_MAKEFILE(test/TEST.poolalloc.Makefile) From criswell at cs.uiuc.edu Tue Nov 11 12:04:04 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Nov 11 12:04:04 2003 Subject: [llvm-commits] CVS: poolalloc/configure Message-ID: <200311111803.MAA02906@choi.cs.uiuc.edu> Changes in directory poolalloc: configure updated: 1.4 -> 1.5 --- Log message: Add the Free List Pool Allocator to the list of stuff to compile. --- Diffs of the changes: (+6 -0) Index: poolalloc/configure diff -u poolalloc/configure:1.4 poolalloc/configure:1.5 --- poolalloc/configure:1.4 Tue Sep 30 11:31:24 2003 +++ poolalloc/configure Tue Nov 11 12:03:06 2003 @@ -1245,6 +1245,9 @@ ac_config_commands="$ac_config_commands runtime/PoolAllocator/Makefile" + ac_config_commands="$ac_config_commands runtime/FreeListAllocator/Makefile" + + ac_config_commands="$ac_config_commands test/Makefile" @@ -1838,6 +1841,7 @@ ${srcdir}/autoconf/mkinstalldirs `dirname lib/PoolAllocate/Makefile` ${srcdir}/autoconf/mkinstalldirs `dirname runtime/Makefile` ${srcdir}/autoconf/mkinstalldirs `dirname runtime/PoolAllocator/Makefile` +${srcdir}/autoconf/mkinstalldirs `dirname runtime/FreeListAllocator/Makefile` ${srcdir}/autoconf/mkinstalldirs `dirname test/Makefile` ${srcdir}/autoconf/mkinstalldirs `dirname test/TEST.poolalloc.Makefile` @@ -1856,6 +1860,7 @@ "lib/PoolAllocate/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS lib/PoolAllocate/Makefile" ;; "runtime/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS runtime/Makefile" ;; "runtime/PoolAllocator/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS runtime/PoolAllocator/Makefile" ;; + "runtime/FreeListAllocator/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS runtime/FreeListAllocator/Makefile" ;; "test/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/Makefile" ;; "test/TEST.poolalloc.Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/TEST.poolalloc.Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 @@ -2207,6 +2212,7 @@ lib/PoolAllocate/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/lib/PoolAllocate/Makefile lib/PoolAllocate/Makefile ;; runtime/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/runtime/Makefile runtime/Makefile ;; runtime/PoolAllocator/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/runtime/PoolAllocator/Makefile runtime/PoolAllocator/Makefile ;; + runtime/FreeListAllocator/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/runtime/FreeListAllocator/Makefile runtime/FreeListAllocator/Makefile ;; test/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/Makefile test/Makefile ;; test/TEST.poolalloc.Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/TEST.poolalloc.Makefile test/TEST.poolalloc.Makefile ;; esac From brukman at cs.uiuc.edu Tue Nov 11 12:24:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Nov 11 12:24:02 2003 Subject: [llvm-commits] CVS: llvm/tools/llee/ExecveHandler.c Message-ID: <200311111823.MAA19704@zion.cs.uiuc.edu> Changes in directory llvm/tools/llee: ExecveHandler.c updated: 1.4 -> 1.5 --- Log message: The caching will not live in LLEE's execve() handler; that's suboptimal. --- Diffs of the changes: (+2 -8) Index: llvm/tools/llee/ExecveHandler.c diff -u llvm/tools/llee/ExecveHandler.c:1.4 llvm/tools/llee/ExecveHandler.c:1.5 --- llvm/tools/llee/ExecveHandler.c:1.4 Mon Sep 29 17:36:59 2003 +++ llvm/tools/llee/ExecveHandler.c Tue Nov 11 12:23:09 2003 @@ -65,14 +65,8 @@ free(fileAddr); } llvmExecve(realFilename, argv, envp); - } else { - /* - * Not in cache: save translation - */ - //llvmSaveFile(realFilename, addr, len); - //fprintf(stderr, "Cached: '%s'\n", realFilename); - } - + } + /* * This is a bytecode file, so execute the JIT with the program and * parameters. From gaeke at cs.uiuc.edu Tue Nov 11 12:28:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 12:28:01 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/Linker.cpp Message-ID: <200311111827.MAA04401@gally.cs.uiuc.edu> Changes in directory llvm/tools/gccld: Linker.cpp updated: 1.13 -> 1.14 --- Log message: This version of Linker.cpp works a lot better, but it's a little messy. Sorry. Use FileOpenable() instead of FileExists(). Create IsBytecode() predicate -- like IsArchive(), but for bytecode files. Use IsBytecode() before trying to load any file as a bytecode file. --- Diffs of the changes: (+28 -20) Index: llvm/tools/gccld/Linker.cpp diff -u llvm/tools/gccld/Linker.cpp:1.13 llvm/tools/gccld/Linker.cpp:1.14 --- llvm/tools/gccld/Linker.cpp:1.13 Wed Nov 5 16:12:52 2003 +++ llvm/tools/gccld/Linker.cpp Tue Nov 11 12:27:37 2003 @@ -30,24 +30,32 @@ #include #include -/// FileExists - Returns true IFF a file named FN exists and is readable. -/// -static inline bool FileExists(const std::string &FN) { - return access(FN.c_str(), R_OK | F_OK) != -1; -} - /// IsArchive - Returns true IFF the file named FN appears to be a "ar" library /// archive. The file named FN must exist. /// static inline bool IsArchive(const std::string &FN) { // Inspect the beginning of the file to see if it contains the "ar" magic // string. - std::string ArchiveMagic("!\012"); - char buf[1 + ArchiveMagic.size()]; + std::string Magic("!\012"); + char buf[1 + Magic.size()]; std::ifstream f(FN.c_str()); - f.read(buf, ArchiveMagic.size()); - buf[ArchiveMagic.size()] = '\0'; - return ArchiveMagic == buf; + f.read(buf, Magic.size()); + buf[Magic.size()] = '\0'; + return Magic == buf; +} + +/// IsBytecode - Returns true IFF the file named FN appears to be an +/// LLVM bytecode file. The file named FN must exist. +/// +static inline bool IsBytecode(const std::string &FN) { + // Inspect the beginning of the file to see if it contains the LLVM + // bytecode format magic string. + std::string Magic("llvm"); + char buf[1 + Magic.size()]; + std::ifstream f(FN.c_str()); + f.read(buf, Magic.size()); + buf[Magic.size()] = '\0'; + return Magic == buf; } /// FindLib - locates a particular library. It will prepend and append @@ -67,7 +75,7 @@ static std::string FindLib(const std::string &Filename, const std::vector &Paths) { // Determine if the pathname can be found as it stands. - if (FileExists(Filename)) + if (FileOpenable(Filename)) return Filename; // If that doesn't work, convert the name into a library name. @@ -78,13 +86,13 @@ for (unsigned Index = 0; Index != Paths.size(); ++Index) { std::string Directory = Paths[Index] + "/"; - if (FileExists(Directory + LibName + ".bc")) + if (FileOpenable(Directory + LibName + ".bc")) return Directory + LibName + ".bc"; - if (FileExists(Directory + LibName + ".so")) + if (FileOpenable(Directory + LibName + ".so")) return Directory + LibName + ".so"; - if (FileExists(Directory + LibName + ".a")) + if (FileOpenable(Directory + LibName + ".a")) return Directory + LibName + ".a"; } @@ -94,7 +102,7 @@ return std::string(); LibName = std::string(SearchPath) + "/" + LibName; - if (FileExists(LibName)) + if (FileOpenable(LibName)) return LibName; return std::string(); @@ -329,7 +337,7 @@ for (unsigned i = 0; i < Files.size(); ++i) { // Determine where this file lives. - if (FileExists(Files[i])) { + if (FileOpenable(Files[i])) { Pathname = Files[i]; } else { if (SearchPath == NULL) { @@ -341,7 +349,7 @@ } Pathname = std::string(SearchPath)+"/"+Files[i]; - if (!FileExists(Pathname)) { + if (!FileOpenable(Pathname)) { std::cerr << progname << ": Cannot find linker input file '" << Files[i] << "'\n"; return true; @@ -359,7 +367,7 @@ ": Error linking in archive '" + Pathname + "'"); return true; } - } else { + } else if (IsBytecode(Pathname)) { if (Verbose) std::cerr << "Trying to link bytecode file '" << Pathname << "'\n"; @@ -426,7 +434,7 @@ ": Error linking in archive '" + Pathname + "' (-l" + Libraries[i] + ")"); return true; } - } else { + } else if (IsBytecode(Pathname)) { if (Verbose) std::cerr << "Trying to link bytecode file '" << Pathname << "' (-l" << Libraries[i] << ")\n"; From gaeke at cs.uiuc.edu Tue Nov 11 12:28:04 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 12:28:04 2003 Subject: [llvm-commits] CVS: llvm/lib/Support/FileUtilities.cpp Message-ID: <200311111827.MAA04377@gally.cs.uiuc.edu> Changes in directory llvm/lib/Support: FileUtilities.cpp updated: 1.8 -> 1.9 --- Log message: Add implementation of FileOpenable(). Refactor MakeFileExecutable() & MakeFileExecutable() into AddPermissionsBits(). --- Diffs of the changes: (+42 -97) Index: llvm/lib/Support/FileUtilities.cpp diff -u llvm/lib/Support/FileUtilities.cpp:1.8 llvm/lib/Support/FileUtilities.cpp:1.9 --- llvm/lib/Support/FileUtilities.cpp:1.8 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/FileUtilities.cpp Tue Nov 11 12:27:21 2003 @@ -20,6 +20,21 @@ #include #include +/// FileOpenable - Returns true IFF Filename names an existing regular +/// file which we can successfully open. +/// +bool FileOpenable (const std::string &Filename) { + struct stat s; + if (stat (Filename.c_str (), &s) == -1) + return false; // Cannot stat file + if (!S_ISREG (s.st_mode)) + return false; // File is not a regular file + std::ifstream FileStream (Filename.c_str ()); + if (!FileStream) + return false; // File is not openable + return true; +} + /// DiffFiles - Compare the two files specified, returning true if they are /// different or if there is a file error. If you specify a string to fill in /// for the error option, it will set the string to an error message if an error @@ -100,111 +115,41 @@ return Result; } -/// -/// Method: MakeFileExecutable () -/// -/// Description: -/// This method makes the specified filename executable by giving it -/// execute permission. It respects the umask value of the process, and it -/// does not enable any unnecessary access bits. -/// -/// Algorithm: -/// o Get file's current permissions. -/// o Get the process's current umask. -/// o Take the set of all execute bits and disable those found in the umask. -/// o Add the remaining permissions to the file's permissions. -/// -bool -MakeFileExecutable (const std::string & Filename) -{ - // Permissions masking value of the user - mode_t mask; - - // Permissions currently enabled on the file - struct stat fstat; - - // - // Grab the umask value from the operating system. We want to use it when - // changing the file's permissions. - // - // Note: - // Umask() is one of those annoying system calls. You have to call it - // to get the current value and then set it back. - // - mask = umask (0x777); +static bool AddPermissionsBits (const std::string &Filename, mode_t bits) { + // Get the umask value from the operating system. We want to use it + // when changing the file's permissions. Since calling umask() sets + // the umask and returns its old value, we must call it a second + // time to reset it to the user's preference. + mode_t mask = umask (0777); // The arg. to umask is arbitrary... umask (mask); - // - // Go fetch the file's current permission bits. We want to *add* execute - // access to the file. - // - if ((stat (Filename.c_str(), &fstat)) == -1) - { + // Get the file's current mode. + struct stat st; + if ((stat (Filename.c_str(), &st)) == -1) return false; - } - // - // Make the file executable... - // - if ((chmod(Filename.c_str(), (fstat.st_mode | (0111 & ~mask)))) == -1) - { + // Change the file to have whichever permissions bits from 'bits' + // that the umask would not disable. + if ((chmod(Filename.c_str(), (st.st_mode | (bits & ~mask)))) == -1) return false; - } return true; } +/// MakeFileExecutable - Make the file named Filename executable by +/// setting whichever execute permissions bits the process's current +/// umask would allow. Filename must name an existing file or +/// directory. Returns true on success, false on error. +/// +bool MakeFileExecutable (const std::string &Filename) { + return AddPermissionsBits (Filename, 0111); +} + +/// MakeFileReadable - Make the file named Filename readable by +/// setting whichever read permissions bits the process's current +/// umask would allow. Filename must name an existing file or +/// directory. Returns true on success, false on error. /// -/// Method: MakeFileReadable () -/// -/// Description: -/// This method makes the specified filename readable by giving it -/// read permission. It respects the umask value of the process, and it -/// does not enable any unnecessary access bits. -/// -/// Algorithm: -/// o Get file's current permissions. -/// o Get the process's current umask. -/// o Take the set of all read bits and disable those found in the umask. -/// o Add the remaining permissions to the file's permissions. -/// -bool -MakeFileReadable (const std::string & Filename) -{ - // Permissions masking value of the user - mode_t mask; - - // Permissions currently enabled on the file - struct stat fstat; - - // - // Grab the umask value from the operating system. We want to use it when - // changing the file's permissions. - // - // Note: - // Umask() is one of those annoying system calls. You have to call it - // to get the current value and then set it back. - // - mask = umask (0x777); - umask (mask); - - // - // Go fetch the file's current permission bits. We want to *add* execute - // access to the file. - // - if ((stat (Filename.c_str(), &fstat)) == -1) - { - return false; - } - - // - // Make the file executable... - // - if ((chmod(Filename.c_str(), (fstat.st_mode | (0444 & ~mask)))) == -1) - { - return false; - } - - return true; +bool MakeFileReadable (const std::string &Filename) { + return AddPermissionsBits (Filename, 0444); } - From gaeke at cs.uiuc.edu Tue Nov 11 12:28:06 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 12:28:06 2003 Subject: [llvm-commits] CVS: llvm/include/Support/FileUtilities.h Message-ID: <200311111827.MAA04358@gally.cs.uiuc.edu> Changes in directory llvm/include/Support: FileUtilities.h updated: 1.5 -> 1.6 --- Log message: VS: ---------------------------------------------------------------------- Add prototype for FileOpenable(). --- Diffs of the changes: (+5 -0) Index: llvm/include/Support/FileUtilities.h diff -u llvm/include/Support/FileUtilities.h:1.5 llvm/include/Support/FileUtilities.h:1.6 --- llvm/include/Support/FileUtilities.h:1.5 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/FileUtilities.h Tue Nov 11 12:27:11 2003 @@ -17,6 +17,11 @@ #include +/// FileOpenable - Returns true IFF Filename names an existing regular +/// file which we can successfully open. +/// +bool FileOpenable (const std::string &Filename); + /// DiffFiles - Compare the two files specified, returning true if they are /// different or if there is a file error. If you specify a string to fill in /// for the error option, it will set the string to an error message if an error From brukman at cs.uiuc.edu Tue Nov 11 12:40:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Nov 11 12:40:02 2003 Subject: [llvm-commits] CVS: llvm/tools/llee/ExecveHandler.c Message-ID: <200311111839.MAA20658@zion.cs.uiuc.edu> Changes in directory llvm/tools/llee: ExecveHandler.c updated: 1.5 -> 1.6 --- Log message: 'Tis quite silly to check for a cached version of the entire executable. That amounts to checking for a completely-native version. We'll cache on a function-by-function basis instead (in the JIT's CodeEmitter). --- Diffs of the changes: (+0 -16) Index: llvm/tools/llee/ExecveHandler.c diff -u llvm/tools/llee/ExecveHandler.c:1.5 llvm/tools/llee/ExecveHandler.c:1.6 --- llvm/tools/llee/ExecveHandler.c:1.5 Tue Nov 11 12:23:09 2003 +++ llvm/tools/llee/ExecveHandler.c Tue Nov 11 12:38:56 2003 @@ -5,7 +5,6 @@ // //===----------------------------------------------------------------------===// -#include "OSInterface.h" #include "SysUtils.h" #include "Config/errno.h" #include "Config/stdlib.h" @@ -52,21 +51,6 @@ close(file); if (bytesRead != (ssize_t)headerSize) return EIO; if (!memcmp(llvmHeader, header, headerSize)) { - /* - * Check if we have a cached translation on disk - */ - struct stat buf; - llvmStat(realFilename, &buf); - if (isExecutable(&buf)) { - size_t size; - void *fileAddr = llvmReadFile(realFilename, &size); - fprintf(stderr, "Found in cache: '%s'\n", realFilename); - if (fileAddr) { - free(fileAddr); - } - llvmExecve(realFilename, argv, envp); - } - /* * This is a bytecode file, so execute the JIT with the program and * parameters. From lattner at cs.uiuc.edu Tue Nov 11 14:13:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 14:13:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200311112012.OAA05548@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.126 -> 1.127 --- Log message: Compute node offsets correctly --- Diffs of the changes: (+2 -2) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.126 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.127 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.126 Mon Nov 10 23:08:59 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Tue Nov 11 14:12:32 2003 @@ -1652,13 +1652,13 @@ if (Entry.getNode()) { // Termination of recursion! assert(Entry.getNode() == N2 && - Entry.getOffset() == (NH1.getOffset()+NH2.getOffset()) && + Entry.getOffset() == (NH2.getOffset()-NH1.getOffset()) && "Inconsistent mapping detected!"); return; } Entry.setNode(N2); - Entry.setOffset(NH1.getOffset()+NH2.getOffset()); + Entry.setOffset(NH2.getOffset()-NH1.getOffset()); // Loop over all of the fields that N1 and N2 have in common, recursively // mapping the edges together now. From criswell at cs.uiuc.edu Tue Nov 11 14:14:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Nov 11 14:14:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PageManager.cpp PageManager.h PoolAllocator.cpp Message-ID: <200311112013.OAA04018@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PageManager.cpp updated: 1.2 -> 1.3 PageManager.h updated: 1.1 -> 1.2 PoolAllocator.cpp updated: 1.9 -> 1.10 --- Log message: Added support for array spanning multiple pages. Current implementation bypasses some of the PageManager functionality, but this keeps things simple. Added some comments to the PageManager code. Made GetPages() externally accessible. --- Diffs of the changes: (+42 -43) Index: poolalloc/runtime/FreeListAllocator/PageManager.cpp diff -u poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.2 poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.3 --- poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.2 Mon Nov 10 16:44:57 2003 +++ poolalloc/runtime/FreeListAllocator/PageManager.cpp Tue Nov 11 14:13:42 2003 @@ -32,12 +32,19 @@ typedef std::vector > FreePagesListType; static FreePagesListType *FreePages = 0; +// +// Function: InitializePageManager () +// +// Description: +// This function initializes the Page Manager code. It must be called before +// any other Page Manager functions are called. +// void InitializePageManager() { if (!PageSize) PageSize = sysconf(_SC_PAGESIZE); } #if !USE_MEMALIGN -static void *GetPages(unsigned NumPages) { +void *GetPages(unsigned NumPages) { #if defined(i386) || defined(__i386__) || defined(__x86__) /* Linux and *BSD tend to have these flags named differently. */ #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS) @@ -64,14 +71,21 @@ #endif -/// AllocatePage - This function returns a chunk of memory with size and -/// alignment specified by PageSize. +/// +/// Function: AllocatePage () +/// +/// Description: +/// This function returns a chunk of memory with size and alignment specified +/// by PageSize. void *AllocatePage() { #if USE_MEMALIGN void *Addr; posix_memalign(&Addr, PageSize, PageSize); return Addr; #else + // + // Try to allocate a page that has already been created. + // if (FreePages && !FreePages->empty()) { void *Result = FreePages->back(); FreePages->pop_back(); Index: poolalloc/runtime/FreeListAllocator/PageManager.h diff -u poolalloc/runtime/FreeListAllocator/PageManager.h:1.1 poolalloc/runtime/FreeListAllocator/PageManager.h:1.2 --- poolalloc/runtime/FreeListAllocator/PageManager.h:1.1 Mon Nov 10 16:31:11 2003 +++ poolalloc/runtime/FreeListAllocator/PageManager.h Tue Nov 11 14:13:42 2003 @@ -34,4 +34,8 @@ /// future allocation. void FreePage(void *Page); +/// GetPages - Just allocate the specified pages on a page boundary. This is +/// a hack for large arrays. +void * GetPages (unsigned NumPages); + #endif Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.9 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.10 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.9 Tue Nov 11 10:12:14 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Tue Nov 11 14:13:42 2003 @@ -36,54 +36,38 @@ struct SlabHeader * createSlab (unsigned int NodeSize, unsigned int NodesPerSlab = 0) { - // Maximum number of nodes per slab - unsigned int MaxNodesPerSlab; + // Maximum number of nodes per page + unsigned int MaxNodesPerPage; // Pointer to the new Slab struct SlabHeader * NewSlab; - // Pointers and index for initializing memory - NodePointer p; - unsigned int index; - // - // Determine how many nodes should exist within a slab. + // Determine how many nodes can exist within a regular slab. // - MaxNodesPerSlab = (PageSize - sizeof (struct SlabHeader)) / (sizeof (unsigned char *) + NodeSize); - assert ((MaxNodesPerSlab >= NodesPerSlab) && "Too many nodes requested"); + MaxNodesPerPage = (PageSize - sizeof (struct SlabHeader)) / (sizeof (NodePointer) + NodeSize); // - // Regardless of what the caller asked for, allocate the maximum number of - // nodes available in a page. - // - // This is the default behavior for regular nodes, and for arrays, we want to - // round up to the nearest slab so that we don't waste space when we use the - // array memory. - // - // FIXME: - // Specifying the number of nodes that you want will come into play once - // we allow pool allocations to span multiple memory pages. - // - NodesPerSlab = MaxNodesPerSlab; - + // Allocate the memory for the slab and initialize its contents. // - // Determine the size of the slab. - // - int slab_size = ((sizeof (unsigned char *) + NodeSize) * NodesPerSlab) + - sizeof (struct SlabHeader); - - assert (slab_size <= PageSize); + if (NodesPerSlab > MaxNodesPerPage) + { + NewSlab = (struct SlabHeader *) GetPages ((NodeSize * NodesPerSlab / PageSize) + 1); + assert (NewSlab != NULL); + NewSlab->IsArray = 1; + } + else + { + NewSlab = (struct SlabHeader *) AllocatePage (); + assert (NewSlab != NULL); + NewSlab->IsArray = 0; - // - // Allocate a piece of memory for the new slab. - // - NewSlab = (struct SlabHeader *) AllocatePage (); - assert (NewSlab != NULL); + // + // Bump the number of nodes in the slab up to the maximum. + // + NodesPerSlab = MaxNodesPerPage; + } - // - // Initialize the contents of the slab. - // - NewSlab->IsArray = 0; NewSlab->NodesPerSlab = NodesPerSlab; NewSlab->NextFreeData = NewSlab->LiveNodes = 0; NewSlab->Next = NULL; @@ -272,9 +256,6 @@ // Inputs: // Pool - The pool from which to allocate memory. // ArraySize - The size of the array in number of elements (not bytes). -// -// FIXME: -// This algorithm is not very space efficient. This needs to be fixed. // void * poolallocarray(PoolTy* Pool, unsigned ArraySize) From criswell at cs.uiuc.edu Tue Nov 11 14:38:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Nov 11 14:38:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311112037.OAA05589@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.10 -> 1.11 --- Log message: Added run time checks for big problems. --- Diffs of the changes: (+20 -2) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.10 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.11 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.10 Tue Nov 11 14:13:42 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Tue Nov 11 14:37:47 2003 @@ -17,6 +17,7 @@ #include "PoolSlab.h" #include #include +#include #undef assert #define assert(X) @@ -48,18 +49,35 @@ MaxNodesPerPage = (PageSize - sizeof (struct SlabHeader)) / (sizeof (NodePointer) + NodeSize); // + // If we can't fit a node into a page, give up. + // + if (MaxNodesPerPage == 0) + { + std::cerr << "Node size is too large" << std::endl; + abort(); + } + + // // Allocate the memory for the slab and initialize its contents. // if (NodesPerSlab > MaxNodesPerPage) { NewSlab = (struct SlabHeader *) GetPages ((NodeSize * NodesPerSlab / PageSize) + 1); - assert (NewSlab != NULL); + if (NewSlab == NULL) + { + std::cerr << "Failed large allocation" << std::endl; + abort(); + } NewSlab->IsArray = 1; } else { NewSlab = (struct SlabHeader *) AllocatePage (); - assert (NewSlab != NULL); + if (NewSlab == NULL) + { + std::cerr << "Failed regular allocation" << std::endl; + abort(); + } NewSlab->IsArray = 0; // From criswell at cs.uiuc.edu Tue Nov 11 14:44:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Nov 11 14:44:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311112043.OAA06862@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.11 -> 1.12 --- Log message: Moved from iostream to stdio output functions. This removes dependencies on the C++ standard library. --- Diffs of the changes: (+4 -4) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.11 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.12 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.11 Tue Nov 11 14:37:47 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Tue Nov 11 14:43:40 2003 @@ -17,7 +17,7 @@ #include "PoolSlab.h" #include #include -#include +#include #undef assert #define assert(X) @@ -53,7 +53,7 @@ // if (MaxNodesPerPage == 0) { - std::cerr << "Node size is too large" << std::endl; + fprintf (stderr, "Node size is too large\n"); abort(); } @@ -65,7 +65,7 @@ NewSlab = (struct SlabHeader *) GetPages ((NodeSize * NodesPerSlab / PageSize) + 1); if (NewSlab == NULL) { - std::cerr << "Failed large allocation" << std::endl; + fprintf (stderr, "Failed large allocation\n"); abort(); } NewSlab->IsArray = 1; @@ -75,7 +75,7 @@ NewSlab = (struct SlabHeader *) AllocatePage (); if (NewSlab == NULL) { - std::cerr << "Failed regular allocation" << std::endl; + fprintf (stderr, "Failed regular allocation"); abort(); } NewSlab->IsArray = 0; From gaeke at cs.uiuc.edu Tue Nov 11 15:53:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 15:53:01 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311112152.PAA21024@gally.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.36 -> 1.37 --- Log message: Add another fixed bug. --- Diffs of the changes: (+2 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.36 llvm/docs/ReleaseNotes.html:1.37 --- llvm/docs/ReleaseNotes.html:1.36 Sun Nov 9 13:44:07 2003 +++ llvm/docs/ReleaseNotes.html Tue Nov 11 15:52:34 2003 @@ -125,6 +125,7 @@
  2. [buildscripts] Building into objdir with .o in it fails
  3. [setjmp/longjmp] Linking C programs which use setjmp/longjmp sometimes fail with references to the C++ runtime library!
  4. [c++] C++ Frontend lays out superclasses like anonymous bitfields!
  5. +
  6. gccld -Lfoo -lfoo fails to find ./foo/libfoo.a
  7. At this time, LLVM is known to work properly with SPEC CPU 2000, the Olden @@ -431,6 +432,6 @@ Maintained By: The LLVM Team
    -Last modified: Sun Nov 9 13:42:42 CST 2003 +Last modified: Tue Nov 11 15:48:35 CST 2003 From gaeke at cs.uiuc.edu Tue Nov 11 15:53:04 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 15:53:04 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200311112152.PAA20969@gally.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.26 -> 1.27 --- Log message: Add a bug. Also re-sort bugs. --- Diffs of the changes: (+5 -4) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.26 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.27 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.26 Sun Nov 9 13:44:44 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Tue Nov 11 15:52:21 2003 @@ -197,12 +197,13 @@

  8. [lowersetjmp] Lowersetjmp pass breaks dominance properties!
  9. -

  10. [buildscripts] Building into objdir -with .o in it fails
  11. +

  12. SymbolTable::getUniqueName is very inefficient
  13. + +

  14. [buildscripts] Building into objdir with .o in it fails
  15. [setjmp/longjmp] Linking C programs which use setjmp/longjmp sometimes fail with references to the C++ runtime library!
  16. -

  17. SymbolTable::getUniqueName is very inefficient
  18. +

  19. gccld -Lfoo -lfoo fails to find ./foo/libfoo.a

  20. Known problems with the C front-end

      @@ -494,6 +495,6 @@ Maintained By: The LLVM Team
      -Last modified: Sun Nov 9 13:43:25 CST 2003 +Last modified: Tue Nov 11 15:50:52 CST 2003 From gaeke at cs.uiuc.edu Tue Nov 11 15:54:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 15:54:01 2003 Subject: [llvm-commits] CVS: llvm/include/Support/FileUtilities.h Message-ID: <200311112153.PAA21091@gally.cs.uiuc.edu> Changes in directory llvm/include/Support: FileUtilities.h updated: 1.6 -> 1.7 --- Log message: Add prototypes for CheckMagic, IsArchive, and IsBytecode. --- Diffs of the changes: (+17 -2) Index: llvm/include/Support/FileUtilities.h diff -u llvm/include/Support/FileUtilities.h:1.6 llvm/include/Support/FileUtilities.h:1.7 --- llvm/include/Support/FileUtilities.h:1.6 Tue Nov 11 12:27:11 2003 +++ llvm/include/Support/FileUtilities.h Tue Nov 11 15:53:29 2003 @@ -17,8 +17,23 @@ #include -/// FileOpenable - Returns true IFF Filename names an existing regular -/// file which we can successfully open. +/// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must +/// name a readable file. +/// +bool CheckMagic (const std::string &FN, const std::string &Magic); + +/// IsArchive - Returns true IFF the file named FN appears to be a "ar" library +/// archive. The file named FN must exist. +/// +bool IsArchive (const std::string &FN); + +/// IsBytecode - Returns true IFF the file named FN appears to be an LLVM +/// bytecode file. The file named FN must exist. +/// +bool IsBytecode (const std::string &FN); + +/// FileOpenable - Returns true IFF Filename names an existing regular file +/// which we can successfully open. /// bool FileOpenable (const std::string &Filename); From gaeke at cs.uiuc.edu Tue Nov 11 15:55:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 15:55:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Support/FileUtilities.cpp Message-ID: <200311112154.PAA21122@gally.cs.uiuc.edu> Changes in directory llvm/lib/Support: FileUtilities.cpp updated: 1.9 -> 1.10 --- Log message: Move IsArchive and IsBytecode here from gccld. Refactor into CheckMagic. --- Diffs of the changes: (+29 -0) Index: llvm/lib/Support/FileUtilities.cpp diff -u llvm/lib/Support/FileUtilities.cpp:1.9 llvm/lib/Support/FileUtilities.cpp:1.10 --- llvm/lib/Support/FileUtilities.cpp:1.9 Tue Nov 11 12:27:21 2003 +++ llvm/lib/Support/FileUtilities.cpp Tue Nov 11 15:53:50 2003 @@ -20,6 +20,35 @@ #include #include +/// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must +/// name a readable file. +/// +bool CheckMagic (const std::string &FN, const std::string &Magic) { + char buf[1 + Magic.size ()]; + std::ifstream f (FN.c_str ()); + f.read (buf, Magic.size ()); + buf[Magic.size ()] = '\0'; + return Magic == buf; +} + +/// IsArchive - Returns true IFF the file named FN appears to be a "ar" library +/// archive. The file named FN must exist. +/// +bool IsArchive(const std::string &FN) { + // Inspect the beginning of the file to see if it contains the "ar" + // library archive format magic string. + return CheckMagic (FN, "!\012"); +} + +/// IsBytecode - Returns true IFF the file named FN appears to be an LLVM +/// bytecode file. The file named FN must exist. +/// +bool IsBytecode(const std::string &FN) { + // Inspect the beginning of the file to see if it contains the LLVM + // bytecode format magic string. + return CheckMagic (FN, "llvm"); +} + /// FileOpenable - Returns true IFF Filename names an existing regular /// file which we can successfully open. /// From gaeke at cs.uiuc.edu Tue Nov 11 15:55:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 15:55:03 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/Linker.cpp Message-ID: <200311112154.PAA21143@gally.cs.uiuc.edu> Changes in directory llvm/tools/gccld: Linker.cpp updated: 1.14 -> 1.15 --- Log message: Move IsArchive, IsBytecode to FileUtilities. Fix up some method comments. --- Diffs of the changes: (+18 -61) Index: llvm/tools/gccld/Linker.cpp diff -u llvm/tools/gccld/Linker.cpp:1.14 llvm/tools/gccld/Linker.cpp:1.15 --- llvm/tools/gccld/Linker.cpp:1.14 Tue Nov 11 12:27:37 2003 +++ llvm/tools/gccld/Linker.cpp Tue Nov 11 15:54:01 2003 @@ -30,50 +30,15 @@ #include #include -/// IsArchive - Returns true IFF the file named FN appears to be a "ar" library -/// archive. The file named FN must exist. +/// FindLib - Try to convert Filename into the name of a file that we can open, +/// if it does not already name a file we can open, by first trying to open +/// Filename, then libFilename. for each of a set of several common +/// library suffixes, in each of the directories in Paths and the directory +/// named by the value of the environment variable LLVM_LIB_SEARCH_PATH. Returns +/// an empty string if no matching file can be found. /// -static inline bool IsArchive(const std::string &FN) { - // Inspect the beginning of the file to see if it contains the "ar" magic - // string. - std::string Magic("!\012"); - char buf[1 + Magic.size()]; - std::ifstream f(FN.c_str()); - f.read(buf, Magic.size()); - buf[Magic.size()] = '\0'; - return Magic == buf; -} - -/// IsBytecode - Returns true IFF the file named FN appears to be an -/// LLVM bytecode file. The file named FN must exist. -/// -static inline bool IsBytecode(const std::string &FN) { - // Inspect the beginning of the file to see if it contains the LLVM - // bytecode format magic string. - std::string Magic("llvm"); - char buf[1 + Magic.size()]; - std::ifstream f(FN.c_str()); - f.read(buf, Magic.size()); - buf[Magic.size()] = '\0'; - return Magic == buf; -} - -/// FindLib - locates a particular library. It will prepend and append -/// various directories, prefixes, and suffixes until it can find the library. -/// -/// Inputs: -/// Filename - Name of the file to find. -/// Paths - List of directories to search. -/// -/// Outputs: -/// None. -/// -/// Return value: -/// The name of the file is returned. -/// If the file is not found, an empty string is returned. -/// -static std::string -FindLib(const std::string &Filename, const std::vector &Paths) { +static std::string FindLib(const std::string &Filename, + const std::vector &Paths) { // Determine if the pathname can be found as it stands. if (FileOpenable(Filename)) return Filename; @@ -165,25 +130,17 @@ } -/// LoadObject - reads the specified bytecode object file. -/// -/// Inputs: -/// FN - The name of the file to load. -/// -/// Outputs: -/// OutErrorMessage - The error message to give back to the caller. -/// -/// Return Value: -/// A pointer to a module represening the bytecode file is returned. -/// If an error occurs, the pointer is 0. -/// -std::auto_ptr -LoadObject(const std::string & FN, std::string &OutErrorMessage) { - std::string ErrorMessage; - Module *Result = ParseBytecodeFile(FN, &ErrorMessage); +/// LoadObject - Read in and parse the bytecode file named by FN and return the +/// module it contains (wrapped in an auto_ptr), or 0 and set ErrorMessage if an +/// error occurs. +/// +std::auto_ptr LoadObject(const std::string &FN, + std::string &ErrorMessage) { + std::string ParserErrorMessage; + Module *Result = ParseBytecodeFile(FN, &ParserErrorMessage); if (Result) return std::auto_ptr(Result); - OutErrorMessage = "Bytecode file '" + FN + "' corrupt!"; - if (ErrorMessage.size()) OutErrorMessage += ": " + ErrorMessage; + ErrorMessage = "Bytecode file '" + FN + "' could not be loaded"; + if (ParserErrorMessage.size()) ErrorMessage += ": " + ParserErrorMessage; return std::auto_ptr(); } From gaeke at cs.uiuc.edu Tue Nov 11 16:42:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp EdgeCode.cpp Graph.cpp Graph.h GraphAuxiliary.cpp InstLoops.cpp ProfilePaths.cpp RetracePath.cpp Message-ID: <200311112241.QAA20732@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation/ProfilePaths: CombineBranch.cpp updated: 1.5 -> 1.6 EdgeCode.cpp updated: 1.25 -> 1.26 Graph.cpp updated: 1.13 -> 1.14 Graph.h updated: 1.11 -> 1.12 GraphAuxiliary.cpp updated: 1.20 -> 1.21 InstLoops.cpp updated: 1.10 -> 1.11 ProfilePaths.cpp updated: 1.37 -> 1.38 RetracePath.cpp updated: 1.7 -> 1.8 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+38 -3) Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp:1.5 llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp:1.6 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp:1.5 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp Tue Nov 11 16:41:33 2003 @@ -27,6 +27,8 @@ #include "llvm/Function.h" #include "llvm/Pass.h" +namespace llvm { + //this is used to color vertices //during DFS @@ -36,7 +38,7 @@ BLACK }; -namespace{ +namespace { struct CombineBranches : public FunctionPass { private: //DominatorSet *DS; @@ -225,3 +227,5 @@ return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.25 llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.26 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp:1.25 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/EdgeCode.cpp Tue Nov 11 16:41:33 2003 @@ -27,8 +27,10 @@ #define INSERT_LOAD_COUNT #define INSERT_STORE + using std::vector; +namespace llvm { static void getTriggerCode(Module *M, BasicBlock *BB, int MethNo, Value *pathNo, Value *cnt, Instruction *rInst){ @@ -369,3 +371,4 @@ } } +} // End llvm namespace Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp:1.13 llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp:1.14 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp:1.13 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.cpp Tue Nov 11 16:41:33 2003 @@ -19,6 +19,8 @@ using std::vector; +namespace llvm { + const graphListElement *findNodeInList(const Graph::nodeList &NL, Node *N) { for(Graph::nodeList::const_iterator NI = NL.begin(), NE=NL.end(); NI != NE; @@ -564,4 +566,4 @@ color[u]=BLACK;//done with visiting the node and its neighbors } - +} // End llvm namespace Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h:1.11 llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h:1.12 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h:1.11 Wed Nov 5 00:12:18 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/Graph.h Tue Nov 11 16:41:33 2003 @@ -19,6 +19,8 @@ #include #include +namespace llvm { + class Module; class Function; @@ -112,8 +114,13 @@ } }; +} // End llvm namespace + namespace std { + +using namespace llvm; + template<> struct less : public binary_function { bool operator()(Node *n1, Node *n2) const { @@ -135,6 +142,8 @@ }; } +namespace llvm { + struct BBSort{ bool operator()(BasicBlock *BB1, BasicBlock *BB2) const{ std::string name1=BB1->getName(); @@ -465,6 +474,7 @@ std::vector &be); void getBBtrace(std::vector &vBB, int pathNo, Function *M); -#endif +} // End llvm namespace +#endif Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp:1.20 llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp:1.21 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp:1.20 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp Tue Nov 11 16:41:33 2003 @@ -24,6 +24,8 @@ using std::vector; using std::cerr; +namespace llvm { + //check if 2 edges are equal (same endpoints and same weight) static bool edgesEqual(Edge ed1, Edge ed2){ return ((ed1==ed2) && ed1.getWeight()==ed2.getWeight()); @@ -673,3 +675,5 @@ } cerr<<"--------------------Graph\n"; } + +} // End llvm namespace Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp:1.10 llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp:1.11 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp:1.10 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp Tue Nov 11 16:41:33 2003 @@ -27,6 +27,8 @@ #include "llvm/Function.h" #include "llvm/Pass.h" +namespace llvm { + //this is used to color vertices //during DFS @@ -181,3 +183,5 @@ findAndInstrumentBackEdges(F); return true; // Function was modified. } + +} // End llvm namespace Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.37 llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.38 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp:1.37 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp Tue Nov 11 16:41:33 2003 @@ -43,6 +43,8 @@ #include #include +namespace llvm { + struct ProfilePaths : public FunctionPass { bool runOnFunction(Function &F); @@ -245,3 +247,5 @@ return true; // Always modifies function } + +} // End llvm namespace Index: llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp diff -u llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp:1.7 llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp:1.8 --- llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp:1.7 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp Tue Nov 11 16:41:33 2003 @@ -21,6 +21,8 @@ using std::map; using std::cerr; +namespace llvm { + //Routines to get the path trace! void getPathFrmNode(Node *n, vector &vBB, int pathNo, Graph &g, @@ -303,3 +305,5 @@ } */ } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:42:05 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:05 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/FloatingPoint.cpp InstSelectPattern.cpp InstSelectSimple.cpp PeepholeOptimizer.cpp Printer.cpp X86.h X86CodeEmitter.cpp X86InstrBuilder.h X86InstrInfo.cpp X86InstrInfo.h X86RegisterInfo.cpp X86RegisterInfo.h X86TargetMachine.cpp X86TargetMachine.h Message-ID: <200311112241.QAA20715@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: FloatingPoint.cpp updated: 1.10 -> 1.11 InstSelectPattern.cpp updated: 1.4 -> 1.5 InstSelectSimple.cpp updated: 1.138 -> 1.139 PeepholeOptimizer.cpp updated: 1.5 -> 1.6 Printer.cpp updated: 1.71 -> 1.72 X86.h updated: 1.20 -> 1.21 X86CodeEmitter.cpp updated: 1.39 -> 1.40 X86InstrBuilder.h updated: 1.8 -> 1.9 X86InstrInfo.cpp updated: 1.16 -> 1.17 X86InstrInfo.h updated: 1.27 -> 1.28 X86RegisterInfo.cpp updated: 1.39 -> 1.40 X86RegisterInfo.h updated: 1.17 -> 1.18 X86TargetMachine.cpp updated: 1.36 -> 1.37 X86TargetMachine.h updated: 1.16 -> 1.17 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+71 -14) Index: llvm/lib/Target/X86/FloatingPoint.cpp diff -u llvm/lib/Target/X86/FloatingPoint.cpp:1.10 llvm/lib/Target/X86/FloatingPoint.cpp:1.11 --- llvm/lib/Target/X86/FloatingPoint.cpp:1.10 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Target/X86/FloatingPoint.cpp Tue Nov 11 16:41:33 2003 @@ -25,6 +25,8 @@ #include #include +namespace llvm { + namespace { Statistic<> NumFXCH("x86-codegen", "Number of fxch instructions inserted"); Statistic<> NumFP ("x86-codegen", "Number of floating point instructions"); @@ -70,7 +72,7 @@ // getSTReg - Return the X86::ST(i) register which contains the specified // FP register unsigned getSTReg(unsigned RegNo) const { - return StackTop - 1 - getSlot(RegNo) + X86::ST0; + return StackTop - 1 - getSlot(RegNo) + llvm::X86::ST0; } // pushReg - Push the specifiex FP register onto the stack @@ -598,3 +600,5 @@ I = MBB->erase(I)-1; // Remove the pseudo instruction } + +} // End llvm namespace Index: llvm/lib/Target/X86/InstSelectPattern.cpp diff -u llvm/lib/Target/X86/InstSelectPattern.cpp:1.4 llvm/lib/Target/X86/InstSelectPattern.cpp:1.5 --- llvm/lib/Target/X86/InstSelectPattern.cpp:1.4 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Target/X86/InstSelectPattern.cpp Tue Nov 11 16:41:33 2003 @@ -28,6 +28,8 @@ // Include the generated instruction selector... #include "X86GenInstrSelector.inc" +namespace llvm { + namespace { struct ISel : public FunctionPass, SelectionDAGTargetBuilder { TargetMachine &TM; @@ -114,7 +116,6 @@ assert(0 && "ISel::expandCall not implemented!"); } - /// createX86PatternInstructionSelector - This pass converts an LLVM function /// into a machine code representation using pattern matching and a machine /// description file. @@ -122,3 +123,5 @@ FunctionPass *createX86PatternInstructionSelector(TargetMachine &TM) { return new ISel(TM); } + +} // End llvm namespace Index: llvm/lib/Target/X86/InstSelectSimple.cpp diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.138 llvm/lib/Target/X86/InstSelectSimple.cpp:1.139 --- llvm/lib/Target/X86/InstSelectSimple.cpp:1.138 Thu Oct 23 12:21:43 2003 +++ llvm/lib/Target/X86/InstSelectSimple.cpp Tue Nov 11 16:41:33 2003 @@ -29,6 +29,8 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/InstVisitor.h" +namespace llvm { + /// BMI - A special BuildMI variant that takes an iterator to insert the /// instruction at as well as a basic block. This is the version for when you /// have a destination register in mind. @@ -138,7 +140,7 @@ void doCall(const ValueRecord &Ret, MachineInstr *CallMI, const std::vector &Args); void visitCallInst(CallInst &I); - void visitIntrinsicCall(LLVMIntrinsic::ID ID, CallInst &I); + void visitIntrinsicCall(Intrinsic::ID ID, CallInst &I); // Arithmetic operators void visitSimpleBinary(BinaryOperator &B, unsigned OpcodeClass); @@ -1045,7 +1047,7 @@ MachineInstr *TheCall; if (Function *F = CI.getCalledFunction()) { // Is it an intrinsic function call? - if (LLVMIntrinsic::ID ID = (LLVMIntrinsic::ID)F->getIntrinsicID()) { + if (Intrinsic::ID ID = (Intrinsic::ID)F->getIntrinsicID()) { visitIntrinsicCall(ID, CI); // Special intrinsics are not handled here return; } @@ -1066,29 +1068,29 @@ } -void ISel::visitIntrinsicCall(LLVMIntrinsic::ID ID, CallInst &CI) { +void ISel::visitIntrinsicCall(Intrinsic::ID ID, CallInst &CI) { unsigned TmpReg1, TmpReg2; switch (ID) { - case LLVMIntrinsic::va_start: + case Intrinsic::va_start: // Get the address of the first vararg value... TmpReg1 = getReg(CI); addFrameReference(BuildMI(BB, X86::LEAr32, 5, TmpReg1), VarArgsFrameIndex); return; - case LLVMIntrinsic::va_copy: + case Intrinsic::va_copy: TmpReg1 = getReg(CI); TmpReg2 = getReg(CI.getOperand(1)); BuildMI(BB, X86::MOVrr32, 1, TmpReg1).addReg(TmpReg2); return; - case LLVMIntrinsic::va_end: return; // Noop on X86 + case Intrinsic::va_end: return; // Noop on X86 - case LLVMIntrinsic::longjmp: - case LLVMIntrinsic::siglongjmp: + case Intrinsic::longjmp: + case Intrinsic::siglongjmp: BuildMI(BB, X86::CALLpcrel32, 1).addExternalSymbol("abort", true); return; - case LLVMIntrinsic::setjmp: - case LLVMIntrinsic::sigsetjmp: + case Intrinsic::setjmp: + case Intrinsic::sigsetjmp: // Setjmp always returns zero... BuildMI(BB, X86::MOVir32, 1, getReg(CI)).addZImm(0); return; @@ -2127,7 +2129,6 @@ doCall(ValueRecord(0, Type::VoidTy), TheCall, Args); } - /// createX86SimpleInstructionSelector - This pass converts an LLVM function /// into a machine code representation is a very simple peep-hole fashion. The /// generated code sucks but the implementation is nice and simple. @@ -2135,3 +2136,5 @@ FunctionPass *createX86SimpleInstructionSelector(TargetMachine &TM) { return new ISel(TM); } + +} // End llvm namespace Index: llvm/lib/Target/X86/PeepholeOptimizer.cpp diff -u llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.5 llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.6 --- llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.5 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Target/X86/PeepholeOptimizer.cpp Tue Nov 11 16:41:33 2003 @@ -15,6 +15,8 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstrBuilder.h" +namespace llvm { + namespace { struct PH : public MachineFunctionPass { virtual bool runOnMachineFunction(MachineFunction &MF); @@ -131,3 +133,5 @@ return false; } } + +} // End llvm namespace Index: llvm/lib/Target/X86/Printer.cpp diff -u llvm/lib/Target/X86/Printer.cpp:1.71 llvm/lib/Target/X86/Printer.cpp:1.72 --- llvm/lib/Target/X86/Printer.cpp:1.71 Tue Nov 4 10:04:32 2003 +++ llvm/lib/Target/X86/Printer.cpp Tue Nov 11 16:41:33 2003 @@ -29,6 +29,8 @@ #include "Support/StringExtras.h" #include "Support/CommandLine.h" +namespace llvm { + namespace { Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); @@ -960,3 +962,5 @@ delete Mang; return false; // success } + +} // End llvm namespace Index: llvm/lib/Target/X86/X86.h diff -u llvm/lib/Target/X86/X86.h:1.20 llvm/lib/Target/X86/X86.h:1.21 --- llvm/lib/Target/X86/X86.h:1.20 Tue Oct 21 10:17:13 2003 +++ llvm/lib/Target/X86/X86.h Tue Nov 11 16:41:33 2003 @@ -16,6 +16,9 @@ #define TARGET_X86_H #include + +namespace llvm { + class TargetMachine; class FunctionPass; @@ -58,6 +61,8 @@ // Defines symbolic names for X86 registers. This defines a mapping from // register name to register number. // +} // End llvm namespace + #include "X86GenRegisterNames.inc" // Defines symbolic names for the X86 instructions. Index: llvm/lib/Target/X86/X86CodeEmitter.cpp diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.39 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.40 --- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.39 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Target/X86/X86CodeEmitter.cpp Tue Nov 11 16:41:33 2003 @@ -24,6 +24,8 @@ #include "Support/Statistic.h" #include "Config/alloca.h" +namespace llvm { + namespace { Statistic<> NumEmitted("x86-emitter", "Number of machine instructions emitted"); @@ -589,3 +591,5 @@ break; } } + +} // End llvm namespace Index: llvm/lib/Target/X86/X86InstrBuilder.h diff -u llvm/lib/Target/X86/X86InstrBuilder.h:1.8 llvm/lib/Target/X86/X86InstrBuilder.h:1.9 --- llvm/lib/Target/X86/X86InstrBuilder.h:1.8 Tue Oct 21 22:10:26 2003 +++ llvm/lib/Target/X86/X86InstrBuilder.h Tue Nov 11 16:41:33 2003 @@ -26,6 +26,8 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" +namespace llvm { + /// addDirectMem - This function is used to add a direct memory reference to the /// current instruction -- that is, a dereference of an address in a register, /// with no scale, index or displacement. An example is: DWORD PTR [EAX]. @@ -68,5 +70,7 @@ int Offset = 0) { return MIB.addConstantPoolIndex(CPI).addZImm(1).addReg(0).addSImm(Offset); } + +} // End llvm namespace #endif Index: llvm/lib/Target/X86/X86InstrInfo.cpp diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.16 llvm/lib/Target/X86/X86InstrInfo.cpp:1.17 --- llvm/lib/Target/X86/X86InstrInfo.cpp:1.16 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Target/X86/X86InstrInfo.cpp Tue Nov 11 16:41:33 2003 @@ -17,6 +17,8 @@ #include "X86GenInstrInfo.inc" +using namespace llvm; + X86InstrInfo::X86InstrInfo() : TargetInstrInfo(X86Insts, sizeof(X86Insts)/sizeof(X86Insts[0]), 0) { } Index: llvm/lib/Target/X86/X86InstrInfo.h diff -u llvm/lib/Target/X86/X86InstrInfo.h:1.27 llvm/lib/Target/X86/X86InstrInfo.h:1.28 --- llvm/lib/Target/X86/X86InstrInfo.h:1.27 Tue Oct 21 10:17:13 2003 +++ llvm/lib/Target/X86/X86InstrInfo.h Tue Nov 11 16:41:33 2003 @@ -17,6 +17,8 @@ #include "llvm/Target/TargetInstrInfo.h" #include "X86RegisterInfo.h" +namespace llvm { + /// X86II - This namespace holds all of the target specific flags that /// instruction info tracks. /// @@ -180,5 +182,7 @@ return get(Opcode).TSFlags >> X86II::OpcodeShift; } }; + +} // End llvm namespace #endif Index: llvm/lib/Target/X86/X86RegisterInfo.cpp diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.39 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.40 --- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.39 Tue Nov 4 16:57:09 2003 +++ llvm/lib/Target/X86/X86RegisterInfo.cpp Tue Nov 11 16:41:33 2003 @@ -25,6 +25,8 @@ #include "llvm/Target/TargetFrameInfo.h" #include "Support/CommandLine.h" +namespace llvm { + namespace { cl::opt NoFPElim("disable-fp-elim", @@ -253,8 +255,12 @@ return MBB.size() - oldSize; } +} // End llvm namespace + #include "X86GenRegisterInfo.inc" +namespace llvm { + const TargetRegisterClass* X86RegisterInfo::getRegClassForType(const Type* Ty) const { switch (Ty->getPrimitiveID()) { @@ -274,3 +280,5 @@ case Type::DoubleTyID: return &RFPInstance; } } + +} // End llvm namespace Index: llvm/lib/Target/X86/X86RegisterInfo.h diff -u llvm/lib/Target/X86/X86RegisterInfo.h:1.17 llvm/lib/Target/X86/X86RegisterInfo.h:1.18 --- llvm/lib/Target/X86/X86RegisterInfo.h:1.17 Tue Nov 4 16:57:09 2003 +++ llvm/lib/Target/X86/X86RegisterInfo.h Tue Nov 11 16:41:33 2003 @@ -16,10 +16,12 @@ #include "llvm/Target/MRegisterInfo.h" -class Type; +class llvm::Type; #include "X86GenRegisterInfo.h.inc" +namespace llvm { + struct X86RegisterInfo : public X86GenRegisterInfo { X86RegisterInfo(); const TargetRegisterClass* getRegClassForType(const Type* Ty) const; @@ -51,5 +53,7 @@ int emitPrologue(MachineFunction &MF) const; int emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; }; + +} // End llvm namespace #endif Index: llvm/lib/Target/X86/X86TargetMachine.cpp diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.36 llvm/lib/Target/X86/X86TargetMachine.cpp:1.37 --- llvm/lib/Target/X86/X86TargetMachine.cpp:1.36 Thu Nov 6 15:30:05 2003 +++ llvm/lib/Target/X86/X86TargetMachine.cpp Tue Nov 11 16:41:33 2003 @@ -22,6 +22,8 @@ #include "Support/CommandLine.h" #include "Support/Statistic.h" +namespace llvm { + namespace { cl::opt PrintCode("print-machineinstrs", cl::desc("Print generated machine code")); @@ -153,3 +155,5 @@ int32_t OldAddr = (intptr_t) OldWord; *OldWord = NewAddr - OldAddr - 4; // Emit PC-relative addr of New code. } + +} // End llvm namespace Index: llvm/lib/Target/X86/X86TargetMachine.h diff -u llvm/lib/Target/X86/X86TargetMachine.h:1.16 llvm/lib/Target/X86/X86TargetMachine.h:1.17 --- llvm/lib/Target/X86/X86TargetMachine.h:1.16 Tue Oct 21 10:17:13 2003 +++ llvm/lib/Target/X86/X86TargetMachine.h Tue Nov 11 16:41:33 2003 @@ -19,6 +19,8 @@ #include "llvm/PassManager.h" #include "X86InstrInfo.h" +namespace llvm { + class X86TargetMachine : public TargetMachine { X86InstrInfo InstrInfo; TargetFrameInfo FrameInfo; @@ -54,5 +56,7 @@ virtual void replaceMachineCodeForFunction (void *Old, void *New); }; + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:42:09 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:09 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/ConstantMerge.cpp DeadArgumentElimination.cpp DeadTypeElimination.cpp ExtractFunction.cpp FunctionResolution.cpp GlobalDCE.cpp IPConstantPropagation.cpp InlineSimple.cpp Inliner.cpp Inliner.h Internalize.cpp LowerSetJmp.cpp MutateStructTypes.cpp Parallelize.cpp PruneEH.cpp RaiseAllocations.cpp SimpleStructMutation.cpp Message-ID: <200311112241.QAA20788@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: ConstantMerge.cpp updated: 1.22 -> 1.23 DeadArgumentElimination.cpp updated: 1.12 -> 1.13 DeadTypeElimination.cpp updated: 1.46 -> 1.47 ExtractFunction.cpp updated: 1.4 -> 1.5 FunctionResolution.cpp updated: 1.42 -> 1.43 GlobalDCE.cpp updated: 1.29 -> 1.30 IPConstantPropagation.cpp updated: 1.3 -> 1.4 InlineSimple.cpp updated: 1.56 -> 1.57 Inliner.cpp updated: 1.4 -> 1.5 Inliner.h updated: 1.3 -> 1.4 Internalize.cpp updated: 1.19 -> 1.20 LowerSetJmp.cpp updated: 1.11 -> 1.12 MutateStructTypes.cpp updated: 1.42 -> 1.43 Parallelize.cpp updated: 1.10 -> 1.11 PruneEH.cpp updated: 1.5 -> 1.6 RaiseAllocations.cpp updated: 1.19 -> 1.20 SimpleStructMutation.cpp updated: 1.22 -> 1.23 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+67 -2) Index: llvm/lib/Transforms/IPO/ConstantMerge.cpp diff -u llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.22 llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.23 --- llvm/lib/Transforms/IPO/ConstantMerge.cpp:1.22 Wed Oct 29 00:01:26 2003 +++ llvm/lib/Transforms/IPO/ConstantMerge.cpp Tue Nov 11 16:41:33 2003 @@ -22,6 +22,8 @@ #include "llvm/Pass.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumMerged("constmerge", "Number of global constants merged"); @@ -37,7 +39,6 @@ Pass *createConstantMergePass() { return new ConstantMerge(); } - bool ConstantMerge::run(Module &M) { std::map CMap; bool MadeChanges = false; @@ -78,3 +79,5 @@ return MadeChanges; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp diff -u llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.12 llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.13 --- llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp:1.12 Wed Nov 5 15:53:41 2003 +++ llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp Tue Nov 11 16:41:33 2003 @@ -30,6 +30,8 @@ #include "Support/iterator" #include +namespace llvm { + namespace { Statistic<> NumArgumentsEliminated("deadargelim", "Number of unread args removed"); @@ -576,3 +578,6 @@ RemoveDeadArgumentsFromFunction(*DeadRetVal.begin()); return true; } + +} // End llvm namespace + Index: llvm/lib/Transforms/IPO/DeadTypeElimination.cpp diff -u llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.46 llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.47 --- llvm/lib/Transforms/IPO/DeadTypeElimination.cpp:1.46 Sat Nov 8 23:04:25 2003 +++ llvm/lib/Transforms/IPO/DeadTypeElimination.cpp Tue Nov 11 16:41:33 2003 @@ -19,6 +19,8 @@ #include "llvm/DerivedTypes.h" #include "Support/Statistic.h" +namespace llvm { + namespace { struct DTE : public Pass { // doPassInitialization - For this pass, it removes global symbol table @@ -45,7 +47,6 @@ } - // ShouldNukeSymtabEntry - Return true if this module level symbol table entry // should be eliminated. // @@ -95,3 +96,5 @@ return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/ExtractFunction.cpp diff -u llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.4 llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.5 --- llvm/lib/Transforms/IPO/ExtractFunction.cpp:1.4 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Transforms/IPO/ExtractFunction.cpp Tue Nov 11 16:41:33 2003 @@ -10,6 +10,8 @@ #include "llvm/Pass.h" #include "llvm/Module.h" +namespace llvm { + namespace { class FunctionExtractorPass : public Pass { Function *Named; @@ -90,3 +92,5 @@ Pass *createFunctionExtractionPass(Function *F) { return new FunctionExtractorPass(F); } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/FunctionResolution.cpp diff -u llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.42 llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.43 --- llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.42 Wed Oct 22 18:03:38 2003 +++ llvm/lib/Transforms/IPO/FunctionResolution.cpp Tue Nov 11 16:41:33 2003 @@ -29,6 +29,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<>NumResolved("funcresolve", "Number of varargs functions resolved"); Statistic<> NumGlobals("funcresolve", "Number of global variables resolved"); @@ -329,3 +331,5 @@ return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/GlobalDCE.cpp diff -u llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.29 llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.30 --- llvm/lib/Transforms/IPO/GlobalDCE.cpp:1.29 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Transforms/IPO/GlobalDCE.cpp Tue Nov 11 16:41:33 2003 @@ -22,6 +22,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> NumFunctions("globaldce","Number of functions removed"); Statistic<> NumVariables("globaldce","Number of global variables removed"); @@ -195,3 +197,5 @@ return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/IPConstantPropagation.cpp diff -u llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.3 llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.4 --- llvm/lib/Transforms/IPO/IPConstantPropagation.cpp:1.3 Mon Oct 27 15:09:00 2003 +++ llvm/lib/Transforms/IPO/IPConstantPropagation.cpp Tue Nov 11 16:41:33 2003 @@ -22,6 +22,8 @@ #include "llvm/Support/CallSite.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumArgumentsProped("ipconstprop", "Number of args turned into constants"); @@ -121,3 +123,5 @@ } return MadeChange; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/InlineSimple.cpp diff -u llvm/lib/Transforms/IPO/InlineSimple.cpp:1.56 llvm/lib/Transforms/IPO/InlineSimple.cpp:1.57 --- llvm/lib/Transforms/IPO/InlineSimple.cpp:1.56 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Transforms/IPO/InlineSimple.cpp Tue Nov 11 16:41:33 2003 @@ -17,6 +17,8 @@ #include "llvm/Support/CallSite.h" #include "llvm/Transforms/IPO.h" +namespace llvm { + namespace { // FunctionInfo - For each function, calculate the size of it in blocks and // instructions. @@ -114,3 +116,5 @@ InlineCost += CalleeFI.NumInsts*10 + CalleeFI.NumBlocks*20; return InlineCost; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/Inliner.cpp diff -u llvm/lib/Transforms/IPO/Inliner.cpp:1.4 llvm/lib/Transforms/IPO/Inliner.cpp:1.5 --- llvm/lib/Transforms/IPO/Inliner.cpp:1.4 Sat Nov 8 23:05:36 2003 +++ llvm/lib/Transforms/IPO/Inliner.cpp Tue Nov 11 16:41:33 2003 @@ -24,6 +24,8 @@ #include "Support/Debug.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumInlined("inline", "Number of functions inlined"); Statistic<> NumDeleted("inline", "Number of functions deleted because all callers found"); @@ -134,3 +136,5 @@ } return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/Inliner.h diff -u llvm/lib/Transforms/IPO/Inliner.h:1.3 llvm/lib/Transforms/IPO/Inliner.h:1.4 --- llvm/lib/Transforms/IPO/Inliner.h:1.3 Sat Nov 8 23:05:36 2003 +++ llvm/lib/Transforms/IPO/Inliner.h Tue Nov 11 16:41:33 2003 @@ -20,6 +20,9 @@ #define DEBUG_TYPE "inline" #include "llvm/CallGraphSCCPass.h" #include + +namespace llvm { + class CallSite; /// Inliner - This class contains all of the helper code which is used to @@ -61,5 +64,6 @@ bool performInlining(CallSite CS, std::set &SCC); }; +} // End llvm namespace #endif Index: llvm/lib/Transforms/IPO/Internalize.cpp diff -u llvm/lib/Transforms/IPO/Internalize.cpp:1.19 llvm/lib/Transforms/IPO/Internalize.cpp:1.20 --- llvm/lib/Transforms/IPO/Internalize.cpp:1.19 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/IPO/Internalize.cpp Tue Nov 11 16:41:33 2003 @@ -22,6 +22,8 @@ #include #include +namespace llvm { + namespace { Statistic<> NumFunctions("internalize", "Number of functions internalized"); Statistic<> NumGlobals ("internalize", "Number of global vars internalized"); @@ -119,3 +121,5 @@ Pass *createInternalizePass() { return new InternalizePass(); } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/LowerSetJmp.cpp diff -u llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.11 llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.12 --- llvm/lib/Transforms/IPO/LowerSetJmp.cpp:1.11 Thu Nov 6 13:18:49 2003 +++ llvm/lib/Transforms/IPO/LowerSetJmp.cpp Tue Nov 11 16:41:33 2003 @@ -47,6 +47,8 @@ #include "Support/StringExtras.h" #include "Support/VectorExtras.h" +namespace llvm { + namespace { Statistic<> LongJmpsTransformed("lowersetjmp", "Number of longjmps transformed"); @@ -538,3 +540,5 @@ { return new LowerSetJmp(); } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/MutateStructTypes.cpp diff -u llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.42 llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.43 --- llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.42 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/IPO/MutateStructTypes.cpp Tue Nov 11 16:41:33 2003 @@ -28,6 +28,8 @@ #include "Support/Debug.h" #include +using namespace llvm; + // ValuePlaceHolder - A stupid little marker value. It appears as an // instruction of type Instruction::UserOp1. // Index: llvm/lib/Transforms/IPO/Parallelize.cpp diff -u llvm/lib/Transforms/IPO/Parallelize.cpp:1.10 llvm/lib/Transforms/IPO/Parallelize.cpp:1.11 --- llvm/lib/Transforms/IPO/Parallelize.cpp:1.10 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/IPO/Parallelize.cpp Tue Nov 11 16:41:33 2003 @@ -53,6 +53,8 @@ #include #include +namespace llvm { + //---------------------------------------------------------------------------- // Global constants used in marking Cilk functions and function calls. //---------------------------------------------------------------------------- @@ -535,3 +537,5 @@ return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/PruneEH.cpp diff -u llvm/lib/Transforms/IPO/PruneEH.cpp:1.5 llvm/lib/Transforms/IPO/PruneEH.cpp:1.6 --- llvm/lib/Transforms/IPO/PruneEH.cpp:1.5 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/IPO/PruneEH.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> NumRemoved("prune-eh", "Number of invokes removed"); @@ -104,3 +106,5 @@ return MadeChange; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/RaiseAllocations.cpp diff -u llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.19 llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.20 --- llvm/lib/Transforms/IPO/RaiseAllocations.cpp:1.19 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/IPO/RaiseAllocations.cpp Tue Nov 11 16:41:33 2003 @@ -22,6 +22,8 @@ #include "llvm/Support/CallSite.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumRaised("raiseallocs", "Number of allocations raised"); @@ -194,3 +196,5 @@ return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/IPO/SimpleStructMutation.cpp diff -u llvm/lib/Transforms/IPO/SimpleStructMutation.cpp:1.22 llvm/lib/Transforms/IPO/SimpleStructMutation.cpp:1.23 --- llvm/lib/Transforms/IPO/SimpleStructMutation.cpp:1.22 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/IPO/SimpleStructMutation.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ using std::set; using std::pair; +namespace llvm { + namespace { struct SimpleStructMutation : public MutateStructTypes { enum Transform { SwapElements, SortElements }; @@ -188,3 +190,5 @@ return Transforms; } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:42:12 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:12 2003 Subject: [llvm-commits] CVS: llvm/utils/TableGen/CodeEmitterGen.cpp CodeEmitterGen.h CodeGenWrappers.cpp CodeGenWrappers.h FileLexer.l FileParser.y InstrInfoEmitter.cpp InstrInfoEmitter.h InstrSelectorEmitter.cpp InstrSelectorEmitter.h Record.cpp Record.h RegisterInfoEmitter.cpp RegisterInfoEmitter.h TableGen.cpp TableGenBackend.cpp TableGenBackend.h Message-ID: <200311112241.QAA21072@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: CodeEmitterGen.cpp updated: 1.28 -> 1.29 CodeEmitterGen.h updated: 1.9 -> 1.10 CodeGenWrappers.cpp updated: 1.5 -> 1.6 CodeGenWrappers.h updated: 1.6 -> 1.7 FileLexer.l updated: 1.16 -> 1.17 FileParser.y updated: 1.25 -> 1.26 InstrInfoEmitter.cpp updated: 1.6 -> 1.7 InstrInfoEmitter.h updated: 1.4 -> 1.5 InstrSelectorEmitter.cpp updated: 1.35 -> 1.36 InstrSelectorEmitter.h updated: 1.22 -> 1.23 Record.cpp updated: 1.29 -> 1.30 Record.h updated: 1.37 -> 1.38 RegisterInfoEmitter.cpp updated: 1.14 -> 1.15 RegisterInfoEmitter.h updated: 1.5 -> 1.6 TableGen.cpp updated: 1.22 -> 1.23 TableGenBackend.cpp updated: 1.4 -> 1.5 TableGenBackend.h updated: 1.5 -> 1.6 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+112 -14) Index: llvm/utils/TableGen/CodeEmitterGen.cpp diff -u llvm/utils/TableGen/CodeEmitterGen.cpp:1.28 llvm/utils/TableGen/CodeEmitterGen.cpp:1.29 --- llvm/utils/TableGen/CodeEmitterGen.cpp:1.28 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/CodeEmitterGen.cpp Tue Nov 11 16:41:34 2003 @@ -15,6 +15,8 @@ #include "Record.h" #include "Support/Debug.h" +namespace llvm { + void CodeEmitterGen::run(std::ostream &o) { std::vector Insts = Records.getAllDerivedDefinitions("Instruction"); @@ -221,4 +223,8 @@ << " }\n" << " return Value;\n" << "}\n"; + + EmitSourceFileTail(o); } + +} // End llvm namespace Index: llvm/utils/TableGen/CodeEmitterGen.h diff -u llvm/utils/TableGen/CodeEmitterGen.h:1.9 llvm/utils/TableGen/CodeEmitterGen.h:1.10 --- llvm/utils/TableGen/CodeEmitterGen.h:1.9 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/CodeEmitterGen.h Tue Nov 11 16:41:34 2003 @@ -16,6 +16,8 @@ #include "TableGenBackend.h" +namespace llvm { + class CodeEmitterGen : public TableGenBackend { RecordKeeper &Records; public: @@ -27,5 +29,7 @@ void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace); void emitGetValueBit(std::ostream &o, const std::string &Namespace); }; + +} // End llvm namespace #endif Index: llvm/utils/TableGen/CodeGenWrappers.cpp diff -u llvm/utils/TableGen/CodeGenWrappers.cpp:1.5 llvm/utils/TableGen/CodeGenWrappers.cpp:1.6 --- llvm/utils/TableGen/CodeGenWrappers.cpp:1.5 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/CodeGenWrappers.cpp Tue Nov 11 16:41:34 2003 @@ -17,6 +17,8 @@ #include "CodeGenWrappers.h" #include "Record.h" +namespace llvm { + /// getValueType - Return the MCV::ValueType that the specified TableGen record /// corresponds to. MVT::ValueType getValueType(Record *Rec) { @@ -94,3 +96,5 @@ Record *CodeGenTarget::getInstructionSet() const { return TargetRec->getValueAsDef("InstructionSet"); } + +} // End llvm namespace Index: llvm/utils/TableGen/CodeGenWrappers.h diff -u llvm/utils/TableGen/CodeGenWrappers.h:1.6 llvm/utils/TableGen/CodeGenWrappers.h:1.7 --- llvm/utils/TableGen/CodeGenWrappers.h:1.6 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/CodeGenWrappers.h Tue Nov 11 16:41:34 2003 @@ -21,6 +21,9 @@ #include #include #include + +namespace llvm { + class Record; class RecordKeeper; @@ -59,5 +62,7 @@ // target, lazily reading it from the record keeper as needed. // CodeGenInstructionSet *getInstructionSet - }; + +} // End llvm namespace #endif Index: llvm/utils/TableGen/FileLexer.l diff -u llvm/utils/TableGen/FileLexer.l:1.16 llvm/utils/TableGen/FileLexer.l:1.17 --- llvm/utils/TableGen/FileLexer.l:1.16 Tue Oct 21 10:29:18 2003 +++ llvm/utils/TableGen/FileLexer.l Tue Nov 11 16:41:34 2003 @@ -28,9 +28,13 @@ %{ #include "Record.h" -typedef std::pair*> SubClassRefTy; +typedef std::pair*> SubClassRefTy; #include "FileParser.h" +int Fileparse(); + +namespace llvm { + // Global variable recording the location of the include directory std::string IncludeDirectory; @@ -69,7 +73,6 @@ } -int Fileparse(); // // Function: ParseFile() @@ -170,6 +173,10 @@ yy_switch_to_buffer(IncludeStack.back().Buffer); return 0; } + +} // End llvm namespace + +using namespace llvm; %} Index: llvm/utils/TableGen/FileParser.y diff -u llvm/utils/TableGen/FileParser.y:1.25 llvm/utils/TableGen/FileParser.y:1.26 --- llvm/utils/TableGen/FileParser.y:1.25 Tue Oct 21 10:29:18 2003 +++ llvm/utils/TableGen/FileParser.y Tue Nov 11 16:41:34 2003 @@ -20,6 +20,9 @@ int yyerror(const char *ErrorMsg); int yylex(); + +namespace llvm { + extern int Filelineno; static Record *CurRec = 0; @@ -160,20 +163,23 @@ addSuperClass(SC); } +} // End llvm namespace + +using namespace llvm; %} %union { - std::string *StrVal; - int IntVal; - RecTy *Ty; - Init *Initializer; - std::vector *FieldList; - std::vector*BitList; - Record *Rec; - SubClassRefTy *SubClassRef; - std::vector *SubClassList; - std::vector > *DagValueList; + std::string* StrVal; + int IntVal; + llvm::RecTy* Ty; + llvm::Init* Initializer; + std::vector* FieldList; + std::vector* BitList; + llvm::Record* Rec; + SubClassRefTy* SubClassRef; + std::vector* SubClassList; + std::vector >* DagValueList; }; %token INT BIT STRING BITS LIST CODE DAG CLASS DEF FIELD LET IN @@ -193,6 +199,7 @@ %type Declaration OptID OptVarName %start File + %% ClassID : ID { Index: llvm/utils/TableGen/InstrInfoEmitter.cpp diff -u llvm/utils/TableGen/InstrInfoEmitter.cpp:1.6 llvm/utils/TableGen/InstrInfoEmitter.cpp:1.7 --- llvm/utils/TableGen/InstrInfoEmitter.cpp:1.6 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/InstrInfoEmitter.cpp Tue Nov 11 16:41:34 2003 @@ -16,6 +16,8 @@ #include "CodeGenWrappers.h" #include "Record.h" +namespace llvm { + // runEnums - Print out enum values for all of the instructions. void InstrInfoEmitter::runEnums(std::ostream &OS) { std::vector Insts = Records.getAllDerivedDefinitions("Instruction"); @@ -47,6 +49,7 @@ OS << " };\n"; if (!Namespace.empty()) OS << "}\n"; + EmitSourceFileTail(OS); } void InstrInfoEmitter::printDefList(ListInit *LI, const std::string &Name, @@ -93,6 +96,7 @@ if (Instructions[i] != PHI) emitRecord(Instructions[i], i+1, InstrInfo, OS); OS << "};\n"; + EmitSourceFileTail(OS); } void InstrInfoEmitter::emitRecord(Record *R, unsigned Num, Record *InstrInfo, @@ -169,3 +173,5 @@ std::cerr << "Unhandled initializer: " << *Val << "\n"; throw "In record '" + R->getName() + "' for TSFlag emission."; } + +} // End llvm namespace Index: llvm/utils/TableGen/InstrInfoEmitter.h diff -u llvm/utils/TableGen/InstrInfoEmitter.h:1.4 llvm/utils/TableGen/InstrInfoEmitter.h:1.5 --- llvm/utils/TableGen/InstrInfoEmitter.h:1.4 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/InstrInfoEmitter.h Tue Nov 11 16:41:34 2003 @@ -16,6 +16,9 @@ #define INSTRINFO_EMITTER_H #include "TableGenBackend.h" + +namespace llvm { + class StringInit; class IntInit; class ListInit; @@ -37,5 +40,7 @@ void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift, std::ostream &OS); }; + +} // End llvm namespace #endif Index: llvm/utils/TableGen/InstrSelectorEmitter.cpp diff -u llvm/utils/TableGen/InstrSelectorEmitter.cpp:1.35 llvm/utils/TableGen/InstrSelectorEmitter.cpp:1.36 --- llvm/utils/TableGen/InstrSelectorEmitter.cpp:1.35 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/InstrSelectorEmitter.cpp Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "Support/StringExtras.h" #include +namespace llvm { + NodeType::ArgResultTypes NodeType::Translate(Record *R) { const std::string &Name = R->getName(); if (Name == "DNVT_any") return Any; @@ -978,9 +980,10 @@ CalculateComputableValues(); + OS << "#include \"llvm/CodeGen/MachineInstrBuilder.h\"\n"; + EmitSourceFileHeader("Instruction Selector for the " + Target.getName() + " target", OS); - OS << "#include \"llvm/CodeGen/MachineInstrBuilder.h\"\n"; // Output the slot number enums... OS << "\nenum { // Slot numbers...\n" @@ -1290,5 +1293,7 @@ << " }\n\n N->addValue(Val); // Do not ever recalculate this\n" << " return Val;\n}\n\n"; } + EmitSourceFileTail(OS); } +} // End llvm namespace Index: llvm/utils/TableGen/InstrSelectorEmitter.h diff -u llvm/utils/TableGen/InstrSelectorEmitter.h:1.22 llvm/utils/TableGen/InstrSelectorEmitter.h:1.23 --- llvm/utils/TableGen/InstrSelectorEmitter.h:1.22 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/InstrSelectorEmitter.h Tue Nov 11 16:41:34 2003 @@ -21,6 +21,8 @@ #include #include +namespace llvm { + class DagInit; class Init; class InstrSelectorEmitter; @@ -390,5 +392,7 @@ TreePatternNode *ArgDecl, Pattern *P, bool PrintArg, std::ostream &OS); }; + +} // End llvm namespace #endif Index: llvm/utils/TableGen/Record.cpp diff -u llvm/utils/TableGen/Record.cpp:1.29 llvm/utils/TableGen/Record.cpp:1.30 --- llvm/utils/TableGen/Record.cpp:1.29 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/Record.cpp Tue Nov 11 16:41:34 2003 @@ -16,6 +16,8 @@ // Type implementations //===----------------------------------------------------------------------===// +namespace llvm { + void RecTy::dump() const { print(std::cerr); } Init *BitRecTy::convertValue(BitsInit *BI) { @@ -681,3 +683,5 @@ return Defs; } + +} // End llvm namespace Index: llvm/utils/TableGen/Record.h diff -u llvm/utils/TableGen/Record.h:1.37 llvm/utils/TableGen/Record.h:1.38 --- llvm/utils/TableGen/Record.h:1.37 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/Record.h Tue Nov 11 16:41:34 2003 @@ -21,6 +21,8 @@ #include #include +namespace llvm { + // RecTy subclasses... class BitRecTy; class BitsRecTy; @@ -852,5 +854,7 @@ std::ostream &operator<<(std::ostream &OS, const RecordKeeper &RK); extern RecordKeeper Records; + +} // End llvm namespace #endif Index: llvm/utils/TableGen/RegisterInfoEmitter.cpp diff -u llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.14 llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.15 --- llvm/utils/TableGen/RegisterInfoEmitter.cpp:1.14 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/RegisterInfoEmitter.cpp Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "Support/StringExtras.h" #include +namespace llvm { + // runEnums - Print out enum values for all of the registers. void RegisterInfoEmitter::runEnums(std::ostream &OS) { std::vector Registers = Records.getAllDerivedDefinitions("Register"); @@ -40,6 +42,7 @@ OS << " };\n"; if (!Namespace.empty()) OS << "}\n"; + EmitSourceFileTail(OS); } void RegisterInfoEmitter::runHeader(std::ostream &OS) { @@ -68,6 +71,7 @@ OS << " extern TargetRegisterClass *" << Name << "RegisterClass;\n"; } OS << "} // end of namespace " << TargetName << "\n\n"; + EmitSourceFileTail(OS); } // RegisterInfoEmitter::run - Main register file description emitter. @@ -240,4 +244,7 @@ for (unsigned i = 0, e = CSR.size(); i != e; ++i) OS << getQualifiedName(CSR[i]) << ", "; OS << " 0\n };\n return CalleeSaveRegs;\n}\n\n"; + EmitSourceFileTail(OS); } + +} // End llvm namespace Index: llvm/utils/TableGen/RegisterInfoEmitter.h diff -u llvm/utils/TableGen/RegisterInfoEmitter.h:1.5 llvm/utils/TableGen/RegisterInfoEmitter.h:1.6 --- llvm/utils/TableGen/RegisterInfoEmitter.h:1.5 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/RegisterInfoEmitter.h Tue Nov 11 16:41:34 2003 @@ -18,6 +18,8 @@ #include "TableGenBackend.h" +namespace llvm { + class RegisterInfoEmitter : public TableGenBackend { RecordKeeper &Records; public: @@ -32,5 +34,7 @@ // runEnums - Print out enum values for all of the registers. void runEnums(std::ostream &o); }; + +} // End llvm namespace #endif Index: llvm/utils/TableGen/TableGen.cpp diff -u llvm/utils/TableGen/TableGen.cpp:1.22 llvm/utils/TableGen/TableGen.cpp:1.23 --- llvm/utils/TableGen/TableGen.cpp:1.22 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/TableGen.cpp Tue Nov 11 16:41:34 2003 @@ -27,6 +27,8 @@ #include #include +namespace llvm { + enum ActionType { PrintRecords, GenEmitter, @@ -406,6 +408,9 @@ } } +} // End llvm namespace + +using namespace llvm; int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv); @@ -459,11 +464,16 @@ InstrSelectorEmitter(Records).run(*Out); break; case PrintEnums: + { std::vector Recs = Records.getAllDerivedDefinitions(Class); for (unsigned i = 0, e = Recs.size(); i != e; ++i) *Out << Recs[i] << ", "; *Out << "\n"; break; + } + default: + assert(1 && "Invalid Action"); + return 1; } } catch (const std::string &Error) { std::cerr << Error << "\n"; Index: llvm/utils/TableGen/TableGenBackend.cpp diff -u llvm/utils/TableGen/TableGenBackend.cpp:1.4 llvm/utils/TableGen/TableGenBackend.cpp:1.5 --- llvm/utils/TableGen/TableGenBackend.cpp:1.4 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/TableGenBackend.cpp Tue Nov 11 16:41:34 2003 @@ -15,12 +15,18 @@ #include "Record.h" #include +namespace llvm { + void TableGenBackend::EmitSourceFileHeader(const std::string &Desc, std::ostream &OS) const { OS << "//===- TableGen'erated file -------------------------------------*-" " C++ -*-===//\n//\n// " << Desc << "\n//\n// Automatically generate" "d file, do not edit!\n//\n//===------------------------------------" - "----------------------------------===//\n\n"; + "----------------------------------===//\n\nnamespace llvm {\n\n"; +} + +void TableGenBackend::EmitSourceFileTail( std::ostream& OS ) const { + OS << "} // End llvm namespace \n"; } /// getQualifiedName - Return the name of the specified record, with a @@ -32,3 +38,4 @@ return Namespace + "::" + R->getName(); } +} // End llvm namespace Index: llvm/utils/TableGen/TableGenBackend.h diff -u llvm/utils/TableGen/TableGenBackend.h:1.5 llvm/utils/TableGen/TableGenBackend.h:1.6 --- llvm/utils/TableGen/TableGenBackend.h:1.5 Mon Oct 20 15:20:30 2003 +++ llvm/utils/TableGen/TableGenBackend.h Tue Nov 11 16:41:34 2003 @@ -17,6 +17,9 @@ #include #include + +namespace llvm { + class Record; class RecordKeeper; @@ -33,9 +36,15 @@ /// ostream. void EmitSourceFileHeader(const std::string &Desc, std::ostream &OS) const; + /// EmitSourceFileTail - Output an LLVm styelf ile tail to the specified + /// ostream. + void EmitSourceFileTail( std::ostream& OS ) const; + /// getQualifiedName - Return the name of the specified record, with a /// namespace qualifier if the record contains one. std::string getQualifiedName(Record *R) const; }; + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:42:16 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:16 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-nm/llvm-nm.cpp Message-ID: <200311112241.QAA20932@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-nm: llvm-nm.cpp updated: 1.6 -> 1.7 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+2 -0) Index: llvm/tools/llvm-nm/llvm-nm.cpp diff -u llvm/tools/llvm-nm/llvm-nm.cpp:1.6 llvm/tools/llvm-nm/llvm-nm.cpp:1.7 --- llvm/tools/llvm-nm/llvm-nm.cpp:1.6 Tue Oct 28 13:08:15 2003 +++ llvm/tools/llvm-nm/llvm-nm.cpp Tue Nov 11 16:41:34 2003 @@ -21,6 +21,8 @@ #include "Support/CommandLine.h" #include +using namespace llvm; + namespace { enum OutputFormatTy { bsd, sysv, posix }; cl::opt From gaeke at cs.uiuc.edu Tue Nov 11 16:42:20 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:20 2003 Subject: [llvm-commits] CVS: llvm/tools/lli/lli.cpp Message-ID: <200311112241.QAA20892@zion.cs.uiuc.edu> Changes in directory llvm/tools/lli: lli.cpp updated: 1.34 -> 1.35 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+2 -0) Index: llvm/tools/lli/lli.cpp diff -u llvm/tools/lli/lli.cpp:1.34 llvm/tools/lli/lli.cpp:1.35 --- llvm/tools/lli/lli.cpp:1.34 Tue Oct 28 16:51:44 2003 +++ llvm/tools/lli/lli.cpp Tue Nov 11 16:41:34 2003 @@ -28,6 +28,8 @@ #include "Support/Debug.h" #include "Support/SystemUtils.h" +using namespace llvm; + namespace { cl::opt InputFile(cl::desc(""), cl::Positional, cl::init("-")); From gaeke at cs.uiuc.edu Tue Nov 11 16:42:24 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:24 2003 Subject: [llvm-commits] CVS: llvm/tools/opt/opt.cpp Message-ID: <200311112241.QAA20938@zion.cs.uiuc.edu> Changes in directory llvm/tools/opt: opt.cpp updated: 1.85 -> 1.86 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+1 -0) Index: llvm/tools/opt/opt.cpp diff -u llvm/tools/opt/opt.cpp:1.85 llvm/tools/opt/opt.cpp:1.86 --- llvm/tools/opt/opt.cpp:1.85 Mon Oct 20 15:40:30 2003 +++ llvm/tools/opt/opt.cpp Tue Nov 11 16:41:34 2003 @@ -27,6 +27,7 @@ #include #include +using namespace llvm; // The OptimizationList is automatically populated with registered Passes by the // PassNameParser. From gaeke at cs.uiuc.edu Tue Nov 11 16:42:27 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:27 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/EmitAssembly.cpp EmitBytecodeToAssembly.cpp MappingInfo.cpp MappingInfo.h PeepholeOpts.cpp PreSelection.cpp PrologEpilogCodeInserter.cpp Sparc.burg.in Sparc.cpp SparcInstrInfo.cpp SparcInstrSelection.cpp SparcInstrSelectionSupport.h SparcInternals.h SparcRegClassInfo.cpp SparcRegClassInfo.h SparcRegInfo.cpp SparcV9CodeEmitter.cpp SparcV9CodeEmitter.h StackSlots.cpp UltraSparcSchedInfo.cpp Message-ID: <200311112241.QAA20762@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: EmitAssembly.cpp updated: 1.94 -> 1.95 EmitBytecodeToAssembly.cpp updated: 1.10 -> 1.11 MappingInfo.cpp updated: 1.14 -> 1.15 MappingInfo.h updated: 1.5 -> 1.6 PeepholeOpts.cpp updated: 1.15 -> 1.16 PreSelection.cpp updated: 1.25 -> 1.26 PrologEpilogCodeInserter.cpp updated: 1.30 -> 1.31 Sparc.burg.in updated: 1.10 -> 1.11 Sparc.cpp updated: 1.89 -> 1.90 SparcInstrInfo.cpp updated: 1.57 -> 1.58 SparcInstrSelection.cpp updated: 1.126 -> 1.127 SparcInstrSelectionSupport.h updated: 1.12 -> 1.13 SparcInternals.h updated: 1.106 -> 1.107 SparcRegClassInfo.cpp updated: 1.31 -> 1.32 SparcRegClassInfo.h updated: 1.22 -> 1.23 SparcRegInfo.cpp updated: 1.113 -> 1.114 SparcV9CodeEmitter.cpp updated: 1.42 -> 1.43 SparcV9CodeEmitter.h updated: 1.16 -> 1.17 StackSlots.cpp updated: 1.8 -> 1.9 UltraSparcSchedInfo.cpp updated: 1.7 -> 1.8 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+90 -15) Index: llvm/lib/Target/Sparc/EmitAssembly.cpp diff -u llvm/lib/Target/Sparc/EmitAssembly.cpp:1.94 llvm/lib/Target/Sparc/EmitAssembly.cpp:1.95 --- llvm/lib/Target/Sparc/EmitAssembly.cpp:1.94 Fri Nov 7 11:45:28 2003 +++ llvm/lib/Target/Sparc/EmitAssembly.cpp Tue Nov 11 16:41:33 2003 @@ -33,6 +33,8 @@ #include "SparcInternals.h" #include +namespace llvm { + namespace { Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); @@ -877,12 +879,13 @@ } // End anonymous namespace +namespace llvm { + Pass *UltraSparc::getFunctionAsmPrinterPass(std::ostream &Out) { return new SparcFunctionAsmPrinter(Out, *this); } - - +} // End llvm namespace //===----------------------------------------------------------------------===// @@ -954,3 +957,5 @@ Pass *UltraSparc::getModuleAsmPrinterPass(std::ostream &Out) { return new SparcModuleAsmPrinter(Out, *this); } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp diff -u llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp:1.10 llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp:1.11 --- llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp:1.10 Mon Oct 20 14:43:17 2003 +++ llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp Tue Nov 11 16:41:33 2003 @@ -18,6 +18,8 @@ #include "llvm/Bytecode/Writer.h" #include +namespace llvm { + using std::ostream; namespace { @@ -113,3 +115,5 @@ Pass *UltraSparc::getBytecodeAsmPrinterPass(std::ostream &Out) { return new SparcBytecodeWriter(Out); } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/MappingInfo.cpp diff -u llvm/lib/Target/Sparc/MappingInfo.cpp:1.14 llvm/lib/Target/Sparc/MappingInfo.cpp:1.15 --- llvm/lib/Target/Sparc/MappingInfo.cpp:1.14 Mon Oct 20 14:43:17 2003 +++ llvm/lib/Target/Sparc/MappingInfo.cpp Tue Nov 11 16:41:33 2003 @@ -49,6 +49,8 @@ #include "llvm/CodeGen/MachineCodeForInstruction.h" #include "Support/StringExtras.h" +namespace llvm { + namespace { class MappingInfoAsmPrinter : public FunctionPass { std::ostream &Out; @@ -292,4 +294,6 @@ return false; } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/MappingInfo.h diff -u llvm/lib/Target/Sparc/MappingInfo.h:1.5 llvm/lib/Target/Sparc/MappingInfo.h:1.6 --- llvm/lib/Target/Sparc/MappingInfo.h:1.5 Tue Oct 21 10:17:13 2003 +++ llvm/lib/Target/Sparc/MappingInfo.h Tue Nov 11 16:41:33 2003 @@ -18,6 +18,9 @@ #include #include #include + +namespace llvm { + class Pass; Pass *getMappingInfoAsmPrinterPass(std::ostream &out); @@ -40,5 +43,7 @@ length = bytes.size(); return &bytes[0]; } }; + +} // End llvm namespace #endif Index: llvm/lib/Target/Sparc/PeepholeOpts.cpp diff -u llvm/lib/Target/Sparc/PeepholeOpts.cpp:1.15 llvm/lib/Target/Sparc/PeepholeOpts.cpp:1.16 --- llvm/lib/Target/Sparc/PeepholeOpts.cpp:1.15 Fri Nov 7 11:44:18 2003 +++ llvm/lib/Target/Sparc/PeepholeOpts.cpp Tue Nov 11 16:41:33 2003 @@ -20,6 +20,8 @@ #include "llvm/BasicBlock.h" #include "llvm/Pass.h" +namespace llvm { + //************************* Internal Functions *****************************/ static inline void @@ -163,3 +165,5 @@ FunctionPass* createPeepholeOptsPass(const TargetMachine &TM) { return new PeepholeOpts(TM); } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/PreSelection.cpp diff -u llvm/lib/Target/Sparc/PreSelection.cpp:1.25 llvm/lib/Target/Sparc/PreSelection.cpp:1.26 --- llvm/lib/Target/Sparc/PreSelection.cpp:1.25 Fri Nov 7 11:31:22 2003 +++ llvm/lib/Target/Sparc/PreSelection.cpp Tue Nov 11 16:41:33 2003 @@ -29,6 +29,8 @@ #include "llvm/Transforms/Scalar.h" #include +namespace llvm { + namespace { //===--------------------------------------------------------------------===// @@ -71,6 +73,7 @@ "Specialize LLVM code for a target machine" createPreselectionPass); #endif + } // end anonymous namespace @@ -236,7 +239,6 @@ visitOperands(I, (/*firstOp=*/ I.getCalledFunction()? 1 : 0)); } - //===----------------------------------------------------------------------===// // createPreSelectionPass - Public entrypoint for pre-selection pass // and this file as a whole... @@ -244,3 +246,5 @@ FunctionPass* createPreSelectionPass(const TargetMachine &TM) { return new PreSelection(TM); } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp diff -u llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp:1.30 llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp:1.31 --- llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp:1.30 Mon Oct 20 14:43:17 2003 +++ llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp Tue Nov 11 16:41:33 2003 @@ -27,6 +27,8 @@ #include "llvm/DerivedTypes.h" #include "llvm/Intrinsics.h" +namespace llvm { + namespace { struct InsertPrologEpilogCode : public MachineFunctionPass { const char *getPassName() const { return "Sparc Prolog/Epilog Inserter"; } @@ -177,3 +179,5 @@ FunctionPass *UltraSparc::getPrologEpilogInsertionPass() { return new InsertPrologEpilogCode(); } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/Sparc.burg.in diff -u llvm/lib/Target/Sparc/Sparc.burg.in:1.10 llvm/lib/Target/Sparc/Sparc.burg.in:1.11 --- llvm/lib/Target/Sparc/Sparc.burg.in:1.10 Tue Oct 21 10:24:55 2003 +++ llvm/lib/Target/Sparc/Sparc.burg.in Tue Nov 11 16:41:33 2003 @@ -11,7 +11,7 @@ Xinclude Xinclude -typedef InstrTreeNode* NODEPTR_TYPE; +typedef llvm::InstrTreeNode* NODEPTR_TYPE; Xdefine OP_LABEL(p) ((p)->opLabel) Xdefine LEFT_CHILD(p) ((p)->LeftChild) Xdefine RIGHT_CHILD(p) ((p)->RightChild) Index: llvm/lib/Target/Sparc/Sparc.cpp diff -u llvm/lib/Target/Sparc/Sparc.cpp:1.89 llvm/lib/Target/Sparc/Sparc.cpp:1.90 --- llvm/lib/Target/Sparc/Sparc.cpp:1.89 Fri Nov 7 18:01:39 2003 +++ llvm/lib/Target/Sparc/Sparc.cpp Tue Nov 11 16:41:33 2003 @@ -27,6 +27,8 @@ #include "llvm/Target/TargetMachineImpls.h" #include "Support/CommandLine.h" +namespace llvm { + static const unsigned ImplicitRegUseList[] = { 0 }; /* not used yet */ // Build the MachineInstruction Description Array... const TargetInstrDescriptor SparcMachineInstrDesc[] = { @@ -267,3 +269,5 @@ return false; // success! } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/SparcInstrInfo.cpp diff -u llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.57 llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.58 --- llvm/lib/Target/Sparc/SparcInstrInfo.cpp:1.57 Fri Nov 7 11:29:48 2003 +++ llvm/lib/Target/Sparc/SparcInstrInfo.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "llvm/CodeGen/MachineCodeForInstruction.h" #include "llvm/CodeGen/MachineInstrBuilder.h" +namespace llvm { + static const uint32_t MAXLO = (1 << 10) - 1; // set bits set by %lo(*) static const uint32_t MAXSIMM = (1 << 12) - 1; // set bits in simm13 field of OR @@ -792,3 +794,5 @@ CreateBitExtensionInstructions(/*signExtend*/ false, target, F, srcVal, destVal, numLowBits, mvec, mcfi); } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/SparcInstrSelection.cpp diff -u llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.126 llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.127 --- llvm/lib/Target/Sparc/SparcInstrSelection.cpp:1.126 Thu Oct 23 11:48:30 2003 +++ llvm/lib/Target/Sparc/SparcInstrSelection.cpp Tue Nov 11 16:41:33 2003 @@ -32,6 +32,8 @@ #include #include +namespace llvm { + static inline void Add3OperandInstr(unsigned Opcode, InstructionNode* Node, std::vector& mvec) { mvec.push_back(BuildMI(Opcode, 3).addReg(Node->leftChild()->getValue()) @@ -1390,12 +1392,12 @@ // instead of a regular call. If not that kind of intrinsic, do nothing. // Returns true if code was generated, otherwise false. // -bool CodeGenIntrinsic(LLVMIntrinsic::ID iid, CallInst &callInstr, +bool CodeGenIntrinsic(Intrinsic::ID iid, CallInst &callInstr, TargetMachine &target, std::vector& mvec) { switch (iid) { - case LLVMIntrinsic::va_start: { + case Intrinsic::va_start: { // Get the address of the first incoming vararg argument on the stack bool ignore; Function* func = cast(callInstr.getParent()->getParent()); @@ -1409,10 +1411,10 @@ return true; } - case LLVMIntrinsic::va_end: + case Intrinsic::va_end: return true; // no-op on Sparc - case LLVMIntrinsic::va_copy: + case Intrinsic::va_copy: // Simple copy of current va_list (arg1) to new va_list (result) mvec.push_back(BuildMI(V9::ORr, 3). addMReg(target.getRegInfo().getZeroRegNum()). @@ -1420,8 +1422,8 @@ addRegDef(&callInstr)); return true; - case LLVMIntrinsic::sigsetjmp: - case LLVMIntrinsic::setjmp: { + case Intrinsic::sigsetjmp: + case Intrinsic::setjmp: { // act as if we return 0 unsigned g0 = target.getRegInfo().getZeroRegNum(); mvec.push_back(BuildMI(V9::ORr,3).addMReg(g0).addMReg(g0) @@ -1429,8 +1431,8 @@ return true; } - case LLVMIntrinsic::siglongjmp: - case LLVMIntrinsic::longjmp: { + case Intrinsic::siglongjmp: + case Intrinsic::longjmp: { // call abort() Module* M = callInstr.getParent()->getParent()->getParent(); const FunctionType *voidvoidFuncTy = @@ -2474,8 +2476,8 @@ // sequence (e.g., va_start). Indirect calls cannot be special. // bool specialIntrinsic = false; - LLVMIntrinsic::ID iid; - if (calledFunc && (iid=(LLVMIntrinsic::ID)calledFunc->getIntrinsicID())) + Intrinsic::ID iid; + if (calledFunc && (iid=(Intrinsic::ID)calledFunc->getIntrinsicID())) specialIntrinsic = CodeGenIntrinsic(iid, *callInstr, target, mvec); // If not, generate the normal call sequence for the function. @@ -2928,4 +2930,6 @@ } } } +} + } Index: llvm/lib/Target/Sparc/SparcInstrSelectionSupport.h diff -u llvm/lib/Target/Sparc/SparcInstrSelectionSupport.h:1.12 llvm/lib/Target/Sparc/SparcInstrSelectionSupport.h:1.13 --- llvm/lib/Target/Sparc/SparcInstrSelectionSupport.h:1.12 Wed Oct 22 00:50:40 2003 +++ llvm/lib/Target/Sparc/SparcInstrSelectionSupport.h Tue Nov 11 16:41:33 2003 @@ -17,6 +17,8 @@ #include "llvm/DerivedTypes.h" #include "SparcInternals.h" +namespace llvm { + // Choose load instruction opcode based on type of value inline MachineOpCode ChooseLoadInstruction(const Type *DestTy) @@ -219,5 +221,7 @@ return Opcode; } } + +} // End llvm namespace #endif Index: llvm/lib/Target/Sparc/SparcInternals.h diff -u llvm/lib/Target/Sparc/SparcInternals.h:1.106 llvm/lib/Target/Sparc/SparcInternals.h:1.107 --- llvm/lib/Target/Sparc/SparcInternals.h:1.106 Fri Nov 7 11:43:43 2003 +++ llvm/lib/Target/Sparc/SparcInternals.h Tue Nov 11 16:41:33 2003 @@ -25,6 +25,8 @@ #include "SparcRegClassInfo.h" #include "Config/sys/types.h" +namespace llvm { + class LiveRange; class UltraSparc; class Pass; @@ -692,5 +694,7 @@ // getBytecodeAsmPrinterPass - Emits final LLVM bytecode to assembly file. Pass* getBytecodeAsmPrinterPass(std::ostream &Out); }; + +} // End llvm namespace #endif Index: llvm/lib/Target/Sparc/SparcRegClassInfo.cpp diff -u llvm/lib/Target/Sparc/SparcRegClassInfo.cpp:1.31 llvm/lib/Target/Sparc/SparcRegClassInfo.cpp:1.32 --- llvm/lib/Target/Sparc/SparcRegClassInfo.cpp:1.31 Mon Oct 20 14:43:17 2003 +++ llvm/lib/Target/Sparc/SparcRegClassInfo.cpp Tue Nov 11 16:41:33 2003 @@ -17,6 +17,8 @@ #include "../../CodeGen/RegAlloc/RegAllocCommon.h" // FIXME! #include "../../CodeGen/RegAlloc/IGNode.h" // FIXME! +namespace llvm { + //----------------------------------------------------------------------------- // Int Register Class - method for coloring a node in the interference graph. // @@ -390,3 +392,5 @@ return -1; } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/SparcRegClassInfo.h diff -u llvm/lib/Target/Sparc/SparcRegClassInfo.h:1.22 llvm/lib/Target/Sparc/SparcRegClassInfo.h:1.23 --- llvm/lib/Target/Sparc/SparcRegClassInfo.h:1.22 Tue Oct 21 10:17:13 2003 +++ llvm/lib/Target/Sparc/SparcRegClassInfo.h Tue Nov 11 16:41:33 2003 @@ -16,6 +16,8 @@ #include "llvm/Target/TargetRegInfo.h" +namespace llvm { + //----------------------------------------------------------------------------- // Integer Register Class //----------------------------------------------------------------------------- @@ -216,5 +218,7 @@ const char * const getRegName(unsigned reg) const; }; + +} // End llvm namespace #endif Index: llvm/lib/Target/Sparc/SparcRegInfo.cpp diff -u llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.113 llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.114 --- llvm/lib/Target/Sparc/SparcRegInfo.cpp:1.113 Sat Nov 8 12:12:24 2003 +++ llvm/lib/Target/Sparc/SparcRegInfo.cpp Tue Nov 11 16:41:33 2003 @@ -27,6 +27,8 @@ #include "llvm/Function.h" #include "llvm/DerivedTypes.h" +namespace llvm { + enum { BadRegClass = ~0 }; @@ -967,3 +969,5 @@ std::cerr << "+" << getUnifiedRegName(uRegName+1); std::cerr << "]\n"; } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.42 llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.43 --- llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.42 Sun Nov 9 01:08:34 2003 +++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp Tue Nov 11 16:41:33 2003 @@ -38,6 +38,8 @@ #include "SparcV9CodeEmitter.h" #include "Config/alloca.h" +namespace llvm { + namespace { Statistic<> OverwrittenCalls("call-ovwr", "Number of over-written calls"); Statistic<> UnmodifiedCalls("call-skip", "Number of unmodified calls"); @@ -443,7 +445,6 @@ return (intptr_t)MCE.finishFunctionStub(*F)+4; /* 1 instr past the restore */ } - SparcV9CodeEmitter::SparcV9CodeEmitter(TargetMachine &tm, MachineCodeEmitter &M): TM(tm), MCE(M) { @@ -808,5 +809,7 @@ return (void*)(intptr_t)MCE.getGlobalValueAddress(V); } } + +} // End llvm namespace #include "SparcV9CodeEmitter.inc" Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.h diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.h:1.16 llvm/lib/Target/Sparc/SparcV9CodeEmitter.h:1.17 --- llvm/lib/Target/Sparc/SparcV9CodeEmitter.h:1.16 Fri Nov 7 12:06:26 2003 +++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.h Tue Nov 11 16:41:33 2003 @@ -19,6 +19,8 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/Target/TargetMachine.h" +namespace llvm { + class GlobalValue; class MachineInstr; class MachineOperand; @@ -80,5 +82,7 @@ unsigned getRealRegNum(unsigned fakeReg, MachineInstr &MI); }; + +} // End llvm namespace #endif Index: llvm/lib/Target/Sparc/StackSlots.cpp diff -u llvm/lib/Target/Sparc/StackSlots.cpp:1.8 llvm/lib/Target/Sparc/StackSlots.cpp:1.9 --- llvm/lib/Target/Sparc/StackSlots.cpp:1.8 Thu Nov 6 12:06:13 2003 +++ llvm/lib/Target/Sparc/StackSlots.cpp Tue Nov 11 16:41:33 2003 @@ -20,6 +20,8 @@ #include "llvm/CodeGen/MachineFunctionInfo.h" #include "llvm/CodeGen/MachineFunctionPass.h" +namespace llvm { + namespace { class StackSlots : public MachineFunctionPass { const TargetMachine &Target; @@ -48,3 +50,5 @@ Pass *createStackSlotsPass(const TargetMachine &Target) { return new StackSlots(Target); } + +} // End llvm namespace Index: llvm/lib/Target/Sparc/UltraSparcSchedInfo.cpp diff -u llvm/lib/Target/Sparc/UltraSparcSchedInfo.cpp:1.7 llvm/lib/Target/Sparc/UltraSparcSchedInfo.cpp:1.8 --- llvm/lib/Target/Sparc/UltraSparcSchedInfo.cpp:1.7 Mon Oct 20 14:43:17 2003 +++ llvm/lib/Target/Sparc/UltraSparcSchedInfo.cpp Tue Nov 11 16:41:33 2003 @@ -13,6 +13,8 @@ #include "SparcInternals.h" +using namespace llvm; + /*--------------------------------------------------------------------------- Scheduling guidelines for SPARC IIi: From gaeke at cs.uiuc.edu Tue Nov 11 16:42:31 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:31 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-dis/llvm-dis.cpp Message-ID: <200311112241.QAA20910@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-dis: llvm-dis.cpp updated: 1.35 -> 1.36 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+6 -4) Index: llvm/tools/llvm-dis/llvm-dis.cpp diff -u llvm/tools/llvm-dis/llvm-dis.cpp:1.35 llvm/tools/llvm-dis/llvm-dis.cpp:1.36 --- llvm/tools/llvm-dis/llvm-dis.cpp:1.35 Mon Oct 20 12:53:02 2003 +++ llvm/tools/llvm-dis/llvm-dis.cpp Tue Nov 11 16:41:34 2003 @@ -29,10 +29,12 @@ // OutputMode - The different orderings to print basic blocks in... enum OutputMode { - llvm = 0, // Generate LLVM assembly (the default) + LLVM = 0, // Generate LLVM assembly (the default) c, // Generate C code }; +using namespace llvm; + static cl::opt InputFilename(cl::Positional, cl::desc(""), cl::init("-")); @@ -45,8 +47,8 @@ static cl::opt WriteMode(cl::desc("Specify the output format:"), - cl::values(clEnumVal(llvm, "Output LLVM assembly"), - clEnumVal(c , "Output C code for program"), + cl::values(clEnumVal(LLVM, "Output LLVM assembly"), + clEnumVal(c, "Output C code for program"), 0)); int main(int argc, char **argv) { @@ -116,7 +118,7 @@ PassManager Passes; switch (WriteMode) { - case llvm: // Output LLVM assembly + case LLVM: // Output LLVM assembly Passes.add(new PrintModulePass(Out)); break; case c: // Convert LLVM to C From gaeke at cs.uiuc.edu Tue Nov 11 16:42:35 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:35 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-as/llvm-as.cpp Message-ID: <200311112241.QAA20906@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-as: llvm-as.cpp updated: 1.24 -> 1.25 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+2 -0) Index: llvm/tools/llvm-as/llvm-as.cpp diff -u llvm/tools/llvm-as/llvm-as.cpp:1.24 llvm/tools/llvm-as/llvm-as.cpp:1.25 --- llvm/tools/llvm-as/llvm-as.cpp:1.24 Mon Oct 20 12:52:11 2003 +++ llvm/tools/llvm-as/llvm-as.cpp Tue Nov 11 16:41:34 2003 @@ -24,6 +24,8 @@ #include #include +using namespace llvm; + static cl::opt InputFilename(cl::Positional, cl::desc(""), cl::init("-")); From gaeke at cs.uiuc.edu Tue Nov 11 16:42:38 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:38 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/GenerateCode.cpp Linker.cpp gccld.cpp gccld.h Message-ID: <200311112241.QAA20931@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccld: GenerateCode.cpp updated: 1.12 -> 1.13 Linker.cpp updated: 1.15 -> 1.16 gccld.cpp updated: 1.61 -> 1.62 gccld.h updated: 1.4 -> 1.5 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+17 -0) Index: llvm/tools/gccld/GenerateCode.cpp diff -u llvm/tools/gccld/GenerateCode.cpp:1.12 llvm/tools/gccld/GenerateCode.cpp:1.13 --- llvm/tools/gccld/GenerateCode.cpp:1.12 Sun Nov 9 13:55:09 2003 +++ llvm/tools/gccld/GenerateCode.cpp Tue Nov 11 16:41:34 2003 @@ -25,11 +25,14 @@ #include "Support/SystemUtils.h" #include "Support/CommandLine.h" +using namespace llvm; + namespace { cl::opt DisableInline("disable-inlining", cl::desc("Do not run the inliner pass")); } +namespace llvm { /// GenerateBytecode - generates a bytecode file from the specified module. /// @@ -221,3 +224,5 @@ // Run the compiler to assembly and link together the program. return ExecWait(&(cmd[0]), clean_env); } + +} // End llvm namespace Index: llvm/tools/gccld/Linker.cpp diff -u llvm/tools/gccld/Linker.cpp:1.15 llvm/tools/gccld/Linker.cpp:1.16 --- llvm/tools/gccld/Linker.cpp:1.15 Tue Nov 11 15:54:01 2003 +++ llvm/tools/gccld/Linker.cpp Tue Nov 11 16:41:34 2003 @@ -30,6 +30,8 @@ #include #include +namespace llvm { + /// FindLib - Try to convert Filename into the name of a file that we can open, /// if it does not already name a file we can open, by first trying to open /// Filename, then libFilename. for each of a set of several common @@ -405,3 +407,5 @@ return false; } + +} // End llvm namespace Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.61 llvm/tools/gccld/gccld.cpp:1.62 --- llvm/tools/gccld/gccld.cpp:1.61 Wed Nov 5 16:13:00 2003 +++ llvm/tools/gccld/gccld.cpp Tue Nov 11 16:41:34 2003 @@ -36,6 +36,8 @@ #include #include +using namespace llvm; + namespace { cl::list InputFilenames(cl::Positional, cl::desc(""), @@ -86,6 +88,8 @@ CO5("eh-frame-hdr", cl::Hidden, cl::desc("Compatibility option: ignored")); } +namespace llvm { + // // Function: PrintAndReturn () // @@ -211,6 +215,7 @@ return; } +} // End llvm namespace int main(int argc, char **argv, char **envp) { cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n"); Index: llvm/tools/gccld/gccld.h diff -u llvm/tools/gccld/gccld.h:1.4 llvm/tools/gccld/gccld.h:1.5 --- llvm/tools/gccld/gccld.h:1.4 Wed Nov 5 16:13:10 2003 +++ llvm/tools/gccld/gccld.h Tue Nov 11 16:41:34 2003 @@ -17,6 +17,8 @@ #include #include +namespace llvm { + int PrintAndReturn (const char *progname, const std::string &Message, @@ -69,3 +71,4 @@ const std::vector & Files, bool Verbose); +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:42:42 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:42 2003 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/BugDriver.cpp BugDriver.h CodeGeneratorBug.cpp CrashDebugger.cpp ExecutionDriver.cpp ExtractFunction.cpp ListReducer.h Miscompilation.cpp OptimizerDriver.cpp TestPasses.cpp bugpoint.cpp Message-ID: <200311112241.QAA20999@zion.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: BugDriver.cpp updated: 1.20 -> 1.21 BugDriver.h updated: 1.21 -> 1.22 CodeGeneratorBug.cpp updated: 1.31 -> 1.32 CrashDebugger.cpp updated: 1.24 -> 1.25 ExecutionDriver.cpp updated: 1.32 -> 1.33 ExtractFunction.cpp updated: 1.19 -> 1.20 ListReducer.h updated: 1.7 -> 1.8 Miscompilation.cpp updated: 1.23 -> 1.24 OptimizerDriver.cpp updated: 1.15 -> 1.16 TestPasses.cpp updated: 1.5 -> 1.6 bugpoint.cpp updated: 1.10 -> 1.11 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+51 -0) Index: llvm/tools/bugpoint/BugDriver.cpp diff -u llvm/tools/bugpoint/BugDriver.cpp:1.20 llvm/tools/bugpoint/BugDriver.cpp:1.21 --- llvm/tools/bugpoint/BugDriver.cpp:1.20 Mon Oct 20 12:57:12 2003 +++ llvm/tools/bugpoint/BugDriver.cpp Tue Nov 11 16:41:34 2003 @@ -23,6 +23,8 @@ #include "Support/FileUtilities.h" #include +using namespace llvm; + // Anonymous namespace to define command line options for debugging. // namespace { @@ -36,6 +38,8 @@ "(for miscompilation detection)")); } +namespace llvm { + /// getPassesString - Turn a list of passes into a string which indicates the /// command line options that must be passed to add the passes. /// @@ -179,3 +183,5 @@ } std::cout << std::flush; } + +} // End llvm namespace Index: llvm/tools/bugpoint/BugDriver.h diff -u llvm/tools/bugpoint/BugDriver.h:1.21 llvm/tools/bugpoint/BugDriver.h:1.22 --- llvm/tools/bugpoint/BugDriver.h:1.21 Wed Nov 5 15:45:35 2003 +++ llvm/tools/bugpoint/BugDriver.h Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include #include +namespace llvm { + class PassInfo; class Module; class Function; @@ -206,5 +208,7 @@ // blocks, making it external. // void DeleteFunctionBody(Function *F); + +} // End llvm namespace #endif Index: llvm/tools/bugpoint/CodeGeneratorBug.cpp diff -u llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.31 llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.32 --- llvm/tools/bugpoint/CodeGeneratorBug.cpp:1.31 Wed Nov 5 15:45:35 2003 +++ llvm/tools/bugpoint/CodeGeneratorBug.cpp Tue Nov 11 16:41:34 2003 @@ -33,6 +33,8 @@ #include #include +namespace llvm { + extern cl::list InputArgv; class ReduceMisCodegenFunctions : public ListReducer { @@ -408,3 +410,5 @@ return false; } + +} // End llvm namespace Index: llvm/tools/bugpoint/CrashDebugger.cpp diff -u llvm/tools/bugpoint/CrashDebugger.cpp:1.24 llvm/tools/bugpoint/CrashDebugger.cpp:1.25 --- llvm/tools/bugpoint/CrashDebugger.cpp:1.24 Wed Nov 5 15:45:35 2003 +++ llvm/tools/bugpoint/CrashDebugger.cpp Tue Nov 11 16:41:34 2003 @@ -29,6 +29,8 @@ #include #include +namespace llvm { + class DebugCrashes : public ListReducer { BugDriver &BD; public: @@ -397,3 +399,5 @@ return false; } + +} // End llvm namespace Index: llvm/tools/bugpoint/ExecutionDriver.cpp diff -u llvm/tools/bugpoint/ExecutionDriver.cpp:1.32 llvm/tools/bugpoint/ExecutionDriver.cpp:1.33 --- llvm/tools/bugpoint/ExecutionDriver.cpp:1.32 Tue Oct 21 12:41:35 2003 +++ llvm/tools/bugpoint/ExecutionDriver.cpp Tue Nov 11 16:41:34 2003 @@ -30,6 +30,8 @@ #include #include +using namespace llvm; + namespace { // OutputType - Allow the user to specify the way code should be run, to test // for miscompilation. @@ -58,6 +60,8 @@ "into executing programs")); } +namespace llvm { + // Anything specified after the --args option are taken as arguments to the // program being debugged. cl::list @@ -232,3 +236,5 @@ bool BugDriver::isExecutingJIT() { return InterpreterSel == RunJIT; } + +} // End llvm namespace Index: llvm/tools/bugpoint/ExtractFunction.cpp diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.19 llvm/tools/bugpoint/ExtractFunction.cpp:1.20 --- llvm/tools/bugpoint/ExtractFunction.cpp:1.19 Wed Nov 5 15:45:35 2003 +++ llvm/tools/bugpoint/ExtractFunction.cpp Tue Nov 11 16:41:34 2003 @@ -25,8 +25,15 @@ #include "llvm/Target/TargetData.h" #include "Support/CommandLine.h" + +namespace llvm { + bool DisableSimplifyCFG = false; +} // End llvm namespace + +using namespace llvm; + namespace { cl::opt NoADCE("disable-adce", @@ -39,6 +46,8 @@ cl::desc("Do not use the -simplifycfg pass to reduce testcases")); } +namespace llvm { + /// deleteInstructionFromProgram - This method clones the current Program and /// deletes the specified instruction from the cloned module. It then runs a /// series of cleanup passes (ADCE and SimplifyCFG) to eliminate any code which @@ -125,3 +134,5 @@ } return M; } + +} // End llvm namespace Index: llvm/tools/bugpoint/ListReducer.h diff -u llvm/tools/bugpoint/ListReducer.h:1.7 llvm/tools/bugpoint/ListReducer.h:1.8 --- llvm/tools/bugpoint/ListReducer.h:1.7 Mon Oct 20 12:57:13 2003 +++ llvm/tools/bugpoint/ListReducer.h Tue Nov 11 16:41:34 2003 @@ -17,6 +17,8 @@ #include +namespace llvm { + template struct ListReducer { enum TestResult { @@ -108,5 +110,7 @@ return true; // there are some failure and we've narrowed them down } }; + +} // End llvm namespace #endif Index: llvm/tools/bugpoint/Miscompilation.cpp diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.23 llvm/tools/bugpoint/Miscompilation.cpp:1.24 --- llvm/tools/bugpoint/Miscompilation.cpp:1.23 Mon Oct 20 12:57:13 2003 +++ llvm/tools/bugpoint/Miscompilation.cpp Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "llvm/Transforms/Utils/Linker.h" #include "Support/FileUtilities.h" +namespace llvm { + class ReduceMiscompilingPasses : public ListReducer { BugDriver &BD; public: @@ -308,3 +310,5 @@ return false; } + +} // End llvm namespace Index: llvm/tools/bugpoint/OptimizerDriver.cpp diff -u llvm/tools/bugpoint/OptimizerDriver.cpp:1.15 llvm/tools/bugpoint/OptimizerDriver.cpp:1.16 --- llvm/tools/bugpoint/OptimizerDriver.cpp:1.15 Mon Oct 20 12:57:13 2003 +++ llvm/tools/bugpoint/OptimizerDriver.cpp Tue Nov 11 16:41:34 2003 @@ -26,6 +26,8 @@ #include #include +namespace llvm { + /// writeProgramToFile - This writes the current "Program" to the named bytecode /// file. If an error occurs, true is returned. /// @@ -159,3 +161,5 @@ // Was the child successful? return !ExitedOK; } + +} // End llvm namespace Index: llvm/tools/bugpoint/TestPasses.cpp diff -u llvm/tools/bugpoint/TestPasses.cpp:1.5 llvm/tools/bugpoint/TestPasses.cpp:1.6 --- llvm/tools/bugpoint/TestPasses.cpp:1.5 Mon Oct 20 12:57:13 2003 +++ llvm/tools/bugpoint/TestPasses.cpp Tue Nov 11 16:41:34 2003 @@ -18,6 +18,8 @@ #include "llvm/Pass.h" #include "llvm/Support/InstVisitor.h" +using namespace llvm; + namespace { /// CrashOnCalls - This pass is used to test bugpoint. It intentionally /// crashes on any call instructions. Index: llvm/tools/bugpoint/bugpoint.cpp diff -u llvm/tools/bugpoint/bugpoint.cpp:1.10 llvm/tools/bugpoint/bugpoint.cpp:1.11 --- llvm/tools/bugpoint/bugpoint.cpp:1.10 Mon Oct 20 12:57:13 2003 +++ llvm/tools/bugpoint/bugpoint.cpp Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "Config/unistd.h" #include +using namespace llvm; + static cl::list InputFilenames(cl::Positional, cl::OneOrMore, cl::desc("")); From gaeke at cs.uiuc.edu Tue Nov 11 16:42:46 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:46 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-link/llvm-link.cpp Message-ID: <200311112241.QAA20912@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-link: llvm-link.cpp updated: 1.32 -> 1.33 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+2 -0) Index: llvm/tools/llvm-link/llvm-link.cpp diff -u llvm/tools/llvm-link/llvm-link.cpp:1.32 llvm/tools/llvm-link/llvm-link.cpp:1.33 --- llvm/tools/llvm-link/llvm-link.cpp:1.32 Mon Oct 20 15:40:30 2003 +++ llvm/tools/llvm-link/llvm-link.cpp Tue Nov 11 16:41:34 2003 @@ -24,6 +24,8 @@ #include // For FileExists #include +using namespace llvm; + static cl::list InputFilenames(cl::Positional, cl::OneOrMore, cl::desc("")); From gaeke at cs.uiuc.edu Tue Nov 11 16:42:50 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:50 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp BasicBlock.cpp ConstantHandling.cpp Constants.cpp Dominators.cpp Function.cpp InstrTypes.cpp Instruction.cpp Module.cpp ModuleProvider.cpp Pass.cpp PassManagerT.h SlotCalculator.cpp SymbolTable.cpp SymbolTableListTraitsImpl.h Type.cpp Value.cpp Verifier.cpp iBranch.cpp iCall.cpp iMemory.cpp iOperators.cpp iSwitch.cpp Message-ID: <200311112241.QAA21038@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.107 -> 1.108 BasicBlock.cpp updated: 1.35 -> 1.36 ConstantHandling.cpp updated: 1.36 -> 1.37 Constants.cpp updated: 1.61 -> 1.62 Dominators.cpp updated: 1.50 -> 1.51 Function.cpp updated: 1.55 -> 1.56 InstrTypes.cpp updated: 1.22 -> 1.23 Instruction.cpp updated: 1.30 -> 1.31 Module.cpp updated: 1.43 -> 1.44 ModuleProvider.cpp updated: 1.6 -> 1.7 Pass.cpp updated: 1.52 -> 1.53 PassManagerT.h updated: 1.45 -> 1.46 SlotCalculator.cpp updated: 1.37 -> 1.38 SymbolTable.cpp updated: 1.38 -> 1.39 SymbolTableListTraitsImpl.h updated: 1.5 -> 1.6 Type.cpp updated: 1.79 -> 1.80 Value.cpp updated: 1.39 -> 1.40 Verifier.cpp updated: 1.65 -> 1.66 iBranch.cpp updated: 1.9 -> 1.10 iCall.cpp updated: 1.20 -> 1.21 iMemory.cpp updated: 1.32 -> 1.33 iOperators.cpp updated: 1.23 -> 1.24 iSwitch.cpp updated: 1.9 -> 1.10 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+144 -51) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.107 llvm/lib/VMCore/AsmWriter.cpp:1.108 --- llvm/lib/VMCore/AsmWriter.cpp:1.107 Sun Nov 9 09:51:07 2003 +++ llvm/lib/VMCore/AsmWriter.cpp Tue Nov 11 16:41:34 2003 @@ -33,6 +33,8 @@ #include "Support/STLExtras.h" #include +namespace llvm { + static RegisterPass X("printm", "Print module to stderr",PassInfo::Analysis|PassInfo::Optimization); static RegisterPass @@ -1052,3 +1054,5 @@ } return *this; } + +} // End llvm namespace Index: llvm/lib/VMCore/BasicBlock.cpp diff -u llvm/lib/VMCore/BasicBlock.cpp:1.35 llvm/lib/VMCore/BasicBlock.cpp:1.36 --- llvm/lib/VMCore/BasicBlock.cpp:1.35 Tue Nov 4 23:15:42 2003 +++ llvm/lib/VMCore/BasicBlock.cpp Tue Nov 11 16:41:34 2003 @@ -22,6 +22,8 @@ #include "SymbolTableListTraitsImpl.h" #include +namespace llvm { + // DummyInst - An instance of this class is used to mark the end of the // instruction list. This is not a real instruction. // @@ -141,7 +143,7 @@ // bool BasicBlock::hasConstantReferences() const { for (use_const_iterator I = use_begin(), E = use_end(); I != E; ++I) - if (::isa((Value*)*I)) + if (isa((Value*)*I)) return true; return false; @@ -263,3 +265,5 @@ } return New; } + +} // End llvm namespace Index: llvm/lib/VMCore/ConstantHandling.cpp diff -u llvm/lib/VMCore/ConstantHandling.cpp:1.36 llvm/lib/VMCore/ConstantHandling.cpp:1.37 --- llvm/lib/VMCore/ConstantHandling.cpp:1.36 Mon Oct 20 14:43:20 2003 +++ llvm/lib/VMCore/ConstantHandling.cpp Tue Nov 11 16:41:34 2003 @@ -17,6 +17,8 @@ #include "llvm/DerivedTypes.h" #include +namespace llvm { + AnnotationID ConstRules::AID(AnnotationManager::getID("opt::ConstRules", &ConstRules::find)); @@ -638,3 +640,5 @@ static EmptyRules CERules; return &CERules; } + +} // End llvm namespace Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.61 llvm/lib/VMCore/Constants.cpp:1.62 --- llvm/lib/VMCore/Constants.cpp:1.61 Wed Nov 5 13:52:52 2003 +++ llvm/lib/VMCore/Constants.cpp Tue Nov 11 16:41:34 2003 @@ -20,6 +20,8 @@ #include "Support/StringExtras.h" #include +namespace llvm { + ConstantBool *ConstantBool::True = new ConstantBool(true); ConstantBool *ConstantBool::False = new ConstantBool(false); @@ -1029,3 +1031,5 @@ return NumReplaced; } } + +} // End llvm namespace Index: llvm/lib/VMCore/Dominators.cpp diff -u llvm/lib/VMCore/Dominators.cpp:1.50 llvm/lib/VMCore/Dominators.cpp:1.51 --- llvm/lib/VMCore/Dominators.cpp:1.50 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/Dominators.cpp Tue Nov 11 16:41:34 2003 @@ -20,6 +20,8 @@ #include "Support/DepthFirstIterator.h" #include "Support/SetOperations.h" +namespace llvm { + //===----------------------------------------------------------------------===// // DominatorSet Implementation //===----------------------------------------------------------------------===// @@ -358,3 +360,5 @@ o << " is:\t" << I->second << "\n"; } } + +} // End llvm namespace Index: llvm/lib/VMCore/Function.cpp diff -u llvm/lib/VMCore/Function.cpp:1.55 llvm/lib/VMCore/Function.cpp:1.56 --- llvm/lib/VMCore/Function.cpp:1.55 Tue Nov 4 23:15:42 2003 +++ llvm/lib/VMCore/Function.cpp Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "Support/LeakDetector.h" #include "SymbolTableListTraitsImpl.h" +namespace llvm { + BasicBlock *ilist_traits::createNode() { BasicBlock *Ret = new BasicBlock(); // This should not be garbage monitored. @@ -158,7 +160,7 @@ } /// getIntrinsicID - This method returns the ID number of the specified -/// function, or LLVMIntrinsic::not_intrinsic if the function is not an +/// function, or Intrinsic::not_intrinsic if the function is not an /// intrinsic, or if the pointer is null. This value is always defined to be /// zero to allow easy checking for whether a function is intrinsic or not. The /// particular intrinsic functions which correspond to this value are defined in @@ -176,21 +178,21 @@ std::string name; // The name of the intrinsic unsigned id; // Its ID number } alpha_intrinsics[] = { - { "llvm.alpha.ctlz", LLVMIntrinsic::alpha_ctlz }, - { "llvm.alpha.cttz", LLVMIntrinsic::alpha_cttz }, - { "llvm.alpha.ctpop", LLVMIntrinsic::alpha_ctpop }, - { "llvm.alpha.umulh", LLVMIntrinsic::alpha_umulh }, - { "llvm.alpha.vecop", LLVMIntrinsic::alpha_vecop }, - { "llvm.alpha.pup", LLVMIntrinsic::alpha_pup }, - { "llvm.alpha.bytezap", LLVMIntrinsic::alpha_bytezap }, - { "llvm.alpha.bytemanip", LLVMIntrinsic::alpha_bytemanip }, - { "llvm.alpha.dfp_bop", LLVMIntrinsic::alpha_dfpbop }, - { "llvm.alpha.dfp_uop", LLVMIntrinsic::alpha_dfpuop }, - { "llvm.alpha.unordered", LLVMIntrinsic::alpha_unordered }, - { "llvm.alpha.uqtodfp", LLVMIntrinsic::alpha_uqtodfp }, - { "llvm.alpha.uqtosfp", LLVMIntrinsic::alpha_uqtosfp }, - { "llvm.alpha.dfptosq", LLVMIntrinsic::alpha_dfptosq }, - { "llvm.alpha.sfptosq", LLVMIntrinsic::alpha_sfptosq }, + { "llvm.alpha.ctlz", Intrinsic::alpha_ctlz }, + { "llvm.alpha.cttz", Intrinsic::alpha_cttz }, + { "llvm.alpha.ctpop", Intrinsic::alpha_ctpop }, + { "llvm.alpha.umulh", Intrinsic::alpha_umulh }, + { "llvm.alpha.vecop", Intrinsic::alpha_vecop }, + { "llvm.alpha.pup", Intrinsic::alpha_pup }, + { "llvm.alpha.bytezap", Intrinsic::alpha_bytezap }, + { "llvm.alpha.bytemanip", Intrinsic::alpha_bytemanip }, + { "llvm.alpha.dfp_bop", Intrinsic::alpha_dfpbop }, + { "llvm.alpha.dfp_uop", Intrinsic::alpha_dfpuop }, + { "llvm.alpha.unordered", Intrinsic::alpha_unordered }, + { "llvm.alpha.uqtodfp", Intrinsic::alpha_uqtodfp }, + { "llvm.alpha.uqtosfp", Intrinsic::alpha_uqtosfp }, + { "llvm.alpha.dfptosq", Intrinsic::alpha_dfptosq }, + { "llvm.alpha.sfptosq", Intrinsic::alpha_sfptosq }, }; const unsigned num_alpha_intrinsics = sizeof(alpha_intrinsics) / sizeof(*alpha_intrinsics); @@ -204,17 +206,17 @@ return alpha_intrinsics[i].id; break; case 'l': - if (getName() == "llvm.longjmp") return LLVMIntrinsic::longjmp; + if (getName() == "llvm.longjmp") return Intrinsic::longjmp; break; case 's': - if (getName() == "llvm.setjmp") return LLVMIntrinsic::setjmp; - if (getName() == "llvm.sigsetjmp") return LLVMIntrinsic::sigsetjmp; - if (getName() == "llvm.siglongjmp") return LLVMIntrinsic::siglongjmp; + if (getName() == "llvm.setjmp") return Intrinsic::setjmp; + if (getName() == "llvm.sigsetjmp") return Intrinsic::sigsetjmp; + if (getName() == "llvm.siglongjmp") return Intrinsic::siglongjmp; break; case 'v': - if (getName() == "llvm.va_copy") return LLVMIntrinsic::va_copy; - if (getName() == "llvm.va_end") return LLVMIntrinsic::va_end; - if (getName() == "llvm.va_start") return LLVMIntrinsic::va_start; + if (getName() == "llvm.va_copy") return Intrinsic::va_copy; + if (getName() == "llvm.va_end") return Intrinsic::va_end; + if (getName() == "llvm.va_start") return Intrinsic::va_start; break; } // The "llvm." namespace is reserved! @@ -257,3 +259,5 @@ Value::setName(name); if (P && getName() != "") P->getSymbolTable().insert(this); } + +} // End llvm namespace Index: llvm/lib/VMCore/InstrTypes.cpp diff -u llvm/lib/VMCore/InstrTypes.cpp:1.22 llvm/lib/VMCore/InstrTypes.cpp:1.23 --- llvm/lib/VMCore/InstrTypes.cpp:1.22 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/InstrTypes.cpp Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "llvm/Type.h" #include // find +namespace llvm { + //===----------------------------------------------------------------------===// // TerminatorInst Class //===----------------------------------------------------------------------===// @@ -56,3 +58,5 @@ } return Removed; } + +} // End llvm namespace Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.30 llvm/lib/VMCore/Instruction.cpp:1.31 --- llvm/lib/VMCore/Instruction.cpp:1.30 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/Instruction.cpp Tue Nov 11 16:41:34 2003 @@ -16,6 +16,8 @@ #include "llvm/Type.h" #include "Support/LeakDetector.h" +namespace llvm { + Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name, Instruction *InsertBefore) : User(ty, Value::InstructionVal, Name) { @@ -163,3 +165,5 @@ return false; } } + +} // End llvm namespace Index: llvm/lib/VMCore/Module.cpp diff -u llvm/lib/VMCore/Module.cpp:1.43 llvm/lib/VMCore/Module.cpp:1.44 --- llvm/lib/VMCore/Module.cpp:1.43 Tue Nov 4 23:15:42 2003 +++ llvm/lib/VMCore/Module.cpp Tue Nov 11 16:41:34 2003 @@ -22,6 +22,8 @@ #include #include +namespace llvm { + Function *ilist_traits::createNode() { FunctionType *FTy = FunctionType::get(Type::VoidTy, std::vector(), false); @@ -307,3 +309,5 @@ delete Ref; } } + +} // End llvm namespace Index: llvm/lib/VMCore/ModuleProvider.cpp diff -u llvm/lib/VMCore/ModuleProvider.cpp:1.6 llvm/lib/VMCore/ModuleProvider.cpp:1.7 --- llvm/lib/VMCore/ModuleProvider.cpp:1.6 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/ModuleProvider.cpp Tue Nov 11 16:41:34 2003 @@ -14,6 +14,8 @@ #include "llvm/ModuleProvider.h" #include "llvm/Module.h" +namespace llvm { + /// ctor - always have a valid Module /// ModuleProvider::ModuleProvider() : TheModule(0) { } @@ -35,3 +37,5 @@ return TheModule; } + +} // End llvm namespace Index: llvm/lib/VMCore/Pass.cpp diff -u llvm/lib/VMCore/Pass.cpp:1.52 llvm/lib/VMCore/Pass.cpp:1.53 --- llvm/lib/VMCore/Pass.cpp:1.52 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/Pass.cpp Tue Nov 11 16:41:34 2003 @@ -21,6 +21,8 @@ #include "Support/TypeInfo.h" #include +namespace llvm { + // IncludeFile - Stub function used to help linking out. IncludeFile::IncludeFile(void*) {} @@ -467,3 +469,5 @@ E = PassInfoMap->end(); I != E; ++I) passEnumerate(I->second); } + +} // End llvm namespace Index: llvm/lib/VMCore/PassManagerT.h diff -u llvm/lib/VMCore/PassManagerT.h:1.45 llvm/lib/VMCore/PassManagerT.h:1.46 --- llvm/lib/VMCore/PassManagerT.h:1.45 Tue Nov 4 23:15:42 2003 +++ llvm/lib/VMCore/PassManagerT.h Tue Nov 11 16:41:34 2003 @@ -28,6 +28,9 @@ #include "Support/Timer.h" #include #include + +namespace llvm { + class Annotable; //===----------------------------------------------------------------------===// @@ -791,5 +794,7 @@ ((PMType*)this)->Passes[i]->doFinalization(M); return Changed; } + +} // End llvm namespace #endif Index: llvm/lib/VMCore/SlotCalculator.cpp diff -u llvm/lib/VMCore/SlotCalculator.cpp:1.37 llvm/lib/VMCore/SlotCalculator.cpp:1.38 --- llvm/lib/VMCore/SlotCalculator.cpp:1.37 Thu Oct 30 21:02:34 2003 +++ llvm/lib/VMCore/SlotCalculator.cpp Tue Nov 11 16:41:34 2003 @@ -27,6 +27,8 @@ #include "Support/STLExtras.h" #include +namespace llvm { + #if 0 #define SC_DEBUG(X) std::cerr << X #else @@ -361,3 +363,5 @@ SC_DEBUG("]\n"); return (int)DestSlot; } + +} // End llvm namespace Index: llvm/lib/VMCore/SymbolTable.cpp diff -u llvm/lib/VMCore/SymbolTable.cpp:1.38 llvm/lib/VMCore/SymbolTable.cpp:1.39 --- llvm/lib/VMCore/SymbolTable.cpp:1.38 Sun Nov 9 13:39:46 2003 +++ llvm/lib/VMCore/SymbolTable.cpp Tue Nov 11 16:41:34 2003 @@ -17,6 +17,8 @@ #include "Support/StringExtras.h" #include +namespace llvm { + #define DEBUG_SYMBOL_TABLE 0 #define DEBUG_ABSTYPE 0 @@ -354,3 +356,5 @@ std::cout << "Symbol table dump:\n"; for_each(begin(), end(), DumpPlane); } + +} // End llvm namespace Index: llvm/lib/VMCore/SymbolTableListTraitsImpl.h diff -u llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.5 llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.6 --- llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.5 Tue Oct 21 10:17:13 2003 +++ llvm/lib/VMCore/SymbolTableListTraitsImpl.h Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "llvm/SymbolTableListTraits.h" #include "llvm/SymbolTable.h" +namespace llvm { + template void SymbolTableListTraits @@ -93,5 +95,7 @@ first->setParent(NewIP); } } + +} // End llvm namespace #endif Index: llvm/lib/VMCore/Type.cpp diff -u llvm/lib/VMCore/Type.cpp:1.79 llvm/lib/VMCore/Type.cpp:1.80 --- llvm/lib/VMCore/Type.cpp:1.79 Mon Nov 3 12:44:58 2003 +++ llvm/lib/VMCore/Type.cpp Tue Nov 11 16:41:34 2003 @@ -18,6 +18,8 @@ #include "Support/STLExtras.h" #include +namespace llvm { + // DEBUG_MERGE_TYPES - Enable this #define to see how and when derived types are // created and later destroyed, all in an effort to make sure that there is only // a single canonical version of a type. @@ -1114,3 +1116,4 @@ refineAbstractType(AbsTy, AbsTy); } +} // End llvm namespace Index: llvm/lib/VMCore/Value.cpp diff -u llvm/lib/VMCore/Value.cpp:1.39 llvm/lib/VMCore/Value.cpp:1.40 --- llvm/lib/VMCore/Value.cpp:1.39 Wed Nov 5 13:09:40 2003 +++ llvm/lib/VMCore/Value.cpp Tue Nov 11 16:41:34 2003 @@ -18,6 +18,8 @@ #include "Support/LeakDetector.h" #include +namespace llvm { + //===----------------------------------------------------------------------===// // Value Class //===----------------------------------------------------------------------===// @@ -107,3 +109,5 @@ setOperand(i, To); // Fix it now... } } + +} // End llvm namespace Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.65 llvm/lib/VMCore/Verifier.cpp:1.66 --- llvm/lib/VMCore/Verifier.cpp:1.65 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/Verifier.cpp Tue Nov 11 16:41:34 2003 @@ -57,6 +57,8 @@ #include "Support/STLExtras.h" #include +namespace llvm { + namespace { // Anonymous namespace for class struct Verifier : public FunctionPass, InstVisitor { @@ -149,7 +151,7 @@ void visitReturnInst(ReturnInst &RI); void visitUserOp1(Instruction &I); void visitUserOp2(Instruction &I) { visitUserOp1(I); } - void visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI); + void visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI); // CheckFailed - A check failed, so print out the condition and the message // that failed. This provides a nice place to put a breakpoint if you want @@ -168,7 +170,6 @@ }; RegisterPass X("verify", "Module Verifier"); -} // Assert - We know that cond should be true, if not print an error message. #define Assert(C, M) \ @@ -368,7 +369,7 @@ CI.getOperand(i+1), FTy->getParamType(i)); if (Function *F = CI.getCalledFunction()) - if (LLVMIntrinsic::ID ID = (LLVMIntrinsic::ID)F->getIntrinsicID()) + if (Intrinsic::ID ID = (Intrinsic::ID)F->getIntrinsicID()) visitIntrinsicFunctionCall(ID, CI); visitInstruction(CI); @@ -500,7 +501,7 @@ } /// visitIntrinsicFunction - Allow intrinsics to be verified in different ways. -void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) { +void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) { Function *IF = CI.getCalledFunction(); const FunctionType *FT = IF->getFunctionType(); Assert1(IF->isExternal(), "Intrinsic functions should never be defined!", IF); @@ -509,37 +510,37 @@ // FIXME: this should check the return type of each intrinsic as well, also // arguments! switch (ID) { - case LLVMIntrinsic::va_start: + case Intrinsic::va_start: Assert1(CI.getParent()->getParent()->getFunctionType()->isVarArg(), "llvm.va_start intrinsic may only occur in function with variable" " args!", &CI); NumArgs = 0; break; - case LLVMIntrinsic::va_end: NumArgs = 1; break; - case LLVMIntrinsic::va_copy: NumArgs = 1; break; + case Intrinsic::va_end: NumArgs = 1; break; + case Intrinsic::va_copy: NumArgs = 1; break; - case LLVMIntrinsic::setjmp: NumArgs = 1; break; - case LLVMIntrinsic::longjmp: NumArgs = 2; break; - case LLVMIntrinsic::sigsetjmp: NumArgs = 2; break; - case LLVMIntrinsic::siglongjmp: NumArgs = 2; break; + case Intrinsic::setjmp: NumArgs = 1; break; + case Intrinsic::longjmp: NumArgs = 2; break; + case Intrinsic::sigsetjmp: NumArgs = 2; break; + case Intrinsic::siglongjmp: NumArgs = 2; break; - case LLVMIntrinsic::alpha_ctlz: NumArgs = 1; break; - case LLVMIntrinsic::alpha_cttz: NumArgs = 1; break; - case LLVMIntrinsic::alpha_ctpop: NumArgs = 1; break; - case LLVMIntrinsic::alpha_umulh: NumArgs = 2; break; - case LLVMIntrinsic::alpha_vecop: NumArgs = 4; break; - case LLVMIntrinsic::alpha_pup: NumArgs = 3; break; - case LLVMIntrinsic::alpha_bytezap: NumArgs = 2; break; - case LLVMIntrinsic::alpha_bytemanip: NumArgs = 3; break; - case LLVMIntrinsic::alpha_dfpbop: NumArgs = 3; break; - case LLVMIntrinsic::alpha_dfpuop: NumArgs = 2; break; - case LLVMIntrinsic::alpha_unordered: NumArgs = 2; break; - case LLVMIntrinsic::alpha_uqtodfp: NumArgs = 2; break; - case LLVMIntrinsic::alpha_uqtosfp: NumArgs = 2; break; - case LLVMIntrinsic::alpha_dfptosq: NumArgs = 2; break; - case LLVMIntrinsic::alpha_sfptosq: NumArgs = 2; break; + case Intrinsic::alpha_ctlz: NumArgs = 1; break; + case Intrinsic::alpha_cttz: NumArgs = 1; break; + case Intrinsic::alpha_ctpop: NumArgs = 1; break; + case Intrinsic::alpha_umulh: NumArgs = 2; break; + case Intrinsic::alpha_vecop: NumArgs = 4; break; + case Intrinsic::alpha_pup: NumArgs = 3; break; + case Intrinsic::alpha_bytezap: NumArgs = 2; break; + case Intrinsic::alpha_bytemanip: NumArgs = 3; break; + case Intrinsic::alpha_dfpbop: NumArgs = 3; break; + case Intrinsic::alpha_dfpuop: NumArgs = 2; break; + case Intrinsic::alpha_unordered: NumArgs = 2; break; + case Intrinsic::alpha_uqtodfp: NumArgs = 2; break; + case Intrinsic::alpha_uqtosfp: NumArgs = 2; break; + case Intrinsic::alpha_dfptosq: NumArgs = 2; break; + case Intrinsic::alpha_sfptosq: NumArgs = 2; break; - case LLVMIntrinsic::not_intrinsic: + case Intrinsic::not_intrinsic: assert(0 && "Invalid intrinsic!"); NumArgs = 0; break; } @@ -548,6 +549,7 @@ "Illegal # arguments for intrinsic function!", IF); } +} // End anonymous namespace //===----------------------------------------------------------------------===// // Implement the public interfaces to this file... @@ -585,3 +587,5 @@ PM.run((Module&)M); return V->Broken; } + +} // End llvm namespace Index: llvm/lib/VMCore/iBranch.cpp diff -u llvm/lib/VMCore/iBranch.cpp:1.9 llvm/lib/VMCore/iBranch.cpp:1.10 --- llvm/lib/VMCore/iBranch.cpp:1.9 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/iBranch.cpp Tue Nov 11 16:41:34 2003 @@ -16,6 +16,8 @@ #include "llvm/BasicBlock.h" #include "llvm/Type.h" +namespace llvm { + BranchInst::BranchInst(BasicBlock *True, BasicBlock *False, Value *Cond, Instruction *InsertBefore) : TerminatorInst(Instruction::Br, InsertBefore) { @@ -49,3 +51,5 @@ Operands.push_back(Use(BI.Operands[2], this)); } } + +} // End llvm namespace Index: llvm/lib/VMCore/iCall.cpp diff -u llvm/lib/VMCore/iCall.cpp:1.20 llvm/lib/VMCore/iCall.cpp:1.21 --- llvm/lib/VMCore/iCall.cpp:1.20 Fri Oct 31 12:38:06 2003 +++ llvm/lib/VMCore/iCall.cpp Tue Nov 11 16:41:34 2003 @@ -17,6 +17,8 @@ #include "llvm/DerivedTypes.h" #include "llvm/Function.h" +namespace llvm { + //===----------------------------------------------------------------------===// // CallInst Implementation //===----------------------------------------------------------------------===// @@ -144,8 +146,12 @@ return 0; } +} // End llvm namespace + #include "llvm/Support/CallSite.h" +namespace llvm { + Function *CallSite::getCalledFunction() const { Value *Callee = getCalledValue(); if (Function *F = dyn_cast(Callee)) @@ -155,3 +161,4 @@ return 0; } +} // End llvm namespace Index: llvm/lib/VMCore/iMemory.cpp diff -u llvm/lib/VMCore/iMemory.cpp:1.32 llvm/lib/VMCore/iMemory.cpp:1.33 --- llvm/lib/VMCore/iMemory.cpp:1.32 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/iMemory.cpp Tue Nov 11 16:41:34 2003 @@ -15,6 +15,8 @@ #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" +using namespace llvm; + AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, const std::string &Name, Instruction *InsertBef) : Instruction(PointerType::get(Ty), iTy, Name, InsertBef) { Index: llvm/lib/VMCore/iOperators.cpp diff -u llvm/lib/VMCore/iOperators.cpp:1.23 llvm/lib/VMCore/iOperators.cpp:1.24 --- llvm/lib/VMCore/iOperators.cpp:1.23 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/iOperators.cpp Tue Nov 11 16:41:34 2003 @@ -16,6 +16,8 @@ #include "llvm/Constants.h" #include "llvm/BasicBlock.h" +namespace llvm { + //===----------------------------------------------------------------------===// // BinaryOperator Class //===----------------------------------------------------------------------===// @@ -194,3 +196,5 @@ case SetLE: return SetGE; } } + +} // End llvm namespace Index: llvm/lib/VMCore/iSwitch.cpp diff -u llvm/lib/VMCore/iSwitch.cpp:1.9 llvm/lib/VMCore/iSwitch.cpp:1.10 --- llvm/lib/VMCore/iSwitch.cpp:1.9 Mon Oct 20 14:43:21 2003 +++ llvm/lib/VMCore/iSwitch.cpp Tue Nov 11 16:41:34 2003 @@ -14,6 +14,8 @@ #include "llvm/iTerminators.h" #include "llvm/BasicBlock.h" +namespace llvm { + SwitchInst::SwitchInst(Value *V, BasicBlock *DefaultDest, Instruction *InsertBefore) : TerminatorInst(Instruction::Switch, InsertBefore) { @@ -48,3 +50,5 @@ assert(idx*2 < Operands.size() && "Successor index out of range!!!"); Operands.erase(Operands.begin()+idx*2, Operands.begin()+(idx+1)*2); } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:42:55 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:55 2003 Subject: [llvm-commits] CVS: llvm/tools/gccas/gccas.cpp Message-ID: <200311112241.QAA20854@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccas: gccas.cpp updated: 1.83 -> 1.84 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+2 -0) Index: llvm/tools/gccas/gccas.cpp diff -u llvm/tools/gccas/gccas.cpp:1.83 llvm/tools/gccas/gccas.cpp:1.84 --- llvm/tools/gccas/gccas.cpp:1.83 Thu Oct 23 13:25:53 2003 +++ llvm/tools/gccas/gccas.cpp Tue Nov 11 16:41:34 2003 @@ -27,6 +27,8 @@ #include #include +using namespace llvm; + namespace { cl::opt InputFilename(cl::Positional,cl::desc(""),cl::init("-")); From gaeke at cs.uiuc.edu Tue Nov 11 16:42:59 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:42:59 2003 Subject: [llvm-commits] CVS: llvm/tools/llc/llc.cpp Message-ID: <200311112241.QAA20876@zion.cs.uiuc.edu> Changes in directory llvm/tools/llc: llc.cpp updated: 1.86 -> 1.87 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+2 -0) Index: llvm/tools/llc/llc.cpp diff -u llvm/tools/llc/llc.cpp:1.86 llvm/tools/llc/llc.cpp:1.87 --- llvm/tools/llc/llc.cpp:1.86 Mon Oct 20 15:40:27 2003 +++ llvm/tools/llc/llc.cpp Tue Nov 11 16:41:34 2003 @@ -23,6 +23,8 @@ #include #include +using namespace llvm; + // General options for llc. Other pass-specific options are specified // within the corresponding llc passes, and target-specific options // and back-end code generation options are specified with the target machine. From gaeke at cs.uiuc.edu Tue Nov 11 16:43:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:03 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp ConstantProp.cpp CorrelatedExprs.cpp DCE.cpp DecomposeMultiDimRefs.cpp GCSE.cpp IndVarSimplify.cpp InstructionCombining.cpp LICM.cpp LoopSimplify.cpp LowerAllocations.cpp LowerInvoke.cpp LowerSwitch.cpp Mem2Reg.cpp PRE.cpp PiNodeInsertion.cpp Reassociate.cpp SCCP.cpp ScalarReplAggregates.cpp SimplifyCFG.cpp SymbolStripping.cpp TailDuplication.cpp TailRecursionElimination.cpp Message-ID: <200311112241.QAA21019@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: ADCE.cpp updated: 1.64 -> 1.65 ConstantProp.cpp updated: 1.42 -> 1.43 CorrelatedExprs.cpp updated: 1.18 -> 1.19 DCE.cpp updated: 1.49 -> 1.50 DecomposeMultiDimRefs.cpp updated: 1.29 -> 1.30 GCSE.cpp updated: 1.31 -> 1.32 IndVarSimplify.cpp updated: 1.41 -> 1.42 InstructionCombining.cpp updated: 1.141 -> 1.142 LICM.cpp updated: 1.40 -> 1.41 LoopSimplify.cpp updated: 1.23 -> 1.24 LowerAllocations.cpp updated: 1.41 -> 1.42 LowerInvoke.cpp updated: 1.2 -> 1.3 LowerSwitch.cpp updated: 1.6 -> 1.7 Mem2Reg.cpp updated: 1.7 -> 1.8 PRE.cpp updated: 1.6 -> 1.7 PiNodeInsertion.cpp updated: 1.13 -> 1.14 Reassociate.cpp updated: 1.28 -> 1.29 SCCP.cpp updated: 1.81 -> 1.82 ScalarReplAggregates.cpp updated: 1.17 -> 1.18 SimplifyCFG.cpp updated: 1.8 -> 1.9 SymbolStripping.cpp updated: 1.22 -> 1.23 TailDuplication.cpp updated: 1.9 -> 1.10 TailRecursionElimination.cpp updated: 1.5 -> 1.6 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+103 -12) Index: llvm/lib/Transforms/Scalar/ADCE.cpp diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.64 llvm/lib/Transforms/Scalar/ADCE.cpp:1.65 --- llvm/lib/Transforms/Scalar/ADCE.cpp:1.64 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/ADCE.cpp Tue Nov 11 16:41:33 2003 @@ -28,6 +28,8 @@ #include "Support/STLExtras.h" #include +namespace llvm { + namespace { Statistic<> NumBlockRemoved("adce", "Number of basic blocks removed"); Statistic<> NumInstRemoved ("adce", "Number of instructions removed"); @@ -456,3 +458,5 @@ return MadeChanges; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/ConstantProp.cpp diff -u llvm/lib/Transforms/Scalar/ConstantProp.cpp:1.42 llvm/lib/Transforms/Scalar/ConstantProp.cpp:1.43 --- llvm/lib/Transforms/Scalar/ConstantProp.cpp:1.42 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/ConstantProp.cpp Tue Nov 11 16:41:33 2003 @@ -27,6 +27,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> NumInstKilled("constprop", "Number of instructions killed"); @@ -73,3 +75,5 @@ } return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.18 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.19 --- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.18 Sun Nov 9 22:10:45 2003 +++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp Tue Nov 11 16:41:33 2003 @@ -42,6 +42,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> NumSetCCRemoved("cee", "Number of setcc instruction eliminated"); Statistic<> NumOperandsCann("cee", "Number of operands canonicalized"); @@ -1314,3 +1316,5 @@ void Relation::dump() const { print(std::cerr); } void ValueInfo::dump() const { print(std::cerr, 0); } void RegionInfo::dump() const { print(std::cerr); } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/DCE.cpp diff -u llvm/lib/Transforms/Scalar/DCE.cpp:1.49 llvm/lib/Transforms/Scalar/DCE.cpp:1.50 --- llvm/lib/Transforms/Scalar/DCE.cpp:1.49 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/DCE.cpp Tue Nov 11 16:41:33 2003 @@ -24,6 +24,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> DIEEliminated("die", "Number of insts removed"); Statistic<> DCEEliminated("dce", "Number of insts removed"); @@ -57,7 +59,6 @@ } - //===----------------------------------------------------------------------===// // DeadCodeElimination pass implementation // @@ -124,3 +125,5 @@ Pass *createDeadCodeEliminationPass() { return new DCE(); } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp diff -u llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp:1.29 llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp:1.30 --- llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp:1.29 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp Tue Nov 11 16:41:33 2003 @@ -25,6 +25,8 @@ #include "llvm/Pass.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumAdded("lowerrefs", "# of getelementptr instructions added"); @@ -36,13 +38,6 @@ RegisterOpt X("lowerrefs", "Decompose multi-dimensional " "structure/array references"); -FunctionPass -*createDecomposeMultiDimRefsPass() -{ - return new DecomposePass(); -} - - // runOnBasicBlock - Entry point for array or structure references with multiple // indices. // @@ -57,6 +52,11 @@ return changed; } +FunctionPass +*createDecomposeMultiDimRefsPass() +{ + return new DecomposePass(); +} // Function: DecomposeArrayRef() // @@ -134,3 +134,5 @@ return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/GCSE.cpp diff -u llvm/lib/Transforms/Scalar/GCSE.cpp:1.31 llvm/lib/Transforms/Scalar/GCSE.cpp:1.32 --- llvm/lib/Transforms/Scalar/GCSE.cpp:1.31 Fri Nov 7 11:20:18 2003 +++ llvm/lib/Transforms/Scalar/GCSE.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> NumInstRemoved("gcse", "Number of instructions removed"); Statistic<> NumLoadRemoved("gcse", "Number of loads removed"); @@ -56,7 +58,6 @@ // createGCSEPass - The public interface to this file... FunctionPass *createGCSEPass() { return new GCSE(); } - // GCSE::runOnFunction - This is the main transformation entry point for a // function. // @@ -269,3 +270,5 @@ return Ret; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.41 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.42 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.41 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Tue Nov 11 16:41:33 2003 @@ -26,6 +26,8 @@ #include "Support/Statistic.h" #include "Support/STLExtras.h" +namespace llvm { + namespace { Statistic<> NumRemoved ("indvars", "Number of aux indvars removed"); Statistic<> NumInserted("indvars", "Number of canonical indvars added"); @@ -217,3 +219,5 @@ Pass *createIndVarSimplifyPass() { return new InductionVariableSimplify(); } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.141 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.142 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.141 Wed Nov 5 11:31:36 2003 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Tue Nov 11 16:41:33 2003 @@ -49,6 +49,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> NumCombined ("instcombine", "Number of insts combined"); Statistic<> NumConstProp("instcombine", "Number of constant folds"); @@ -2196,3 +2198,5 @@ Pass *createInstructionCombiningPass() { return new InstCombiner(); } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/LICM.cpp diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.40 llvm/lib/Transforms/Scalar/LICM.cpp:1.41 --- llvm/lib/Transforms/Scalar/LICM.cpp:1.40 Fri Nov 7 11:20:18 2003 +++ llvm/lib/Transforms/Scalar/LICM.cpp Tue Nov 11 16:41:33 2003 @@ -44,6 +44,8 @@ #include "llvm/Assembly/Writer.h" #include +namespace llvm { + namespace { cl::opt DisablePromotion("disable-licm-promotion", cl::Hidden, @@ -466,3 +468,5 @@ } } } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/LoopSimplify.cpp diff -u llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.23 llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.24 --- llvm/lib/Transforms/Scalar/LoopSimplify.cpp:1.23 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/LoopSimplify.cpp Tue Nov 11 16:41:33 2003 @@ -43,6 +43,8 @@ #include "Support/Statistic.h" #include "Support/DepthFirstIterator.h" +namespace llvm { + namespace { Statistic<> NumInserted("loopsimplify", "Number of pre-header blocks inserted"); @@ -82,7 +84,6 @@ const PassInfo *LoopSimplifyID = X.getPassInfo(); Pass *createLoopSimplifyPass() { return new LoopSimplify(); } - /// runOnFunction - Run down all loops in the CFG (recursively, but we could do /// it in any convenient order) inserting preheaders... /// @@ -566,3 +567,5 @@ } } } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/LowerAllocations.cpp diff -u llvm/lib/Transforms/Scalar/LowerAllocations.cpp:1.41 llvm/lib/Transforms/Scalar/LowerAllocations.cpp:1.42 --- llvm/lib/Transforms/Scalar/LowerAllocations.cpp:1.41 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/LowerAllocations.cpp Tue Nov 11 16:41:33 2003 @@ -22,6 +22,8 @@ #include "llvm/Target/TargetData.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumLowered("lowerallocs", "Number of allocations lowered"); @@ -131,3 +133,5 @@ return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/LowerInvoke.cpp diff -u llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.2 llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.3 --- llvm/lib/Transforms/Scalar/LowerInvoke.cpp:1.2 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/LowerInvoke.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "llvm/Constant.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumLowered("lowerinvoke", "Number of invoke & unwinds replaced"); @@ -37,6 +39,7 @@ X("lowerinvoke", "Lower invoke and unwind, for unwindless code generators"); } +// Public Interface To the LowerInvoke pass. FunctionPass *createLowerInvokePass() { return new LowerInvoke(); } // doInitialization - Make sure that there is a prototype for abort in the @@ -79,3 +82,5 @@ } return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/LowerSwitch.cpp diff -u llvm/lib/Transforms/Scalar/LowerSwitch.cpp:1.6 llvm/lib/Transforms/Scalar/LowerSwitch.cpp:1.7 --- llvm/lib/Transforms/Scalar/LowerSwitch.cpp:1.6 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/LowerSwitch.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "Support/Debug.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumLowered("lowerswitch", "Number of SwitchInst's replaced"); @@ -224,3 +226,5 @@ // We are now done with the switch instruction, delete it. delete SI; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/Mem2Reg.cpp diff -u llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.7 llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.8 --- llvm/lib/Transforms/Scalar/Mem2Reg.cpp:1.7 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/Mem2Reg.cpp Tue Nov 11 16:41:33 2003 @@ -20,6 +20,8 @@ #include "llvm/Target/TargetData.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumPromoted("mem2reg", "Number of alloca's promoted"); @@ -78,3 +80,5 @@ Pass *createPromoteMemoryToRegister() { return new PromotePass(); } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/PRE.cpp diff -u llvm/lib/Transforms/Scalar/PRE.cpp:1.6 llvm/lib/Transforms/Scalar/PRE.cpp:1.7 --- llvm/lib/Transforms/Scalar/PRE.cpp:1.6 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/PRE.cpp Tue Nov 11 16:41:33 2003 @@ -36,10 +36,12 @@ #include "Support/Statistic.h" #include "Support/hash_set" +namespace llvm { + namespace { Statistic<> NumExprsEliminated("pre", "Number of expressions constantified"); Statistic<> NumRedundant ("pre", "Number of redundant exprs eliminated"); - Statistic<> NumInserted ("pre", "Number of expressions inserted"); + static Statistic<> NumInserted ("pre", "Number of expressions inserted"); struct PRE : public FunctionPass { virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -630,3 +632,5 @@ return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp diff -u llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp:1.13 llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp:1.14 --- llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp:1.13 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Scalar/PiNodeInsertion.cpp Tue Nov 11 16:41:33 2003 @@ -42,6 +42,8 @@ #include "llvm/Support/CFG.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumInserted("pinodes", "Number of Pi nodes inserted"); @@ -182,3 +184,5 @@ return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/Reassociate.cpp diff -u llvm/lib/Transforms/Scalar/Reassociate.cpp:1.28 llvm/lib/Transforms/Scalar/Reassociate.cpp:1.29 --- llvm/lib/Transforms/Scalar/Reassociate.cpp:1.28 Fri Nov 7 11:20:18 2003 +++ llvm/lib/Transforms/Scalar/Reassociate.cpp Tue Nov 11 16:41:33 2003 @@ -34,6 +34,8 @@ #include "Support/PostOrderIterator.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumLinear ("reassociate","Number of insts linearized"); Statistic<> NumChanged("reassociate","Number of insts reassociated"); @@ -58,6 +60,7 @@ RegisterOpt X("reassociate", "Reassociate expressions"); } +// Public interface to the Reassociate pass FunctionPass *createReassociatePass() { return new Reassociate(); } void Reassociate::BuildRankMap(Function &F) { @@ -291,3 +294,5 @@ ValueRankMap.clear(); return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/SCCP.cpp diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.81 llvm/lib/Transforms/Scalar/SCCP.cpp:1.82 --- llvm/lib/Transforms/Scalar/SCCP.cpp:1.81 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Scalar/SCCP.cpp Tue Nov 11 16:41:34 2003 @@ -33,6 +33,8 @@ #include #include +namespace llvm { + // InstVal class - This class represents the different lattice values that an // instruction may occupy. It is a simple class with value semantics. // @@ -253,7 +255,6 @@ // createSCCPPass - This is the public interface to this file... -// Pass *createSCCPPass() { return new SCCP(); } @@ -585,3 +586,5 @@ markConstant(&I, ConstantExpr::getGetElementPtr(Ptr, Operands)); } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp diff -u llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.17 llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.18 --- llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp:1.17 Wed Oct 29 11:55:44 2003 +++ llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp Tue Nov 11 16:41:34 2003 @@ -32,6 +32,8 @@ #include "Support/Statistic.h" #include "Support/StringExtras.h" +namespace llvm { + namespace { Statistic<> NumReplaced("scalarrepl", "Number of allocas broken up"); Statistic<> NumPromoted("scalarrepl", "Number of allocas promoted"); @@ -61,6 +63,7 @@ RegisterOpt X("scalarrepl", "Scalar Replacement of Aggregates"); } +// Public interface to the ScalarReplAggregates pass Pass *createScalarReplAggregatesPass() { return new SROA(); } @@ -298,3 +301,5 @@ } return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Scalar/SimplifyCFG.cpp:1.8 llvm/lib/Transforms/Scalar/SimplifyCFG.cpp:1.9 --- llvm/lib/Transforms/Scalar/SimplifyCFG.cpp:1.8 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Scalar/SimplifyCFG.cpp Tue Nov 11 16:41:34 2003 @@ -26,6 +26,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> NumSimpl("cfgsimplify", "Number of blocks simplified"); @@ -35,6 +37,7 @@ RegisterOpt X("simplifycfg", "Simplify the CFG"); } +// Public interface to the CFGSimplification pass FunctionPass *createCFGSimplificationPass() { return new CFGSimplifyPass(); } @@ -100,3 +103,5 @@ return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/SymbolStripping.cpp diff -u llvm/lib/Transforms/Scalar/SymbolStripping.cpp:1.22 llvm/lib/Transforms/Scalar/SymbolStripping.cpp:1.23 --- llvm/lib/Transforms/Scalar/SymbolStripping.cpp:1.22 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Scalar/SymbolStripping.cpp Tue Nov 11 16:41:34 2003 @@ -26,6 +26,8 @@ #include "llvm/SymbolTable.h" #include "llvm/Pass.h" +namespace llvm { + static bool StripSymbolTable(SymbolTable &SymTab) { bool RemovedSymbol = false; @@ -74,3 +76,5 @@ Pass *createFullSymbolStrippingPass() { return new FullSymbolStripping(); } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/TailDuplication.cpp diff -u llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.9 llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.10 --- llvm/lib/Transforms/Scalar/TailDuplication.cpp:1.9 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Scalar/TailDuplication.cpp Tue Nov 11 16:41:34 2003 @@ -31,6 +31,8 @@ #include "Support/Debug.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumEliminated("tailduplicate", "Number of unconditional branches eliminated"); @@ -53,6 +55,7 @@ RegisterOpt X("tailduplicate", "Tail Duplication"); } +// Public interface to the Tail Duplication pass Pass *createTailDuplicationPass() { return new TailDup(); } /// runOnFunction - Top level algorithm - Loop over each unconditional branch in @@ -339,3 +342,5 @@ return GetValueInBlock(BB, OrigVal, ValueMap, OutValueMap); } + +} // End llvm namespace Index: llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp diff -u llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.5 llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.6 --- llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp:1.5 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp Tue Nov 11 16:41:34 2003 @@ -33,6 +33,8 @@ #include "llvm/Pass.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumEliminated("tailcallelim", "Number of tail calls removed"); @@ -42,6 +44,7 @@ RegisterOpt X("tailcallelim", "Tail Call Elimination"); } +// Public interface to the TailCallElimination pass FunctionPass *createTailCallEliminationPass() { return new TailCallElim(); } @@ -105,3 +108,4 @@ return MadeChange; } +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:43:07 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:07 2003 Subject: [llvm-commits] CVS: llvm/projects/ModuleMaker/tools/ModuleMaker/ModuleMaker.cpp Message-ID: <200311112241.QAA20816@zion.cs.uiuc.edu> Changes in directory llvm/projects/ModuleMaker/tools/ModuleMaker: ModuleMaker.cpp updated: 1.1 -> 1.2 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+2 -0) Index: llvm/projects/ModuleMaker/tools/ModuleMaker/ModuleMaker.cpp diff -u llvm/projects/ModuleMaker/tools/ModuleMaker/ModuleMaker.cpp:1.1 llvm/projects/ModuleMaker/tools/ModuleMaker/ModuleMaker.cpp:1.2 --- llvm/projects/ModuleMaker/tools/ModuleMaker/ModuleMaker.cpp:1.1 Thu Aug 21 17:29:52 2003 +++ llvm/projects/ModuleMaker/tools/ModuleMaker/ModuleMaker.cpp Tue Nov 11 16:41:34 2003 @@ -12,6 +12,8 @@ #include "llvm/Instructions.h" #include "llvm/Bytecode/Writer.h" +using namespace llvm; + int main() { // Create the "module" or "program" or "translation unit" to hold the // function From gaeke at cs.uiuc.edu Tue Nov 11 16:43:11 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:11 2003 Subject: [llvm-commits] CVS: llvm/tools/analyze/AnalysisWrappers.cpp GraphPrinters.cpp analyze.cpp Message-ID: <200311112241.QAA20841@zion.cs.uiuc.edu> Changes in directory llvm/tools/analyze: AnalysisWrappers.cpp updated: 1.6 -> 1.7 GraphPrinters.cpp updated: 1.5 -> 1.6 analyze.cpp updated: 1.55 -> 1.56 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+7 -0) Index: llvm/tools/analyze/AnalysisWrappers.cpp diff -u llvm/tools/analyze/AnalysisWrappers.cpp:1.6 llvm/tools/analyze/AnalysisWrappers.cpp:1.7 --- llvm/tools/analyze/AnalysisWrappers.cpp:1.6 Mon Oct 20 12:55:44 2003 +++ llvm/tools/analyze/AnalysisWrappers.cpp Tue Nov 11 16:41:34 2003 @@ -26,6 +26,8 @@ #include "llvm/Analysis/LoopInfo.h" #include "llvm/Support/InstIterator.h" +using namespace llvm; + namespace { struct InstForestHelper : public FunctionPass { Function *F; Index: llvm/tools/analyze/GraphPrinters.cpp diff -u llvm/tools/analyze/GraphPrinters.cpp:1.5 llvm/tools/analyze/GraphPrinters.cpp:1.6 --- llvm/tools/analyze/GraphPrinters.cpp:1.5 Wed Oct 22 11:02:58 2003 +++ llvm/tools/analyze/GraphPrinters.cpp Tue Nov 11 16:41:34 2003 @@ -20,6 +20,8 @@ #include "llvm/Analysis/CallGraph.h" #include +namespace llvm { + template static void WriteGraphToFile(std::ostream &O, const std::string &GraphName, const GraphType >) { @@ -72,3 +74,5 @@ RegisterAnalysis P2("print-callgraph", "Print Call Graph to 'dot' file"); }; + +} // End llvm namespace Index: llvm/tools/analyze/analyze.cpp diff -u llvm/tools/analyze/analyze.cpp:1.55 llvm/tools/analyze/analyze.cpp:1.56 --- llvm/tools/analyze/analyze.cpp:1.55 Mon Oct 20 12:55:44 2003 +++ llvm/tools/analyze/analyze.cpp Tue Nov 11 16:41:34 2003 @@ -26,6 +26,7 @@ #include "Support/Timer.h" #include +using namespace llvm; struct ModulePassPrinter : public Pass { const PassInfo *PassToPrint; From gaeke at cs.uiuc.edu Tue Nov 11 16:43:16 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:16 2003 Subject: [llvm-commits] CVS: llvm/tools/extract/extract.cpp Message-ID: <200311112241.QAA20852@zion.cs.uiuc.edu> Changes in directory llvm/tools/extract: extract.cpp updated: 1.18 -> 1.19 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+2 -0) Index: llvm/tools/extract/extract.cpp diff -u llvm/tools/extract/extract.cpp:1.18 llvm/tools/extract/extract.cpp:1.19 --- llvm/tools/extract/extract.cpp:1.18 Tue Oct 28 16:22:16 2003 +++ llvm/tools/extract/extract.cpp Tue Nov 11 16:41:34 2003 @@ -21,6 +21,8 @@ #include "Support/CommandLine.h" #include +using namespace llvm; + // InputFilename - The filename to read from. static cl::opt InputFilename(cl::Positional, cl::desc(""), From gaeke at cs.uiuc.edu Tue Nov 11 16:43:20 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:20 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-prof/ProfileInfo.cpp ProfileInfo.h llvm-prof.cpp Message-ID: <200311112241.QAA20969@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-prof: ProfileInfo.cpp updated: 1.4 -> 1.5 ProfileInfo.h updated: 1.4 -> 1.5 llvm-prof.cpp updated: 1.15 -> 1.16 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+9 -0) Index: llvm/tools/llvm-prof/ProfileInfo.cpp diff -u llvm/tools/llvm-prof/ProfileInfo.cpp:1.4 llvm/tools/llvm-prof/ProfileInfo.cpp:1.5 --- llvm/tools/llvm-prof/ProfileInfo.cpp:1.4 Wed Oct 29 15:47:44 2003 +++ llvm/tools/llvm-prof/ProfileInfo.cpp Tue Nov 11 16:41:34 2003 @@ -20,6 +20,8 @@ #include #include +using namespace llvm; + enum ProfilingType { ArgumentInfo = 1, // The command line argument block FunctionInfo = 2, // Function profiling information Index: llvm/tools/llvm-prof/ProfileInfo.h diff -u llvm/tools/llvm-prof/ProfileInfo.h:1.4 llvm/tools/llvm-prof/ProfileInfo.h:1.5 --- llvm/tools/llvm-prof/ProfileInfo.h:1.4 Tue Oct 28 16:30:37 2003 +++ llvm/tools/llvm-prof/ProfileInfo.h Tue Nov 11 16:41:34 2003 @@ -18,6 +18,9 @@ #include #include #include + +namespace llvm { + class Module; class Function; class BasicBlock; @@ -54,5 +57,7 @@ // void getBlockCounts(std::vector > &Counts); }; + +} // End llvm namespace #endif Index: llvm/tools/llvm-prof/llvm-prof.cpp diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.15 llvm/tools/llvm-prof/llvm-prof.cpp:1.16 --- llvm/tools/llvm-prof/llvm-prof.cpp:1.15 Thu Nov 6 14:29:25 2003 +++ llvm/tools/llvm-prof/llvm-prof.cpp Tue Nov 11 16:41:34 2003 @@ -23,6 +23,8 @@ #include #include +using namespace llvm; + namespace { cl::opt BytecodeFile(cl::Positional, cl::desc(""), From gaeke at cs.uiuc.edu Tue Nov 11 16:43:24 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:24 2003 Subject: [llvm-commits] CVS: llvm/lib/Support/Annotation.cpp CommandLine.cpp ConstantRange.cpp Debug.cpp DynamicLinker.cpp FileUtilities.cpp LeakDetector.cpp Mangler.cpp PluginLoader.cpp Signals.cpp Statistic.cpp SystemUtils.cpp Timer.cpp ToolRunner.cpp ValueHolder.cpp Message-ID: <200311112241.QAA20593@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: Annotation.cpp updated: 1.11 -> 1.12 CommandLine.cpp updated: 1.40 -> 1.41 ConstantRange.cpp updated: 1.6 -> 1.7 Debug.cpp updated: 1.3 -> 1.4 DynamicLinker.cpp updated: 1.3 -> 1.4 FileUtilities.cpp updated: 1.10 -> 1.11 LeakDetector.cpp updated: 1.4 -> 1.5 Mangler.cpp updated: 1.6 -> 1.7 PluginLoader.cpp updated: 1.6 -> 1.7 Signals.cpp updated: 1.9 -> 1.10 Statistic.cpp updated: 1.11 -> 1.12 SystemUtils.cpp updated: 1.18 -> 1.19 Timer.cpp updated: 1.27 -> 1.28 ToolRunner.cpp updated: 1.10 -> 1.11 ValueHolder.cpp updated: 1.2 -> 1.3 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+62 -2) Index: llvm/lib/Support/Annotation.cpp diff -u llvm/lib/Support/Annotation.cpp:1.11 llvm/lib/Support/Annotation.cpp:1.12 --- llvm/lib/Support/Annotation.cpp:1.11 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/Annotation.cpp Tue Nov 11 16:41:33 2003 @@ -14,6 +14,8 @@ #include #include "Support/Annotation.h" +namespace llvm { + typedef std::map IDMapType; static unsigned IDCounter = 0; // Unique ID counter @@ -94,3 +96,5 @@ if (I == getFactMap().end()) return 0; return I->second.first(ID, Obj, I->second.second); } + +} // End llvm namespace Index: llvm/lib/Support/CommandLine.cpp diff -u llvm/lib/Support/CommandLine.cpp:1.40 llvm/lib/Support/CommandLine.cpp:1.41 --- llvm/lib/Support/CommandLine.cpp:1.40 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/CommandLine.cpp Tue Nov 11 16:41:33 2003 @@ -24,6 +24,8 @@ #include #include +namespace llvm { + using namespace cl; //===----------------------------------------------------------------------===// @@ -887,3 +889,5 @@ cl::location(HiddenPrinter), cl::Hidden, cl::ValueDisallowed); } // End anonymous namespace + +} // End llvm namespace Index: llvm/lib/Support/ConstantRange.cpp diff -u llvm/lib/Support/ConstantRange.cpp:1.6 llvm/lib/Support/ConstantRange.cpp:1.7 --- llvm/lib/Support/ConstantRange.cpp:1.6 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/ConstantRange.cpp Tue Nov 11 16:41:33 2003 @@ -26,6 +26,8 @@ #include "llvm/Instruction.h" #include "llvm/ConstantHandling.h" +namespace llvm { + /// Initialize a full (the default) or empty set for the specified type. /// ConstantRange::ConstantRange(const Type *Ty, bool Full) { @@ -248,3 +250,5 @@ void ConstantRange::dump() const { print(std::cerr); } + +} // End llvm namespace Index: llvm/lib/Support/Debug.cpp diff -u llvm/lib/Support/Debug.cpp:1.3 llvm/lib/Support/Debug.cpp:1.4 --- llvm/lib/Support/Debug.cpp:1.3 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/Debug.cpp Tue Nov 11 16:41:33 2003 @@ -26,6 +26,8 @@ #include "Support/Statistic.h" #include "Support/CommandLine.h" +namespace llvm { + bool DebugFlag; // DebugFlag - Exported boolean set by the -debug option namespace { @@ -62,3 +64,5 @@ return false; #endif } + +} // End llvm namespace Index: llvm/lib/Support/DynamicLinker.cpp diff -u llvm/lib/Support/DynamicLinker.cpp:1.3 llvm/lib/Support/DynamicLinker.cpp:1.4 --- llvm/lib/Support/DynamicLinker.cpp:1.3 Sat Oct 25 11:55:32 2003 +++ llvm/lib/Support/DynamicLinker.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "Config/dlfcn.h" #include +namespace llvm { + bool LinkDynamicObject (const char *filename, std::string *ErrorMessage) { #if defined (HAVE_DLOPEN) if (dlopen (filename, RTLD_NOW | RTLD_GLOBAL) == 0) { @@ -52,3 +54,5 @@ void *GetAddressOfSymbol (const std::string &symbolName) { return GetAddressOfSymbol (symbolName.c_str ()); } + +} // End llvm namespace Index: llvm/lib/Support/FileUtilities.cpp diff -u llvm/lib/Support/FileUtilities.cpp:1.10 llvm/lib/Support/FileUtilities.cpp:1.11 --- llvm/lib/Support/FileUtilities.cpp:1.10 Tue Nov 11 15:53:50 2003 +++ llvm/lib/Support/FileUtilities.cpp Tue Nov 11 16:41:33 2003 @@ -20,6 +20,9 @@ #include #include +namespace llvm +{ + /// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must /// name a readable file. /// @@ -182,3 +185,5 @@ bool MakeFileReadable (const std::string &Filename) { return AddPermissionsBits (Filename, 0444); } + +} // End llvm namespace Index: llvm/lib/Support/LeakDetector.cpp diff -u llvm/lib/Support/LeakDetector.cpp:1.4 llvm/lib/Support/LeakDetector.cpp:1.5 --- llvm/lib/Support/LeakDetector.cpp:1.4 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/LeakDetector.cpp Tue Nov 11 16:41:33 2003 @@ -15,6 +15,8 @@ #include "llvm/Value.h" #include +namespace llvm { + // Lazily allocate set so that release build doesn't have to do anything. static std::set *Objects = 0; static std::set *LLVMObjects = 0; @@ -87,3 +89,5 @@ Objects = 0; LLVMObjects = 0; } } + +} // End llvm namespace Index: llvm/lib/Support/Mangler.cpp diff -u llvm/lib/Support/Mangler.cpp:1.6 llvm/lib/Support/Mangler.cpp:1.7 --- llvm/lib/Support/Mangler.cpp:1.6 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/Mangler.cpp Tue Nov 11 16:41:33 2003 @@ -16,6 +16,8 @@ #include "llvm/Type.h" #include "Support/StringExtras.h" +namespace llvm { + static char HexDigit(int V) { return V < 10 ? V+'0' : V+'A'-10; } @@ -99,3 +101,4 @@ FoundNames.insert(I->getName()); // Otherwise, keep track of name } +} // End llvm namespace Index: llvm/lib/Support/PluginLoader.cpp diff -u llvm/lib/Support/PluginLoader.cpp:1.6 llvm/lib/Support/PluginLoader.cpp:1.7 --- llvm/lib/Support/PluginLoader.cpp:1.6 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/PluginLoader.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "Config/link.h" #include +namespace llvm { + namespace { struct PluginLoader { void operator=(const std::string &Filename) { @@ -38,3 +40,5 @@ static cl::opt > LoadOpt("load", cl::ZeroOrMore, cl::value_desc("plugin.so"), cl::desc("Load the specified plugin")); + +} // End llvm namespace Index: llvm/lib/Support/Signals.cpp diff -u llvm/lib/Support/Signals.cpp:1.9 llvm/lib/Support/Signals.cpp:1.10 --- llvm/lib/Support/Signals.cpp:1.9 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/Signals.cpp Tue Nov 11 16:41:33 2003 @@ -20,6 +20,8 @@ #include #include "Config/config.h" // Get the signal handler return type +namespace llvm { + static std::vector FilesToRemove; // IntSigs - Signals that may interrupt the program at any time. @@ -62,3 +64,5 @@ std::for_each(IntSigs, IntSigsEnd, RegisterHandler); std::for_each(KillSigs, KillSigsEnd, RegisterHandler); } + +} // End llvm namespace Index: llvm/lib/Support/Statistic.cpp diff -u llvm/lib/Support/Statistic.cpp:1.11 llvm/lib/Support/Statistic.cpp:1.12 --- llvm/lib/Support/Statistic.cpp:1.11 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/Statistic.cpp Tue Nov 11 16:41:33 2003 @@ -27,8 +27,10 @@ #include #include +namespace llvm { + // GetLibSupportInfoOutputFile - Return a file stream to print our output on... -std::ostream *GetLibSupportInfoOutputFile(); +extern std::ostream *GetLibSupportInfoOutputFile(); unsigned StatisticBase::NumStats = 0; @@ -104,3 +106,5 @@ delete OutStream; // Close the file... } } + +} // End llvm namespace Index: llvm/lib/Support/SystemUtils.cpp diff -u llvm/lib/Support/SystemUtils.cpp:1.18 llvm/lib/Support/SystemUtils.cpp:1.19 --- llvm/lib/Support/SystemUtils.cpp:1.18 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/SystemUtils.cpp Tue Nov 11 16:41:33 2003 @@ -24,6 +24,8 @@ #include "Config/unistd.h" #include "Config/errno.h" +namespace llvm { + /// isExecutableFile - This function returns true if the filename specified /// exists and is executable. /// @@ -272,3 +274,4 @@ return 1; } +} // End llvm namespace Index: llvm/lib/Support/Timer.cpp diff -u llvm/lib/Support/Timer.cpp:1.27 llvm/lib/Support/Timer.cpp:1.28 --- llvm/lib/Support/Timer.cpp:1.27 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/Timer.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include #include +namespace llvm { + // getLibSupportInfoOutputFilename - This ugly hack is brought to you courtesy // of constructor/destructor ordering being unspecified by C++. Basically the // problem is that a Statistic<> object gets destroyed, which ends up calling @@ -265,7 +267,8 @@ } // GetLibSupportInfoOutputFile - Return a file stream to print our output on... -std::ostream *GetLibSupportInfoOutputFile() { +std::ostream * +GetLibSupportInfoOutputFile() { std::string &LibSupportInfoOutputFilename = getLibSupportInfoOutputFilename(); if (LibSupportInfoOutputFilename.empty()) return &std::cerr; @@ -349,3 +352,5 @@ DefaultTimerGroup = 0; } } + +} // End llvm namespace Index: llvm/lib/Support/ToolRunner.cpp diff -u llvm/lib/Support/ToolRunner.cpp:1.10 llvm/lib/Support/ToolRunner.cpp:1.11 --- llvm/lib/Support/ToolRunner.cpp:1.10 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/ToolRunner.cpp Tue Nov 11 16:41:33 2003 @@ -18,6 +18,8 @@ #include #include +namespace llvm { + //===---------------------------------------------------------------------===// // LLI Implementation of AbstractIntepreter interface // @@ -391,3 +393,5 @@ Message = "Found gcc: " + GCCPath + "\n"; return new GCC(GCCPath); } + +} // End llvm namespace Index: llvm/lib/Support/ValueHolder.cpp diff -u llvm/lib/Support/ValueHolder.cpp:1.2 llvm/lib/Support/ValueHolder.cpp:1.3 --- llvm/lib/Support/ValueHolder.cpp:1.2 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Support/ValueHolder.cpp Tue Nov 11 16:41:33 2003 @@ -18,6 +18,10 @@ #include "llvm/Support/ValueHolder.h" #include "llvm/Type.h" +namespace llvm { + ValueHolder::ValueHolder(Value *V) : User(Type::TypeTy, Value::TypeVal) { Operands.push_back(Use(V, this)); } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:43:29 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:29 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-ar/llvm-ar.cpp Message-ID: <200311112241.QAA20909@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-ar: llvm-ar.cpp updated: 1.7 -> 1.8 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+4 -2) Index: llvm/tools/llvm-ar/llvm-ar.cpp diff -u llvm/tools/llvm-ar/llvm-ar.cpp:1.7 llvm/tools/llvm-ar/llvm-ar.cpp:1.8 --- llvm/tools/llvm-ar/llvm-ar.cpp:1.7 Mon Oct 20 15:40:30 2003 +++ llvm/tools/llvm-ar/llvm-ar.cpp Tue Nov 11 16:41:34 2003 @@ -25,6 +25,8 @@ #include #include +using namespace llvm; + using std::string; using std::vector; using std::cout; @@ -69,7 +71,7 @@ //Option to generate symbol table or not //running llvm-ar -s is the same as ranlib -cl::opt SymbolTable ("s", cl::desc("Generate an archive symbol table")); +cl::opt SymbolTableOption ("s", cl::desc("Generate an archive symbol table")); //Archive name cl::opt Archive (cl::Positional, cl::desc(""), @@ -335,7 +337,7 @@ ArchiveFile << ARMAG; //If the '-s' option was specified, generate symbol table. - if(SymbolTable) { + if(SymbolTableOption) { cout << "Symbol Table Start: " << ArchiveFile.tellp() << "\n"; if(!WriteSymbolTable(ArchiveFile)) { std::cerr << "Error creating symbol table. Exiting program."; From gaeke at cs.uiuc.edu Tue Nov 11 16:43:33 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:33 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp EmitFunctions.cpp TraceValues.cpp Message-ID: <200311112241.QAA20683@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: BlockProfiling.cpp updated: 1.3 -> 1.4 EmitFunctions.cpp updated: 1.13 -> 1.14 TraceValues.cpp updated: 1.64 -> 1.65 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+12 -0) Index: llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp diff -u llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.3 llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.4 --- llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp:1.3 Wed Oct 29 15:24:22 2003 +++ llvm/lib/Transforms/Instrumentation/BlockProfiling.cpp Tue Nov 11 16:41:33 2003 @@ -25,6 +25,8 @@ #include "llvm/Module.h" #include "llvm/Pass.h" +namespace llvm { + static void insertInitializationCall(Function *MainFn, const char *FnName, GlobalValue *Array) { const Type *ArgVTy = PointerType::get(PointerType::get(Type::SByteTy)); @@ -181,3 +183,5 @@ insertInitializationCall(Main, "llvm_start_block_profiling", Counters); return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp diff -u llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.13 llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.14 --- llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp:1.13 Mon Oct 20 14:43:19 2003 +++ llvm/lib/Transforms/Instrumentation/EmitFunctions.cpp Tue Nov 11 16:41:33 2003 @@ -17,6 +17,8 @@ #include "llvm/Pass.h" #include "llvm/Support/CFG.h" +namespace llvm { + enum Color{ WHITE, GREY, @@ -104,3 +106,5 @@ M.getGlobalList().push_back(fnCount); return true; // Always modifies program } + +} // End llvm namespace Index: llvm/lib/Transforms/Instrumentation/TraceValues.cpp diff -u llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.64 llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.65 --- llvm/lib/Transforms/Instrumentation/TraceValues.cpp:1.64 Mon Oct 27 15:44:09 2003 +++ llvm/lib/Transforms/Instrumentation/TraceValues.cpp Tue Nov 11 16:41:33 2003 @@ -26,6 +26,8 @@ #include #include +namespace llvm { + static cl::opt DisablePtrHashing("tracedisablehashdisable", cl::Hidden, cl::desc("Disable pointer hashing in the -trace or -tracem " @@ -433,3 +435,5 @@ return true; } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:43:38 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:38 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp BreakCriticalEdges.cpp CloneFunction.cpp CloneModule.cpp CloneTrace.cpp DemoteRegToStack.cpp InlineFunction.cpp Linker.cpp Local.cpp PromoteMemoryToRegister.cpp SimplifyCFG.cpp UnifyFunctionExitNodes.cpp ValueMapper.cpp ValueMapper.h Message-ID: <200311112241.QAA20952@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: BasicBlockUtils.cpp updated: 1.8 -> 1.9 BreakCriticalEdges.cpp updated: 1.14 -> 1.15 CloneFunction.cpp updated: 1.17 -> 1.18 CloneModule.cpp updated: 1.7 -> 1.8 CloneTrace.cpp updated: 1.3 -> 1.4 DemoteRegToStack.cpp updated: 1.6 -> 1.7 InlineFunction.cpp updated: 1.15 -> 1.16 Linker.cpp updated: 1.62 -> 1.63 Local.cpp updated: 1.11 -> 1.12 PromoteMemoryToRegister.cpp updated: 1.56 -> 1.57 SimplifyCFG.cpp updated: 1.17 -> 1.18 UnifyFunctionExitNodes.cpp updated: 1.26 -> 1.27 ValueMapper.cpp updated: 1.7 -> 1.8 ValueMapper.h updated: 1.2 -> 1.3 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+55 -0) Index: llvm/lib/Transforms/Utils/BasicBlockUtils.cpp diff -u llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:1.8 llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:1.9 --- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp:1.8 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Utils/BasicBlockUtils.cpp Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "llvm/Type.h" #include +namespace llvm { + // ReplaceInstWithValue - Replace all uses of an instruction (specified by BI) // with a value, then remove and delete the original instruction. // @@ -112,3 +114,5 @@ if (NewTI) // If it's a different instruction, replace. ReplaceInstWithInst(TI, NewTI); } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp diff -u llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.14 llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.15 --- llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp:1.14 Sun Nov 9 22:42:42 2003 +++ llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp Tue Nov 11 16:41:34 2003 @@ -25,6 +25,8 @@ #include "llvm/Support/CFG.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumBroken("break-crit-edges", "Number of blocks inserted"); @@ -168,3 +170,5 @@ } return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/CloneFunction.cpp diff -u llvm/lib/Transforms/Utils/CloneFunction.cpp:1.17 llvm/lib/Transforms/Utils/CloneFunction.cpp:1.18 --- llvm/lib/Transforms/Utils/CloneFunction.cpp:1.17 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Utils/CloneFunction.cpp Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "llvm/Function.h" #include "ValueMapper.h" +namespace llvm { + // RemapInstruction - Convert the instruction operands from referencing the // current values into those specified by ValueMap. // @@ -140,3 +142,5 @@ CloneFunctionInto(NewF, F, ValueMap, Returns); return NewF; } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/CloneModule.cpp diff -u llvm/lib/Transforms/Utils/CloneModule.cpp:1.7 llvm/lib/Transforms/Utils/CloneModule.cpp:1.8 --- llvm/lib/Transforms/Utils/CloneModule.cpp:1.7 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Utils/CloneModule.cpp Tue Nov 11 16:41:34 2003 @@ -19,6 +19,8 @@ #include "llvm/Constant.h" #include "ValueMapper.h" +namespace llvm { + /// CloneModule - Return an exact copy of the specified module. This is not as /// easy as it might seem because we have to worry about making copies of global /// variables and functions, and making their (initializers and references, @@ -88,3 +90,5 @@ return New; } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/CloneTrace.cpp diff -u llvm/lib/Transforms/Utils/CloneTrace.cpp:1.3 llvm/lib/Transforms/Utils/CloneTrace.cpp:1.4 --- llvm/lib/Transforms/Utils/CloneTrace.cpp:1.3 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Utils/CloneTrace.cpp Tue Nov 11 16:41:34 2003 @@ -20,6 +20,8 @@ #include "llvm/Function.h" +namespace llvm { + //Clones the trace (a vector of basic blocks) std::vector CloneTrace(const std::vector &origTrace) { @@ -86,3 +88,5 @@ //return new vector of basic blocks return clonedTrace; } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/DemoteRegToStack.cpp diff -u llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:1.6 llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:1.7 --- llvm/lib/Transforms/Utils/DemoteRegToStack.cpp:1.6 Thu Nov 6 13:46:29 2003 +++ llvm/lib/Transforms/Utils/DemoteRegToStack.cpp Tue Nov 11 16:41:34 2003 @@ -22,6 +22,8 @@ #include "llvm/Type.h" #include "Support/hash_set" +namespace llvm { + typedef hash_set PhiSet; typedef hash_set::iterator PhiSetIterator; @@ -160,3 +162,5 @@ return XSlot; } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/InlineFunction.cpp diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.15 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.16 --- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.15 Sun Oct 26 23:33:09 2003 +++ llvm/lib/Transforms/Utils/InlineFunction.cpp Tue Nov 11 16:41:34 2003 @@ -24,6 +24,8 @@ #include "llvm/Support/CallSite.h" #include "llvm/Transforms/Utils/Local.h" +namespace llvm { + bool InlineFunction(CallInst *CI) { return InlineFunction(CallSite(CI)); } bool InlineFunction(InvokeInst *II) { return InlineFunction(CallSite(II)); } @@ -278,3 +280,5 @@ SimplifyCFG(AfterCallBB); return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/Linker.cpp diff -u llvm/lib/Transforms/Utils/Linker.cpp:1.62 llvm/lib/Transforms/Utils/Linker.cpp:1.63 --- llvm/lib/Transforms/Utils/Linker.cpp:1.62 Wed Nov 5 14:37:01 2003 +++ llvm/lib/Transforms/Utils/Linker.cpp Tue Nov 11 16:41:34 2003 @@ -23,6 +23,8 @@ #include "llvm/iOther.h" #include "llvm/Constants.h" +namespace llvm { + // Error - Simple wrapper function to conditionally assign to E and return true. // This just makes error return conditions a little bit simpler... // @@ -902,3 +904,4 @@ return false; } +} // End llvm namespace Index: llvm/lib/Transforms/Utils/Local.cpp diff -u llvm/lib/Transforms/Utils/Local.cpp:1.11 llvm/lib/Transforms/Utils/Local.cpp:1.12 --- llvm/lib/Transforms/Utils/Local.cpp:1.11 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Utils/Local.cpp Tue Nov 11 16:41:34 2003 @@ -17,6 +17,8 @@ #include "llvm/iOperators.h" #include "llvm/ConstantHandling.h" +namespace llvm { + //===----------------------------------------------------------------------===// // Local constant propagation... // @@ -180,3 +182,5 @@ } return false; } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp diff -u llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.56 llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.57 --- llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp:1.56 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp Tue Nov 11 16:41:34 2003 @@ -25,6 +25,8 @@ #include "llvm/Support/CFG.h" #include "Support/StringExtras.h" +namespace llvm { + /// isAllocaPromotable - Return true if this alloca is legal for promotion. /// This is true if there are only loads and stores to the alloca... /// @@ -459,3 +461,5 @@ if (Allocas.empty()) return; PromoteMem2Reg(Allocas, DT, DF, TD).run(); } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.17 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.18 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.17 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Tue Nov 11 16:41:34 2003 @@ -21,6 +21,8 @@ #include #include +namespace llvm { + // PropagatePredecessors - This gets "Succ" ready to have the predecessors from // "BB". This is a little tricky because "Succ" has PHI nodes, which need to // have extra slots added to them to hold the merge edges from BB's @@ -298,3 +300,5 @@ return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp diff -u llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp:1.26 llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp:1.27 --- llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp:1.26 Mon Oct 20 14:43:20 2003 +++ llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp Tue Nov 11 16:41:34 2003 @@ -22,6 +22,8 @@ #include "llvm/iPHINode.h" #include "llvm/Type.h" +namespace llvm { + static RegisterOpt X("mergereturn", "Unify function exit nodes"); @@ -112,3 +114,5 @@ ReturnBlock = NewRetBlock; return true; } + +} // End llvm namespace Index: llvm/lib/Transforms/Utils/ValueMapper.cpp diff -u llvm/lib/Transforms/Utils/ValueMapper.cpp:1.7 llvm/lib/Transforms/Utils/ValueMapper.cpp:1.8 --- llvm/lib/Transforms/Utils/ValueMapper.cpp:1.7 Wed Nov 5 14:43:58 2003 +++ llvm/lib/Transforms/Utils/ValueMapper.cpp Tue Nov 11 16:41:34 2003 @@ -16,6 +16,8 @@ #include "llvm/Constants.h" #include "llvm/Instruction.h" +namespace llvm { + Value *MapValue(const Value *V, std::map &VM) { Value *&VMSlot = VM[V]; if (VMSlot) return VMSlot; // Does it exist in the map yet? @@ -105,3 +107,4 @@ return 0; } +} // End llvm namespace Index: llvm/lib/Transforms/Utils/ValueMapper.h diff -u llvm/lib/Transforms/Utils/ValueMapper.h:1.2 llvm/lib/Transforms/Utils/ValueMapper.h:1.3 --- llvm/lib/Transforms/Utils/ValueMapper.h:1.2 Tue Oct 21 10:17:13 2003 +++ llvm/lib/Transforms/Utils/ValueMapper.h Tue Nov 11 16:41:34 2003 @@ -16,8 +16,13 @@ #define LIB_TRANSFORMS_UTILS_VALUE_MAPPER_H #include + +namespace llvm { + class Value; Value *MapValue(const Value *V, std::map &VM); + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:43:42 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:42 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/RegAlloc/AllocInfo.h IGNode.cpp IGNode.h InterferenceGraph.cpp InterferenceGraph.h LiveRange.h LiveRangeInfo.cpp LiveRangeInfo.h PhyRegAlloc.cpp PhyRegAlloc.h RegAllocCommon.h RegClass.cpp RegClass.h Message-ID: <200311112241.QAA20545@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/RegAlloc: AllocInfo.h updated: 1.4 -> 1.5 IGNode.cpp updated: 1.11 -> 1.12 IGNode.h updated: 1.19 -> 1.20 InterferenceGraph.cpp updated: 1.18 -> 1.19 InterferenceGraph.h updated: 1.6 -> 1.7 LiveRange.h updated: 1.24 -> 1.25 LiveRangeInfo.cpp updated: 1.46 -> 1.47 LiveRangeInfo.h updated: 1.22 -> 1.23 PhyRegAlloc.cpp updated: 1.129 -> 1.130 PhyRegAlloc.h updated: 1.61 -> 1.62 RegAllocCommon.h updated: 1.11 -> 1.12 RegClass.cpp updated: 1.27 -> 1.28 RegClass.h updated: 1.20 -> 1.21 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+54 -1) Index: llvm/lib/CodeGen/RegAlloc/AllocInfo.h diff -u llvm/lib/CodeGen/RegAlloc/AllocInfo.h:1.4 llvm/lib/CodeGen/RegAlloc/AllocInfo.h:1.5 --- llvm/lib/CodeGen/RegAlloc/AllocInfo.h:1.4 Sun Nov 9 18:05:25 2003 +++ llvm/lib/CodeGen/RegAlloc/AllocInfo.h Tue Nov 11 16:41:33 2003 @@ -19,6 +19,8 @@ #include "llvm/DerivedTypes.h" #include "llvm/Constants.h" +namespace llvm { + /// 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. @@ -76,5 +78,7 @@ return std::string (AllocStateNames[AllocState]); } }; + +} // End llvm namespace #endif // ALLOCINFO_H Index: llvm/lib/CodeGen/RegAlloc/IGNode.cpp diff -u llvm/lib/CodeGen/RegAlloc/IGNode.cpp:1.11 llvm/lib/CodeGen/RegAlloc/IGNode.cpp:1.12 --- llvm/lib/CodeGen/RegAlloc/IGNode.cpp:1.11 Thu Oct 23 13:02:47 2003 +++ llvm/lib/CodeGen/RegAlloc/IGNode.cpp Tue Nov 11 16:41:33 2003 @@ -16,6 +16,8 @@ #include #include +namespace llvm { + //----------------------------------------------------------------------------- // Sets this IGNode on stack and reduce the degree of neighbors //----------------------------------------------------------------------------- @@ -56,3 +58,5 @@ std::vector::iterator new_end = unique(nbrs.begin(), nbrs.end()); return new_end - nbrs.begin(); } + +} // End llvm namespace Index: llvm/lib/CodeGen/RegAlloc/IGNode.h diff -u llvm/lib/CodeGen/RegAlloc/IGNode.h:1.19 llvm/lib/CodeGen/RegAlloc/IGNode.h:1.20 --- llvm/lib/CodeGen/RegAlloc/IGNode.h:1.19 Thu Oct 23 13:02:47 2003 +++ llvm/lib/CodeGen/RegAlloc/IGNode.h Tue Nov 11 16:41:33 2003 @@ -32,6 +32,9 @@ #include "LiveRange.h" #include + +namespace llvm { + class RegClass; //---------------------------------------------------------------------------- @@ -114,5 +117,7 @@ inline LiveRange *getParentLR() const { return ParentLR; } }; + +} // End llvm namespace #endif Index: llvm/lib/CodeGen/RegAlloc/InterferenceGraph.cpp diff -u llvm/lib/CodeGen/RegAlloc/InterferenceGraph.cpp:1.18 llvm/lib/CodeGen/RegAlloc/InterferenceGraph.cpp:1.19 --- llvm/lib/CodeGen/RegAlloc/InterferenceGraph.cpp:1.18 Thu Oct 23 13:10:02 2003 +++ llvm/lib/CodeGen/RegAlloc/InterferenceGraph.cpp Tue Nov 11 16:41:33 2003 @@ -17,6 +17,8 @@ #include "Support/STLExtras.h" #include +namespace llvm { + // for asserting this IG node is infact in the IGNodeList of this class inline static void assertIGNode(const InterferenceGraph *IG, const IGNode *Node) { @@ -246,3 +248,5 @@ } } } + +} // End llvm namespace Index: llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h diff -u llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h:1.6 llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h:1.7 --- llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h:1.6 Tue Oct 21 10:24:53 2003 +++ llvm/lib/CodeGen/RegAlloc/InterferenceGraph.h Tue Nov 11 16:41:33 2003 @@ -30,6 +30,9 @@ #define INTERFERENCEGRAPH_H #include + +namespace llvm { + class LiveRange; class RegClass; class IGNode; @@ -66,5 +69,7 @@ void printIG() const; void printIGNodeList() const; }; + +} // End llvm namespace #endif Index: llvm/lib/CodeGen/RegAlloc/LiveRange.h diff -u llvm/lib/CodeGen/RegAlloc/LiveRange.h:1.24 llvm/lib/CodeGen/RegAlloc/LiveRange.h:1.25 --- llvm/lib/CodeGen/RegAlloc/LiveRange.h:1.24 Thu Oct 23 13:03:49 2003 +++ llvm/lib/CodeGen/RegAlloc/LiveRange.h Tue Nov 11 16:41:33 2003 @@ -21,6 +21,8 @@ #include "llvm/Value.h" #include "llvm/CodeGen/ValueSet.h" +namespace llvm { + class RegClass; class IGNode; @@ -176,5 +178,7 @@ return SpillCost; } }; + +} // End llvm namespace #endif Index: llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp diff -u llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp:1.46 llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp:1.47 --- llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp:1.46 Thu Oct 23 13:03:50 2003 +++ llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "llvm/Target/TargetRegInfo.h" #include "Support/SetOperations.h" +namespace llvm { + unsigned LiveRange::getRegClassID() const { return getRegClass()->getID(); } LiveRangeInfo::LiveRangeInfo(const Function *F, const TargetMachine &tm, @@ -411,3 +413,5 @@ } } } + +} // End llvm namespace Index: llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h diff -u llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h:1.22 llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h:1.23 --- llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h:1.22 Thu Oct 23 13:03:50 2003 +++ llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h Tue Nov 11 16:41:33 2003 @@ -29,6 +29,8 @@ #include "llvm/CodeGen/ValueSet.h" #include "Support/hash_map" +namespace llvm { + class LiveRange; class MachineInstr; class RegClass; @@ -120,5 +122,7 @@ /// void printLiveRanges(); }; + +} // End llvm namespace #endif Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.129 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.130 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp:1.129 Mon Nov 10 01:12:01 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp Tue Nov 11 16:41:33 2003 @@ -47,6 +47,8 @@ #include "Support/STLExtras.h" #include +namespace llvm { + RegAllocDebugLevel_t DEBUG_RA; /// The reoptimizer wants to be able to grovel through the register @@ -1392,3 +1394,5 @@ if (DEBUG_RA) std::cerr << "\nRegister allocation complete!\n"; return false; // Function was not modified } + +} // End llvm namespace Index: llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h diff -u llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.61 llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.62 --- llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h:1.61 Sun Nov 9 18:05:26 2003 +++ llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h Tue Nov 11 16:41:33 2003 @@ -31,6 +31,8 @@ #include "llvm/Target/TargetRegInfo.h" #include +namespace llvm { + class MachineFunction; class FunctionLiveVarInfo; class MachineInstr; @@ -178,5 +180,7 @@ void addInterf4PseudoInstr(const MachineInstr *MI); }; + +} // End llvm namespace #endif Index: llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h diff -u llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h:1.11 llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h:1.12 --- llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h:1.11 Tue Oct 21 10:17:13 2003 +++ llvm/lib/CodeGen/RegAlloc/RegAllocCommon.h Tue Nov 11 16:41:33 2003 @@ -14,6 +14,8 @@ #ifndef REGALLOCCOMMON_H #define REGALLOCCOMMON_H +namespace llvm { + enum RegAllocDebugLevel_t { RA_DEBUG_None = 0, RA_DEBUG_Results = 1, @@ -24,5 +26,7 @@ }; extern RegAllocDebugLevel_t DEBUG_RA; + +} // End llvm namespace #endif Index: llvm/lib/CodeGen/RegAlloc/RegClass.cpp diff -u llvm/lib/CodeGen/RegAlloc/RegClass.cpp:1.27 llvm/lib/CodeGen/RegAlloc/RegClass.cpp:1.28 --- llvm/lib/CodeGen/RegAlloc/RegClass.cpp:1.27 Thu Oct 23 13:10:02 2003 +++ llvm/lib/CodeGen/RegAlloc/RegClass.cpp Tue Nov 11 16:41:33 2003 @@ -16,6 +16,8 @@ #include "RegClass.h" #include "llvm/Target/TargetRegInfo.h" +namespace llvm { + //---------------------------------------------------------------------------- // This constructor inits IG. The actual matrix is created by a call to // createInterferenceGraph() above. @@ -245,4 +247,4 @@ IG.printIG(); } - +} // End llvm namespace Index: llvm/lib/CodeGen/RegAlloc/RegClass.h diff -u llvm/lib/CodeGen/RegAlloc/RegClass.h:1.20 llvm/lib/CodeGen/RegAlloc/RegClass.h:1.21 --- llvm/lib/CodeGen/RegAlloc/RegClass.h:1.20 Tue Oct 21 10:24:53 2003 +++ llvm/lib/CodeGen/RegAlloc/RegClass.h Tue Nov 11 16:41:33 2003 @@ -20,6 +20,9 @@ #include "llvm/Target/TargetRegInfo.h" #include "InterferenceGraph.h" #include + +namespace llvm { + class TargetRegClassInfo; @@ -138,5 +141,7 @@ void printIGNodeList() const; void printIG(); }; + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:43:47 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:47 2003 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/Emitter.cpp Intercept.cpp JIT.cpp VM.cpp VM.h Message-ID: <200311112241.QAA20538@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/JIT: Emitter.cpp updated: 1.31 -> 1.32 Intercept.cpp updated: 1.9 -> 1.10 JIT.cpp updated: 1.24 -> 1.25 VM.cpp updated: 1.12 -> 1.13 VM.h updated: 1.16 -> 1.17 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+20 -0) Index: llvm/lib/ExecutionEngine/JIT/Emitter.cpp diff -u llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.31 llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.32 --- llvm/lib/ExecutionEngine/JIT/Emitter.cpp:1.31 Mon Oct 20 14:43:16 2003 +++ llvm/lib/ExecutionEngine/JIT/Emitter.cpp Tue Nov 11 16:41:33 2003 @@ -27,6 +27,8 @@ #include "Config/unistd.h" #include "Config/sys/mman.h" +namespace llvm { + namespace { Statistic<> NumBytes("jit", "Number of bytes of machine code compiled"); VM *TheVM = 0; @@ -265,3 +267,5 @@ return TheVM->getPointerToNamedFunction(Name); } } + +} // End llvm namespace Index: llvm/lib/ExecutionEngine/JIT/Intercept.cpp diff -u llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.9 llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.10 --- llvm/lib/ExecutionEngine/JIT/Intercept.cpp:1.9 Mon Oct 20 14:43:16 2003 +++ llvm/lib/ExecutionEngine/JIT/Intercept.cpp Tue Nov 11 16:41:33 2003 @@ -19,6 +19,8 @@ #include "Support/DynamicLinker.h" #include +namespace llvm { + // AtExitHandlers - List of functions to call when the program exits, // registered with the atexit() library function. static std::vector AtExitHandlers; @@ -75,3 +77,5 @@ return Ptr; } + +} // End llvm namespace Index: llvm/lib/ExecutionEngine/JIT/JIT.cpp diff -u llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.24 llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.25 --- llvm/lib/ExecutionEngine/JIT/JIT.cpp:1.24 Sat Nov 8 21:15:40 2003 +++ llvm/lib/ExecutionEngine/JIT/JIT.cpp Tue Nov 11 16:41:33 2003 @@ -24,6 +24,8 @@ #define NO_JITS_ENABLED #endif +namespace llvm { + namespace { enum ArchName { x86, Sparc }; @@ -118,3 +120,5 @@ rv.IntVal = ExitCode; return rv; } + +} // End llvm namespace Index: llvm/lib/ExecutionEngine/JIT/VM.cpp diff -u llvm/lib/ExecutionEngine/JIT/VM.cpp:1.12 llvm/lib/ExecutionEngine/JIT/VM.cpp:1.13 --- llvm/lib/ExecutionEngine/JIT/VM.cpp:1.12 Thu Oct 23 22:55:37 2003 +++ llvm/lib/ExecutionEngine/JIT/VM.cpp Tue Nov 11 16:41:33 2003 @@ -19,6 +19,8 @@ #include "llvm/CodeGen/MachineCodeEmitter.h" #include "llvm/Target/TargetMachine.h" +namespace llvm { + VM::~VM() { delete MCE; delete &TM; @@ -98,3 +100,5 @@ TM.replaceMachineCodeForFunction (OldAddr, Addr); return Addr; } + +} // End llvm namespace Index: llvm/lib/ExecutionEngine/JIT/VM.h diff -u llvm/lib/ExecutionEngine/JIT/VM.h:1.16 llvm/lib/ExecutionEngine/JIT/VM.h:1.17 --- llvm/lib/ExecutionEngine/JIT/VM.h:1.16 Tue Oct 21 10:17:13 2003 +++ llvm/lib/ExecutionEngine/JIT/VM.h Tue Nov 11 16:41:33 2003 @@ -18,6 +18,8 @@ #include "llvm/PassManager.h" #include +namespace llvm { + class Function; class GlobalValue; class Constant; @@ -77,5 +79,7 @@ void setupPassManager(); void runJITOnFunction (Function *F); }; + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:43:52 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:52 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Hello/Hello.cpp Message-ID: <200311112241.QAA20638@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Hello: Hello.cpp updated: 1.2 -> 1.3 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+4 -0) Index: llvm/lib/Transforms/Hello/Hello.cpp diff -u llvm/lib/Transforms/Hello/Hello.cpp:1.2 llvm/lib/Transforms/Hello/Hello.cpp:1.3 --- llvm/lib/Transforms/Hello/Hello.cpp:1.2 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Transforms/Hello/Hello.cpp Tue Nov 11 16:41:33 2003 @@ -15,6 +15,8 @@ #include "llvm/Pass.h" #include "llvm/Function.h" +namespace llvm { + namespace { // Hello - The first implementation, without getAnalysisUsage. struct Hello : public FunctionPass { @@ -39,3 +41,5 @@ }; RegisterOpt Y("hello2", "Hello World Pass (with getAnalysisUsage implemented)"); } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:43:56 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:43:56 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp LevelRaise.cpp TransformInternals.cpp TransformInternals.h Message-ID: <200311112241.QAA20645@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms: ExprTypeConvert.cpp updated: 1.82 -> 1.83 LevelRaise.cpp updated: 1.87 -> 1.88 TransformInternals.cpp updated: 1.40 -> 1.41 TransformInternals.h updated: 1.22 -> 1.23 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+17 -2) Index: llvm/lib/Transforms/ExprTypeConvert.cpp diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.82 llvm/lib/Transforms/ExprTypeConvert.cpp:1.83 --- llvm/lib/Transforms/ExprTypeConvert.cpp:1.82 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Transforms/ExprTypeConvert.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "Support/Debug.h" #include +namespace llvm { + static bool OperandConvertibleToType(User *U, Value *V, const Type *Ty, ValueTypeCache &ConvertedTypes, const TargetData &TD); @@ -1298,3 +1300,5 @@ // << Operands[0]->use_size() << " " << Operands[0]); } } + +} // End llvm namespace Index: llvm/lib/Transforms/LevelRaise.cpp diff -u llvm/lib/Transforms/LevelRaise.cpp:1.87 llvm/lib/Transforms/LevelRaise.cpp:1.88 --- llvm/lib/Transforms/LevelRaise.cpp:1.87 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Transforms/LevelRaise.cpp Tue Nov 11 16:41:33 2003 @@ -29,6 +29,8 @@ #include "Support/STLExtras.h" #include +namespace llvm { + // StartInst - This enables the -raise-start-inst=foo option to cause the level // raising pass to start at instruction "foo", which is immensely useful for // debugging! @@ -55,7 +57,6 @@ static Statistic<> NumVarargCallChanges("raise", "Number of vararg call peepholes"); - #define PRINT_PEEPHOLE(ID, NUM, I) \ DEBUG(std::cerr << "Inst P/H " << ID << "[" << NUM << "] " << I) @@ -86,12 +87,12 @@ RegisterOpt X("raise", "Raise Pointer References"); } + Pass *createRaisePointerReferencesPass() { return new RPR(); } - // isReinterpretingCast - Return true if the cast instruction specified will // cause the operand to be "reinterpreted". A value is reinterpreted if the // cast instruction would cause the underlying bits to change. @@ -617,3 +618,5 @@ return Changed; } + +} // End llvm namespace Index: llvm/lib/Transforms/TransformInternals.cpp diff -u llvm/lib/Transforms/TransformInternals.cpp:1.40 llvm/lib/Transforms/TransformInternals.cpp:1.41 --- llvm/lib/Transforms/TransformInternals.cpp:1.40 Mon Oct 20 14:43:18 2003 +++ llvm/lib/Transforms/TransformInternals.cpp Tue Nov 11 16:41:33 2003 @@ -18,6 +18,8 @@ #include "llvm/Function.h" #include "llvm/iOther.h" +namespace llvm { + static const Type *getStructOffsetStep(const StructType *STy, uint64_t &Offset, std::vector &Indices, const TargetData &TD) { @@ -193,3 +195,5 @@ return NextTy; } + +} // End llvm namespace Index: llvm/lib/Transforms/TransformInternals.h diff -u llvm/lib/Transforms/TransformInternals.h:1.22 llvm/lib/Transforms/TransformInternals.h:1.23 --- llvm/lib/Transforms/TransformInternals.h:1.22 Tue Oct 21 10:17:13 2003 +++ llvm/lib/Transforms/TransformInternals.h Tue Nov 11 16:41:33 2003 @@ -22,6 +22,8 @@ #include #include +namespace llvm { + static inline int64_t getConstantValue(const ConstantInt *CPI) { return (int64_t)cast(CPI)->getRawValue(); } @@ -138,5 +140,7 @@ const Type *getStructOffsetType(const Type *Ty, unsigned &Offset, std::vector &Offsets, const TargetData &TD, bool StopEarly = true); + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:44:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/MRegisterInfo.cpp TargetData.cpp TargetInstrInfo.cpp TargetMachine.cpp TargetSchedInfo.cpp Message-ID: <200311112241.QAA20565@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: MRegisterInfo.cpp updated: 1.4 -> 1.5 TargetData.cpp updated: 1.39 -> 1.40 TargetInstrInfo.cpp updated: 1.9 -> 1.10 TargetMachine.cpp updated: 1.19 -> 1.20 TargetSchedInfo.cpp updated: 1.12 -> 1.13 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+20 -1) Index: llvm/lib/Target/MRegisterInfo.cpp diff -u llvm/lib/Target/MRegisterInfo.cpp:1.4 llvm/lib/Target/MRegisterInfo.cpp:1.5 --- llvm/lib/Target/MRegisterInfo.cpp:1.4 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Target/MRegisterInfo.cpp Tue Nov 11 16:41:33 2003 @@ -13,6 +13,8 @@ #include "llvm/Target/MRegisterInfo.h" +namespace llvm { + MRegisterInfo::MRegisterInfo(const MRegisterDesc *D, unsigned NR, regclass_iterator RCB, regclass_iterator RCE, int CFSO, int CFDO) @@ -41,3 +43,5 @@ MRegisterInfo::~MRegisterInfo() { delete[] PhysRegClasses; } + +} // End llvm namespace Index: llvm/lib/Target/TargetData.cpp diff -u llvm/lib/Target/TargetData.cpp:1.39 llvm/lib/Target/TargetData.cpp:1.40 --- llvm/lib/Target/TargetData.cpp:1.39 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Target/TargetData.cpp Tue Nov 11 16:41:33 2003 @@ -22,13 +22,14 @@ #include "llvm/DerivedTypes.h" #include "llvm/Constants.h" +namespace llvm { + // Handle the Pass registration stuff necessary to use TargetData's. namespace { // Register the default SparcV9 implementation... RegisterPass X("targetdata", "Target Data Layout"); } - static inline void getTypeInfo(const Type *Ty, const TargetData *TD, uint64_t &Size, unsigned char &Alignment); @@ -221,3 +222,5 @@ return Result; } + +} // End llvm namespace Index: llvm/lib/Target/TargetInstrInfo.cpp diff -u llvm/lib/Target/TargetInstrInfo.cpp:1.9 llvm/lib/Target/TargetInstrInfo.cpp:1.10 --- llvm/lib/Target/TargetInstrInfo.cpp:1.9 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Target/TargetInstrInfo.cpp Tue Nov 11 16:41:33 2003 @@ -15,6 +15,8 @@ #include "llvm/Constant.h" #include "llvm/DerivedTypes.h" +namespace llvm { + // External object describing the machine instructions // Initialized only when the TargetMachine class is created // and reset when that class is destroyed. @@ -59,3 +61,5 @@ assert(CV->getType()->isPrimitiveType() || isa(CV->getType())); return !(CV->getType()->isIntegral() || isa(CV->getType())); } + +} // End llvm namespace Index: llvm/lib/Target/TargetMachine.cpp diff -u llvm/lib/Target/TargetMachine.cpp:1.19 llvm/lib/Target/TargetMachine.cpp:1.20 --- llvm/lib/Target/TargetMachine.cpp:1.19 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Target/TargetMachine.cpp Tue Nov 11 16:41:33 2003 @@ -16,6 +16,8 @@ #include "llvm/Target/TargetCacheInfo.h" #include "llvm/Type.h" +namespace llvm { + //--------------------------------------------------------------------------- // class TargetMachine // @@ -49,3 +51,5 @@ cacheSizes.push_back(1 << 15); cacheSizes.push_back(1 << 20); cacheAssoc.push_back(1); cacheAssoc.push_back(4); } + +} // End llvm namespace Index: llvm/lib/Target/TargetSchedInfo.cpp diff -u llvm/lib/Target/TargetSchedInfo.cpp:1.12 llvm/lib/Target/TargetSchedInfo.cpp:1.13 --- llvm/lib/Target/TargetSchedInfo.cpp:1.12 Mon Oct 20 14:43:16 2003 +++ llvm/lib/Target/TargetSchedInfo.cpp Tue Nov 11 16:41:33 2003 @@ -15,6 +15,8 @@ #include "llvm/Target/TargetSchedInfo.h" #include "llvm/Target/TargetMachine.h" +namespace llvm { + resourceId_t MachineResource::nextId = 0; // Check if fromRVec and toRVec have *any* common entries. @@ -249,3 +251,5 @@ assert(r >= 0 && "Resource to remove was unused in cycle c!"); } } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:44:06 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:06 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.cpp ModuloSchedGraph.h ModuloScheduling.cpp Message-ID: <200311112241.QAA20462@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/ModuloScheduling: ModuloSchedGraph.cpp updated: 1.13 -> 1.14 ModuloSchedGraph.h updated: 1.11 -> 1.12 ModuloScheduling.cpp updated: 1.14 -> 1.15 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+10 -0) Index: llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.cpp diff -u llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.cpp:1.13 llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.cpp:1.14 --- llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.cpp:1.13 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.cpp Tue Nov 11 16:41:33 2003 @@ -13,6 +13,8 @@ #include "ModuloSchedGraph.h" #include "llvm/Type.h" +namespace llvm { + ModuloSchedGraphNode::ModuloSchedGraphNode(unsigned id, int index, const Instruction *inst, const TargetMachine &targ) @@ -135,3 +137,4 @@ //delete all the graphs } +} // End llvm namespace Index: llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.h diff -u llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.h:1.11 llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.h:1.12 --- llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.h:1.11 Tue Oct 21 10:17:12 2003 +++ llvm/lib/CodeGen/ModuloScheduling/ModuloSchedGraph.h Tue Nov 11 16:41:33 2003 @@ -22,6 +22,7 @@ #include "Support/hash_map" #include +namespace llvm { class ModuloSchedGraphNode : public SchedGraphNodeCommon { @@ -105,5 +106,7 @@ }; + +} // End llvm namespace #endif Index: llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp diff -u llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp:1.14 llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp:1.15 --- llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp:1.14 Mon Oct 20 14:43:16 2003 +++ llvm/lib/CodeGen/ModuloScheduling/ModuloScheduling.cpp Tue Nov 11 16:41:33 2003 @@ -16,6 +16,8 @@ #include "llvm/Function.h" #include "llvm/Pass.h" +namespace llvm { + namespace { class ModuloScheduling : public FunctionPass { @@ -40,3 +42,5 @@ bool Changed = false; return Changed; } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:44:10 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:10 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/DAGBuilder.cpp SelectionDAG.cpp Message-ID: <200311112241.QAA20485@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/SelectionDAG: DAGBuilder.cpp updated: 1.3 -> 1.4 SelectionDAG.cpp updated: 1.3 -> 1.4 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+8 -0) Index: llvm/lib/CodeGen/SelectionDAG/DAGBuilder.cpp diff -u llvm/lib/CodeGen/SelectionDAG/DAGBuilder.cpp:1.3 llvm/lib/CodeGen/SelectionDAG/DAGBuilder.cpp:1.4 --- llvm/lib/CodeGen/SelectionDAG/DAGBuilder.cpp:1.3 Mon Oct 20 14:43:16 2003 +++ llvm/lib/CodeGen/SelectionDAG/DAGBuilder.cpp Tue Nov 11 16:41:33 2003 @@ -21,6 +21,8 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/InstVisitor.h" +namespace llvm { + struct SelectionDAGBuilder : public InstVisitor { // DAG - the current dag we are building. SelectionDAG &DAG; @@ -270,3 +272,5 @@ SDB.visitBB(const_cast(*I)); Root = SDB.CurRoot; } + +} // End llvm namespace Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.3 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.4 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.3 Mon Oct 20 14:43:16 2003 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Tue Nov 11 16:41:33 2003 @@ -15,6 +15,8 @@ #include "llvm/CodeGen/SelectionDAG.h" #include "llvm/Type.h" +namespace llvm { + SelectionDAG::~SelectionDAG() { for (unsigned i = 0, e = AllNodes.size(); i != e; ++i) delete AllNodes[i]; @@ -126,3 +128,5 @@ std::cerr << "\n"; } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:44:15 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:15 2003 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/ExecutionEngine.cpp Message-ID: <200311112241.QAA20492@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine: ExecutionEngine.cpp updated: 1.36 -> 1.37 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+3 -0) Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.36 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.37 --- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.36 Fri Oct 24 14:58:38 2003 +++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp Tue Nov 11 16:41:33 2003 @@ -27,6 +27,8 @@ #include "Support/DynamicLinker.h" #include "Config/dlfcn.h" +namespace llvm { + Statistic<> NumInitBytes("lli", "Number of bytes of global vars initialized"); ExecutionEngine::ExecutionEngine(ModuleProvider *P) : @@ -390,3 +392,4 @@ InitializeMemory(I->getInitializer(), GlobalAddress[I]); } +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:44:20 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:20 2003 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp ExternalFunctions.cpp Interpreter.cpp Interpreter.h Message-ID: <200311112241.QAA20529@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.113 -> 1.114 ExternalFunctions.cpp updated: 1.67 -> 1.68 Interpreter.cpp updated: 1.16 -> 1.17 Interpreter.h updated: 1.52 -> 1.53 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+17 -1) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.113 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.114 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.113 Fri Nov 7 15:20:46 2003 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Tue Nov 11 16:41:33 2003 @@ -18,12 +18,14 @@ #include "Support/Statistic.h" #include // For fmod -Interpreter *TheEE = 0; +namespace llvm { namespace { Statistic<> NumDynamicInsts("lli", "Number of dynamic instructions executed"); } +Interpreter *TheEE = 0; + //===----------------------------------------------------------------------===// // Value Manipulation code //===----------------------------------------------------------------------===// @@ -910,3 +912,5 @@ visit(I); // Dispatch to one of the visit* methods... } } + +} // End llvm namespace Index: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.67 llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.68 --- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.67 Tue Nov 4 19:18:49 2003 +++ llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Tue Nov 11 16:41:33 2003 @@ -32,6 +32,8 @@ #include using std::vector; +namespace llvm { + typedef GenericValue (*ExFunc)(FunctionType *, const vector &); static std::map Functions; static std::map FuncNames; @@ -767,3 +769,5 @@ FuncNames["lle_X_llvm.va_end"] = llvm_va_end; FuncNames["lle_X_llvm.va_copy"] = llvm_va_copy; } + +} // End llvm namespace Index: llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp:1.16 llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp:1.17 --- llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp:1.16 Wed Nov 5 00:20:27 2003 +++ llvm/lib/ExecutionEngine/Interpreter/Interpreter.cpp Tue Nov 11 16:41:33 2003 @@ -17,6 +17,8 @@ #include "llvm/Module.h" #include "llvm/DerivedTypes.h" +namespace llvm { + /// create - Create a new interpreter object. This can never fail. /// ExecutionEngine *Interpreter::create(Module *M){ @@ -97,3 +99,5 @@ rv.IntVal = ExitCode; return rv; } + +} // End llvm namespace Index: llvm/lib/ExecutionEngine/Interpreter/Interpreter.h diff -u llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.52 llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.53 --- llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.52 Fri Nov 7 15:20:47 2003 +++ llvm/lib/ExecutionEngine/Interpreter/Interpreter.h Tue Nov 11 16:41:33 2003 @@ -22,6 +22,8 @@ #include "llvm/Target/TargetData.h" #include "Support/DataTypes.h" +namespace llvm { + struct FunctionInfo; // Defined in ExecutionAnnotations.h // AllocaHolder - Object to track all of the blocks of memory allocated by @@ -165,5 +167,7 @@ ExecutionContext &SF); void popStackAndReturnValueToCaller(const Type *RetTy, GenericValue Result); }; + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:44:25 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:25 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp MachineCodeEmitter.cpp MachineCodeForInstruction.cpp MachineFunction.cpp MachineInstr.cpp MachineInstrAnnot.cpp PHIElimination.cpp Passes.cpp PrologEpilogInserter.cpp RegAllocLocal.cpp RegAllocSimple.cpp Message-ID: <200311112241.QAA20453@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveVariables.cpp updated: 1.10 -> 1.11 MachineCodeEmitter.cpp updated: 1.13 -> 1.14 MachineCodeForInstruction.cpp updated: 1.8 -> 1.9 MachineFunction.cpp updated: 1.43 -> 1.44 MachineInstr.cpp updated: 1.80 -> 1.81 MachineInstrAnnot.cpp updated: 1.9 -> 1.10 PHIElimination.cpp updated: 1.12 -> 1.13 Passes.cpp updated: 1.2 -> 1.3 PrologEpilogInserter.cpp updated: 1.14 -> 1.15 RegAllocLocal.cpp updated: 1.30 -> 1.31 RegAllocSimple.cpp updated: 1.45 -> 1.46 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+56 -14) Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.10 llvm/lib/CodeGen/LiveVariables.cpp:1.11 --- llvm/lib/CodeGen/LiveVariables.cpp:1.10 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/LiveVariables.cpp Tue Nov 11 16:41:32 2003 @@ -33,6 +33,8 @@ #include "llvm/Support/CFG.h" #include "Support/DepthFirstIterator.h" +namespace llvm { + static RegisterAnalysis X("livevars", "Live Variable Analysis"); const std::pair & @@ -307,3 +309,5 @@ return false; } + +} // End llvm namespace Index: llvm/lib/CodeGen/MachineCodeEmitter.cpp diff -u llvm/lib/CodeGen/MachineCodeEmitter.cpp:1.13 llvm/lib/CodeGen/MachineCodeEmitter.cpp:1.14 --- llvm/lib/CodeGen/MachineCodeEmitter.cpp:1.13 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/MachineCodeEmitter.cpp Tue Nov 11 16:41:32 2003 @@ -16,6 +16,8 @@ #include "llvm/Function.h" #include +namespace llvm { + namespace { struct DebugMachineCodeEmitter : public MachineCodeEmitter { void startFunction(MachineFunction &F) { @@ -54,18 +56,7 @@ return 0; } }; -} - - -/// createDebugMachineCodeEmitter - Return a dynamically allocated machine -/// code emitter, which just prints the opcodes and fields out the cout. This -/// can be used for debugging users of the MachineCodeEmitter interface. -/// -MachineCodeEmitter *MachineCodeEmitter::createDebugEmitter() { - return new DebugMachineCodeEmitter(); -} -namespace { class FilePrinterEmitter : public MachineCodeEmitter { std::ofstream actual; std::ostream &o; @@ -169,7 +160,18 @@ }; } +/// createDebugMachineCodeEmitter - Return a dynamically allocated machine +/// code emitter, which just prints the opcodes and fields out the cout. This +/// can be used for debugging users of the MachineCodeEmitter interface. +/// +MachineCodeEmitter * +MachineCodeEmitter::createDebugEmitter() { + return new DebugMachineCodeEmitter(); +} + MachineCodeEmitter * MachineCodeEmitter::createFilePrinterEmitter(MachineCodeEmitter &MCE) { return new FilePrinterEmitter(MCE, std::cerr); } + +} // End llvm namespace Index: llvm/lib/CodeGen/MachineCodeForInstruction.cpp diff -u llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.8 llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.9 --- llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.8 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/MachineCodeForInstruction.cpp Tue Nov 11 16:41:32 2003 @@ -27,6 +27,8 @@ #include "llvm/CodeGen/MachineInstrAnnot.h" #include "llvm/CodeGen/InstrSelection.h" +namespace llvm { + AnnotationID MCFI_AID( AnnotationManager::getID("CodeGen::MachineCodeForInstruction")); @@ -68,3 +70,5 @@ if (callArgsDesc) delete callArgsDesc; } + +} // End llvm namespace Index: llvm/lib/CodeGen/MachineFunction.cpp diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.43 llvm/lib/CodeGen/MachineFunction.cpp:1.44 --- llvm/lib/CodeGen/MachineFunction.cpp:1.43 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/MachineFunction.cpp Tue Nov 11 16:41:32 2003 @@ -28,6 +28,8 @@ #include "llvm/Pass.h" #include "Config/limits.h" +namespace llvm { + const int INVALID_FRAME_OFFSET = INT_MAX; // std::numeric_limits::max(); static AnnotationID MF_AID( @@ -414,3 +416,5 @@ hash_map::const_iterator pair = offsets.find(val); return (pair == offsets.end()) ? INVALID_FRAME_OFFSET : pair->second; } + +} // End llvm namespace Index: llvm/lib/CodeGen/MachineInstr.cpp diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.80 llvm/lib/CodeGen/MachineInstr.cpp:1.81 --- llvm/lib/CodeGen/MachineInstr.cpp:1.80 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/MachineInstr.cpp Tue Nov 11 16:41:32 2003 @@ -16,6 +16,8 @@ #include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/MRegisterInfo.h" +namespace llvm { + // Global variable holding an array of descriptors for machine instructions. // The actual object needs to be created separately for each target machine. // This variable is initialized and reset by class TargetInstrInfo. @@ -289,7 +291,7 @@ // Specialize printing if op#0 is definition if (getNumOperands() && (getOperand(0).opIsDefOnly() || getOperand(0).opIsDefAndUse())) { - ::print(getOperand(0), OS, TM); + llvm::print(getOperand(0), OS, TM); OS << " = "; ++StartOp; // Don't print this operand again! } @@ -300,7 +302,7 @@ if (i != StartOp) OS << ","; OS << " "; - ::print(mop, OS, TM); + llvm::print(mop, OS, TM); if (mop.opIsDefAndUse()) OS << ""; @@ -433,3 +435,5 @@ return OS; } + +} // End llvm namespace Index: llvm/lib/CodeGen/MachineInstrAnnot.cpp diff -u llvm/lib/CodeGen/MachineInstrAnnot.cpp:1.9 llvm/lib/CodeGen/MachineInstrAnnot.cpp:1.10 --- llvm/lib/CodeGen/MachineInstrAnnot.cpp:1.9 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/MachineInstrAnnot.cpp Tue Nov 11 16:41:32 2003 @@ -18,6 +18,7 @@ #include "llvm/iOther.h" #include "llvm/Type.h" +namespace llvm { CallArgsDescriptor::CallArgsDescriptor(CallInst* _callInstr, TmpInstruction* _retAddrReg, @@ -76,3 +77,5 @@ assert(desc->getCallInst()==callInstr && "Incorrect call args descriptor?"); return desc; } + +} // End llvm namespace Index: llvm/lib/CodeGen/PHIElimination.cpp diff -u llvm/lib/CodeGen/PHIElimination.cpp:1.12 llvm/lib/CodeGen/PHIElimination.cpp:1.13 --- llvm/lib/CodeGen/PHIElimination.cpp:1.12 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/PHIElimination.cpp Tue Nov 11 16:41:32 2003 @@ -21,6 +21,8 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Support/CFG.h" +namespace llvm { + namespace { struct PNE : public MachineFunctionPass { bool runOnMachineFunction(MachineFunction &Fn) { @@ -52,6 +54,7 @@ "Eliminate PHI nodes for register allocation"); } + const PassInfo *PHIEliminationID = X.getPassInfo(); /// EliminatePHINodes - Eliminate phi nodes by inserting copy instructions in @@ -260,3 +263,5 @@ return true; } + +} // End llvm namespace Index: llvm/lib/CodeGen/Passes.cpp diff -u llvm/lib/CodeGen/Passes.cpp:1.2 llvm/lib/CodeGen/Passes.cpp:1.3 --- llvm/lib/CodeGen/Passes.cpp:1.2 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/Passes.cpp Tue Nov 11 16:41:32 2003 @@ -15,6 +15,8 @@ #include "llvm/CodeGen/Passes.h" #include "Support/CommandLine.h" +namespace llvm { + namespace { enum RegAllocName { simple, local }; @@ -40,3 +42,5 @@ return 0; // not reached } } + +} // End llvm namespace Index: llvm/lib/CodeGen/PrologEpilogInserter.cpp diff -u llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.14 llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.15 --- llvm/lib/CodeGen/PrologEpilogInserter.cpp:1.14 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/PrologEpilogInserter.cpp Tue Nov 11 16:41:32 2003 @@ -25,6 +25,8 @@ #include "llvm/Target/TargetFrameInfo.h" #include "llvm/Target/TargetInstrInfo.h" +namespace llvm { + namespace { struct PEI : public MachineFunctionPass { const char *getPassName() const { @@ -66,6 +68,7 @@ }; } + /// createPrologEpilogCodeInserter - This function returns a pass that inserts /// prolog and epilog code, and eliminates abstract frame references. /// @@ -258,3 +261,5 @@ break; } } + +} // End llvm namespace Index: llvm/lib/CodeGen/RegAllocLocal.cpp diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.30 llvm/lib/CodeGen/RegAllocLocal.cpp:1.31 --- llvm/lib/CodeGen/RegAllocLocal.cpp:1.30 Fri Oct 24 15:05:58 2003 +++ llvm/lib/CodeGen/RegAllocLocal.cpp Tue Nov 11 16:41:32 2003 @@ -26,6 +26,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> NumSpilled ("ra-local", "Number of registers spilled"); Statistic<> NumReloaded("ra-local", "Number of registers reloaded"); @@ -203,7 +205,6 @@ }; } - /// getStackSpaceFor - This allocates space for the specified virtual register /// to be held on the stack. int RA::getStackSpaceFor(unsigned VirtReg, const TargetRegisterClass *RC) { @@ -674,3 +675,5 @@ FunctionPass *createLocalRegisterAllocator() { return new RA(); } + +} // End llvm namespace Index: llvm/lib/CodeGen/RegAllocSimple.cpp diff -u llvm/lib/CodeGen/RegAllocSimple.cpp:1.45 llvm/lib/CodeGen/RegAllocSimple.cpp:1.46 --- llvm/lib/CodeGen/RegAllocSimple.cpp:1.45 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/RegAllocSimple.cpp Tue Nov 11 16:41:32 2003 @@ -26,6 +26,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> NumSpilled ("ra-simple", "Number of registers spilled"); Statistic<> NumReloaded("ra-simple", "Number of registers reloaded"); @@ -234,3 +236,5 @@ FunctionPass *createSimpleRegisterAllocator() { return new RegAllocSimple(); } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:44:30 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:30 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp SchedGraph.cpp SchedGraph.h SchedGraphCommon.cpp SchedPriorities.cpp SchedPriorities.h Message-ID: <200311112241.QAA20452@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/InstrSched: InstrScheduling.cpp updated: 1.61 -> 1.62 SchedGraph.cpp updated: 1.52 -> 1.53 SchedGraph.h updated: 1.36 -> 1.37 SchedGraphCommon.cpp updated: 1.3 -> 1.4 SchedPriorities.cpp updated: 1.28 -> 1.29 SchedPriorities.h updated: 1.25 -> 1.26 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+23 -0) Index: llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp diff -u llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.61 llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.62 --- llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp:1.61 Wed Nov 5 00:25:06 2003 +++ llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp Tue Nov 11 16:41:32 2003 @@ -22,6 +22,8 @@ #include "Support/CommandLine.h" #include +namespace llvm { + SchedDebugLevel_t SchedDebugLevel; static cl::opt EnableFillingDelaySlots("sched-fill-delay-slots", @@ -1518,3 +1520,6 @@ FunctionPass *createInstructionSchedulingWithSSAPass(const TargetMachine &tgt) { return new InstructionSchedulingWithSSA(tgt); } + +} // End llvm namespace + Index: llvm/lib/CodeGen/InstrSched/SchedGraph.cpp diff -u llvm/lib/CodeGen/InstrSched/SchedGraph.cpp:1.52 llvm/lib/CodeGen/InstrSched/SchedGraph.cpp:1.53 --- llvm/lib/CodeGen/InstrSched/SchedGraph.cpp:1.52 Wed Nov 5 18:04:11 2003 +++ llvm/lib/CodeGen/InstrSched/SchedGraph.cpp Tue Nov 11 16:41:32 2003 @@ -23,6 +23,8 @@ #include "llvm/Target/TargetRegInfo.h" #include "Support/STLExtras.h" +namespace llvm { + //*********************** Internal Data Structures *************************/ // The following two types need to be classes, not typedefs, so we can use @@ -737,3 +739,5 @@ os << std::string(16, ' ') << *outEdges[i]; } } + +} // End llvm namespace Index: llvm/lib/CodeGen/InstrSched/SchedGraph.h diff -u llvm/lib/CodeGen/InstrSched/SchedGraph.h:1.36 llvm/lib/CodeGen/InstrSched/SchedGraph.h:1.37 --- llvm/lib/CodeGen/InstrSched/SchedGraph.h:1.36 Tue Oct 21 10:17:12 2003 +++ llvm/lib/CodeGen/InstrSched/SchedGraph.h Tue Nov 11 16:41:33 2003 @@ -25,6 +25,8 @@ #include "Support/hash_map" #include "Support/GraphTraits.h" +namespace llvm { + class RegToRefVecMap; class ValueToDefVecMap; class RefVec; @@ -316,5 +318,7 @@ return succ_end(N); } }; + +} // End llvm namespace #endif Index: llvm/lib/CodeGen/InstrSched/SchedGraphCommon.cpp diff -u llvm/lib/CodeGen/InstrSched/SchedGraphCommon.cpp:1.3 llvm/lib/CodeGen/InstrSched/SchedGraphCommon.cpp:1.4 --- llvm/lib/CodeGen/InstrSched/SchedGraphCommon.cpp:1.3 Mon Oct 20 14:43:15 2003 +++ llvm/lib/CodeGen/InstrSched/SchedGraphCommon.cpp Tue Nov 11 16:41:33 2003 @@ -15,6 +15,8 @@ #include "llvm/CodeGen/SchedGraphCommon.h" #include "Support/STLExtras.h" +namespace llvm { + class SchedGraphCommon; // @@ -175,3 +177,4 @@ this->eraseOutgoingEdges(node, addDummyEdges); } +} // End llvm namespace Index: llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp diff -u llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp:1.28 llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp:1.29 --- llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp:1.28 Thu Oct 23 12:43:17 2003 +++ llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp Tue Nov 11 16:41:33 2003 @@ -23,6 +23,8 @@ #include "llvm/Support/CFG.h" #include "Support/PostOrderIterator.h" +namespace llvm { + std::ostream &operator<<(std::ostream &os, const NodeDelayPair* nd) { return os << "Delay for node " << nd->node->getNodeId() << " = " << (long)nd->delay << "\n"; @@ -278,3 +280,4 @@ return lastUseMap[MI] = hasLastUse; } +} // End llvm namespace Index: llvm/lib/CodeGen/InstrSched/SchedPriorities.h diff -u llvm/lib/CodeGen/InstrSched/SchedPriorities.h:1.25 llvm/lib/CodeGen/InstrSched/SchedPriorities.h:1.26 --- llvm/lib/CodeGen/InstrSched/SchedPriorities.h:1.25 Tue Oct 21 10:17:12 2003 +++ llvm/lib/CodeGen/InstrSched/SchedPriorities.h Tue Nov 11 16:41:33 2003 @@ -26,6 +26,8 @@ #include "Support/hash_set" #include +namespace llvm { + class Function; class MachineInstr; class SchedulingManager; @@ -213,5 +215,7 @@ } std::ostream &operator<<(std::ostream &os, const NodeDelayPair* nd); + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:44:35 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:35 2003 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/InstrSelection/InstrForest.cpp InstrSelection.cpp InstrSelectionSupport.cpp Message-ID: <200311112241.QAA20449@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen/InstrSelection: InstrForest.cpp updated: 1.49 -> 1.50 InstrSelection.cpp updated: 1.64 -> 1.65 InstrSelectionSupport.cpp updated: 1.57 -> 1.58 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+14 -1) Index: llvm/lib/CodeGen/InstrSelection/InstrForest.cpp diff -u llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.49 llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.50 --- llvm/lib/CodeGen/InstrSelection/InstrForest.cpp:1.49 Thu Oct 23 12:39:37 2003 +++ llvm/lib/CodeGen/InstrSelection/InstrForest.cpp Tue Nov 11 16:41:33 2003 @@ -30,6 +30,8 @@ #include "Support/STLExtras.h" #include "Config/alloca.h" +namespace llvm { + //------------------------------------------------------------------------ // class InstrTreeNode //------------------------------------------------------------------------ @@ -330,3 +332,5 @@ delete [] childArray; return treeNode; } + +} // End llvm namespace Index: llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp diff -u llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.64 llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.65 --- llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp:1.64 Thu Oct 23 12:39:37 2003 +++ llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp Tue Nov 11 16:41:33 2003 @@ -28,6 +28,8 @@ #include "Support/LeakDetector.h" #include +namespace llvm { + std::vector FixConstantOperandsForInstr(Instruction* vmInstr, MachineInstr* minstr, TargetMachine& target); @@ -82,6 +84,8 @@ }; } +namespace llvm { + TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi, Value *s1, Value *s2, const std::string &name) : Instruction(s1->getType(), Instruction::UserOp1, name) @@ -114,6 +118,7 @@ LeakDetector::removeGarbageObject(this); } +} // End llvm namespace bool InstructionSelection::runOnFunction(Function &F) { @@ -375,7 +380,6 @@ } - //===----------------------------------------------------------------------===// // createInstructionSelectionPass - Public entrypoint for instruction selection // and this file as a whole... @@ -383,3 +387,5 @@ FunctionPass *createInstructionSelectionPass(TargetMachine &T) { return new InstructionSelection(T); } + +} // End llvm namespace Index: llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp diff -u llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.57 llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.58 --- llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp:1.57 Thu Oct 23 12:39:37 2003 +++ llvm/lib/CodeGen/InstrSelection/InstrSelectionSupport.cpp Tue Nov 11 16:41:33 2003 @@ -25,6 +25,7 @@ #include "llvm/DerivedTypes.h" #include "../../Target/Sparc/SparcInstrSelectionSupport.h" // FIXME! +namespace llvm { // Generate code to load the constant into a TmpInstruction (virtual reg) and // returns the virtual register. @@ -257,3 +258,5 @@ return MVec; } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:44:40 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:40 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/ConstantWriter.cpp InstructionWriter.cpp Writer.cpp WriterInternals.h Message-ID: <200311112241.QAA20389@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: ConstantWriter.cpp updated: 1.26 -> 1.27 InstructionWriter.cpp updated: 1.34 -> 1.35 Writer.cpp updated: 1.44 -> 1.45 WriterInternals.h updated: 1.13 -> 1.14 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+15 -0) Index: llvm/lib/Bytecode/Writer/ConstantWriter.cpp diff -u llvm/lib/Bytecode/Writer/ConstantWriter.cpp:1.26 llvm/lib/Bytecode/Writer/ConstantWriter.cpp:1.27 --- llvm/lib/Bytecode/Writer/ConstantWriter.cpp:1.26 Wed Oct 29 14:09:01 2003 +++ llvm/lib/Bytecode/Writer/ConstantWriter.cpp Tue Nov 11 16:41:32 2003 @@ -17,6 +17,8 @@ #include "llvm/SymbolTable.h" #include "llvm/DerivedTypes.h" +namespace llvm { + void BytecodeWriter::outputType(const Type *T) { output_vbr((unsigned)T->getPrimitiveID(), Out); @@ -202,3 +204,5 @@ } return false; } + +} // End llvm namespace Index: llvm/lib/Bytecode/Writer/InstructionWriter.cpp diff -u llvm/lib/Bytecode/Writer/InstructionWriter.cpp:1.34 llvm/lib/Bytecode/Writer/InstructionWriter.cpp:1.35 --- llvm/lib/Bytecode/Writer/InstructionWriter.cpp:1.34 Mon Oct 20 14:43:15 2003 +++ llvm/lib/Bytecode/Writer/InstructionWriter.cpp Tue Nov 11 16:41:32 2003 @@ -19,6 +19,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + static Statistic<> NumInstrs("bytecodewriter", "Number of instructions"); @@ -295,3 +297,5 @@ // operands or a large operand index that we are referring to. outputInstructionFormat0(&I, Opcode, Table, Type, Out); } + +} // End llvm namespace Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.44 llvm/lib/Bytecode/Writer/Writer.cpp:1.45 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.44 Mon Oct 20 14:43:15 2003 +++ llvm/lib/Bytecode/Writer/Writer.cpp Tue Nov 11 16:41:32 2003 @@ -36,6 +36,8 @@ #include "Config/string.h" #include +namespace llvm { + static RegisterPass X("emitbytecode", "Bytecode Writer"); static Statistic<> @@ -304,3 +306,5 @@ Out.flush(); } + +} // End llvm namespace Index: llvm/lib/Bytecode/Writer/WriterInternals.h diff -u llvm/lib/Bytecode/Writer/WriterInternals.h:1.13 llvm/lib/Bytecode/Writer/WriterInternals.h:1.14 --- llvm/lib/Bytecode/Writer/WriterInternals.h:1.13 Tue Oct 21 10:17:12 2003 +++ llvm/lib/Bytecode/Writer/WriterInternals.h Tue Nov 11 16:41:32 2003 @@ -25,6 +25,8 @@ #include "llvm/SlotCalculator.h" #include "llvm/Instruction.h" +namespace llvm { + class BytecodeWriter { std::deque &Out; SlotCalculator Table; @@ -79,5 +81,6 @@ } }; +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:44:45 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:45 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ArchiveReader.cpp ConstantReader.cpp InstructionReader.cpp Reader.cpp ReaderInternals.h ReaderWrappers.cpp Message-ID: <200311112241.QAA20395@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ArchiveReader.cpp updated: 1.7 -> 1.8 ConstantReader.cpp updated: 1.61 -> 1.62 InstructionReader.cpp updated: 1.62 -> 1.63 Reader.cpp updated: 1.87 -> 1.88 ReaderInternals.h updated: 1.63 -> 1.64 ReaderWrappers.cpp updated: 1.16 -> 1.17 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+25 -5) Index: llvm/lib/Bytecode/Reader/ArchiveReader.cpp diff -u llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.7 llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.8 --- llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.7 Mon Oct 20 14:43:14 2003 +++ llvm/lib/Bytecode/Reader/ArchiveReader.cpp Tue Nov 11 16:41:32 2003 @@ -22,6 +22,8 @@ #include "Config/sys/mman.h" #include "Config/fcntl.h" +namespace llvm { + namespace { struct ar_hdr { char name[16]; @@ -40,7 +42,6 @@ }; } - // getObjectType - Determine the type of object that this header represents. // This is capable of parsing the variety of special sections used for various // purposes. @@ -173,3 +174,5 @@ return Result; } + +} // End llvm namespace Index: llvm/lib/Bytecode/Reader/ConstantReader.cpp diff -u llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.61 llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.62 --- llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.61 Wed Nov 5 13:53:03 2003 +++ llvm/lib/Bytecode/Reader/ConstantReader.cpp Tue Nov 11 16:41:32 2003 @@ -20,6 +20,8 @@ #include "llvm/Constants.h" #include +namespace llvm { + const Type *BytecodeParser::parseTypeConstant(const unsigned char *&Buf, const unsigned char *EndBuf) { unsigned PrimType; @@ -356,3 +358,5 @@ if (Buf > EndBuf) throw std::string("Read past end of buffer."); } + +} // End llvm namespace Index: llvm/lib/Bytecode/Reader/InstructionReader.cpp diff -u llvm/lib/Bytecode/Reader/InstructionReader.cpp:1.62 llvm/lib/Bytecode/Reader/InstructionReader.cpp:1.63 --- llvm/lib/Bytecode/Reader/InstructionReader.cpp:1.62 Mon Oct 20 14:43:14 2003 +++ llvm/lib/Bytecode/Reader/InstructionReader.cpp Tue Nov 11 16:41:32 2003 @@ -22,6 +22,8 @@ #include "llvm/iOther.h" #include "llvm/Module.h" +namespace llvm { + namespace { struct RawInst { // The raw fields out of the bytecode stream... unsigned NumOperands; @@ -33,8 +35,6 @@ }; } - - RawInst::RawInst(const unsigned char *&Buf, const unsigned char *EndBuf, std::vector &Args) { unsigned Op, Typ; @@ -389,3 +389,5 @@ BB->getInstList().push_back(Result); BCR_TRACE(4, *Result); } + +} // End llvm namespace Index: llvm/lib/Bytecode/Reader/Reader.cpp diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.87 llvm/lib/Bytecode/Reader/Reader.cpp:1.88 --- llvm/lib/Bytecode/Reader/Reader.cpp:1.87 Mon Oct 20 14:43:15 2003 +++ llvm/lib/Bytecode/Reader/Reader.cpp Tue Nov 11 16:41:32 2003 @@ -32,6 +32,8 @@ #include #include +namespace llvm { + static inline void ALIGN32(const unsigned char *&begin, const unsigned char *end) { if (align32(begin, end)) @@ -693,3 +695,5 @@ throw; } } + +} // End llvm namespace Index: llvm/lib/Bytecode/Reader/ReaderInternals.h diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.63 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.64 --- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.63 Wed Nov 5 13:53:32 2003 +++ llvm/lib/Bytecode/Reader/ReaderInternals.h Tue Nov 11 16:41:32 2003 @@ -22,6 +22,8 @@ #include #include +namespace llvm { + // Enable to trace to figure out what the heck is going on when parsing fails //#define TRACE_LEVEL 10 //#define DEBUG_OUTPUT @@ -225,5 +227,7 @@ if (read(Buf, EndBuf, Type) || read(Buf, EndBuf, Size)) throw Error_read; #endif } + +} // End llvm namespace #endif Index: llvm/lib/Bytecode/Reader/ReaderWrappers.cpp diff -u llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.16 llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.17 --- llvm/lib/Bytecode/Reader/ReaderWrappers.cpp:1.16 Mon Oct 20 14:43:15 2003 +++ llvm/lib/Bytecode/Reader/ReaderWrappers.cpp Tue Nov 11 16:41:32 2003 @@ -21,6 +21,8 @@ #include "Config/unistd.h" #include "Config/sys/mman.h" +namespace llvm { + //===----------------------------------------------------------------------===// // BytecodeFileReader - Read from an mmap'able file descriptor. // @@ -163,7 +165,7 @@ 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))) { + while ((BlockSize = ::read(0 /*stdin*/, Buffer, 4096*4))) { if (BlockSize == -1) throw std::string("Error reading from stdin!"); @@ -249,7 +251,6 @@ return MP; } - //===----------------------------------------------------------------------===// // Wrapper functions //===----------------------------------------------------------------------===// @@ -296,3 +297,5 @@ return 0; } } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:44:50 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:50 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/CallGraph.cpp CallGraphSCCPass.cpp DependenceGraph.cpp FindUnsafePointerTypes.cpp FindUsedTypes.cpp IPModRef.cpp MemoryDepAnalysis.cpp PgmDependenceGraph.cpp Message-ID: <200311112241.QAA20351@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: CallGraph.cpp updated: 1.33 -> 1.34 CallGraphSCCPass.cpp updated: 1.4 -> 1.5 DependenceGraph.cpp updated: 1.4 -> 1.5 FindUnsafePointerTypes.cpp updated: 1.20 -> 1.21 FindUsedTypes.cpp updated: 1.23 -> 1.24 IPModRef.cpp updated: 1.19 -> 1.20 MemoryDepAnalysis.cpp updated: 1.10 -> 1.11 PgmDependenceGraph.cpp updated: 1.3 -> 1.4 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+30 -1) Index: llvm/lib/Analysis/IPA/CallGraph.cpp diff -u llvm/lib/Analysis/IPA/CallGraph.cpp:1.33 llvm/lib/Analysis/IPA/CallGraph.cpp:1.34 --- llvm/lib/Analysis/IPA/CallGraph.cpp:1.33 Sun Nov 9 13:54:30 2003 +++ llvm/lib/Analysis/IPA/CallGraph.cpp Tue Nov 11 16:41:32 2003 @@ -53,6 +53,8 @@ #include "llvm/Support/CallSite.h" #include "Support/STLExtras.h" +namespace llvm { + static RegisterAnalysis X("callgraph", "Call Graph Construction"); static const char * const KnownExternalFunctions[] = { @@ -349,3 +351,5 @@ } void CallGraph::stub() {} + +} // End llvm namespace Index: llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp diff -u llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.4 llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.5 --- llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp:1.4 Mon Oct 20 14:43:07 2003 +++ llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp Tue Nov 11 16:41:32 2003 @@ -19,6 +19,8 @@ #include "llvm/Analysis/CallGraph.h" #include "Support/SCCIterator.h" +namespace llvm { + /// getAnalysisUsage - For this class, we declare that we require and preserve /// the call graph. If the derived class implements this method, it should /// always explicitly call the implementation here. @@ -35,3 +37,5 @@ Changed = runOnSCC(*I); return Changed; } + +} // End llvm namespace Index: llvm/lib/Analysis/IPA/DependenceGraph.cpp diff -u llvm/lib/Analysis/IPA/DependenceGraph.cpp:1.4 llvm/lib/Analysis/IPA/DependenceGraph.cpp:1.5 --- llvm/lib/Analysis/IPA/DependenceGraph.cpp:1.4 Mon Oct 20 14:43:07 2003 +++ llvm/lib/Analysis/IPA/DependenceGraph.cpp Tue Nov 11 16:41:32 2003 @@ -24,6 +24,7 @@ #include "llvm/Analysis/DependenceGraph.h" #include "llvm/Function.h" +namespace llvm { //---------------------------------------------------------------------------- // class Dependence: @@ -82,3 +83,5 @@ if (const DepGraphNode* dgNode = this->getNode(*II)) dgNode->print(O); } + +} // End llvm namespace Index: llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp diff -u llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp:1.20 llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp:1.21 --- llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp:1.20 Mon Oct 20 14:43:07 2003 +++ llvm/lib/Analysis/IPA/FindUnsafePointerTypes.cpp Tue Nov 11 16:41:32 2003 @@ -30,6 +30,8 @@ #include "llvm/Support/InstIterator.h" #include "Support/CommandLine.h" +namespace llvm { + static RegisterAnalysis X("unsafepointertypes", "Find Unsafe Pointer Types"); @@ -99,3 +101,5 @@ CW << " #" << Counter << ". " << (Value*)*I << "\n"; } } + +} // End llvm namespace Index: llvm/lib/Analysis/IPA/FindUsedTypes.cpp diff -u llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.23 llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.24 --- llvm/lib/Analysis/IPA/FindUsedTypes.cpp:1.23 Sat Nov 1 19:28:41 2003 +++ llvm/lib/Analysis/IPA/FindUsedTypes.cpp Tue Nov 11 16:41:32 2003 @@ -21,6 +21,8 @@ #include "llvm/Assembly/CachedWriter.h" #include "llvm/Support/InstIterator.h" +namespace llvm { + static RegisterAnalysis X("printusedtypes", "Find Used Types"); @@ -106,3 +108,5 @@ E = UsedTypes.end(); I != E; ++I) o << " " << *I << "\n"; } + +} // End llvm namespace Index: llvm/lib/Analysis/IPA/IPModRef.cpp diff -u llvm/lib/Analysis/IPA/IPModRef.cpp:1.19 llvm/lib/Analysis/IPA/IPModRef.cpp:1.20 --- llvm/lib/Analysis/IPA/IPModRef.cpp:1.19 Tue Nov 4 23:55:45 2003 +++ llvm/lib/Analysis/IPA/IPModRef.cpp Tue Nov 11 16:41:32 2003 @@ -23,6 +23,8 @@ #include "Support/StringExtras.h" #include +namespace llvm { + //---------------------------------------------------------------------------- // Private constants and data //---------------------------------------------------------------------------- @@ -441,3 +443,5 @@ { print(std::cerr); } + +} // End llvm namespace Index: llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp diff -u llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.10 llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.11 --- llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.10 Mon Oct 20 14:43:08 2003 +++ llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp Tue Nov 11 16:41:32 2003 @@ -31,6 +31,7 @@ #include "Support/hash_map" #include "Support/hash_set" +namespace llvm { ///-------------------------------------------------------------------------- /// struct ModRefTable: @@ -122,7 +123,7 @@ class ModRefInfoBuilder : public InstVisitor { const DSGraph& funcGraph; const FunctionModRefInfo& funcModRef; - ModRefTable& modRefTable; + struct ModRefTable& modRefTable; ModRefInfoBuilder(); // DO NOT IMPLEMENT ModRefInfoBuilder(const ModRefInfoBuilder&); // DO NOT IMPLEMENT @@ -498,3 +499,5 @@ static RegisterAnalysis Z("memdep", "Memory Dependence Analysis"); + +} // End llvm namespace Index: llvm/lib/Analysis/IPA/PgmDependenceGraph.cpp diff -u llvm/lib/Analysis/IPA/PgmDependenceGraph.cpp:1.3 llvm/lib/Analysis/IPA/PgmDependenceGraph.cpp:1.4 --- llvm/lib/Analysis/IPA/PgmDependenceGraph.cpp:1.3 Mon Oct 20 14:43:08 2003 +++ llvm/lib/Analysis/IPA/PgmDependenceGraph.cpp Tue Nov 11 16:41:32 2003 @@ -30,6 +30,7 @@ #include "llvm/Analysis/PostDominators.h" #include "llvm/Function.h" +namespace llvm { //---------------------------------------------------------------------------- // class DepIterState @@ -253,3 +254,5 @@ static RegisterAnalysis Z("pgmdep", "Enumerate Program Dependence Graph (data and control)"); + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:44:55 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:44:55 2003 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/Lexer.l Parser.cpp ParserInternals.h llvmAsmParser.y Message-ID: <200311112241.QAA20354@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: Lexer.l updated: 1.43 -> 1.44 Parser.cpp updated: 1.12 -> 1.13 ParserInternals.h updated: 1.32 -> 1.33 llvmAsmParser.y updated: 1.137 -> 1.138 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+52 -30) Index: llvm/lib/AsmParser/Lexer.l diff -u llvm/lib/AsmParser/Lexer.l:1.43 llvm/lib/AsmParser/Lexer.l:1.44 --- llvm/lib/AsmParser/Lexer.l:1.43 Tue Oct 21 10:17:12 2003 +++ llvm/lib/AsmParser/Lexer.l Tue Nov 11 16:41:32 2003 @@ -35,6 +35,7 @@ #define RET_TOK(type, Enum, sym) \ llvmAsmlval.type = Instruction::Enum; return sym +namespace llvm { // TODO: All of the static identifiers are figured out by the lexer, // these should be hashed to reduce the lexer size @@ -120,6 +121,10 @@ return BOut; } + +} // End llvm namespace + +using namespace llvm; #define YY_NEVER_INTERACTIVE 1 %} Index: llvm/lib/AsmParser/Parser.cpp diff -u llvm/lib/AsmParser/Parser.cpp:1.12 llvm/lib/AsmParser/Parser.cpp:1.13 --- llvm/lib/AsmParser/Parser.cpp:1.12 Thu Oct 23 13:00:34 2003 +++ llvm/lib/AsmParser/Parser.cpp Tue Nov 11 16:41:32 2003 @@ -15,6 +15,8 @@ #include "llvm/Module.h" #include "llvm/Analysis/Verifier.h" +namespace llvm { + // The useful interface defined by this file... Parse an ASCII file, and return // the internal representation in a nice slice'n'dice'able representation. // @@ -82,3 +84,5 @@ return Result + ": " + Message; } + +} // End llvm namespace Index: llvm/lib/AsmParser/ParserInternals.h diff -u llvm/lib/AsmParser/ParserInternals.h:1.32 llvm/lib/AsmParser/ParserInternals.h:1.33 --- llvm/lib/AsmParser/ParserInternals.h:1.32 Tue Oct 21 10:17:12 2003 +++ llvm/lib/AsmParser/ParserInternals.h Tue Nov 11 16:41:32 2003 @@ -22,18 +22,22 @@ #include "llvm/Assembly/Parser.h" #include "Support/StringExtras.h" -class Module; - // Global variables exported from the lexer... extern std::FILE *llvmAsmin; extern int llvmAsmlineno; // Globals exported by the parser... +extern char* llvmAsmtext; +extern int llvmAsmleng; + +namespace llvm { + +// Globals exported by the parser... extern std::string CurFilename; + +class Module; Module *RunVMAsmParser(const std::string &Filename, FILE *F); -extern char* llvmAsmtext; -extern int llvmAsmleng; // UnEscapeLexed - Run through the specified buffer and change \xx codes to the // appropriate character. If AllowNull is set to false, a \00 value will cause @@ -208,5 +212,7 @@ default: return ((ValuePlaceHolder*)Val)->getLineNum(); } } + +} // End llvm namespace #endif Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.137 llvm/lib/AsmParser/llvmAsmParser.y:1.138 --- llvm/lib/AsmParser/llvmAsmParser.y:1.137 Wed Oct 29 19:38:18 2003 +++ llvm/lib/AsmParser/llvmAsmParser.y Tue Nov 11 16:41:32 2003 @@ -29,6 +29,8 @@ int yylex(); // declaration" of xxx warnings. int yyparse(); +namespace llvm { + static Module *ParserResult; std::string CurFilename; @@ -686,30 +688,34 @@ return Result; } +} // End llvm namespace + +using namespace llvm; + %} %union { - Module *ModuleVal; - Function *FunctionVal; - std::pair *ArgVal; - BasicBlock *BasicBlockVal; - TerminatorInst *TermInstVal; - Instruction *InstVal; - Constant *ConstVal; - - const Type *PrimType; - PATypeHolder *TypeVal; - Value *ValueVal; - - std::vector > *ArgList; - std::vector *ValueList; - std::list *TypeList; - std::list > *PHIList; // Represent the RHS of PHI node - std::vector > *JumpTable; - std::vector *ConstVector; + llvm::Module *ModuleVal; + llvm::Function *FunctionVal; + std::pair *ArgVal; + llvm::BasicBlock *BasicBlockVal; + llvm::TerminatorInst *TermInstVal; + llvm::Instruction *InstVal; + llvm::Constant *ConstVal; + + const llvm::Type *PrimType; + llvm::PATypeHolder *TypeVal; + llvm::Value *ValueVal; + + std::vector > *ArgList; + std::vector *ValueList; + std::list *TypeList; + std::list > *PHIList; // Represent the RHS of PHI node + std::vector > *JumpTable; + std::vector *ConstVector; - GlobalValue::LinkageTypes Linkage; + llvm::GlobalValue::LinkageTypes Linkage; int64_t SInt64Val; uint64_t UInt64Val; int SIntVal; @@ -718,13 +724,13 @@ bool BoolVal; char *StrVal; // This memory is strdup'd! - ValID ValIDVal; // strdup'd memory maybe! + llvm::ValID ValIDVal; // strdup'd memory maybe! - Instruction::BinaryOps BinaryOpVal; - Instruction::TermOps TermOpVal; - Instruction::MemoryOps MemOpVal; - Instruction::OtherOps OtherOpVal; - Module::Endianness Endianness; + llvm::Instruction::BinaryOps BinaryOpVal; + llvm::Instruction::TermOps TermOpVal; + llvm::Instruction::MemoryOps MemOpVal; + llvm::Instruction::OtherOps OtherOpVal; + llvm::Module::Endianness Endianness; } %type Module FunctionList @@ -1891,6 +1897,7 @@ $$ = new GetElementPtrInst(getVal(*$2, $3), *$4); delete $2; delete $4; }; + %% int yyerror(const char *ErrorMsg) { From gaeke at cs.uiuc.edu Tue Nov 11 16:45:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp DSCallSiteIterator.h DataStructure.cpp DataStructureAA.cpp DataStructureOpt.cpp DataStructureStats.cpp GraphChecker.cpp Local.cpp Printer.cpp Steensgaard.cpp TopDownClosure.cpp Message-ID: <200311112241.QAA20386@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.67 -> 1.68 DSCallSiteIterator.h updated: 1.7 -> 1.8 DataStructure.cpp updated: 1.127 -> 1.128 DataStructureAA.cpp updated: 1.11 -> 1.12 DataStructureOpt.cpp updated: 1.3 -> 1.4 DataStructureStats.cpp updated: 1.8 -> 1.9 GraphChecker.cpp updated: 1.8 -> 1.9 Local.cpp updated: 1.69 -> 1.70 Printer.cpp updated: 1.58 -> 1.59 Steensgaard.cpp updated: 1.33 -> 1.34 TopDownClosure.cpp updated: 1.58 -> 1.59 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+46 -6) Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.67 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.68 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.67 Mon Oct 20 14:43:06 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Tue Nov 11 16:41:31 2003 @@ -20,6 +20,8 @@ #include "Support/Debug.h" #include "DSCallSiteIterator.h" +namespace llvm { + namespace { Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph"); Statistic<> NumBUInlines("budatastructures", "Number of graphs inlined"); @@ -316,3 +318,4 @@ //Graph.writeGraphToFile(std::cerr, "bu_" + F.getName()); } +} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h diff -u llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.7 llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.8 --- llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h:1.7 Sat Nov 8 15:55:50 2003 +++ llvm/lib/Analysis/DataStructure/DSCallSiteIterator.h Tue Nov 11 16:41:32 2003 @@ -19,6 +19,8 @@ #include "llvm/Analysis/DSGraph.h" #include "llvm/Function.h" +namespace llvm { + struct DSCallSiteIterator { // FCs are the edges out of the current node are the call site targets... const std::vector *FCs; @@ -128,5 +130,7 @@ DSCallSiteIterator tmp = *this; ++*this; return tmp; } }; + +} // End llvm namespace #endif Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.127 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.128 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.127 Tue Nov 11 14:12:32 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Tue Nov 11 16:41:32 2003 @@ -23,6 +23,8 @@ #include "Support/Timer.h" #include +namespace llvm { + namespace { Statistic<> NumFolds ("dsnode", "Number of nodes completely folded"); Statistic<> NumCallNodesMerged("dsnode", "Number of call nodes merged"); @@ -161,7 +163,6 @@ return getSize() == 1 && Ty == Type::VoidTy && isArray(); } - namespace { /// TypeElementWalker Class - Used for implementation of physical subtyping... /// @@ -252,7 +253,7 @@ } } }; -} +} // end anonymous namespace /// ElementTypesAreCompatible - Check to see if the specified types are /// "physically" compatible. If so, return true, else return false. We only @@ -1639,6 +1640,7 @@ removeTriviallyDeadNodes(); } + /// computeNodeMapping - Given roots in two different DSGraphs, traverse the /// nodes reachable from the two graphs, computing the mapping of nodes from /// the first to the second graph. @@ -1669,3 +1671,4 @@ computeNodeMapping(N1->getLink(i), N2->getLink(N2Idx+i), NodeMap); } +} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.11 llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.12 --- llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.11 Mon Oct 20 14:43:06 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Tue Nov 11 16:41:32 2003 @@ -17,6 +17,8 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Module.h" +namespace llvm { + namespace { class DSAA : public Pass, public AliasAnalysis { TDDataStructures *TD; @@ -176,3 +178,5 @@ #endif return getAnalysis().getMustAliases(P, RetVals); } + +} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.3 llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.4 --- llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.3 Mon Oct 20 14:43:06 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp Tue Nov 11 16:41:32 2003 @@ -18,6 +18,8 @@ #include "llvm/Constant.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> NumGlobalsConstanted("ds-opt", "Number of globals marked constant"); @@ -47,7 +49,6 @@ RegisterOpt X("ds-opt", "DSA-based simple optimizations"); } - /// OptimizeGlobals - This method uses information taken from DSA to optimize /// global variables. /// @@ -96,3 +97,5 @@ } return Changed; } + +} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.8 llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.9 --- llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.8 Mon Oct 20 14:43:06 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Tue Nov 11 16:41:32 2003 @@ -19,6 +19,8 @@ #include "Support/Statistic.h" #include +namespace llvm { + namespace { Statistic<> TotalNumCallees("totalcallees", "Total number of callee functions at all indirect call sites"); @@ -139,3 +141,5 @@ visit(F); return true; } + +} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/GraphChecker.cpp diff -u llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.8 llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.9 --- llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.8 Mon Oct 20 14:43:06 2003 +++ llvm/lib/Analysis/DataStructure/GraphChecker.cpp Tue Nov 11 16:41:32 2003 @@ -29,6 +29,8 @@ #include "llvm/Value.h" #include +namespace llvm { + namespace { enum DSPass { local, bu, td }; cl::opt @@ -193,3 +195,5 @@ } } } + +} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.69 llvm/lib/Analysis/DataStructure/Local.cpp:1.70 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.69 Sat Nov 8 21:32:52 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Tue Nov 11 16:41:32 2003 @@ -28,6 +28,8 @@ // #include "llvm/Module.h" +namespace llvm { + static RegisterAnalysis X("datastructure", "Local Data Structure Analysis"); @@ -41,8 +43,8 @@ return false; } } -using namespace DS; +using namespace DS; namespace { cl::opt @@ -144,6 +146,8 @@ }; } +using namespace DS; + //===----------------------------------------------------------------------===// // DSGraph constructor - Simply use the GraphBuilder to construct the local // graph. @@ -617,3 +621,5 @@ delete GlobalsGraph; GlobalsGraph = 0; } + +} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.58 llvm/lib/Analysis/DataStructure/Printer.cpp:1.59 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.58 Mon Oct 20 14:43:06 2003 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Tue Nov 11 16:41:32 2003 @@ -23,6 +23,8 @@ #include #include +namespace llvm { + // OnlyPrintMain - The DataStructure printer exposes this option to allow // printing of only the graph for "main". // @@ -32,7 +34,6 @@ Statistic<> NumFoldedNodes ("dsnode", "Number of folded nodes (in final graph)"); } - void DSNode::dump() const { print(std::cerr, 0); } static std::string getCaption(const DSNode *N, const DSGraph *G) { @@ -280,3 +281,5 @@ void TDDataStructures::print(std::ostream &O, const Module *M) const { printCollection(*this, O, M, "td."); } + +} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.33 llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.34 --- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.33 Sun Nov 2 16:27:28 2003 +++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Tue Nov 11 16:41:32 2003 @@ -20,6 +20,8 @@ #include "llvm/Module.h" #include "Support/Debug.h" +namespace llvm { + namespace { class Steens : public Pass, public AliasAnalysis { DSGraph *ResultGraph; @@ -76,7 +78,6 @@ RegisterAnalysisGroup Y; } - /// ResolveFunctionCall - Resolve the actual arguments of a call to function F /// with the specified call site descriptor. This function links the arguments /// and the return value for the call site context-insensitively. @@ -235,3 +236,5 @@ // return getAnalysis().alias(V1, V1Size, V2, V2Size); } + +} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.58 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.59 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.58 Sat Nov 8 15:17:37 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Tue Nov 11 16:41:32 2003 @@ -21,6 +21,8 @@ #include "Support/Debug.h" #include "Support/Statistic.h" +namespace llvm { + namespace { RegisterAnalysis // Register the pass Y("tddatastructure", "Top-down Data Structure Analysis"); @@ -310,3 +312,4 @@ << Graph.getFunctionCalls().size() << "]\n"); } +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:45:08 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:08 2003 Subject: [llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp Message-ID: <200311112241.QAA20377@zion.cs.uiuc.edu> Changes in directory llvm/lib/CWriter: Writer.cpp updated: 1.142 -> 1.143 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+16 -12) Index: llvm/lib/CWriter/Writer.cpp diff -u llvm/lib/CWriter/Writer.cpp:1.142 llvm/lib/CWriter/Writer.cpp:1.143 --- llvm/lib/CWriter/Writer.cpp:1.142 Mon Nov 3 11:35:00 2003 +++ llvm/lib/CWriter/Writer.cpp Tue Nov 11 16:41:32 2003 @@ -31,6 +31,8 @@ #include #include +namespace llvm { + namespace { class CWriter : public Pass, public InstVisitor { std::ostream &Out; @@ -161,7 +163,6 @@ void printIndexingExpression(Value *Ptr, User::op_iterator I, User::op_iterator E); }; -} // Pass the Type* and the variable name and this prints out the variable // declaration. @@ -339,7 +340,7 @@ // compiler agreeing on the conversion process (which is pretty likely since we // only deal in IEEE FP). // -static bool isFPCSafeToPrint(const ConstantFP *CFP) { +bool isFPCSafeToPrint(const ConstantFP *CFP) { #if HAVE_PRINTF_A char Buffer[100]; sprintf(Buffer, "%a", CFP->getValue()); @@ -563,7 +564,7 @@ // generateCompilerSpecificCode - This is where we add conditional compilation // directives to cater to specific compilers as need be. // -static void generateCompilerSpecificCode(std::ostream& Out) { +void generateCompilerSpecificCode(std::ostream& Out) { // Alloca is hard to get, and we don't want to include stdlib.h here... Out << "/* get a declaration for alloca */\n" << "#ifdef sun\n" @@ -1058,7 +1059,7 @@ emittedInvoke = true; } -static bool isGotoCodeNecessary(BasicBlock *From, BasicBlock *To) { +bool isGotoCodeNecessary(BasicBlock *From, BasicBlock *To) { // If PHI nodes need copies, we need the copy code... if (isa(To->front()) || From->getNext() != To) // Not directly successor, need goto @@ -1195,10 +1196,10 @@ void CWriter::visitCallInst(CallInst &I) { // Handle intrinsic function calls first... if (Function *F = I.getCalledFunction()) - if (LLVMIntrinsic::ID ID = (LLVMIntrinsic::ID)F->getIntrinsicID()) { + if (Intrinsic::ID ID = (Intrinsic::ID)F->getIntrinsicID()) { switch (ID) { default: assert(0 && "Unknown LLVM intrinsic!"); - case LLVMIntrinsic::va_start: + case Intrinsic::va_start: Out << "0; "; Out << "va_start(*(va_list*)&" << Mang->getValueName(&I) << ", "; @@ -1212,28 +1213,28 @@ writeOperand(&I.getParent()->getParent()->aback()); Out << ")"; return; - case LLVMIntrinsic::va_end: + case Intrinsic::va_end: Out << "va_end(*(va_list*)&"; writeOperand(I.getOperand(1)); Out << ")"; return; - case LLVMIntrinsic::va_copy: + case Intrinsic::va_copy: Out << "0;"; Out << "va_copy(*(va_list*)&" << Mang->getValueName(&I) << ", "; Out << "*(va_list*)&"; writeOperand(I.getOperand(1)); Out << ")"; return; - case LLVMIntrinsic::setjmp: - case LLVMIntrinsic::sigsetjmp: + case Intrinsic::setjmp: + case Intrinsic::sigsetjmp: // This intrinsic should never exist in the program, but until we get // setjmp/longjmp transformations going on, we should codegen it to // something reasonable. This will allow code that never calls longjmp // to work. Out << "0"; return; - case LLVMIntrinsic::longjmp: - case LLVMIntrinsic::siglongjmp: + case Intrinsic::longjmp: + case Intrinsic::siglongjmp: // Longjmp is not implemented, and never will be. It would cause an // exception throw. Out << "abort()"; @@ -1385,9 +1386,12 @@ Out << ");\n va_end(Tmp); }"; } +} //===----------------------------------------------------------------------===// // External Interface declaration //===----------------------------------------------------------------------===// Pass *createWriteToCPass(std::ostream &o) { return new CWriter(o); } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:45:15 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:15 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Support/CFG.h CallSite.h ConstantRange.h InstIterator.h InstVisitor.h Mangler.h PassNameParser.h ToolRunner.h ValueHolder.h Message-ID: <200311112241.QAA20191@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Support: CFG.h updated: 1.17 -> 1.18 CallSite.h updated: 1.12 -> 1.13 ConstantRange.h updated: 1.4 -> 1.5 InstIterator.h updated: 1.8 -> 1.9 InstVisitor.h updated: 1.25 -> 1.26 Mangler.h updated: 1.7 -> 1.8 PassNameParser.h updated: 1.8 -> 1.9 ToolRunner.h updated: 1.5 -> 1.6 ValueHolder.h updated: 1.4 -> 1.5 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+42 -1) Index: llvm/include/llvm/Support/CFG.h diff -u llvm/include/llvm/Support/CFG.h:1.17 llvm/include/llvm/Support/CFG.h:1.18 --- llvm/include/llvm/Support/CFG.h:1.17 Sun Nov 9 22:23:52 2003 +++ llvm/include/llvm/Support/CFG.h Tue Nov 11 16:41:31 2003 @@ -20,6 +20,8 @@ #include "llvm/InstrTypes.h" #include "Support/iterator" +namespace llvm { + //===--------------------------------------------------------------------===// // BasicBlock pred_iterator definition //===--------------------------------------------------------------------===// @@ -263,5 +265,7 @@ return &G.Graph->getEntryBlock(); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Support/CallSite.h diff -u llvm/include/llvm/Support/CallSite.h:1.12 llvm/include/llvm/Support/CallSite.h:1.13 --- llvm/include/llvm/Support/CallSite.h:1.12 Fri Nov 7 13:25:22 2003 +++ llvm/include/llvm/Support/CallSite.h Tue Nov 11 16:41:31 2003 @@ -23,6 +23,8 @@ #include "llvm/Instruction.h" +namespace llvm { + class CallInst; class InvokeInst; @@ -99,5 +101,7 @@ return getInstruction() < CS.getInstruction(); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Support/ConstantRange.h diff -u llvm/include/llvm/Support/ConstantRange.h:1.4 llvm/include/llvm/Support/ConstantRange.h:1.5 --- llvm/include/llvm/Support/ConstantRange.h:1.4 Mon Oct 20 15:19:26 2003 +++ llvm/include/llvm/Support/ConstantRange.h Tue Nov 11 16:41:31 2003 @@ -26,6 +26,9 @@ #include "Support/DataTypes.h" #include + +namespace llvm { + class ConstantIntegral; class Type; @@ -123,5 +126,7 @@ CR.print(OS); return OS; } + +} // End llvm namespace #endif Index: llvm/include/llvm/Support/InstIterator.h diff -u llvm/include/llvm/Support/InstIterator.h:1.8 llvm/include/llvm/Support/InstIterator.h:1.9 --- llvm/include/llvm/Support/InstIterator.h:1.8 Mon Oct 20 15:19:27 2003 +++ llvm/include/llvm/Support/InstIterator.h Tue Nov 11 16:41:31 2003 @@ -22,6 +22,8 @@ #include "llvm/BasicBlock.h" #include "llvm/Function.h" +namespace llvm { + // This class implements inst_begin() & inst_end() for // inst_iterator and const_inst_iterator's. // @@ -136,5 +138,7 @@ inline const_inst_iterator inst_end(const Function &F) { return const_inst_iterator(F, true); } + +} // End llvm namespace #endif Index: llvm/include/llvm/Support/InstVisitor.h diff -u llvm/include/llvm/Support/InstVisitor.h:1.25 llvm/include/llvm/Support/InstVisitor.h:1.26 --- llvm/include/llvm/Support/InstVisitor.h:1.25 Mon Oct 20 15:19:27 2003 +++ llvm/include/llvm/Support/InstVisitor.h Tue Nov 11 16:41:31 2003 @@ -52,6 +52,8 @@ #include "llvm/Instruction.h" +namespace llvm { + class Module; // We operate on opaque instruction classes, so forward declare all instruction @@ -64,7 +66,6 @@ class TerminatorInst; class BinaryOperator; class AllocationInst; - #define DELEGATE(CLASS_TO_VISIT) \ return ((SubClass*)this)->visit##CLASS_TO_VISIT((CLASS_TO_VISIT&)I) @@ -185,5 +186,7 @@ }; #undef DELEGATE + +} // End llvm namespace #endif Index: llvm/include/llvm/Support/Mangler.h diff -u llvm/include/llvm/Support/Mangler.h:1.7 llvm/include/llvm/Support/Mangler.h:1.8 --- llvm/include/llvm/Support/Mangler.h:1.7 Mon Oct 20 15:19:27 2003 +++ llvm/include/llvm/Support/Mangler.h Tue Nov 11 16:41:31 2003 @@ -14,12 +14,19 @@ #ifndef LLVM_SUPPORT_MANGLER_H #define LLVM_SUPPORT_MANGLER_H +namespace llvm { + class Value; class Module; + +} // End llvm namespace + #include #include #include +namespace llvm { + class Mangler { /// This keeps track of which global values have had their names /// mangled in the current module. @@ -53,5 +60,7 @@ /// static std::string makeNameProper(const std::string &x); }; + +} // End llvm namespace #endif // LLVM_SUPPORT_MANGLER_H Index: llvm/include/llvm/Support/PassNameParser.h diff -u llvm/include/llvm/Support/PassNameParser.h:1.8 llvm/include/llvm/Support/PassNameParser.h:1.9 --- llvm/include/llvm/Support/PassNameParser.h:1.8 Mon Oct 20 15:19:29 2003 +++ llvm/include/llvm/Support/PassNameParser.h Tue Nov 11 16:41:31 2003 @@ -28,6 +28,8 @@ #include #include +namespace llvm { + //===----------------------------------------------------------------------===// // PassNameParser class - Make use of the pass registration mechanism to // automatically add a command line argument to opt for each pass. @@ -113,5 +115,7 @@ return (P->getPassType() & Flags) == 0; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Support/ToolRunner.h diff -u llvm/include/llvm/Support/ToolRunner.h:1.5 llvm/include/llvm/Support/ToolRunner.h:1.6 --- llvm/include/llvm/Support/ToolRunner.h:1.5 Mon Oct 20 15:19:35 2003 +++ llvm/include/llvm/Support/ToolRunner.h Tue Nov 11 16:41:31 2003 @@ -20,6 +20,8 @@ #include "Support/SystemUtils.h" #include +namespace llvm { + class CBE; class LLC; @@ -136,5 +138,7 @@ // int OutputAsm(const std::string &Bytecode, std::string &OutputAsmFile); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Support/ValueHolder.h diff -u llvm/include/llvm/Support/ValueHolder.h:1.4 llvm/include/llvm/Support/ValueHolder.h:1.5 --- llvm/include/llvm/Support/ValueHolder.h:1.4 Mon Oct 20 15:19:35 2003 +++ llvm/include/llvm/Support/ValueHolder.h Tue Nov 11 16:41:31 2003 @@ -20,6 +20,8 @@ #include "llvm/User.h" +namespace llvm { + struct ValueHolder : public User { ValueHolder(Value *V = 0); ValueHolder(const ValueHolder &VH) : User(VH.getType(), Value::TypeVal) { @@ -45,5 +47,7 @@ OS << "ValueHolder"; } }; + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:45:21 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:21 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/LiveVar/BBLiveVar.cpp BBLiveVar.h FunctionLiveVarInfo.cpp ValueSet.cpp Message-ID: <200311112241.QAA20329@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/LiveVar: BBLiveVar.cpp updated: 1.38 -> 1.39 BBLiveVar.h updated: 1.24 -> 1.25 FunctionLiveVarInfo.cpp updated: 1.49 -> 1.50 ValueSet.cpp updated: 1.15 -> 1.16 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+14 -3) Index: llvm/lib/Analysis/LiveVar/BBLiveVar.cpp diff -u llvm/lib/Analysis/LiveVar/BBLiveVar.cpp:1.38 llvm/lib/Analysis/LiveVar/BBLiveVar.cpp:1.39 --- llvm/lib/Analysis/LiveVar/BBLiveVar.cpp:1.38 Mon Oct 20 15:52:23 2003 +++ llvm/lib/Analysis/LiveVar/BBLiveVar.cpp Tue Nov 11 16:41:32 2003 @@ -21,6 +21,7 @@ /// BROKEN: Should not include sparc stuff directly into here #include "../../Target/Sparc/SparcInternals.h" // Only for PHI defn +namespace llvm { BBLiveVar::BBLiveVar(const BasicBlock &bb, MachineBasicBlock &mbb, unsigned id) : BB(bb), MBB(mbb), POID(id) { @@ -229,6 +230,4 @@ std::cerr << " Out: "; printSet(OutSet); std::cerr << "\n"; } - - - +} // End llvm namespace Index: llvm/lib/Analysis/LiveVar/BBLiveVar.h diff -u llvm/lib/Analysis/LiveVar/BBLiveVar.h:1.24 llvm/lib/Analysis/LiveVar/BBLiveVar.h:1.25 --- llvm/lib/Analysis/LiveVar/BBLiveVar.h:1.24 Tue Oct 21 10:17:12 2003 +++ llvm/lib/Analysis/LiveVar/BBLiveVar.h Tue Nov 11 16:41:32 2003 @@ -17,6 +17,9 @@ #include "llvm/CodeGen/ValueSet.h" #include "Support/hash_map" + +namespace llvm { + class BasicBlock; class Value; class MachineBasicBlock; @@ -81,5 +84,7 @@ void printAllSets() const; // for printing Def/In/Out sets void printInOutSets() const; // for printing In/Out sets }; + +} // End llvm namespace #endif Index: llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp diff -u llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp:1.49 llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp:1.50 --- llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp:1.49 Mon Oct 20 15:52:23 2003 +++ llvm/lib/Analysis/LiveVar/FunctionLiveVarInfo.cpp Tue Nov 11 16:41:32 2003 @@ -23,6 +23,8 @@ #include "Support/CommandLine.h" #include "BBLiveVar.h" +namespace llvm { + static RegisterAnalysis X("livevar", "Live Variable Analysis"); @@ -318,3 +320,5 @@ SetAI = NewSet; } } + +} // End llvm namespace Index: llvm/lib/Analysis/LiveVar/ValueSet.cpp diff -u llvm/lib/Analysis/LiveVar/ValueSet.cpp:1.15 llvm/lib/Analysis/LiveVar/ValueSet.cpp:1.16 --- llvm/lib/Analysis/LiveVar/ValueSet.cpp:1.15 Mon Oct 20 14:43:14 2003 +++ llvm/lib/Analysis/LiveVar/ValueSet.cpp Tue Nov 11 16:41:32 2003 @@ -11,6 +11,8 @@ #include "llvm/Value.h" #include +namespace llvm { + std::ostream &operator<<(std::ostream &O, RAV V) { // func to print a Value const Value &v = V.V; if (v.hasName()) @@ -26,3 +28,4 @@ std::cerr << RAV(*I); } +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:45:27 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:27 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/AliasAnalysis.cpp AliasAnalysisCounter.cpp AliasAnalysisEvaluator.cpp AliasSetTracker.cpp BasicAliasAnalysis.cpp CFGPrinter.cpp Expressions.cpp InductionVariable.cpp InstCount.cpp Interval.cpp IntervalPartition.cpp LoadValueNumbering.cpp LoopInfo.cpp PostDominators.cpp PrintSCC.cpp ValueNumbering.cpp Message-ID: <200311112241.QAA20291@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: AliasAnalysis.cpp updated: 1.14 -> 1.15 AliasAnalysisCounter.cpp updated: 1.5 -> 1.6 AliasAnalysisEvaluator.cpp updated: 1.8 -> 1.9 AliasSetTracker.cpp updated: 1.7 -> 1.8 BasicAliasAnalysis.cpp updated: 1.15 -> 1.16 CFGPrinter.cpp updated: 1.3 -> 1.4 Expressions.cpp updated: 1.37 -> 1.38 InductionVariable.cpp updated: 1.31 -> 1.32 InstCount.cpp updated: 1.6 -> 1.7 Interval.cpp updated: 1.14 -> 1.15 IntervalPartition.cpp updated: 1.23 -> 1.24 LoadValueNumbering.cpp updated: 1.9 -> 1.10 LoopInfo.cpp updated: 1.44 -> 1.45 PostDominators.cpp updated: 1.44 -> 1.45 PrintSCC.cpp updated: 1.8 -> 1.9 ValueNumbering.cpp updated: 1.6 -> 1.7 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+62 -11) Index: llvm/lib/Analysis/AliasAnalysis.cpp diff -u llvm/lib/Analysis/AliasAnalysis.cpp:1.14 llvm/lib/Analysis/AliasAnalysis.cpp:1.15 --- llvm/lib/Analysis/AliasAnalysis.cpp:1.14 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/AliasAnalysis.cpp Tue Nov 11 16:41:31 2003 @@ -29,6 +29,8 @@ #include "llvm/iMemory.h" #include "llvm/Target/TargetData.h" +namespace llvm { + // Register the AliasAnalysis interface, providing a nice name to refer to. namespace { RegisterAnalysisGroup Z("Alias Analysis"); @@ -123,3 +125,5 @@ // Declare that we implement the AliasAnalysis interface RegisterAnalysisGroup Y; } // End of anonymous namespace + +} // End llvm namespace Index: llvm/lib/Analysis/AliasAnalysisCounter.cpp diff -u llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.5 llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.6 --- llvm/lib/Analysis/AliasAnalysisCounter.cpp:1.5 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/AliasAnalysisCounter.cpp Tue Nov 11 16:41:31 2003 @@ -16,6 +16,8 @@ #include "llvm/Pass.h" #include +namespace llvm { + namespace { class AliasAnalysisCounter : public Pass, public AliasAnalysis { unsigned No, May, Must; @@ -108,3 +110,5 @@ X("count-aa", "Count Alias Analysis Query Responses"); RegisterAnalysisGroup Y; } + +} // End llvm namespace Index: llvm/lib/Analysis/AliasAnalysisEvaluator.cpp diff -u llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.8 llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.9 --- llvm/lib/Analysis/AliasAnalysisEvaluator.cpp:1.8 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/AliasAnalysisEvaluator.cpp Tue Nov 11 16:41:31 2003 @@ -26,6 +26,8 @@ #include "Support/CommandLine.h" #include +namespace llvm { + namespace { cl::opt PrintNo ("print-no-aliases", cl::ReallyHidden); cl::opt PrintMay ("print-may-aliases", cl::ReallyHidden); @@ -114,3 +116,5 @@ << May*100/Sum << "%/" << Must*100/Sum<<"%\n"; return false; } + +} // End llvm namespace Index: llvm/lib/Analysis/AliasSetTracker.cpp diff -u llvm/lib/Analysis/AliasSetTracker.cpp:1.7 llvm/lib/Analysis/AliasSetTracker.cpp:1.8 --- llvm/lib/Analysis/AliasSetTracker.cpp:1.7 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/AliasSetTracker.cpp Tue Nov 11 16:41:31 2003 @@ -21,6 +21,8 @@ #include "llvm/Assembly/Writer.h" #include "llvm/Support/InstIterator.h" +namespace llvm { + /// mergeSetIn - Merge the specified alias set into this alias set... /// void AliasSet::mergeSetIn(AliasSet &AS) { @@ -294,7 +296,6 @@ void AliasSet::dump() const { print (std::cerr); } void AliasSetTracker::dump() const { print(std::cerr); } - //===----------------------------------------------------------------------===// // AliasSetPrinter Pass //===----------------------------------------------------------------------===// @@ -328,3 +329,5 @@ RegisterPass X("print-alias-sets", "Alias Set Printer", PassInfo::Analysis | PassInfo::Optimization); } + +} // End llvm namespace Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.15 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.16 --- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.15 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Tue Nov 11 16:41:31 2003 @@ -23,10 +23,11 @@ #include "llvm/DerivedTypes.h" #include "llvm/Target/TargetData.h" +namespace llvm { + // Make sure that anything that uses AliasAnalysis pulls in this file... void BasicAAStub() {} - namespace { struct BasicAliasAnalysis : public ImmutablePass, public AliasAnalysis { @@ -60,8 +61,6 @@ InitializeAliasAnalysis(this); } - - // hasUniqueAddress - Return true if the specified value points to something // with a unique, discernable, address. static inline bool hasUniqueAddress(const Value *V) { @@ -364,3 +363,4 @@ return MayAlias; } +} // End llvm namespace Index: llvm/lib/Analysis/CFGPrinter.cpp diff -u llvm/lib/Analysis/CFGPrinter.cpp:1.3 llvm/lib/Analysis/CFGPrinter.cpp:1.4 --- llvm/lib/Analysis/CFGPrinter.cpp:1.3 Wed Oct 22 11:30:58 2003 +++ llvm/lib/Analysis/CFGPrinter.cpp Tue Nov 11 16:41:31 2003 @@ -26,6 +26,8 @@ #include #include +namespace llvm { + /// CFGOnly flag - This is used to control whether or not the CFG graph printer /// prints out the contents of basic blocks or not. This is acceptable because /// this code is only really used for debugging purposes. @@ -112,9 +114,6 @@ "Print CFG of function to 'dot' file"); }; - - - /// viewCFG - This function is meant for use from the debugger. You can just /// say 'call F->viewCFG()' and a ghostview window should pop up from the /// program, displaying the CFG of the current function. This depends on there @@ -154,3 +153,5 @@ viewCFG(); CFGOnly = false; } + +} // End llvm namespace Index: llvm/lib/Analysis/Expressions.cpp diff -u llvm/lib/Analysis/Expressions.cpp:1.37 llvm/lib/Analysis/Expressions.cpp:1.38 --- llvm/lib/Analysis/Expressions.cpp:1.37 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/Expressions.cpp Tue Nov 11 16:41:31 2003 @@ -18,6 +18,8 @@ #include "llvm/ConstantHandling.h" #include "llvm/Function.h" +namespace llvm { + ExprType::ExprType(Value *Val) { if (Val) if (ConstantInt *CPI = dyn_cast(Val)) { @@ -352,3 +354,5 @@ // Otherwise, I don't know anything about this value! return I; } + +} // End llvm namespace Index: llvm/lib/Analysis/InductionVariable.cpp diff -u llvm/lib/Analysis/InductionVariable.cpp:1.31 llvm/lib/Analysis/InductionVariable.cpp:1.32 --- llvm/lib/Analysis/InductionVariable.cpp:1.31 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/InductionVariable.cpp Tue Nov 11 16:41:31 2003 @@ -36,6 +36,8 @@ #include "llvm/Assembly/Writer.h" #include "Support/Debug.h" +namespace llvm { + static bool isLoopInvariant(const Value *V, const Loop *L) { if (const Instruction *I = dyn_cast(V)) return !L->contains(I->getParent()); @@ -299,3 +301,5 @@ } o << "\n"; } + +} // End llvm namespace Index: llvm/lib/Analysis/InstCount.cpp diff -u llvm/lib/Analysis/InstCount.cpp:1.6 llvm/lib/Analysis/InstCount.cpp:1.7 --- llvm/lib/Analysis/InstCount.cpp:1.6 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/InstCount.cpp Tue Nov 11 16:41:31 2003 @@ -16,6 +16,8 @@ #include "llvm/Support/InstVisitor.h" #include "Support/Statistic.h" +namespace llvm { + namespace { Statistic<> TotalInsts ("instcount", "Number of instructions (of all types)"); Statistic<> TotalBlocks("instcount", "Number of basic blocks"); @@ -62,3 +64,5 @@ visit(F); return false; } + +} // End llvm namespace Index: llvm/lib/Analysis/Interval.cpp diff -u llvm/lib/Analysis/Interval.cpp:1.14 llvm/lib/Analysis/Interval.cpp:1.15 --- llvm/lib/Analysis/Interval.cpp:1.14 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/Interval.cpp Tue Nov 11 16:41:31 2003 @@ -17,6 +17,8 @@ #include "llvm/Support/CFG.h" #include +using namespace llvm; + //===----------------------------------------------------------------------===// // Interval Implementation //===----------------------------------------------------------------------===// Index: llvm/lib/Analysis/IntervalPartition.cpp diff -u llvm/lib/Analysis/IntervalPartition.cpp:1.23 llvm/lib/Analysis/IntervalPartition.cpp:1.24 --- llvm/lib/Analysis/IntervalPartition.cpp:1.23 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/IntervalPartition.cpp Tue Nov 11 16:41:31 2003 @@ -15,6 +15,8 @@ #include "llvm/Analysis/IntervalIterator.h" #include "Support/STLExtras.h" +namespace llvm { + static RegisterAnalysis X("intervals", "Interval Partition Construction", true); @@ -108,3 +110,5 @@ for_each(Intervals.begin(), Intervals.end(), bind_obj(this, &IntervalPartition::updatePredecessors)); } + +} // End llvm namespace Index: llvm/lib/Analysis/LoadValueNumbering.cpp diff -u llvm/lib/Analysis/LoadValueNumbering.cpp:1.9 llvm/lib/Analysis/LoadValueNumbering.cpp:1.10 --- llvm/lib/Analysis/LoadValueNumbering.cpp:1.9 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/LoadValueNumbering.cpp Tue Nov 11 16:41:31 2003 @@ -31,6 +31,8 @@ #include #include +namespace llvm { + namespace { // FIXME: This should not be a FunctionPass. struct LoadVN : public FunctionPass, public ValueNumbering { @@ -70,8 +72,6 @@ RegisterAnalysisGroup Y; } - - Pass *createLoadValueNumberingPass() { return new LoadVN(); } @@ -340,3 +340,5 @@ return true; } } + +} // End llvm namespace Index: llvm/lib/Analysis/LoopInfo.cpp diff -u llvm/lib/Analysis/LoopInfo.cpp:1.44 llvm/lib/Analysis/LoopInfo.cpp:1.45 --- llvm/lib/Analysis/LoopInfo.cpp:1.44 Wed Oct 22 11:41:21 2003 +++ llvm/lib/Analysis/LoopInfo.cpp Tue Nov 11 16:41:31 2003 @@ -21,6 +21,8 @@ #include "Support/DepthFirstIterator.h" #include +namespace llvm { + static RegisterAnalysis X("loops", "Natural Loop Construction", true); @@ -367,3 +369,5 @@ I = std::find(I+1, ExitBlocks.end(), Old); } } + +} // End llvm namespace Index: llvm/lib/Analysis/PostDominators.cpp diff -u llvm/lib/Analysis/PostDominators.cpp:1.44 llvm/lib/Analysis/PostDominators.cpp:1.45 --- llvm/lib/Analysis/PostDominators.cpp:1.44 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/PostDominators.cpp Tue Nov 11 16:41:31 2003 @@ -17,6 +17,8 @@ #include "Support/DepthFirstIterator.h" #include "Support/SetOperations.h" +namespace llvm { + //===----------------------------------------------------------------------===// // PostDominatorSet Implementation //===----------------------------------------------------------------------===// @@ -214,3 +216,5 @@ // stub - a dummy function to make linking work ok. void PostDominanceFrontier::stub() { } + +} // End llvm namespace Index: llvm/lib/Analysis/PrintSCC.cpp diff -u llvm/lib/Analysis/PrintSCC.cpp:1.8 llvm/lib/Analysis/PrintSCC.cpp:1.9 --- llvm/lib/Analysis/PrintSCC.cpp:1.8 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/PrintSCC.cpp Tue Nov 11 16:41:31 2003 @@ -31,6 +31,8 @@ #include "llvm/Support/CFG.h" #include "Support/SCCIterator.h" +namespace llvm { + namespace { struct CFGSCC : public FunctionPass { bool runOnFunction(Function& func); @@ -101,3 +103,5 @@ return true; } + +} // End llvm namespace Index: llvm/lib/Analysis/ValueNumbering.cpp diff -u llvm/lib/Analysis/ValueNumbering.cpp:1.6 llvm/lib/Analysis/ValueNumbering.cpp:1.7 --- llvm/lib/Analysis/ValueNumbering.cpp:1.6 Mon Oct 20 14:43:04 2003 +++ llvm/lib/Analysis/ValueNumbering.cpp Tue Nov 11 16:41:31 2003 @@ -19,6 +19,8 @@ #include "llvm/Type.h" #include "llvm/iMemory.h" +namespace llvm { + // Register the ValueNumbering interface, providing a nice name to refer to. static RegisterAnalysisGroup X("Value Numbering"); @@ -39,6 +41,7 @@ // into the tool that uses it. As such, we register and implement the class // here. // + namespace { /// BasicVN - This class is the default implementation of the ValueNumbering /// interface. It walks the SSA def-use chains to trivially identify @@ -62,9 +65,7 @@ // Declare that we implement the ValueNumbering interface RegisterAnalysisGroup Y; -} // End of anonymous namespace -namespace { /// BVNImpl - Implement BasicVN in terms of a visitor class that /// handles the different types of instructions as appropriate. /// @@ -190,3 +191,5 @@ RetVals.push_back(Other); } } + +} // End llvm namespace From gaeke at cs.uiuc.edu Tue Nov 11 16:45:33 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:33 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h Cloning.h DemoteRegToStack.h Linker.h Local.h PromoteMemToReg.h UnifyFunctionExitNodes.h Message-ID: <200311112241.QAA20230@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms/Utils: BasicBlockUtils.h updated: 1.7 -> 1.8 Cloning.h updated: 1.12 -> 1.13 DemoteRegToStack.h updated: 1.3 -> 1.4 Linker.h updated: 1.7 -> 1.8 Local.h updated: 1.11 -> 1.12 PromoteMemToReg.h updated: 1.4 -> 1.5 UnifyFunctionExitNodes.h updated: 1.16 -> 1.17 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+33 -2) Index: llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h diff -u llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h:1.7 llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h:1.8 --- llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h:1.7 Sun Nov 9 22:42:13 2003 +++ llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h Tue Nov 11 16:41:31 2003 @@ -19,6 +19,9 @@ #include "llvm/BasicBlock.h" #include "llvm/Support/CFG.h" + +namespace llvm { + class Instruction; class Pass; @@ -50,7 +53,6 @@ // void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum); - /// isCriticalEdge - Return true if the specified edge is a critical edge. /// Critical edges are edges from a block with multiple successors to a block /// with multiple predecessors. @@ -82,5 +84,6 @@ return MadeChange; } +} // End llvm namespace #endif Index: llvm/include/llvm/Transforms/Utils/Cloning.h diff -u llvm/include/llvm/Transforms/Utils/Cloning.h:1.12 llvm/include/llvm/Transforms/Utils/Cloning.h:1.13 --- llvm/include/llvm/Transforms/Utils/Cloning.h:1.12 Mon Oct 20 15:19:47 2003 +++ llvm/include/llvm/Transforms/Utils/Cloning.h Tue Nov 11 16:41:31 2003 @@ -20,6 +20,9 @@ #include #include + +namespace llvm { + class Module; class Function; class BasicBlock; @@ -108,5 +111,7 @@ /// phi nodes, adds it to the same function as the original (although there is /// no jump to it) and returns the new vector of basic blocks. std::vector CloneTrace(const std::vector &origTrace); + +} // End llvm namespace #endif Index: llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h diff -u llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h:1.3 llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h:1.4 --- llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h:1.3 Mon Oct 20 15:19:47 2003 +++ llvm/include/llvm/Transforms/Utils/DemoteRegToStack.h Tue Nov 11 16:41:31 2003 @@ -24,7 +24,11 @@ // //===----------------------------------------------------------------------===// +namespace llvm { + class Instruction; class AllocaInst; AllocaInst *DemoteRegToStack(Instruction &X); + +} // End llvm namespace Index: llvm/include/llvm/Transforms/Utils/Linker.h diff -u llvm/include/llvm/Transforms/Utils/Linker.h:1.7 llvm/include/llvm/Transforms/Utils/Linker.h:1.8 --- llvm/include/llvm/Transforms/Utils/Linker.h:1.7 Mon Oct 20 15:19:47 2003 +++ llvm/include/llvm/Transforms/Utils/Linker.h Tue Nov 11 16:41:31 2003 @@ -15,6 +15,9 @@ #define LLVM_TRANSFORMATIONS_UTILS_LINKER_H #include + +namespace llvm { + class Module; // LinkModules - This function links two modules together, with the resulting @@ -23,6 +26,8 @@ // the problem. // bool LinkModules(Module *Dest, const Module *Src, std::string *ErrorMsg = 0); + +} // End llvm namespace #endif Index: llvm/include/llvm/Transforms/Utils/Local.h diff -u llvm/include/llvm/Transforms/Utils/Local.h:1.11 llvm/include/llvm/Transforms/Utils/Local.h:1.12 --- llvm/include/llvm/Transforms/Utils/Local.h:1.11 Mon Oct 20 15:19:47 2003 +++ llvm/include/llvm/Transforms/Utils/Local.h Tue Nov 11 16:41:31 2003 @@ -16,6 +16,9 @@ #define LLVM_TRANSFORMS_UTILS_LOCAL_H #include "llvm/Function.h" + +namespace llvm { + class Pass; //===----------------------------------------------------------------------===// @@ -66,5 +69,7 @@ /// WARNING: The entry node of a method may not be simplified. /// bool SimplifyCFG(BasicBlock *BB); + +} // End llvm namespace #endif Index: llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h diff -u llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h:1.4 llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h:1.5 --- llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h:1.4 Mon Oct 20 15:19:47 2003 +++ llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h Tue Nov 11 16:41:31 2003 @@ -15,11 +15,14 @@ #ifndef TRANSFORMS_UTILS_PROMOTEMEMTOREG_H #define TRANSFORMS_UTILS_PROMOTEMEMTOREG_H +#include + +namespace llvm { + class AllocaInst; class DominatorTree; class DominanceFrontier; class TargetData; -#include /// isAllocaPromotable - Return true if this alloca is legal for promotion. /// This is true if there are only loads and stores to the alloca... @@ -34,5 +37,7 @@ void PromoteMemToReg(const std::vector &Allocas, DominatorTree &DT, DominanceFrontier &DF, const TargetData &TD); + +} // End llvm namespace #endif Index: llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h diff -u llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h:1.16 llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h:1.17 --- llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h:1.16 Mon Oct 20 15:19:47 2003 +++ llvm/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h Tue Nov 11 16:41:31 2003 @@ -20,6 +20,8 @@ #include "llvm/Pass.h" +namespace llvm { + struct UnifyFunctionExitNodes : public FunctionPass { BasicBlock *ReturnBlock, *UnwindBlock; public: @@ -38,5 +40,7 @@ }; Pass *createUnifyFunctionExitNodesPass(); + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:45:39 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:39 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/IPO.h Instrumentation.h MutateStructTypes.h Scalar.h Message-ID: <200311112241.QAA20206@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms: IPO.h updated: 1.24 -> 1.25 Instrumentation.h updated: 1.2 -> 1.3 MutateStructTypes.h updated: 1.11 -> 1.12 Scalar.h updated: 1.30 -> 1.31 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+16 -0) Index: llvm/include/llvm/Transforms/IPO.h diff -u llvm/include/llvm/Transforms/IPO.h:1.24 llvm/include/llvm/Transforms/IPO.h:1.25 --- llvm/include/llvm/Transforms/IPO.h:1.24 Wed Nov 5 15:43:42 2003 +++ llvm/include/llvm/Transforms/IPO.h Tue Nov 11 16:41:31 2003 @@ -15,6 +15,8 @@ #ifndef LLVM_TRANSFORMS_IPO_H #define LLVM_TRANSFORMS_IPO_H +namespace llvm { + class Pass; class Function; @@ -118,5 +120,7 @@ // Pass *createSwapElementsPass(); Pass *createSortElementsPass(); + +} // End llvm namespace #endif Index: llvm/include/llvm/Transforms/Instrumentation.h diff -u llvm/include/llvm/Transforms/Instrumentation.h:1.2 llvm/include/llvm/Transforms/Instrumentation.h:1.3 --- llvm/include/llvm/Transforms/Instrumentation.h:1.2 Mon Oct 20 15:19:47 2003 +++ llvm/include/llvm/Transforms/Instrumentation.h Tue Nov 11 16:41:31 2003 @@ -14,6 +14,8 @@ #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_H #define LLVM_TRANSFORMS_INSTRUMENTATION_H +namespace llvm { + class Pass; //===----------------------------------------------------------------------===// @@ -22,5 +24,7 @@ // Pass *createTraceValuesPassForFunction(); // Just trace function entry/exit Pass *createTraceValuesPassForBasicBlocks(); // Trace BB's and methods + +} // End llvm namespace #endif Index: llvm/include/llvm/Transforms/MutateStructTypes.h diff -u llvm/include/llvm/Transforms/MutateStructTypes.h:1.11 llvm/include/llvm/Transforms/MutateStructTypes.h:1.12 --- llvm/include/llvm/Transforms/MutateStructTypes.h:1.11 Mon Oct 20 15:19:47 2003 +++ llvm/include/llvm/Transforms/MutateStructTypes.h Tue Nov 11 16:41:31 2003 @@ -24,6 +24,8 @@ #include "llvm/Pass.h" #include "llvm/AbstractTypeUser.h" +namespace llvm { + class Value; class Type; class StructType; @@ -110,5 +112,7 @@ void AdjustIndices(const CompositeType *OldTy, std::vector &Idx, unsigned idx = 0); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Transforms/Scalar.h diff -u llvm/include/llvm/Transforms/Scalar.h:1.30 llvm/include/llvm/Transforms/Scalar.h:1.31 --- llvm/include/llvm/Transforms/Scalar.h:1.30 Sun Nov 9 22:09:44 2003 +++ llvm/include/llvm/Transforms/Scalar.h Tue Nov 11 16:41:31 2003 @@ -15,6 +15,8 @@ #ifndef LLVM_TRANSFORMS_SCALAR_H #define LLVM_TRANSFORMS_SCALAR_H +namespace llvm { + class Pass; class FunctionPass; class GetElementPtrInst; @@ -267,5 +269,7 @@ // Pass *createSymbolStrippingPass(); Pass *createFullSymbolStrippingPass(); + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:45:45 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:45 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/FunctionLiveVarInfo.h InstrForest.h InstrScheduling.h InstrSelection.h InstrSelectionSupport.h LiveVariables.h MachineBasicBlock.h MachineCodeEmitter.h MachineCodeForInstruction.h MachineConstantPool.h MachineFrameInfo.h MachineFunction.h MachineFunctionInfo.h MachineFunctionPass.h MachineInstr.h MachineInstrAnnot.h MachineInstrBuilder.h Passes.h SSARegMap.h SchedGraphCommon.h SelectionDAG.h ValueSet.h ValueTypes.h Message-ID: <200311112241.QAA20274@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: FunctionLiveVarInfo.h updated: 1.31 -> 1.32 InstrForest.h updated: 1.31 -> 1.32 InstrScheduling.h updated: 1.13 -> 1.14 InstrSelection.h updated: 1.29 -> 1.30 InstrSelectionSupport.h updated: 1.23 -> 1.24 LiveVariables.h updated: 1.7 -> 1.8 MachineBasicBlock.h updated: 1.12 -> 1.13 MachineCodeEmitter.h updated: 1.15 -> 1.16 MachineCodeForInstruction.h updated: 1.11 -> 1.12 MachineConstantPool.h updated: 1.3 -> 1.4 MachineFrameInfo.h updated: 1.8 -> 1.9 MachineFunction.h updated: 1.28 -> 1.29 MachineFunctionInfo.h updated: 1.2 -> 1.3 MachineFunctionPass.h updated: 1.2 -> 1.3 MachineInstr.h updated: 1.114 -> 1.115 MachineInstrAnnot.h updated: 1.12 -> 1.13 MachineInstrBuilder.h updated: 1.15 -> 1.16 Passes.h updated: 1.8 -> 1.9 SSARegMap.h updated: 1.7 -> 1.8 SchedGraphCommon.h updated: 1.7 -> 1.8 SelectionDAG.h updated: 1.4 -> 1.5 ValueSet.h updated: 1.13 -> 1.14 ValueTypes.h updated: 1.4 -> 1.5 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+109 -1) Index: llvm/include/llvm/CodeGen/FunctionLiveVarInfo.h diff -u llvm/include/llvm/CodeGen/FunctionLiveVarInfo.h:1.31 llvm/include/llvm/CodeGen/FunctionLiveVarInfo.h:1.32 --- llvm/include/llvm/CodeGen/FunctionLiveVarInfo.h:1.31 Mon Oct 20 15:55:13 2003 +++ llvm/include/llvm/CodeGen/FunctionLiveVarInfo.h Tue Nov 11 16:41:31 2003 @@ -39,6 +39,8 @@ #include "llvm/Pass.h" #include "llvm/CodeGen/ValueSet.h" +namespace llvm { + class BBLiveVar; class MachineInstr; @@ -103,5 +105,7 @@ const ValueSet &getLiveVarSetAfterMInst(const MachineInstr *MI, const BasicBlock *BB = 0); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/InstrForest.h diff -u llvm/include/llvm/CodeGen/InstrForest.h:1.31 llvm/include/llvm/CodeGen/InstrForest.h:1.32 --- llvm/include/llvm/CodeGen/InstrForest.h:1.31 Mon Oct 20 15:19:22 2003 +++ llvm/include/llvm/CodeGen/InstrForest.h Tue Nov 11 16:41:31 2003 @@ -29,16 +29,24 @@ #include "llvm/Instruction.h" #include "Support/hash_map" +namespace llvm { + class Constant; class Function; class InstrTreeNode; class InstrForest; +} // End llvm namespace + +using namespace llvm; + //-------------------------------------------------------------------------- // OpLabel values for special-case nodes created for instruction selection. // All op-labels not defined here are identical to the instruction // opcode returned by Instruction::getOpcode() //-------------------------------------------------------------------------- +// + const int InvalidOp = -1; const int VRegListOp = 97; @@ -103,6 +111,7 @@ extern int treecost (InstrTreeNode*, int, int); extern void printMatches (InstrTreeNode*); +namespace llvm { //------------------------------------------------------------------------ // class InstrTreeNode @@ -324,5 +333,7 @@ InstructionNode* buildTreeForInstruction(Instruction* instr); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/InstrScheduling.h diff -u llvm/include/llvm/CodeGen/InstrScheduling.h:1.13 llvm/include/llvm/CodeGen/InstrScheduling.h:1.14 --- llvm/include/llvm/CodeGen/InstrScheduling.h:1.13 Mon Oct 20 15:19:22 2003 +++ llvm/include/llvm/CodeGen/InstrScheduling.h Tue Nov 11 16:41:31 2003 @@ -15,6 +15,8 @@ #ifndef LLVM_CODEGEN_INSTR_SCHEDULING_H #define LLVM_CODEGEN_INSTR_SCHEDULING_H +namespace llvm { + class FunctionPass; class TargetMachine; @@ -29,5 +31,7 @@ //--------------------------------------------------------------------------- FunctionPass *createInstructionSchedulingWithSSAPass(const TargetMachine &TM); + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/InstrSelection.h diff -u llvm/include/llvm/CodeGen/InstrSelection.h:1.29 llvm/include/llvm/CodeGen/InstrSelection.h:1.30 --- llvm/include/llvm/CodeGen/InstrSelection.h:1.29 Mon Oct 20 15:19:22 2003 +++ llvm/include/llvm/CodeGen/InstrSelection.h Tue Nov 11 16:41:31 2003 @@ -16,6 +16,8 @@ #include "llvm/Instruction.h" +namespace llvm { + class Function; class InstrForest; class MachineInstr; @@ -101,5 +103,7 @@ return isa(V) && classof(cast(V)); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/InstrSelectionSupport.h diff -u llvm/include/llvm/CodeGen/InstrSelectionSupport.h:1.23 llvm/include/llvm/CodeGen/InstrSelectionSupport.h:1.24 --- llvm/include/llvm/CodeGen/InstrSelectionSupport.h:1.23 Mon Oct 20 15:19:22 2003 +++ llvm/include/llvm/CodeGen/InstrSelectionSupport.h Tue Nov 11 16:41:31 2003 @@ -17,6 +17,9 @@ #include "llvm/CodeGen/MachineInstr.h" #include "Support/DataTypes.h" + +namespace llvm { + class InstructionNode; class TargetMachine; class Instruction; @@ -43,5 +46,7 @@ bool canUseImmed, unsigned& getMachineRegNum, int64_t& getImmedValue); + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.7 llvm/include/llvm/CodeGen/LiveVariables.h:1.8 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.7 Mon Oct 20 15:19:22 2003 +++ llvm/include/llvm/CodeGen/LiveVariables.h Tue Nov 11 16:41:31 2003 @@ -32,6 +32,8 @@ #include "llvm/CodeGen/MachineFunctionPass.h" #include +namespace llvm { + class MRegisterInfo; class LiveVariables : public MachineFunctionPass { @@ -206,5 +208,7 @@ void HandlePhysRegUse(unsigned Reg, MachineInstr *MI); void HandlePhysRegDef(unsigned Reg, MachineInstr *MI); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineBasicBlock.h diff -u llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.12 llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.13 --- llvm/include/llvm/CodeGen/MachineBasicBlock.h:1.12 Mon Oct 20 15:19:22 2003 +++ llvm/include/llvm/CodeGen/MachineBasicBlock.h Tue Nov 11 16:41:31 2003 @@ -15,6 +15,9 @@ #define LLVM_CODEGEN_MACHINEBASICBLOCK_H #include + +namespace llvm { + class BasicBlock; class MachineInstr; template struct ilist_traits; @@ -81,5 +84,6 @@ void setNext(MachineBasicBlock *N) { Next = N; } }; +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineCodeEmitter.h diff -u llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.15 llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.16 --- llvm/include/llvm/CodeGen/MachineCodeEmitter.h:1.15 Mon Oct 20 15:19:22 2003 +++ llvm/include/llvm/CodeGen/MachineCodeEmitter.h Tue Nov 11 16:41:31 2003 @@ -19,6 +19,9 @@ #include #include "Support/DataTypes.h" + +namespace llvm { + class MachineFunction; class MachineBasicBlock; class MachineConstantPool; @@ -104,5 +107,7 @@ /// static MachineCodeEmitter *createFilePrinterEmitter(MachineCodeEmitter&); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineCodeForInstruction.h diff -u llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.11 llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.12 --- llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.11 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/MachineCodeForInstruction.h Tue Nov 11 16:41:31 2003 @@ -28,6 +28,8 @@ #include "Support/Annotation.h" #include +namespace llvm { + class MachineInstr; class Instruction; class Value; @@ -95,5 +97,7 @@ void setCallArgsDescriptor(CallArgsDescriptor* desc) { callArgsDesc = desc; } CallArgsDescriptor* getCallArgsDescriptor() const { return callArgsDesc; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineConstantPool.h diff -u llvm/include/llvm/CodeGen/MachineConstantPool.h:1.3 llvm/include/llvm/CodeGen/MachineConstantPool.h:1.4 --- llvm/include/llvm/CodeGen/MachineConstantPool.h:1.3 Thu Oct 23 11:29:12 2003 +++ llvm/include/llvm/CodeGen/MachineConstantPool.h Tue Nov 11 16:41:31 2003 @@ -23,6 +23,9 @@ #define LLVM_CODEGEN_MACHINECONSTANTPOOL_H #include + +namespace llvm { + class Constant; class MachineConstantPool { @@ -53,5 +56,7 @@ /// dump - Call print(std::cerr) to be called from the debugger. void dump() const; }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineFrameInfo.h diff -u llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.8 llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.9 --- llvm/include/llvm/CodeGen/MachineFrameInfo.h:1.8 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/MachineFrameInfo.h Tue Nov 11 16:41:31 2003 @@ -38,12 +38,19 @@ #ifndef LLVM_CODEGEN_MACHINEFRAMEINFO_H #define LLVM_CODEGEN_MACHINEFRAMEINFO_H +namespace llvm { + class TargetData; class TargetRegisterClass; class Type; class MachineFunction; + +} + #include +namespace llvm { + class MachineFrameInfo { // StackObject - Represent a single object allocated on the stack. @@ -219,5 +226,7 @@ /// dump - Call print(MF, std::cerr) to be called from the debugger. void dump(const MachineFunction &MF) const; }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineFunction.h diff -u llvm/include/llvm/CodeGen/MachineFunction.h:1.28 llvm/include/llvm/CodeGen/MachineFunction.h:1.29 --- llvm/include/llvm/CodeGen/MachineFunction.h:1.28 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/MachineFunction.h Tue Nov 11 16:41:31 2003 @@ -22,6 +22,8 @@ #include "Support/Annotation.h" #include "Support/ilist" +namespace llvm { + class Function; class TargetMachine; class FunctionPass; @@ -140,5 +142,7 @@ const MachineBasicBlock & back() const { return BasicBlocks.back(); } MachineBasicBlock & back() { return BasicBlocks.back(); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineFunctionInfo.h diff -u llvm/include/llvm/CodeGen/MachineFunctionInfo.h:1.2 llvm/include/llvm/CodeGen/MachineFunctionInfo.h:1.3 --- llvm/include/llvm/CodeGen/MachineFunctionInfo.h:1.2 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/MachineFunctionInfo.h Tue Nov 11 16:41:31 2003 @@ -17,6 +17,9 @@ #include "Support/HashExtras.h" #include "Support/hash_set" + +namespace llvm { + class MachineFunction; class Value; class Constant; @@ -111,5 +114,7 @@ } int allocateOptionalArg(const Type* type); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineFunctionPass.h diff -u llvm/include/llvm/CodeGen/MachineFunctionPass.h:1.2 llvm/include/llvm/CodeGen/MachineFunctionPass.h:1.3 --- llvm/include/llvm/CodeGen/MachineFunctionPass.h:1.2 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/MachineFunctionPass.h Tue Nov 11 16:41:31 2003 @@ -22,6 +22,8 @@ #include "llvm/Pass.h" #include "llvm/CodeGen/MachineFunction.h" +namespace llvm { + struct MachineFunctionPass : public FunctionPass { /// runOnMachineFunction - This method must be overloaded to perform the @@ -36,5 +38,7 @@ return runOnMachineFunction(MachineFunction::get(&F)); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineInstr.h diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.114 llvm/include/llvm/CodeGen/MachineInstr.h:1.115 --- llvm/include/llvm/CodeGen/MachineInstr.h:1.114 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/MachineInstr.h Tue Nov 11 16:41:31 2003 @@ -20,6 +20,8 @@ #include "Support/Annotation.h" #include "Support/iterator" +namespace llvm { + class Value; class Function; class MachineBasicBlock; @@ -714,5 +716,7 @@ std::ostream& operator<<(std::ostream &OS, const MachineInstr &MI); std::ostream& operator<<(std::ostream &OS, const MachineOperand &MO); void PrintMachineInstructions(const Function *F); + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineInstrAnnot.h diff -u llvm/include/llvm/CodeGen/MachineInstrAnnot.h:1.12 llvm/include/llvm/CodeGen/MachineInstrAnnot.h:1.13 --- llvm/include/llvm/CodeGen/MachineInstrAnnot.h:1.12 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/MachineInstrAnnot.h Tue Nov 11 16:41:31 2003 @@ -17,6 +17,8 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/Target/TargetRegInfo.h" +namespace llvm { + class Value; class TmpInstruction; class CallInst; @@ -88,5 +90,6 @@ static CallArgsDescriptor *get(const MachineInstr* MI); }; +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/MachineInstrBuilder.h diff -u llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.15 llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.16 --- llvm/include/llvm/CodeGen/MachineInstrBuilder.h:1.15 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/MachineInstrBuilder.h Tue Nov 11 16:41:31 2003 @@ -25,6 +25,8 @@ #include "llvm/CodeGen/MachineInstr.h" +namespace llvm { + class MachineInstrBuilder { MachineInstr *MI; public: @@ -161,5 +163,7 @@ NumOperands+1)).addReg(DestReg, MOTy::Def); } + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/Passes.h diff -u llvm/include/llvm/CodeGen/Passes.h:1.8 llvm/include/llvm/CodeGen/Passes.h:1.9 --- llvm/include/llvm/CodeGen/Passes.h:1.8 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/Passes.h Tue Nov 11 16:41:31 2003 @@ -15,6 +15,8 @@ #ifndef LLVM_CODEGEN_PASSES_H #define LLVM_CODEGEN_PASSES_H +namespace llvm { + class FunctionPass; class PassInfo; class TargetMachine; @@ -51,5 +53,7 @@ /// getRegisterAllocator - This creates an instance of the register allocator /// for the Sparc. FunctionPass *getRegisterAllocator(TargetMachine &T); + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/SSARegMap.h diff -u llvm/include/llvm/CodeGen/SSARegMap.h:1.7 llvm/include/llvm/CodeGen/SSARegMap.h:1.8 --- llvm/include/llvm/CodeGen/SSARegMap.h:1.7 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/SSARegMap.h Tue Nov 11 16:41:31 2003 @@ -19,6 +19,8 @@ #include "llvm/Target/MRegisterInfo.h" +namespace llvm { + class TargetRegisterClass; class SSARegMap { @@ -43,5 +45,7 @@ return RegClassMap.size()+MRegisterInfo::FirstVirtualRegister-1; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/SchedGraphCommon.h diff -u llvm/include/llvm/CodeGen/SchedGraphCommon.h:1.7 llvm/include/llvm/CodeGen/SchedGraphCommon.h:1.8 --- llvm/include/llvm/CodeGen/SchedGraphCommon.h:1.7 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/SchedGraphCommon.h Tue Nov 11 16:41:31 2003 @@ -18,6 +18,8 @@ #include "llvm/Value.h" #include +namespace llvm { + class SchedGraphEdge; class SchedGraphNode; @@ -216,5 +218,7 @@ SchedGraphCommon() {} ~SchedGraphCommon(); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.4 llvm/include/llvm/CodeGen/SelectionDAG.h:1.5 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.4 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/SelectionDAG.h Tue Nov 11 16:41:31 2003 @@ -27,6 +27,9 @@ #include #include #include + +namespace llvm { + class Value; class Type; class Instruction; @@ -361,5 +364,7 @@ typedef ReducedValue ReducedValue_Constant_i64; typedef ReducedValue ReducedValue_Constant_f32; typedef ReducedValue ReducedValue_Constant_f64; + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/ValueSet.h diff -u llvm/include/llvm/CodeGen/ValueSet.h:1.13 llvm/include/llvm/CodeGen/ValueSet.h:1.14 --- llvm/include/llvm/CodeGen/ValueSet.h:1.13 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/ValueSet.h Tue Nov 11 16:41:31 2003 @@ -17,6 +17,9 @@ #define VALUE_SET_H #include + +namespace llvm { + class Value; // RAV - Used to print values in a form used by the register allocator. @@ -30,5 +33,7 @@ typedef std::set ValueSet; void printSet(const ValueSet &S); + +} // End llvm namespace #endif Index: llvm/include/llvm/CodeGen/ValueTypes.h diff -u llvm/include/llvm/CodeGen/ValueTypes.h:1.4 llvm/include/llvm/CodeGen/ValueTypes.h:1.5 --- llvm/include/llvm/CodeGen/ValueTypes.h:1.4 Mon Oct 20 15:19:23 2003 +++ llvm/include/llvm/CodeGen/ValueTypes.h Tue Nov 11 16:41:31 2003 @@ -16,6 +16,8 @@ #ifndef LLVM_CODEGEN_VALUETYPES_H #define LLVM_CODEGEN_VALUETYPES_H +namespace llvm { + /// MVT namespace - This namespace defines the ValueType enum, which contains /// the various low-level value types. /// @@ -40,5 +42,6 @@ }; }; -#endif +} // End llvm namespace +#endif From gaeke at cs.uiuc.edu Tue Nov 11 16:45:52 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:52 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/MRegisterInfo.h TargetCacheInfo.h TargetData.h TargetFrameInfo.h TargetInstrInfo.h TargetMachine.h TargetMachineImpls.h TargetRegInfo.h TargetSchedInfo.h Message-ID: <200311112241.QAA20221@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: MRegisterInfo.h updated: 1.25 -> 1.26 TargetCacheInfo.h updated: 1.11 -> 1.12 TargetData.h updated: 1.20 -> 1.21 TargetFrameInfo.h updated: 1.8 -> 1.9 TargetInstrInfo.h updated: 1.51 -> 1.52 TargetMachine.h updated: 1.38 -> 1.39 TargetMachineImpls.h updated: 1.6 -> 1.7 TargetRegInfo.h updated: 1.46 -> 1.47 TargetSchedInfo.h updated: 1.20 -> 1.21 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+44 -3) Index: llvm/include/llvm/Target/MRegisterInfo.h diff -u llvm/include/llvm/Target/MRegisterInfo.h:1.25 llvm/include/llvm/Target/MRegisterInfo.h:1.26 --- llvm/include/llvm/Target/MRegisterInfo.h:1.25 Wed Nov 5 13:48:05 2003 +++ llvm/include/llvm/Target/MRegisterInfo.h Tue Nov 11 16:41:31 2003 @@ -19,6 +19,8 @@ #include "llvm/CodeGen/MachineBasicBlock.h" #include +namespace llvm { + class Type; class MachineFunction; @@ -279,5 +281,7 @@ virtual int emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const = 0; }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Target/TargetCacheInfo.h diff -u llvm/include/llvm/Target/TargetCacheInfo.h:1.11 llvm/include/llvm/Target/TargetCacheInfo.h:1.12 --- llvm/include/llvm/Target/TargetCacheInfo.h:1.11 Mon Oct 20 15:19:41 2003 +++ llvm/include/llvm/Target/TargetCacheInfo.h Tue Nov 11 16:41:31 2003 @@ -16,6 +16,8 @@ #include "Support/DataTypes.h" +namespace llvm { + class TargetMachine; struct TargetCacheInfo { @@ -58,5 +60,7 @@ return cacheAssoc[level]; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Target/TargetData.h diff -u llvm/include/llvm/Target/TargetData.h:1.20 llvm/include/llvm/Target/TargetData.h:1.21 --- llvm/include/llvm/Target/TargetData.h:1.20 Mon Oct 20 15:19:42 2003 +++ llvm/include/llvm/Target/TargetData.h Tue Nov 11 16:41:31 2003 @@ -24,6 +24,9 @@ #include "Support/Annotation.h" #include "Support/DataTypes.h" #include + +namespace llvm { + class Value; class Type; class StructType; @@ -100,5 +103,7 @@ friend class TargetData; // Only TargetData can create this class inline StructLayout(const StructType *ST, const TargetData &TD); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Target/TargetFrameInfo.h diff -u llvm/include/llvm/Target/TargetFrameInfo.h:1.8 llvm/include/llvm/Target/TargetFrameInfo.h:1.9 --- llvm/include/llvm/Target/TargetFrameInfo.h:1.8 Mon Oct 20 15:19:42 2003 +++ llvm/include/llvm/Target/TargetFrameInfo.h Tue Nov 11 16:41:31 2003 @@ -14,6 +14,8 @@ #ifndef LLVM_TARGET_TARGETFRAMEINFO_H #define LLVM_TARGET_TARGETFRAMEINFO_H +namespace llvm { + class MachineFunction; struct TargetFrameInfo { @@ -98,5 +100,7 @@ virtual int getRegSpillAreaBaseRegNum() const { abort(); } virtual int getDynamicAreaBaseRegNum() const { abort(); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Target/TargetInstrInfo.h diff -u llvm/include/llvm/Target/TargetInstrInfo.h:1.51 llvm/include/llvm/Target/TargetInstrInfo.h:1.52 --- llvm/include/llvm/Target/TargetInstrInfo.h:1.51 Mon Oct 20 15:19:43 2003 +++ llvm/include/llvm/Target/TargetInstrInfo.h Tue Nov 11 16:41:31 2003 @@ -18,6 +18,8 @@ #include #include +namespace llvm { + class MachineInstr; class TargetMachine; class Value; @@ -414,5 +416,7 @@ abort(); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Target/TargetMachine.h diff -u llvm/include/llvm/Target/TargetMachine.h:1.38 llvm/include/llvm/Target/TargetMachine.h:1.39 --- llvm/include/llvm/Target/TargetMachine.h:1.38 Mon Oct 20 15:19:43 2003 +++ llvm/include/llvm/Target/TargetMachine.h Tue Nov 11 16:41:31 2003 @@ -17,6 +17,8 @@ #include "llvm/Target/TargetData.h" #include +namespace llvm { + class TargetInstrInfo; class TargetInstrDescriptor; class TargetSchedInfo; @@ -116,5 +118,7 @@ assert (0 && "Current target cannot replace machine code for functions"); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Target/TargetMachineImpls.h diff -u llvm/include/llvm/Target/TargetMachineImpls.h:1.6 llvm/include/llvm/Target/TargetMachineImpls.h:1.7 --- llvm/include/llvm/Target/TargetMachineImpls.h:1.6 Mon Oct 20 15:19:43 2003 +++ llvm/include/llvm/Target/TargetMachineImpls.h Tue Nov 11 16:41:31 2003 @@ -15,6 +15,8 @@ #ifndef LLVM_TARGET_TARGETMACHINEIMPLS_H #define LLVM_TARGET_TARGETMACHINEIMPLS_H +namespace llvm { + class TargetMachine; class Module; @@ -29,5 +31,7 @@ // size and different endianness if desired. // TargetMachine *allocateX86TargetMachine(const Module &M); + +} // End llvm namespace #endif Index: llvm/include/llvm/Target/TargetRegInfo.h diff -u llvm/include/llvm/Target/TargetRegInfo.h:1.46 llvm/include/llvm/Target/TargetRegInfo.h:1.47 --- llvm/include/llvm/Target/TargetRegInfo.h:1.46 Mon Oct 20 15:19:43 2003 +++ llvm/include/llvm/Target/TargetRegInfo.h Tue Nov 11 16:41:31 2003 @@ -19,6 +19,8 @@ #include #include +namespace llvm { + class TargetMachine; class IGNode; class Type; @@ -288,5 +290,7 @@ // virtual int getSpilledRegSize(int RegType) const = 0; }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Target/TargetSchedInfo.h diff -u llvm/include/llvm/Target/TargetSchedInfo.h:1.20 llvm/include/llvm/Target/TargetSchedInfo.h:1.21 --- llvm/include/llvm/Target/TargetSchedInfo.h:1.20 Mon Oct 20 15:19:43 2003 +++ llvm/include/llvm/Target/TargetSchedInfo.h Tue Nov 11 16:41:31 2003 @@ -18,6 +18,8 @@ #include "Support/hash_map" #include +namespace llvm { + typedef long long cycles_t; static const cycles_t HUGE_LATENCY = ~((long long) 1 << (sizeof(cycles_t)-2)); static const cycles_t INVALID_LATENCY = -HUGE_LATENCY; @@ -36,13 +38,17 @@ OpCodePair(); // disable for now }; +} // End llvm namespace + namespace HASH_NAMESPACE { - template <> struct hash { - size_t operator()(const OpCodePair& pair) const { + template <> struct hash { + size_t operator()(const llvm::OpCodePair& pair) const { return hash()(pair.val); } }; -} +} // End HASH_NAMESPACE (a macro) namespace + +namespace llvm { //--------------------------------------------------------------------------- // class MachineResource @@ -320,5 +326,7 @@ friend class ModuloScheduling; }; + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:45:58 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:45:58 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/AliasAnalysis.h AliasSetTracker.h CallGraph.h ConstantsScanner.h DSGraph.h DSGraphTraits.h DSNode.h DSSupport.h DataStructure.h DependenceGraph.h Dominators.h Expressions.h FindUnsafePointerTypes.h FindUsedTypes.h IPModRef.h InductionVariable.h InstForest.h Interval.h IntervalIterator.h IntervalPartition.h LoadValueNumbering.h LoopInfo.h MemoryDepAnalysis.h PgmDependenceGraph.h PostDominators.h ValueNumbering.h Verifier.h Message-ID: <200311112241.QAA20109@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: AliasAnalysis.h updated: 1.6 -> 1.7 AliasSetTracker.h updated: 1.8 -> 1.9 CallGraph.h updated: 1.32 -> 1.33 ConstantsScanner.h updated: 1.13 -> 1.14 DSGraph.h updated: 1.62 -> 1.63 DSGraphTraits.h updated: 1.17 -> 1.18 DSNode.h updated: 1.32 -> 1.33 DSSupport.h updated: 1.25 -> 1.26 DataStructure.h updated: 1.74 -> 1.75 DependenceGraph.h updated: 1.8 -> 1.9 Dominators.h updated: 1.40 -> 1.41 Expressions.h updated: 1.8 -> 1.9 FindUnsafePointerTypes.h updated: 1.14 -> 1.15 FindUsedTypes.h updated: 1.21 -> 1.22 IPModRef.h updated: 1.13 -> 1.14 InductionVariable.h updated: 1.7 -> 1.8 InstForest.h updated: 1.22 -> 1.23 Interval.h updated: 1.16 -> 1.17 IntervalIterator.h updated: 1.16 -> 1.17 IntervalPartition.h updated: 1.19 -> 1.20 LoadValueNumbering.h updated: 1.2 -> 1.3 LoopInfo.h updated: 1.28 -> 1.29 MemoryDepAnalysis.h updated: 1.6 -> 1.7 PgmDependenceGraph.h updated: 1.5 -> 1.6 PostDominators.h updated: 1.5 -> 1.6 ValueNumbering.h updated: 1.2 -> 1.3 Verifier.h updated: 1.11 -> 1.12 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+122 -3) Index: llvm/include/llvm/Analysis/AliasAnalysis.h diff -u llvm/include/llvm/Analysis/AliasAnalysis.h:1.6 llvm/include/llvm/Analysis/AliasAnalysis.h:1.7 --- llvm/include/llvm/Analysis/AliasAnalysis.h:1.6 Mon Oct 20 15:19:16 2003 +++ llvm/include/llvm/Analysis/AliasAnalysis.h Tue Nov 11 16:41:30 2003 @@ -31,6 +31,9 @@ #define LLVM_ANALYSIS_ALIAS_ANALYSIS_H #include "llvm/Support/CallSite.h" + +namespace llvm { + class LoadInst; class StoreInst; class TargetData; @@ -155,5 +158,7 @@ bool canInstructionRangeModify(const Instruction &I1, const Instruction &I2, const Value *Ptr, unsigned Size); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/AliasSetTracker.h diff -u llvm/include/llvm/Analysis/AliasSetTracker.h:1.8 llvm/include/llvm/Analysis/AliasSetTracker.h:1.9 --- llvm/include/llvm/Analysis/AliasSetTracker.h:1.8 Mon Oct 20 15:19:17 2003 +++ llvm/include/llvm/Analysis/AliasSetTracker.h Tue Nov 11 16:41:30 2003 @@ -21,6 +21,9 @@ #include "Support/iterator" #include "Support/hash_map" #include "Support/ilist" + +namespace llvm { + class AliasAnalysis; class LoadInst; class StoreInst; @@ -282,5 +285,7 @@ AST.print(OS); return OS; } + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/CallGraph.h diff -u llvm/include/llvm/Analysis/CallGraph.h:1.32 llvm/include/llvm/Analysis/CallGraph.h:1.33 --- llvm/include/llvm/Analysis/CallGraph.h:1.32 Wed Oct 29 23:16:55 2003 +++ llvm/include/llvm/Analysis/CallGraph.h Tue Nov 11 16:41:30 2003 @@ -51,6 +51,9 @@ #include "Support/GraphTraits.h" #include "Support/STLExtras.h" #include "llvm/Pass.h" + +namespace llvm { + class Function; class Module; class CallGraphNode; @@ -287,5 +290,7 @@ // Make sure that any clients of this file link in PostDominators.cpp static IncludeFile CALLGRAPH_INCLUDE_FILE((void*)&CallGraph::stub); + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/ConstantsScanner.h diff -u llvm/include/llvm/Analysis/ConstantsScanner.h:1.13 llvm/include/llvm/Analysis/ConstantsScanner.h:1.14 --- llvm/include/llvm/Analysis/ConstantsScanner.h:1.13 Mon Oct 20 15:19:17 2003 +++ llvm/include/llvm/Analysis/ConstantsScanner.h Tue Nov 11 16:41:30 2003 @@ -19,6 +19,9 @@ #include "llvm/Support/InstIterator.h" #include "llvm/Instruction.h" #include "Support/iterator" + +namespace llvm { + class Constant; class constant_iterator : public forward_iterator { @@ -85,5 +88,7 @@ inline constant_iterator constant_end(const Function *F) { return constant_iterator(F, true); } + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/DSGraph.h diff -u llvm/include/llvm/Analysis/DSGraph.h:1.62 llvm/include/llvm/Analysis/DSGraph.h:1.63 --- llvm/include/llvm/Analysis/DSGraph.h:1.62 Mon Nov 10 23:08:36 2003 +++ llvm/include/llvm/Analysis/DSGraph.h Tue Nov 11 16:41:30 2003 @@ -15,6 +15,9 @@ #define LLVM_ANALYSIS_DSGRAPH_H #include "llvm/Analysis/DSNode.h" + +namespace llvm { + class GlobalValue; //===----------------------------------------------------------------------===// @@ -331,5 +334,7 @@ /// void removeTriviallyDeadNodes(); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/DSGraphTraits.h diff -u llvm/include/llvm/Analysis/DSGraphTraits.h:1.17 llvm/include/llvm/Analysis/DSGraphTraits.h:1.18 --- llvm/include/llvm/Analysis/DSGraphTraits.h:1.17 Mon Oct 20 15:19:17 2003 +++ llvm/include/llvm/Analysis/DSGraphTraits.h Tue Nov 11 16:41:30 2003 @@ -21,6 +21,8 @@ #include "Support/iterator" #include "Support/STLExtras.h" +namespace llvm { + template class DSNodeIterator : public forward_iterator { friend class DSNode; @@ -145,5 +147,7 @@ static ChildIteratorType child_begin(const NodeType *N) { return N->begin(); } static ChildIteratorType child_end(const NodeType *N) { return N->end(); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/DSNode.h diff -u llvm/include/llvm/Analysis/DSNode.h:1.32 llvm/include/llvm/Analysis/DSNode.h:1.33 --- llvm/include/llvm/Analysis/DSNode.h:1.32 Sun Nov 2 16:27:15 2003 +++ llvm/include/llvm/Analysis/DSNode.h Tue Nov 11 16:41:30 2003 @@ -16,6 +16,8 @@ #include "llvm/Analysis/DSSupport.h" +namespace llvm { + template class DSNodeIterator; // Data structure graph traversal iterator class TargetData; @@ -381,5 +383,7 @@ else // No node to merge with, so just point to Node *this = Node; } + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/DSSupport.h diff -u llvm/include/llvm/Analysis/DSSupport.h:1.25 llvm/include/llvm/Analysis/DSSupport.h:1.26 --- llvm/include/llvm/Analysis/DSSupport.h:1.25 Sun Nov 2 16:27:15 2003 +++ llvm/include/llvm/Analysis/DSSupport.h Tue Nov 11 16:41:31 2003 @@ -18,6 +18,8 @@ #include "Support/hash_set" #include "llvm/Support/CallSite.h" +namespace llvm { + class Function; class CallInst; class Value; @@ -122,10 +124,14 @@ DSNode *HandleForwarding() const; }; +} // End llvm namespace + namespace std { - inline void swap(DSNodeHandle &NH1, DSNodeHandle &NH2) { NH1.swap(NH2); } + inline void swap(llvm::DSNodeHandle &NH1, llvm::DSNodeHandle &NH2) { NH1.swap(NH2); } } +namespace llvm { + //===----------------------------------------------------------------------===// /// DSCallSite - Representation of a call site via its call instruction, /// the DSNode handle for the callee function (or function pointer), and @@ -287,7 +293,9 @@ } }; +} // End llvm namespace + namespace std { - inline void swap(DSCallSite &CS1, DSCallSite &CS2) { CS1.swap(CS2); } + inline void swap(llvm::DSCallSite &CS1, llvm::DSCallSite &CS2) { CS1.swap(CS2); } } #endif Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.74 llvm/include/llvm/Analysis/DataStructure.h:1.75 --- llvm/include/llvm/Analysis/DataStructure.h:1.74 Sun Nov 2 16:27:15 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Tue Nov 11 16:41:31 2003 @@ -18,6 +18,8 @@ #include "llvm/Target/TargetData.h" #include "Support/hash_set" +namespace llvm { + class Type; class Instruction; class DSGraph; @@ -183,5 +185,7 @@ std::vector &PostOrder, const BUDataStructures::ActualCalleesTy &ActualCallees); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/DependenceGraph.h diff -u llvm/include/llvm/Analysis/DependenceGraph.h:1.8 llvm/include/llvm/Analysis/DependenceGraph.h:1.9 --- llvm/include/llvm/Analysis/DependenceGraph.h:1.8 Mon Oct 20 15:19:17 2003 +++ llvm/include/llvm/Analysis/DependenceGraph.h Tue Nov 11 16:41:31 2003 @@ -30,6 +30,8 @@ #include #include +namespace llvm { + class Instruction; class Function; class Dependence; @@ -263,5 +265,7 @@ }; //===----------------------------------------------------------------------===// + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/Dominators.h diff -u llvm/include/llvm/Analysis/Dominators.h:1.40 llvm/include/llvm/Analysis/Dominators.h:1.41 --- llvm/include/llvm/Analysis/Dominators.h:1.40 Mon Oct 20 15:19:17 2003 +++ llvm/include/llvm/Analysis/Dominators.h Tue Nov 11 16:41:31 2003 @@ -28,6 +28,8 @@ #include "llvm/Pass.h" #include +namespace llvm { + class Instruction; template struct GraphTraits; @@ -486,5 +488,7 @@ const DomSetType &calculate(const DominatorTree &DT, const DominatorTree::Node *Node); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/Expressions.h diff -u llvm/include/llvm/Analysis/Expressions.h:1.8 llvm/include/llvm/Analysis/Expressions.h:1.9 --- llvm/include/llvm/Analysis/Expressions.h:1.8 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/Expressions.h Tue Nov 11 16:41:31 2003 @@ -17,6 +17,8 @@ #ifndef LLVM_ANALYSIS_EXPRESSIONS_H #define LLVM_ANALYSIS_EXPRESSIONS_H +namespace llvm { + class Type; class Value; class ConstantInt; @@ -55,5 +57,7 @@ // const Type *getExprType(const Type *Default) const; }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/FindUnsafePointerTypes.h diff -u llvm/include/llvm/Analysis/FindUnsafePointerTypes.h:1.14 llvm/include/llvm/Analysis/FindUnsafePointerTypes.h:1.15 --- llvm/include/llvm/Analysis/FindUnsafePointerTypes.h:1.14 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/FindUnsafePointerTypes.h Tue Nov 11 16:41:31 2003 @@ -27,6 +27,8 @@ #include "llvm/Pass.h" #include +namespace llvm { + class PointerType; struct FindUnsafePointerTypes : public Pass { @@ -54,5 +56,7 @@ AU.setPreservesAll(); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/FindUsedTypes.h diff -u llvm/include/llvm/Analysis/FindUsedTypes.h:1.21 llvm/include/llvm/Analysis/FindUsedTypes.h:1.22 --- llvm/include/llvm/Analysis/FindUsedTypes.h:1.21 Sat Nov 1 19:28:34 2003 +++ llvm/include/llvm/Analysis/FindUsedTypes.h Tue Nov 11 16:41:31 2003 @@ -16,6 +16,9 @@ #include "llvm/Pass.h" #include + +namespace llvm { + class Type; class FindUsedTypes : public Pass { @@ -58,5 +61,7 @@ // Make sure that any clients of this file link in PostDominators.cpp static IncludeFile FIND_USED_TYPES_INCLUDE_FILE((void*)&FindUsedTypes::stub); + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/IPModRef.h diff -u llvm/include/llvm/Analysis/IPModRef.h:1.13 llvm/include/llvm/Analysis/IPModRef.h:1.14 --- llvm/include/llvm/Analysis/IPModRef.h:1.13 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/IPModRef.h Tue Nov 11 16:41:31 2003 @@ -50,6 +50,8 @@ #include "Support/BitSetVector.h" #include "Support/hash_map" +namespace llvm { + class Module; class Function; class CallSite; @@ -238,5 +240,7 @@ }; //===----------------------------------------------------------------------===// + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/InductionVariable.h diff -u llvm/include/llvm/Analysis/InductionVariable.h:1.7 llvm/include/llvm/Analysis/InductionVariable.h:1.8 --- llvm/include/llvm/Analysis/InductionVariable.h:1.7 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/InductionVariable.h Tue Nov 11 16:41:31 2003 @@ -27,6 +27,9 @@ #define LLVM_ANALYSIS_INDUCTIONVARIABLE_H #include + +namespace llvm { + class Value; class PHINode; class Instruction; @@ -59,5 +62,7 @@ void print(std::ostream &OS) const; }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/InstForest.h diff -u llvm/include/llvm/Analysis/InstForest.h:1.22 llvm/include/llvm/Analysis/InstForest.h:1.23 --- llvm/include/llvm/Analysis/InstForest.h:1.22 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/InstForest.h Tue Nov 11 16:41:31 2003 @@ -25,6 +25,8 @@ #include "Support/Tree.h" #include +namespace llvm { + template class InstTreeNode; template class InstForest; @@ -287,6 +289,8 @@ setChildren(Children); getTreeData().first.second = InstructionNode; } + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/Interval.h diff -u llvm/include/llvm/Analysis/Interval.h:1.16 llvm/include/llvm/Analysis/Interval.h:1.17 --- llvm/include/llvm/Analysis/Interval.h:1.16 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/Interval.h Tue Nov 11 16:41:31 2003 @@ -24,6 +24,8 @@ #include #include +namespace llvm { + class BasicBlock; //===----------------------------------------------------------------------===// @@ -145,5 +147,7 @@ return pred_end(N); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/IntervalIterator.h diff -u llvm/include/llvm/Analysis/IntervalIterator.h:1.16 llvm/include/llvm/Analysis/IntervalIterator.h:1.17 --- llvm/include/llvm/Analysis/IntervalIterator.h:1.16 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/IntervalIterator.h Tue Nov 11 16:41:31 2003 @@ -40,6 +40,8 @@ #include #include +namespace llvm { + // getNodeHeader - Given a source graph node and the source graph, return the // BasicBlock that is the header node. This is the opposite of // getSourceGraphNode. @@ -252,5 +254,7 @@ inline interval_part_interval_iterator intervals_end(IntervalPartition &IP) { return interval_part_interval_iterator(); } + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/IntervalPartition.h diff -u llvm/include/llvm/Analysis/IntervalPartition.h:1.19 llvm/include/llvm/Analysis/IntervalPartition.h:1.20 --- llvm/include/llvm/Analysis/IntervalPartition.h:1.19 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/IntervalPartition.h Tue Nov 11 16:41:31 2003 @@ -26,6 +26,8 @@ #include "llvm/Analysis/Interval.h" #include "llvm/Pass.h" +namespace llvm { + //===----------------------------------------------------------------------===// // // IntervalPartition - This class builds and holds an "interval partition" for @@ -101,5 +103,7 @@ // void updatePredecessors(Interval *Int); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/LoadValueNumbering.h diff -u llvm/include/llvm/Analysis/LoadValueNumbering.h:1.2 llvm/include/llvm/Analysis/LoadValueNumbering.h:1.3 --- llvm/include/llvm/Analysis/LoadValueNumbering.h:1.2 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/LoadValueNumbering.h Tue Nov 11 16:41:31 2003 @@ -21,11 +21,15 @@ #ifndef LLVM_ANALYSIS_LOAD_VALUE_NUMBERING_H #define LLVM_ANALYSIS_LOAD_VALUE_NUMBERING_H +namespace llvm { + class Pass; /// createLoadValueNumberingPass - Create and return a new pass that implements /// the ValueNumbering interface. /// Pass *createLoadValueNumberingPass(); + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/LoopInfo.h diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.28 llvm/include/llvm/Analysis/LoopInfo.h:1.29 --- llvm/include/llvm/Analysis/LoopInfo.h:1.28 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/LoopInfo.h Tue Nov 11 16:41:31 2003 @@ -29,6 +29,8 @@ #include "Support/GraphTraits.h" #include +namespace llvm { + class DominatorSet; class LoopInfo; @@ -223,5 +225,7 @@ return N->getSubLoops().end(); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/MemoryDepAnalysis.h diff -u llvm/include/llvm/Analysis/MemoryDepAnalysis.h:1.6 llvm/include/llvm/Analysis/MemoryDepAnalysis.h:1.7 --- llvm/include/llvm/Analysis/MemoryDepAnalysis.h:1.6 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/MemoryDepAnalysis.h Tue Nov 11 16:41:31 2003 @@ -24,6 +24,8 @@ #include "llvm/Pass.h" #include "Support/hash_map" +namespace llvm { + class ModRefTable; class DSGraph; class FunctionModRefInfo; @@ -95,5 +97,7 @@ void print(std::ostream &O) const; void dump() const; }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/PgmDependenceGraph.h diff -u llvm/include/llvm/Analysis/PgmDependenceGraph.h:1.5 llvm/include/llvm/Analysis/PgmDependenceGraph.h:1.6 --- llvm/include/llvm/Analysis/PgmDependenceGraph.h:1.5 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/PgmDependenceGraph.h Tue Nov 11 16:41:31 2003 @@ -46,6 +46,8 @@ #include "llvm/Pass.h" #include "Support/iterator" +namespace llvm { + class DSGraph; class DependenceGraph; class PgmDependenceGraph; @@ -304,7 +306,8 @@ void dump() const; }; - //===----------------------------------------------------------------------===// + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/PostDominators.h diff -u llvm/include/llvm/Analysis/PostDominators.h:1.5 llvm/include/llvm/Analysis/PostDominators.h:1.6 --- llvm/include/llvm/Analysis/PostDominators.h:1.5 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/PostDominators.h Tue Nov 11 16:41:31 2003 @@ -16,6 +16,8 @@ #include "llvm/Analysis/Dominators.h" +namespace llvm { + /// PostDominatorSet Class - Concrete subclass of DominatorSetBase that is used /// to compute the post-dominator set. Because there can be multiple exit nodes @@ -116,5 +118,7 @@ // Make sure that any clients of this file link in PostDominators.cpp static IncludeFile POST_DOMINATOR_INCLUDE_FILE((void*)&PostDominanceFrontier::stub); + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/ValueNumbering.h diff -u llvm/include/llvm/Analysis/ValueNumbering.h:1.2 llvm/include/llvm/Analysis/ValueNumbering.h:1.3 --- llvm/include/llvm/Analysis/ValueNumbering.h:1.2 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/ValueNumbering.h Tue Nov 11 16:41:31 2003 @@ -21,6 +21,9 @@ #define LLVM_ANALYSIS_VALUE_NUMBERING_H #include + +namespace llvm { + class Value; struct ValueNumbering { @@ -33,5 +36,7 @@ virtual ~ValueNumbering(); // We want to be subclassed }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Analysis/Verifier.h diff -u llvm/include/llvm/Analysis/Verifier.h:1.11 llvm/include/llvm/Analysis/Verifier.h:1.12 --- llvm/include/llvm/Analysis/Verifier.h:1.11 Mon Oct 20 15:19:18 2003 +++ llvm/include/llvm/Analysis/Verifier.h Tue Nov 11 16:41:31 2003 @@ -21,6 +21,8 @@ #ifndef LLVM_ANALYSIS_VERIFIER_H #define LLVM_ANALYSIS_VERIFIER_H +namespace llvm { + class FunctionPass; class Module; class Function; @@ -39,5 +41,7 @@ // verifyFunction - Check a function for errors, useful for use when debugging a // pass. bool verifyFunction(const Function &F); + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:46:05 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:46:05 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/ExecutionEngine/ExecutionEngine.h GenericValue.h Message-ID: <200311112241.QAA20129@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/ExecutionEngine: ExecutionEngine.h updated: 1.17 -> 1.18 GenericValue.h updated: 1.2 -> 1.3 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+9 -0) Index: llvm/include/llvm/ExecutionEngine/ExecutionEngine.h diff -u llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:1.17 llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:1.18 --- llvm/include/llvm/ExecutionEngine/ExecutionEngine.h:1.17 Fri Oct 24 14:58:15 2003 +++ llvm/include/llvm/ExecutionEngine/ExecutionEngine.h Tue Nov 11 16:41:31 2003 @@ -19,6 +19,9 @@ #include #include #include + +namespace llvm { + class Constant; class Function; union GenericValue; @@ -91,5 +94,7 @@ GenericValue getConstantValue(const Constant *C); GenericValue LoadValueFromMemory(GenericValue *Ptr, const Type *Ty); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/ExecutionEngine/GenericValue.h diff -u llvm/include/llvm/ExecutionEngine/GenericValue.h:1.2 llvm/include/llvm/ExecutionEngine/GenericValue.h:1.3 --- llvm/include/llvm/ExecutionEngine/GenericValue.h:1.2 Mon Oct 20 15:19:24 2003 +++ llvm/include/llvm/ExecutionEngine/GenericValue.h Tue Nov 11 16:41:31 2003 @@ -17,6 +17,8 @@ #include "Support/DataTypes.h" +namespace llvm { + typedef uint64_t PointerTy; union GenericValue { @@ -44,4 +46,6 @@ inline void* GVTOP(const GenericValue &GV) { return (void*)(intptr_t)GV.PointerVal; } + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:46:11 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:46:11 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Assembly/AsmAnnotationWriter.h CWriter.h CachedWriter.h Parser.h PrintModulePass.h Writer.h Message-ID: <200311112241.QAA20074@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Assembly: AsmAnnotationWriter.h updated: 1.1 -> 1.2 CWriter.h updated: 1.4 -> 1.5 CachedWriter.h updated: 1.11 -> 1.12 Parser.h updated: 1.7 -> 1.8 PrintModulePass.h updated: 1.14 -> 1.15 Writer.h updated: 1.26 -> 1.27 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+27 -0) Index: llvm/include/llvm/Assembly/AsmAnnotationWriter.h diff -u llvm/include/llvm/Assembly/AsmAnnotationWriter.h:1.1 llvm/include/llvm/Assembly/AsmAnnotationWriter.h:1.2 --- llvm/include/llvm/Assembly/AsmAnnotationWriter.h:1.1 Thu Oct 30 17:39:52 2003 +++ llvm/include/llvm/Assembly/AsmAnnotationWriter.h Tue Nov 11 16:41:31 2003 @@ -18,6 +18,9 @@ #define LLVM_ASSEMBLY_ASMANNOTATIONWRITER_H #include + +namespace llvm { + class Function; class BasicBlock; class Instruction; @@ -36,5 +39,7 @@ // before an instruction is emitted. virtual void emitInstructionAnnot(const Instruction *I, std::ostream &OS) {} }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Assembly/CWriter.h diff -u llvm/include/llvm/Assembly/CWriter.h:1.4 llvm/include/llvm/Assembly/CWriter.h:1.5 --- llvm/include/llvm/Assembly/CWriter.h:1.4 Mon Oct 20 15:19:19 2003 +++ llvm/include/llvm/Assembly/CWriter.h Tue Nov 11 16:41:31 2003 @@ -16,7 +16,12 @@ #define LLVM_ASSEMBLY_CWRITER_H #include + +namespace llvm { + class Pass; Pass *createWriteToCPass(std::ostream &o); + +} // End llvm namespace #endif Index: llvm/include/llvm/Assembly/CachedWriter.h diff -u llvm/include/llvm/Assembly/CachedWriter.h:1.11 llvm/include/llvm/Assembly/CachedWriter.h:1.12 --- llvm/include/llvm/Assembly/CachedWriter.h:1.11 Mon Oct 20 15:19:19 2003 +++ llvm/include/llvm/Assembly/CachedWriter.h Tue Nov 11 16:41:31 2003 @@ -20,6 +20,8 @@ #include "llvm/Value.h" #include +namespace llvm { + class Module; class PointerType; class SlotCalculator; @@ -81,5 +83,7 @@ return *this; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Assembly/Parser.h diff -u llvm/include/llvm/Assembly/Parser.h:1.7 llvm/include/llvm/Assembly/Parser.h:1.8 --- llvm/include/llvm/Assembly/Parser.h:1.7 Mon Oct 20 15:19:19 2003 +++ llvm/include/llvm/Assembly/Parser.h Tue Nov 11 16:41:31 2003 @@ -16,6 +16,8 @@ #include +namespace llvm { + class Module; class ParseException; @@ -69,5 +71,7 @@ ParseException &operator=(const ParseException &E); // objects by reference }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Assembly/PrintModulePass.h diff -u llvm/include/llvm/Assembly/PrintModulePass.h:1.14 llvm/include/llvm/Assembly/PrintModulePass.h:1.15 --- llvm/include/llvm/Assembly/PrintModulePass.h:1.14 Mon Oct 20 15:19:19 2003 +++ llvm/include/llvm/Assembly/PrintModulePass.h Tue Nov 11 16:41:31 2003 @@ -21,6 +21,8 @@ #include "llvm/Pass.h" #include "llvm/Module.h" +namespace llvm { + class PrintModulePass : public Pass { std::ostream *Out; // ostream to print on bool DeleteStream; // Delete the ostream in our dtor? @@ -71,5 +73,7 @@ AU.setPreservesAll(); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Assembly/Writer.h diff -u llvm/include/llvm/Assembly/Writer.h:1.26 llvm/include/llvm/Assembly/Writer.h:1.27 --- llvm/include/llvm/Assembly/Writer.h:1.26 Mon Oct 20 15:19:19 2003 +++ llvm/include/llvm/Assembly/Writer.h Tue Nov 11 16:41:31 2003 @@ -24,6 +24,9 @@ #define LLVM_ASSEMBLY_WRITER_H #include + +namespace llvm { + class Type; class Module; class Value; @@ -42,5 +45,7 @@ // std::ostream &WriteAsOperand(std::ostream &, const Value *, bool PrintTy = true, bool PrintName = true, const Module *Context = 0); + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:46:17 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:46:17 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Format.h Primitives.h Reader.h WriteBytecodePass.h Writer.h Message-ID: <200311112241.QAA20089@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bytecode: Format.h updated: 1.5 -> 1.6 Primitives.h updated: 1.13 -> 1.14 Reader.h updated: 1.15 -> 1.16 WriteBytecodePass.h updated: 1.9 -> 1.10 Writer.h updated: 1.4 -> 1.5 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+21 -0) Index: llvm/include/llvm/Bytecode/Format.h diff -u llvm/include/llvm/Bytecode/Format.h:1.5 llvm/include/llvm/Bytecode/Format.h:1.6 --- llvm/include/llvm/Bytecode/Format.h:1.5 Mon Oct 20 15:19:21 2003 +++ llvm/include/llvm/Bytecode/Format.h Tue Nov 11 16:41:31 2003 @@ -15,6 +15,8 @@ #ifndef LLVM_BYTECODE_FORMAT_H #define LLVM_BYTECODE_FORMAT_H +namespace llvm { + class BytecodeFormat { // Throw the constants into a poorman's namespace... BytecodeFormat(); // do not implement public: @@ -38,4 +40,7 @@ BasicBlock = 0x31, // May contain many basic blocks }; }; + +} // End llvm namespace + #endif Index: llvm/include/llvm/Bytecode/Primitives.h diff -u llvm/include/llvm/Bytecode/Primitives.h:1.13 llvm/include/llvm/Bytecode/Primitives.h:1.14 --- llvm/include/llvm/Bytecode/Primitives.h:1.13 Mon Oct 20 15:19:21 2003 +++ llvm/include/llvm/Bytecode/Primitives.h Tue Nov 11 16:41:31 2003 @@ -23,6 +23,8 @@ #include #include +namespace llvm { + //===----------------------------------------------------------------------===// // Reading Primitives //===----------------------------------------------------------------------===// @@ -274,5 +276,7 @@ if (Align) align32(Out); } + +} // End llvm namespace #endif Index: llvm/include/llvm/Bytecode/Reader.h diff -u llvm/include/llvm/Bytecode/Reader.h:1.15 llvm/include/llvm/Bytecode/Reader.h:1.16 --- llvm/include/llvm/Bytecode/Reader.h:1.15 Mon Oct 20 15:19:21 2003 +++ llvm/include/llvm/Bytecode/Reader.h Tue Nov 11 16:41:31 2003 @@ -23,6 +23,8 @@ #include #include +namespace llvm { + /// getBytecodeModuleProvider - lazy function-at-a-time loading from a file /// ModuleProvider *getBytecodeModuleProvider(const std::string &Filename); @@ -52,5 +54,7 @@ bool ReadArchiveFile(const std::string &Filename, std::vector &Objects, std::string *ErrorStr = 0); + +} // End llvm namespace #endif Index: llvm/include/llvm/Bytecode/WriteBytecodePass.h diff -u llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.9 llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.10 --- llvm/include/llvm/Bytecode/WriteBytecodePass.h:1.9 Mon Oct 20 15:19:21 2003 +++ llvm/include/llvm/Bytecode/WriteBytecodePass.h Tue Nov 11 16:41:31 2003 @@ -19,6 +19,8 @@ #include "llvm/Bytecode/Writer.h" #include +namespace llvm { + class WriteBytecodePass : public Pass { std::ostream *Out; // ostream to print on bool DeleteStream; @@ -37,5 +39,7 @@ return false; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Bytecode/Writer.h diff -u llvm/include/llvm/Bytecode/Writer.h:1.4 llvm/include/llvm/Bytecode/Writer.h:1.5 --- llvm/include/llvm/Bytecode/Writer.h:1.4 Mon Oct 20 15:19:21 2003 +++ llvm/include/llvm/Bytecode/Writer.h Tue Nov 11 16:41:31 2003 @@ -26,7 +26,11 @@ #include +namespace llvm { + class Module; void WriteBytecodeToFile(const Module *C, std::ostream &Out); + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:46:24 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:46:24 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/AbstractTypeUser.h Argument.h BasicBlock.h CallGraphSCCPass.h Constant.h ConstantHandling.h Constants.h DerivedTypes.h Function.h GlobalValue.h GlobalVariable.h InstrTypes.h Instruction.def Instruction.h Intrinsics.h Module.h ModuleProvider.h Pass.h PassAnalysisSupport.h PassManager.h PassSupport.h SlotCalculator.h SymbolTable.h SymbolTableListTraits.h Type.def Type.h Use.h User.h Value.h iMemory.h iOperators.h iOther.h iPHINode.h iTerminators.h Message-ID: <200311112241.QAA20016@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: AbstractTypeUser.h updated: 1.16 -> 1.17 Argument.h updated: 1.6 -> 1.7 BasicBlock.h updated: 1.34 -> 1.35 CallGraphSCCPass.h updated: 1.2 -> 1.3 Constant.h updated: 1.11 -> 1.12 ConstantHandling.h updated: 1.31 -> 1.32 Constants.h updated: 1.33 -> 1.34 DerivedTypes.h updated: 1.46 -> 1.47 Function.h updated: 1.48 -> 1.49 GlobalValue.h updated: 1.12 -> 1.13 GlobalVariable.h updated: 1.24 -> 1.25 InstrTypes.h updated: 1.33 -> 1.34 Instruction.def updated: 1.11 -> 1.12 Instruction.h updated: 1.48 -> 1.49 Intrinsics.h updated: 1.12 -> 1.13 Module.h updated: 1.37 -> 1.38 ModuleProvider.h updated: 1.6 -> 1.7 Pass.h updated: 1.41 -> 1.42 PassAnalysisSupport.h updated: 1.16 -> 1.17 PassManager.h updated: 1.10 -> 1.11 PassSupport.h updated: 1.16 -> 1.17 SlotCalculator.h updated: 1.12 -> 1.13 SymbolTable.h updated: 1.28 -> 1.29 SymbolTableListTraits.h updated: 1.3 -> 1.4 Type.def updated: 1.5 -> 1.6 Type.h updated: 1.36 -> 1.37 Use.h updated: 1.2 -> 1.3 User.h updated: 1.26 -> 1.27 Value.h updated: 1.47 -> 1.48 iMemory.h updated: 1.41 -> 1.42 iOperators.h updated: 1.14 -> 1.15 iOther.h updated: 1.40 -> 1.41 iPHINode.h updated: 1.13 -> 1.14 iTerminators.h updated: 1.33 -> 1.34 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+147 -8) Index: llvm/include/llvm/AbstractTypeUser.h diff -u llvm/include/llvm/AbstractTypeUser.h:1.16 llvm/include/llvm/AbstractTypeUser.h:1.17 --- llvm/include/llvm/AbstractTypeUser.h:1.16 Mon Oct 20 15:19:13 2003 +++ llvm/include/llvm/AbstractTypeUser.h Tue Nov 11 16:41:29 2003 @@ -37,6 +37,8 @@ // #include +namespace llvm { + class Type; class DerivedType; @@ -164,5 +166,7 @@ void addRef(); void dropRef(); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Argument.h diff -u llvm/include/llvm/Argument.h:1.6 llvm/include/llvm/Argument.h:1.7 --- llvm/include/llvm/Argument.h:1.6 Mon Oct 20 15:19:13 2003 +++ llvm/include/llvm/Argument.h Tue Nov 11 16:41:29 2003 @@ -17,6 +17,8 @@ #include "llvm/Value.h" +namespace llvm { + class Argument : public Value { // Defined in the Function.cpp file Function *Parent; @@ -55,5 +57,7 @@ return V->getValueType() == ArgumentVal; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/BasicBlock.h diff -u llvm/include/llvm/BasicBlock.h:1.34 llvm/include/llvm/BasicBlock.h:1.35 --- llvm/include/llvm/BasicBlock.h:1.34 Thu Oct 30 17:41:19 2003 +++ llvm/include/llvm/BasicBlock.h Tue Nov 11 16:41:29 2003 @@ -33,6 +33,8 @@ #include "llvm/SymbolTableListTraits.h" #include "Support/ilist" +namespace llvm { + class TerminatorInst; template class SuccIterator; // Successor Iterator template class PredIterator; @@ -170,5 +172,7 @@ /// BasicBlock *splitBasicBlock(iterator I, const std::string &BBName = ""); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/CallGraphSCCPass.h diff -u llvm/include/llvm/CallGraphSCCPass.h:1.2 llvm/include/llvm/CallGraphSCCPass.h:1.3 --- llvm/include/llvm/CallGraphSCCPass.h:1.2 Mon Oct 20 15:19:13 2003 +++ llvm/include/llvm/CallGraphSCCPass.h Tue Nov 11 16:41:29 2003 @@ -23,6 +23,8 @@ #include "llvm/Pass.h" +namespace llvm { + class CallGraphNode; struct CallGraphSCCPass : public Pass { @@ -45,5 +47,7 @@ /// always explicitly call the implementation here. virtual void getAnalysisUsage(AnalysisUsage &Info) const; }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Constant.h diff -u llvm/include/llvm/Constant.h:1.11 llvm/include/llvm/Constant.h:1.12 --- llvm/include/llvm/Constant.h:1.11 Mon Oct 20 15:19:13 2003 +++ llvm/include/llvm/Constant.h Tue Nov 11 16:41:29 2003 @@ -16,6 +16,8 @@ #include "llvm/User.h" +namespace llvm { + class Constant : public User { protected: inline Constant(const Type *Ty) : User(Ty, Value::ConstantVal) {} @@ -90,5 +92,7 @@ unsigned mutateReferences(Value* OldV, Value *NewV); // END WARNING!! }; + +} // End llvm namespace #endif Index: llvm/include/llvm/ConstantHandling.h diff -u llvm/include/llvm/ConstantHandling.h:1.31 llvm/include/llvm/ConstantHandling.h:1.32 --- llvm/include/llvm/ConstantHandling.h:1.31 Tue Nov 4 17:37:40 2003 +++ llvm/include/llvm/ConstantHandling.h Tue Nov 11 16:41:29 2003 @@ -42,6 +42,9 @@ #include "llvm/Constants.h" #include "llvm/Type.h" + +namespace llvm { + class PointerType; //===----------------------------------------------------------------------===// @@ -244,4 +247,7 @@ const Constant *V2); Constant *ConstantFoldGetElementPtr(const Constant *C, const std::vector &IdxList); + +} // End llvm namespace + #endif Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.33 llvm/include/llvm/Constants.h:1.34 --- llvm/include/llvm/Constants.h:1.33 Mon Oct 20 15:19:13 2003 +++ llvm/include/llvm/Constants.h Tue Nov 11 16:41:29 2003 @@ -18,6 +18,8 @@ #include "llvm/Constant.h" #include "Support/DataTypes.h" +namespace llvm { + class ArrayType; class StructType; class PointerType; @@ -574,5 +576,7 @@ return isa(V) && classof(cast(V)); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/DerivedTypes.h diff -u llvm/include/llvm/DerivedTypes.h:1.46 llvm/include/llvm/DerivedTypes.h:1.47 --- llvm/include/llvm/DerivedTypes.h:1.46 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/DerivedTypes.h Tue Nov 11 16:41:29 2003 @@ -21,6 +21,8 @@ #include "llvm/Type.h" #include +namespace llvm { + template class TypeMap; class FunctionValType; class ArrayValType; @@ -489,5 +491,7 @@ if (!NewTy) return Ty; return *const_cast(this) = NewTy; } + +} // End llvm namespace #endif Index: llvm/include/llvm/Function.h diff -u llvm/include/llvm/Function.h:1.48 llvm/include/llvm/Function.h:1.49 --- llvm/include/llvm/Function.h:1.48 Thu Oct 30 17:41:19 2003 +++ llvm/include/llvm/Function.h Tue Nov 11 16:41:29 2003 @@ -22,6 +22,8 @@ #include "llvm/BasicBlock.h" #include "llvm/Argument.h" +namespace llvm { + class FunctionType; // Traits for intrusive list of instructions... @@ -95,7 +97,7 @@ virtual bool isExternal() const { return BasicBlocks.empty(); } /// getIntrinsicID - This method returns the ID number of the specified - /// function, or LLVMIntrinsic::not_intrinsic if the function is not an + /// function, or Intrinsic::not_intrinsic if the function is not an /// instrinsic, or if the pointer is null. This value is always defined to be /// zero to allow easy checking for whether a function is intrinsic or not. /// The particular intrinsic functions which correspond to this value are @@ -219,5 +221,7 @@ /// void dropAllReferences(); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/GlobalValue.h diff -u llvm/include/llvm/GlobalValue.h:1.12 llvm/include/llvm/GlobalValue.h:1.13 --- llvm/include/llvm/GlobalValue.h:1.12 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/GlobalValue.h Tue Nov 11 16:41:29 2003 @@ -18,6 +18,9 @@ #define LLVM_GLOBALVALUE_H #include "llvm/User.h" + +namespace llvm { + class PointerType; class Module; @@ -70,5 +73,7 @@ V->getValueType() == Value::GlobalVariableVal; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/GlobalVariable.h diff -u llvm/include/llvm/GlobalVariable.h:1.24 llvm/include/llvm/GlobalVariable.h:1.25 --- llvm/include/llvm/GlobalVariable.h:1.24 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/GlobalVariable.h Tue Nov 11 16:41:29 2003 @@ -22,6 +22,8 @@ #include "llvm/GlobalValue.h" +namespace llvm { + class Module; class Constant; class PointerType; @@ -104,5 +106,7 @@ return V->getValueType() == Value::GlobalVariableVal; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/InstrTypes.h diff -u llvm/include/llvm/InstrTypes.h:1.33 llvm/include/llvm/InstrTypes.h:1.34 --- llvm/include/llvm/InstrTypes.h:1.33 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/InstrTypes.h Tue Nov 11 16:41:29 2003 @@ -18,6 +18,8 @@ #include "llvm/Instruction.h" +namespace llvm { + //===----------------------------------------------------------------------===// // TerminatorInst Class //===----------------------------------------------------------------------===// @@ -133,5 +135,7 @@ return isa(V) && classof(cast(V)); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Instruction.def diff -u llvm/include/llvm/Instruction.def:1.11 llvm/include/llvm/Instruction.def:1.12 --- llvm/include/llvm/Instruction.def:1.11 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/Instruction.def Tue Nov 11 16:41:29 2003 @@ -15,7 +15,7 @@ // NOTE: NO INCLUDE GUARD DESIRED! -// Provide definitions of macros so that users of this file don't have to define +// Provide definitions of macros so that users of this file do not have to define // everything to use it... // #ifndef FIRST_TERM_INST Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.48 llvm/include/llvm/Instruction.h:1.49 --- llvm/include/llvm/Instruction.h:1.48 Thu Oct 30 17:41:19 2003 +++ llvm/include/llvm/Instruction.h Tue Nov 11 16:41:30 2003 @@ -17,6 +17,8 @@ #include "llvm/User.h" +namespace llvm { + class AssemblyAnnotationWriter; template struct ilist_traits; @@ -150,5 +152,7 @@ #include "llvm/Instruction.def" }; }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Intrinsics.h diff -u llvm/include/llvm/Intrinsics.h:1.12 llvm/include/llvm/Intrinsics.h:1.13 --- llvm/include/llvm/Intrinsics.h:1.12 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/Intrinsics.h Tue Nov 11 16:41:30 2003 @@ -16,11 +16,13 @@ #ifndef LLVM_INTRINSICS_H #define LLVM_INTRINSICS_H -/// LLVMIntrinsic Namespace - This namespace contains an enum with a value for +namespace llvm { + +/// Intrinsic Namespace - This namespace contains an enum with a value for /// every intrinsic/builtin function known by LLVM. These enum values are /// returned by Function::getIntrinsicID(). /// -namespace LLVMIntrinsic { +namespace Intrinsic { enum ID { not_intrinsic = 0, // Must be zero @@ -125,6 +127,9 @@ // second parameter, the possible values for which are // defined in the AlphaSfpToSq enumeration }; -} + +} // End Intrinsic namespace + +} // End llvm namespace #endif Index: llvm/include/llvm/Module.h diff -u llvm/include/llvm/Module.h:1.37 llvm/include/llvm/Module.h:1.38 --- llvm/include/llvm/Module.h:1.37 Thu Oct 30 17:41:19 2003 +++ llvm/include/llvm/Module.h Tue Nov 11 16:41:30 2003 @@ -21,6 +21,9 @@ #include "llvm/Function.h" #include "llvm/GlobalVariable.h" + +namespace llvm { + class GlobalVariable; class GlobalValueRefMap; // Used by ConstantVals.cpp class ConstantPointerRef; @@ -212,5 +215,7 @@ M.print(O); return O; } + +} // End llvm namespace #endif Index: llvm/include/llvm/ModuleProvider.h diff -u llvm/include/llvm/ModuleProvider.h:1.6 llvm/include/llvm/ModuleProvider.h:1.7 --- llvm/include/llvm/ModuleProvider.h:1.6 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/ModuleProvider.h Tue Nov 11 16:41:30 2003 @@ -18,6 +18,8 @@ #ifndef MODULEPROVIDER_H #define MODULEPROVIDER_H +namespace llvm { + class Function; class Module; @@ -51,5 +53,7 @@ return tempM; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Pass.h diff -u llvm/include/llvm/Pass.h:1.41 llvm/include/llvm/Pass.h:1.42 --- llvm/include/llvm/Pass.h:1.41 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/Pass.h Tue Nov 11 16:41:30 2003 @@ -34,6 +34,9 @@ #include #include #include + +namespace llvm { + class Value; class BasicBlock; class Function; @@ -328,6 +331,8 @@ virtual void addToPassManager(PassManagerT *PM, AnalysisUsage &AU); virtual void addToPassManager(PassManagerT *PM,AnalysisUsage &AU); }; + +} // End llvm namespace // Include support files that contain important APIs commonly used by Passes, // but that we want to separate out to make it easier to read the header files. Index: llvm/include/llvm/PassAnalysisSupport.h diff -u llvm/include/llvm/PassAnalysisSupport.h:1.16 llvm/include/llvm/PassAnalysisSupport.h:1.17 --- llvm/include/llvm/PassAnalysisSupport.h:1.16 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/PassAnalysisSupport.h Tue Nov 11 16:41:30 2003 @@ -19,6 +19,8 @@ #ifndef LLVM_PASS_ANALYSIS_SUPPORT_H #define LLVM_PASS_ANALYSIS_SUPPORT_H +namespace llvm { + // No need to include Pass.h, we are being included by it! //===----------------------------------------------------------------------===// @@ -132,5 +134,7 @@ if (PI == 0) return 0; return dynamic_cast(Resolver->getAnalysisToUpdate(PI)); } + +} // End llvm namespace #endif Index: llvm/include/llvm/PassManager.h diff -u llvm/include/llvm/PassManager.h:1.10 llvm/include/llvm/PassManager.h:1.11 --- llvm/include/llvm/PassManager.h:1.10 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/PassManager.h Tue Nov 11 16:41:30 2003 @@ -17,6 +17,8 @@ #ifndef LLVM_PASSMANAGER_H #define LLVM_PASSMANAGER_H +namespace llvm { + class Pass; class Module; class ModuleProvider; @@ -71,5 +73,7 @@ /// bool run(Function &F); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/PassSupport.h diff -u llvm/include/llvm/PassSupport.h:1.16 llvm/include/llvm/PassSupport.h:1.17 --- llvm/include/llvm/PassSupport.h:1.16 Fri Nov 7 12:56:32 2003 +++ llvm/include/llvm/PassSupport.h Tue Nov 11 16:41:30 2003 @@ -23,6 +23,8 @@ // No need to include Pass.h, we are being included by it! +namespace llvm { + class TargetMachine; //===--------------------------------------------------------------------------- @@ -395,4 +397,7 @@ struct IncludeFile { IncludeFile(void *); }; + +} // End llvm namespace + #endif Index: llvm/include/llvm/SlotCalculator.h diff -u llvm/include/llvm/SlotCalculator.h:1.12 llvm/include/llvm/SlotCalculator.h:1.13 --- llvm/include/llvm/SlotCalculator.h:1.12 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/SlotCalculator.h Tue Nov 11 16:41:30 2003 @@ -22,6 +22,9 @@ #include #include + +namespace llvm { + class Value; class Module; class Function; @@ -91,5 +94,7 @@ void processSymbolTable(const SymbolTable *ST); void processSymbolTableConstants(const SymbolTable *ST); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/SymbolTable.h diff -u llvm/include/llvm/SymbolTable.h:1.28 llvm/include/llvm/SymbolTable.h:1.29 --- llvm/include/llvm/SymbolTable.h:1.28 Sun Nov 9 13:39:48 2003 +++ llvm/include/llvm/SymbolTable.h Tue Nov 11 16:41:30 2003 @@ -26,6 +26,8 @@ #include "llvm/Value.h" #include +namespace llvm { + class SymbolTable : public AbstractTypeUser, public std::map > { @@ -131,5 +133,7 @@ virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy); virtual void typeBecameConcrete(const DerivedType *AbsTy); }; + +} // End llvm namespace #endif Index: llvm/include/llvm/SymbolTableListTraits.h diff -u llvm/include/llvm/SymbolTableListTraits.h:1.3 llvm/include/llvm/SymbolTableListTraits.h:1.4 --- llvm/include/llvm/SymbolTableListTraits.h:1.3 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/SymbolTableListTraits.h Tue Nov 11 16:41:30 2003 @@ -25,6 +25,8 @@ #ifndef LLVM_SYMBOLTABLELISTTRAITS_H #define LLVM_SYMBOLTABLELISTTRAITS_H +namespace llvm { + template class ilist_iterator; template class iplist; template struct ilist_traits; @@ -71,5 +73,7 @@ void setItemParent(ItemParentClass *IP) { ItemParent = IP; }//This is private! void setParent(SymTabClass *Parent); // This is private! }; + +} // End llvm namespace #endif Index: llvm/include/llvm/Type.def diff -u llvm/include/llvm/Type.def:1.5 llvm/include/llvm/Type.def:1.6 --- llvm/include/llvm/Type.def:1.5 Mon Oct 20 15:19:14 2003 +++ llvm/include/llvm/Type.def Tue Nov 11 16:41:30 2003 @@ -16,7 +16,7 @@ // NOTE: NO INCLUDE GUARD DESIRED! -// If the user didn't specify one of the macros, give a default noop defn. +// If the user did not specify one of the macros, give a default noop defn. // #ifndef HANDLE_PRIM_TYPE #define HANDLE_PRIM_TYPE(x,y) Index: llvm/include/llvm/Type.h diff -u llvm/include/llvm/Type.h:1.36 llvm/include/llvm/Type.h:1.37 --- llvm/include/llvm/Type.h:1.36 Wed Oct 29 19:38:41 2003 +++ llvm/include/llvm/Type.h Tue Nov 11 16:41:30 2003 @@ -37,6 +37,8 @@ #include "Support/GraphTraits.h" #include "Support/iterator" +namespace llvm { + class DerivedType; class FunctionType; class ArrayType; @@ -323,5 +325,7 @@ template <> inline bool isa_impl(const Type &Ty) { return Ty.getPrimitiveID() == Type::PointerTyID; } + +} // End llvm namespace #endif Index: llvm/include/llvm/Use.h diff -u llvm/include/llvm/Use.h:1.2 llvm/include/llvm/Use.h:1.3 --- llvm/include/llvm/Use.h:1.2 Mon Oct 20 15:19:15 2003 +++ llvm/include/llvm/Use.h Tue Nov 11 16:41:30 2003 @@ -17,6 +17,9 @@ #define LLVM_USE_H #include "Support/ilist" + +namespace llvm { + template struct ilist_traits; class Value; class User; @@ -77,13 +80,13 @@ }; -template<> struct simplify_type { +template<> struct std::simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const Use &Val) { return (SimpleType)Val.get(); } }; -template<> struct simplify_type { +template<> struct std::simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const Use &Val) { return (SimpleType)Val.get(); @@ -149,5 +152,7 @@ return tmp; } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/User.h diff -u llvm/include/llvm/User.h:1.26 llvm/include/llvm/User.h:1.27 --- llvm/include/llvm/User.h:1.26 Mon Oct 20 15:19:15 2003 +++ llvm/include/llvm/User.h Tue Nov 11 16:41:30 2003 @@ -22,6 +22,8 @@ #include "llvm/Value.h" #include +namespace llvm { + class User : public Value { User(const User &); // Do not implement protected: @@ -109,5 +111,7 @@ }; template<> struct simplify_type : public simplify_type {}; + +} // End llvm namespace #endif Index: llvm/include/llvm/Value.h diff -u llvm/include/llvm/Value.h:1.47 llvm/include/llvm/Value.h:1.48 --- llvm/include/llvm/Value.h:1.47 Mon Oct 20 15:19:15 2003 +++ llvm/include/llvm/Value.h Tue Nov 11 16:41:30 2003 @@ -23,6 +23,8 @@ #include "Support/Casting.h" #include +namespace llvm { + class Type; class Constant; class Argument; @@ -197,5 +199,7 @@ template <> inline bool isa_impl(const Value &Val) { return isa(Val) || isa(Val); } + +} // End llvm namespace #endif Index: llvm/include/llvm/iMemory.h diff -u llvm/include/llvm/iMemory.h:1.41 llvm/include/llvm/iMemory.h:1.42 --- llvm/include/llvm/iMemory.h:1.41 Mon Oct 20 15:19:15 2003 +++ llvm/include/llvm/iMemory.h Tue Nov 11 16:41:30 2003 @@ -16,6 +16,9 @@ #define LLVM_IMEMORY_H #include "llvm/Instruction.h" + +namespace llvm { + class PointerType; //===----------------------------------------------------------------------===// @@ -295,5 +298,7 @@ return isa(V) && classof(cast(V)); } }; + +} // End llvm namespace #endif // LLVM_IMEMORY_H Index: llvm/include/llvm/iOperators.h diff -u llvm/include/llvm/iOperators.h:1.14 llvm/include/llvm/iOperators.h:1.15 --- llvm/include/llvm/iOperators.h:1.14 Mon Oct 20 15:19:15 2003 +++ llvm/include/llvm/iOperators.h Tue Nov 11 16:41:30 2003 @@ -16,6 +16,8 @@ #include "llvm/InstrTypes.h" +namespace llvm { + /// SetCondInst class - Represent a setCC operator, where CC is eq, ne, lt, gt, /// le, or ge. /// @@ -62,5 +64,7 @@ return isa(V) && classof(cast(V)); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/iOther.h diff -u llvm/include/llvm/iOther.h:1.40 llvm/include/llvm/iOther.h:1.41 --- llvm/include/llvm/iOther.h:1.40 Fri Oct 31 11:51:02 2003 +++ llvm/include/llvm/iOther.h Tue Nov 11 16:41:30 2003 @@ -17,6 +17,8 @@ #include "llvm/InstrTypes.h" +namespace llvm { + //===----------------------------------------------------------------------===// // CastInst Class //===----------------------------------------------------------------------===// @@ -194,5 +196,7 @@ return isa(V) && classof(cast(V)); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/iPHINode.h diff -u llvm/include/llvm/iPHINode.h:1.13 llvm/include/llvm/iPHINode.h:1.14 --- llvm/include/llvm/iPHINode.h:1.13 Mon Oct 20 15:19:15 2003 +++ llvm/include/llvm/iPHINode.h Tue Nov 11 16:41:30 2003 @@ -15,6 +15,9 @@ #define LLVM_IPHINODE_H #include "llvm/Instruction.h" + +namespace llvm { + class BasicBlock; //===----------------------------------------------------------------------===// @@ -111,5 +114,7 @@ return isa(V) && classof(cast(V)); } }; + +} // End llvm namespace #endif Index: llvm/include/llvm/iTerminators.h diff -u llvm/include/llvm/iTerminators.h:1.33 llvm/include/llvm/iTerminators.h:1.34 --- llvm/include/llvm/iTerminators.h:1.33 Fri Oct 31 11:51:02 2003 +++ llvm/include/llvm/iTerminators.h Tue Nov 11 16:41:30 2003 @@ -18,6 +18,8 @@ #include "llvm/InstrTypes.h" +namespace llvm { + //===--------------------------------------------------------------------------- // ReturnInst - Return a value (possibly void), from a function. Execution does // not continue in this function any longer. @@ -305,5 +307,7 @@ return isa(V) && classof(cast(V)); } }; + +} // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Nov 11 16:46:31 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:46:31 2003 Subject: [llvm-commits] CVS: llvm/include/Support/Annotation.h BitSetVector.h Casting.h CommandLine.h DOTGraphTraits.h Debug.h DepthFirstIterator.h DynamicLinker.h EquivalenceClasses.h FileUtilities.h GraphTraits.h GraphWriter.h LeakDetector.h MallocAllocator.h MathExtras.h PostOrderIterator.h SCCIterator.h STLExtras.h SetOperations.h Signals.h Statistic.h StringExtras.h SystemUtils.h Timer.h Tree.h TypeInfo.h VectorExtras.h ilist Message-ID: <200311112241.QAA19943@zion.cs.uiuc.edu> Changes in directory llvm/include/Support: Annotation.h updated: 1.12 -> 1.13 BitSetVector.h updated: 1.10 -> 1.11 Casting.h updated: 1.10 -> 1.11 CommandLine.h updated: 1.27 -> 1.28 DOTGraphTraits.h updated: 1.7 -> 1.8 Debug.h updated: 1.2 -> 1.3 DepthFirstIterator.h updated: 1.11 -> 1.12 DynamicLinker.h updated: 1.2 -> 1.3 EquivalenceClasses.h updated: 1.5 -> 1.6 FileUtilities.h updated: 1.7 -> 1.8 GraphTraits.h updated: 1.5 -> 1.6 GraphWriter.h updated: 1.16 -> 1.17 LeakDetector.h updated: 1.3 -> 1.4 MallocAllocator.h updated: 1.3 -> 1.4 MathExtras.h updated: 1.8 -> 1.9 PostOrderIterator.h updated: 1.13 -> 1.14 SCCIterator.h updated: 1.16 -> 1.17 STLExtras.h updated: 1.9 -> 1.10 SetOperations.h updated: 1.4 -> 1.5 Signals.h updated: 1.6 -> 1.7 Statistic.h updated: 1.7 -> 1.8 StringExtras.h updated: 1.9 -> 1.10 SystemUtils.h updated: 1.8 -> 1.9 Timer.h updated: 1.11 -> 1.12 Tree.h updated: 1.8 -> 1.9 TypeInfo.h updated: 1.4 -> 1.5 VectorExtras.h updated: 1.2 -> 1.3 ilist updated: 1.14 -> 1.15 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+110 -2) Index: llvm/include/Support/Annotation.h diff -u llvm/include/Support/Annotation.h:1.12 llvm/include/Support/Annotation.h:1.13 --- llvm/include/Support/Annotation.h:1.12 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/Annotation.h Tue Nov 11 16:41:29 2003 @@ -25,6 +25,8 @@ #include #include +namespace llvm { + class AnnotationID; class Annotation; class Annotable; @@ -216,5 +218,7 @@ addAnnotation(A); return A; } + +} // End namespace llvm #endif Index: llvm/include/Support/BitSetVector.h diff -u llvm/include/Support/BitSetVector.h:1.10 llvm/include/Support/BitSetVector.h:1.11 --- llvm/include/Support/BitSetVector.h:1.10 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/BitSetVector.h Tue Nov 11 16:41:29 2003 @@ -30,6 +30,8 @@ #include #include +namespace llvm { + class BitSetVector { enum { BITSET_WORDSIZE = sizeof(long)*8 }; @@ -266,4 +268,5 @@ return true; } +} // End llvm namespace #endif Index: llvm/include/Support/Casting.h diff -u llvm/include/Support/Casting.h:1.10 llvm/include/Support/Casting.h:1.11 --- llvm/include/Support/Casting.h:1.10 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/Casting.h Tue Nov 11 16:41:29 2003 @@ -15,6 +15,8 @@ #ifndef SUPPORT_CASTING_H #define SUPPORT_CASTING_H +namespace llvm { + //===----------------------------------------------------------------------===// // isa Support Templates //===----------------------------------------------------------------------===// @@ -292,5 +294,7 @@ } #endif + +} // End llvm namespace #endif Index: llvm/include/Support/CommandLine.h diff -u llvm/include/Support/CommandLine.h:1.27 llvm/include/Support/CommandLine.h:1.28 --- llvm/include/Support/CommandLine.h:1.27 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/CommandLine.h Tue Nov 11 16:41:29 2003 @@ -27,6 +27,7 @@ #include #include "boost/type_traits/object_traits.hpp" +namespace llvm { /// cl Namespace - This namespace contains all of the command line option /// processing machinery. It is intentionally a short name to make qualified /// usage concise. @@ -1021,5 +1022,7 @@ }; } // End namespace cl + +} // End namespace llvm #endif Index: llvm/include/Support/DOTGraphTraits.h diff -u llvm/include/Support/DOTGraphTraits.h:1.7 llvm/include/Support/DOTGraphTraits.h:1.8 --- llvm/include/Support/DOTGraphTraits.h:1.7 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/DOTGraphTraits.h Tue Nov 11 16:41:29 2003 @@ -19,6 +19,8 @@ #include +namespace llvm { + /// DefaultDOTGraphTraits - This class provides the default implementations of /// all of the DOTGraphTraits methods. If a specialization does not need to /// override all methods here it should inherit so that it can get the default @@ -95,5 +97,7 @@ /// template class DOTGraphTraits : public DefaultDOTGraphTraits {}; + +} // End llvm namespace #endif Index: llvm/include/Support/Debug.h diff -u llvm/include/Support/Debug.h:1.2 llvm/include/Support/Debug.h:1.3 --- llvm/include/Support/Debug.h:1.2 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/Debug.h Tue Nov 11 16:41:29 2003 @@ -26,6 +26,8 @@ #ifndef SUPPORT_DEBUG_H #define SUPPORT_DEBUG_H +namespace llvm { + // DebugFlag - This boolean is set to true if the '-debug' command line option // is specified. This should probably not be referenced directly, instead, use // the DEBUG macro below. @@ -56,5 +58,7 @@ #define DEBUG(X) \ do { if (DebugFlag && isCurrentDebugType(DEBUG_TYPE)) { X; } } while (0) #endif + +} // End llvm namespace #endif Index: llvm/include/Support/DepthFirstIterator.h diff -u llvm/include/Support/DepthFirstIterator.h:1.11 llvm/include/Support/DepthFirstIterator.h:1.12 --- llvm/include/Support/DepthFirstIterator.h:1.11 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/DepthFirstIterator.h Tue Nov 11 16:41:29 2003 @@ -38,6 +38,8 @@ #include #include +namespace llvm { + // df_iterator_storage - A private class which is used to figure out where to // store the visited set. template // Non-external set @@ -223,5 +225,6 @@ return idf_ext_iterator::end(G, S); } +} // End llvm namespace #endif Index: llvm/include/Support/DynamicLinker.h diff -u llvm/include/Support/DynamicLinker.h:1.2 llvm/include/Support/DynamicLinker.h:1.3 --- llvm/include/Support/DynamicLinker.h:1.2 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/DynamicLinker.h Tue Nov 11 16:41:29 2003 @@ -18,6 +18,8 @@ #include +namespace llvm { + /// LinkDynamicObject - Load the named file as a dynamic library /// and link it with the currently running process. Returns false /// on success, true if there is an error (and sets ErrorMessage @@ -32,5 +34,7 @@ /// void *GetAddressOfSymbol (const char *symbolName); void *GetAddressOfSymbol (const std::string &symbolName); + +} // End llvm namespace #endif // SUPPORT_DYNAMICLINKER_H Index: llvm/include/Support/EquivalenceClasses.h diff -u llvm/include/Support/EquivalenceClasses.h:1.5 llvm/include/Support/EquivalenceClasses.h:1.6 --- llvm/include/Support/EquivalenceClasses.h:1.5 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/EquivalenceClasses.h Tue Nov 11 16:41:29 2003 @@ -20,6 +20,8 @@ #include #include +namespace llvm { + template class EquivalenceClasses { // Maps each element to the element that is the leader of its @@ -88,5 +90,7 @@ return Elem2ECLeaderMap ; } }; + +} // End llvm namespace #endif Index: llvm/include/Support/FileUtilities.h diff -u llvm/include/Support/FileUtilities.h:1.7 llvm/include/Support/FileUtilities.h:1.8 --- llvm/include/Support/FileUtilities.h:1.7 Tue Nov 11 15:53:29 2003 +++ llvm/include/Support/FileUtilities.h Tue Nov 11 16:41:29 2003 @@ -17,6 +17,8 @@ #include +namespace llvm { + /// CheckMagic - Returns true IFF the file named FN begins with Magic. FN must /// name a readable file. /// @@ -94,5 +96,7 @@ /// In case of failure, the file's access attributes are unspecified. /// bool MakeFileReadable (const std::string & Filename); + +} // End llvm namespace #endif Index: llvm/include/Support/GraphTraits.h diff -u llvm/include/Support/GraphTraits.h:1.5 llvm/include/Support/GraphTraits.h:1.6 --- llvm/include/Support/GraphTraits.h:1.5 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/GraphTraits.h Tue Nov 11 16:41:29 2003 @@ -18,6 +18,8 @@ #ifndef SUPPORT_GRAPHTRAITS_H #define SUPPORT_GRAPHTRAITS_H +namespace llvm { + // GraphTraits - This class should be specialized by different graph types... // which is why the default version is empty. // @@ -75,5 +77,7 @@ inline Inverse(GraphType &G) : Graph(G) {} }; + +} // End llvm namespace #endif Index: llvm/include/Support/GraphWriter.h diff -u llvm/include/Support/GraphWriter.h:1.16 llvm/include/Support/GraphWriter.h:1.17 --- llvm/include/Support/GraphWriter.h:1.16 Fri Oct 31 16:16:41 2003 +++ llvm/include/Support/GraphWriter.h Tue Nov 11 16:41:29 2003 @@ -28,6 +28,8 @@ #include #include +namespace llvm { + namespace DOT { // Private functions... inline std::string EscapeString(const std::string &Label) { std::string Str(Label); @@ -205,5 +207,7 @@ W.writeFooter(); return O; } + +} // End llvm namespace #endif Index: llvm/include/Support/LeakDetector.h diff -u llvm/include/Support/LeakDetector.h:1.3 llvm/include/Support/LeakDetector.h:1.4 --- llvm/include/Support/LeakDetector.h:1.3 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/LeakDetector.h Tue Nov 11 16:41:29 2003 @@ -23,6 +23,9 @@ #define SUPPORT_LEAKDETECTOR_H #include + +namespace llvm { + class Value; struct LeakDetector { @@ -82,5 +85,7 @@ static void removeGarbageObjectImpl(void *Object); static void checkForGarbageImpl(const std::string &Message); }; + +} // End llvm namespace #endif Index: llvm/include/Support/MallocAllocator.h diff -u llvm/include/Support/MallocAllocator.h:1.3 llvm/include/Support/MallocAllocator.h:1.4 --- llvm/include/Support/MallocAllocator.h:1.3 Fri Nov 7 17:20:56 2003 +++ llvm/include/Support/MallocAllocator.h Tue Nov 11 16:41:29 2003 @@ -23,6 +23,8 @@ #include #include +namespace llvm { + template struct MallocAllocator { typedef size_t size_type; @@ -79,5 +81,6 @@ }; } +} // End llvm namespace #endif Index: llvm/include/Support/MathExtras.h diff -u llvm/include/Support/MathExtras.h:1.8 llvm/include/Support/MathExtras.h:1.9 --- llvm/include/Support/MathExtras.h:1.8 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/MathExtras.h Tue Nov 11 16:41:29 2003 @@ -16,6 +16,8 @@ #include "Support/DataTypes.h" +namespace llvm { + inline unsigned log2(uint64_t C) { unsigned getPow; for (getPow = 0; C > 1; ++getPow) @@ -32,5 +34,7 @@ return false; } + +} // End llvm namespace #endif Index: llvm/include/Support/PostOrderIterator.h diff -u llvm/include/Support/PostOrderIterator.h:1.13 llvm/include/Support/PostOrderIterator.h:1.14 --- llvm/include/Support/PostOrderIterator.h:1.13 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/PostOrderIterator.h Tue Nov 11 16:41:29 2003 @@ -21,6 +21,8 @@ #include #include +namespace llvm { + template > class po_iterator : public forward_iterator { typedef forward_iterator super; @@ -148,5 +150,7 @@ inline rpo_iterator begin() { return Blocks.rbegin(); } inline rpo_iterator end() { return Blocks.rend(); } }; + +} // End llvm namespace #endif Index: llvm/include/Support/SCCIterator.h diff -u llvm/include/Support/SCCIterator.h:1.16 llvm/include/Support/SCCIterator.h:1.17 --- llvm/include/Support/SCCIterator.h:1.16 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/SCCIterator.h Tue Nov 11 16:41:29 2003 @@ -26,6 +26,8 @@ #include #include +namespace llvm { + //===----------------------------------------------------------------------===// /// /// scc_iterator - Enumerate the SCCs of a directed graph, in @@ -196,5 +198,7 @@ scc_iterator scc_end(T G) { return scc_iterator::end(G); } + +} // End llvm namespace #endif Index: llvm/include/Support/STLExtras.h diff -u llvm/include/Support/STLExtras.h:1.9 llvm/include/Support/STLExtras.h:1.10 --- llvm/include/Support/STLExtras.h:1.9 Tue Nov 4 23:58:26 2003 +++ llvm/include/Support/STLExtras.h Tue Nov 11 16:41:29 2003 @@ -21,6 +21,8 @@ #include "Support/iterator" #include "boost/type_traits/transform_traits.hpp" +namespace llvm { + //===----------------------------------------------------------------------===// // Extra additions to //===----------------------------------------------------------------------===// @@ -277,5 +279,7 @@ inline tier tie(T1& f, T2& s) { return tier(f, s); } + +} // End llvm namespace #endif Index: llvm/include/Support/SetOperations.h diff -u llvm/include/Support/SetOperations.h:1.4 llvm/include/Support/SetOperations.h:1.5 --- llvm/include/Support/SetOperations.h:1.4 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/SetOperations.h Tue Nov 11 16:41:29 2003 @@ -15,6 +15,8 @@ #ifndef SUPPORT_SETOPERATIONS_H #define SUPPORT_SETOPERATIONS_H +namespace llvm { + // set_union(A, B) - Compute A := A u B, return whether A changed. // template @@ -63,5 +65,7 @@ SI != SE; ++SI) S1.erase(*SI); } + +} // End llvm namespace #endif Index: llvm/include/Support/Signals.h diff -u llvm/include/Support/Signals.h:1.6 llvm/include/Support/Signals.h:1.7 --- llvm/include/Support/Signals.h:1.6 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/Signals.h Tue Nov 11 16:41:29 2003 @@ -17,10 +17,13 @@ #include +namespace llvm { + // RemoveFileOnSignal - This function registers signal handlers to ensure that // if a signal gets delivered that the named file is removed. // void RemoveFileOnSignal(const std::string &Filename); -#endif +} // End llvm namespace +#endif Index: llvm/include/Support/Statistic.h diff -u llvm/include/Support/Statistic.h:1.7 llvm/include/Support/Statistic.h:1.8 --- llvm/include/Support/Statistic.h:1.7 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/Statistic.h Tue Nov 11 16:41:29 2003 @@ -26,6 +26,8 @@ #include +namespace llvm { + // StatisticBase - Nontemplated base class for Statistic<> class... class StatisticBase { const char *Name; @@ -77,5 +79,7 @@ const Statistic &operator+=(const DataType &V) { Value += V; return *this; } const Statistic &operator-=(const DataType &V) { Value -= V; return *this; } }; + +} // End llvm namespace #endif Index: llvm/include/Support/StringExtras.h diff -u llvm/include/Support/StringExtras.h:1.9 llvm/include/Support/StringExtras.h:1.10 --- llvm/include/Support/StringExtras.h:1.9 Thu Oct 30 09:03:49 2003 +++ llvm/include/Support/StringExtras.h Tue Nov 11 16:41:29 2003 @@ -18,6 +18,8 @@ #include #include +namespace llvm { + static inline std::string utohexstr(uint64_t X) { char Buffer[40]; char *BufPtr = Buffer+39; @@ -94,5 +96,7 @@ snprintf(Buffer, 200, "%20.6e", V); return Buffer; } + +} // End llvm namespace #endif Index: llvm/include/Support/SystemUtils.h diff -u llvm/include/Support/SystemUtils.h:1.8 llvm/include/Support/SystemUtils.h:1.9 --- llvm/include/Support/SystemUtils.h:1.8 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/SystemUtils.h Tue Nov 11 16:41:29 2003 @@ -17,6 +17,8 @@ #include +namespace llvm { + /// isExecutableFile - This function returns true if the filename specified /// exists and is executable. /// @@ -45,4 +47,7 @@ /// wait for it to terminate. /// int ExecWait (const char * const argv[], const char * const envp[]); + +} // End llvm namespace + #endif Index: llvm/include/Support/Timer.h diff -u llvm/include/Support/Timer.h:1.11 llvm/include/Support/Timer.h:1.12 --- llvm/include/Support/Timer.h:1.11 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/Timer.h Tue Nov 11 16:41:29 2003 @@ -20,6 +20,8 @@ #include #include +namespace llvm { + class TimerGroup; /// Timer - This class is used to track the amount of time spent between @@ -156,5 +158,7 @@ TimersToPrint.push_back(Timer(true, T)); } }; + +} // End llvm namespace #endif Index: llvm/include/Support/Tree.h diff -u llvm/include/Support/Tree.h:1.8 llvm/include/Support/Tree.h:1.9 --- llvm/include/Support/Tree.h:1.8 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/Tree.h Tue Nov 11 16:41:29 2003 @@ -17,6 +17,8 @@ #include +namespace llvm { + template class Tree { std::vector Children; // This nodes children, if any @@ -55,5 +57,6 @@ inline const Payload &getTreeData() const { return Data; } }; +} // End llvm namespace #endif Index: llvm/include/Support/TypeInfo.h diff -u llvm/include/Support/TypeInfo.h:1.4 llvm/include/Support/TypeInfo.h:1.5 --- llvm/include/Support/TypeInfo.h:1.4 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/TypeInfo.h Tue Nov 11 16:41:29 2003 @@ -18,6 +18,8 @@ #include +namespace llvm { + struct TypeInfo { TypeInfo() { // needed for containers struct Nil {}; // Anonymous class distinct from all others... @@ -68,5 +70,7 @@ inline bool operator>=(const TypeInfo &lhs, const TypeInfo &rhs) { return !(lhs < rhs); } + +} // End llvm namespace #endif Index: llvm/include/Support/VectorExtras.h diff -u llvm/include/Support/VectorExtras.h:1.2 llvm/include/Support/VectorExtras.h:1.3 --- llvm/include/Support/VectorExtras.h:1.2 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/VectorExtras.h Tue Nov 11 16:41:29 2003 @@ -17,6 +17,8 @@ #include +namespace llvm { + /// make_vector - Helper function which is useful for building temporary vectors /// to pass into type construction of CallInst ctors. This turns a null /// terminated list of pointers (or other value types) into a real live vector. @@ -32,5 +34,7 @@ va_end(Args); return Result; } + +} // End llvm namespace #endif Index: llvm/include/Support/ilist diff -u llvm/include/Support/ilist:1.14 llvm/include/Support/ilist:1.15 --- llvm/include/Support/ilist:1.14 Mon Oct 20 15:29:44 2003 +++ llvm/include/Support/ilist Tue Nov 11 16:41:29 2003 @@ -41,6 +41,8 @@ #include #include +namespace llvm { + template class iplist; template class ilist_iterator; @@ -522,10 +524,12 @@ void resize(size_type newsize) { resize(newsize, NodeTy()); } }; +} // End llvm namespace + namespace std { // Ensure that swap uses the fast list swap... template - void swap(iplist &Left, iplist &Right) { + void swap(llvm::iplist &Left, llvm::iplist &Right) { Left.swap(Right); } } // End 'std' extensions... From gaeke at cs.uiuc.edu Tue Nov 11 16:46:39 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:46:39 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200311112241.QAA19882@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.47 -> 1.48 --- Log message: Put all LLVM code into the llvm namespace, as per bug 109. --- Diffs of the changes: (+1 -0) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.47 llvm/autoconf/configure.ac:1.48 --- llvm/autoconf/configure.ac:1.47 Sun Nov 9 21:06:07 2003 +++ llvm/autoconf/configure.ac Tue Nov 11 16:41:29 2003 @@ -16,6 +16,7 @@ dnl * Initialize dnl ************************************************************************** AC_INIT([[[LLVM]]],[[[1.0]]],[llvmbugs at cs.uiuc.edu]) +dnl AC_CONFIG_SRC_DIR(lib/VMCore/Pass.cpp) dnl Place all of the extra autoconf files into the config subdirectory AC_CONFIG_AUX_DIR([autoconf]) From gaeke at cs.uiuc.edu Tue Nov 11 16:47:05 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 16:47:05 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311112245.QAA21294@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.37 -> 1.38 --- Log message: Mention that all LLVM C++ code has been moved into the 'llvm' C++ namespace. --- Diffs of the changes: (+4 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.37 llvm/docs/ReleaseNotes.html:1.38 --- llvm/docs/ReleaseNotes.html:1.37 Tue Nov 11 15:52:34 2003 +++ llvm/docs/ReleaseNotes.html Tue Nov 11 16:45:41 2003 @@ -71,6 +71,9 @@ explore the LLVM optimizer with the C backend (note that LLVM requires GCC 3.3 on Mac OSX).

      +

    • The LLVM C++ code has been completely moved into the 'llvm' C++ +namespace, for easier integration with other code.
    • +

      In this release, the following missing features were implemented:

      @@ -432,6 +435,6 @@ Maintained By: The LLVM Team
      -Last modified: Tue Nov 11 15:48:35 CST 2003 +Last modified: Tue Nov 11 16:45:07 CST 2003 From lattner at cs.uiuc.edu Tue Nov 11 17:46:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 17:46:02 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311112345.RAA23824@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.38 -> 1.39 --- Log message: Add a link to the llvmdev posting --- Diffs of the changes: (+5 -3) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.38 llvm/docs/ReleaseNotes.html:1.39 --- llvm/docs/ReleaseNotes.html:1.38 Tue Nov 11 16:45:41 2003 +++ llvm/docs/ReleaseNotes.html Tue Nov 11 17:45:03 2003 @@ -71,8 +71,10 @@ explore the LLVM optimizer with the C backend (note that LLVM requires GCC 3.3 on Mac OSX).

      -

    • The LLVM C++ code has been completely moved into the 'llvm' C++ -namespace, for easier integration with other code.
    • +
    • The +LLVM C++ code has been completely moved into the 'llvm' C++ namespace, for +easier integration with other code.
    • @@ -435,6 +437,6 @@ Maintained By: The LLVM Team
      -Last modified: Tue Nov 11 16:45:07 CST 2003 +Last modified: Tue Nov 11 17:44:33 CST 2003 From lattner at cs.uiuc.edu Tue Nov 11 17:47:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 17:47:01 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311112346.RAA23962@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.39 -> 1.40 --- Log message: reword a bit, be less aggressive with my link --- Diffs of the changes: (+5 -5) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.39 llvm/docs/ReleaseNotes.html:1.40 --- llvm/docs/ReleaseNotes.html:1.39 Tue Nov 11 17:45:03 2003 +++ llvm/docs/ReleaseNotes.html Tue Nov 11 17:46:35 2003 @@ -71,10 +71,10 @@ explore the LLVM optimizer with the C backend (note that LLVM requires GCC 3.3 on Mac OSX).

      -

    • The -LLVM C++ code has been completely moved into the 'llvm' C++ namespace, for -easier integration with other code.
    • +
    • LLVM has been moved +into an 'llvm' C++ namespace, for easier integration with third-party +code.
    • @@ -437,6 +437,6 @@ Maintained By: The LLVM Team
      -Last modified: Tue Nov 11 17:44:33 CST 2003 +Last modified: Tue Nov 11 17:46:21 CST 2003 From lattner at cs.uiuc.edu Tue Nov 11 18:41:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 18:41:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp Message-ID: <200311120040.SAA06887@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: MemoryDepAnalysis.cpp updated: 1.11 -> 1.12 --- Log message: Cleanups --- Diffs of the changes: (+5 -4) Index: llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp diff -u llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.11 llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.12 --- llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp:1.11 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp Tue Nov 11 18:40:34 2003 @@ -1,4 +1,4 @@ -//===- MemoryDepAnalysis.cpp - Compute dep graph for memory ops --*-C++-*--===// +//===- MemoryDepAnalysis.cpp - Compute dep graph for memory ops -----------===// // // The LLVM Compiler Infrastructure // @@ -14,15 +14,16 @@ // // The result of this pass is a DependenceGraph for each function // representing the memory-based data dependences between instructions. +// //===----------------------------------------------------------------------===// #include "llvm/Analysis/MemoryDepAnalysis.h" -#include "llvm/Analysis/IPModRef.h" -#include "llvm/Analysis/DataStructure.h" -#include "llvm/Analysis/DSGraph.h" #include "llvm/Module.h" #include "llvm/iMemory.h" #include "llvm/iOther.h" +#include "llvm/Analysis/IPModRef.h" +#include "llvm/Analysis/DataStructure.h" +#include "llvm/Analysis/DSGraph.h" #include "llvm/Support/InstVisitor.h" #include "llvm/Support/CFG.h" #include "Support/SCCIterator.h" From gaeke at cs.uiuc.edu Tue Nov 11 19:13:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Nov 11 19:13:01 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200311120112.TAA28548@gally.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.48 -> 1.49 --- Log message: I don't think this was supposed to have gotten into the namespaceify patch, but it did. Oops! --- Diffs of the changes: (+0 -1) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.48 llvm/autoconf/configure.ac:1.49 --- llvm/autoconf/configure.ac:1.48 Tue Nov 11 16:41:29 2003 +++ llvm/autoconf/configure.ac Tue Nov 11 19:11:54 2003 @@ -16,7 +16,6 @@ dnl * Initialize dnl ************************************************************************** AC_INIT([[[LLVM]]],[[[1.0]]],[llvmbugs at cs.uiuc.edu]) -dnl AC_CONFIG_SRC_DIR(lib/VMCore/Pass.cpp) dnl Place all of the extra autoconf files into the config subdirectory AC_CONFIG_AUX_DIR([autoconf]) From criswell at cs.uiuc.edu Tue Nov 11 20:47:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Nov 11 20:47:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp PoolAllocator.h PoolSlab.h Message-ID: <200311120246.UAA26648@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.12 -> 1.13 PoolAllocator.h updated: 1.4 -> 1.5 PoolSlab.h updated: 1.1 -> 1.2 --- Log message: Fixed the API to match the BitMap PoolAllocator API. This is the one used by the LLVM Pool Allocation passes. Decreased the complexity and (hopefully) increased the speed of allocation. Ensure that arrays larger than a block are not freed upon pool destruction (as they are not managed by the PageManager). Make sure that we don't use memory that we just deallocated (we were doing this in pooldestroy). --- Diffs of the changes: (+50 -11) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.12 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.13 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.12 Tue Nov 11 14:43:40 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Tue Nov 11 20:46:21 2003 @@ -51,9 +51,17 @@ // // If we can't fit a node into a page, give up. // + if (NodeSize > PageSize) + { + fprintf (stderr, "Node size is too big.\n"); + fflush (stderr); + abort(); + } + if (MaxNodesPerPage == 0) { fprintf (stderr, "Node size is too large\n"); + fflush (stderr); abort(); } @@ -66,19 +74,23 @@ if (NewSlab == NULL) { fprintf (stderr, "Failed large allocation\n"); + fflush (stderr); abort(); } NewSlab->IsArray = 1; + NewSlab->IsManaged = 0; } else { NewSlab = (struct SlabHeader *) AllocatePage (); if (NewSlab == NULL) { - fprintf (stderr, "Failed regular allocation"); + fprintf (stderr, "Failed regular allocation\n"); + fflush (stderr); abort(); } NewSlab->IsArray = 0; + NewSlab->IsManaged = 1; // // Bump the number of nodes in the slab up to the maximum. @@ -90,7 +102,6 @@ NewSlab->NextFreeData = NewSlab->LiveNodes = 0; NewSlab->Next = NULL; NewSlab->Data = (unsigned char *)NewSlab + sizeof (struct SlabHeader) + ((NodesPerSlab) * sizeof (NodePointer)); - return NewSlab; } @@ -187,27 +198,48 @@ { // Pointer to scan Slab list struct SlabHeader * Slabp; + struct SlabHeader * Nextp; assert(Pool && "Null pool pointer passed in to pooldestroy!\n"); - for (Slabp = Pool->Slabs; Slabp != NULL; Slabp=Slabp->Next) + + // + // Deallocate all of the pages. + // + Slabp = Pool->Slabs; + while (Slabp != NULL) { - FreePage (Slabp); + // Record the next step + Nextp = Slabp->Next; + + // Deallocate the memory if it is managed. + if (Slabp->IsManaged) + { + FreePage (Slabp); + } + + // Move to the next node. + Slabp = Nextp; } return; } void * -poolalloc(PoolTy *Pool) +poolalloc(PoolTy *Pool, unsigned NodeSize) { + void * Data; assert(Pool && "Null pool pointer passed in to poolalloc!\n"); + assert((NodeSize <= Pool->NodeSize) && "Wrong Node Size!\n"); // - // Check to see if we have a slab. If we don't, get one. + // If we don't have a slab, this is our first initialization. Do some + // quick stuff. // if (Pool->Slabs == NULL) { Pool->Slabs = createSlab (Pool->NodeSize); + (Pool->Slabs->NextFreeData)++; + return (Pool->Slabs->Data); } // @@ -218,7 +250,9 @@ // // Return the block and increment the index of the next free data block. // - return (Pool->Slabs->Data + (Pool->NodeSize * Pool->Slabs->NextFreeData++)); + Data = (Pool->Slabs->Data + (Pool->NodeSize * Pool->Slabs->NextFreeData)); + (Pool->Slabs->NextFreeData)++; + return (Data); } // @@ -234,10 +268,12 @@ NewSlab->Next = Pool->Slabs; Pool->Slabs = NewSlab; + (NewSlab->NextFreeData)++; + // // Return the block and increment the index of the next free data block. // - return (Pool->Slabs->Data + (Pool->NodeSize * Pool->Slabs->NextFreeData++)); + return (Pool->Slabs->Data); } // @@ -255,7 +291,7 @@ // // Find the data block that corresponds with this pointer. // - void * Data = (slabp->Data + (Pool->NodeSize * (Pool->FreeList.Next - &(slabp->BlockList[0])))); + Data = (slabp->Data + (Pool->NodeSize * (Pool->FreeList.Next - &(slabp->BlockList[0])))); // // Unlink the first block. Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.4 poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.5 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.4 Tue Nov 11 09:59:55 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.h Tue Nov 11 20:46:21 2003 @@ -40,7 +40,7 @@ void poolinit(PoolTy *Pool, unsigned NodeSize); void poolmakeunfreeable(PoolTy *Pool); void pooldestroy(PoolTy *Pool); - void *poolalloc(PoolTy *Pool); + void *poolalloc(PoolTy *Pool, unsigned NodeSize); void poolfree(PoolTy *Pool, void *Node); void* poolallocarray(PoolTy* Pool, unsigned Size); } Index: poolalloc/runtime/FreeListAllocator/PoolSlab.h diff -u poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.1 poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.2 --- poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.1 Tue Nov 11 09:59:55 2003 +++ poolalloc/runtime/FreeListAllocator/PoolSlab.h Tue Nov 11 20:46:21 2003 @@ -55,7 +55,10 @@ struct SlabHeader { // Flags whether this is an array - unsigned int IsArray; + unsigned char IsArray; + + // Flags whether this is managed by the Page Manager + unsigned char IsManaged; // Number of nodes per slab unsigned int NodesPerSlab; From lattner at cs.uiuc.edu Tue Nov 11 22:41:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 22:41:03 2003 Subject: [llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y Message-ID: <200311120440.WAA04739@zion.cs.uiuc.edu> Changes in directory llvm/lib/AsmParser: llvmAsmParser.y updated: 1.138 -> 1.139 --- Log message: Fix bug PR107, patch contributed by Reid Spencer! --- Diffs of the changes: (+26 -1) Index: llvm/lib/AsmParser/llvmAsmParser.y diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.138 llvm/lib/AsmParser/llvmAsmParser.y:1.139 --- llvm/lib/AsmParser/llvmAsmParser.y:1.138 Tue Nov 11 16:41:32 2003 +++ llvm/lib/AsmParser/llvmAsmParser.y Tue Nov 11 22:40:30 2003 @@ -147,6 +147,7 @@ std::vector LateResolveValues; std::vector Types; std::map LateResolveTypes; + SymbolTable LocalSymtab; bool isDeclare; // Is this function a forward declararation? inline PerFunctionInfo() { @@ -183,7 +184,8 @@ CurModule.DeclareNewGlobalValue(CurrentFunction, FID); Values.clear(); // Clear out function local definitions - Types.clear(); + Types.clear(); // Clear out function local types + LocalSymtab.clear(); // Clear out function local symbol table CurrentFunction = 0; isDeclare = false; } @@ -555,7 +557,30 @@ V->getType()->getDescription() + "' type plane!"); } + // Set the name V->setName(Name, &ST); + + // If we're in function scope + if (inFunctionScope()) { + // Look up the symbol in the function's local symboltable + Existing = CurFun.LocalSymtab.lookup(V->getType(),Name); + + // If it already exists + if (Existing) { + // Clear the symbol table so it doesn't complain when it + // gets destructed + CurFun.LocalSymtab.clear(); + + // Bail + ThrowException("Redefinition of value named '" + Name + "' in the '" + + V->getType()->getDescription() + "' type plane!"); + + // otherwise, since it doesn't exist + } else { + // Insert it. + CurFun.LocalSymtab.insert(V); + } + } return false; } From lattner at cs.uiuc.edu Tue Nov 11 22:41:10 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 22:41:10 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Assembler/2003-11-11-ImplicitRename.llx Message-ID: <200311120440.WAA04730@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Assembler: 2003-11-11-ImplicitRename.llx added (r1.1) --- Log message: New testcase for PR107 --- Diffs of the changes: (+8 -0) Index: llvm/test/Regression/Assembler/2003-11-11-ImplicitRename.llx diff -c /dev/null llvm/test/Regression/Assembler/2003-11-11-ImplicitRename.llx:1.1 *** /dev/null Tue Nov 11 22:40:21 2003 --- llvm/test/Regression/Assembler/2003-11-11-ImplicitRename.llx Tue Nov 11 22:40:11 2003 *************** *** 0 **** --- 1,8 ---- + ; RUN: not llvm-as < %s > /dev/null + + void %test() { + %X = add int 0, 1 + %X = add int 1, 2 + ret void + } + From lattner at cs.uiuc.edu Tue Nov 11 22:43:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 22:43:01 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311120442.WAA04878@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.40 -> 1.41 --- Log message: PR107 is now fixed --- Diffs of the changes: (+2 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.40 llvm/docs/ReleaseNotes.html:1.41 --- llvm/docs/ReleaseNotes.html:1.40 Tue Nov 11 17:46:35 2003 +++ llvm/docs/ReleaseNotes.html Tue Nov 11 22:42:37 2003 @@ -130,6 +130,7 @@

    • [buildscripts] Building into objdir with .o in it fails
    • [setjmp/longjmp] Linking C programs which use setjmp/longjmp sometimes fail with references to the C++ runtime library!
    • [c++] C++ Frontend lays out superclasses like anonymous bitfields!
    • +
    • AsmParser Misses Symbol Redefinition Error
    • gccld -Lfoo -lfoo fails to find ./foo/libfoo.a
    • @@ -437,6 +438,6 @@ Maintained By: The LLVM Team
      -Last modified: Tue Nov 11 17:46:21 CST 2003 +Last modified: Tue Nov 11 22:41:53 CST 2003 From lattner at cs.uiuc.edu Tue Nov 11 22:44:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 22:44:00 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200311120443.WAA05021@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.27 -> 1.28 --- Log message: Update release notes for PR 107 --- Diffs of the changes: (+6 -2) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.27 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.28 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.27 Tue Nov 11 15:52:21 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Tue Nov 11 22:43:44 2003 @@ -199,10 +199,14 @@

    • SymbolTable::getUniqueName is very inefficient
    • -

    • [buildscripts] Building into objdir with .o in it fails
    • +

    • [buildscripts] Building into objdir +with .o in it fails
    • [setjmp/longjmp] Linking C programs which use setjmp/longjmp sometimes fail with references to the C++ runtime library!
    • +

    • AsmParser Misses Symbol Redefinition +Error
    • +

    • gccld -Lfoo -lfoo fails to find ./foo/libfoo.a
    • @@ -495,6 +499,6 @@ Maintained By: The LLVM Team
      -Last modified: Tue Nov 11 15:50:52 CST 2003 +Last modified: Tue Nov 11 22:43:28 CST 2003 From lattner at cs.uiuc.edu Tue Nov 11 22:59:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 22:59:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200311120458.WAA06959@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.128 -> 1.129 --- Log message: Don't crash if no gg --- Diffs of the changes: (+1 -1) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.128 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.129 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.128 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Tue Nov 11 22:57:58 2003 @@ -1409,7 +1409,7 @@ // inlining graphs. // void DSGraph::removeDeadNodes(unsigned Flags) { - DEBUG(AssertGraphOK(); GlobalsGraph->AssertGraphOK()); + DEBUG(AssertGraphOK(); if (GlobalsGraph) GlobalsGraph->AssertGraphOK()); // Reduce the amount of work we have to do... remove dummy nodes left over by // merging... From lattner at cs.uiuc.edu Tue Nov 11 22:59:08 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 22:59:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Printer.cpp Message-ID: <200311120458.WAA06951@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Printer.cpp updated: 1.59 -> 1.60 --- Log message: Print return nodes for graphs with multiple functions in them correctly --- Diffs of the changes: (+2 -2) Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.59 llvm/lib/Analysis/DataStructure/Printer.cpp:1.60 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.59 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Tue Nov 11 22:58:19 2003 @@ -132,12 +132,12 @@ else Label = I->first->getName() + " ret node"; // Output the return node... - GW.emitSimpleNode((void*)1, "plaintext=circle", Label); + GW.emitSimpleNode((void*)I->first, "plaintext=circle", Label); // Add edge from return node to real destination int RetEdgeDest = I->second.getOffset() >> DS::PointerShift;; if (RetEdgeDest == 0) RetEdgeDest = -1; - GW.emitEdge((void*)1, -1, I->second.getNode(), + GW.emitEdge((void*)I->first, -1, I->second.getNode(), RetEdgeDest, "arrowtail=tee,color=gray63"); } From lattner at cs.uiuc.edu Tue Nov 11 23:01:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Nov 11 23:01:01 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-dis/llvm-dis.cpp Message-ID: <200311120500.XAA07171@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-dis: llvm-dis.cpp updated: 1.36 -> 1.37 --- Log message: Restore the -llvm option --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-dis/llvm-dis.cpp diff -u llvm/tools/llvm-dis/llvm-dis.cpp:1.36 llvm/tools/llvm-dis/llvm-dis.cpp:1.37 --- llvm/tools/llvm-dis/llvm-dis.cpp:1.36 Tue Nov 11 16:41:34 2003 +++ llvm/tools/llvm-dis/llvm-dis.cpp Tue Nov 11 22:59:59 2003 @@ -47,7 +47,7 @@ static cl::opt WriteMode(cl::desc("Specify the output format:"), - cl::values(clEnumVal(LLVM, "Output LLVM assembly"), + cl::values(clEnumValN(LLVM, "llvm", "Output LLVM assembly"), clEnumVal(c, "Output C code for program"), 0)); From alkis at cs.uiuc.edu Wed Nov 12 00:33:02 2003 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Wed Nov 12 00:33:02 2003 Subject: [llvm-commits] [regalloc_linearscan] CVS: llvm/include/llvm/CodeGen/Passes.h Message-ID: <200311120632.AAA13594@morpheus.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: Passes.h updated: 1.3.2.5 -> 1.3.2.6 --- Log message: Mergin from trunk --- Diffs of the changes: (+11 -1) Index: llvm/include/llvm/CodeGen/Passes.h diff -u llvm/include/llvm/CodeGen/Passes.h:1.3.2.5 llvm/include/llvm/CodeGen/Passes.h:1.3.2.6 --- llvm/include/llvm/CodeGen/Passes.h:1.3.2.5 Thu Oct 2 12:17:03 2003 +++ llvm/include/llvm/CodeGen/Passes.h Wed Nov 12 00:32:00 2003 @@ -1,4 +1,11 @@ //===-- Passes.h - Target independent code generation passes ----*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// // // This file defines interfaces to access the target independent code generation // passes provided by the LLVM backend. @@ -8,6 +15,8 @@ #ifndef LLVM_CODEGEN_PASSES_H #define LLVM_CODEGEN_PASSES_H +namespace llvm { + class FunctionPass; class PassInfo; class TargetMachine; @@ -46,9 +55,10 @@ /// FunctionPass *createPrologEpilogCodeInserter(); - /// getRegisterAllocator - This creates an instance of the register allocator /// for the Sparc. FunctionPass *getRegisterAllocator(TargetMachine &T); + +} // End llvm namespace #endif From alkis at cs.uiuc.edu Wed Nov 12 00:40:01 2003 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Wed Nov 12 00:40:01 2003 Subject: [llvm-commits] [regalloc_linearscan] CVS: llvm/lib/CodeGen/Passes.cpp Message-ID: <200311120639.AAA13742@morpheus.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: Passes.cpp updated: 1.1.2.2 -> 1.1.2.3 --- Log message: Mergin from trunk --- Diffs of the changes: (+11 -2) Index: llvm/lib/CodeGen/Passes.cpp diff -u llvm/lib/CodeGen/Passes.cpp:1.1.2.2 llvm/lib/CodeGen/Passes.cpp:1.1.2.3 --- llvm/lib/CodeGen/Passes.cpp:1.1.2.2 Fri Oct 24 01:06:47 2003 +++ llvm/lib/CodeGen/Passes.cpp Wed Nov 12 00:39:29 2003 @@ -1,4 +1,11 @@ //===-- Passes.cpp - Target independent code generation passes -*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file was developed by the LLVM research group and is distributed under +// the University of Illinois Open Source License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// // // This file defines interfaces to access the target independent code // generation passes provided by the LLVM backend. @@ -8,6 +15,8 @@ #include "llvm/CodeGen/Passes.h" #include "Support/CommandLine.h" +namespace llvm { + namespace { enum RegAllocName { simple, local, linearscan }; @@ -29,10 +38,10 @@ return createSimpleRegisterAllocator(); case local: return createLocalRegisterAllocator(); - case linearscan: - return createLinearScanRegisterAllocator(); default: assert(0 && "no register allocator selected"); return 0; // not reached } } + +} // End llvm namespace From alkis at cs.uiuc.edu Wed Nov 12 00:49:01 2003 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Wed Nov 12 00:49:01 2003 Subject: [llvm-commits] [regalloc_linearscan] CVS: llvm/lib/CodeGen/Passes.cpp Message-ID: <200311120648.AAA13786@morpheus.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: Passes.cpp updated: 1.1.2.3 -> 1.1.2.4 --- Log message: Previous merge actually removed code while it shouldn't. Add it back :-) --- Diffs of the changes: (+2 -0) Index: llvm/lib/CodeGen/Passes.cpp diff -u llvm/lib/CodeGen/Passes.cpp:1.1.2.3 llvm/lib/CodeGen/Passes.cpp:1.1.2.4 --- llvm/lib/CodeGen/Passes.cpp:1.1.2.3 Wed Nov 12 00:39:29 2003 +++ llvm/lib/CodeGen/Passes.cpp Wed Nov 12 00:47:55 2003 @@ -38,6 +38,8 @@ return createSimpleRegisterAllocator(); case local: return createLocalRegisterAllocator(); + case linearscan: + return createLinearScanRegisterAllocator(); default: assert(0 && "no register allocator selected"); return 0; // not reached From alkis at cs.uiuc.edu Wed Nov 12 00:51:01 2003 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Wed Nov 12 00:51:01 2003 Subject: [llvm-commits] [regalloc_linearscan] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp LiveIntervals.cpp Message-ID: <200311120650.AAA13836@morpheus.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocLinearScan.cpp updated: 1.1.2.10 -> 1.1.2.11 LiveIntervals.cpp updated: 1.1.2.8 -> 1.1.2.9 --- Log message: Put classes the were developed in the regalloc_linearscan branch in the llvm namespace. --- Diffs of the changes: (+269 -106) Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.10 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.11 --- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.10 Fri Nov 7 18:23:03 2003 +++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Wed Nov 12 00:49:55 2003 @@ -13,6 +13,7 @@ #define DEBUG_TYPE "regalloc" #include "llvm/Function.h" #include "llvm/CodeGen/LiveIntervals.h" +#include "llvm/CodeGen/LiveVariables.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstr.h" @@ -29,6 +30,8 @@ #include "Support/STLExtras.h" #include +using namespace llvm; + namespace { Statistic<> numSpilled ("ra-linearscan", "Number of registers spilled"); Statistic<> numReloaded("ra-linearscan", "Number of registers reloaded"); @@ -43,12 +46,16 @@ const MRegisterInfo* mri_; MachineBasicBlock* currentMbb_; MachineBasicBlock::iterator currentInstr_; - + LiveVariables* lv_; typedef LiveIntervals::Intervals Intervals; const Intervals* li_; Intervals::const_iterator currentInterval_; IntervalPtrs active_, inactive_; + typedef std::vector Regs; + Regs tempUseOperands_; + Regs tempDefOperands_; + typedef LiveIntervals::MiIndex2MbbMap MiIndex2MbbMap; MiIndex2MbbMap* mii2mbbMap_; @@ -78,6 +85,7 @@ } virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.addRequired(); AU.addRequired(); MachineFunctionPass::getAnalysisUsage(AU); } @@ -86,44 +94,52 @@ /// runOnMachineFunction - register allocate the whole function bool runOnMachineFunction(MachineFunction&); - /// processInterval - entry to the linear scan register - /// allocator. this happens one every instruction we look at + /// processInterval - inspect current interval and add it to + /// the active list if required void processInterval(unsigned curIndex); /// processActiveIntervals - expire old intervals and move /// non-overlapping ones to the incative list void processActiveIntervals(unsigned curIndex); - /// expireOldInterval - expire old intervals and move + /// processInactiveIntervals - expire old intervals and move /// overlapping ones to the active list void processInactiveIntervals(unsigned curIndex); - /// spill - choose and spill at the current - /// interval. Currently we spill the interval with the last - /// end point in the active and inactive lists - void spill(); - - /// getFreeReg - return a free register for this virtual - /// register if we have one, otherwise return 0 - unsigned getFreeReg(unsigned virtReg); - - /// freeReg - free the physical register associated with this - /// virtual register and disassociate virtual->physical and - /// physical->virtual mappings - void freeReg(unsigned virtReg); - - /// markReg - mark the physical register as not free - /// (preserves mappings) - void markReg(unsigned virtReg); - - /// unmarkReg - mark the physical register as free (preserves - /// mappings) - void unmarkReg(unsigned virtReg); + /// spillInterval - choose and spill interval. Currently we + /// spill the interval with the last end point in the active + /// and inactive lists + void spillInterval(); + + /// + /// register handling helpers + /// + + /// reservePhysReg - reserves a physical register and spills + /// any value assigned to it if any + void reservePhysReg(unsigned reg); + + /// clearReservedPhysReg - marks pysical register as free for + /// use + void clearReservedPhysReg(unsigned reg); /// physRegAvailable - returns true if the specifed physical /// register is available bool physRegAvailable(unsigned physReg); + /// getFreePhysReg - return a free physical register for this + /// virtual register if we have one, otherwise return 0 + unsigned getFreePhysReg(unsigned virtReg); + + /// allocateVirt2PhysReg - allocates the free physical + /// register to the virtual register passed as arguments + void allocateVirt2PhysReg(unsigned virtReg, unsigned physReg); + + /// clearVirtReg - free the physical register associated with this + /// virtual register and disassociate virtual->physical and + /// physical->virtual mappings + void clearVirtReg(unsigned virtReg); + /// findOrCreateStackSlot - returns the offset of the /// specified register on the stack allocating space if /// necessary @@ -133,8 +149,9 @@ void spillVirtReg(unsigned virtReg); /// loadPhysReg - loads to the physical register the value of - /// the virtual register specifed - void loadPhysReg(unsigned physReg, unsigned virtReg); + /// the virtual register specifed. Virtual register must have + /// an assigned stack slot + void loadVirt2PhysReg(unsigned virtReg, unsigned physReg); /// getInstructionIndex() - returns the instruction index as /// it was computed by the live interval analysis (adjusts for @@ -165,6 +182,7 @@ mf_ = &fn; tm_ = &fn.getTarget(); mri_ = tm_->getRegisterInfo(); + lv_ = &getAnalysis(); li_ = &getAnalysis().getIntervals(); currentInterval_ = li_->begin(); active_.clear(); @@ -183,6 +201,11 @@ currentMbb_ = *mbbi; for (currentInstr_ = currentMbb_->begin(); currentInstr_ != currentMbb_->end(); ++currentInstr_) { + // virtual registers that were brought in just for the + // computation of the value generated by this + // instruction. they will need to be cleared at the end + tempUseOperands_.clear(); + tempDefOperands_.clear(); assert(currentInstr_ >= currentMbb_->begin() && currentInstr_ < currentMbb_->end() && @@ -200,50 +223,93 @@ DEBUG(printVirt2PhysMap()); // process the active intervals (this will potentially - // free physical registers) + // expire intervals and hence free physical registers) processActiveIntervals(curIndex); + + // FIXME: holes are completely ignored for now // processInactiveIntervals(curIndex); + // loop over implicit defs spilling them + DEBUG(std::cerr << "\t\tprocessing implicit defs:\n"); + const TargetInstrDescriptor& tid = + tm_->getInstrInfo().get((*currentInstr_)->getOpcode()); + for (const unsigned* id = tid.ImplicitDefs; *id; ++id) { + unsigned physReg = *id; + reservePhysReg(physReg); + } - // get used operands into registers - DEBUG(std::cerr << "\t\tprocessing operands:\n"); + // loop over operands and spill all already defined + // physical registers + DEBUG(std::cerr << "\t\tprocessing already allocated physical " + "registers:\n"); + for (unsigned i = 0, e = (*currentInstr_)->getNumOperands(); + i != e; ++i) { + MachineOperand& op = (*currentInstr_)->getOperand(i); + if (op.isPhysicalRegister() && + (op.opIsDefOnly() || op.opIsDefAndUse())) { + unsigned physReg = op.getAllocatedRegNum(); + reservePhysReg(physReg); + } + } + + // assign physical registers to used operands + DEBUG(std::cerr << "\t\tprocessing used operands:\n"); for (unsigned i = 0, e = (*currentInstr_)->getNumOperands(); i != e; ++i) { MachineOperand& op = (*currentInstr_)->getOperand(i); if (op.opIsUse() && op.isVirtualRegister()) { unsigned virtReg = op.getAllocatedRegNum(); Virt2PhysMap::iterator it = v2pMap_.find(virtReg); + // virtual register is used but it is not + // allocated. it must be in a stack slot if (it == v2pMap_.end()) { - unsigned physReg = it->second; - loadPhysReg(physReg, virtReg); + unsigned physReg = getFreePhysReg(virtReg); + if (!physReg) { + spillInterval(); + physReg = getFreePhysReg(virtReg); + } + assert(physReg && "no available physical register?!"); + loadVirt2PhysReg(virtReg, physReg); + tempUseOperands_.push_back(virtReg); } + (*currentInstr_)->SetMachineOperandReg(i, v2pMap_[virtReg]); } } - // loop over implicit defs spilling them - DEBUG(std::cerr << "\t\tprocessing implicit defs:\n"); - const TargetInstrDescriptor& tid = - tm_->getInstrInfo().get((*currentInstr_)->getOpcode()); - for (const unsigned* id = tid.ImplicitDefs; *id; ++id) { - DEBUG(printVirt2PhysMap()); - unsigned virtReg = p2vMap_[*id]; - if (virtReg) { - spillVirtReg(virtReg); - for (IntervalPtrs::iterator - i = active_.begin(); i != active_.end(); ) { - if ((*i)->reg == virtReg) { - i = active_.erase(i); - break; - } - else { - ++i; + processInterval(curIndex); + + // assign physical registers to used operands + DEBUG(std::cerr << "\t\tprocessing not allocated defined " + "operands:\n"); + for (unsigned i = 0, e = (*currentInstr_)->getNumOperands(); + i != e; ++i) { + MachineOperand& op = (*currentInstr_)->getOperand(i); + if ((op.opIsDefOnly() || op.opIsDefAndUse()) && + op.isVirtualRegister()) { + unsigned virtReg = op.getAllocatedRegNum(); + Virt2PhysMap::iterator it = v2pMap_.find(virtReg); + // virtual register is defined but it is not + // allocated. it must be in a stack slot + if (it == v2pMap_.end()) { + unsigned physReg = getFreePhysReg(virtReg); + if (!physReg) { + spillInterval(); + physReg = getFreePhysReg(virtReg); } + assert(physReg && "no available physical register?!"); + loadVirt2PhysReg(virtReg, physReg); + tempDefOperands_.push_back(virtReg); } + (*currentInstr_)->SetMachineOperandReg(i, v2pMap_[virtReg]); } } - processInterval(curIndex); + // interval maybe spilled so we need to pull in any defs + // temporarily and spill them after the instruction is + // done + // use our current mapping and actually replace and + // virtual register with its allocated physical registers for (unsigned i = 0, e = (*currentInstr_)->getNumOperands(); i != e; ++i) { MachineOperand& op = (*currentInstr_)->getOperand(i); @@ -255,9 +321,48 @@ } } + // loop over killed physical registers and clear them + DEBUG(std::cerr << "\t\tprocessing killed physical registers:\n"); + for (LiveVariables::killed_iterator + ki = lv_->killed_begin(*currentInstr_), + ke = lv_->killed_end(*currentInstr_); + ki != ke; ++ki) { + unsigned reg = ki->second; + if (reg < MRegisterInfo::FirstVirtualRegister) { + clearReservedPhysReg(reg); + } + } + + // loop over dead physical registers and clear them + DEBUG(std::cerr << "\t\tprocessing dead physical registers:\n"); + for (LiveVariables::killed_iterator + ki = lv_->dead_begin(*currentInstr_), + ke = lv_->dead_end(*currentInstr_); + ki != ke; ++ki) { + unsigned reg = ki->second; + if (reg < MRegisterInfo::FirstVirtualRegister) { + clearReservedPhysReg(reg); + } + } + + DEBUG(std::cerr << "\t\tclearing temporarily used operands:\n"); + for (unsigned i = 0, e = tempUseOperands_.size(); i != e; ++i) { + clearVirtReg(tempUseOperands_[i]); + } + + DEBUG(std::cerr << "\t\tspilling temporarily defined operands:\n"); + for (unsigned i = 0, e = tempDefOperands_.size(); i != e; ++i) { + spillVirtReg(tempDefOperands_[i]); + } + DEBUG(std::cerr << "instruction[" << curIndex << "]: "; (*currentInstr_)->print(std::cerr, *tm_)); } + + for (unsigned i = 0, e = p2vMap_.size(); i != e; ++i) { + assert(p2vMap_[i] != i && + "reserved physical registers at end of basic block?"); + } } return true; @@ -274,14 +379,37 @@ currentInterval_->start() == curIndex) { DEBUG(std::cerr << "\t\tprocessing current interval:\n"); unsigned virtReg = currentInterval_->reg; - unsigned physReg = getFreeReg(virtReg); + unsigned physReg = (unsigned) -1; + if (tm_->getInstrInfo().isTwoAddrInstr((*currentInstr_)->getOpcode())) { + assert((*currentInstr_)->getOperand(1).isRegister() && + (*currentInstr_)->getOperand(1).getAllocatedRegNum() && + (*currentInstr_)->getOperand(1).opIsUse() && + "Two address instruction invalid"); + + physReg = (*currentInstr_)->getOperand(1).getAllocatedRegNum(); + // remove interval from active + for (IntervalPtrs::iterator i = active_.begin(), e = active_.end(); + i != e; ++i) { + if ((*i)->reg == p2vMap_[physReg]) { + active_.erase(i); + break; + } + } + tempUseOperands_.erase(remove(tempUseOperands_.begin(), + tempUseOperands_.end(), + p2vMap_[physReg]), + tempUseOperands_.end()); + spillVirtReg(p2vMap_[physReg]); + } + else { + physReg = getFreePhysReg(virtReg); + } + if (!physReg) { - spill(); - physReg = getFreeReg(virtReg); + spillInterval(); + physReg = getFreePhysReg(virtReg); } - bool inserted = v2pMap_.insert(std::make_pair(virtReg, physReg)).second; - assert (inserted && "attempt to allocate already allocated register"); - markReg(virtReg); + allocateVirt2PhysReg(virtReg, physReg); active_.push_back(&*currentInterval_); ++currentInterval_; } @@ -295,10 +423,11 @@ // remove expired intervals if ((*i)->expired(curIndex)) { DEBUG(std::cerr << "\t\t\tinterval " << **i << " expired\n"); - freeReg(virtReg); + clearVirtReg(virtReg); // remove interval from active i = active_.erase(i); } + // move not active intervals to inactive list // else if (!(*i)->overlaps(curIndex)) { // DEBUG(std::cerr << "\t\t\tinterval " << **i << " inactive\n"); // unmarkReg(virtReg); @@ -315,30 +444,32 @@ void RA::processInactiveIntervals(unsigned curIndex) { - DEBUG(std::cerr << "\t\tprocessing inactive intervals:\n"); - for (IntervalPtrs::iterator i = inactive_.begin(); i != inactive_.end();) { - unsigned virtReg = (*i)->reg; - if ((*i)->expired(curIndex)) { - DEBUG(std::cerr << "\t\t\tinterval " << **i << " expired\n"); - freeReg(virtReg); - // remove from inactive - i = inactive_.erase(i); - } - else if ((*i)->overlaps(curIndex)) { - DEBUG(std::cerr << "\t\t\tinterval " << **i << " active\n"); - markReg(virtReg); - // add to active - active_.push_back(*i); - // remove from inactive - i = inactive_.erase(i); - } - else { - ++i; - } - } +// DEBUG(std::cerr << "\t\tprocessing inactive intervals:\n"); +// for (IntervalPtrs::iterator i = inactive_.begin(); i != inactive_.end();) { +// unsigned virtReg = (*i)->reg; +// // remove expired intervals +// if ((*i)->expired(curIndex)) { +// DEBUG(std::cerr << "\t\t\tinterval " << **i << " expired\n"); +// freePhysReg(virtReg); +// // remove from inactive +// i = inactive_.erase(i); +// } +// // move re-activated intervals in active list +// else if ((*i)->overlaps(curIndex)) { +// DEBUG(std::cerr << "\t\t\tinterval " << **i << " active\n"); +// markReg(virtReg); +// // add to active +// active_.push_back(*i); +// // remove from inactive +// i = inactive_.erase(i); +// } +// else { +// ++i; +// } +// } } -void RA::spill() +void RA::spillInterval() { DEBUG(std::cerr << "\t\tspilling at interval "<< *currentInterval_<< ":\n"); assert(!active_.empty() && @@ -361,8 +492,8 @@ DEBUG(std::cerr << "\t\t\tspilling interval " << **lastEnd << "\n"); // spill last in active and inactive - spillVirtReg((*lastEnd)->reg); - freeReg((*lastEnd)->reg); + unsigned virtReg = (*lastEnd)->reg; + spillVirtReg(virtReg); if (inInactive) { inactive_.erase(lastEnd); } @@ -371,6 +502,35 @@ } } +void RA::reservePhysReg(unsigned physReg) +{ + DEBUG(std::cerr << "\t\t\treserving physical physical register: " + << mri_->getName(physReg) << '\n'); + // if this register holds a value spill it + unsigned virtReg = p2vMap_[physReg]; + if (virtReg != 0 && virtReg != physReg) { + // remove interval from active + for (IntervalPtrs::iterator i = active_.begin(), e = active_.end(); + i != e; ++i) { + if ((*i)->reg == virtReg) { + active_.erase(i); + break; + } + } + spillVirtReg(virtReg); + } + p2vMap_[physReg] = physReg; // this denotes a reserved physical register +} + +void RA::clearReservedPhysReg(unsigned physReg) +{ + DEBUG(std::cerr << "\t\t\tclearing reserved physical physical register: " + << mri_->getName(physReg) << '\n'); + assert(p2vMap_[physReg] == physReg && + "attempt to clear a non reserved physical register"); + p2vMap_[physReg] = 0; +} + bool RA::physRegAvailable(unsigned physReg) { if (p2vMap_[physReg]) { @@ -387,9 +547,9 @@ return true; } -unsigned RA::getFreeReg(unsigned virtReg) +unsigned RA::getFreePhysReg(unsigned virtReg) { - DEBUG(std::cerr << "\t\t\tgetting free register: "); + DEBUG(std::cerr << "\t\t\tgetting free physical register: "); const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(virtReg); TargetRegisterClass::iterator reg = rc->allocation_order_begin(*mf_); TargetRegisterClass::iterator regEnd = rc->allocation_order_end(*mf_); @@ -406,37 +566,37 @@ return 0; } -void RA::freeReg(unsigned virtReg) -{ - unmarkReg(virtReg); -} - -void RA::markReg(unsigned virtReg) +void RA::allocateVirt2PhysReg(unsigned virtReg, unsigned physReg) { + assert(physRegAvailable(physReg) && + "attempt to allocate to a not available physical register"); Virt2PhysMap::iterator it = v2pMap_.find(virtReg); - assert(it != v2pMap_.end() && - "attempting to mark an already disassociated register"); - unsigned physReg = it->second; - DEBUG(std::cerr << "\t\t\t\tmarked registster " << mri_->getName(physReg) - << " used by " << virtReg << '\n'); + bool inserted = v2pMap_.insert(std::make_pair(virtReg, physReg)).second; + assert(inserted && + "attempt to allocate an already allocated virtual register"); p2vMap_[physReg] = virtReg; + DEBUG(std::cerr << "\t\t\t\tallocated register " << virtReg << " to " + << mri_->getName(physReg) << '\n'); } -void RA::unmarkReg(unsigned virtReg) +void RA::clearVirtReg(unsigned virtReg) { Virt2PhysMap::iterator it = v2pMap_.find(virtReg); assert(it != v2pMap_.end() && - "attempting to unmark an already disassociated register"); + "attempting to clear a not allocated virtual register"); unsigned physReg = it->second; - DEBUG(std::cerr << "\t\t\t\tmarked registster " << mri_->getName(physReg) - << " free\n"); + assert(p2vMap_[physReg] == virtReg && + "virt2physMap and phys2virtMap mismatch"); p2vMap_[physReg] = 0; v2pMap_.erase(it); + DEBUG(std::cerr << "\t\t\t\tcleared register " << mri_->getName(physReg) + << "\n"); } int RA::findOrCreateStackSlot(unsigned virtReg) { - // use lower_bound so that we can do a O(1) insert later if necessary + // use lower_bound so that we can do a possibly O(1) insert later + // if necessary Virt2StackSlotMap::iterator it = v2ssMap_.lower_bound(virtReg); if (it != v2ssMap_.end() && it->first == virtReg) { return it->second; @@ -451,25 +611,26 @@ void RA::spillVirtReg(unsigned virtReg) { - DEBUG(std::cerr << "\t\t\tspilling register: " << virtReg << '\n'); + DEBUG(std::cerr << "\t\t\tspilling register: " << virtReg); const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(virtReg); int frameIndex = findOrCreateStackSlot(virtReg); + DEBUG(std::cerr << " to stack slot #" << frameIndex << '\n'); ++numSpilled; instrAdded_ += mri_->storeRegToStackSlot(*currentMbb_, currentInstr_, v2pMap_[virtReg], frameIndex, rc); - unmarkReg(virtReg); + clearVirtReg(virtReg); } -void RA::loadPhysReg(unsigned physReg, unsigned virtReg) +void RA::loadVirt2PhysReg(unsigned virtReg, unsigned physReg) { + DEBUG(std::cerr << "\t\t\tloading register: " << virtReg); const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(virtReg); int frameIndex = findOrCreateStackSlot(virtReg); + DEBUG(std::cerr << " from stack slot #" << frameIndex << '\n'); ++numReloaded; instrAdded_ += mri_->loadRegFromStackSlot(*currentMbb_, currentInstr_, physReg, frameIndex, rc); - bool inserted = v2pMap_.insert(std::make_pair(virtReg, physReg)).second; - assert (inserted && "attempt to allocate already allocated register"); - markReg(virtReg); + allocateVirt2PhysReg(virtReg, physReg); } unsigned RA::getInstructionIndex() const @@ -480,6 +641,6 @@ return it->second + (currentInstr_ - currentMbb_->begin()) - instrAdded_; } -FunctionPass *createLinearScanRegisterAllocator() { +FunctionPass* llvm::createLinearScanRegisterAllocator() { return new RA(); } Index: llvm/lib/CodeGen/LiveIntervals.cpp diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.1.2.8 llvm/lib/CodeGen/LiveIntervals.cpp:1.1.2.9 --- llvm/lib/CodeGen/LiveIntervals.cpp:1.1.2.8 Fri Nov 7 18:23:03 2003 +++ llvm/lib/CodeGen/LiveIntervals.cpp Wed Nov 12 00:49:55 2003 @@ -34,6 +34,8 @@ #include "Support/Statistic.h" #include +using namespace llvm; + namespace { RegisterAnalysis X("liveintervals", "Live Interval Analysis"); From alkis at cs.uiuc.edu Wed Nov 12 00:51:12 2003 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Wed Nov 12 00:51:12 2003 Subject: [llvm-commits] [regalloc_linearscan] CVS: llvm/include/llvm/CodeGen/LiveIntervals.h Message-ID: <200311120650.AAA13841@morpheus.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: LiveIntervals.h updated: 1.1.2.7 -> 1.1.2.8 --- Log message: Put classes the were developed in the regalloc_linearscan branch in the llvm namespace. --- Diffs of the changes: (+142 -139) Index: llvm/include/llvm/CodeGen/LiveIntervals.h diff -u llvm/include/llvm/CodeGen/LiveIntervals.h:1.1.2.7 llvm/include/llvm/CodeGen/LiveIntervals.h:1.1.2.8 --- llvm/include/llvm/CodeGen/LiveIntervals.h:1.1.2.7 Fri Nov 7 18:23:05 2003 +++ llvm/include/llvm/CodeGen/LiveIntervals.h Wed Nov 12 00:49:56 2003 @@ -26,172 +26,175 @@ #include #include -class LiveVariables; -class MRegisterInfo; +namespace llvm { -class LiveIntervals : public MachineFunctionPass -{ -public: - struct Interval { - typedef std::pair Range; - typedef std::vector Ranges; - unsigned reg; // the register of this interval - Ranges ranges; // the ranges this register is valid + class LiveVariables; + class MRegisterInfo; - Interval(unsigned r) - : reg(r) { + class LiveIntervals : public MachineFunctionPass + { + public: + struct Interval { + typedef std::pair Range; + typedef std::vector Ranges; + unsigned reg; // the register of this interval + Ranges ranges; // the ranges this register is valid - } - - unsigned start() const { - assert(!ranges.empty() && "empty interval for register"); - return ranges.front().first; - } + Interval(unsigned r) + : reg(r) { - unsigned end() const { - assert(!ranges.empty() && "empty interval for register"); - return ranges.back().second; - } + } - bool expired(unsigned index) const { - return end() <= index; - } + unsigned start() const { + assert(!ranges.empty() && "empty interval for register"); + return ranges.front().first; + } - bool overlaps(unsigned index) const { - for (Ranges::const_iterator i = ranges.begin(), e = ranges.end(); - i != e; ++i) { - if (index >= i->first && index < i->second) { - return true; - } + unsigned end() const { + assert(!ranges.empty() && "empty interval for register"); + return ranges.back().second; } - return false; - } - void addRange(unsigned start, unsigned end) { - Range range = std::make_pair(start, end); - Ranges::iterator it = - std::lower_bound(ranges.begin(), ranges.end(), range); - - if (it == ranges.end()) { - it = ranges.insert(it, range); - goto exit; + bool expired(unsigned index) const { + return end() <= index; } - assert(range.first <= it->first && "got wrong iterator?"); - // merge ranges if necesary - if (range.first < it->first) { - if (range.second >= it->first) { - it->first = range.first; + bool overlaps(unsigned index) const { + for (Ranges::const_iterator + i = ranges.begin(), e = ranges.end(); i != e; ++i) { + if (index >= i->first && index < i->second) { + return true; + } } - else { + return false; + } + + void addRange(unsigned start, unsigned end) { + Range range = std::make_pair(start, end); + Ranges::iterator it = + std::lower_bound(ranges.begin(), ranges.end(), range); + + if (it == ranges.end()) { it = ranges.insert(it, range); - assert(it != ranges.end() && "wtf?"); goto exit; } + + assert(range.first <= it->first && "got wrong iterator?"); + // merge ranges if necesary + if (range.first < it->first) { + if (range.second >= it->first) { + it->first = range.first; + } + else { + it = ranges.insert(it, range); + assert(it != ranges.end() && "wtf?"); + goto exit; + } + } + + exit: + mergeRangesIfNecessary(it); } - exit: - mergeRangesIfNecessary(it); - } + private: + void mergeRangesIfNecessary(Ranges::iterator it) { + while (it != ranges.begin()) { + Ranges::iterator prev = it - 1; + if (prev->second < it->first) { + break; + } + prev->second = it->second; + ranges.erase(it); + it = prev; + } + } + }; + + struct StartPointComp { + bool operator()(const Interval& lhs, const Interval& rhs) { + return lhs.ranges.front().first < rhs.ranges.front().first; + } + }; + + struct EndPointComp { + bool operator()(const Interval& lhs, const Interval& rhs) { + return lhs.ranges.back().second < rhs.ranges.back().second; + } + }; + + typedef std::vector Intervals; + typedef std::map MiIndex2MbbMap; + typedef std::map Mbb2MiIndexMap; + typedef std::vector MachineBasicBlockPtrs; private: - void mergeRangesIfNecessary(Ranges::iterator it) { - while (it != ranges.begin()) { - Ranges::iterator prev = it - 1; - if (prev->second < it->first) { - break; - } - prev->second = it->second; - ranges.erase(it); - it = prev; + MachineFunction* mf_; + const TargetMachine* tm_; + const MRegisterInfo* mri_; + MachineBasicBlock* currentMbb_; + MachineBasicBlock::iterator currentInstr_; + LiveVariables* lv_; + + typedef std::map MbbIndex2MbbMap; + MbbIndex2MbbMap mbbi2mbbMap_; + + typedef std::map Mi2IndexMap; + Mi2IndexMap mi2iMap_; + + typedef std::map Reg2IntervalMap; + Reg2IntervalMap r2iMap_; + + Intervals intervals_; + MiIndex2MbbMap mii2mbbMap_; + Mbb2MiIndexMap mbb2miiMap_; + + public: + virtual void getAnalysisUsage(AnalysisUsage &AU) const; + const Intervals& getIntervals() const { return intervals_; } + MiIndex2MbbMap& getMiIndex2MbbMap() { return mii2mbbMap_; } + Mbb2MiIndexMap& getMbb2MiIndexMap() { return mbb2miiMap_; } + MachineBasicBlockPtrs getOrderedMachineBasicBlockPtrs() const { + MachineBasicBlockPtrs result; + for (MbbIndex2MbbMap::const_iterator + it = mbbi2mbbMap_.begin(), itEnd = mbbi2mbbMap_.end(); + it != itEnd; ++it) { + result.push_back(it->second); } + return result; } - }; - struct StartPointComp { - bool operator()(const Interval& lhs, const Interval& rhs) { - return lhs.ranges.front().first < rhs.ranges.front().first; - } - }; + private: + /// runOnMachineFunction - pass entry point + bool runOnMachineFunction(MachineFunction&); - struct EndPointComp { - bool operator()(const Interval& lhs, const Interval& rhs) { - return lhs.ranges.back().second < rhs.ranges.back().second; - } + /// computeIntervals - compute live intervals + void computeIntervals(); + + /// handleRegisterDef - update intervals for a register def + void handleRegisterDef(MachineBasicBlock* mbb, + MachineInstr* instr, + unsigned reg); + + unsigned getInstructionIndex(MachineInstr* instr) const; + + void printRegName(unsigned reg) const; }; - typedef std::vector Intervals; - typedef std::map MiIndex2MbbMap; - typedef std::map Mbb2MiIndexMap; - typedef std::vector MachineBasicBlockPtrs; - -private: - MachineFunction* mf_; - const TargetMachine* tm_; - const MRegisterInfo* mri_; - MachineBasicBlock* currentMbb_; - MachineBasicBlock::iterator currentInstr_; - LiveVariables* lv_; - - typedef std::map MbbIndex2MbbMap; - MbbIndex2MbbMap mbbi2mbbMap_; - - typedef std::map Mi2IndexMap; - Mi2IndexMap mi2iMap_; - - typedef std::map Reg2IntervalMap; - Reg2IntervalMap r2iMap_; - - Intervals intervals_; - MiIndex2MbbMap mii2mbbMap_; - Mbb2MiIndexMap mbb2miiMap_; - -public: - virtual void getAnalysisUsage(AnalysisUsage &AU) const; - const Intervals& getIntervals() const { return intervals_; } - MiIndex2MbbMap& getMiIndex2MbbMap() { return mii2mbbMap_; } - Mbb2MiIndexMap& getMbb2MiIndexMap() { return mbb2miiMap_; } - MachineBasicBlockPtrs getOrderedMachineBasicBlockPtrs() const { - MachineBasicBlockPtrs result; - for (MbbIndex2MbbMap::const_iterator - it = mbbi2mbbMap_.begin(), itEnd = mbbi2mbbMap_.end(); - it != itEnd; ++it) { - result.push_back(it->second); - } - return result; + inline bool operator==(const LiveIntervals::Interval& lhs, + const LiveIntervals::Interval& rhs) { + return lhs.reg == rhs.reg; } -private: - /// runOnMachineFunction - pass entry point - bool runOnMachineFunction(MachineFunction&); - - /// computeIntervals - compute live intervals - void computeIntervals(); - - /// handleRegisterDef - update intervals for a register def - void handleRegisterDef(MachineBasicBlock* mbb, - MachineInstr* instr, - unsigned reg); - - unsigned getInstructionIndex(MachineInstr* instr) const; - - void printRegName(unsigned reg) const; -}; - -inline bool operator==(const LiveIntervals::Interval& lhs, - const LiveIntervals::Interval& rhs) { - return lhs.reg == rhs.reg; -} - -inline std::ostream& operator<<(std::ostream& os, - const LiveIntervals::Interval& li) { - os << "%reg" << li.reg << " = "; - for (LiveIntervals::Interval::Ranges::const_iterator - i = li.ranges.begin(), e = li.ranges.end(); i != e; ++i) { - os << "[" << i->first << ", " << i->second << "]"; + inline std::ostream& operator<<(std::ostream& os, + const LiveIntervals::Interval& li) { + os << "%reg" << li.reg << " = "; + for (LiveIntervals::Interval::Ranges::const_iterator + i = li.ranges.begin(), e = li.ranges.end(); i != e; ++i) { + os << "[" << i->first << ", " << i->second << "]"; + } + return os; } - return os; -} +} // End llvm namespace #endif From lattner at cs.uiuc.edu Wed Nov 12 01:14:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 01:14:01 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200311120713.BAA02000@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.66 -> 1.67 --- Log message: Detect problems with PHI node operands! --- Diffs of the changes: (+6 -0) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.66 llvm/lib/VMCore/Verifier.cpp:1.67 --- llvm/lib/VMCore/Verifier.cpp:1.66 Tue Nov 11 16:41:34 2003 +++ llvm/lib/VMCore/Verifier.cpp Wed Nov 12 01:13:37 2003 @@ -340,6 +340,12 @@ "PHI nodes not grouped at top of basic block!", &PN, PN.getParent()); + // Check that all of the operands of the PHI node have the same type as the + // result. + for (unsigned i = 0, e = PN.getNumIncomingValues(); i != e; ++i) + Assert1(PN.getType() == PN.getIncomingValue(i)->getType(), + "PHI node operands are not the same type as the result!", &PN); + // All other PHI node constraints are checked in the visitBasicBlock method. visitInstruction(PN); From lattner at cs.uiuc.edu Wed Nov 12 10:25:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 10:25:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/2003-11-12-CastSubBug.ll Message-ID: <200311121624.KAA19404@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: 2003-11-12-CastSubBug.ll added (r1.1) --- Log message: Reduced testcase for PR 110 --- Diffs of the changes: (+9 -0) Index: llvm/test/Regression/Transforms/InstCombine/2003-11-12-CastSubBug.ll diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/2003-11-12-CastSubBug.ll:1.1 *** /dev/null Wed Nov 12 10:24:41 2003 --- llvm/test/Regression/Transforms/InstCombine/2003-11-12-CastSubBug.ll Wed Nov 12 10:24:30 2003 *************** *** 0 **** --- 1,9 ---- + ; llvm-as < %s | opt -instcombine | llvm-dis | grep 'to sbyte' + + %.Base64_1 = external constant [4 x sbyte] + + ubyte %test(sbyte %X) { + %tmp.12 = sub sbyte %X, cast ([4 x sbyte]* %.Base64_1 to sbyte) ; [#uses=1] + %tmp.13 = cast sbyte %tmp.12 to ubyte ; [#uses=1] + ret ubyte %tmp.13 + } From lattner at cs.uiuc.edu Wed Nov 12 10:39:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 10:39:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/2003-11-12-CastSubBug.ll Message-ID: <200311121638.KAA20899@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: 2003-11-12-CastSubBug.ll (r1.1) removed --- Log message: This is not the instruction combiner's fault! No really! --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Wed Nov 12 10:41:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 10:41:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Assembler/2003-11-12-ConstantExprCast.llx Message-ID: <200311121640.KAA20958@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Assembler: 2003-11-12-ConstantExprCast.llx added (r1.1) --- Log message: The bytecode reader/writer is borking this testcase --- Diffs of the changes: (+10 -0) Index: llvm/test/Regression/Assembler/2003-11-12-ConstantExprCast.llx diff -c /dev/null llvm/test/Regression/Assembler/2003-11-12-ConstantExprCast.llx:1.1 *** /dev/null Wed Nov 12 10:40:18 2003 --- llvm/test/Regression/Assembler/2003-11-12-ConstantExprCast.llx Wed Nov 12 10:40:08 2003 *************** *** 0 **** --- 1,10 ---- + ; RUN: llvm-as < %s | llvm-dis | grep ' cast (' + + %.Base64_1 = external constant [4 x sbyte] + + ubyte %test(sbyte %X) { ; No predecessors! + %X = cast sbyte %X to ubyte ; [#uses=1] + %tmp.13 = add ubyte %X, cast (sbyte sub (sbyte 0, sbyte cast ([4 x sbyte]* %.Base64_1 to sbyte)) to ubyte) ; [#uses=1] + ret ubyte %tmp.13 + } + From lattner at cs.uiuc.edu Wed Nov 12 11:59:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 11:59:02 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200311121758.LAA18075@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.129 -> 1.130 --- Log message: Add new argument to disable checking --- Diffs of the changes: (+5 -3) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.129 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.130 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.129 Tue Nov 11 22:57:58 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Nov 12 11:58:22 2003 @@ -1646,15 +1646,17 @@ /// the first to the second graph. /// void DSGraph::computeNodeMapping(const DSNodeHandle &NH1, - const DSNodeHandle &NH2, NodeMapTy &NodeMap) { + const DSNodeHandle &NH2, NodeMapTy &NodeMap, + bool StrictChecking) { DSNode *N1 = NH1.getNode(), *N2 = NH2.getNode(); if (N1 == 0 || N2 == 0) return; DSNodeHandle &Entry = NodeMap[N1]; if (Entry.getNode()) { // Termination of recursion! - assert(Entry.getNode() == N2 && - Entry.getOffset() == (NH2.getOffset()-NH1.getOffset()) && + assert(!StrictChecking || + (Entry.getNode() == N2 && + Entry.getOffset() == (NH2.getOffset()-NH1.getOffset())) && "Inconsistent mapping detected!"); return; } From lattner at cs.uiuc.edu Wed Nov 12 11:59:10 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 11:59:10 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DSGraph.h Message-ID: <200311121758.LAA18066@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DSGraph.h updated: 1.63 -> 1.64 --- Log message: Add argument --- Diffs of the changes: (+2 -1) Index: llvm/include/llvm/Analysis/DSGraph.h diff -u llvm/include/llvm/Analysis/DSGraph.h:1.63 llvm/include/llvm/Analysis/DSGraph.h:1.64 --- llvm/include/llvm/Analysis/DSGraph.h:1.63 Tue Nov 11 16:41:30 2003 +++ llvm/include/llvm/Analysis/DSGraph.h Wed Nov 12 11:58:09 2003 @@ -263,7 +263,8 @@ /// the first to the second graph. /// static void computeNodeMapping(const DSNodeHandle &NH1, - const DSNodeHandle &NH2, NodeMapTy &NodeMap); + const DSNodeHandle &NH2, NodeMapTy &NodeMap, + bool StrictChecking = true); /// cloneInto - Clone the specified DSGraph into the current graph. The From lattner at cs.uiuc.edu Wed Nov 12 11:59:17 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 11:59:17 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp TransformFunctionBody.cpp Message-ID: <200311121758.LAA18052@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.45 -> 1.46 TransformFunctionBody.cpp updated: 1.8 -> 1.9 --- Log message: Completely rewrite the way indirect function calls work. With this patch things work better, though not completely yet. This includes namespacificatoin. Now all olden programs, except em3d and voronoi work. I'll look at these two soon. --- Diffs of the changes: (+370 -606) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.45 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.46 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.45 Mon Nov 10 23:10:27 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Wed Nov 12 11:57:53 2003 @@ -20,8 +20,8 @@ #include "Support/CommandLine.h" #include "Support/Debug.h" #include "Support/DepthFirstIterator.h" -#include "Support/VectorExtras.h" #include "Support/Statistic.h" +using namespace llvm; using namespace PA; // PASS_ALL_ARGUMENTS - If this is set to true, pass in pool descriptors for all @@ -29,7 +29,6 @@ // is useful for SafeCode. #define PASS_ALL_ARGUMENTS 0 - const Type *PoolAllocate::PoolDescPtrTy = 0; namespace { @@ -64,17 +63,20 @@ if (M.begin() == M.end()) return false; CurModule = &M; BU = &getAnalysis(); + TDDS = &getAnalysis(); + // Add the pool* prototypes to the module AddPoolPrototypes(); + + // Figure out what the equivalence classes are for indirectly called functions BuildIndirectFunctionSets(M); + // Create the pools for memory objects reachable by global variables. if (SetupGlobalPools(M)) return true; // Loop over the functions in the original program finding the pool desc. // arguments necessary for each function that is indirectly callable. - // For each equivalence class, make a list of pool arguments and update - // the PoolArgFirst and PoolArgLast values for each function. for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) if (!I->isExternal()) FindFunctionPoolArgs(*I); @@ -147,18 +149,6 @@ } -// Prints out the functions mapped to the leader of the equivalence class they -// belong to. -void PoolAllocate::printFuncECs() { - std::map &leaderMap = FuncECs.getLeaderMap(); - std::cerr << "Indirect Function Map \n"; - for (std::map::iterator LI = leaderMap.begin(), - LE = leaderMap.end(); LI != LE; ++LI) { - std::cerr << LI->first->getName() << ": leader is " - << LI->second->getName() << "\n"; - } -} - static void printNTOMap(std::map &NTOM) { std::cerr << "NTOM MAP\n"; for (std::map::iterator I = NTOM.begin(), @@ -168,58 +158,232 @@ } } +static void MarkNodesWhichMustBePassedIn(hash_set &MarkedNodes, + Function &F, DSGraph &G) { + // Mark globals and incomplete nodes as live... (this handles arguments) + if (F.getName() != "main") { + // All DSNodes reachable from arguments must be passed in. + for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) { + DSGraph::ScalarMapTy::iterator AI = G.getScalarMap().find(I); + if (AI != G.getScalarMap().end()) + if (DSNode *N = AI->second.getNode()) + N->markReachableNodes(MarkedNodes); + } + } + + // Marked the returned node as alive... + if (DSNode *RetNode = G.getReturnNodeFor(F).getNode()) + RetNode->markReachableNodes(MarkedNodes); + + // Calculate which DSNodes are reachable from globals. If a node is reachable + // from a global, we will create a global pool for it, so no argument passage + // is required. + hash_set NodesFromGlobals; + GetNodesReachableFromGlobals(G, NodesFromGlobals); + + // Remove any nodes reachable from a global. These nodes will be put into + // global pools, which do not require arguments to be passed in. Also, erase + // any marked node that is not a heap node. Since no allocations or frees + // will be done with it, it needs no argument. + for (hash_set::iterator I = MarkedNodes.begin(), + E = MarkedNodes.end(); I != E; ) { + DSNode *N = *I++; + if ((!N->isHeapNode() && !PASS_ALL_ARGUMENTS) || NodesFromGlobals.count(N)) + MarkedNodes.erase(N); + } +} + +const PA::EquivClassInfo &PoolAllocate::getECIForIndirectCallSite(CallSite CS) { + Instruction *I = CS.getInstruction(); + assert(I && "Not a call site?"); + assert(OneCalledFunction.count(I) && "No targets for indcall?"); + Function *Called = OneCalledFunction[I]; + Function *Leader = FuncECs.findClass(Called); + assert(Leader && "Leader not found for indirect call target!"); + assert(ECInfoForLeadersMap.count(Leader) && "No ECI for indirect call site!"); + return ECInfoForLeadersMap[Leader]; +} + // BuildIndirectFunctionSets - Iterate over the module looking for indirect -// calls to functions +// calls to functions. If a call site can invoke any functions [F1, F2... FN], +// unify the N functions together in the FuncECs set. +// void PoolAllocate::BuildIndirectFunctionSets(Module &M) { - // Get top down DSGraph for the functions - TDDS = &getAnalysis(); - + const BUDataStructures::ActualCalleesTy AC = BU->getActualCallees(); + +#if 0 // THIS SHOULD WORK, but doesn't because DSA is buggy. FIXME! + + // Loop over all of the indirect calls in the program. If a call site can + // call multiple different functions, we need to unify all of the callees into + // the same equivalence class. + Instruction *LastInst = 0; + Function *FirstFunc = 0; + for (BUDataStructures::ActualCalleesTy::const_iterator I = AC.begin(), + E = AC.end(); I != E; ++I) { + CallSite CS = CallSite::get(I->first); + if (!CS.getCalledFunction() && // Ignore direct calls + !I->second->isExternal()) { // Ignore functions we cannot modify + //std::cerr << "CALLEE: " << I->second->getName() << " from : " << + //I->first; + if (I->first != LastInst) { + // This is the first callee from this call site. + LastInst = I->first; + FirstFunc = I->second; + OneCalledFunction[LastInst] = FirstFunc; + FuncECs.addElement(I->second); + } else { + // This is not the first possible callee from a particular call site. + // Union the callee in with the other functions. + FuncECs.unionSetsWith(FirstFunc, I->second); + } + } + } +#else + for (Module::iterator MI = M.begin(), ME = M.end(); MI != ME; ++MI) { + if (MI->isExternal()) continue; DEBUG(std::cerr << "Processing indirect calls function:" << MI->getName() - << "\n"); - - if (MI->isExternal()) - continue; + << "\n"); DSGraph &TDG = TDDS->getDSGraph(*MI); - const std::vector &callSites = TDG.getFunctionCalls(); // For each call site in the function // All the functions that can be called at the call site are put in the // same equivalence class. for (std::vector::const_iterator CSI = callSites.begin(), - CSE = callSites.end(); CSI != CSE ; ++CSI) { + CSE = callSites.end(); CSI != CSE ; ++CSI) if (CSI->isIndirectCall()) { - DSNode *DSN = CSI->getCalleeNode(); - if (DSN->isIncomplete()) - std::cerr << "Incomplete node: " - << *CSI->getCallSite().getInstruction(); - // assert(DSN->isGlobalNode()); - const std::vector &Callees = DSN->getGlobals(); - if (Callees.empty()) - std::cerr << "No targets: " << *CSI->getCallSite().getInstruction(); + Instruction *TheCall = CSI->getCallSite().getInstruction(); + DSNode *DSN = CSI->getCalleeNode(); + std::cerr << "INDCALL: " << *TheCall; + if (DSN->isIncomplete()) + std::cerr << "Incomplete node: " << *TheCall; + // assert(DSN->isGlobalNode()); + const std::vector &Callees = DSN->getGlobals(); + if (Callees.empty()) + std::cerr << "No targets: " << *TheCall; Function *RunningClass = 0; - for (std::vector::const_iterator CalleesI = - Callees.begin(), CalleesE = Callees.end(); - CalleesI != CalleesE; ++CalleesI) - if (Function *calledF = dyn_cast(*CalleesI)) { - CallSiteTargets.insert(std::make_pair(CSI->getCallSite(), calledF)); - if (RunningClass == 0) { - RunningClass = calledF; - FuncECs.addElement(RunningClass); - } else { - FuncECs.unionSetsWith(RunningClass, calledF); - } + for (unsigned i = 0, e = Callees.size(); i != e; ++i) + if (Function *F = dyn_cast(Callees[i])) { + OneCalledFunction[TheCall] = F; + if (RunningClass == 0) + FuncECs.addElement(RunningClass = F); + else + FuncECs.unionSetsWith(RunningClass, F); } } + } +#endif + + // Now that all of the equivalences have been built, turn the union-find data + // structure into a simple map from each function in the equiv class to the + // DSGraph used to represent the union of graphs. + // + std::map &leaderMap = FuncECs.getLeaderMap(); + DEBUG(std::cerr << "Indirect Function Equivalence Map:\n"); + for (std::map::iterator LI = leaderMap.begin(), + LE = leaderMap.end(); LI != LE; ++LI) { + DEBUG(std::cerr << " " << LI->first->getName() << ": leader is " + << LI->second->getName() << "\n"); + + // Now the we have the equiv class info for this object, merge the DSGraph + // for this function into the composite DSGraph. + EquivClassInfo &ECI = ECInfoForLeadersMap[LI->second]; + + // If this is the first function in this equiv class, create the graph now. + if (ECI.G == 0) + ECI.G = new DSGraph(BU->getGlobalsGraph().getTargetData()); + + // Clone this member of the equivalence class into ECI. + DSGraph::NodeMapTy NodeMap; + ECI.G->cloneInto(BU->getDSGraph(*LI->first), ECI.G->getScalarMap(), + ECI.G->getReturnNodes(), NodeMap, 0); + + // This is N^2 with the number of functions in this equiv class, but I don't + // really care right now. FIXME! + for (unsigned i = 0, e = ECI.FuncsInClass.size(); i != e; ++i) { + Function *F = ECI.FuncsInClass[i]; + // Merge the return nodes together. + ECI.G->getReturnNodes()[F].mergeWith(ECI.G->getReturnNodes()[LI->first]); + + // Merge the arguments of the functions together. + Function::aiterator AI1 = F->abegin(); + Function::aiterator AI2 = LI->first->abegin(); + for (; AI1 != F->aend() && AI2 != LI->first->aend(); ++AI1,++AI2) + ECI.G->getNodeForValue(AI1).mergeWith(ECI.G->getNodeForValue(AI2)); } + ECI.FuncsInClass.push_back(LI->first); + } + DEBUG(std::cerr << "\n"); + + // Now that we have created the graphs for each of the equivalence sets, we + // have to figure out which pool descriptors to pass into the functions. We + // must pass arguments for any pool descriptor that is needed by any function + // in the equiv. class. + for (ECInfoForLeadersMapTy::iterator ECII = ECInfoForLeadersMap.begin(), + E = ECInfoForLeadersMap.end(); ECII != E; ++ECII) { + EquivClassInfo &ECI = ECII->second; + + // Traverse part of the graph to provoke most of the node forwardings to + // occur. + DSGraph::ScalarMapTy &SM = ECI.G->getScalarMap(); + for (DSGraph::ScalarMapTy::iterator I = SM.begin(), E = SM.end(); I!=E; ++I) + I->second.getNode(); // Collapse forward references... + + // Remove breadcrumbs from merging nodes. + ECI.G->removeTriviallyDeadNodes(); + + // Loop over all of the functions in this equiv class, figuring out which + // pools must be passed in for each function. + for (unsigned i = 0, e = ECI.FuncsInClass.size(); i != e; ++i) { + Function *F = ECI.FuncsInClass[i]; + DSGraph &FG = BU->getDSGraph(*F); + + // Figure out which nodes need to be passed in for this function (if any) + hash_set &MarkedNodes = FunctionInfo[F].MarkedNodes; + MarkNodesWhichMustBePassedIn(MarkedNodes, *F, FG); + + if (!MarkedNodes.empty()) { + // If any nodes need to be passed in, figure out which nodes these are + // in the unified graph for this equivalence class. + DSGraph::NodeMapTy NodeMapping; + for (Function::aiterator I = F->abegin(), E = F->aend(); I != E; ++I) + DSGraph::computeNodeMapping(FG.getNodeForValue(I), + ECI.G->getNodeForValue(I), NodeMapping); + DSGraph::computeNodeMapping(FG.getReturnNodeFor(*F), + ECI.G->getReturnNodeFor(*F), NodeMapping); + + // Loop through all of the nodes which must be passed through for this + // callee, and add them to the arguments list. + for (hash_set::iterator I = MarkedNodes.begin(), + E = MarkedNodes.end(); I != E; ++I) { + DSNode *LocGraphNode = *I, *ECIGraphNode = NodeMapping[*I].getNode(); + + // Remember the mapping of this node + ECI.ECGraphToPrivateMap[std::make_pair(F,ECIGraphNode)] =LocGraphNode; + + // Add this argument to be passed in. Don't worry about duplicates, + // they will be eliminated soon. + ECI.ArgNodes.push_back(ECIGraphNode); + } + } + } + + // Okay, all of the functions have had their required nodes added to the + // ECI.ArgNodes list, but there might be duplicates. Eliminate the dups + // now. + std::sort(ECI.ArgNodes.begin(), ECI.ArgNodes.end()); + ECI.ArgNodes.erase(std::unique(ECI.ArgNodes.begin(), ECI.ArgNodes.end()), + ECI.ArgNodes.end()); + + // Uncomment this if you want to see the aggregate graph result + //ECI.G->viewGraph(); } - - // Print the equivalence classes - DEBUG(printFuncECs()); } + + // SetupGlobalPools - Create global pools for all DSNodes in the globals graph // which contain heap objects. If a global variable points to a piece of memory // allocated from the heap, this pool gets a global lifetime. This is @@ -282,132 +446,37 @@ return false; } - - - -// Inline the DSGraphs of functions corresponding to the potential targets at -// indirect call sites into the DS Graph of the callee. -// This is required to know what pools to create/pass at the call site in the -// caller -// -void PoolAllocate::InlineIndirectCalls(Function &F, DSGraph &G, - hash_set &visited) { - const std::vector &callSites = G.getFunctionCalls(); - - visited.insert(&F); - - // For each indirect call site in the function, inline all the potential - // targets - for (std::vector::const_iterator CSI = callSites.begin(), - CSE = callSites.end(); CSI != CSE; ++CSI) { - if (CSI->isIndirectCall()) { - CallSite CS = CSI->getCallSite(); - std::pair::iterator, - std::multimap::iterator> Targets = - CallSiteTargets.equal_range(CS); - for (std::multimap::iterator TFI = Targets.first, - TFE = Targets.second; TFI != TFE; ++TFI) - if (!TFI->second->isExternal()) { - DSGraph &TargetG = BU->getDSGraph(*TFI->second); - // Call the function recursively if the callee is not yet inlined and - // if it hasn't been visited in this sequence of calls The latter is - // dependent on the fact that the graphs of all functions in an SCC - // are actually the same - if (InlinedFuncs.find(TFI->second) == InlinedFuncs.end() && - visited.find(TFI->second) == visited.end()) { - InlineIndirectCalls(*TFI->second, TargetG, visited); - } - G.mergeInGraph(*CSI, *TFI->second, TargetG, DSGraph::KeepModRefBits | - DSGraph::KeepAllocaBit | DSGraph::DontCloneCallNodes | - DSGraph::DontCloneAuxCallNodes); - } - } - } - - // Mark this function as one whose graph is inlined with its indirect - // function targets' DS Graphs. This ensures that every function is inlined - // exactly once - InlinedFuncs.insert(&F); -} - void PoolAllocate::FindFunctionPoolArgs(Function &F) { DSGraph &G = BU->getDSGraph(F); - - // Inline the potential targets of indirect calls - hash_set visitedFuncs; - InlineIndirectCalls(F, G, visitedFuncs); - - // At this point the DS Graphs have been modified in place including - // information about indirect calls, making it useful for pool allocation. - std::vector &Nodes = G.getNodes(); - if (Nodes.empty()) return; // No memory activity, nothing is required FuncInfo &FI = FunctionInfo[&F]; // Create a new entry for F - - FI.Clone = 0; - - // Initialize the PoolArgFirst and PoolArgLast for the function depending on - // whether there have been other functions in the equivalence class that have - // pool arguments so far in the analysis. - if (!FuncECs.findClass(&F)) { - FI.PoolArgFirst = FI.PoolArgLast = 0; - } else { - if (EqClass2LastPoolArg.find(FuncECs.findClass(&F)) != - EqClass2LastPoolArg.end()) - FI.PoolArgFirst = FI.PoolArgLast = - EqClass2LastPoolArg[FuncECs.findClass(&F)] + 1; - else - FI.PoolArgFirst = FI.PoolArgLast = 0; - } - - // Find DataStructure nodes which are allocated in pools non-local to the - // current function. This set will contain all of the DSNodes which require - // pools to be passed in from outside of the function. hash_set &MarkedNodes = FI.MarkedNodes; - - // Mark globals and incomplete nodes as live... (this handles arguments) - if (F.getName() != "main") { - // All DSNodes reachable from arguments must be passed in. - for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I) { - DSGraph::ScalarMapTy::iterator AI = G.getScalarMap().find(I); - if (AI != G.getScalarMap().end()) - if (DSNode *N = AI->second.getNode()) - N->markReachableNodes(MarkedNodes); - } - } - - // Marked the returned node as alive... - if (DSNode *RetNode = G.getReturnNodeFor(F).getNode()) - RetNode->markReachableNodes(MarkedNodes); - // Calculate which DSNodes are reachable from globals. If a node is reachable - // from a global, we will create a global pool for it, so no argument passage - // is required. - hash_set NodesFromGlobals; - GetNodesReachableFromGlobals(G, NodesFromGlobals); + // If this function is part of an indirectly called function equivalence + // class, we have to handle it specially. + if (Function *Leader = FuncECs.findClass(&F)) { + EquivClassInfo &ECI = ECInfoForLeadersMap[Leader]; + + // The arguments passed in will be the ones specified by the ArgNodes list. + for (unsigned i = 0, e = ECI.ArgNodes.size(); i != e; ++i) { + DSNode *ArgNode = + ECI.ECGraphToPrivateMap[std::make_pair(&F, ECI.ArgNodes[i])]; + FI.ArgNodes.push_back(ArgNode); + MarkedNodes.insert(ArgNode); + } - // Remove any nodes reachable from a global. These nodes will be put into - // global pools, which do not require arguments to be passed in. Also, erase - // any marked node that is not a heap node. Since no allocations or frees - // will be done with it, it needs no argument. - for (hash_set::iterator I = MarkedNodes.begin(), - E = MarkedNodes.end(); I != E; ) { - DSNode *N = *I++; - if ((!N->isHeapNode() && !PASS_ALL_ARGUMENTS) || NodesFromGlobals.count(N)) - MarkedNodes.erase(N); + return; } - if (MarkedNodes.empty()) // We don't need to clone the function if there - return; // are no incoming arguments to be added. - - FI.PoolArgLast += MarkedNodes.size(); + if (G.getNodes().empty()) + return; // No memory activity, nothing is required - // Update the equivalence class last pool argument information - // only if there actually were pool arguments to the function. - // Also, there is no entry for the Eq. class in EqClass2LastPoolArg - // if there are no functions in the equivalence class with pool arguments. - if (FuncECs.findClass(&F) && FI.PoolArgLast != FI.PoolArgFirst) - EqClass2LastPoolArg[FuncECs.findClass(&F)] = FI.PoolArgLast - 1; + // Find DataStructure nodes which are allocated in pools non-local to the + // current function. This set will contain all of the DSNodes which require + // pools to be passed in from outside of the function. + MarkNodesWhichMustBePassedIn(MarkedNodes, F, G); + + FI.ArgNodes.insert(FI.ArgNodes.end(), MarkedNodes.begin(), MarkedNodes.end()); } // MakeFunctionClone - If the specified function needs to be modified for pool @@ -420,56 +489,18 @@ if (Nodes.empty()) return 0; FuncInfo &FI = FunctionInfo[&F]; - - hash_set &MarkedNodes = FI.MarkedNodes; - - if (!FuncECs.findClass(&F)) { - // Not in any equivalence class - if (MarkedNodes.empty()) - return 0; - } else { - // No need to clone if there are no pool arguments in any function in the - // equivalence class - if (!EqClass2LastPoolArg.count(FuncECs.findClass(&F))) - return 0; - } + if (FI.ArgNodes.empty()) + return 0; // No need to clone if no pools need to be passed in! + + // Update statistics.. + NumArgsAdded += FI.ArgNodes.size(); + ++NumCloned; + // Figure out what the arguments are to be for the new version of the function const FunctionType *OldFuncTy = F.getFunctionType(); - std::vector ArgTys; - if (!FuncECs.findClass(&F)) { - ArgTys.reserve(OldFuncTy->getParamTypes().size() + MarkedNodes.size()); - FI.ArgNodes.reserve(MarkedNodes.size()); - for (hash_set::iterator I = MarkedNodes.begin(), - E = MarkedNodes.end(); I != E; ++I) { - ArgTys.push_back(PoolDescPtrTy); // Add the appropriate # of pool descs - FI.ArgNodes.push_back(*I); - } - if (FI.ArgNodes.empty()) return 0; // No nodes to be pool allocated! - - } else { - // This function is a member of an equivalence class and needs to be cloned - ArgTys.reserve(OldFuncTy->getParamTypes().size() + - EqClass2LastPoolArg[FuncECs.findClass(&F)] + 1); - FI.ArgNodes.reserve(EqClass2LastPoolArg[FuncECs.findClass(&F)] + 1); - - for (int i = 0; i <= EqClass2LastPoolArg[FuncECs.findClass(&F)]; ++i) - ArgTys.push_back(PoolDescPtrTy); // Add the appropriate # of pool descs - - for (hash_set::iterator I = MarkedNodes.begin(), - E = MarkedNodes.end(); I != E; ++I) { - FI.ArgNodes.push_back(*I); - } - - assert((FI.ArgNodes.size() == (unsigned)(FI.PoolArgLast-FI.PoolArgFirst)) && - "Number of ArgNodes equal to the number of pool arguments used by " - "this function"); - - if (FI.ArgNodes.empty()) return 0; - } - - NumArgsAdded += ArgTys.size(); - ++NumCloned; + std::vector ArgTys(FI.ArgNodes.size(), PoolDescPtrTy); + ArgTys.reserve(OldFuncTy->getParamTypes().size() + FI.ArgNodes.size()); ArgTys.insert(ArgTys.end(), OldFuncTy->getParamTypes().begin(), OldFuncTy->getParamTypes().end()); @@ -487,44 +518,18 @@ std::map &PoolDescriptors = FI.PoolDescriptors; Function::aiterator NI = New->abegin(); - if (FuncECs.findClass(&F)) { - // If the function belongs to an equivalence class - for (int i = 0; i <= EqClass2LastPoolArg[FuncECs.findClass(&F)]; ++i, ++NI) - NI->setName("PDa"); - - NI = New->abegin(); - if (FI.PoolArgFirst > 0) - for (int i = 0; i < FI.PoolArgFirst; ++NI, ++i) - ; - - for (unsigned i = 0, e = FI.ArgNodes.size(); i != e; ++i, ++NI) - PoolDescriptors.insert(std::make_pair(FI.ArgNodes[i], NI)); - - NI = New->abegin(); - if (EqClass2LastPoolArg.count(FuncECs.findClass(&F))) - for (int i = 0; i <= EqClass2LastPoolArg[FuncECs.findClass(&F)]; ++i,++NI) - ; - } else { - // If the function does not belong to an equivalence class - if (FI.ArgNodes.size()) - for (unsigned i = 0, e = FI.ArgNodes.size(); i != e; ++i, ++NI) { - NI->setName("PDa"); // Add pd entry - PoolDescriptors.insert(std::make_pair(FI.ArgNodes[i], NI)); - } - NI = New->abegin(); - if (FI.ArgNodes.size()) - for (unsigned i = 0; i < FI.ArgNodes.size(); ++NI, ++i) - ; + for (unsigned i = 0, e = FI.ArgNodes.size(); i != e; ++i, ++NI) { + NI->setName("PDa"); + PoolDescriptors[FI.ArgNodes[i]] = NI; } // Map the existing arguments of the old function to the corresponding - // arguments of the new function. + // arguments of the new function, and copy over the names. std::map ValueMap; - if (NI != New->aend()) - for (Function::aiterator I = F.abegin(), E = F.aend(); I != E; ++I, ++NI) { - ValueMap[I] = NI; - NI->setName(I->getName()); - } + for (Function::aiterator I = F.abegin(); NI != New->aend(); ++I, ++NI) { + ValueMap[I] = NI; + NI->setName(I->getName()); + } // Populate the value map with all of the globals in the program. // FIXME: This should be unnecessary! Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.8 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.9 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.8 Tue Nov 11 00:11:35 2003 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Wed Nov 12 11:57:53 2003 @@ -16,6 +16,7 @@ #include "llvm/Support/InstVisitor.h" #include "Support/Debug.h" #include "Support/VectorExtras.h" +using namespace llvm; using namespace PA; namespace { @@ -98,11 +99,7 @@ return I != FI.PoolDescriptors.end() ? I->second : 0; } - bool isFuncPtr(Value *V); - - Function* getFuncClass(Value *V); - - Value* retCloneIfFunc(Value *V); + Function* retCloneIfFunc(Value *V); }; } @@ -114,55 +111,16 @@ } -// Returns true if V is a function pointer -bool FuncTransform::isFuncPtr(Value *V) { - if (const PointerType *PTy = dyn_cast(V->getType())) - return isa(PTy->getElementType()); - return false; -} - -// Given a function pointer, return the function eq. class if one exists -Function* FuncTransform::getFuncClass(Value *V) { - // Look at DSGraph and see if the set of of functions it could point to - // are pool allocated. - - if (!isFuncPtr(V)) - return 0; - - // Two cases: - // if V is a constant - if (Function *theFunc = dyn_cast(V)) { - if (!PAInfo.FuncECs.findClass(theFunc)) - // If this function does not belong to any equivalence class - return 0; - if (PAInfo.EqClass2LastPoolArg.count(PAInfo.FuncECs.findClass(theFunc))) - return PAInfo.FuncECs.findClass(theFunc); - else - return 0; - } - - // if V is not a constant - DSNode *DSN = TDG.getNodeForValue(V).getNode(); - if (!DSN) return 0; - - const std::vector &Callees = DSN->getGlobals(); - if (Callees.size() > 0) { - Function *calledF = dyn_cast(*Callees.begin()); - assert(PAInfo.FuncECs.findClass(calledF) && "should exist in some eq. class"); - if (PAInfo.EqClass2LastPoolArg.count(PAInfo.FuncECs.findClass(calledF))) - return PAInfo.FuncECs.findClass(calledF); - } - - return 0; -} - // Returns the clone if V is a static function (not a pointer) and belongs // to an equivalence class i.e. is pool allocated -Value* FuncTransform::retCloneIfFunc(Value *V) { - if (Function *fixedFunc = dyn_cast(V)) - if (getFuncClass(V)) - return PAInfo.getFuncInfo(*fixedFunc)->Clone; +Function* FuncTransform::retCloneIfFunc(Value *V) { + if (ConstantPointerRef *CPR = dyn_cast(V)) + V = CPR->getValue(); + if (Function *F = dyn_cast(V)) { + return PAInfo.getFuncInfo(*F)->Clone; + } + return 0; } @@ -222,40 +180,9 @@ // that is cloned, the cast instruction has to be inserted at the end of the // previous basic block - if (isFuncPtr(&PI)) { - PHINode *V = new PHINode(PI.getType(), PI.getName(), &PI); - for (unsigned i = 0 ; i < PI.getNumIncomingValues(); ++i) { - if (Value *clonedFunc = retCloneIfFunc(PI.getIncomingValue(i))) { - // Insert CastInst at the end of PI.getIncomingBlock(i) - BasicBlock::iterator BBI = --PI.getIncomingBlock(i)->end(); - // BBI now points to the terminator instruction of the basic block. - CastInst *CastI = new CastInst(clonedFunc, PI.getType(), "tmp", BBI); - V->addIncoming(CastI, PI.getIncomingBlock(i)); - } else { - V->addIncoming(PI.getIncomingValue(i), PI.getIncomingBlock(i)); - } - - } - PI.replaceAllUsesWith(V); - PI.getParent()->getInstList().erase(&PI); - - DSGraph::ScalarMapTy &SM = G.getScalarMap(); - DSGraph::ScalarMapTy::iterator PII = SM.find(&PI); - - // Update Scalar map of DSGraph if this is one of the original functions - // Otherwise update the NewToOldValueMap - if (PII != SM.end()) { - SM.insert(std::make_pair(V, PII->second)); - SM.erase(PII); // Destroy the PHINode - } else { - std::map::iterator II = - FI.NewToOldValueMap.find(&PI); - assert(II != FI.NewToOldValueMap.end() && - "PhiI not found in clone?"); - FI.NewToOldValueMap.insert(std::make_pair(V, II->second)); - FI.NewToOldValueMap.erase(II); - } - } + for (unsigned i = 0; i != PI.getNumIncomingValues(); ++i) + if (Function *clonedFunc = retCloneIfFunc(PI.getIncomingValue(i))) + PI.setIncomingValue(i, ConstantExpr::getCast(ConstantPointerRef::get(clonedFunc), PI.getType())); } void FuncTransform::visitMallocInst(MallocInst &MI) { @@ -343,61 +270,6 @@ } } -static void CalcNodeMapping(DSNodeHandle& Caller, DSNodeHandle& Callee, - std::map &NodeMapping) { - DSNode *CalleeNode = Callee.getNode(); - DSNode *CallerNode = Caller.getNode(); - - unsigned CalleeOffset = Callee.getOffset(); - unsigned CallerOffset = Caller.getOffset(); - - if (CalleeNode == 0) return; - - // If callee has a node and caller doesn't, then a constant argument was - // passed by the caller - if (CallerNode == 0) { - NodeMapping.insert(NodeMapping.end(), std::make_pair(CalleeNode, - (DSNode *) 0)); - } - - // Map the callee node to the caller node. - // NB: The callee node could be of a different type. Eg. if it points to the - // field of a struct that the caller points to - std::map::iterator I = NodeMapping.find(CalleeNode); - if (I != NodeMapping.end()) { // Node already in map... - assert(I->second == CallerNode && - "Node maps to different nodes on paths?"); - } else { - NodeMapping.insert(I, std::make_pair(CalleeNode, CallerNode)); - - if (CalleeNode->getType() != CallerNode->getType() && CallerOffset == 0) - DEBUG(std::cerr << "NB: Mapping of nodes between different types\n"); - - // Recursively map the callee links to the caller links starting from the - // offset in the node into which they are mapped. - // Being a BU Graph, the callee ought to have smaller number of links unless - // there is collapsing in the caller - unsigned numCallerLinks = CallerNode->getNumLinks() - CallerOffset; - unsigned numCalleeLinks = CalleeNode->getNumLinks() - CalleeOffset; - - if (numCallerLinks > 0) { - if (numCallerLinks < numCalleeLinks) { - DEBUG(std::cerr << "Potential node collapsing in caller\n"); - for (unsigned i = 0, e = numCalleeLinks; i != e; ++i) - CalcNodeMapping(CallerNode->getLink(((i%numCallerLinks) << DS::PointerShift) + CallerOffset), - CalleeNode->getLink((i << DS::PointerShift) + CalleeOffset), NodeMapping); - } else { - for (unsigned i = 0, e = numCalleeLinks; i != e; ++i) - CalcNodeMapping(CallerNode->getLink((i << DS::PointerShift) + CallerOffset), - CalleeNode->getLink((i << DS::PointerShift) + CalleeOffset), NodeMapping); - } - } else if (numCalleeLinks > 0) { - DEBUG(std::cerr << - "Caller has unexpanded node, due to indirect call perhaps!\n"); - } - } -} - void FuncTransform::visitCallSite(CallSite CS) { Function *CF = CS.getCalledFunction(); Instruction *TheCall = CS.getInstruction(); @@ -418,255 +290,142 @@ } } - DSGraph &CallerG = G; - - std::vector Args; - // We need to figure out which local pool descriptors correspond to the pool // descriptor arguments passed into the function call. Calculate a mapping // from callee DSNodes to caller DSNodes. We construct a partial isomophism // between the graphs to figure out which pool descriptors need to be passed // in. The roots of this mapping is found from arguments and return values. // - std::map NodeMapping; - - if (!CF) { // Indirect call - DEBUG(std::cerr << " Handling call: " << *TheCall); - - std::map PoolArgs; - Function *FuncClass; - - std::pair::iterator, - std::multimap::iterator> Targets = - PAInfo.CallSiteTargets.equal_range(CS); - for (std::multimap::iterator TFI = Targets.first, - TFE = Targets.second; TFI != TFE; ++TFI) { - if (TFI == Targets.first) { - FuncClass = PAInfo.FuncECs.findClass(TFI->second); - // Nothing to transform if there are no pool arguments in this - // equivalence class of functions. - if (!PAInfo.EqClass2LastPoolArg.count(FuncClass)) - return; - } - - FuncInfo *CFI = PAInfo.getFuncInfo(*TFI->second); - - if (!CFI->ArgNodes.size()) continue; // Nothing to transform... - - DSGraph &CG = PAInfo.getBUDataStructures().getDSGraph(*TFI->second); - - { - Function::aiterator FAI = TFI->second->abegin(),E = TFI->second->aend(); - CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end(); - for ( ; FAI != E && AI != AE; ++FAI, ++AI) - if (!isa(*AI)) - CalcNodeMapping(getDSNodeHFor(*AI), CG.getScalarMap()[FAI], - NodeMapping); - assert(AI == AE && "Varargs calls not handled yet!"); - } - - if (TheCall->getType() != Type::VoidTy) - CalcNodeMapping(getDSNodeHFor(TheCall), - CG.getReturnNodeFor(*TFI->second), NodeMapping); - - // Map the nodes that are pointed to by globals. - // For all globals map getDSNodeForGlobal(g)->CG.getDSNodeForGlobal(g) - for (DSGraph::ScalarMapTy::iterator SMI = G.getScalarMap().begin(), - SME = G.getScalarMap().end(); SMI != SME; ++SMI) - if (GlobalValue *GV = dyn_cast(SMI->first)) { - CalcNodeMapping(SMI->second, - CG.getScalarMap()[GV], NodeMapping); - } - - unsigned idx = CFI->PoolArgFirst; - - // The following loop determines the pool pointers corresponding to - // CFI. - for (unsigned i = 0, e = CFI->ArgNodes.size(); i != e; ++i, ++idx) { - if (NodeMapping.count(CFI->ArgNodes[i])) { - DSNode *LocalNode = NodeMapping.find(CFI->ArgNodes[i])->second; - if (LocalNode) { - assert(FI.PoolDescriptors.count(LocalNode) && - "Node not pool allocated?"); - PoolArgs[idx] = FI.PoolDescriptors.find(LocalNode)->second; - } else { - // LocalNode is null when a constant is passed in as a parameter - PoolArgs[idx] = Constant::getNullValue(PoolAllocate::PoolDescPtrTy); - } - } else { - PoolArgs[idx] = Constant::getNullValue(PoolAllocate::PoolDescPtrTy); - } - } - } - - // Push the pool arguments into Args. - if (PAInfo.EqClass2LastPoolArg.count(FuncClass)) { - for (int i = 0; i <= PAInfo.EqClass2LastPoolArg[FuncClass]; ++i) { - if (PoolArgs.find(i) != PoolArgs.end()) - Args.push_back(PoolArgs[i]); - else - Args.push_back(Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); - } - - assert(Args.size()== (unsigned) PAInfo.EqClass2LastPoolArg[FuncClass] + 1 - && "Call has same number of pool args as the called function"); - } - - // Add the rest of the arguments (the original arguments of the function)... - Args.insert(Args.end(), CS.arg_begin(), CS.arg_end()); - - std::string Name = TheCall->getName(); TheCall->setName(""); - - Value *CalledValuePtr = CS.getCalledValue(); - if (Args.size() > (unsigned)CS.arg_size()) { - // If there are any pool arguments - CalledValuePtr = new CastInst(CS.getCalledValue(), - PAInfo.getFuncInfo(*FuncClass)->Clone->getType(), "tmp", - TheCall); - } + DSGraph::NodeMapTy NodeMapping; + Instruction *NewCall; + Value *NewCallee; + std::vector ArgNodes; + DSGraph *CalleeGraph; // The callee graph - Instruction *NewCall; - if (InvokeInst *II = dyn_cast(TheCall)) { - NewCall = new InvokeInst(CalledValuePtr, II->getNormalDest(), - II->getExceptionalDest(), Args, Name, TheCall); - } else { - NewCall = new CallInst(CalledValuePtr, Args, Name, TheCall); - } - // Add all of the uses of the pool descriptor - for (unsigned i = 0, e = Args.size()-CS.arg_size(); i != e; ++i) - AddPoolUse(*NewCall, Args[i], PoolUses); - - TheCall->replaceAllUsesWith(NewCall); - DEBUG(std::cerr << " Result Call: " << *NewCall); - - if (TheCall->getType() != Type::VoidTy) { - // If we are modifying the original function, update the DSGraph... - DSGraph::ScalarMapTy &SM = G.getScalarMap(); - DSGraph::ScalarMapTy::iterator CII = SM.find(TheCall); - if (CII != SM.end()) { - SM.insert(std::make_pair(NewCall, CII->second)); - SM.erase(CII); // Destroy the CallInst - } else { - // Otherwise update the NewToOldValueMap with the new CI return value - std::map::iterator CII = - FI.NewToOldValueMap.find(TheCall); - assert(CII != FI.NewToOldValueMap.end() && "CI not found in clone?"); - FI.NewToOldValueMap.insert(std::make_pair(NewCall, CII->second)); - FI.NewToOldValueMap.erase(CII); - } - } else if (!FI.NewToOldValueMap.empty()) { - std::map::iterator II = - FI.NewToOldValueMap.find(TheCall); - assert(II != FI.NewToOldValueMap.end() && - "CI not found in clone?"); - FI.NewToOldValueMap.insert(std::make_pair(NewCall, II->second)); - FI.NewToOldValueMap.erase(II); - } - } else { + if (CF) { // Direct calls are nice and simple. FuncInfo *CFI = PAInfo.getFuncInfo(*CF); - if (CFI == 0 || CFI->Clone == 0) return; // Nothing to transform... + NewCallee = CFI->Clone; + ArgNodes = CFI->ArgNodes; - DEBUG(std::cerr << " Handling call: " << *TheCall); + DEBUG(std::cerr << " Handling direct call: " << *TheCall); + CalleeGraph = &PAInfo.getBUDataStructures().getDSGraph(*CF); + } else { + DEBUG(std::cerr << " Handling indirect call: " << *TheCall); - DSGraph &CG = PAInfo.getBUDataStructures().getDSGraph(*CF); // Callee graph + // Figure out which set of functions this call may invoke + Instruction *OrigInst = CS.getInstruction(); - { - Function::aiterator FAI = CF->abegin(), E = CF->aend(); - CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end(); - for ( ; FAI != E && AI != AE; ++FAI, ++AI) - if (!isa(*AI)) - CalcNodeMapping(getDSNodeHFor(*AI), CG.getScalarMap()[FAI], - NodeMapping); - assert(AI == AE && "Varargs calls not handled yet!"); - } + // If this call site is in a clone function, map it back to the original + if (!FI.NewToOldValueMap.empty()) + OrigInst = cast((Value*)FI.NewToOldValueMap[OrigInst]); + const PA::EquivClassInfo &ECI = + PAInfo.getECIForIndirectCallSite(CallSite::get(OrigInst)); + + // Here we fill in CF with one of the possible called functions. Because we + // merged together all of the arguments to all of the functions in the + // equivalence set, it doesn't really matter which one we pick. + CalleeGraph = ECI.G; + CF = ECI.FuncsInClass.back(); + NewCallee = CS.getCalledValue(); + ArgNodes = ECI.ArgNodes; + + // Cast the function pointer to an appropriate type! + std::vector ArgTys(ArgNodes.size(), + PoolAllocate::PoolDescPtrTy); + for (CallSite::arg_iterator I = CS.arg_begin(), E = CS.arg_end(); + I != E; ++I) + ArgTys.push_back((*I)->getType()); + + FunctionType *FTy = FunctionType::get(TheCall->getType(), ArgTys, false); + PointerType *PFTy = PointerType::get(FTy); + + // If there are any pool arguments cast the function pointer to the right + // type. + NewCallee = new CastInst(NewCallee, PFTy, "tmp", TheCall); + } - // Map the return value as well... - if (TheCall->getType() != Type::VoidTy) - CalcNodeMapping(getDSNodeHFor(TheCall), CG.getReturnNodeFor(*CF), - NodeMapping); + Function::aiterator FAI = CF->abegin(), E = CF->aend(); + CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end(); + for ( ; FAI != E && AI != AE; ++FAI, ++AI) + if (!isa(*AI)) + DSGraph::computeNodeMapping(CalleeGraph->getNodeForValue(FAI), + getDSNodeHFor(*AI), NodeMapping, false); + assert(AI == AE && "Varargs calls not handled yet!"); + + // Map the return value as well... + if (TheCall->getType() != Type::VoidTy) + DSGraph::computeNodeMapping(CalleeGraph->getReturnNodeFor(*CF), + getDSNodeHFor(TheCall), NodeMapping, false); +#if 1 // Map the nodes that are pointed to by globals. // For all globals map getDSNodeForGlobal(g)->CG.getDSNodeForGlobal(g) for (DSGraph::ScalarMapTy::iterator SMI = G.getScalarMap().begin(), SME = G.getScalarMap().end(); SMI != SME; ++SMI) if (GlobalValue *GV = dyn_cast(SMI->first)) - CalcNodeMapping(SMI->second, CG.getScalarMap()[GV], NodeMapping); - - // Okay, now that we have established our mapping, we can figure out which - // pool descriptors to pass in... - - // Add an argument for each pool which must be passed in... - if (CFI->PoolArgFirst != 0) { - for (int i = 0; i < CFI->PoolArgFirst; ++i) - Args.push_back(Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); - } + DSGraph::computeNodeMapping(CalleeGraph->getNodeForValue(GV), + SMI->second, NodeMapping, false); +#endif - for (unsigned i = 0, e = CFI->ArgNodes.size(); i != e; ++i) { - if (NodeMapping.count(CFI->ArgNodes[i])) { - DSNode *LocalNode = NodeMapping.find(CFI->ArgNodes[i])->second; - if (LocalNode) { - assert(FI.PoolDescriptors.count(LocalNode) && - "Node not pool allocated?"); - Args.push_back(FI.PoolDescriptors.find(LocalNode)->second); - } else - Args.push_back(Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); - } else { - Args.push_back(Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); - } + // Okay, now that we have established our mapping, we can figure out which + // pool descriptors to pass in... + std::vector Args; + for (unsigned i = 0, e = ArgNodes.size(); i != e; ++i) { + if (NodeMapping.count(ArgNodes[i])) { + if (DSNode *LocalNode = NodeMapping[ArgNodes[i]].getNode()) { + assert(FI.PoolDescriptors.count(LocalNode) && + "Node not pool allocated?"); + Args.push_back(FI.PoolDescriptors.find(LocalNode)->second); + } else + Args.push_back(Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); + } else { + Args.push_back(Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); } + } - Function *FuncClass = PAInfo.FuncECs.findClass(CF); + // Add the rest of the arguments... + Args.insert(Args.end(), CS.arg_begin(), CS.arg_end()); - if (PAInfo.EqClass2LastPoolArg.count(FuncClass)) - for (int i = CFI->PoolArgLast; - i <= PAInfo.EqClass2LastPoolArg[FuncClass]; ++i) - Args.push_back(Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); + std::string Name = TheCall->getName(); TheCall->setName(""); - // Add the rest of the arguments... - Args.insert(Args.end(), CS.arg_begin(), CS.arg_end()); - - std::string Name = TheCall->getName(); TheCall->setName(""); + if (InvokeInst *II = dyn_cast(TheCall)) { + NewCall = new InvokeInst(NewCallee, II->getNormalDest(), + II->getExceptionalDest(), Args, Name, TheCall); + } else { + NewCall = new CallInst(NewCallee, Args, Name, TheCall); + } - Instruction *NewCall; - if (InvokeInst *II = dyn_cast(TheCall)) { - NewCall = new InvokeInst(CFI->Clone, II->getNormalDest(), - II->getExceptionalDest(), Args, Name, TheCall); - } else { - NewCall = new CallInst(CFI->Clone, Args, Name, TheCall); - } + // Add all of the uses of the pool descriptor + for (unsigned i = 0, e = ArgNodes.size(); i != e; ++i) + AddPoolUse(*NewCall, Args[i], PoolUses); - // Add all of the uses of the pool descriptor - for (unsigned i = 0, e = Args.size()-CS.arg_size(); i != e; ++i) - AddPoolUse(*NewCall, Args[i], PoolUses); - - TheCall->replaceAllUsesWith(NewCall); - DEBUG(std::cerr << " Result Call: " << *NewCall); - - if (TheCall->getType() != Type::VoidTy) { - // If we are modifying the original function, update the DSGraph... - DSGraph::ScalarMapTy &SM = G.getScalarMap(); - DSGraph::ScalarMapTy::iterator CII = SM.find(TheCall); - if (CII != SM.end()) { - SM.insert(std::make_pair(NewCall, CII->second)); - SM.erase(CII); // Destroy the CallInst - } else { - // Otherwise update the NewToOldValueMap with the new CI return value - std::map::iterator CNII = - FI.NewToOldValueMap.find(TheCall); - assert(CNII != FI.NewToOldValueMap.end() && CNII->second && - "CI not found in clone?"); - FI.NewToOldValueMap.insert(std::make_pair(NewCall, CNII->second)); - FI.NewToOldValueMap.erase(CNII); - } - } else if (!FI.NewToOldValueMap.empty()) { - std::map::iterator II = - FI.NewToOldValueMap.find(TheCall); - assert(II != FI.NewToOldValueMap.end() && "CI not found in clone?"); - FI.NewToOldValueMap.insert(std::make_pair(NewCall, II->second)); - FI.NewToOldValueMap.erase(II); + TheCall->replaceAllUsesWith(NewCall); + DEBUG(std::cerr << " Result Call: " << *NewCall); + + if (TheCall->getType() != Type::VoidTy) { + // If we are modifying the original function, update the DSGraph... + DSGraph::ScalarMapTy &SM = G.getScalarMap(); + DSGraph::ScalarMapTy::iterator CII = SM.find(TheCall); + if (CII != SM.end()) { + SM.insert(std::make_pair(NewCall, CII->second)); + SM.erase(CII); // Destroy the CallInst + } else { + // Otherwise update the NewToOldValueMap with the new CI return value + std::map::iterator CII = + FI.NewToOldValueMap.find(TheCall); + assert(CII != FI.NewToOldValueMap.end() && "CI not found in clone?"); + FI.NewToOldValueMap.insert(std::make_pair(NewCall, CII->second)); + FI.NewToOldValueMap.erase(CII); } + } else if (!FI.NewToOldValueMap.empty()) { + std::map::iterator II = + FI.NewToOldValueMap.find(TheCall); + assert(II != FI.NewToOldValueMap.end() && + "CI not found in clone?"); + FI.NewToOldValueMap.insert(std::make_pair(NewCall, II->second)); + FI.NewToOldValueMap.erase(II); } TheCall->getParent()->getInstList().erase(TheCall); From lattner at cs.uiuc.edu Wed Nov 12 13:02:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 13:02:00 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp TransformFunctionBody.cpp Message-ID: <200311121901.NAA24777@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.46 -> 1.47 TransformFunctionBody.cpp updated: 1.9 -> 1.10 --- Log message: Change the debug type, because I _always_ get it wrong --- Diffs of the changes: (+2 -2) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.46 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.47 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.46 Wed Nov 12 11:57:53 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Wed Nov 12 13:00:59 2003 @@ -5,7 +5,7 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "PoolAllocation" +#define DEBUG_TYPE "PoolAllocator" #include "poolalloc/PoolAllocate.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.9 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.10 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.9 Wed Nov 12 11:57:53 2003 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Wed Nov 12 13:00:59 2003 @@ -4,7 +4,7 @@ // //===----------------------------------------------------------------------===// -#define DEBUG_TYPE "PoolAllocation" +#define DEBUG_TYPE "PoolAllocator" #include "poolalloc/PoolAllocate.h" #include "llvm/Analysis/DataStructure.h" #include "llvm/Analysis/DSGraph.h" From brukman at cs.uiuc.edu Wed Nov 12 13:40:03 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 13:40:03 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200311121939.NAA26876@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.49 -> 1.50 --- Log message: Add FreeBench benchmarks to our test suite -- they weren't available by default before when one didn't build in his source root. --- Diffs of the changes: (+8 -0) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.49 llvm/autoconf/configure.ac:1.50 --- llvm/autoconf/configure.ac:1.49 Tue Nov 11 19:11:54 2003 +++ llvm/autoconf/configure.ac Wed Nov 12 13:39:10 2003 @@ -147,6 +147,14 @@ AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Applications/sgefa/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/Fhourstones/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/distray/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/mason/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/neural/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pifft/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/01-qbsort/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/03-testtrie/Makefile) From lattner at cs.uiuc.edu Wed Nov 12 13:58:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 13:58:02 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Message-ID: <200311121957.NAA30111@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: TransformFunctionBody.cpp updated: 1.10 -> 1.11 --- Log message: Dramatically simplify how we handle "taking the address" of functions. This fixes several bugs too --- Diffs of the changes: (+34 -88) Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.10 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.11 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.10 Wed Nov 12 13:00:59 2003 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Wed Nov 12 13:56:53 2003 @@ -51,34 +51,14 @@ Set.insert(std::make_pair(AI, &I)); } + void visitInstruction(Instruction &I); void visitMallocInst(MallocInst &MI); void visitFreeInst(FreeInst &FI); void visitCallSite(CallSite CS); void visitCallInst(CallInst &CI) { visitCallSite(&CI); } void visitInvokeInst(InvokeInst &II) { visitCallSite(&II); } - - // The following instructions are never modified by pool allocation - void visitBranchInst(BranchInst &I) { } - void visitUnwindInst(UnwindInst &I) { } - void visitBinaryOperator(Instruction &I) { } - void visitShiftInst (ShiftInst &I) { } - void visitSwitchInst (SwitchInst &I) { } - void visitCastInst (CastInst &I) { } - void visitAllocaInst(AllocaInst &I) { } - void visitGetElementPtrInst (GetElementPtrInst &I) { } - - void visitReturnInst(ReturnInst &I); void visitLoadInst(LoadInst &I); void visitStoreInst (StoreInst &I); - void visitPHINode(PHINode &I); - - void visitVAArgInst(VAArgInst &I) { } - void visitVANextInst(VANextInst &I) { } - - void visitInstruction(Instruction &I) { - std::cerr << "PoolAllocate does not recognize this instruction:\n" << I; - abort(); - } private: DSNodeHandle& getDSNodeHFor(Value *V) { @@ -117,72 +97,23 @@ if (ConstantPointerRef *CPR = dyn_cast(V)) V = CPR->getValue(); - if (Function *F = dyn_cast(V)) { - return PAInfo.getFuncInfo(*F)->Clone; - } + if (Function *F = dyn_cast(V)) + if (FuncInfo *FI = PAInfo.getFuncInfo(*F)) + return FI->Clone; return 0; } -void FuncTransform::visitReturnInst (ReturnInst &RI) { - if (RI.getNumOperands()) - if (Value *clonedFunc = retCloneIfFunc(RI.getOperand(0))) { - // Cast the clone of RI.getOperand(0) to the non-pool-allocated type - CastInst *CastI = new CastInst(clonedFunc, RI.getOperand(0)->getType(), - "tmp", &RI); - // Insert return instruction that returns the casted value - ReturnInst *RetI = new ReturnInst(CastI, &RI); - - // Remove original return instruction - RI.getParent()->getInstList().erase(&RI); - - if (!FI.NewToOldValueMap.empty()) { - std::map::iterator II = - FI.NewToOldValueMap.find(&RI); - assert(II != FI.NewToOldValueMap.end() && - "RI not found in clone?"); - FI.NewToOldValueMap.insert(std::make_pair(RetI, II->second)); - FI.NewToOldValueMap.erase(II); - } - } -} - void FuncTransform::visitLoadInst(LoadInst &LI) { if (Value *PH = getPoolHandle(LI.getOperand(0))) AddPoolUse(LI, PH, PoolUses); + visitInstruction(LI); } -void FuncTransform::visitStoreInst (StoreInst &SI) { - // Check if a constant function is being stored - if (Value *clonedFunc = retCloneIfFunc(SI.getOperand(0))) { - CastInst *CastI = new CastInst(clonedFunc, SI.getOperand(0)->getType(), - "tmp", &SI); - StoreInst *StoreI = new StoreInst(CastI, SI.getOperand(1), &SI); - SI.getParent()->getInstList().erase(&SI); - - // Update the NewToOldValueMap if this is a clone - if (!FI.NewToOldValueMap.empty()) { - std::map::iterator II = - FI.NewToOldValueMap.find(&SI); - assert(II != FI.NewToOldValueMap.end() && - "SI not found in clone?"); - FI.NewToOldValueMap.insert(std::make_pair(StoreI, II->second)); - FI.NewToOldValueMap.erase(II); - } - } - +void FuncTransform::visitStoreInst(StoreInst &SI) { if (Value *PH = getPoolHandle(SI.getOperand(1))) AddPoolUse(SI, PH, PoolUses); -} - -void FuncTransform::visitPHINode(PHINode &PI) { - // If any of the operands of the PHI node is a constant function pointer - // that is cloned, the cast instruction has to be inserted at the end of the - // previous basic block - - for (unsigned i = 0; i != PI.getNumIncomingValues(); ++i) - if (Function *clonedFunc = retCloneIfFunc(PI.getIncomingValue(i))) - PI.setIncomingValue(i, ConstantExpr::getCast(ConstantPointerRef::get(clonedFunc), PI.getType())); + visitInstruction(SI); } void FuncTransform::visitMallocInst(MallocInst &MI) { @@ -304,7 +235,10 @@ if (CF) { // Direct calls are nice and simple. FuncInfo *CFI = PAInfo.getFuncInfo(*CF); - if (CFI == 0 || CFI->Clone == 0) return; // Nothing to transform... + if (CFI == 0 || CFI->Clone == 0) { // Nothing to transform... + visitInstruction(*TheCall); + return; + } NewCallee = CFI->Clone; ArgNodes = CFI->ArgNodes; @@ -371,18 +305,15 @@ // Okay, now that we have established our mapping, we can figure out which // pool descriptors to pass in... - std::vector Args; + std::vector Args; for (unsigned i = 0, e = ArgNodes.size(); i != e; ++i) { - if (NodeMapping.count(ArgNodes[i])) { - if (DSNode *LocalNode = NodeMapping[ArgNodes[i]].getNode()) { - assert(FI.PoolDescriptors.count(LocalNode) && - "Node not pool allocated?"); - Args.push_back(FI.PoolDescriptors.find(LocalNode)->second); - } else - Args.push_back(Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); - } else { - Args.push_back(Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); - } + Value *ArgVal = 0; + if (NodeMapping.count(ArgNodes[i])) + if (DSNode *LocalNode = NodeMapping[ArgNodes[i]].getNode()) + if (FI.PoolDescriptors.count(LocalNode)) + ArgVal = FI.PoolDescriptors.find(LocalNode)->second; + Args.push_back(ArgVal ? ArgVal : + Constant::getNullValue(PoolAllocate::PoolDescPtrTy)); } // Add the rest of the arguments... @@ -429,4 +360,19 @@ } TheCall->getParent()->getInstList().erase(TheCall); + visitInstruction(*NewCall); +} + + +// visitInstruction - For all instructions in the transformed function bodies, +// replace any references to the original calls with references to the +// transformed calls. Many instructions can "take the address of" a function, +// and we must make sure to catch each of these uses, and transform it into a +// reference to the new, transformed, function. +void FuncTransform::visitInstruction(Instruction &I) { + for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) + if (Function *clonedFunc = retCloneIfFunc(I.getOperand(i))) { + Constant *CF = ConstantPointerRef::get(clonedFunc); + I.setOperand(i, ConstantExpr::getCast(CF, I.getOperand(i)->getType())); + } } From gaeke at cs.uiuc.edu Wed Nov 12 14:20:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 14:20:02 2003 Subject: [llvm-commits] CVS: llvm/docs/LLVMVsTheWorld.html Message-ID: <200311122019.OAA19371@gally.cs.uiuc.edu> Changes in directory llvm/docs: LLVMVsTheWorld.html added (r1.1) --- Log message: First draft of LLVM-to-anything comparison document. --- Diffs of the changes: (+178 -0) Index: llvm/docs/LLVMVsTheWorld.html diff -c /dev/null llvm/docs/LLVMVsTheWorld.html:1.1 *** /dev/null Wed Nov 12 14:19:51 2003 --- llvm/docs/LLVMVsTheWorld.html Wed Nov 12 14:19:40 2003 *************** *** 0 **** --- 1,178 ---- + + + + + LLVM vs. the World - Comparing Compilers to Compilers + + + + +

      + LLVM vs. the World - Comparing Compilers to Compilers +
      + +
        +
      1. Introduction
      2. +
      3. General Applicability
      4. +
      5. Type System
      6. +
      7. Control-flow and Data-flow Information
      8. +
      9. Registers
      10. +
      11. Programmer Interface
      12. +
      13. Machine Code Emission
      14. +
      + +
      +

      Written by Brian R. Gaeke

      +
      + + + + + +
      +

      Whether you are a stranger to LLVM or not, and whether you are considering + using it for your projects or not, you may find it useful to understand how we + compare ourselves to other well-known compilers. The following list of points + should help you understand -- from our point of view -- the way we see LLVM as + being better than and/or different from a few other selected compilers and code + generation systems.

      + +

      At the moment, we only compare ourselves below to GCC and GNU lightning, but we will try + to revise and expand it as our knowledge and experience permit. Contributions are + welcome.

      +
      + + + + + +
      +

      GNU lightning: Only currently usable for dynamic runtime emission of binary + machine code to memory. Supports one backend at a time.

      + +

      LLVM: Supports compilation of C and C++ (with more languages coming soon), + strong SSA-based optimization at compile-time, link-time, run-time, and + off-line, and multiple platform backends with Just-in-Time and ahead-of-time + compilation frameworks. (See our tech report on Lifelong + Code Optimization for more.)

      +
      + +

      GCC: Many relatively mature platform backends support assembly-language code + generation from many source languages. No run-time compilation + support. Relatively weak optimization support.

      + + + + + +
      +

      GNU lightning: C integer types and "void *" are supported. No type checking + is performed. Explicit type casts are not typically necessary unless the + underlying machine-specific types are distinct (e.g., sign- or zero-extension is + apparently necessary, but casting "int" to "void *" would not be.) No floating + point (?!)

      + +

      LLVM: Compositional type system based on C types, supporting structures, + opaque types, and C integer and floating point types.

      + +

      GCC: Union of high-level types including those used in Pascal, C, C++, Ada, + Java, and FORTRAN.

      +
      + + + + + +
      +

      GNU lightning: No data-flow information encoded in the generated program. No + support for calculating CFG or def-use chains over generated programs.

      + +

      LLVM: Scalar values in Static Single-Assignment form; def-use chains and CFG + always implicitly available and automatically kept up to date.

      + +

      GCC: Trees and RTL do not directly encode data-flow info; but def-use chains + and CFGs can be calculated on the side. They are not automatically kept up to + date.

      +
      + + +
      + Registers +
      + + +
      +

      GNU lightning: Very small fixed register set -- it takes the least common + denominator of supported platforms; basically it inherits its tiny register set + from IA-32, unnecessarily crippling targets like PowerPC with a large register + set.

      + +

      LLVM: An infinite register set, reduced to a particular platform's finite + register set by register allocator.

      + +

      GCC: Trees and RTL provide an arbitrarily large set of values. Reduced to a + particular platform's finite register set by register allocator.

      +
      + + + + + +
      +

      GNU lightning: Library interface based on C preprocessor macros that emit + binary code for a particular instruction to memory. No support for manipulating + code before emission.

      + +

      LLVM: Library interface based on classes representing platform-independent + intermediate code (Instruction) and platform-dependent code (MachineInstr) which + can be manipulated arbitrarily and then emitted to memory.

      + +

      GCC: Internal header file interface (tree.h) to abstract syntax trees, + representing roughly the union of all possible supported source-language + constructs; also, an internal header file interface (rtl.h, rtl.def) to a + low-level IR called RTL which represents roughly the union of all possible + target machine instructions.

      +
      + + + + + +
      +

      GNU lightning: Only supports binary machine code emission to memory.

      + +

      LLVM: Supports writing out assembly language to a file, and binary machine + code to memory, from the same back-end.

      + +

      GCC: Supports writing out assembly language to a file. No support for + emitting machine code to memory.

      +
      + + + +
      + + + + From gaeke at cs.uiuc.edu Wed Nov 12 14:22:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 14:22:01 2003 Subject: [llvm-commits] CVS: llvm/docs/LLVMVsTheWorld.html Message-ID: <200311122021.OAA19496@gally.cs.uiuc.edu> Changes in directory llvm/docs: LLVMVsTheWorld.html updated: 1.1 -> 1.2 --- Log message: Whoops, a div got closed in the wrong place. --- Diffs of the changes: (+2 -2) Index: llvm/docs/LLVMVsTheWorld.html diff -u llvm/docs/LLVMVsTheWorld.html:1.1 llvm/docs/LLVMVsTheWorld.html:1.2 --- llvm/docs/LLVMVsTheWorld.html:1.1 Wed Nov 12 14:19:40 2003 +++ llvm/docs/LLVMVsTheWorld.html Wed Nov 12 14:20:55 2003 @@ -63,11 +63,11 @@ compilation frameworks. (See our tech report on Lifelong Code Optimization for more.)

      -

      GCC: Many relatively mature platform backends support assembly-language code generation from many source languages. No run-time compilation support. Relatively weak optimization support.

      +
      @@ -171,7 +171,7 @@
      Brian R. Gaeke
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2003/11/12 20:19:40 $ + Last modified: $Date: 2003/11/12 20:20:55 $
      From lattner at cs.uiuc.edu Wed Nov 12 14:25:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 14:25:01 2003 Subject: [llvm-commits] CVS: llvm/docs/llvm.css Message-ID: <200311122024.OAA30322@zion.cs.uiuc.edu> Changes in directory llvm/docs: llvm.css updated: 1.5 -> 1.6 --- Log message: This color is making me want to puke :) --- Diffs of the changes: (+1 -1) Index: llvm/docs/llvm.css diff -u llvm/docs/llvm.css:1.5 llvm/docs/llvm.css:1.6 --- llvm/docs/llvm.css:1.5 Tue Oct 28 12:55:27 2003 +++ llvm/docs/llvm.css Wed Nov 12 14:24:39 2003 @@ -10,7 +10,7 @@ */ /* Common for title and header */ .doc_title, .doc_section, .doc_subsection { - color: #eeeeff; background: #330077; + color: #ffffff; background: #330077; font-family: "Georgia,Palatino,Times,Roman"; font-weight: bold; padding-left: 8pt } From gaeke at cs.uiuc.edu Wed Nov 12 14:32:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 14:32:02 2003 Subject: [llvm-commits] CVS: llvm/docs/index.html llvm.css Message-ID: <200311122031.OAA20215@gally.cs.uiuc.edu> Changes in directory llvm/docs: index.html updated: 1.3 -> 1.4 llvm.css updated: 1.6 -> 1.7 --- Log message: index.html: Add link to llvm vs. the world llvm.css: Add padding on top and bottom so that letters do not merge with surrounding whitespace --- Diffs of the changes: (+9 -1) Index: llvm/docs/index.html diff -u llvm/docs/index.html:1.3 llvm/docs/index.html:1.4 --- llvm/docs/index.html:1.3 Wed Oct 29 19:19:16 2003 +++ llvm/docs/index.html Wed Nov 12 14:31:18 2003 @@ -157,6 +157,12 @@
      llvm/docs/TestingGuide.html

      + +

      + Comparison of LLVM to other frameworks: +
      + llvm/docs/LLVMVsTheWorld.html +

      Index: llvm/docs/llvm.css diff -u llvm/docs/llvm.css:1.6 llvm/docs/llvm.css:1.7 --- llvm/docs/llvm.css:1.6 Wed Nov 12 14:24:39 2003 +++ llvm/docs/llvm.css Wed Nov 12 14:31:18 2003 @@ -12,7 +12,9 @@ .doc_title, .doc_section, .doc_subsection { color: #ffffff; background: #330077; font-family: "Georgia,Palatino,Times,Roman"; font-weight: bold; - padding-left: 8pt + padding-left: 8pt; + padding-top: 1px; + padding-bottom: 2px } .doc_title { text-align: left; font-size: 25pt } From gaeke at cs.uiuc.edu Wed Nov 12 14:39:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 14:39:01 2003 Subject: [llvm-commits] CVS: llvm-www/www-index.html Message-ID: <200311122038.OAA20679@gally.cs.uiuc.edu> Changes in directory llvm-www: www-index.html updated: 1.84 -> 1.85 --- Log message: Add LLVM Vs. The World link. Also fix up that section of the web page a little. --- Diffs of the changes: (+10 -4) Index: llvm-www/www-index.html diff -u llvm-www/www-index.html:1.84 llvm-www/www-index.html:1.85 --- llvm-www/www-index.html:1.84 Sun Nov 2 11:30:46 2003 +++ llvm-www/www-index.html Wed Nov 12 14:38:00 2003 @@ -331,14 +331,20 @@ outside (or inside) the llvm/ tree, while using LLVM header files and libraries. -
    • How-To-Submit-A-Bug: - instructions for the proper way to submit information - about a bug you ran into in the LLVM system.
    • -
    • LLVM Test Suite Guide +
    • How to Submit A Bug + Report - Instructions for properly submitting information + about any bugs you run into in the LLVM system.
    • + +
    • LLVM Test Suite Guide - A reference manual for using the LLVM test suite.
    • +
    • How to build the C/C++ front-end - Instructions for building the front-end from source.
    • + +
    • LLVM vs. The World - + A "fair and balanced" comparison of LLVM with other + compilation frameworks.
    Programming Documentation: From gaeke at cs.uiuc.edu Wed Nov 12 14:48:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 14:48:01 2003 Subject: [llvm-commits] CVS: llvm/docs/CFEBuildInstrs.html Message-ID: <200311122047.OAA21377@gally.cs.uiuc.edu> Changes in directory llvm/docs: CFEBuildInstrs.html updated: 1.6 -> 1.7 --- Log message: Make the beginning of this page look like the beginnings of other pages. --- Diffs of the changes: (+23 -4) Index: llvm/docs/CFEBuildInstrs.html diff -u llvm/docs/CFEBuildInstrs.html:1.6 llvm/docs/CFEBuildInstrs.html:1.7 --- llvm/docs/CFEBuildInstrs.html:1.6 Tue Oct 28 15:09:29 2003 +++ llvm/docs/CFEBuildInstrs.html Wed Nov 12 14:47:30 2003 @@ -11,8 +11,26 @@ Bootstrapping the LLVM C/C++ Front-End -

    This document is intended to explain the process of building the LLVM -C/C++ front-end, based on GCC 3.4, from source.

    +
      +
    1. A Cautionary Note +
    2. Instructions +
    + +
    +

    Written by Brian R. Gaeke

    +
    + + + + + +
    +

    This document is intended to explain the process of building the +LLVM C/C++ front-end, based on GCC 3.4, from its source code. You +would have to do this, for example, if you are porting LLVM to a new +architecture or operating system.

    NOTE: This is currently a somewhat fragile, error-prone process, and you should only try to do it if:

    @@ -24,6 +42,7 @@

    We welcome patches to help make this process simpler.

    +
    @@ -158,10 +177,10 @@
    From lattner at cs.uiuc.edu Wed Nov 12 15:01:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 15:01:02 2003 Subject: [llvm-commits] CVS: poolalloc/include/poolalloc/PoolAllocate.h Message-ID: <200311122100.PAA20295@neo.cs.uiuc.edu> Changes in directory poolalloc/include/poolalloc: PoolAllocate.h updated: 1.17 -> 1.18 --- Log message: Check in changes :( --- Diffs of the changes: (+48 -21) Index: poolalloc/include/poolalloc/PoolAllocate.h diff -u poolalloc/include/poolalloc/PoolAllocate.h:1.17 poolalloc/include/poolalloc/PoolAllocate.h:1.18 --- poolalloc/include/poolalloc/PoolAllocate.h:1.17 Mon Nov 10 23:09:44 2003 +++ poolalloc/include/poolalloc/PoolAllocate.h Wed Nov 12 14:59:57 2003 @@ -13,11 +13,13 @@ #include "llvm/Pass.h" #include "llvm/DerivedTypes.h" #include "llvm/Support/CallSite.h" -#include "Support/hash_set" -#include "Support/VectorExtras.h" #include "Support/EquivalenceClasses.h" +#include "Support/VectorExtras.h" +#include "Support/hash_set" #include +namespace llvm { + class BUDataStructures; class TDDataStructures; class DSNode; @@ -33,6 +35,8 @@ /// maps to the original function... /// struct FuncInfo { + FuncInfo() : Clone(0) {} + /// MarkedNodes - The set of nodes which are not locally pool allocatable in /// the current function. /// @@ -45,11 +49,13 @@ /// std::vector ArgNodes; +#if 0 /// In order to handle indirect functions, the start and end of the /// arguments that are useful to this function. /// The pool arguments useful to this function are PoolArgFirst to /// PoolArgLast not inclusive. int PoolArgFirst, PoolArgLast; +#endif /// PoolDescriptors - The Value* (either an argument or an alloca) which /// defines the pool descriptor for this DSNode. Pools are mapped one to @@ -69,6 +75,27 @@ /// std::map NewToOldValueMap; }; + + struct EquivClassInfo { + // FuncsInClass - This is a list of all of the functions in this equiv + // class. + std::vector FuncsInClass; + + // G - The DSGraph which contains a union of all of the nodes in this + // equivalence class. + DSGraph *G; + + // ECGraphToPrivateMap - This map, given a DSNode in the ECI DSGraph and a + // function, will tell you which DS node in the function DS graph this node + // corresponds to (or null if none). + std::map, DSNode*> ECGraphToPrivateMap; + + // ArgNodes - The list of DSNodes which require arguments to be passed in + // for all members of this equivalence class. + std::vector ArgNodes; + + EquivClassInfo() : G(0) {} + }; } @@ -78,35 +105,36 @@ class PoolAllocate : public Pass { Module *CurModule; BUDataStructures *BU; - TDDataStructures *TDDS; - hash_set InlinedFuncs; - std::map FunctionInfo; - // Debug function to print the FuncECs - void printFuncECs(); - + // Equivalence class where functions that can potentially be called via the + // same function pointer are in the same class. + EquivalenceClasses FuncECs; + + // Each equivalence class leader has an EquivClassInfo object. This map holds + // them. + typedef std::map ECInfoForLeadersMapTy; + ECInfoForLeadersMapTy ECInfoForLeadersMap; + + /// OneCalledFunction - For each indirect function call, we keep track of one + /// target of the call. This is used to find the equivalence class called by + /// a call site. + std::map OneCalledFunction; + public: Function *PoolInit, *PoolDestroy, *PoolAlloc, *PoolAllocArray, *PoolFree; static const Type *PoolDescPtrTy; - // Equivalence class where functions that can potentially be called via - // the same function pointer are in the same class. - EquivalenceClasses FuncECs; + const PA::EquivClassInfo &getECIForIndirectCallSite(CallSite CS); +#if 0 /// Map from an Indirect call site to the set of Functions that it can point /// to. std::multimap CallSiteTargets; - - /// This maps an equivalence class to the last pool argument number for that - /// class. This is used because the pool arguments for all functions within - /// an equivalence class is passed to all the functions in that class. - /// If an equivalence class does not require pool arguments, it is not - /// on this map. - std::map EqClass2LastPoolArg; +#endif /// GlobalNodes - For each node (with an H marker) in the globals graph, this /// map contains the global variable that holds the pool descriptor for the @@ -183,9 +211,6 @@ void CreatePools(Function &F, const std::vector &NodesToPA, std::map &PoolDescriptors); - void InlineIndirectCalls(Function &F, DSGraph &G, - hash_set &visited); - void TransformBody(DSGraph &g, DSGraph &tdg, PA::FuncInfo &fi, std::set > &poolUses, std::set > &poolFrees, @@ -202,5 +227,7 @@ void CalculateLivePoolFreeBlocks(std::set &LiveBlocks,Value *PD); }; + +} #endif From gaeke at cs.uiuc.edu Wed Nov 12 15:07:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 15:07:03 2003 Subject: [llvm-commits] CVS: llvm-www/demo/ Message-ID: <200311122106.PAA30624@zion.cs.uiuc.edu> Changes in directory llvm-www/demo: --- Log message: Directory /home/vadve/shared/InternalCVS/llvm-www/demo added to the repository --- Diffs of the changes: (+0 -0) From gaeke at cs.uiuc.edu Wed Nov 12 15:08:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 15:08:01 2003 Subject: [llvm-commits] CVS: llvm-www/demo/cathead.png index.cgi Message-ID: <200311122107.PAA30715@zion.cs.uiuc.edu> Changes in directory llvm-www/demo: cathead.png added (r1.1) index.cgi added (r1.1) --- Log message: Add demo scripts to the CVS --- Diffs of the changes: (+264 -0) Index: llvm-www/demo/cathead.png Index: llvm-www/demo/index.cgi diff -c /dev/null llvm-www/demo/index.cgi:1.1 *** /dev/null Wed Nov 12 15:07:55 2003 --- llvm-www/demo/index.cgi Wed Nov 12 15:07:45 2003 *************** *** 0 **** --- 1,264 ---- + #!/usr/dcs/software/supported/bin/perl -w + + use CGI; + use POSIX; + use Mail::Send; + + open( STDERR, ">&STDOUT" ) or die "can't redirect stderr to stdout"; + + if (! -d "/tmp/webcompile") { mkdir ("/tmp/webcompile", 0777); } + + $LOGFILE = '/tmp/webcompile/log.txt'; + $FORM_TITLE = 'Try out LLVM in your Browser!'; + $FORM_URL = 'http://llvm.cs.uiuc.edu/demo/index.cgi'; + $CONTACT_ADDRESS = 'gaeke -at- uiuc.edu'; + $LOGO_IMAGE_URL = 'cathead.png'; + $EXPLAIN_PARAGRAPH = <-save-temps or + -E options to gcc) first. + END + @PREPENDPATHDIRS = + ( '/home/vadve/gaeke/llvm/tools/Debug', '/home/vadve/gaeke/bin' ); + $ENV{'LLVM_LIB_SEARCH_PATH'} = + '/home/vadve/lattner/local/x86/llvm-gcc/bytecode-libs'; + $ENV{'LD_LIBRARY_PATH'} = '/home/vadve/shared/localtools/x86/lib'; + + sub getname { + my ($extension) = @_; + for ( my $count = 0 ; ; $count++ ) { + my $name = sprintf( "/tmp/webcompile/_%d_%d%s", $$, $count, $extension ); + if ( !-f $name ) { return $name; } + } + } + + sub barf { + print "", @_, "\n"; + print $c->end_html; + exit 1; + } + + sub writeIntoFile { + my $extension = shift @_; + my $contents = join "", @_; + my $name = getname($extension); + local (*FILE); + open( FILE, ">$name" ) or barf("Can't write to $name: $!"); + print FILE $contents; + close FILE; + return $name; + } + + sub addlog { + my ( $source, $pid, $result ) = @_; + open( LOG, ">>$LOGFILE" ); + my $time = scalar localtime; + my $remotehost = $ENV{'REMOTE_ADDR'}; + print LOG "[$time] [$remotehost]: $pid\n"; + print LOG "<<<\n$source\n>>>\nResult is: <<<\n$result\n>>>\n"; + close LOG; + } + + sub dumpFile { + my ( $header, $file ) = @_; + my $result; + open( FILE, "$file" ) or barf("Can't read $file: $!"); + while () { + $result .= $_; + } + close FILE; + my $UnhilightedResult = $result; + my $HtmlResult = "

    $header

    \n
    \n"
    +                    . $c->escapeHTML($result)
    +                    . "\n
    \n"; + if (wantarray) { + return ($UnhilightedResult, $HtmlResult); + } else { + return $HtmlResult; + } + } + + sub syntaxHighlightLLVM { + my ($input) = @_; + $input =~ + s@\b(void|bool|sbyte|ubyte|short|ushort|int|uint|long|ulong|float|double|type|label|opaque)\b@$1@g; + $input =~ + s@\b(add|sub|mul|div|rem|and|or|xor|setne|seteq|setlt|setgt|setle|setge|phi|call|cast|to|shl|shr|vaarg|vanext|ret|br|switch|invoke|unwind|malloc|alloca|free|load|store|getelementptr|begin|end|true|false|declare|global|constant|const|internal|uninitialized|external|implementation|linkonce|weak|appending|null|to|except|not|target|endian|pointersize|big|little|volatile)\b@$1@g; + return $input; + } + + sub mailto { + my ($recipient, $body) = @_; + my $msg = new Mail::Send (Subject=>"LLVM Demo Page Run", To=>$recipient); + local ($fh); + $fh = $msg->open(); + print $fh $body; + $fh->close(); + } + + $c = new CGI; + print $c->header, + $c->start_html( + -title => $FORM_TITLE, + -BGCOLOR => '#99bbff' + ), + $c->h3($FORM_TITLE); + if ($LOGO_IMAGE_URL) { print ""; } + + print "

    $EXPLAIN_PARAGRAPH

    ", + $c->start_multipart_form( 'POST', $FORM_URL ); + + print "Upload a file: "; + print $c->filefield( -name => 'uploaded_file', -default => '' ); + print "

    Or type your "; + print $c->radio_group( + -name => 'language', + -values => [ 'C', 'C++' ], + -default => 'C' + ); + print " source text below:

    "; + + $source = $c->param('source'); + print $c->textarea( + -name => "source", + -rows => 12, + -columns => 80, + -default => $source + ); + + print "

    "; + print $c->checkbox( + -name => 'cxxdemangle', + -label => + 'Demangle C++ names in output using c++filt (warning: may produce asyntactic output)' + ); + + print "

    ", $c->submit, "\n", $c->endform; + + $ENV{'PATH'} = ( join ( ':', @PREPENDPATHDIRS ) ) . ":" . $ENV{'PATH'}; + + sub sanitychecktools { + my $sanitycheckfail = ''; + + # insert tool-specific sanity checks here + $sanitycheckfail .= ' gccas' if `gccas --help 2>&1` !~ /assembler for GCC/; + $sanitycheckfail .= ' llvm-dis' + if `llvm-dis --help 2>&1` !~ /ll disassembler/; + $sanitycheckfail .= ' llvm-gcc' + if `llvm-gcc --version 2>&1` !~ /Free Software Foundation/; + barf( + "The demo page is currently unavailable. [tools: ($sanitycheckfail ) failed sanity check]" + ) + if $sanitycheckfail; + } + sanitychecktools(); + + sub try_run { + my ( $program, $commandline, $outputFile ) = @_; + my $retcode = system($commandline); + if ( -s $outputFile ) { + print dumpFile( "Output from $program", $outputFile ); + } + if ( WIFEXITED($retcode) && WEXITSTATUS($retcode) != 0 ) { + barf( + "$program exited with an error. Please correct source and resubmit.\n" + ); + } + if ( WIFSIGNALED($retcode) != 0 ) { + my $sig = WTERMSIG($retcode); + barf( + "Ouch, $program caught signal $sig. Sorry, better luck next time!\n" + ); + } + } + + %suffixes = ( + 'Java' => '.java', + 'JO99' => '.jo9', + 'C' => '.c', + 'C++' => '.cc', + 'preprocessed C' => '.i', + 'preprocessed C++' => '.ii' + ); + %languages = ( + '.jo9' => 'JO99', + '.java' => 'Java', + '.c' => 'C', + '.i' => 'preprocessed C', + '.ii' => 'preprocessed C++', + '.cc' => 'C++', + '.cpp' => 'C++' + ); + + $uploaded_file_name = $c->param('uploaded_file'); + if ($uploaded_file_name) { + if ($source) { + barf( + "You must choose between uploading a file and typing code in. You can't do both at the same time." + ); + } + $uploaded_file_name =~ s/^.*(\.[A-Za-z]+)$/$1/; + my $language = $languages{$uploaded_file_name}; + $c->param( 'language', $language ); + + print "

    Processing uploaded file. It looks like $language.

    \n"; + my $fh = $c->upload('uploaded_file'); + if ( !$fh ) { + barf( "Error uploading file: " . $c->cgi_error ); + } + while (<$fh>) { + $source .= $_; + } + close $fh; + } + + if ($source) { + print $c->hr; + my $extension = $suffixes{ $c->param('language') }; + barf "Unknown language; can't compile\n" unless $extension; + + # Add a newline to the source here to avoid a warning from gcc. + $source .= "\n"; + + $source =~ + s@(\n)?#include.*[<"](.*\.\..*)[">].*\n@$1#error "invalid #include file $2 detected"\n at g; + + my $inputFile = writeIntoFile( $extension, $source ); + my $pid = $$; + + my $bytecodeFile = getname(".o"); + my $outputFile = getname(".llvm-gcc.out"); + try_run( "llvm-gcc", + "llvm-gcc -o $bytecodeFile -c $inputFile > $outputFile 2>&1", + $outputFile ); + my $disassemblyFile = getname(".ll"); + try_run( "llvm-dis", + "llvm-dis -o=$disassemblyFile $bytecodeFile > $outputFile 2>&1", + $outputFile ); + + if ( $c->param('cxxdemangle') ) { + print "

    Demangling disassembler output.

    \n"; + my $tmpFile = getname(".ll"); + system("c++filt < $disassemblyFile > $tmpFile 2>&1"); + system("mv $tmpFile $disassemblyFile"); + } + + my ($UnhilightedResult, $HtmlResult); + if ( -s $disassemblyFile ) { + ($UnhilightedResult, $HtmlResult) + = dumpFile( "Output from LLVM disassembler", $disassemblyFile ); + print syntaxHighlightLLVM($HtmlResult); + } else { + print "

    Hmm, that's weird, llvm-dis didn't produce any output.

    \n"; + unlink( $inputFile, $bytecodeFile, $outputFile, $disassemblyFile ); + } + addlog( $source, $pid, $UnhilightedResult ); + mailto( 'lattner at cs.uiuc.edu', + "--- Source: ---\n$source\n--- Result: ---\n$UnhilightedResult\n" ); + } + + print $c->hr, "
    $CONTACT_ADDRESS
    ", $c->end_html; + exit 0; From gaeke at cs.uiuc.edu Wed Nov 12 15:11:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 15:11:02 2003 Subject: [llvm-commits] CVS: llvm-www/demo/index.cgi Message-ID: <200311122110.PAA30828@zion.cs.uiuc.edu> Changes in directory llvm-www/demo: index.cgi updated: 1.1 -> 1.2 --- Log message: Update the top of the script with a brief description of what it does. --- Diffs of the changes: (+8 -0) Index: llvm-www/demo/index.cgi diff -u llvm-www/demo/index.cgi:1.1 llvm-www/demo/index.cgi:1.2 --- llvm-www/demo/index.cgi:1.1 Wed Nov 12 15:07:45 2003 +++ llvm-www/demo/index.cgi Wed Nov 12 15:10:24 2003 @@ -1,4 +1,12 @@ #!/usr/dcs/software/supported/bin/perl -w +# LLVM Web Demo script +# +# Originally written by Brian Gaeke as the CS326 Spring 2003 script for +# doing remote web JO99C compilations. (It could still be used for that +# purpose, though the two scripts have diverged somewhat.) +# +# Last modified $Date: 2003/11/12 21:10:24 $ +# use CGI; use POSIX; From criswell at cs.uiuc.edu Wed Nov 12 15:33:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Nov 12 15:33:02 2003 Subject: [llvm-commits] CVS: llvm/include/Support/MallocAllocator.h Message-ID: <200311122132.PAA09475@choi.cs.uiuc.edu> Changes in directory llvm/include/Support: MallocAllocator.h updated: 1.4 -> 1.5 --- Log message: Regress to not using the llvm namespace. This keeps Pool Allocation stuff from compiling. We can re-visit it later when we have time to do it right. --- Diffs of the changes: (+0 -4) Index: llvm/include/Support/MallocAllocator.h diff -u llvm/include/Support/MallocAllocator.h:1.4 llvm/include/Support/MallocAllocator.h:1.5 --- llvm/include/Support/MallocAllocator.h:1.4 Tue Nov 11 16:41:29 2003 +++ llvm/include/Support/MallocAllocator.h Wed Nov 12 15:32:06 2003 @@ -23,8 +23,6 @@ #include #include -namespace llvm { - template struct MallocAllocator { typedef size_t size_type; @@ -80,7 +78,5 @@ typedef ::MallocAllocator allocator_type; }; } - -} // End llvm namespace #endif From criswell at cs.uiuc.edu Wed Nov 12 15:34:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Nov 12 15:34:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/Olden/mst/Makefile Message-ID: <200311122133.PAA09493@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/Olden/mst: Makefile updated: 1.12 -> 1.13 --- Log message: Bumped the large problem size up to 4000. This takes about 13 seconds of user space time on our Intel machines. --- Diffs of the changes: (+1 -1) Index: llvm/test/Programs/MultiSource/Benchmarks/Olden/mst/Makefile diff -u llvm/test/Programs/MultiSource/Benchmarks/Olden/mst/Makefile:1.12 llvm/test/Programs/MultiSource/Benchmarks/Olden/mst/Makefile:1.13 --- llvm/test/Programs/MultiSource/Benchmarks/Olden/mst/Makefile:1.12 Fri Sep 12 11:02:27 2003 +++ llvm/test/Programs/MultiSource/Benchmarks/Olden/mst/Makefile Wed Nov 12 15:33:41 2003 @@ -4,7 +4,7 @@ CPPFLAGS = -DTORONTO LDFLAGS = ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = 3000 +RUN_OPTIONS = 4000 else RUN_OPTIONS = 500 endif From gaeke at cs.uiuc.edu Wed Nov 12 15:37:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 15:37:01 2003 Subject: [llvm-commits] CVS: llvm/docs/LLVMVsTheWorld.html Message-ID: <200311122136.PAA24475@gally.cs.uiuc.edu> Changes in directory llvm/docs: LLVMVsTheWorld.html updated: 1.2 -> 1.3 --- Log message: I won't claim we're "better than and/or different from..." at Misha's behest. --- Diffs of the changes: (+4 -4) Index: llvm/docs/LLVMVsTheWorld.html diff -u llvm/docs/LLVMVsTheWorld.html:1.2 llvm/docs/LLVMVsTheWorld.html:1.3 --- llvm/docs/LLVMVsTheWorld.html:1.2 Wed Nov 12 14:20:55 2003 +++ llvm/docs/LLVMVsTheWorld.html Wed Nov 12 15:36:29 2003 @@ -36,9 +36,9 @@

    Whether you are a stranger to LLVM or not, and whether you are considering using it for your projects or not, you may find it useful to understand how we compare ourselves to other well-known compilers. The following list of points -should help you understand -- from our point of view -- the way we see LLVM as -being better than and/or different from a few other selected compilers and code -generation systems.

    +should help you understand -- from our point of view -- some of the important +ways in which we see LLVM as different from other selected compilers and +code generation systems.

    At the moment, we only compare ourselves below to GCC and Brian R. Gaeke The LLVM Compiler Infrastructure
    - Last modified: $Date: 2003/11/12 20:20:55 $ + Last modified: $Date: 2003/11/12 21:36:29 $

    From gaeke at cs.uiuc.edu Wed Nov 12 15:39:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 15:39:02 2003 Subject: [llvm-commits] CVS: llvm/docs/LLVMVsTheWorld.html Message-ID: <200311122139.PAA24681@gally.cs.uiuc.edu> Changes in directory llvm/docs: LLVMVsTheWorld.html updated: 1.3 -> 1.4 --- Log message: Update section on GNU lightning fp. --- Diffs of the changes: (+4 -3) Index: llvm/docs/LLVMVsTheWorld.html diff -u llvm/docs/LLVMVsTheWorld.html:1.3 llvm/docs/LLVMVsTheWorld.html:1.4 --- llvm/docs/LLVMVsTheWorld.html:1.3 Wed Nov 12 15:36:29 2003 +++ llvm/docs/LLVMVsTheWorld.html Wed Nov 12 15:38:50 2003 @@ -79,8 +79,9 @@

    GNU lightning: C integer types and "void *" are supported. No type checking is performed. Explicit type casts are not typically necessary unless the underlying machine-specific types are distinct (e.g., sign- or zero-extension is -apparently necessary, but casting "int" to "void *" would not be.) No floating -point (?!)

    +apparently necessary, but casting "int" to "void *" would not be.) +Floating-point support may not work on all platforms (it does not appear to be +documented in the latest release).

    LLVM: Compositional type system based on C types, supporting structures, opaque types, and C integer and floating point types.

    @@ -171,7 +172,7 @@
    Brian R. Gaeke
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2003/11/12 21:36:29 $ + Last modified: $Date: 2003/11/12 21:38:50 $ From criswell at cs.uiuc.edu Wed Nov 12 15:40:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Wed Nov 12 15:40:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/Olden/tsp/Makefile Message-ID: <200311122139.PAA09570@choi.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/Olden/tsp: Makefile updated: 1.5 -> 1.6 --- Log message: Bumped up the large problem size input so that it takes about 8.69 user space seconds on Intel. --- Diffs of the changes: (+4 -0) Index: llvm/test/Programs/MultiSource/Benchmarks/Olden/tsp/Makefile diff -u llvm/test/Programs/MultiSource/Benchmarks/Olden/tsp/Makefile:1.5 llvm/test/Programs/MultiSource/Benchmarks/Olden/tsp/Makefile:1.6 --- llvm/test/Programs/MultiSource/Benchmarks/Olden/tsp/Makefile:1.5 Fri Sep 12 11:02:32 2003 +++ llvm/test/Programs/MultiSource/Benchmarks/Olden/tsp/Makefile Wed Nov 12 15:39:38 2003 @@ -3,7 +3,11 @@ PROG = tsp CPPFLAGS = -DTORONTO LDFLAGS = -lm +ifdef LARGE_PROBLEM_SIZE +RUN_OPTIONS = 2048000 +else RUN_OPTIONS = 1024000 +endif include $(LEVEL)/test/Programs/MultiSource/Makefile.multisrc From gaeke at cs.uiuc.edu Wed Nov 12 15:40:11 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 15:40:11 2003 Subject: [llvm-commits] CVS: llvm/docs/LLVMVsTheWorld.html Message-ID: <200311122139.PAA24776@gally.cs.uiuc.edu> Changes in directory llvm/docs: LLVMVsTheWorld.html updated: 1.4 -> 1.5 --- Log message: Mention LLVM cast instructions. --- Diffs of the changes: (+3 -2) Index: llvm/docs/LLVMVsTheWorld.html diff -u llvm/docs/LLVMVsTheWorld.html:1.4 llvm/docs/LLVMVsTheWorld.html:1.5 --- llvm/docs/LLVMVsTheWorld.html:1.4 Wed Nov 12 15:38:50 2003 +++ llvm/docs/LLVMVsTheWorld.html Wed Nov 12 15:39:31 2003 @@ -84,7 +84,8 @@ documented in the latest release).

    LLVM: Compositional type system based on C types, supporting structures, -opaque types, and C integer and floating point types.

    +opaque types, and C integer and floating point types. Explicit cast instructions +are required to transform a value from one type to another.

    GCC: Union of high-level types including those used in Pascal, C, C++, Ada, Java, and FORTRAN.

    @@ -172,7 +173,7 @@
    Brian R. Gaeke
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2003/11/12 21:38:50 $ + Last modified: $Date: 2003/11/12 21:39:31 $ From brukman at cs.uiuc.edu Wed Nov 12 15:46:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 15:46:01 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200311122145.PAA31067@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.50 -> 1.51 --- Log message: Some programs actually require an input to run. The nerve! --- Diffs of the changes: (+7 -0) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.50 llvm/autoconf/configure.ac:1.51 --- llvm/autoconf/configure.ac:1.50 Wed Nov 12 13:39:10 2003 +++ llvm/autoconf/configure.ac Wed Nov 12 15:45:04 2003 @@ -149,12 +149,19 @@ AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/Fhourstones/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/distray/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/distray/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/mason/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/mason/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/neural/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/neural/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pifft/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pifft/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/01-qbsort/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/03-testtrie/Makefile) From brukman at cs.uiuc.edu Wed Nov 12 15:52:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 15:52:01 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200311122151.PAA31472@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.51 -> 1.52 --- Log message: Apparently adding these entries and regenerating llvm/configure results in syntax errors. Reverting the patch until I can figure out what's going on. --- Diffs of the changes: (+0 -7) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.51 llvm/autoconf/configure.ac:1.52 --- llvm/autoconf/configure.ac:1.51 Wed Nov 12 15:45:04 2003 +++ llvm/autoconf/configure.ac Wed Nov 12 15:51:44 2003 @@ -149,19 +149,12 @@ AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/Fhourstones/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/Makefile) -AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/distray/Makefile) -AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/distray/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile) -AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/mason/Makefile) -AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/mason/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/neural/Makefile) -AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/neural/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile) -AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pifft/Makefile) -AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pifft/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/01-qbsort/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/03-testtrie/Makefile) From gaeke at cs.uiuc.edu Wed Nov 12 16:02:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 16:02:02 2003 Subject: [llvm-commits] CVS: llvm-www/www-index.html Message-ID: <200311122201.QAA01299@gally.cs.uiuc.edu> Changes in directory llvm-www: www-index.html updated: 1.85 -> 1.86 --- Log message: Less tongue-in-cheek description of comparison doc. --- Diffs of the changes: (+2 -2) Index: llvm-www/www-index.html diff -u llvm-www/www-index.html:1.85 llvm-www/www-index.html:1.86 --- llvm-www/www-index.html:1.85 Wed Nov 12 14:38:00 2003 +++ llvm-www/www-index.html Wed Nov 12 16:00:43 2003 @@ -343,8 +343,8 @@ from source.
  21. LLVM vs. The World - - A "fair and balanced" comparison of LLVM with other - compilation frameworks.
  22. + A brief comparison of LLVM with a few other + compilation and code-generation frameworks. Programming Documentation: From brukman at cs.uiuc.edu Wed Nov 12 16:17:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 16:17:01 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200311122216.QAA21288@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.52 -> 1.53 --- Log message: OK, scratch my last post, this actually *does* work, those syntax errors were imaginary. --- Diffs of the changes: (+7 -0) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.52 llvm/autoconf/configure.ac:1.53 --- llvm/autoconf/configure.ac:1.52 Wed Nov 12 15:51:44 2003 +++ llvm/autoconf/configure.ac Wed Nov 12 16:16:23 2003 @@ -149,12 +149,19 @@ AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/Fhourstones/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/distray/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/distray/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/mason/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/mason/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/neural/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/neural/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pifft/Makefile) +AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/FreeBench/pifft/test.in) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/01-qbsort/Makefile) AC_CONFIG_MAKEFILE(test/Programs/MultiSource/Benchmarks/McCat/03-testtrie/Makefile) From lattner at cs.uiuc.edu Wed Nov 12 16:17:10 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 16:17:10 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2003-11-12-VoidString.c Message-ID: <200311122216.QAA21262@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2003-11-12-VoidString.c added (r1.1) --- Log message: Add new testcase for PR112 --- Diffs of the changes: (+2 -0) Index: llvm/test/Regression/CFrontend/2003-11-12-VoidString.c diff -c /dev/null llvm/test/Regression/CFrontend/2003-11-12-VoidString.c:1.1 *** /dev/null Wed Nov 12 16:16:05 2003 --- llvm/test/Regression/CFrontend/2003-11-12-VoidString.c Wed Nov 12 16:15:55 2003 *************** *** 0 **** --- 1,2 ---- + void query_newnamebuf(void) { ((void)"query_newnamebuf"); } + From brukman at cs.uiuc.edu Wed Nov 12 16:18:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 16:18:01 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200311122217.QAA21310@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.51 -> 1.52 --- Log message: Regenerated `configure' for adding Makefiles and test.in to FreeBench benchmarks. --- Diffs of the changes: (+118 -28) Index: llvm/configure diff -u llvm/configure:1.51 llvm/configure:1.52 --- llvm/configure:1.51 Sun Nov 9 21:06:27 2003 +++ llvm/configure Wed Nov 12 16:16:51 2003 @@ -1847,6 +1847,51 @@ ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/Fhourstones/Makefile" + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/Makefile" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/Makefile" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/analyzer/test.in" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/distray/Makefile" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/distray/test.in" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/Makefile" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/fourinarow/test.in" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/mason/Makefile" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/mason/test.in" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/neural/Makefile" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/neural/test.in" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/Makefile" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/pcompress2/test.in" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/pifft/Makefile" + + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/FreeBench/pifft/test.in" + + ac_config_commands="$ac_config_commands test/Programs/MultiSource/Benchmarks/McCat/Makefile" @@ -4407,7 +4452,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4410 "configure"' > conftest.$ac_ext + echo '#line 4455 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5248,7 +5293,7 @@ # Provide some information about the compiler. -echo "$as_me:5251:" \ +echo "$as_me:5296:" \ "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 @@ -6257,11 +6302,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6260: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6305: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6264: \$? = $ac_status" >&5 + echo "$as_me:6309: \$? = $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 @@ -6489,11 +6534,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6492: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6537: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6496: \$? = $ac_status" >&5 + echo "$as_me:6541: \$? = $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 @@ -6556,11 +6601,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6559: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6604: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6563: \$? = $ac_status" >&5 + echo "$as_me:6608: \$? = $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 @@ -8568,7 +8613,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:10850: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10809: \$? = $ac_status" >&5 + echo "$as_me:10854: \$? = $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 @@ -10869,11 +10914,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10872: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10917: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10876: \$? = $ac_status" >&5 + echo "$as_me:10921: \$? = $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 @@ -12112,7 +12157,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:13080: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13039: \$? = $ac_status" >&5 + echo "$as_me:13084: \$? = $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 @@ -13099,11 +13144,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13102: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13147: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13106: \$? = $ac_status" >&5 + echo "$as_me:13151: \$? = $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 @@ -15043,11 +15088,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15046: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15091: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15050: \$? = $ac_status" >&5 + echo "$as_me:15095: \$? = $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 @@ -15275,11 +15320,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15278: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15323: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15282: \$? = $ac_status" >&5 + echo "$as_me:15327: \$? = $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 @@ -15342,11 +15387,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15345: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15390: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15349: \$? = $ac_status" >&5 + echo "$as_me:15394: \$? = $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 @@ -17354,7 +17399,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/include/Support: MallocAllocator.h updated: 1.5 -> 1.6 --- Log message: Fix faulty namespacification --- Diffs of the changes: (+7 -4) Index: llvm/include/Support/MallocAllocator.h diff -u llvm/include/Support/MallocAllocator.h:1.5 llvm/include/Support/MallocAllocator.h:1.6 --- llvm/include/Support/MallocAllocator.h:1.5 Wed Nov 12 15:32:06 2003 +++ llvm/include/Support/MallocAllocator.h Wed Nov 12 16:45:14 2003 @@ -23,6 +23,8 @@ #include #include +namespace llvm { + template struct MallocAllocator { typedef size_t size_type; @@ -68,14 +70,15 @@ inline bool operator!=(const MallocAllocator&, const MallocAllocator&) { return false; } +} // End llvm namespace namespace std { template - struct _Alloc_traits > { + struct _Alloc_traits > { static const bool _S_instanceless = true; - typedef ::MallocAllocator base_alloc_type; - typedef ::MallocAllocator _Alloc_type; - typedef ::MallocAllocator allocator_type; + typedef ::llvm::MallocAllocator base_alloc_type; + typedef ::llvm::MallocAllocator _Alloc_type; + typedef ::llvm::MallocAllocator allocator_type; }; } From lattner at cs.uiuc.edu Wed Nov 12 16:47:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 16:47:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/PoolAllocator/PageManager.cpp Message-ID: <200311122246.QAA23622@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/PoolAllocator: PageManager.cpp updated: 1.5 -> 1.6 --- Log message: Updates for proper namespacification --- Diffs of the changes: (+2 -2) Index: poolalloc/runtime/PoolAllocator/PageManager.cpp diff -u poolalloc/runtime/PoolAllocator/PageManager.cpp:1.5 poolalloc/runtime/PoolAllocator/PageManager.cpp:1.6 --- poolalloc/runtime/PoolAllocator/PageManager.cpp:1.5 Mon Nov 10 16:44:59 2003 +++ poolalloc/runtime/PoolAllocator/PageManager.cpp Wed Nov 12 16:46:28 2003 @@ -29,7 +29,7 @@ // Explicitly use the malloc allocator here, to avoid depending on the C++ // runtime library. -typedef std::vector > FreePagesListType; +typedef std::vector > FreePagesListType; static FreePagesListType *FreePages = 0; void InitializePageManager() { @@ -86,7 +86,7 @@ // Avoid using operator new! FreePages = (FreePagesListType*)malloc(sizeof(FreePagesListType)); // Use placement new now. - new (FreePages) std::vector >(); + new (FreePages) std::vector >(); } for (unsigned i = 1; i != NumToAllocate; ++i) FreePages->push_back(Ptr+i*PageSize); From gaeke at cs.uiuc.edu Wed Nov 12 16:47:11 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 16:47:11 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200311122246.QAA23615@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.28 -> 1.29 --- Log message: Add another fixed bug. --- Diffs of the changes: (+4 -3) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.28 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.29 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.28 Tue Nov 11 22:43:44 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Wed Nov 12 16:46:27 2003 @@ -241,8 +241,9 @@
  23. llvm-gcc infinite loops on "case MAXINT:"
  24. -

  25. llvm-gcc tries to add -bools
  26. +

  27. llvm-gcc tries to add bools
  28. + +

  29. Casting a string constant to void crashes llvm-gcc
  30. Notes:

      @@ -499,6 +500,6 @@ Maintained By: The LLVM Team
      -Last modified: Tue Nov 11 22:43:28 CST 2003 +Last modified: Wed Nov 12 16:25:26 CST 2003 From lattner at cs.uiuc.edu Wed Nov 12 16:47:19 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 16:47:19 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PageManager.cpp Message-ID: <200311122246.QAA23608@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PageManager.cpp updated: 1.3 -> 1.4 --- Log message: Updates for proper namespacification --- Diffs of the changes: (+2 -2) Index: poolalloc/runtime/FreeListAllocator/PageManager.cpp diff -u poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.3 poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.4 --- poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.3 Tue Nov 11 14:13:42 2003 +++ poolalloc/runtime/FreeListAllocator/PageManager.cpp Wed Nov 12 16:46:26 2003 @@ -29,7 +29,7 @@ // Explicitly use the malloc allocator here, to avoid depending on the C++ // runtime library. -typedef std::vector > FreePagesListType; +typedef std::vector > FreePagesListType; static FreePagesListType *FreePages = 0; // @@ -100,7 +100,7 @@ // Avoid using operator new! FreePages = (FreePagesListType*)malloc(sizeof(FreePagesListType)); // Use placement new now. - new (FreePages) std::vector >(); + new (FreePages) std::vector >(); } for (unsigned i = 1; i != NumToAllocate; ++i) FreePages->push_back(Ptr+i*PageSize); From brukman at cs.uiuc.edu Wed Nov 12 16:50:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 16:50:00 2003 Subject: [llvm-commits] CVS: llvm-www/status/patches/ Message-ID: <200311122249.QAA28521@zion.cs.uiuc.edu> Changes in directory llvm-www/status/patches: --- Log message: Directory /home/vadve/shared/InternalCVS/llvm-www/status/patches added to the repository --- Diffs of the changes: (+0 -0) From gaeke at cs.uiuc.edu Wed Nov 12 16:50:10 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Nov 12 16:50:10 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311122249.QAA23732@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.41 -> 1.42 --- Log message: Add another fixed bug. --- Diffs of the changes: (+2 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.41 llvm/docs/ReleaseNotes.html:1.42 --- llvm/docs/ReleaseNotes.html:1.41 Tue Nov 11 22:42:37 2003 +++ llvm/docs/ReleaseNotes.html Wed Nov 12 16:48:52 2003 @@ -132,6 +132,7 @@

    • [c++] C++ Frontend lays out superclasses like anonymous bitfields!
    • AsmParser Misses Symbol Redefinition Error
    • gccld -Lfoo -lfoo fails to find ./foo/libfoo.a
    • +
    • Casting a string constant to void crashes llvm-gcc
    • At this time, LLVM is known to work properly with SPEC CPU 2000, the Olden @@ -438,6 +439,6 @@ Maintained By: The LLVM Team
      -Last modified: Tue Nov 11 22:41:53 CST 2003 +Last modified: Wed Nov 12 16:48:33 CST 2003 From brukman at cs.uiuc.edu Wed Nov 12 16:52:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 16:52:01 2003 Subject: [llvm-commits] CVS: llvm-www/status/index.html Message-ID: <200311122251.QAA05757@zion.cs.uiuc.edu> Changes in directory llvm-www/status: index.html updated: 1.8 -> 1.9 --- Log message: * Crafty works with LLVM!! It even works playing in XBoard!! * Fix links to properly refer to patches --- Diffs of the changes: (+21 -9) Index: llvm-www/status/index.html diff -u llvm-www/status/index.html:1.8 llvm-www/status/index.html:1.9 --- llvm-www/status/index.html:1.8 Sun Nov 2 21:40:42 2003 +++ llvm-www/status/index.html Wed Nov 12 16:51:33 2003 @@ -21,6 +21,17 @@

    + + + + + + + + @@ -127,9 +138,9 @@ - + @@ -189,8 +200,8 @@ - + @@ -291,13 +302,14 @@ - + - + From brukman at cs.uiuc.edu Wed Nov 12 16:52:10 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 16:52:10 2003 Subject: [llvm-commits] CVS: llvm-www/status/patches/coreutils-5.0-llvm.patch crafty-19.3-llvm.patch screen-3.9.15-llvm.patch siod-llvm.patch Message-ID: <200311122251.QAA00886@zion.cs.uiuc.edu> Changes in directory llvm-www/status/patches: coreutils-5.0-llvm.patch added (r1.1) crafty-19.3-llvm.patch added (r1.1) screen-3.9.15-llvm.patch added (r1.1) siod-llvm.patch added (r1.1) --- Log message: We should actually make patches available if we're going to refer to them. --- Diffs of the changes: (+124 -0) Index: llvm-www/status/patches/coreutils-5.0-llvm.patch diff -c /dev/null llvm-www/status/patches/coreutils-5.0-llvm.patch:1.1 *** /dev/null Wed Nov 12 16:51:09 2003 --- llvm-www/status/patches/coreutils-5.0-llvm.patch Wed Nov 12 16:50:59 2003 *************** *** 0 **** --- 1,42 ---- + --- ../coreutils-5.0/config.h 2003-08-29 15:54:58.000000000 -0500 + +++ ./config.h 2003-08-29 13:14:29.000000000 -0500 + @@ -410,7 +410,7 @@ + #define HAVE_GETHOSTNAME 1 + + /* Define to 1 if you have the `gethrtime' function. */ + -#define HAVE_GETHRTIME 1 + +#undef HAVE_GETHRTIME + + /* Define to 1 if you have the `getloadavg' function. */ + #define HAVE_GETLOADAVG 1 + @@ -630,7 +630,7 @@ + #define HAVE_PSTAT_GETDYNAMIC 1 + + /* Define to 1 if you have the `pstat_getstatic' function. */ + -#define HAVE_PSTAT_GETSTATIC 1 + +#undef HAVE_PSTAT_GETSTATIC + + /* Define to 1 if you have the header file. */ + #define HAVE_PWD_H 1 + --- ../coreutils-5.0/lib/md5.h 2003-08-29 15:55:08.000000000 -0500 + +++ ./lib/md5.h 2003-08-29 13:05:18.000000000 -0500 + @@ -149,7 +149,7 @@ + + /* The following is from gnupg-1.0.2's cipher/bithelp.h. */ + /* Rotate a 32 bit integer by n bytes */ + -#if defined __GNUC__ && defined __i386__ + +#if defined __GNUC__ && defined __i386__ && !__llvm__ + static inline md5_uint32 + rol(md5_uint32 x, int n) + { + --- ../coreutils-5.0/src/shred.c 2003-08-29 15:55:08.000000000 -0500 + +++ ./src/shred.c 2003-08-29 13:07:42.000000000 -0500 + @@ -519,7 +519,7 @@ + #define ISAAC_SEED(s,x) isaac_seed_data (s, &(x), sizeof (x)) + + + -#if __GNUC__ >= 2 && (__i386__ || __alpha__) + +#if __GNUC__ >= 2 && (__i386__ || __alpha__) && !__llvm__ + /* + * Many processors have very-high-resolution timer registers, + * The timer registers can be made inaccessible, so we have to deal with the Index: llvm-www/status/patches/crafty-19.3-llvm.patch diff -c /dev/null llvm-www/status/patches/crafty-19.3-llvm.patch:1.1 *** /dev/null Wed Nov 12 16:51:09 2003 --- llvm-www/status/patches/crafty-19.3-llvm.patch Wed Nov 12 16:50:59 2003 *************** *** 0 **** --- 1,20 ---- + --- Makefile 2003-02-03 22:15:44.000000000 -0600 + +++ Makefile.new 2003-11-12 16:46:46.000000000 -0600 + @@ -180,6 +180,17 @@ + asm=X86-aout.o \ + crafty-make + + +linux-llvm: + + $(MAKE) target=LINUX \ + + CC=llvm-gcc CXX=llvm-g++ \ + + CFLAGS='$(CFLAGS) -Wall -pipe -D_REENTRANT -O3' \ + + CXFLAGS='$(CFLAGS) \ + + -fforce-mem -fomit-frame-pointer' \ + + LDFLAGS='$(LDFLAGS) -lpthread' \ + + opt='$(opt) -DCOMPACT_ATTACKS -DUSE_ATTACK_FUNCTIONS \ + + -DFAST' \ + + crafty-make + + + linux-elf: + $(MAKE) target=LINUX \ + CC=gcc CXX=g++ \ Index: llvm-www/status/patches/screen-3.9.15-llvm.patch diff -c /dev/null llvm-www/status/patches/screen-3.9.15-llvm.patch:1.1 *** /dev/null Wed Nov 12 16:51:09 2003 --- llvm-www/status/patches/screen-3.9.15-llvm.patch Wed Nov 12 16:50:59 2003 *************** *** 0 **** --- 1,34 ---- + --- ../screen-3.9.15/configure 2003-02-24 07:03:33.000000000 -0600 + +++ ./configure 2003-08-29 12:11:01.000000000 -0500 + @@ -2570,7 +2570,8 @@ + (exit $ac_status); }; }; then + { { echo "$as_me:$LINENO: error: Your compiler does not set the exit status - sorry" >&5 + echo "$as_me: error: Your compiler does not set the exit status - sorry" >&2;} + - { (exit 1); exit 1; }; } + + #{ (exit 1); exit 1; }; + + } + else + echo "$as_me: program exited with status $ac_status" >&5 + echo "$as_me: failed program was:" >&5 + --- ../screen-3.9.15/help.c 2003-03-12 08:20:56.000000000 -0600 + +++ ./help.c 2003-08-29 12:31:04.000000000 -0500 + @@ -37,7 +37,7 @@ + extern struct display *display, *displays; + extern char *noargs[]; + extern struct mchar mchar_blank, mchar_so; + -extern char *blank; + +extern unsigned char *blank; + extern struct win *wtab[]; + + static void PadStr __P((char *, int, int, int)); + --- ../screen-3.9.15/misc.c 2003-02-21 14:30:57.000000000 -0600 + +++ ./misc.c 2003-08-29 12:31:11.000000000 -0500 + @@ -42,7 +42,7 @@ + extern int eff_gid, real_gid; + extern struct mline mline_old; + extern struct mchar mchar_blank; + -extern char *null, *blank; + +extern unsigned char *null, *blank; + + char * + SaveStr(str) Index: llvm-www/status/patches/siod-llvm.patch diff -c /dev/null llvm-www/status/patches/siod-llvm.patch:1.1 *** /dev/null Wed Nov 12 16:51:09 2003 --- llvm-www/status/patches/siod-llvm.patch Wed Nov 12 16:50:59 2003 *************** *** 0 **** --- 1,28 ---- + diff -aru siod/makefile siod_llvm/makefile + --- siod/makefile Tue Mar 14 09:26:55 2000 + +++ siod_llvm/makefile Wed Oct 1 15:45:46 2003 + @@ -236,6 +236,15 @@ + SO="so" \ + build_driver + + +linux_llvm: + + $(MAKE) $(LDLP) \ + + PROGS="siod" \ + + CC="llvm-gcc" \ + + LD="llvm-link" \ + + CFLAGS="$(GCCW) $(CDEBUG) -D__USE_MISC -D__USE_GNU -D__USE_SVID -D__USE_XOPEN_EXTENDED -D__USE_XOPEN $(SLD)" \ + + SO="bc" \ + + build_driver + + + # adapt by Philippe Laliberte for MkLinux on ppc + # I used -fsigned-char becaused their are unexplicited char + # and we're using unsigned as a default. + @@ -487,7 +496,7 @@ + clean: + -rm *.o *.so *.sl *~ $(MANPAGES:.man=.txt) so_locations \ + siod sample siod.tar siod.tgz siod.zip selfdoc.txt \ + - $(CMDFILES) + + $(CMDFILES) *.bc + + # make manpage txt files for distribution to people who do not have + # nroff. From brukman at cs.uiuc.edu Wed Nov 12 16:56:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 16:56:02 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311122255.QAA10608@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.42 -> 1.43 --- Log message: You cannot debug namespacified LLVM with GDB 5.x anymore. --- Diffs of the changes: (+2 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.42 llvm/docs/ReleaseNotes.html:1.43 --- llvm/docs/ReleaseNotes.html:1.42 Wed Nov 12 16:48:52 2003 +++ llvm/docs/ReleaseNotes.html Wed Nov 12 16:55:13 2003 @@ -74,7 +74,8 @@
  31. LLVM has been moved into an 'llvm' C++ namespace, for easier integration with third-party -code.
  32. +code. Note that due to a bug in GDB 5.x, to debug namespacified LLVM code, +you will need to upgrade to GDB 6.

    From lattner at cs.uiuc.edu Wed Nov 12 17:02:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 17:02:01 2003 Subject: [llvm-commits] CVS: poolalloc/include/poolalloc/PoolAllocate.h Message-ID: <200311122301.RAA13094@zion.cs.uiuc.edu> Changes in directory poolalloc/include/poolalloc: PoolAllocate.h updated: 1.18 -> 1.19 --- Log message: Good bye dead code --- Diffs of the changes: (+0 -14) Index: poolalloc/include/poolalloc/PoolAllocate.h diff -u poolalloc/include/poolalloc/PoolAllocate.h:1.18 poolalloc/include/poolalloc/PoolAllocate.h:1.19 --- poolalloc/include/poolalloc/PoolAllocate.h:1.18 Wed Nov 12 14:59:57 2003 +++ poolalloc/include/poolalloc/PoolAllocate.h Wed Nov 12 17:00:58 2003 @@ -49,14 +49,6 @@ /// std::vector ArgNodes; -#if 0 - /// In order to handle indirect functions, the start and end of the - /// arguments that are useful to this function. - /// The pool arguments useful to this function are PoolArgFirst to - /// PoolArgLast not inclusive. - int PoolArgFirst, PoolArgLast; -#endif - /// PoolDescriptors - The Value* (either an argument or an alloca) which /// defines the pool descriptor for this DSNode. Pools are mapped one to /// one with nodes in the DSGraph, so this contains a pointer to the node it @@ -129,12 +121,6 @@ static const Type *PoolDescPtrTy; const PA::EquivClassInfo &getECIForIndirectCallSite(CallSite CS); - -#if 0 - /// Map from an Indirect call site to the set of Functions that it can point - /// to. - std::multimap CallSiteTargets; -#endif /// GlobalNodes - For each node (with an H marker) in the globals graph, this /// map contains the global variable that holds the pool descriptor for the From lattner at cs.uiuc.edu Wed Nov 12 17:12:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 17:12:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp DataStructure.cpp DataStructureAA.cpp DataStructureOpt.cpp DataStructureStats.cpp GraphChecker.cpp Local.cpp Printer.cpp Steensgaard.cpp TopDownClosure.cpp Message-ID: <200311122311.RAA18943@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.68 -> 1.69 DataStructure.cpp updated: 1.130 -> 1.131 DataStructureAA.cpp updated: 1.12 -> 1.13 DataStructureOpt.cpp updated: 1.4 -> 1.5 DataStructureStats.cpp updated: 1.9 -> 1.10 GraphChecker.cpp updated: 1.9 -> 1.10 Local.cpp updated: 1.70 -> 1.71 Printer.cpp updated: 1.60 -> 1.61 Steensgaard.cpp updated: 1.34 -> 1.35 TopDownClosure.cpp updated: 1.59 -> 1.60 --- Log message: Fine-grainify namespaces for this library --- Diffs of the changes: (+14 -36) Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.68 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.69 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.68 Tue Nov 11 16:41:31 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Wed Nov 12 17:11:14 2003 @@ -19,8 +19,7 @@ #include "Support/Statistic.h" #include "Support/Debug.h" #include "DSCallSiteIterator.h" - -namespace llvm { +using namespace llvm; namespace { Statistic<> MaxSCC("budatastructure", "Maximum SCC Size in Call Graph"); @@ -317,5 +316,3 @@ //Graph.writeGraphToFile(std::cerr, "bu_" + F.getName()); } - -} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.130 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.131 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.130 Wed Nov 12 11:58:22 2003 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Nov 12 17:11:14 2003 @@ -22,8 +22,7 @@ #include "Support/Statistic.h" #include "Support/Timer.h" #include - -namespace llvm { +using namespace llvm; namespace { Statistic<> NumFolds ("dsnode", "Number of nodes completely folded"); @@ -1672,5 +1671,3 @@ if (unsigned(N2Idx)+i < N2Size) computeNodeMapping(N1->getLink(i), N2->getLink(N2Idx+i), NodeMap); } - -} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.12 llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.13 --- llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.12 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Wed Nov 12 17:11:14 2003 @@ -16,8 +16,7 @@ #include "llvm/Analysis/DSGraph.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Module.h" - -namespace llvm { +using namespace llvm; namespace { class DSAA : public Pass, public AliasAnalysis { @@ -179,4 +178,3 @@ return getAnalysis().getMustAliases(P, RetVals); } -} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.4 llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.5 --- llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp:1.4 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureOpt.cpp Wed Nov 12 17:11:14 2003 @@ -17,8 +17,7 @@ #include "llvm/Module.h" #include "llvm/Constant.h" #include "Support/Statistic.h" - -namespace llvm { +using namespace llvm; namespace { Statistic<> @@ -97,5 +96,3 @@ } return Changed; } - -} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/DataStructureStats.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.9 llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.10 --- llvm/lib/Analysis/DataStructure/DataStructureStats.cpp:1.9 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/DataStructureStats.cpp Wed Nov 12 17:11:14 2003 @@ -18,8 +18,7 @@ #include "llvm/Support/InstVisitor.h" #include "Support/Statistic.h" #include - -namespace llvm { +using namespace llvm; namespace { Statistic<> TotalNumCallees("totalcallees", @@ -141,5 +140,3 @@ visit(F); return true; } - -} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/GraphChecker.cpp diff -u llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.9 llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.10 --- llvm/lib/Analysis/DataStructure/GraphChecker.cpp:1.9 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/GraphChecker.cpp Wed Nov 12 17:11:14 2003 @@ -29,7 +29,7 @@ #include "llvm/Value.h" #include -namespace llvm { +using namespace llvm; namespace { enum DSPass { local, bu, td }; @@ -195,5 +195,3 @@ } } } - -} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.70 llvm/lib/Analysis/DataStructure/Local.cpp:1.71 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.70 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Wed Nov 12 17:11:14 2003 @@ -28,11 +28,12 @@ // #include "llvm/Module.h" -namespace llvm { +using namespace llvm; static RegisterAnalysis X("datastructure", "Local Data Structure Analysis"); +namespace llvm { namespace DS { // isPointerType - Return true if this type is big enough to hold a pointer. bool isPointerType(const Type *Ty) { @@ -42,7 +43,7 @@ return Ty->getPrimitiveSize() >= PointerSize; return false; } -} +}} using namespace DS; @@ -622,4 +623,3 @@ GlobalsGraph = 0; } -} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.60 llvm/lib/Analysis/DataStructure/Printer.cpp:1.61 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.60 Tue Nov 11 22:58:19 2003 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Wed Nov 12 17:11:14 2003 @@ -22,8 +22,7 @@ #include "Support/Statistic.h" #include #include - -namespace llvm { +using namespace llvm; // OnlyPrintMain - The DataStructure printer exposes this option to allow // printing of only the graph for "main". @@ -73,6 +72,7 @@ return OS.str(); } +namespace llvm { template<> struct DOTGraphTraits : public DefaultDOTGraphTraits { static std::string getGraphName(const DSGraph *G) { @@ -179,6 +179,7 @@ } } }; +} // end namespace llvm void DSNode::print(std::ostream &O, const DSGraph *G) const { GraphWriter W(O, G); @@ -282,4 +283,3 @@ printCollection(*this, O, M, "td."); } -} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/Steensgaard.cpp diff -u llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.34 llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.35 --- llvm/lib/Analysis/DataStructure/Steensgaard.cpp:1.34 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/Steensgaard.cpp Wed Nov 12 17:11:14 2003 @@ -19,8 +19,7 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Module.h" #include "Support/Debug.h" - -namespace llvm { +using namespace llvm; namespace { class Steens : public Pass, public AliasAnalysis { @@ -236,5 +235,3 @@ // return getAnalysis().alias(V1, V1Size, V2, V2Size); } - -} // End llvm namespace Index: llvm/lib/Analysis/DataStructure/TopDownClosure.cpp diff -u llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.59 llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.60 --- llvm/lib/Analysis/DataStructure/TopDownClosure.cpp:1.59 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/TopDownClosure.cpp Wed Nov 12 17:11:14 2003 @@ -20,8 +20,7 @@ #include "llvm/Analysis/DSGraph.h" #include "Support/Debug.h" #include "Support/Statistic.h" - -namespace llvm { +using namespace llvm; namespace { RegisterAnalysis // Register the pass @@ -311,5 +310,3 @@ << Graph.getFunctionNames() << " [" << Graph.getGraphSize() << "+" << Graph.getFunctionCalls().size() << "]\n"); } - -} // End llvm namespace From brukman at cs.uiuc.edu Wed Nov 12 17:22:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 17:22:01 2003 Subject: [llvm-commits] CVS: llvm-www/status/index.html Message-ID: <200311122321.RAA23888@zion.cs.uiuc.edu> Changes in directory llvm-www/status: index.html updated: 1.9 -> 1.10 --- Log message: GNU Chess still doesn't work, ED fails for a different reason (we've had this before...) --- Diffs of the changes: (+30 -25) Index: llvm-www/status/index.html diff -u llvm-www/status/index.html:1.9 llvm-www/status/index.html:1.10 --- llvm-www/status/index.html:1.9 Wed Nov 12 16:51:33 2003 +++ llvm-www/status/index.html Wed Nov 12 17:20:54 2003 @@ -21,6 +21,36 @@

    + + + + + + + + + + + + + + + + @@ -150,21 +180,6 @@ - - - - - - - - @@ -260,16 +275,6 @@ - - - - - - - - From brukman at cs.uiuc.edu Wed Nov 12 18:06:08 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 18:06:08 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/Makefile Message-ID: <200311130005.SAA01656@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: Makefile updated: 1.36 -> 1.37 --- Log message: Force a dependency on the .inc file, which must be generated! --- Diffs of the changes: (+3 -0) Index: llvm/lib/Target/Sparc/Makefile diff -u llvm/lib/Target/Sparc/Makefile:1.36 llvm/lib/Target/Sparc/Makefile:1.37 --- llvm/lib/Target/Sparc/Makefile:1.36 Fri Nov 7 11:26:27 2003 +++ llvm/lib/Target/Sparc/Makefile Wed Nov 12 18:05:09 2003 @@ -45,6 +45,9 @@ TABLEGEN_FILES := $(notdir $(wildcard $(SourceDir)/*.td)) +# Make sure that tblgen is run, first thing. +$(SourceDepend): $(TARGET_NAME)CodeEmitter.inc + $(TARGET_NAME)CodeEmitter.cpp:: $(TARGET_NAME)CodeEmitter.inc $(TARGET_NAME)CodeEmitter.inc:: $(SourceDir)/$(TARGET_NAME).td $(TABLEGEN_FILES) $(TBLGEN) From brukman at cs.uiuc.edu Wed Nov 12 18:17:05 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 18:17:05 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/Sparc.cpp Message-ID: <200311130016.SAA01815@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: Sparc.cpp updated: 1.90 -> 1.91 --- Log message: * Put command-line switches in their own namespace * Pass creation functions are no longer in the UltraSparc class --- Diffs of the changes: (+16 -17) Index: llvm/lib/Target/Sparc/Sparc.cpp diff -u llvm/lib/Target/Sparc/Sparc.cpp:1.90 llvm/lib/Target/Sparc/Sparc.cpp:1.91 --- llvm/lib/Target/Sparc/Sparc.cpp:1.90 Tue Nov 11 16:41:33 2003 +++ llvm/lib/Target/Sparc/Sparc.cpp Wed Nov 12 18:16:28 2003 @@ -44,21 +44,23 @@ // Command line options to control choice of code generation passes. //--------------------------------------------------------------------------- -static cl::opt DisableSched("disable-sched", - cl::desc("Disable local scheduling pass")); +namespace { + cl::opt DisableSched("disable-sched", + cl::desc("Disable local scheduling pass")); -static cl::opt DisablePeephole("disable-peephole", + cl::opt DisablePeephole("disable-peephole", cl::desc("Disable peephole optimization pass")); -static cl::opt EmitMappingInfo("enable-maps", - cl::desc("Emit LLVM-to-MachineCode mapping info to assembly")); + cl::opt EmitMappingInfo("enable-maps", + cl::desc("Emit LLVM-to-MachineCode mapping info to assembly")); -static cl::opt DisableStrip("disable-strip", - cl::desc("Do not strip the LLVM bytecode included in executable")); + cl::opt DisableStrip("disable-strip", + cl::desc("Do not strip the LLVM bytecode in executable")); -static cl::opt DumpInput("dump-input", - cl::desc("Print bytecode before native code generation"), - cl::Hidden); + cl::opt DumpInput("dump-input", + cl::desc("Print bytecode before code generation"), + cl::Hidden); +} //---------------------------------------------------------------------------- // allocateSparcTargetMachine - Allocate and return a subclass of TargetMachine @@ -196,7 +198,7 @@ PM.add(getRegisterAllocator(*this)); - PM.add(getPrologEpilogInsertionPass()); + PM.add(createPrologEpilogInsertionPass()); if (!DisablePeephole) PM.add(createPeepholeOptsPass(*this)); @@ -210,15 +212,12 @@ // allowing machine code representations for functions to be free'd after the // function has been emitted. // - PM.add(getFunctionAsmPrinterPass(Out)); + PM.add(createAsmPrinterPass(Out, *this)); PM.add(createMachineCodeDestructionPass()); // Free stuff no longer needed - // Emit Module level assembly after all of the functions have been processed. - PM.add(getModuleAsmPrinterPass(Out)); - // Emit bytecode to the assembly file into its special section next if (EmitMappingInfo) - PM.add(getBytecodeAsmPrinterPass(Out)); + PM.add(createBytecodeAsmPrinterPass(Out)); return false; } @@ -262,7 +261,7 @@ PM.add(createInstructionSelectionPass(*this)); PM.add(getRegisterAllocator(*this)); - PM.add(getPrologEpilogInsertionPass()); + PM.add(createPrologEpilogInsertionPass()); if (!DisablePeephole) PM.add(createPeepholeOptsPass(*this)); From brukman at cs.uiuc.edu Wed Nov 12 18:18:06 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 18:18:06 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcInternals.h Message-ID: <200311130017.SAA01842@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcInternals.h updated: 1.107 -> 1.108 --- Log message: The functions to create new instances of passes are no longer methods in the UltraSparc class. Comments are also doxygen-compatible now. --- Diffs of the changes: (+16 -15) Index: llvm/lib/Target/Sparc/SparcInternals.h diff -u llvm/lib/Target/Sparc/SparcInternals.h:1.107 llvm/lib/Target/Sparc/SparcInternals.h:1.108 --- llvm/lib/Target/Sparc/SparcInternals.h:1.107 Tue Nov 11 16:41:33 2003 +++ llvm/lib/Target/Sparc/SparcInternals.h Wed Nov 12 18:17:20 2003 @@ -641,15 +641,28 @@ /// createStackSlotsPass - External interface to stack-slots pass that enters 2 /// empty slots at the top of each function stack +/// Pass *createStackSlotsPass(const TargetMachine &TM); -// Interface to pre-selection pass that specializes LLVM code for a target -// machine. +/// Specializes LLVM code for a target machine. +/// FunctionPass *createPreSelectionPass(const TargetMachine &TM); -// External interface to peephole optimization pass operating on machine code. +/// Peephole optimization pass operating on machine code +/// FunctionPass *createPeepholeOptsPass(const TargetMachine &TM); +/// Writes out assembly code for the module, one function at a time +/// +FunctionPass *createAsmPrinterPass(std::ostream &Out, const TargetMachine &TM); + +/// getPrologEpilogInsertionPass - Inserts prolog/epilog code. +/// +FunctionPass* createPrologEpilogInsertionPass(); + +/// getBytecodeAsmPrinterPass - Emits final LLVM bytecode to assembly file. +/// +Pass* createBytecodeAsmPrinterPass(std::ostream &Out); //--------------------------------------------------------------------------- // class UltraSparc @@ -681,18 +694,6 @@ virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM, MachineCodeEmitter &MCE); virtual void replaceMachineCodeForFunction(void *Old, void *New); - - // getPrologEpilogInsertionPass - Inserts prolog/epilog code. - FunctionPass* getPrologEpilogInsertionPass(); - - // getFunctionAsmPrinterPass - Writes out machine code for a single function - Pass* getFunctionAsmPrinterPass(std::ostream &Out); - - // getModuleAsmPrinterPass - Writes generated machine code to assembly file. - Pass* getModuleAsmPrinterPass(std::ostream &Out); - - // getBytecodeAsmPrinterPass - Emits final LLVM bytecode to assembly file. - Pass* getBytecodeAsmPrinterPass(std::ostream &Out); }; } // End llvm namespace From brukman at cs.uiuc.edu Wed Nov 12 18:19:06 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 18:19:06 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp Message-ID: <200311130018.SAA01864@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: PrologEpilogCodeInserter.cpp updated: 1.31 -> 1.32 --- Log message: The function to create an instance of this pass is no longer a method of the UltraSparc class. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp diff -u llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp:1.31 llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp:1.32 --- llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp:1.31 Tue Nov 11 16:41:33 2003 +++ llvm/lib/Target/Sparc/PrologEpilogCodeInserter.cpp Wed Nov 12 18:18:04 2003 @@ -176,7 +176,7 @@ } } -FunctionPass *UltraSparc::getPrologEpilogInsertionPass() { +FunctionPass *createPrologEpilogInsertionPass() { return new InsertPrologEpilogCode(); } From brukman at cs.uiuc.edu Wed Nov 12 18:20:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 18:20:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp Message-ID: <200311130019.SAA01903@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: EmitBytecodeToAssembly.cpp updated: 1.11 -> 1.12 --- Log message: The function to create an instance of this pass is no longer a method of the UltraSparc class. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp diff -u llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp:1.11 llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp:1.12 --- llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp:1.11 Tue Nov 11 16:41:33 2003 +++ llvm/lib/Target/Sparc/EmitBytecodeToAssembly.cpp Wed Nov 12 18:19:02 2003 @@ -112,7 +112,7 @@ }; } // end anonymous namespace -Pass *UltraSparc::getBytecodeAsmPrinterPass(std::ostream &Out) { +Pass *createBytecodeAsmPrinterPass(std::ostream &Out) { return new SparcBytecodeWriter(Out); } From brukman at cs.uiuc.edu Wed Nov 12 18:23:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 18:23:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/EmitAssembly.cpp Message-ID: <200311130022.SAA01947@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: EmitAssembly.cpp updated: 1.95 -> 1.96 --- Log message: Substantially re-organized this file: * There is now only one pass to print out assembly instead of two * It is a FunctionPass * The Module-level printing of globals is now in doFinalization() method of the FunctionPass * The code has been reformatted to follow LLVM coding standards * Some comments, not all, were doxygenified * Last but not least, the function to create an instance of this pass is also no longer a method in the UltraSparc class. --- Diffs of the changes: (+565 -611) Index: llvm/lib/Target/Sparc/EmitAssembly.cpp diff -u llvm/lib/Target/Sparc/EmitAssembly.cpp:1.95 llvm/lib/Target/Sparc/EmitAssembly.cpp:1.96 --- llvm/lib/Target/Sparc/EmitAssembly.cpp:1.95 Tue Nov 11 16:41:33 2003 +++ llvm/lib/Target/Sparc/EmitAssembly.cpp Wed Nov 12 18:22:19 2003 @@ -33,91 +33,88 @@ #include "SparcInternals.h" #include +using namespace llvm; + namespace llvm { namespace { -Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); + Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed"); -class GlobalIdTable: public Annotation { - static AnnotationID AnnotId; - friend class AsmPrinter; // give access to AnnotId - - typedef hash_map ValIdMap; - typedef ValIdMap::const_iterator ValIdMapConstIterator; - typedef ValIdMap:: iterator ValIdMapIterator; -public: - SlotCalculator Table; // map anonymous values to unique integer IDs - ValIdMap valToIdMap; // used for values not handled by SlotCalculator - - GlobalIdTable(Module* M) : Annotation(AnnotId), Table(M, true) {} -}; + class GlobalIdTable: public Annotation { + static AnnotationID AnnotId; + friend class AsmPrinter; // give access to AnnotId + + typedef hash_map ValIdMap; + typedef ValIdMap::const_iterator ValIdMapConstIterator; + typedef ValIdMap:: iterator ValIdMapIterator; + public: + SlotCalculator Table; // map anonymous values to unique integer IDs + ValIdMap valToIdMap; // used for values not handled by SlotCalculator + + GlobalIdTable(Module* M) : Annotation(AnnotId), Table(M, true) {} + }; -AnnotationID GlobalIdTable::AnnotId = + AnnotationID GlobalIdTable::AnnotId = AnnotationManager::getID("ASM PRINTER GLOBAL TABLE ANNOT"); + + //===--------------------------------------------------------------------===// + // Utility functions -// Can we treat the specified array as a string? Only if it is an array of -// ubytes or non-negative sbytes. -// -static bool isStringCompatible(const ConstantArray *CVA) { - const Type *ETy = cast(CVA->getType())->getElementType(); - if (ETy == Type::UByteTy) return true; - if (ETy != Type::SByteTy) return false; - - for (unsigned i = 0; i < CVA->getNumOperands(); ++i) - if (cast(CVA->getOperand(i))->getValue() < 0) - return false; + /// Can we treat the specified array as a string? Only if it is an array of + /// ubytes or non-negative sbytes. + /// + bool isStringCompatible(const ConstantArray *CVA) { + const Type *ETy = cast(CVA->getType())->getElementType(); + if (ETy == Type::UByteTy) return true; + if (ETy != Type::SByteTy) return false; + + for (unsigned i = 0; i < CVA->getNumOperands(); ++i) + if (cast(CVA->getOperand(i))->getValue() < 0) + return false; + + return true; + } + + /// getAsCString - Return the specified array as a C compatible string, only + /// if the predicate isStringCompatible is true. + /// + std::string getAsCString(const ConstantArray *CVA) { + assert(isStringCompatible(CVA) && "Array is not string compatible!"); - return true; -} - -// toOctal - Convert the low order bits of X into an octal letter -static inline char toOctal(int X) { - return (X&7)+'0'; -} - -// getAsCString - Return the specified array as a C compatible string, only if -// the predicate isStringCompatible is true. -// -static std::string getAsCString(const ConstantArray *CVA) { - assert(isStringCompatible(CVA) && "Array is not string compatible!"); - - std::string Result; - const Type *ETy = cast(CVA->getType())->getElementType(); - Result = "\""; - for (unsigned i = 0; i < CVA->getNumOperands(); ++i) { - unsigned char C = cast(CVA->getOperand(i))->getRawValue(); - - if (C == '"') { - Result += "\\\""; - } else if (C == '\\') { - Result += "\\\\"; - } else if (isprint(C)) { - Result += C; - } else { - Result += '\\'; // print all other chars as octal value - Result += toOctal(C >> 6); - Result += toOctal(C >> 3); - Result += toOctal(C >> 0); + std::string Result; + const Type *ETy = cast(CVA->getType())->getElementType(); + Result = "\""; + for (unsigned i = 0; i < CVA->getNumOperands(); ++i) { + unsigned char C = cast(CVA->getOperand(i))->getRawValue(); + + if (C == '"') { + Result += "\\\""; + } else if (C == '\\') { + Result += "\\\\"; + } else if (isprint(C)) { + Result += C; + } else { + Result += '\\'; // print all other chars as octal value + // Convert C to octal representation + Result += ((C >> 6) & 7) + '0'; + Result += ((C >> 3) & 7) + '0'; + Result += ((C >> 0) & 7) + '0'; + } } - } - Result += "\""; + Result += "\""; - return Result; -} - -inline bool -ArrayTypeIsString(const ArrayType* arrayType) -{ - return (arrayType->getElementType() == Type::UByteTy || - arrayType->getElementType() == Type::SByteTy); -} + return Result; + } + inline bool ArrayTypeIsString(const ArrayType* arrayType) { + return (arrayType->getElementType() == Type::UByteTy || + arrayType->getElementType() == Type::SByteTy); + } -inline const std::string -TypeToDataDirective(const Type* type) -{ - switch(type->getPrimitiveID()) + inline const std::string + TypeToDataDirective(const Type* type) { + switch(type->getPrimitiveID()) { case Type::BoolTyID: case Type::UByteTyID: case Type::SByteTyID: return ".byte"; @@ -139,274 +136,169 @@ default: return ""; } -} - -// Get the size of the type -// -inline unsigned int -TypeToSize(const Type* type, const TargetMachine& target) -{ - return target.findOptimalStorageSize(type); -} + } -// Get the size of the constant for the given target. -// If this is an unsized array, return 0. -// -inline unsigned int -ConstantToSize(const Constant* CV, const TargetMachine& target) -{ - if (const ConstantArray* CVA = dyn_cast(CV)) - { + /// Get the size of the constant for the given target. + /// If this is an unsized array, return 0. + /// + inline unsigned int + ConstantToSize(const Constant* CV, const TargetMachine& target) { + if (const ConstantArray* CVA = dyn_cast(CV)) { const ArrayType *aty = cast(CVA->getType()); if (ArrayTypeIsString(aty)) return 1 + CVA->getNumOperands(); } - return TypeToSize(CV->getType(), target); -} + return target.findOptimalStorageSize(CV->getType()); + } -// Align data larger than one L1 cache line on L1 cache line boundaries. -// Align all smaller data on the next higher 2^x boundary (4, 8, ...). -// -inline unsigned int -SizeToAlignment(unsigned int size, const TargetMachine& target) -{ - unsigned short cacheLineSize = target.getCacheInfo().getCacheLineSize(1); - if (size > (unsigned) cacheLineSize / 2) - return cacheLineSize; - else - for (unsigned sz=1; /*no condition*/; sz *= 2) - if (sz >= size) - return sz; -} + /// Align data larger than one L1 cache line on L1 cache line boundaries. + /// Align all smaller data on the next higher 2^x boundary (4, 8, ...). + /// + inline unsigned int + SizeToAlignment(unsigned int size, const TargetMachine& target) { + unsigned short cacheLineSize = target.getCacheInfo().getCacheLineSize(1); + if (size > (unsigned) cacheLineSize / 2) + return cacheLineSize; + else + for (unsigned sz=1; /*no condition*/; sz *= 2) + if (sz >= size) + return sz; + } -// Get the size of the type and then use SizeToAlignment. -// -inline unsigned int -TypeToAlignment(const Type* type, const TargetMachine& target) -{ - return SizeToAlignment(TypeToSize(type, target), target); -} + /// Get the size of the type and then use SizeToAlignment. + /// + inline unsigned int + TypeToAlignment(const Type* type, const TargetMachine& target) { + return SizeToAlignment(target.findOptimalStorageSize(type), target); + } -// Get the size of the constant and then use SizeToAlignment. -// Handles strings as a special case; -inline unsigned int -ConstantToAlignment(const Constant* CV, const TargetMachine& target) -{ - if (const ConstantArray* CVA = dyn_cast(CV)) - if (ArrayTypeIsString(cast(CVA->getType()))) - return SizeToAlignment(1 + CVA->getNumOperands(), target); - - return TypeToAlignment(CV->getType(), target); -} + /// Get the size of the constant and then use SizeToAlignment. + /// Handles strings as a special case; + inline unsigned int + ConstantToAlignment(const Constant* CV, const TargetMachine& target) { + if (const ConstantArray* CVA = dyn_cast(CV)) + if (ArrayTypeIsString(cast(CVA->getType()))) + return SizeToAlignment(1 + CVA->getNumOperands(), target); -//===---------------------------------------------------------------------===// -// Code Shared By the two printer passes, as a mixin -//===---------------------------------------------------------------------===// - -class AsmPrinter { - GlobalIdTable* idTable; -public: - std::ostream &toAsm; - const TargetMachine &Target; - - enum Sections { - Unknown, - Text, - ReadOnlyData, - InitRWData, - ZeroInitRWData, - } CurSection; - - AsmPrinter(std::ostream &os, const TargetMachine &T) - : idTable(0), toAsm(os), Target(T), CurSection(Unknown) {} - - // (start|end)(Module|Function) - Callback methods to be invoked by subclasses - void startModule(Module &M) { - // Create the global id table if it does not already exist - idTable = (GlobalIdTable*)M.getAnnotation(GlobalIdTable::AnnotId); - if (idTable == NULL) { - idTable = new GlobalIdTable(&M); - M.addAnnotation(idTable); - } + return TypeToAlignment(CV->getType(), target); } - void - PrintZeroBytesToPad(int numBytes) - { - for ( ; numBytes >= 8; numBytes -= 8) - printSingleConstantValue(Constant::getNullValue(Type::ULongTy)); +} // End anonymous namespace - if (numBytes >= 4) - { - printSingleConstantValue(Constant::getNullValue(Type::UIntTy)); - numBytes -= 4; - } +} // End namespace llvm - while (numBytes--) - printSingleConstantValue(Constant::getNullValue(Type::UByteTy)); - } - // Print a single constant value. - void printSingleConstantValue(const Constant* CV) - { - assert(CV->getType() != Type::VoidTy && - CV->getType() != Type::TypeTy && - CV->getType() != Type::LabelTy && - "Unexpected type for Constant"); - - assert((!isa(CV) && ! isa(CV)) - && "Aggregate types should be handled outside this function"); - - toAsm << "\t" << TypeToDataDirective(CV->getType()) << "\t"; - - if (const ConstantPointerRef* CPR = dyn_cast(CV)) - { // This is a constant address for a global variable or method. - // Use the name of the variable or method as the address value. - assert(isa(CPR->getValue()) && "Unexpected non-global"); - toAsm << getID(CPR->getValue()) << "\n"; - } - else if (isa(CV)) - { // Null pointer value - toAsm << "0\n"; - } - else if (const ConstantExpr* CE = dyn_cast(CV)) - { // Constant expression built from operators, constants, and symbolic addrs - toAsm << ConstantExprToString(CE, Target) << "\n"; - } - else if (CV->getType()->isPrimitiveType()) // Check primitive types last - { - if (CV->getType()->isFloatingPoint()) { - // FP Constants are printed as integer constants to avoid losing - // precision... - double Val = cast(CV)->getValue(); - if (CV->getType() == Type::FloatTy) { - float FVal = (float)Val; - char *ProxyPtr = (char*)&FVal; // Abide by C TBAA rules - toAsm << *(unsigned int*)ProxyPtr; - } else if (CV->getType() == Type::DoubleTy) { - char *ProxyPtr = (char*)&Val; // Abide by C TBAA rules - toAsm << *(uint64_t*)ProxyPtr; - } else { - assert(0 && "Unknown floating point type!"); - } - - toAsm << "\t! " << CV->getType()->getDescription() - << " value: " << Val << "\n"; - } else { - WriteAsOperand(toAsm, CV, false, false) << "\n"; - } - } - else - { - assert(0 && "Unknown elementary type for constant"); - } - } - // Print a constant value or values (it may be an aggregate). - // Uses printSingleConstantValue() to print each individual value. - void - printConstantValueOnly(const Constant* CV, - int numPadBytesAfter = 0) - { - const ConstantArray *CVA = dyn_cast(CV); - - if (CVA && isStringCompatible(CVA)) - { // print the string alone and return - toAsm << "\t" << ".ascii" << "\t" << getAsCString(CVA) << "\n"; - } - else if (CVA) - { // Not a string. Print the values in successive locations - const std::vector &constValues = CVA->getValues(); - for (unsigned i=0; i < constValues.size(); i++) - printConstantValueOnly(cast(constValues[i].get())); - } - else if (const ConstantStruct *CVS = dyn_cast(CV)) - { // Print the fields in successive locations. Pad to align if needed! - const StructLayout *cvsLayout = - Target.getTargetData().getStructLayout(CVS->getType()); - const std::vector& constValues = CVS->getValues(); - unsigned sizeSoFar = 0; - for (unsigned i=0, N = constValues.size(); i < N; i++) - { - const Constant* field = cast(constValues[i].get()); +//===---------------------------------------------------------------------===// +// Code abstracted away from the AsmPrinter +//===---------------------------------------------------------------------===// - // Check if padding is needed and insert one or more 0s. - unsigned fieldSize = - Target.getTargetData().getTypeSize(field->getType()); - int padSize = ((i == N-1? cvsLayout->StructSize - : cvsLayout->MemberOffsets[i+1]) - - cvsLayout->MemberOffsets[i]) - fieldSize; - sizeSoFar += (fieldSize + padSize); +namespace llvm { - // Now print the actual field value - printConstantValueOnly(field, padSize); +namespace { + + class AsmPrinter { + GlobalIdTable* idTable; + public: + std::ostream &toAsm; + const TargetMachine &Target; + + enum Sections { + Unknown, + Text, + ReadOnlyData, + InitRWData, + ZeroInitRWData, + } CurSection; + + AsmPrinter(std::ostream &os, const TargetMachine &T) + : idTable(0), toAsm(os), Target(T), CurSection(Unknown) {} + + // (start|end)(Module|Function) - Callback methods invoked by subclasses + void startModule(Module &M) { + // Create the global id table if it does not already exist + idTable = (GlobalIdTable*)M.getAnnotation(GlobalIdTable::AnnotId); + if (idTable == NULL) { + idTable = new GlobalIdTable(&M); + M.addAnnotation(idTable); } - assert(sizeSoFar == cvsLayout->StructSize && - "Layout of constant struct may be incorrect!"); } - else - printSingleConstantValue(CV); - if (numPadBytesAfter) - PrintZeroBytesToPad(numPadBytesAfter); - } + void PrintZeroBytesToPad(int numBytes) { + for (/* no init */; numBytes >= 8; numBytes -= 8) + printSingleConstantValue(Constant::getNullValue(Type::ULongTy)); + + if (numBytes >= 4) { + printSingleConstantValue(Constant::getNullValue(Type::UIntTy)); + numBytes -= 4; + } - // Print a constant (which may be an aggregate) prefixed by all the - // appropriate directives. Uses printConstantValueOnly() to print the - // value or values. - void printConstant(const Constant* CV, std::string valID = "") - { - if (valID.length() == 0) - valID = getID(CV); - - toAsm << "\t.align\t" << ConstantToAlignment(CV, Target) << "\n"; - - // Print .size and .type only if it is not a string. - const ConstantArray *CVA = dyn_cast(CV); - if (CVA && isStringCompatible(CVA)) - { // print it as a string and return - toAsm << valID << ":\n"; - toAsm << "\t" << ".ascii" << "\t" << getAsCString(CVA) << "\n"; - return; + while (numBytes--) + printSingleConstantValue(Constant::getNullValue(Type::UByteTy)); } + + /// Print a single constant value. + /// + void printSingleConstantValue(const Constant* CV); + + /// Print a constant value or values (it may be an aggregate). + /// Uses printSingleConstantValue() to print each individual value. + /// + void printConstantValueOnly(const Constant* CV, int numPadBytesAfter = 0); + + // Print a constant (which may be an aggregate) prefixed by all the + // appropriate directives. Uses printConstantValueOnly() to print the + // value or values. + void printConstant(const Constant* CV, std::string valID = "") { + if (valID.length() == 0) + valID = getID(CV); + + toAsm << "\t.align\t" << ConstantToAlignment(CV, Target) << "\n"; + + // Print .size and .type only if it is not a string. + const ConstantArray *CVA = dyn_cast(CV); + if (CVA && isStringCompatible(CVA)) { + // print it as a string and return + toAsm << valID << ":\n"; + toAsm << "\t" << ".ascii" << "\t" << getAsCString(CVA) << "\n"; + return; + } - toAsm << "\t.type" << "\t" << valID << ",#object\n"; + toAsm << "\t.type" << "\t" << valID << ",#object\n"; - unsigned int constSize = ConstantToSize(CV, Target); - if (constSize) - toAsm << "\t.size" << "\t" << valID << "," << constSize << "\n"; + unsigned int constSize = ConstantToSize(CV, Target); + if (constSize) + toAsm << "\t.size" << "\t" << valID << "," << constSize << "\n"; - toAsm << valID << ":\n"; + toAsm << valID << ":\n"; - printConstantValueOnly(CV); - } + printConstantValueOnly(CV); + } - void startFunction(Function &F) { - // Make sure the slot table has information about this function... - idTable->Table.incorporateFunction(&F); - } - void endFunction(Function &) { - idTable->Table.purgeFunction(); // Forget all about F - } - void endModule() { - } + void startFunction(Function &F) { + // Make sure the slot table has information about this function... + idTable->Table.incorporateFunction(&F); + } + void endFunction(Function &) { + idTable->Table.purgeFunction(); // Forget all about F + } - // Check if a value is external or accessible from external code. - bool isExternal(const Value* V) { - const GlobalValue *GV = dyn_cast(V); - return GV && GV->hasExternalLinkage(); - } + // Check if a value is external or accessible from external code. + bool isExternal(const Value* V) { + const GlobalValue *GV = dyn_cast(V); + return GV && GV->hasExternalLinkage(); + } - // enterSection - Use this method to enter a different section of the output - // executable. This is used to only output necessary section transitions. - // - void enterSection(enum Sections S) { - if (S == CurSection) return; // Only switch section if necessary - CurSection = S; + // enterSection - Use this method to enter a different section of the output + // executable. This is used to only output necessary section transitions. + // + void enterSection(enum Sections S) { + if (S == CurSection) return; // Only switch section if necessary + CurSection = S; - toAsm << "\n\t.section "; - switch (S) + toAsm << "\n\t.section "; + switch (S) { default: assert(0 && "Bad section name!"); case Text: toAsm << "\".text\""; break; @@ -414,264 +306,381 @@ case InitRWData: toAsm << "\".data\",#alloc,#write"; break; case ZeroInitRWData: toAsm << "\".bss\",#alloc,#write"; break; } - toAsm << "\n"; - } + toAsm << "\n"; + } - static std::string getValidSymbolName(const std::string &S) { - std::string Result; + static std::string getValidSymbolName(const std::string &S) { + std::string Result; - // Symbol names in Sparc assembly language have these rules: - // (a) Must match { letter | _ | . | $ } { letter | _ | . | $ | digit }* - // (b) A name beginning in "." is treated as a local name. - // - if (isdigit(S[0])) - Result = "ll"; + // Symbol names in Sparc assembly language have these rules: + // (a) Must match { letter | _ | . | $ } { letter | _ | . | $ | digit }* + // (b) A name beginning in "." is treated as a local name. + // + if (isdigit(S[0])) + Result = "ll"; - for (unsigned i = 0; i < S.size(); ++i) - { + for (unsigned i = 0; i < S.size(); ++i) { char C = S[i]; if (C == '_' || C == '.' || C == '$' || isalpha(C) || isdigit(C)) Result += C; - else - { - Result += '_'; - Result += char('0' + ((unsigned char)C >> 4)); - Result += char('0' + (C & 0xF)); - } - } - return Result; - } - - // getID - Return a valid identifier for the specified value. Base it on - // the name of the identifier if possible (qualified by the type), and - // use a numbered value based on prefix otherwise. - // FPrefix is always prepended to the output identifier. - // - std::string getID(const Value *V, const char *Prefix, const char *FPrefix = 0) { - std::string Result = FPrefix ? FPrefix : ""; // "Forced prefix" - - Result += V->hasName() ? V->getName() : std::string(Prefix); - - // Qualify all internal names with a unique id. - if (!isExternal(V)) { - int valId = idTable->Table.getSlot(V); - if (valId == -1) { - GlobalIdTable::ValIdMapConstIterator I = idTable->valToIdMap.find(V); - if (I == idTable->valToIdMap.end()) - valId = idTable->valToIdMap[V] = idTable->valToIdMap.size(); - else - valId = I->second; + else { + Result += '_'; + Result += char('0' + ((unsigned char)C >> 4)); + Result += char('0' + (C & 0xF)); + } } - Result = Result + "_" + itostr(valId); - - // Replace or prefix problem characters in the name - Result = getValidSymbolName(Result); + return Result; } - return Result; - } - - // getID Wrappers - Ensure consistent usage... - std::string getID(const Function *F) { - return getID(F, "LLVMFunction_"); - } - std::string getID(const BasicBlock *BB) { - return getID(BB, "LL", (".L_"+getID(BB->getParent())+"_").c_str()); - } - std::string getID(const GlobalVariable *GV) { - return getID(GV, "LLVMGlobal_"); - } - std::string getID(const Constant *CV) { - return getID(CV, "LLVMConst_", ".C_"); - } - std::string getID(const GlobalValue *GV) { - if (const GlobalVariable *V = dyn_cast(GV)) - return getID(V); - else if (const Function *F = dyn_cast(GV)) - return getID(F); - assert(0 && "Unexpected type of GlobalValue!"); - return ""; - } - - // Combines expressions - inline std::string ConstantArithExprToString(const ConstantExpr* CE, - const TargetMachine &TM, - const std::string &op) { - return "(" + valToExprString(CE->getOperand(0), TM) + op - + valToExprString(CE->getOperand(1), TM) + ")"; - } - - // ConstantExprToString() - Convert a ConstantExpr to an asm expression - // and return this as a string. - std::string ConstantExprToString(const ConstantExpr* CE, - const TargetMachine& target) { - std::string S; - switch(CE->getOpcode()) { - case Instruction::GetElementPtr: - { // generate a symbolic expression for the byte address - const Value* ptrVal = CE->getOperand(0); - std::vector idxVec(CE->op_begin()+1, CE->op_end()); - const TargetData &TD = target.getTargetData(); - S += "(" + valToExprString(ptrVal, target) + ") + (" - + utostr(TD.getIndexedOffset(ptrVal->getType(),idxVec)) + ")"; - break; - } - - case Instruction::Cast: - // Support only non-converting casts for now, i.e., a no-op. - // This assertion is not a complete check. - assert(target.getTargetData().getTypeSize(CE->getType()) == - target.getTargetData().getTypeSize(CE->getOperand(0)->getType())); - S += "(" + valToExprString(CE->getOperand(0), target) + ")"; - break; - - case Instruction::Add: - S += ConstantArithExprToString(CE, target, ") + ("); - break; + // getID - Return a valid identifier for the specified value. Base it on + // the name of the identifier if possible (qualified by the type), and + // use a numbered value based on prefix otherwise. + // FPrefix is always prepended to the output identifier. + // + std::string getID(const Value *V, const char *Prefix, + const char *FPrefix = 0) + { + std::string Result = FPrefix ? FPrefix : ""; // "Forced prefix" - case Instruction::Sub: - S += ConstantArithExprToString(CE, target, ") - ("); - break; + Result += V->hasName() ? V->getName() : std::string(Prefix); - case Instruction::Mul: - S += ConstantArithExprToString(CE, target, ") * ("); - break; + // Qualify all internal names with a unique id. + if (!isExternal(V)) { + int valId = idTable->Table.getSlot(V); + if (valId == -1) { + GlobalIdTable::ValIdMapConstIterator I = idTable->valToIdMap.find(V); + if (I == idTable->valToIdMap.end()) + valId = idTable->valToIdMap[V] = idTable->valToIdMap.size(); + else + valId = I->second; + } + Result = Result + "_" + itostr(valId); - case Instruction::Div: - S += ConstantArithExprToString(CE, target, ") / ("); - break; + // Replace or prefix problem characters in the name + Result = getValidSymbolName(Result); + } - case Instruction::Rem: - S += ConstantArithExprToString(CE, target, ") % ("); - break; + return Result; + } + + // getID Wrappers - Ensure consistent usage... + std::string getID(const Function *F) { + return getID(F, "LLVMFunction_"); + } + std::string getID(const BasicBlock *BB) { + return getID(BB, "LL", (".L_"+getID(BB->getParent())+"_").c_str()); + } + std::string getID(const GlobalVariable *GV) { + return getID(GV, "LLVMGlobal_"); + } + std::string getID(const Constant *CV) { + return getID(CV, "LLVMConst_", ".C_"); + } + std::string getID(const GlobalValue *GV) { + if (const GlobalVariable *V = dyn_cast(GV)) + return getID(V); + else if (const Function *F = dyn_cast(GV)) + return getID(F); + assert(0 && "Unexpected type of GlobalValue!"); + return ""; + } + + // Combines expressions + inline std::string ConstantArithExprToString(const ConstantExpr* CE, + const TargetMachine &TM, + const std::string &op) { + return "(" + valToExprString(CE->getOperand(0), TM) + op + + valToExprString(CE->getOperand(1), TM) + ")"; + } + + /// ConstantExprToString() - Convert a ConstantExpr to an asm expression + /// and return this as a string. + /// + std::string ConstantExprToString(const ConstantExpr* CE, + const TargetMachine& target); + + /// valToExprString - Helper function for ConstantExprToString(). + /// Appends result to argument string S. + /// + std::string valToExprString(const Value* V, const TargetMachine& target); + }; + +} // End anonymous namespace + +} // End namespace llvm + +/// Print a single constant value. +/// +void AsmPrinter::printSingleConstantValue(const Constant* CV) { + assert(CV->getType() != Type::VoidTy && + CV->getType() != Type::TypeTy && + CV->getType() != Type::LabelTy && + "Unexpected type for Constant"); + + assert((!isa(CV) && ! isa(CV)) + && "Aggregate types should be handled outside this function"); + + toAsm << "\t" << TypeToDataDirective(CV->getType()) << "\t"; + + if (const ConstantPointerRef* CPR = dyn_cast(CV)) { + // This is a constant address for a global variable or method. + // Use the name of the variable or method as the address value. + assert(isa(CPR->getValue()) && "Unexpected non-global"); + toAsm << getID(CPR->getValue()) << "\n"; + } else if (isa(CV)) { + // Null pointer value + toAsm << "0\n"; + } else if (const ConstantExpr* CE = dyn_cast(CV)) { + // Constant expression built from operators, constants, and symbolic addrs + toAsm << ConstantExprToString(CE, Target) << "\n"; + } else if (CV->getType()->isPrimitiveType()) { + // Check primitive types last + if (CV->getType()->isFloatingPoint()) { + // FP Constants are printed as integer constants to avoid losing + // precision... + double Val = cast(CV)->getValue(); + if (CV->getType() == Type::FloatTy) { + float FVal = (float)Val; + char *ProxyPtr = (char*)&FVal; // Abide by C TBAA rules + toAsm << *(unsigned int*)ProxyPtr; + } else if (CV->getType() == Type::DoubleTy) { + char *ProxyPtr = (char*)&Val; // Abide by C TBAA rules + toAsm << *(uint64_t*)ProxyPtr; + } else { + assert(0 && "Unknown floating point type!"); + } + + toAsm << "\t! " << CV->getType()->getDescription() + << " value: " << Val << "\n"; + } else { + WriteAsOperand(toAsm, CV, false, false) << "\n"; + } + } else { + assert(0 && "Unknown elementary type for constant"); + } +} - case Instruction::And: - // Logical && for booleans; bitwise & otherwise - S += ConstantArithExprToString(CE, target, - ((CE->getType() == Type::BoolTy)? ") && (" : ") & (")); - break; +/// Print a constant value or values (it may be an aggregate). +/// Uses printSingleConstantValue() to print each individual value. +/// +void AsmPrinter::printConstantValueOnly(const Constant* CV, + int numPadBytesAfter) +{ + const ConstantArray *CVA = dyn_cast(CV); + + if (CVA && isStringCompatible(CVA)) { + // print the string alone and return + toAsm << "\t" << ".ascii" << "\t" << getAsCString(CVA) << "\n"; + } else if (CVA) { + // Not a string. Print the values in successive locations + const std::vector &constValues = CVA->getValues(); + for (unsigned i=0; i < constValues.size(); i++) + printConstantValueOnly(cast(constValues[i].get())); + } else if (const ConstantStruct *CVS = dyn_cast(CV)) { + // Print the fields in successive locations. Pad to align if needed! + const StructLayout *cvsLayout = + Target.getTargetData().getStructLayout(CVS->getType()); + const std::vector& constValues = CVS->getValues(); + unsigned sizeSoFar = 0; + for (unsigned i=0, N = constValues.size(); i < N; i++) { + const Constant* field = cast(constValues[i].get()); + + // Check if padding is needed and insert one or more 0s. + unsigned fieldSize = + Target.getTargetData().getTypeSize(field->getType()); + int padSize = ((i == N-1? cvsLayout->StructSize + : cvsLayout->MemberOffsets[i+1]) + - cvsLayout->MemberOffsets[i]) - fieldSize; + sizeSoFar += (fieldSize + padSize); - case Instruction::Or: - // Logical || for booleans; bitwise | otherwise - S += ConstantArithExprToString(CE, target, - ((CE->getType() == Type::BoolTy)? ") || (" : ") | (")); - break; + // Now print the actual field value + printConstantValueOnly(field, padSize); + } + assert(sizeSoFar == cvsLayout->StructSize && + "Layout of constant struct may be incorrect!"); + } + else + printSingleConstantValue(CV); - case Instruction::Xor: - // Bitwise ^ for all types - S += ConstantArithExprToString(CE, target, ") ^ ("); - break; + if (numPadBytesAfter) + PrintZeroBytesToPad(numPadBytesAfter); +} - default: - assert(0 && "Unsupported operator in ConstantExprToString()"); - break; - } +/// ConstantExprToString() - Convert a ConstantExpr to an asm expression +/// and return this as a string. +/// +std::string AsmPrinter::ConstantExprToString(const ConstantExpr* CE, + const TargetMachine& target) { + std::string S; + switch(CE->getOpcode()) { + case Instruction::GetElementPtr: + { // generate a symbolic expression for the byte address + const Value* ptrVal = CE->getOperand(0); + std::vector idxVec(CE->op_begin()+1, CE->op_end()); + const TargetData &TD = target.getTargetData(); + S += "(" + valToExprString(ptrVal, target) + ") + (" + + utostr(TD.getIndexedOffset(ptrVal->getType(),idxVec)) + ")"; + break; + } + + case Instruction::Cast: + // Support only non-converting casts for now, i.e., a no-op. + // This assertion is not a complete check. + assert(target.getTargetData().getTypeSize(CE->getType()) == + target.getTargetData().getTypeSize(CE->getOperand(0)->getType())); + S += "(" + valToExprString(CE->getOperand(0), target) + ")"; + break; + + case Instruction::Add: + S += ConstantArithExprToString(CE, target, ") + ("); + break; + + case Instruction::Sub: + S += ConstantArithExprToString(CE, target, ") - ("); + break; + + case Instruction::Mul: + S += ConstantArithExprToString(CE, target, ") * ("); + break; + + case Instruction::Div: + S += ConstantArithExprToString(CE, target, ") / ("); + break; + + case Instruction::Rem: + S += ConstantArithExprToString(CE, target, ") % ("); + break; + + case Instruction::And: + // Logical && for booleans; bitwise & otherwise + S += ConstantArithExprToString(CE, target, + ((CE->getType() == Type::BoolTy)? ") && (" : ") & (")); + break; + + case Instruction::Or: + // Logical || for booleans; bitwise | otherwise + S += ConstantArithExprToString(CE, target, + ((CE->getType() == Type::BoolTy)? ") || (" : ") | (")); + break; + + case Instruction::Xor: + // Bitwise ^ for all types + S += ConstantArithExprToString(CE, target, ") ^ ("); + break; - return S; + default: + assert(0 && "Unsupported operator in ConstantExprToString()"); + break; } - // valToExprString - Helper function for ConstantExprToString(). - // Appends result to argument string S. - // - std::string valToExprString(const Value* V, const TargetMachine& target) { - std::string S; - bool failed = false; - if (const Constant* CV = dyn_cast(V)) { // symbolic or known - - if (const ConstantBool *CB = dyn_cast(CV)) - S += std::string(CB == ConstantBool::True ? "1" : "0"); - else if (const ConstantSInt *CI = dyn_cast(CV)) - S += itostr(CI->getValue()); - else if (const ConstantUInt *CI = dyn_cast(CV)) - S += utostr(CI->getValue()); - else if (const ConstantFP *CFP = dyn_cast(CV)) - S += ftostr(CFP->getValue()); - else if (isa(CV)) - S += "0"; - else if (const ConstantPointerRef *CPR = dyn_cast(CV)) - S += valToExprString(CPR->getValue(), target); - else if (const ConstantExpr *CE = dyn_cast(CV)) - S += ConstantExprToString(CE, target); - else - failed = true; + return S; +} - } else if (const GlobalValue* GV = dyn_cast(V)) { - S += getID(GV); - } +/// valToExprString - Helper function for ConstantExprToString(). +/// Appends result to argument string S. +/// +std::string AsmPrinter::valToExprString(const Value* V, + const TargetMachine& target) { + std::string S; + bool failed = false; + if (const Constant* CV = dyn_cast(V)) { // symbolic or known + if (const ConstantBool *CB = dyn_cast(CV)) + S += std::string(CB == ConstantBool::True ? "1" : "0"); + else if (const ConstantSInt *CI = dyn_cast(CV)) + S += itostr(CI->getValue()); + else if (const ConstantUInt *CI = dyn_cast(CV)) + S += utostr(CI->getValue()); + else if (const ConstantFP *CFP = dyn_cast(CV)) + S += ftostr(CFP->getValue()); + else if (isa(CV)) + S += "0"; + else if (const ConstantPointerRef *CPR = dyn_cast(CV)) + S += valToExprString(CPR->getValue(), target); + else if (const ConstantExpr *CE = dyn_cast(CV)) + S += ConstantExprToString(CE, target); else failed = true; - - if (failed) { - assert(0 && "Cannot convert value to string"); - S += ""; - } - return S; + } else if (const GlobalValue* GV = dyn_cast(V)) { + S += getID(GV); + } else + failed = true; + + if (failed) { + assert(0 && "Cannot convert value to string"); + S += ""; } - -}; - + return S; +} //===----------------------------------------------------------------------===// -// SparcFunctionAsmPrinter Code +// SparcAsmPrinter Code //===----------------------------------------------------------------------===// -struct SparcFunctionAsmPrinter : public FunctionPass, public AsmPrinter { - inline SparcFunctionAsmPrinter(std::ostream &os, const TargetMachine &t) - : AsmPrinter(os, t) {} +namespace llvm { - const Function *currFunction; +namespace { - const char *getPassName() const { - return "Output Sparc Assembly for Functions"; - } + struct SparcAsmPrinter : public FunctionPass, public AsmPrinter { + inline SparcAsmPrinter(std::ostream &os, const TargetMachine &t) + : AsmPrinter(os, t) {} - virtual bool doInitialization(Module &M) { - startModule(M); - return false; - } + const Function *currFunction; - virtual bool runOnFunction(Function &F) { - currFunction = &F; - startFunction(F); - emitFunction(F); - endFunction(F); - return false; - } + const char *getPassName() const { + return "Output Sparc Assembly for Functions"; + } - virtual bool doFinalization(Module &M) { - endModule(); - return false; - } + virtual bool doInitialization(Module &M) { + startModule(M); + return false; + } - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesAll(); - } + virtual bool runOnFunction(Function &F) { + currFunction = &F; + startFunction(F); + emitFunction(F); + endFunction(F); + return false; + } - void emitFunction(const Function &F); -private : - void emitBasicBlock(const MachineBasicBlock &MBB); - void emitMachineInst(const MachineInstr *MI); - - unsigned int printOperands(const MachineInstr *MI, unsigned int opNum); - void printOneOperand(const MachineOperand &Op, MachineOpCode opCode); + virtual bool doFinalization(Module &M) { + emitGlobals(M); + return false; + } - bool OpIsBranchTargetLabel(const MachineInstr *MI, unsigned int opNum); - bool OpIsMemoryAddressBase(const MachineInstr *MI, unsigned int opNum); - - unsigned getOperandMask(unsigned Opcode) { - switch (Opcode) { - case V9::SUBccr: - case V9::SUBcci: return 1 << 3; // Remove CC argument - //case BA: return 1 << 0; // Remove Arg #0, which is always null or xcc - default: return 0; // By default, don't hack operands... + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); } - } -}; + + void emitFunction(const Function &F); + private : + void emitBasicBlock(const MachineBasicBlock &MBB); + void emitMachineInst(const MachineInstr *MI); + + unsigned int printOperands(const MachineInstr *MI, unsigned int opNum); + void printOneOperand(const MachineOperand &Op, MachineOpCode opCode); + + bool OpIsBranchTargetLabel(const MachineInstr *MI, unsigned int opNum); + bool OpIsMemoryAddressBase(const MachineInstr *MI, unsigned int opNum); + + unsigned getOperandMask(unsigned Opcode) { + switch (Opcode) { + case V9::SUBccr: + case V9::SUBcci: return 1 << 3; // Remove CC argument + default: return 0; // By default, don't hack operands... + } + } + + void emitGlobals(const Module &M); + void printGlobalVariable(const GlobalVariable *GV); + }; + +} // End anonymous namespace inline bool -SparcFunctionAsmPrinter::OpIsBranchTargetLabel(const MachineInstr *MI, - unsigned int opNum) { +SparcAsmPrinter::OpIsBranchTargetLabel(const MachineInstr *MI, + unsigned int opNum) { switch (MI->getOpCode()) { case V9::JMPLCALLr: case V9::JMPLCALLi: @@ -683,10 +692,9 @@ } } - inline bool -SparcFunctionAsmPrinter::OpIsMemoryAddressBase(const MachineInstr *MI, - unsigned int opNum) { +SparcAsmPrinter::OpIsMemoryAddressBase(const MachineInstr *MI, + unsigned int opNum) { if (Target.getInstrInfo().isLoad(MI->getOpCode())) return (opNum == 0); else if (Target.getInstrInfo().isStore(MI->getOpCode())) @@ -702,33 +710,28 @@ printOneOperand(mop2, opCode); unsigned int -SparcFunctionAsmPrinter::printOperands(const MachineInstr *MI, +SparcAsmPrinter::printOperands(const MachineInstr *MI, unsigned int opNum) { const MachineOperand& mop = MI->getOperand(opNum); - if (OpIsBranchTargetLabel(MI, opNum)) - { - PrintOp1PlusOp2(mop, MI->getOperand(opNum+1), MI->getOpCode()); - return 2; - } - else if (OpIsMemoryAddressBase(MI, opNum)) - { - toAsm << "["; - PrintOp1PlusOp2(mop, MI->getOperand(opNum+1), MI->getOpCode()); - toAsm << "]"; - return 2; - } - else - { - printOneOperand(mop, MI->getOpCode()); - return 1; - } + if (OpIsBranchTargetLabel(MI, opNum)) { + PrintOp1PlusOp2(mop, MI->getOperand(opNum+1), MI->getOpCode()); + return 2; + } else if (OpIsMemoryAddressBase(MI, opNum)) { + toAsm << "["; + PrintOp1PlusOp2(mop, MI->getOperand(opNum+1), MI->getOpCode()); + toAsm << "]"; + return 2; + } else { + printOneOperand(mop, MI->getOpCode()); + return 1; + } } void -SparcFunctionAsmPrinter::printOneOperand(const MachineOperand &mop, - MachineOpCode opCode) +SparcAsmPrinter::printOneOperand(const MachineOperand &mop, + MachineOpCode opCode) { bool needBitsFlag = true; @@ -770,7 +773,7 @@ case MachineOperand::MO_PCRelativeDisp: { const Value *Val = mop.getVRegValue(); - assert(Val && "\tNULL Value in SparcFunctionAsmPrinter"); + assert(Val && "\tNULL Value in SparcAsmPrinter"); if (const BasicBlock *BB = dyn_cast(Val)) toAsm << getID(BB); @@ -781,7 +784,7 @@ else if (const Constant *CV = dyn_cast(Val)) toAsm << getID(CV); else - assert(0 && "Unrecognized value in SparcFunctionAsmPrinter"); + assert(0 && "Unrecognized value in SparcAsmPrinter"); break; } @@ -802,9 +805,7 @@ toAsm << ")"; } -void -SparcFunctionAsmPrinter::emitMachineInst(const MachineInstr *MI) -{ +void SparcAsmPrinter::emitMachineInst(const MachineInstr *MI) { unsigned Opcode = MI->getOpCode(); if (Target.getInstrInfo().isDummyPhiInstr(Opcode)) @@ -828,9 +829,7 @@ ++EmittedInsts; } -void -SparcFunctionAsmPrinter::emitBasicBlock(const MachineBasicBlock &MBB) -{ +void SparcAsmPrinter::emitBasicBlock(const MachineBasicBlock &MBB) { // Emit a label for the basic block toAsm << getID(MBB.getBasicBlock()) << ":\n"; @@ -841,9 +840,7 @@ toAsm << "\n"; // Separate BB's with newlines } -void -SparcFunctionAsmPrinter::emitFunction(const Function &F) -{ +void SparcAsmPrinter::emitFunction(const Function &F) { std::string methName = getID(&F); toAsm << "!****** Outputing Function: " << methName << " ******\n"; @@ -877,64 +874,23 @@ toAsm << "\n\n"; } -} // End anonymous namespace - -namespace llvm { - -Pass *UltraSparc::getFunctionAsmPrinterPass(std::ostream &Out) { - return new SparcFunctionAsmPrinter(Out, *this); -} - -} // End llvm namespace - - -//===----------------------------------------------------------------------===// -// SparcFunctionAsmPrinter Code -//===----------------------------------------------------------------------===// - -namespace { - -class SparcModuleAsmPrinter : public Pass, public AsmPrinter { -public: - SparcModuleAsmPrinter(std::ostream &os, TargetMachine &t) - : AsmPrinter(os, t) {} - - const char *getPassName() const { return "Output Sparc Assembly for Module"; } - - virtual bool run(Module &M) { - startModule(M); - emitGlobals(M); - endModule(); - return false; - } - - virtual void getAnalysisUsage(AnalysisUsage &AU) const { - AU.setPreservesAll(); - } - -private: - void emitGlobals(const Module &M); - void printGlobalVariable(const GlobalVariable *GV); -}; - -void SparcModuleAsmPrinter::printGlobalVariable(const GlobalVariable* GV) -{ +void SparcAsmPrinter::printGlobalVariable(const GlobalVariable* GV) { if (GV->hasExternalLinkage()) toAsm << "\t.global\t" << getID(GV) << "\n"; - if (GV->hasInitializer() && ! GV->getInitializer()->isNullValue()) + if (GV->hasInitializer() && ! GV->getInitializer()->isNullValue()) { printConstant(GV->getInitializer(), getID(GV)); - else { + } else { toAsm << "\t.align\t" << TypeToAlignment(GV->getType()->getElementType(), Target) << "\n"; toAsm << "\t.type\t" << getID(GV) << ",#object\n"; toAsm << "\t.reserve\t" << getID(GV) << "," - << TypeToSize(GV->getType()->getElementType(), Target) + << Target.findOptimalStorageSize(GV->getType()->getElementType()) << "\n"; } } -void SparcModuleAsmPrinter::emitGlobals(const Module &M) { +void SparcAsmPrinter::emitGlobals(const Module &M) { // Output global variables... for (Module::const_giterator GI = M.gbegin(), GE = M.gend(); GI != GE; ++GI) if (! GI->isExternal()) { @@ -952,10 +908,8 @@ toAsm << "\n"; } -} // End anonymous namespace - -Pass *UltraSparc::getModuleAsmPrinterPass(std::ostream &Out) { - return new SparcModuleAsmPrinter(Out, *this); +FunctionPass *createAsmPrinterPass(std::ostream &Out, const TargetMachine &TM) { + return new SparcAsmPrinter(Out, TM); } } // End llvm namespace From brukman at cs.uiuc.edu Wed Nov 12 18:24:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Nov 12 18:24:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp Message-ID: <200311130023.SAA01975@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/Sparc: SparcV9CodeEmitter.cpp updated: 1.43 -> 1.44 --- Log message: Include the file before we close the llvm namespace. --- Diffs of the changes: (+2 -1) Index: llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp diff -u llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.43 llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.44 --- llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp:1.43 Tue Nov 11 16:41:33 2003 +++ llvm/lib/Target/Sparc/SparcV9CodeEmitter.cpp Wed Nov 12 18:23:05 2003 @@ -810,6 +810,7 @@ } } +#include "SparcV9CodeEmitter.inc" + } // End llvm namespace -#include "SparcV9CodeEmitter.inc" From lattner at cs.uiuc.edu Wed Nov 12 19:43:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 19:43:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure.h Message-ID: <200311130142.TAA07453@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DataStructure.h updated: 1.75 -> 1.76 --- Log message: Add an initial version of the CompleteBUDataStructures pass --- Diffs of the changes: (+34 -0) Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.75 llvm/include/llvm/Analysis/DataStructure.h:1.76 --- llvm/include/llvm/Analysis/DataStructure.h:1.75 Tue Nov 11 16:41:31 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Wed Nov 12 19:42:38 2003 @@ -82,6 +82,7 @@ // only performs a "Bottom Up" propagation (hence the name). // class BUDataStructures : public Pass { +protected: // DSInfo, one graph for each function hash_map DSInfo; DSGraph *GlobalsGraph; @@ -185,6 +186,39 @@ std::vector &PostOrder, const BUDataStructures::ActualCalleesTy &ActualCallees); }; + + +// CompleteBUDataStructures - This is the exact same as the bottom-up graphs, +// but we use take a completed call graph and inline all indirect callees into +// their callers graphs, making the result more useful for things like pool +// allocation. +// +struct CompleteBUDataStructures : public BUDataStructures { + virtual bool run(Module &M); + + bool hasGraph(const Function &F) const { + return DSInfo.find(const_cast(&F)) != DSInfo.end(); + } + + // getDSGraph - Return the data structure graph for the specified function. + DSGraph &getDSGraph(const Function &F) const { + hash_map::const_iterator I = + DSInfo.find(const_cast(&F)); + assert(I != DSInfo.end() && "Function not in module!"); + return *I->second; + } + + virtual void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + AU.addRequired(); + + // FIXME: TEMPORARY (remove once finalization of indirect call sites in the + // globals graph has been implemented in the BU pass) + AU.addRequired(); + } +}; + + } // End llvm namespace From lattner at cs.uiuc.edu Wed Nov 12 19:44:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 19:44:01 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp TransformFunctionBody.cpp Message-ID: <200311130143.TAA07479@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.47 -> 1.48 TransformFunctionBody.cpp updated: 1.11 -> 1.12 --- Log message: Instead of using both BU and TD datastructures, just us 'complete' bu ds --- Diffs of the changes: (+9 -50) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.47 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.48 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.47 Wed Nov 12 13:00:59 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Wed Nov 12 19:43:48 2003 @@ -54,16 +54,14 @@ } void PoolAllocate::getAnalysisUsage(AnalysisUsage &AU) const { - AU.addRequired(); - AU.addRequired(); + AU.addRequired(); AU.addRequired(); } bool PoolAllocate::run(Module &M) { if (M.begin() == M.end()) return false; CurModule = &M; - BU = &getAnalysis(); - TDDS = &getAnalysis(); + BU = &getAnalysis(); // Add the pool* prototypes to the module AddPoolPrototypes(); @@ -209,16 +207,15 @@ // unify the N functions together in the FuncECs set. // void PoolAllocate::BuildIndirectFunctionSets(Module &M) { - const BUDataStructures::ActualCalleesTy AC = BU->getActualCallees(); -#if 0 // THIS SHOULD WORK, but doesn't because DSA is buggy. FIXME! + const CompleteBUDataStructures::ActualCalleesTy AC = BU->getActualCallees(); // Loop over all of the indirect calls in the program. If a call site can // call multiple different functions, we need to unify all of the callees into // the same equivalence class. Instruction *LastInst = 0; Function *FirstFunc = 0; - for (BUDataStructures::ActualCalleesTy::const_iterator I = AC.begin(), + for (CompleteBUDataStructures::ActualCalleesTy::const_iterator I = AC.begin(), E = AC.end(); I != E; ++I) { CallSite CS = CallSite::get(I->first); if (!CS.getCalledFunction() && // Ignore direct calls @@ -238,43 +235,6 @@ } } } -#else - - for (Module::iterator MI = M.begin(), ME = M.end(); MI != ME; ++MI) { - if (MI->isExternal()) continue; - DEBUG(std::cerr << "Processing indirect calls function:" << MI->getName() - << "\n"); - - DSGraph &TDG = TDDS->getDSGraph(*MI); - const std::vector &callSites = TDG.getFunctionCalls(); - - // For each call site in the function - // All the functions that can be called at the call site are put in the - // same equivalence class. - for (std::vector::const_iterator CSI = callSites.begin(), - CSE = callSites.end(); CSI != CSE ; ++CSI) - if (CSI->isIndirectCall()) { - Instruction *TheCall = CSI->getCallSite().getInstruction(); - DSNode *DSN = CSI->getCalleeNode(); - std::cerr << "INDCALL: " << *TheCall; - if (DSN->isIncomplete()) - std::cerr << "Incomplete node: " << *TheCall; - // assert(DSN->isGlobalNode()); - const std::vector &Callees = DSN->getGlobals(); - if (Callees.empty()) - std::cerr << "No targets: " << *TheCall; - Function *RunningClass = 0; - for (unsigned i = 0, e = Callees.size(); i != e; ++i) - if (Function *F = dyn_cast(Callees[i])) { - OneCalledFunction[TheCall] = F; - if (RunningClass == 0) - FuncECs.addElement(RunningClass = F); - else - FuncECs.unionSetsWith(RunningClass, F); - } - } - } -#endif // Now that all of the equivalences have been built, turn the union-find data // structure into a simple map from each function in the equiv class to the @@ -635,7 +595,7 @@ // of the pools. std::set > PoolUses; std::set > PoolFrees; - TransformBody(G, TDDS->getDSGraph(F), FI, PoolUses, PoolFrees, NewF); + TransformBody(G, FI, PoolUses, PoolFrees, NewF); // Create pool construction/destruction code if (!NodesToPA.empty()) Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.11 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.12 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.11 Wed Nov 12 13:56:53 2003 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Wed Nov 12 19:43:48 2003 @@ -25,7 +25,6 @@ struct FuncTransform : public InstVisitor { PoolAllocate &PAInfo; DSGraph &G; // The Bottom-up DS Graph - DSGraph &TDG; // The Top-down DS Graph FuncInfo &FI; // PoolUses - For each pool (identified by the pool descriptor) keep track @@ -38,10 +37,10 @@ // inserted into the code. This is seperated out from PoolUses. std::set > &PoolFrees; - FuncTransform(PoolAllocate &P, DSGraph &g, DSGraph &tdg, FuncInfo &fi, + FuncTransform(PoolAllocate &P, DSGraph &g, FuncInfo &fi, std::set > &poolUses, std::set > &poolFrees) - : PAInfo(P), G(g), TDG(tdg), FI(fi), + : PAInfo(P), G(g), FI(fi), PoolUses(poolUses), PoolFrees(poolFrees) { } @@ -83,11 +82,11 @@ }; } -void PoolAllocate::TransformBody(DSGraph &g, DSGraph &tdg, PA::FuncInfo &fi, +void PoolAllocate::TransformBody(DSGraph &g, PA::FuncInfo &fi, std::set > &poolUses, std::set > &poolFrees, Function &F) { - FuncTransform(*this, g, tdg, fi, poolUses, poolFrees).visit(F); + FuncTransform(*this, g, fi, poolUses, poolFrees).visit(F); } From lattner at cs.uiuc.edu Wed Nov 12 19:44:11 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 19:44:11 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Message-ID: <200311130143.TAA07464@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: CompleteBottomUp.cpp added (r1.1) --- Log message: Add an initial version of the CompleteBUDataStructures class, which is currently identical to the BU pass, but has an accurate call graph --- Diffs of the changes: (+75 -0) Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp diff -c /dev/null llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.1 *** /dev/null Wed Nov 12 19:43:10 2003 --- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Wed Nov 12 19:43:00 2003 *************** *** 0 **** --- 1,75 ---- + //===- CompleteBottomUp.cpp - Complete Bottom-Up Data Structure Graphs ----===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This is the exact same as the bottom-up graphs, but we use take a completed + // call graph and inline all indirect callees into their callers graphs, making + // the result more useful for things like pool allocation. + // + //===----------------------------------------------------------------------===// + + #include "llvm/Analysis/DataStructure.h" + #include "llvm/Module.h" + #include "llvm/Analysis/DSGraph.h" + using namespace llvm; + + namespace { + RegisterAnalysis + X("cbudatastructure", "'Complete' Bottom-up Data Structure Analysis"); + } + + using namespace DS; + + // run - Calculate the bottom up data structure graphs for each function in the + // program. + // + bool CompleteBUDataStructures::run(Module &M) { + BUDataStructures &BU = getAnalysis(); + GlobalsGraph = new DSGraph(BU.getGlobalsGraph()); + GlobalsGraph->setPrintAuxCalls(); + + // Our call graph is the same as the BU data structures call graph + ActualCallees = BU.getActualCallees(); + + #if 1 // REMOVE ME EVENTUALLY + // FIXME: TEMPORARY (remove once finalization of indirect call sites in the + // globals graph has been implemented in the BU pass) + TDDataStructures &TD = getAnalysis(); + + // The call graph extractable from the TD pass is _much more complete_ and + // trustable than that generated by the BU pass so far. Until this is fixed, + // we hack it like this: + for (Module::iterator MI = M.begin(), ME = M.end(); MI != ME; ++MI) { + if (MI->isExternal()) continue; + const std::vector &CSs = TD.getDSGraph(*MI).getFunctionCalls(); + + for (unsigned CSi = 0, e = CSs.size(); CSi != e; ++CSi) { + if (CSs[CSi].isIndirectCall()) { + Instruction *TheCall = CSs[CSi].getCallSite().getInstruction(); + + const std::vector &Callees = + CSs[CSi].getCalleeNode()->getGlobals(); + for (unsigned i = 0, e = Callees.size(); i != e; ++i) + if (Function *F = dyn_cast(Callees[i])) + ActualCallees.insert(std::make_pair(TheCall, F)); + } + } + } + #endif + + // Start by copying all of the BU data structures graphs over, verbatim. + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) + if (!I->isExternal()) { + DSInfo[I] = new DSGraph(BU.getDSGraph(*I)); + DSInfo[I]->setGlobalsGraph(GlobalsGraph); + DSInfo[I]->setPrintAuxCalls(); + } + + + return false; + } From lattner at cs.uiuc.edu Wed Nov 12 20:02:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 20:02:01 2003 Subject: [llvm-commits] CVS: llvm/include/Support/SCCIterator.h Message-ID: <200311130201.UAA07710@zion.cs.uiuc.edu> Changes in directory llvm/include/Support: SCCIterator.h updated: 1.17 -> 1.18 --- Log message: Minor cleanups --- Diffs of the changes: (+36 -41) Index: llvm/include/Support/SCCIterator.h diff -u llvm/include/Support/SCCIterator.h:1.17 llvm/include/Support/SCCIterator.h:1.18 --- llvm/include/Support/SCCIterator.h:1.17 Tue Nov 11 16:41:29 2003 +++ llvm/include/Support/SCCIterator.h Wed Nov 12 20:01:41 2003 @@ -78,56 +78,51 @@ // The stack-based DFS traversal; defined below. void DFSVisitChildren() { assert(!VisitStack.empty()); - while (VisitStack.back().second != GT::child_end(VisitStack.back().first)) - { // TOS has at least one more child so continue DFS - NodeType *childN = *VisitStack.back().second++; - if (nodeVisitNumbers.find(childN) == nodeVisitNumbers.end()) - { // this node has never been seen - DFSVisitOne(childN); - } - else - { - unsigned childNum = nodeVisitNumbers[childN]; - if (MinVisitNumStack.back() > childNum) - MinVisitNumStack.back() = childNum; - } + while (VisitStack.back().second != GT::child_end(VisitStack.back().first)) { + // TOS has at least one more child so continue DFS + NodeType *childN = *VisitStack.back().second++; + if (!nodeVisitNumbers.count(childN)) { + // this node has never been seen + DFSVisitOne(childN); + } else { + unsigned childNum = nodeVisitNumbers[childN]; + if (MinVisitNumStack.back() > childNum) + MinVisitNumStack.back() = childNum; } + } } // Compute the next SCC using the DFS traversal. void GetNextSCC() { assert(VisitStack.size() == MinVisitNumStack.size()); CurrentSCC.clear(); // Prepare to compute the next SCC - while (! VisitStack.empty()) - { - DFSVisitChildren(); + while (!VisitStack.empty()) { + DFSVisitChildren(); + assert(VisitStack.back().second ==GT::child_end(VisitStack.back().first)); + NodeType* visitingN = VisitStack.back().first; + unsigned minVisitNum = MinVisitNumStack.back(); + VisitStack.pop_back(); + MinVisitNumStack.pop_back(); + if (!MinVisitNumStack.empty() && MinVisitNumStack.back() > minVisitNum) + MinVisitNumStack.back() = minVisitNum; - assert(VisitStack.back().second == - GT::child_end(VisitStack.back().first)); - NodeType* visitingN = VisitStack.back().first; - unsigned minVisitNum = MinVisitNumStack.back(); - VisitStack.pop_back(); - MinVisitNumStack.pop_back(); - if (! MinVisitNumStack.empty() && MinVisitNumStack.back() > minVisitNum) - MinVisitNumStack.back() = minVisitNum; + //DEBUG(std::cerr << "TarjanSCC: Popped node " << visitingN << + // " : minVisitNum = " << minVisitNum << "; Node visit num = " << + // nodeVisitNumbers[visitingN] << "\n"); - //DEBUG(std::cerr << "TarjanSCC: Popped node " << visitingN << - // " : minVisitNum = " << minVisitNum << "; Node visit num = " << - // nodeVisitNumbers[visitingN] << "\n"); - - if (minVisitNum == nodeVisitNumbers[visitingN]) - { // A full SCC is on the SCCNodeStack! It includes all nodes below - // visitingN on the stack. Copy those nodes to CurrentSCC, - // reset their minVisit values, and return (this suspends - // the DFS traversal till the next ++). - do { - CurrentSCC.push_back(SCCNodeStack.back()); - SCCNodeStack.pop_back(); - nodeVisitNumbers[CurrentSCC.back()] = ~0UL; - } while (CurrentSCC.back() != visitingN); - return; - } - } + if (minVisitNum == nodeVisitNumbers[visitingN]) { + // A full SCC is on the SCCNodeStack! It includes all nodes below + // visitingN on the stack. Copy those nodes to CurrentSCC, + // reset their minVisit values, and return (this suspends + // the DFS traversal till the next ++). + do { + CurrentSCC.push_back(SCCNodeStack.back()); + SCCNodeStack.pop_back(); + nodeVisitNumbers[CurrentSCC.back()] = ~0UL; + } while (CurrentSCC.back() != visitingN); + return; + } + } } inline scc_iterator(NodeType *entryN) : visitNum(0) { From lattner at cs.uiuc.edu Wed Nov 12 20:31:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 20:31:01 2003 Subject: [llvm-commits] CVS: llvm/include/Support/SCCIterator.h Message-ID: <200311130230.UAA08512@zion.cs.uiuc.edu> Changes in directory llvm/include/Support: SCCIterator.h updated: 1.18 -> 1.19 --- Log message: Add namespace qualifier --- Diffs of the changes: (+1 -1) Index: llvm/include/Support/SCCIterator.h diff -u llvm/include/Support/SCCIterator.h:1.18 llvm/include/Support/SCCIterator.h:1.19 --- llvm/include/Support/SCCIterator.h:1.18 Wed Nov 12 20:01:41 2003 +++ llvm/include/Support/SCCIterator.h Wed Nov 12 20:30:22 2003 @@ -70,7 +70,7 @@ nodeVisitNumbers[N] = visitNum; SCCNodeStack.push_back(N); MinVisitNumStack.push_back(visitNum); - VisitStack.push_back(make_pair(N, GT::child_begin(N))); + VisitStack.push_back(std::make_pair(N, GT::child_begin(N))); //DEBUG(std::cerr << "TarjanSCC: Node " << N << // " : visitNum = " << visitNum << "\n"); } From lattner at cs.uiuc.edu Wed Nov 12 21:11:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 21:11:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200311130310.VAA09686@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.71 -> 1.72 --- Log message: Disable integer tracking by default --- Diffs of the changes: (+6 -1) Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.71 llvm/lib/Analysis/DataStructure/Local.cpp:1.72 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.71 Wed Nov 12 17:11:14 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Wed Nov 12 21:10:49 2003 @@ -33,13 +33,18 @@ static RegisterAnalysis X("datastructure", "Local Data Structure Analysis"); +static cl::opt +TrackIntegersAsPointers("dsa-track-integers", + cl::desc("If this is set, track integers as potential pointers")); + + namespace llvm { namespace DS { // isPointerType - Return true if this type is big enough to hold a pointer. bool isPointerType(const Type *Ty) { if (isa(Ty)) return true; - else if (Ty->isPrimitiveType() && Ty->isInteger()) + else if (TrackIntegersAsPointers && Ty->isPrimitiveType() &&Ty->isInteger()) return Ty->getPrimitiveSize() >= PointerSize; return false; } From lattner at cs.uiuc.edu Wed Nov 12 22:12:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 22:12:01 2003 Subject: [llvm-commits] CVS: llvm/include/Support/STLExtras.h Message-ID: <200311130411.WAA00580@zion.cs.uiuc.edu> Changes in directory llvm/include/Support: STLExtras.h updated: 1.10 -> 1.11 --- Log message: Remove needless dependence on boost --- Diffs of the changes: (+2 -3) Index: llvm/include/Support/STLExtras.h diff -u llvm/include/Support/STLExtras.h:1.10 llvm/include/Support/STLExtras.h:1.11 --- llvm/include/Support/STLExtras.h:1.10 Tue Nov 11 16:41:29 2003 +++ llvm/include/Support/STLExtras.h Wed Nov 12 22:11:30 2003 @@ -19,7 +19,6 @@ #include #include "Support/iterator" -#include "boost/type_traits/transform_traits.hpp" namespace llvm { @@ -260,8 +259,8 @@ { template struct tier { - typedef typename boost::add_reference::type first_type; - typedef typename boost::add_reference::type second_type; + typedef T1 &first_type; + typedef T2 &second_type; first_type first; second_type second; From vadve at cs.uiuc.edu Wed Nov 12 22:29:01 2003 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Wed Nov 12 22:29:01 2003 Subject: [llvm-commits] CVS: llvm-www/www-index.html Message-ID: <200311130428.WAA20946@psmith.cs.uiuc.edu> Changes in directory llvm-www: www-index.html updated: 1.86 -> 1.87 --- Log message: Take out link to LLVM-vs-the-world. Writing something like that is a long-term project. --- Diffs of the changes: (+0 -4) Index: llvm-www/www-index.html diff -u llvm-www/www-index.html:1.86 llvm-www/www-index.html:1.87 --- llvm-www/www-index.html:1.86 Wed Nov 12 16:00:43 2003 +++ llvm-www/www-index.html Wed Nov 12 22:28:01 2003 @@ -341,10 +341,6 @@
  33. How to build the C/C++ front-end - Instructions for building the front-end from source.
  34. - -
  35. LLVM vs. The World - - A brief comparison of LLVM with a few other - compilation and code-generation frameworks.
  36. Programming Documentation: From lattner at cs.uiuc.edu Wed Nov 12 23:05:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 23:05:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Message-ID: <200311130504.XAA19843@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: BottomUpClosure.cpp updated: 1.69 -> 1.70 --- Log message: Minor code cleanup --- Diffs of the changes: (+2 -2) Index: llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp diff -u llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.69 llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.70 --- llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp:1.69 Wed Nov 12 17:11:14 2003 +++ llvm/lib/Analysis/DataStructure/BottomUpClosure.cpp Wed Nov 12 23:04:19 2003 @@ -94,7 +94,7 @@ std::vector &Stack, unsigned &NextID, hash_map &ValMap) { - assert(ValMap.find(F) == ValMap.end() && "Shouldn't revisit functions!"); + assert(!ValMap.count(F) && "Shouldn't revisit functions!"); unsigned Min = NextID++, MyID = Min; ValMap[F] = Min; Stack.push_back(F); @@ -260,7 +260,7 @@ if (Callee->isExternal()) { // Ignore this case, simple varargs functions we cannot stub out! - } else if (ReturnNodes.find(Callee) != ReturnNodes.end()) { + } else if (ReturnNodes.count(Callee)) { // Self recursion... simply link up the formal arguments with the // actual arguments... DEBUG(std::cerr << " Self Inlining: " << Callee->getName() << "\n"); From lattner at cs.uiuc.edu Wed Nov 12 23:06:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 23:06:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Printer.cpp Message-ID: <200311130505.XAA20121@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: CompleteBottomUp.cpp updated: 1.1 -> 1.2 Printer.cpp updated: 1.61 -> 1.62 --- Log message: Implement the CompleteBU pass --- Diffs of the changes: (+142 -7) Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp diff -u llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.1 llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.2 --- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.1 Wed Nov 12 19:43:00 2003 +++ llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Wed Nov 12 23:05:41 2003 @@ -16,6 +16,8 @@ #include "llvm/Analysis/DataStructure.h" #include "llvm/Module.h" #include "llvm/Analysis/DSGraph.h" +#include "Support/SCCIterator.h" +#include "Support/STLExtras.h" using namespace llvm; namespace { @@ -23,7 +25,6 @@ X("cbudatastructure", "'Complete' Bottom-up Data Structure Analysis"); } -using namespace DS; // run - Calculate the bottom up data structure graphs for each function in the // program. @@ -62,14 +63,143 @@ } #endif - // Start by copying all of the BU data structures graphs over, verbatim. + std::vector Stack; + hash_map ValMap; + unsigned NextID = 1; + + if (Function *Main = M.getMainFunction()) { + calculateSCCGraphs(getOrCreateGraph(*Main), Stack, NextID, ValMap); + } else { + std::cerr << "CBU-DSA: No 'main' function found!\n"; + } + for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isExternal()) { - DSInfo[I] = new DSGraph(BU.getDSGraph(*I)); - DSInfo[I]->setGlobalsGraph(GlobalsGraph); - DSInfo[I]->setPrintAuxCalls(); + if (!I->isExternal() && !DSInfo.count(I)) + calculateSCCGraphs(getOrCreateGraph(*I), Stack, NextID, ValMap); + + return false; +} + +DSGraph &CompleteBUDataStructures::getOrCreateGraph(Function &F) { + // Has the graph already been created? + DSGraph *&Graph = DSInfo[&F]; + if (Graph) return *Graph; + + // Copy the BU graph... + Graph = new DSGraph(getAnalysis().getDSGraph(F)); + Graph->setGlobalsGraph(GlobalsGraph); + Graph->setPrintAuxCalls(); + + // Make sure to update the DSInfo map for all of the functions currently in + // this graph! + for (DSGraph::ReturnNodesTy::iterator I = Graph->getReturnNodes().begin(); + I != Graph->getReturnNodes().end(); ++I) + DSInfo[I->first] = Graph; + + return *Graph; +} + + + +unsigned CompleteBUDataStructures::calculateSCCGraphs(DSGraph &FG, + std::vector &Stack, + unsigned &NextID, + hash_map &ValMap) { + assert(!ValMap.count(&FG) && "Shouldn't revisit functions!"); + unsigned Min = NextID++, MyID = Min; + ValMap[&FG] = Min; + Stack.push_back(&FG); + + // The edges out of the current node are the call site targets... + for (unsigned i = 0, e = FG.getFunctionCalls().size(); i != e; ++i) { + Instruction *Call = FG.getFunctionCalls()[i].getCallSite().getInstruction(); + + // Loop over all of the actually called functions... + ActualCalleesTy::iterator I, E; + for (tie(I, E) = ActualCallees.equal_range(Call); I != E; ++I) { + DSGraph &Callee = getOrCreateGraph(*I->second); + unsigned M; + // Have we visited the destination function yet? + hash_map::iterator It = ValMap.find(&Callee); + if (It == ValMap.end()) // No, visit it now. + M = calculateSCCGraphs(Callee, Stack, NextID, ValMap); + else // Yes, get it's number. + M = It->second; + if (M < Min) Min = M; } + } + assert(ValMap[&FG] == MyID && "SCC construction assumption wrong!"); + if (Min != MyID) + return Min; // This is part of a larger SCC! + + // If this is a new SCC, process it now. + bool IsMultiNodeSCC = false; + while (Stack.back() != &FG) { + DSGraph *NG = Stack.back(); + ValMap[NG] = ~0U; + + DSGraph::NodeMapTy NodeMap; + FG.cloneInto(*NG, FG.getScalarMap(), FG.getReturnNodes(), NodeMap, 0); + + // Update the DSInfo map and delete the old graph... + for (DSGraph::ReturnNodesTy::iterator I = NG->getReturnNodes().begin(); + I != NG->getReturnNodes().end(); ++I) + DSInfo[I->first] = &FG; + delete NG; + + Stack.pop_back(); + IsMultiNodeSCC = true; + } - return false; + // Clean up the graph before we start inlining a bunch again... + if (IsMultiNodeSCC) + FG.removeTriviallyDeadNodes(); + + Stack.pop_back(); + processGraph(FG); + ValMap[&FG] = ~0U; + return MyID; +} + + +/// processGraph - Process the BU graphs for the program in bottom-up order on +/// the SCC of the __ACTUAL__ call graph. This builds "complete" BU graphs. +void CompleteBUDataStructures::processGraph(DSGraph &G) { + // The edges out of the current node are the call site targets... + for (unsigned i = 0, e = G.getFunctionCalls().size(); i != e; ++i) { + const DSCallSite &CS = G.getFunctionCalls()[i]; + Instruction *TheCall = CS.getCallSite().getInstruction(); + + // The Normal BU pass will have taken care of direct calls well already, + // don't worry about them. + if (!CS.getCallSite().getCalledFunction()) { + // Loop over all of the actually called functions... + ActualCalleesTy::iterator I, E; + for (tie(I, E) = ActualCallees.equal_range(TheCall); I != E; ++I) { + Function *CalleeFunc = I->second; + if (!CalleeFunc->isExternal()) { + // Merge the callee's graph into this graph. This works for normal + // calls or for self recursion within an SCC. + G.mergeInGraph(CS, *CalleeFunc, getOrCreateGraph(*CalleeFunc), + DSGraph::KeepModRefBits | + DSGraph::StripAllocaBit | + DSGraph::DontCloneCallNodes); + } + } + } + } + + // Re-materialize nodes from the globals graph. + // Do not ignore globals inlined from callees -- they are not up-to-date! + G.getInlinedGlobals().clear(); + G.updateFromGlobalGraph(); + + // Recompute the Incomplete markers + G.maskIncompleteMarkers(); + G.markIncompleteNodes(DSGraph::MarkFormalArgs); + + // Delete dead nodes. Treat globals that are unreachable but that can + // reach live nodes as live. + G.removeDeadNodes(DSGraph::KeepUnreachableGlobals); } Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.61 llvm/lib/Analysis/DataStructure/Printer.cpp:1.62 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.61 Wed Nov 12 17:11:14 2003 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Wed Nov 12 23:05:41 2003 @@ -283,3 +283,8 @@ printCollection(*this, O, M, "td."); } +void CompleteBUDataStructures::print(std::ostream &O, const Module *M) const { + printCollection(*this, O, M, "cbu."); +} + + From lattner at cs.uiuc.edu Wed Nov 12 23:06:11 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Nov 12 23:06:11 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DataStructure.h Message-ID: <200311130505.XAA20112@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DataStructure.h updated: 1.76 -> 1.77 --- Log message: Add methods for implementation --- Diffs of the changes: (+10 -0) Index: llvm/include/llvm/Analysis/DataStructure.h diff -u llvm/include/llvm/Analysis/DataStructure.h:1.76 llvm/include/llvm/Analysis/DataStructure.h:1.77 --- llvm/include/llvm/Analysis/DataStructure.h:1.76 Wed Nov 12 19:42:38 2003 +++ llvm/include/llvm/Analysis/DataStructure.h Wed Nov 12 23:05:34 2003 @@ -216,6 +216,16 @@ // globals graph has been implemented in the BU pass) AU.addRequired(); } + + // print - Print out the analysis results... + void print(std::ostream &O, const Module *M) const; + +private: + unsigned calculateSCCGraphs(DSGraph &FG, std::vector &Stack, + unsigned &NextID, + hash_map &ValMap); + DSGraph &getOrCreateGraph(Function &F); + void processGraph(DSGraph &G); }; From gaeke at cs.uiuc.edu Thu Nov 13 00:07:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu Nov 13 00:07:03 2003 Subject: [llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp ExternalFunctions.cpp Interpreter.h Message-ID: <200311130606.AAA28577@zion.cs.uiuc.edu> Changes in directory llvm/lib/ExecutionEngine/Interpreter: Execution.cpp updated: 1.114 -> 1.115 ExternalFunctions.cpp updated: 1.68 -> 1.69 Interpreter.h updated: 1.53 -> 1.54 --- Log message: Change LLI's internal representation of va_list to a pointer to the next argument to be returned by va_arg. This allows va_lists to be passed between different LLVM procedures (though it is unlikely that an LLI va_list would make sense to an external function, except by chance.) --- Diffs of the changes: (+15 -13) Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.114 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.115 --- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.114 Tue Nov 11 16:41:33 2003 +++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Thu Nov 13 00:06:01 2003 @@ -812,13 +812,14 @@ void Interpreter::visitVANextInst(VANextInst &I) { ExecutionContext &SF = ECStack.back(); - // Get the incoming valist element. LLI treats the valist as an integer. + // Get the incoming valist parameter. LLI treats the valist as a pointer + // to the next argument. GenericValue VAList = getOperandValue(I.getOperand(0), SF); - // Move to the next operand. - unsigned Argument = VAList.IntVal++; - assert(Argument < SF.VarArgs.size() && - "Accessing past the last vararg argument!"); + // Move the pointer to the next vararg. + GenericValue *ArgPtr = (GenericValue *) GVTOP (VAList); + ++ArgPtr; + VAList = PTOGV (ArgPtr); SetValue(&I, VAList, SF); } @@ -828,12 +829,11 @@ void Interpreter::visitVAArgInst(VAArgInst &I) { ExecutionContext &SF = ECStack.back(); - // Get the incoming valist element. LLI treats the valist as an integer. + // Get the incoming valist parameter. LLI treats the valist as a pointer + // to the next argument. GenericValue VAList = getOperandValue(I.getOperand(0), SF); - unsigned Argument = VAList.IntVal; - assert(Argument < SF.VarArgs.size() && - "Accessing past the last vararg argument!"); - GenericValue Dest, Src = SF.VarArgs[Argument]; + assert (GVTOP (VAList) != 0 && "VAList was null in vaarg instruction"); + GenericValue Dest, Src = *(GenericValue *) GVTOP (VAList); const Type *Ty = I.getType(); switch (Ty->getPrimitiveID()) { IMPLEMENT_VAARG(UByte); Index: llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp diff -u llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.68 llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.69 --- llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp:1.68 Tue Nov 11 16:41:33 2003 +++ llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Thu Nov 13 00:06:01 2003 @@ -696,9 +696,7 @@ // llvm.va_start() - Implement the va_start operation... GenericValue llvm_va_start(FunctionType *F, const vector &Args) { assert(Args.size() == 0); - GenericValue Val; - Val.UIntVal = 0; // Start at the first '...' argument... - return Val; + return TheInterpreter->getFirstVarArg(); } // void llvm.va_end( *) - Implement the va_end operation... Index: llvm/lib/ExecutionEngine/Interpreter/Interpreter.h diff -u llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.53 llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.54 --- llvm/lib/ExecutionEngine/Interpreter/Interpreter.h:1.53 Tue Nov 11 16:41:33 2003 +++ llvm/lib/ExecutionEngine/Interpreter/Interpreter.h Thu Nov 13 00:06:01 2003 @@ -146,6 +146,10 @@ AtExitHandlers.push_back(F); } + GenericValue *getFirstVarArg () { + return &(ECStack[ECStack.size () - 2].VarArgs[0]); + } + //FIXME: private: public: GenericValue executeGEPOperation(Value *Ptr, User::op_iterator I, From lattner at cs.uiuc.edu Thu Nov 13 00:16:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 00:16:03 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Message-ID: <200311130615.AAA28644@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: TransformFunctionBody.cpp updated: 1.12 -> 1.13 --- Log message: Don't bother transforming noop calls --- Diffs of the changes: (+3 -0) Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.12 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.13 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.12 Wed Nov 12 19:43:48 2003 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Thu Nov 13 00:15:09 2003 @@ -255,6 +255,9 @@ const PA::EquivClassInfo &ECI = PAInfo.getECIForIndirectCallSite(CallSite::get(OrigInst)); + if (ECI.ArgNodes.empty()) + return; // No arguments to add? Transformation is a noop! + // Here we fill in CF with one of the possible called functions. Because we // merged together all of the arguments to all of the functions in the // equivalence set, it doesn't really matter which one we pick. From lattner at cs.uiuc.edu Thu Nov 13 00:21:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 00:21:04 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2003-11-13-TypeSafety.c.tr Message-ID: <200311130620.AAA28738@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2003-11-13-TypeSafety.c.tr added (r1.1) --- Log message: NEW testcase for PR84 :( --- Diffs of the changes: (+5 -0) Index: llvm/test/Regression/CFrontend/2003-11-13-TypeSafety.c.tr diff -c /dev/null llvm/test/Regression/CFrontend/2003-11-13-TypeSafety.c.tr:1.1 *** /dev/null Thu Nov 13 00:20:06 2003 --- llvm/test/Regression/CFrontend/2003-11-13-TypeSafety.c.tr Thu Nov 13 00:19:56 2003 *************** *** 0 **** --- 1,5 ---- + // RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep getelementptr + + int *test(int *X, int Y) { + return X + Y; + } From alkis at cs.uiuc.edu Thu Nov 13 03:50:01 2003 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu Nov 13 03:50:01 2003 Subject: [llvm-commits] [regalloc_linearscan] CVS: llvm/include/llvm/CodeGen/LiveIntervals.h Message-ID: <200311130949.DAA14900@morpheus.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: LiveIntervals.h updated: 1.1.2.8 -> 1.1.2.9 --- Log message: Add support for computing live intervals of physical registers. This is currently disabled because the register allocator doesn't know how to handle them. --- Diffs of the changes: (+18 -1) Index: llvm/include/llvm/CodeGen/LiveIntervals.h diff -u llvm/include/llvm/CodeGen/LiveIntervals.h:1.1.2.8 llvm/include/llvm/CodeGen/LiveIntervals.h:1.1.2.9 --- llvm/include/llvm/CodeGen/LiveIntervals.h:1.1.2.8 Wed Nov 12 00:49:56 2003 +++ llvm/include/llvm/CodeGen/LiveIntervals.h Thu Nov 13 03:48:53 2003 @@ -135,6 +135,8 @@ MachineBasicBlock::iterator currentInstr_; LiveVariables* lv_; + std::vector allocatableRegisters_; + typedef std::map MbbIndex2MbbMap; MbbIndex2MbbMap mbbi2mbbMap_; @@ -170,10 +172,25 @@ /// computeIntervals - compute live intervals void computeIntervals(); + /// handleRegisterDef - update intervals for a register def + /// (calls handlePhysicalRegisterDef and + /// handleVirtualRegisterDef) void handleRegisterDef(MachineBasicBlock* mbb, - MachineInstr* instr, + MachineBasicBlock::iterator mi, unsigned reg); + + /// handleVirtualRegisterDef - update intervals for a virtual + /// register def + void handleVirtualRegisterDef(MachineBasicBlock* mbb, + MachineBasicBlock::iterator mi, + unsigned reg); + + /// handlePhysicalRegisterDef - update intervals for a + /// physical register def + void handlePhysicalRegisterDef(MachineBasicBlock* mbb, + MachineBasicBlock::iterator mi, + unsigned reg); unsigned getInstructionIndex(MachineInstr* instr) const; From alkis at cs.uiuc.edu Thu Nov 13 03:50:12 2003 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu Nov 13 03:50:12 2003 Subject: [llvm-commits] [regalloc_linearscan] CVS: llvm/lib/CodeGen/LiveIntervals.cpp Message-ID: <200311130949.DAA14891@morpheus.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervals.cpp updated: 1.1.2.9 -> 1.1.2.10 --- Log message: Add support for computing live intervals of physical registers. This is currently disabled because the register allocator doesn't know how to handle them. --- Diffs of the changes: (+99 -10) Index: llvm/lib/CodeGen/LiveIntervals.cpp diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.1.2.9 llvm/lib/CodeGen/LiveIntervals.cpp:1.1.2.10 --- llvm/lib/CodeGen/LiveIntervals.cpp:1.1.2.9 Wed Nov 12 00:49:55 2003 +++ llvm/lib/CodeGen/LiveIntervals.cpp Thu Nov 13 03:48:51 2003 @@ -59,6 +59,7 @@ tm_ = &fn.getTarget(); mri_ = tm_->getRegisterInfo(); lv_ = &getAnalysis(); + allocatableRegisters_.clear(); mbbi2mbbMap_.clear(); mi2iMap_.clear(); r2iMap_.clear(); @@ -67,6 +68,20 @@ mii2mbbMap_.clear(); mbb2miiMap_.clear(); + // mark allocatable registers + allocatableRegisters_.resize(MRegisterInfo::FirstVirtualRegister); + // Loop over all of the register classes... + for (MRegisterInfo::regclass_iterator + rci = mri_->regclass_begin(), rce = mri_->regclass_end(); + rci != rce; ++rci) { + // Loop over all of the allocatable registers in the function... + for (TargetRegisterClass::iterator + i = (*rci)->allocation_order_begin(*mf_), + e = (*rci)->allocation_order_end(*mf_); i != e; ++i) { + allocatableRegisters_[*i] = true; // The reg is allocatable! + } + } + // number MachineInstrs unsigned miIndex = 0; for (MachineFunction::iterator mbb = mf_->begin(), mbbEnd = mf_->end(); @@ -103,13 +118,13 @@ std::cerr << '%' << reg; } -void LiveIntervals::handleRegisterDef(MachineBasicBlock* mbb, - MachineInstr* instr, - unsigned reg) +void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock* mbb, + MachineBasicBlock::iterator mi, + unsigned reg) { DEBUG(std::cerr << "\t\t\tregister: ";printRegName(reg); std::cerr << '\n'); - unsigned instrIndex = getInstructionIndex(instr); + unsigned instrIndex = getInstructionIndex(*mi); LiveVariables::VarInfo& vi = lv_->getVarInfo(reg); @@ -155,10 +170,10 @@ unsigned start = (mbb == killerBlock ? instrIndex : getInstructionIndex(killerBlock->front())); - unsigned end = getInstructionIndex(killerInstr) + 1; - DEBUG(std::cerr << "\t\t\t\tadding range: [" - << start << ',' << end << "]\n"); - interval.addRange(start, end); + unsigned end = getInstructionIndex(killerInstr) + 1; + DEBUG(std::cerr << "\t\t\t\tadding range: [" + << start << ',' << end << "]\n"); + interval.addRange(start, end); } if (!killedInDefiningBasicBlock) { @@ -170,6 +185,74 @@ } } +void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb, + MachineBasicBlock::iterator mi, + unsigned reg) +{ + DEBUG(std::cerr << "\t\t\tregister: ";printRegName(reg); std::cerr << '\n'); + + unsigned start = getInstructionIndex(*mi); + unsigned end = start; + + for (MachineBasicBlock::iterator e = mbb->end(); mi != e; ++mi) { + for (LiveVariables::killed_iterator + ki = lv_->dead_begin(*mi), + ke = lv_->dead_end(*mi); + ki != ke; ++ki) { + if (reg == ki->second) { + end = getInstructionIndex(ki->first) + 1; + goto exit; + } + } + + for (LiveVariables::killed_iterator + ki = lv_->killed_begin(*mi), + ke = lv_->killed_end(*mi); + ki != ke; ++ki) { + if (reg == ki->second) { + end = getInstructionIndex(ki->first) + 1; + goto exit; + } + } + } +exit: + assert(start < end && "did not find end of interval?"); + + Reg2IntervalMap::iterator r2iit = r2iMap_.find(reg); + if (r2iit != r2iMap_.end()) { + unsigned ii = r2iit->second; + Interval& interval = intervals_[ii]; + DEBUG(std::cerr << "\t\t\t\tadding range: [" + << start << ',' << end << "]\n"); + interval.addRange(start, end); + DEBUG(std::cerr << "\t\t\t\t" << interval << '\n'); + } + else { + intervals_.push_back(Interval(reg)); + Interval& interval = intervals_.back(); + // update interval index for this register + r2iMap_[reg] = intervals_.size() - 1; + DEBUG(std::cerr << "\t\t\t\tadding range: [" + << start << ',' << end << "]\n"); + interval.addRange(start, end); + DEBUG(std::cerr << "\t\t\t\t" << interval << '\n'); + } +} + +void LiveIntervals::handleRegisterDef(MachineBasicBlock* mbb, + MachineBasicBlock::iterator mi, + unsigned reg) +{ + if (reg < MRegisterInfo::FirstVirtualRegister) { + if (allocatableRegisters_[reg]) { + handlePhysicalRegisterDef(mbb, mi, reg); + } + } + else { + handleVirtualRegisterDef(mbb, mi, reg); + } +} + unsigned LiveIntervals::getInstructionIndex(MachineInstr* instr) const { assert(mi2iMap_.find(instr) != mi2iMap_.end() && @@ -200,6 +283,13 @@ << getInstructionIndex(instr) << "]: "; instr->print(std::cerr, *tm_);); + // handle implicit defs +// for (const unsigned* id = tid.ImplicitDefs; *id; ++id) { +// unsigned physReg = *id; +// handlePhysicalRegisterDef(mbb, mi, physReg); +// } + + // handle explicit defs for (int i = instr->getNumOperands() - 1; i >= 0; --i) { MachineOperand& mop = instr->getOperand(i); @@ -208,8 +298,7 @@ if (mop.opIsDefOnly() || mop.opIsDefAndUse()) { unsigned reg = mop.getAllocatedRegNum(); - - handleRegisterDef(mbb, instr, reg); + handleVirtualRegisterDef(mbb, mi, reg); } } } From alkis at cs.uiuc.edu Thu Nov 13 03:51:01 2003 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Thu Nov 13 03:51:01 2003 Subject: [llvm-commits] [regalloc_linearscan] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp Message-ID: <200311130950.DAA14927@morpheus.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocLinearScan.cpp updated: 1.1.2.11 -> 1.1.2.12 --- Log message: Add assertion in reservePhysicalRegister. --- Diffs of the changes: (+2 -1) Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.11 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.12 --- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.11 Wed Nov 12 00:49:55 2003 +++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Thu Nov 13 03:49:50 2003 @@ -508,7 +508,8 @@ << mri_->getName(physReg) << '\n'); // if this register holds a value spill it unsigned virtReg = p2vMap_[physReg]; - if (virtReg != 0 && virtReg != physReg) { + if (virtReg != 0) { + assert(virtReg != physReg && "reserving an already reserved phus reg?"); // remove interval from active for (IntervalPtrs::iterator i = active_.begin(), e = active_.end(); i != e; ++i) { From lattner at cs.uiuc.edu Thu Nov 13 10:32:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 10:32:01 2003 Subject: [llvm-commits] CVS: poolalloc/include/poolalloc/PoolAllocate.h Message-ID: <200311131631.KAA22498@zion.cs.uiuc.edu> Changes in directory poolalloc/include/poolalloc: PoolAllocate.h updated: 1.19 -> 1.20 --- Log message: Yes, I forgot to check in the header again, I'm a putz --- Diffs of the changes: (+4 -6) Index: poolalloc/include/poolalloc/PoolAllocate.h diff -u poolalloc/include/poolalloc/PoolAllocate.h:1.19 poolalloc/include/poolalloc/PoolAllocate.h:1.20 --- poolalloc/include/poolalloc/PoolAllocate.h:1.19 Wed Nov 12 17:00:58 2003 +++ poolalloc/include/poolalloc/PoolAllocate.h Thu Nov 13 10:30:48 2003 @@ -20,8 +20,7 @@ namespace llvm { -class BUDataStructures; -class TDDataStructures; +class CompleteBUDataStructures; class DSNode; class DSGraph; class Type; @@ -96,8 +95,7 @@ /// class PoolAllocate : public Pass { Module *CurModule; - BUDataStructures *BU; - TDDataStructures *TDDS; + CompleteBUDataStructures *BU; std::map FunctionInfo; @@ -131,7 +129,7 @@ virtual void getAnalysisUsage(AnalysisUsage &AU) const; - BUDataStructures &getBUDataStructures() const { return *BU; } + CompleteBUDataStructures &getBUDataStructures() const { return *BU; } //Dinakar to get function info for all (cloned functions) PA::FuncInfo *getFunctionInfo(Function *F) { @@ -197,7 +195,7 @@ void CreatePools(Function &F, const std::vector &NodesToPA, std::map &PoolDescriptors); - void TransformBody(DSGraph &g, DSGraph &tdg, PA::FuncInfo &fi, + void TransformBody(DSGraph &g, PA::FuncInfo &fi, std::set > &poolUses, std::set > &poolFrees, Function &F); From lattner at cs.uiuc.edu Thu Nov 13 11:12:08 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 11:12:08 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311131711.LAA26878@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.48 -> 1.49 --- Log message: Fix the -poolalloc-force-simple-pool-init to work right, fixing voronoi! --- Diffs of the changes: (+14 -7) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.48 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.49 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.48 Wed Nov 12 19:43:48 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Thu Nov 13 11:10:58 2003 @@ -666,7 +666,8 @@ PoolInitPoints.push_back(InsertPoint); for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) - if (isa(BB->getTerminator())) + if (isa(BB->getTerminator()) || + isa(BB->getTerminator())) PoolDestroyPoints.push_back(BB->getTerminator()); } @@ -738,7 +739,8 @@ while (!PoolUses.count(std::make_pair(PD, It))) // Advance past non-users deleting any pool frees that we run across DeleteIfIsPoolFree(It++, PD, PoolFrees); - PoolInitPoints.push_back(It); + if (!DisableInitDestroyOpt) + PoolInitPoints.push_back(It); PoolInitInsertedBlocks.insert(BB); } } else if (!AllIn) { @@ -750,7 +752,8 @@ goto TryAgainPred; // Insert at the end of the predecessor, before the terminator. - PoolInitPoints.push_back((*PI)->getTerminator()); + if (!DisableInitDestroyOpt) + PoolInitPoints.push_back((*PI)->getTerminator()); PoolInitInsertedBlocks.insert(*PI); } } @@ -770,7 +773,8 @@ DeleteIfIsPoolFree(It--, PD, PoolFrees); // Insert after the first using instruction - PoolDestroyPoints.push_back(++It); + if (!DisableInitDestroyOpt) + PoolDestroyPoints.push_back(++It); PoolDestroyInsertedBlocks.insert(BB); } } else if (!AllIn) { @@ -782,7 +786,8 @@ // Insert at entry to the successor, but after any PHI nodes. BasicBlock::iterator It = (*SI)->begin(); while (isa(It)) ++It; - PoolDestroyPoints.push_back(It); + if (!DisableInitDestroyOpt) + PoolDestroyPoints.push_back(It); PoolDestroyInsertedBlocks.insert(*SI); } } @@ -795,7 +800,8 @@ PoolInitPoints[i]); DEBUG(std::cerr << PoolInitPoints[i]->getParent()->getName() << " "); } - PoolInitPoints.clear(); + if (!DisableInitDestroyOpt) + PoolInitPoints.clear(); DEBUG(std::cerr << "\n Destroy in blocks: "); @@ -816,7 +822,8 @@ CalculateLivePoolFreeBlocks(PoolFreeLiveBlocks, PD); else PoolFreeLiveBlocks = LiveBlocks; - PoolDestroyPoints.clear(); + if (!DisableInitDestroyOpt) + PoolDestroyPoints.clear(); // Delete any pool frees which are not in live blocks, for correctness. std::set >::iterator PFI = From lattner at cs.uiuc.edu Thu Nov 13 11:14:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 11:14:01 2003 Subject: [llvm-commits] CVS: poolalloc/test/TEST.poolalloc.Makefile Message-ID: <200311131713.LAA28727@zion.cs.uiuc.edu> Changes in directory poolalloc/test: TEST.poolalloc.Makefile updated: 1.6 -> 1.7 --- Log message: Link in the C++ runtime library, disable the init/destroy moving code --- Diffs of the changes: (+7 -3) Index: poolalloc/test/TEST.poolalloc.Makefile diff -u poolalloc/test/TEST.poolalloc.Makefile:1.6 poolalloc/test/TEST.poolalloc.Makefile:1.7 --- poolalloc/test/TEST.poolalloc.Makefile:1.6 Sun Oct 26 17:26:57 2003 +++ poolalloc/test/TEST.poolalloc.Makefile Thu Nov 13 11:13:40 2003 @@ -5,6 +5,10 @@ # ##===----------------------------------------------------------------------===## +CFLAGS = -O3 + +EXTRA_PA_FLAGS := -poolalloc-force-simple-pool-init + CURDIR := $(shell cd .; pwd) PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/ RELDIR := $(subst $(PROGDIR),,$(CURDIR)) @@ -13,7 +17,7 @@ PA_SO := $(PROJECT_DIR)/lib/Debug/libpoolalloc.so # Pool allocator runtime library -PA_RT := $(PROJECT_DIR)/lib/Bytecode/libpoolalloc_rt.bc +PA_RT := $(PROJECT_DIR)/lib/Bytecode/libpoolalloc_fl_rt.bc PA_RT_O := $(PROJECT_DIR)/lib/Release/poolalloc_rt.o @@ -28,7 +32,7 @@ # file $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).transformed.bc): \ Output/%.$(TEST).transformed.bc: Output/%.llvm.bc $(PA_SO) - -$(OPT_PA_STATS) -q -poolalloc -deadargelim -globaldce $< -o $@ -f 2>&1 > $@.out + -$(OPT_PA_STATS) -q -poolalloc $(EXTRA_PA_FLAGS) -globaldce -ipconstprop -deadargelim $< -o $@ -f 2>&1 > $@.out # This rule compiles the new .bc file into a .c file using CBE $(PROGRAMS_TO_TEST:%=Output/%.poolalloc.cbe.c): \ @@ -38,7 +42,7 @@ # This rule compiles the .c file into an executable using $CC $(PROGRAMS_TO_TEST:%=Output/%.poolalloc.cbe): \ Output/%.poolalloc.cbe: Output/%.poolalloc.cbe.c $(PA_RT_O) - -$(CC) $(CFLAGS) $< $(PA_RT_O) $(LLCLIBS) $(LDFLAGS) -o $@ + -$(CC) $(CFLAGS) $< $(PA_RT_O) $(LLCLIBS) $(LDFLAGS) -lstdc++ -o $@ # This rule runs the generated executable, generating timing information $(PROGRAMS_TO_TEST:%=Output/%.poolalloc.out-cbe): \ From lattner at cs.uiuc.edu Thu Nov 13 11:14:11 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 11:14:11 2003 Subject: [llvm-commits] CVS: poolalloc/test/TEST.poolalloc.report Message-ID: <200311131713.LAA28620@zion.cs.uiuc.edu> Changes in directory poolalloc/test: TEST.poolalloc.report updated: 1.5 -> 1.6 --- Log message: Update report, keep track of how many poolfree's are deleted --- Diffs of the changes: (+2 -1) Index: poolalloc/test/TEST.poolalloc.report diff -u poolalloc/test/TEST.poolalloc.report:1.5 poolalloc/test/TEST.poolalloc.report:1.6 --- poolalloc/test/TEST.poolalloc.report:1.5 Sun Oct 26 17:26:57 2003 +++ poolalloc/test/TEST.poolalloc.report Thu Nov 13 11:13:16 2003 @@ -28,9 +28,10 @@ ["Normal
    ExeTime" , 'CBE-RUN-TIME-NORMAL: real[\t ]+0m([0-9.]+)'], ["PoolAlloc
    ExeTime", 'CBE-RUN-TIME-POOLALLOC: real[\t ]+0m([0-9.]+)'], ["% Speedup", \&Ratio], # Normal / PA - ["NumPools", '([0-9]+).*Number of poolinit.s inserted'], + ["NumPools", '([0-9]+).*Number of pools allocated'], ["NumCloned", '([0-9]+).*Number of functions cloned'], ["NumArgs", '([0-9]+).*Number of function arguments added'], + ["NumPRElide", '([0-9]+).*Number of poolfree.s elided'], [] ); From lattner at cs.uiuc.edu Thu Nov 13 11:20:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 11:20:01 2003 Subject: [llvm-commits] CVS: poolalloc/test/Makefile Message-ID: <200311131719.LAA31130@zion.cs.uiuc.edu> Changes in directory poolalloc/test: Makefile updated: 1.3 -> 1.4 --- Log message: Run stuff with LARGE_PROBLEM_SIZE --- Diffs of the changes: (+1 -1) Index: poolalloc/test/Makefile diff -u poolalloc/test/Makefile:1.3 poolalloc/test/Makefile:1.4 --- poolalloc/test/Makefile:1.3 Thu Aug 21 11:04:40 2003 +++ poolalloc/test/Makefile Thu Nov 13 11:19:23 2003 @@ -15,6 +15,6 @@ # tests... test:: (cd $(LLVM_SRC_ROOT)/test/Programs/$(SUBDIR); \ - PROJECT_DIR=$(BUILD_OBJ_ROOT) $(MAKE) TEST=poolalloc \ + PROJECT_DIR=$(BUILD_OBJ_ROOT) $(MAKE) LARGE_PROBLEM_SIZE=1 TEST=poolalloc \ report report.html ) @printf "\a"; sleep 1; printf "\a"; sleep 1; printf "\a" From criswell at cs.uiuc.edu Thu Nov 13 11:34:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Nov 13 11:34:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PageManager.cpp PageManager.h PoolAllocator.cpp PoolAllocator.h Message-ID: <200311131733.LAA02026@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PageManager.cpp updated: 1.4 -> 1.5 PageManager.h updated: 1.2 -> 1.3 PoolAllocator.cpp updated: 1.13 -> 1.14 PoolAllocator.h updated: 1.5 -> 1.6 --- Log message: Remove the use of finding PageSize as a global variable. That might have linking problems, and we'll probably want to do this anyway for multi-page data blocks. --- Diffs of the changes: (+27 -15) Index: poolalloc/runtime/FreeListAllocator/PageManager.cpp diff -u poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.4 poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.5 --- poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.4 Wed Nov 12 16:46:26 2003 +++ poolalloc/runtime/FreeListAllocator/PageManager.cpp Thu Nov 13 11:33:30 2003 @@ -25,7 +25,7 @@ // Empirically, this slows down the pool allocator a LOT. #define USE_MEMALIGN 0 -unsigned PageSize = 0; +static unsigned PageSize = 0; // Explicitly use the malloc allocator here, to avoid depending on the C++ // runtime library. @@ -39,8 +39,13 @@ // This function initializes the Page Manager code. It must be called before // any other Page Manager functions are called. // -void InitializePageManager() { - if (!PageSize) PageSize = sysconf(_SC_PAGESIZE); +unsigned int InitializePageManager() { + if (!PageSize) + { + PageSize = sysconf(_SC_PAGESIZE); + FreePages = 0; + } + return PageSize; } #if !USE_MEMALIGN Index: poolalloc/runtime/FreeListAllocator/PageManager.h diff -u poolalloc/runtime/FreeListAllocator/PageManager.h:1.2 poolalloc/runtime/FreeListAllocator/PageManager.h:1.3 --- poolalloc/runtime/FreeListAllocator/PageManager.h:1.2 Tue Nov 11 14:13:42 2003 +++ poolalloc/runtime/FreeListAllocator/PageManager.h Thu Nov 13 11:33:30 2003 @@ -18,13 +18,13 @@ /// InitializePageManager - This function must be called before any other page /// manager accesses are performed. It may be called multiple times. /// -void InitializePageManager(); +unsigned int InitializePageManager(); /// PageSize - Contains the size of the unit of memory allocated by /// AllocatePage. This is a value that is typically several kilobytes in size, /// and is guaranteed to be a power of two. /// -extern unsigned PageSize; +///extern unsigned PageSize; /// AllocatePage - This function returns a chunk of memory with size and /// alignment specified by getPageSize(). Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.13 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.14 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.13 Tue Nov 11 20:46:21 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Thu Nov 13 11:33:30 2003 @@ -35,7 +35,7 @@ // Allocate memory for a new slab and initialize the slab. // struct SlabHeader * -createSlab (unsigned int NodeSize, unsigned int NodesPerSlab = 0) +createSlab (PoolTy * Pool, unsigned int NodesPerSlab = 0) { // Maximum number of nodes per page unsigned int MaxNodesPerPage; @@ -43,6 +43,10 @@ // Pointer to the new Slab struct SlabHeader * NewSlab; + // Save locally the node size + unsigned int NodeSize = Pool->NodeSize; + unsigned int PageSize = Pool->PageSize; + // // Determine how many nodes can exist within a regular slab. // @@ -53,7 +57,7 @@ // if (NodeSize > PageSize) { - fprintf (stderr, "Node size is too big.\n"); + fprintf (stderr, "Node size %d is larger than page size %d.\n", NodeSize, PageSize); fflush (stderr); abort(); } @@ -112,7 +116,7 @@ // Find the slab that owns this block. // struct SlabHeader * -BlockOwner (NodePointer p) +BlockOwner (unsigned int PageSize, NodePointer p) { // // Convert the node pointer into a slab pointer. @@ -127,7 +131,7 @@ // This function finds the slab that owns this data block. // struct SlabHeader * -DataOwner (void * p) +DataOwner (unsigned int PageSize, void * p) { return reinterpret_cast(reinterpret_cast(p) & ~(PageSize - 1)); } @@ -179,7 +183,7 @@ // // Initialize the page manager. // - InitializePageManager (); + Pool->PageSize = InitializePageManager (); return; } @@ -237,7 +241,7 @@ // if (Pool->Slabs == NULL) { - Pool->Slabs = createSlab (Pool->NodeSize); + Pool->Slabs = createSlab (Pool); (Pool->Slabs->NextFreeData)++; return (Pool->Slabs->Data); } @@ -264,7 +268,7 @@ // // Create a new slab and add it to the list. // - struct SlabHeader * NewSlab = createSlab (Pool->NodeSize); + struct SlabHeader * NewSlab = createSlab (Pool); NewSlab->Next = Pool->Slabs; Pool->Slabs = NewSlab; @@ -286,7 +290,7 @@ // // Determine which slab owns this block. // - struct SlabHeader * slabp = BlockOwner (Pool->FreeList); + struct SlabHeader * slabp = BlockOwner (Pool->PageSize, Pool->FreeList); // // Find the data block that corresponds with this pointer. @@ -350,7 +354,7 @@ // // Create a new slab and mark it as an array. // - struct SlabHeader * NewSlab = createSlab (Pool->NodeSize, ArraySize); + struct SlabHeader * NewSlab = createSlab (Pool, ArraySize); NewSlab->IsArray = 1; // @@ -368,7 +372,7 @@ // // Find the header of the memory block. // - struct SlabHeader * slabp = DataOwner (Block); + struct SlabHeader * slabp = DataOwner (Pool->PageSize, Block); // // If the owning slab is an array, add it back to the free array list. Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.5 poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.6 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.5 Tue Nov 11 20:46:21 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.h Thu Nov 13 11:33:30 2003 @@ -18,6 +18,9 @@ #include "PoolSlab.h" typedef struct PoolTy { + // The size of a page on this system + unsigned int PageSize; + // NodeSize - Keep track of the object size tracked by this pool unsigned NodeSize; From criswell at cs.uiuc.edu Thu Nov 13 11:47:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Nov 13 11:47:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311131746.LAA02765@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.14 -> 1.15 --- Log message: Modified the code so that poolalloc() calls poolallocarray() if the requested number of bytes is too small. Minor commenting added. --- Diffs of the changes: (+33 -4) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.14 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.15 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.14 Thu Nov 13 11:33:30 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Thu Nov 13 11:46:00 2003 @@ -168,9 +168,20 @@ // //===----------------------------------------------------------------------===// -// poolinit - Initialize a pool descriptor to empty // -void poolinit(PoolTy *Pool, unsigned int NodeSize) +// Function: poolinit () +// +// Description: +// Initialize a pool descriptor for a new pool. +// +// Inputs: +// NodeSize - The typical size allocated for this pool. +// +// Outputs: +// Pool - An initialized pool. +// +void +poolinit (PoolTy *Pool, unsigned int NodeSize) { assert(Pool && "Null pool pointer passed into poolinit!\n"); @@ -228,12 +239,30 @@ return; } +// +// Function: poolalloc () +// +// Description: +// Allocates memory from the pool. Typically, we will allocate memory +// in the same size chunks as we usually do, but sometimes, we will have to +// allocate more. +// void * -poolalloc(PoolTy *Pool, unsigned NodeSize) +poolalloc(PoolTy *Pool, unsigned BytesWanted) { + // Pointer to the data block to return void * Data; + assert(Pool && "Null pool pointer passed in to poolalloc!\n"); - assert((NodeSize <= Pool->NodeSize) && "Wrong Node Size!\n"); + + // + // Determine if we can satisfy this request normally. If not, then + // we need to use the array allocation instead. + // + if (Pool->NodeSize < BytesWanted) + { + return (poolallocarray (Pool, (BytesWanted / Pool->NodeSize) + 1)); + } // // If we don't have a slab, this is our first initialization. Do some From criswell at cs.uiuc.edu Thu Nov 13 11:52:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Nov 13 11:52:01 2003 Subject: [llvm-commits] CVS: poolalloc/test/Makefile Message-ID: <200311131751.LAA04289@choi.cs.uiuc.edu> Changes in directory poolalloc/test: Makefile updated: 1.4 -> 1.5 --- Log message: Tests are run in the object tree, not the source tree. --- Diffs of the changes: (+1 -1) Index: poolalloc/test/Makefile diff -u poolalloc/test/Makefile:1.4 poolalloc/test/Makefile:1.5 --- poolalloc/test/Makefile:1.4 Thu Nov 13 11:19:23 2003 +++ poolalloc/test/Makefile Thu Nov 13 11:50:57 2003 @@ -14,7 +14,7 @@ # test target - Descend into test/Programs and run the TEST.poolalloc.Makefile # tests... test:: - (cd $(LLVM_SRC_ROOT)/test/Programs/$(SUBDIR); \ + (cd $(LLVM_OBJ_ROOT)/test/Programs/$(SUBDIR); \ PROJECT_DIR=$(BUILD_OBJ_ROOT) $(MAKE) LARGE_PROBLEM_SIZE=1 TEST=poolalloc \ report report.html ) @printf "\a"; sleep 1; printf "\a"; sleep 1; printf "\a" From lattner at cs.uiuc.edu Thu Nov 13 11:54:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 11:54:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/Olden/bisort/Makefile Message-ID: <200311131753.LAA03156@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/Olden/bisort: Makefile updated: 1.6 -> 1.7 --- Log message: Take ~10s to run the test --- Diffs of the changes: (+1 -1) Index: llvm/test/Programs/MultiSource/Benchmarks/Olden/bisort/Makefile diff -u llvm/test/Programs/MultiSource/Benchmarks/Olden/bisort/Makefile:1.6 llvm/test/Programs/MultiSource/Benchmarks/Olden/bisort/Makefile:1.7 --- llvm/test/Programs/MultiSource/Benchmarks/Olden/bisort/Makefile:1.6 Fri Sep 12 11:02:23 2003 +++ llvm/test/Programs/MultiSource/Benchmarks/Olden/bisort/Makefile Thu Nov 13 11:53:25 2003 @@ -5,7 +5,7 @@ LDFLAGS = -lm ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = 7000000 +RUN_OPTIONS = 3000000 else RUN_OPTIONS = 700000 endif From brukman at cs.uiuc.edu Thu Nov 13 12:04:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Nov 13 12:04:01 2003 Subject: [llvm-commits] CVS: llvm/runtime/GCCLibraries/libc/LICENSE.TXT Message-ID: <200311131803.MAA04795@zion.cs.uiuc.edu> Changes in directory llvm/runtime/GCCLibraries/libc: LICENSE.TXT updated: 1.1 -> 1.2 --- Log message: Fixed word order. --- Diffs of the changes: (+1 -1) Index: llvm/runtime/GCCLibraries/libc/LICENSE.TXT diff -u llvm/runtime/GCCLibraries/libc/LICENSE.TXT:1.1 llvm/runtime/GCCLibraries/libc/LICENSE.TXT:1.2 --- llvm/runtime/GCCLibraries/libc/LICENSE.TXT:1.1 Mon Oct 13 15:34:27 2003 +++ llvm/runtime/GCCLibraries/libc/LICENSE.TXT Thu Nov 13 12:03:11 2003 @@ -1,5 +1,5 @@ libc ------------------------------------------------------------------------------ The stripped down C library found in llvm/runtime/GCCLibraries/libc is licensed -to you under the Lesser GNU Public General License. +to you under the GNU Lesser General Public License (LGPL). From criswell at cs.uiuc.edu Thu Nov 13 12:04:12 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Nov 13 12:04:12 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311131803.MAA04365@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.15 -> 1.16 --- Log message: In poolalloc(), changed the calculation of the number of nodes to allocate in an array so that we don't waste a block if we fall on a node size boundary. Thanks to Chris for suggesting the change. --- Diffs of the changes: (+1 -1) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.15 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.16 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.15 Thu Nov 13 11:46:00 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Thu Nov 13 12:03:10 2003 @@ -261,7 +261,7 @@ // if (Pool->NodeSize < BytesWanted) { - return (poolallocarray (Pool, (BytesWanted / Pool->NodeSize) + 1)); + return (poolallocarray (Pool, (BytesWanted+Pool->NodeSize-1)/Pool->NodeSize)); } // From lattner at cs.uiuc.edu Thu Nov 13 12:49:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 12:49:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Message-ID: <200311131848.MAA17698@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: CompleteBottomUp.cpp updated: 1.2 -> 1.3 --- Log message: Trying to get the dsgraph for an external function is bad for DSA's health --- Diffs of the changes: (+12 -11) Index: llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp diff -u llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.2 llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.3 --- llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp:1.2 Wed Nov 12 23:05:41 2003 +++ llvm/lib/Analysis/DataStructure/CompleteBottomUp.cpp Thu Nov 13 12:48:11 2003 @@ -116,17 +116,18 @@ // Loop over all of the actually called functions... ActualCalleesTy::iterator I, E; - for (tie(I, E) = ActualCallees.equal_range(Call); I != E; ++I) { - DSGraph &Callee = getOrCreateGraph(*I->second); - unsigned M; - // Have we visited the destination function yet? - hash_map::iterator It = ValMap.find(&Callee); - if (It == ValMap.end()) // No, visit it now. - M = calculateSCCGraphs(Callee, Stack, NextID, ValMap); - else // Yes, get it's number. - M = It->second; - if (M < Min) Min = M; - } + for (tie(I, E) = ActualCallees.equal_range(Call); I != E; ++I) + if (!I->second->isExternal()) { + DSGraph &Callee = getOrCreateGraph(*I->second); + unsigned M; + // Have we visited the destination function yet? + hash_map::iterator It = ValMap.find(&Callee); + if (It == ValMap.end()) // No, visit it now. + M = calculateSCCGraphs(Callee, Stack, NextID, ValMap); + else // Yes, get it's number. + M = It->second; + if (M < Min) Min = M; + } } assert(ValMap[&FG] == MyID && "SCC construction assumption wrong!"); From lattner at cs.uiuc.edu Thu Nov 13 13:06:04 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 13:06:04 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll Message-ID: <200311131905.NAA25189@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: 2003-11-13-ConstExprCastCall.ll added (r1.1) --- Log message: Instcombine should promote this, and because it isn't, we are failing poolalloc tests --- Diffs of the changes: (+9 -0) Index: llvm/test/Regression/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll diff -c /dev/null llvm/test/Regression/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll:1.1 *** /dev/null Thu Nov 13 13:05:28 2003 --- llvm/test/Regression/Transforms/InstCombine/2003-11-13-ConstExprCastCall.ll Thu Nov 13 13:05:15 2003 *************** *** 0 **** --- 1,9 ---- + ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep call | not grep cast + + declare void %free(sbyte*) + + void %test(int* %X) { + call int (...)* cast (void (sbyte*)* %free to int (...)*)(int * %X) + ret void + } + From lattner at cs.uiuc.edu Thu Nov 13 13:18:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 13:18:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200311131917.NAA32544@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.142 -> 1.143 --- Log message: Implement feature: InstCombine/2003-11-13-ConstExprCastCall.ll --- Diffs of the changes: (+2 -1) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.142 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.143 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.142 Tue Nov 11 16:41:33 2003 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu Nov 13 13:17:02 2003 @@ -1801,7 +1801,8 @@ const Type *OldRetTy = Caller->getType(); if (Callee->isExternal() && - !OldRetTy->isLosslesslyConvertibleTo(FT->getReturnType())) + !OldRetTy->isLosslesslyConvertibleTo(FT->getReturnType()) && + !Caller->use_empty()) return false; // Cannot transform this return value... unsigned NumActualArgs = unsigned(CS.arg_end()-CS.arg_begin()); From lattner at cs.uiuc.edu Thu Nov 13 13:28:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 13:28:01 2003 Subject: [llvm-commits] CVS: llvm/tools/gccas/gccas.cpp Message-ID: <200311131927.NAA08518@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccas: gccas.cpp updated: 1.84 -> 1.85 --- Log message: As the comments indicate, this is a temporary, repulsive, hack --- Diffs of the changes: (+6 -0) Index: llvm/tools/gccas/gccas.cpp diff -u llvm/tools/gccas/gccas.cpp:1.84 llvm/tools/gccas/gccas.cpp:1.85 --- llvm/tools/gccas/gccas.cpp:1.84 Tue Nov 11 16:41:34 2003 +++ llvm/tools/gccas/gccas.cpp Thu Nov 13 13:26:54 2003 @@ -70,6 +70,12 @@ addPass(PM, createFunctionInliningPass()); // Inline small functions addPass(PM, createInstructionCombiningPass()); // Cleanup code for raise + + // HACK HACK HACK. This pass should be extended to support calls like 'call + // (const expr cast (free))(Ty *). Until it does so, we have to run it after + // instruction combining. This should be removed after PLDI! + addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst + addPass(PM, createRaisePointerReferencesPass());// Recover type information addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs From gaeke at cs.uiuc.edu Thu Nov 13 13:33:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Thu Nov 13 13:33:02 2003 Subject: [llvm-commits] CVS: llvm/docs/index.html Message-ID: <200311131932.NAA10191@zion.cs.uiuc.edu> Changes in directory llvm/docs: index.html updated: 1.4 -> 1.5 --- Log message: Removed link from the docs index too. --- Diffs of the changes: (+0 -6) Index: llvm/docs/index.html diff -u llvm/docs/index.html:1.4 llvm/docs/index.html:1.5 --- llvm/docs/index.html:1.4 Wed Nov 12 14:31:18 2003 +++ llvm/docs/index.html Thu Nov 13 13:32:14 2003 @@ -157,12 +157,6 @@
    llvm/docs/TestingGuide.html

    - -

    - Comparison of LLVM to other frameworks: -
    - llvm/docs/LLVMVsTheWorld.html -

    From lattner at cs.uiuc.edu Thu Nov 13 13:48:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 13:48:01 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200311131947.NAA11166@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.67 -> 1.68 --- Log message: Expose the verifier to opt --- Diffs of the changes: (+1 -1) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.67 llvm/lib/VMCore/Verifier.cpp:1.68 --- llvm/lib/VMCore/Verifier.cpp:1.67 Wed Nov 12 01:13:37 2003 +++ llvm/lib/VMCore/Verifier.cpp Thu Nov 13 13:47:29 2003 @@ -169,7 +169,7 @@ } }; - RegisterPass X("verify", "Module Verifier"); + RegisterOpt X("verify", "Module Verifier"); // Assert - We know that cond should be true, if not print an error message. #define Assert(C, M) \ From criswell at cs.uiuc.edu Thu Nov 13 14:14:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Nov 13 14:14:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolSlab.h Message-ID: <200311132013.OAA26432@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolSlab.h updated: 1.2 -> 1.3 --- Log message: Add binary flags into bitfieds. Hopefully this will get them to take up less space. --- Diffs of the changes: (+2 -2) Index: poolalloc/runtime/FreeListAllocator/PoolSlab.h diff -u poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.2 poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.3 --- poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.2 Tue Nov 11 20:46:21 2003 +++ poolalloc/runtime/FreeListAllocator/PoolSlab.h Thu Nov 13 14:13:42 2003 @@ -55,10 +55,10 @@ struct SlabHeader { // Flags whether this is an array - unsigned char IsArray; + unsigned char IsArray : 1; // Flags whether this is managed by the Page Manager - unsigned char IsManaged; + unsigned char IsManaged : 1; // Number of nodes per slab unsigned int NodesPerSlab; From brukman at cs.uiuc.edu Thu Nov 13 17:09:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Nov 13 17:09:01 2003 Subject: [llvm-commits] CVS: llvm-www/status/index.html Message-ID: <200311132308.RAA13625@zion.cs.uiuc.edu> Changes in directory llvm-www/status: index.html updated: 1.10 -> 1.11 --- Log message: * Mutt seems to work. * Gave the page a nice header and footer. --- Diffs of the changes: (+50 -35) Index: llvm-www/status/index.html diff -u llvm-www/status/index.html:1.10 llvm-www/status/index.html:1.11 --- llvm-www/status/index.html:1.10 Wed Nov 12 17:20:54 2003 +++ llvm-www/status/index.html Thu Nov 13 17:08:39 2003 @@ -1,18 +1,42 @@ LLVM: status of compiling off-the-shelf programs - + -You should be able to compile and run programs with the following: +
    + LLVM status of compiling and running programs +
    + +
    + +

    You should be able to compile and run programs with the +following:

    + +
    +% setenv CC  llvm-gcc
    +% setenv CXX llvm-g++
    +% ./configure [configure options]
    +% make
    +
    + +

    or

    -% setenv CC llvm-gcc
    -% ./configure
    +% ./configure CC=llvm-gcc CXX=llvm-g++ [other configure options]
     % make
     
    +
    + +
    + Compilation / running results +
    +

    Status Notes
    crafty19.312 Nov 2003WORKSApply this patch to the + Makefile, then run make linux-llvm . Afterwards, run with +
    lli -load=/lib/libpthread.so.0 crafty.bc
    + Crafty has been successfully used with XBoard, both compiled with LLVM.
    ddd5.0 15 Oct 2003 WORKSapply this patch after - running ./configure and it all compiles, however, with many warnings: -
    gccld: Cannot find ypsec
    passes own tests.
    apply this patch + after running ./configure and it all compiles, however, with + many warnings:
    gccld: Cannot find ypsec
    passes own tests.
    ?? apply this Makefile patch and then run - make linux_llvmapply this Makefile patch and then + run make linux_llvm
    screenscreen 3.9.15 29 Aug 2003 Requires patch. The issue with - the types char* vs. unsigned char* has been resolved, and - the patch has been accepted into screenRequires patch. The issue + with the types char* vs. unsigned char* has been resolved, + and the patch has been accepted into screen
    Status Notes
    ed0.212 Nov 2003FAILSExample session: +
    +% ./ed
    +e /etc/hosts
    +185
    +,s/local/far/
    +Segmentation fault
    +
    + Ed is the standard Unix editor!
    gnuchess5.0612 Nov 2003FAILSRequires several libraries, run with:
    +
    lli -load=/lib/libpthread.so.0    \
    +         -load=/usr/lib/libncurses.so  \
    +         -load=/usr/lib/libreadline.so \
    +         gnuchess.bc [gnuchess options]
    craftyWORKS passes its own regression test suite
    ed0.215 Oct 2003FAILSExample session: -
    -% ./ed
    -e /etc/hosts
    -[ ed should print # of lines in file, but doesn't ]
    -
    - Ed is the standard Unix editor!
    mutt29 Aug 2003 passes its own regression test suite
    gnuchess5.06requires the pthread library, run with:
    -
    lli -load=/lib/libpthread.so.0 gnuchess.bc [gnuchess options]
    - Does not seem to be playing nice with xboard.
    @@ -21,6 +45,14 @@ + + + + + + + + @@ -49,7 +81,10 @@
    lli -load=/lib/libpthread.so.0    \
              -load=/usr/lib/libncurses.so  \
              -load=/usr/lib/libreadline.so \
    -         gnuchess.bc [gnuchess options]
    + gnuchess.bc [gnuchess options] + + Does not seem to work on the command line or with xboard. + @@ -180,34 +215,6 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -225,30 +261,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - @@ -275,14 +287,6 @@ - - - - - - - - @@ -369,7 +373,7 @@
    Misha Brukman
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2003/11/13 23:08:39 $ + Last modified: $Date: 2003/11/13 23:30:03 $ From criswell at cs.uiuc.edu Thu Nov 13 18:17:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Nov 13 18:17:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PageManager.cpp PageManager.h PoolAllocator.cpp PoolAllocator.h Message-ID: <200311140016.SAA07094@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PageManager.cpp updated: 1.5 -> 1.6 PageManager.h updated: 1.3 -> 1.4 PoolAllocator.cpp updated: 1.16 -> 1.17 PoolAllocator.h updated: 1.6 -> 1.7 --- Log message: Reduced the size of the PoolTy structure so that it is the same as the BitMap PoolAllocator. This is necessary because the size is hard-coded, and the too-large PoolTy structure is what was causing all of the bizarre behavior. --- Diffs of the changes: (+16 -8) Index: poolalloc/runtime/FreeListAllocator/PageManager.cpp diff -u poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.5 poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.6 --- poolalloc/runtime/FreeListAllocator/PageManager.cpp:1.5 Thu Nov 13 11:33:30 2003 +++ poolalloc/runtime/FreeListAllocator/PageManager.cpp Thu Nov 13 18:16:30 2003 @@ -25,7 +25,7 @@ // Empirically, this slows down the pool allocator a LOT. #define USE_MEMALIGN 0 -static unsigned PageSize = 0; +unsigned PageSize = 4096; // Explicitly use the malloc allocator here, to avoid depending on the C++ // runtime library. Index: poolalloc/runtime/FreeListAllocator/PageManager.h diff -u poolalloc/runtime/FreeListAllocator/PageManager.h:1.3 poolalloc/runtime/FreeListAllocator/PageManager.h:1.4 --- poolalloc/runtime/FreeListAllocator/PageManager.h:1.3 Thu Nov 13 11:33:30 2003 +++ poolalloc/runtime/FreeListAllocator/PageManager.h Thu Nov 13 18:16:30 2003 @@ -24,7 +24,7 @@ /// AllocatePage. This is a value that is typically several kilobytes in size, /// and is guaranteed to be a power of two. /// -///extern unsigned PageSize; +extern unsigned PageSize; /// AllocatePage - This function returns a chunk of memory with size and /// alignment specified by getPageSize(). Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.16 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.17 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.16 Thu Nov 13 12:03:10 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Thu Nov 13 18:16:30 2003 @@ -19,8 +19,9 @@ #include #include -#undef assert -#define assert(X) +//#undef assert +//#define assert(X) + //===----------------------------------------------------------------------===// // @@ -45,7 +46,6 @@ // Save locally the node size unsigned int NodeSize = Pool->NodeSize; - unsigned int PageSize = Pool->PageSize; // // Determine how many nodes can exist within a regular slab. @@ -189,12 +189,14 @@ Pool->NodeSize = NodeSize ? NodeSize : 1; Pool->Slabs = Pool->ArraySlabs = NULL; Pool->FreeList.Next = NULL; +#if 0 Pool->FreeablePool = 1; +#endif /* 0 */ // // Initialize the page manager. // - Pool->PageSize = InitializePageManager (); + InitializePageManager (); return; } @@ -203,7 +205,9 @@ poolmakeunfreeable(PoolTy *Pool) { assert(Pool && "Null pool pointer passed in to poolmakeunfreeable!\n"); +#if 0 Pool->FreeablePool = 0; +#endif } // pooldestroy - Release all memory allocated for a pool @@ -319,7 +323,7 @@ // // Determine which slab owns this block. // - struct SlabHeader * slabp = BlockOwner (Pool->PageSize, Pool->FreeList); + struct SlabHeader * slabp = BlockOwner (PageSize, Pool->FreeList); // // Find the data block that corresponds with this pointer. @@ -401,7 +405,7 @@ // // Find the header of the memory block. // - struct SlabHeader * slabp = DataOwner (Pool->PageSize, Block); + struct SlabHeader * slabp = DataOwner (PageSize, Block); // // If the owning slab is an array, add it back to the free array list. Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.6 poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.7 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.6 Thu Nov 13 11:33:30 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.h Thu Nov 13 18:16:30 2003 @@ -18,8 +18,10 @@ #include "PoolSlab.h" typedef struct PoolTy { +#if 0 // The size of a page on this system unsigned int PageSize; +#endif // NodeSize - Keep track of the object size tracked by this pool unsigned NodeSize; @@ -33,10 +35,12 @@ // Pointer to the free list of nodes struct NodePointer FreeList; +#if 0 // FreeablePool - Set to false if the memory from this pool cannot be freed // before destroy. // unsigned FreeablePool; +#endif /* 0 */ } PoolTy; extern "C" { From lattner at cs.uiuc.edu Thu Nov 13 19:16:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 19:16:00 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311140115.TAA16553@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.49 -> 1.50 --- Log message: Make the pool descriptor type as large as we want. right now, 10 words --- Diffs of the changes: (+1 -3) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.49 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.50 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.49 Thu Nov 13 11:10:58 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Thu Nov 13 19:14:54 2003 @@ -120,9 +120,7 @@ void PoolAllocate::AddPoolPrototypes() { if (VoidPtrTy == 0) { VoidPtrTy = PointerType::get(Type::SByteTy); - PoolDescType = - StructType::get(make_vector(VoidPtrTy, VoidPtrTy, - Type::UIntTy, Type::UIntTy, 0)); + PoolDescType = ArrayType::get(VoidPtrTy, 10); PoolDescPtrTy = PointerType::get(PoolDescType); } From lattner at cs.uiuc.edu Thu Nov 13 21:01:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Nov 13 21:01:01 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/index.html Message-ID: <200311140300.VAA17917@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0: index.html updated: 1.9 -> 1.10 --- Log message: Update docs link, add link to OSI page --- Diffs of the changes: (+5 -3) Index: llvm-www/releases/1.0/index.html diff -u llvm-www/releases/1.0/index.html:1.9 llvm-www/releases/1.0/index.html:1.10 --- llvm-www/releases/1.0/index.html:1.9 Sat Oct 25 12:46:10 2003 +++ llvm-www/releases/1.0/index.html Thu Nov 13 21:00:16 2003 @@ -27,8 +27,10 @@
    ProgramStatus Notes
    mutt1.4.1i13 Nov 2003WORKSSometimes suspend and resume act funny.
    ed
    WORKS passes its own regression test suite
    mutt1.4.1i15 Oct 2003FAILS -
      -
    • Problem with linking: all globals are defined in - main.c and externed everywhere else. Unfortunately, - the global dead code elimination is eager to delete all those globals from - main.c because they aren't used in that file. For now, the - solution is to recompile main.c separately without global dead - code elimination, and relink mutt: -
        -
      1. rm -f main.o
      2. -
      3. gmake -n main.o
        - This will tell you what switches are used by llvm-gcc to compile the - file.
      4. -
      5. Re-run the command specifying -S instead of - -c to make main.s
      6. -
      7. llvm-as < main.s | opt -funcresolve > main.o
      8. -
      9. gmake     # re-link mutt -
    • -
    • Does not correctly handle suspend and resume.
    • -
    -
    - - + + +
    +
    + From brukman at cs.uiuc.edu Thu Nov 13 17:31:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Nov 13 17:31:01 2003 Subject: [llvm-commits] CVS: llvm-www/status/index.html Message-ID: <200311132330.RAA00959@zion.cs.uiuc.edu> Changes in directory llvm-www/status: index.html updated: 1.11 -> 1.12 --- Log message: Not surprisingly, gawk, gnugo, sed, and enscript still work and pass their own respective regression test suites. --- Diffs of the changes: (+38 -34) Index: llvm-www/status/index.html diff -u llvm-www/status/index.html:1.11 llvm-www/status/index.html:1.12 --- llvm-www/status/index.html:1.11 Thu Nov 13 17:08:39 2003 +++ llvm-www/status/index.html Thu Nov 13 17:30:03 2003 @@ -45,13 +45,49 @@
    Status Notes
    gawk3.1.313 Nov 2003WORKSpasses its own regression test suite
    gnugo5.0613 Nov 2003WORKSpasses its own regression test suite
    sed4.0.713 Nov 2003WORKSpasses its own regression test suite
    enscript1.6.113 Nov 2003WORKSpasses its own regression test suite
    mutt 1.4.1i 13 Nov 2003 WORKSSometimes suspend and resume act funny.Run with: +
    lli -load=/usr/lib/libncurses.so mutt.bc
    + Sometimes suspend and resume act funny.
    apply this Makefile patch and then run make linux_llvm
    enscript1.6.1passes its own regression test suite
    gawk3.1.3passes its own regression test suite
    gnugo5.06passes its own regression test suite
    grep passes its own regression test suite
    sed4.0.729 Aug 2003passes its own regression test suite
    nano
    - LLVM is distributed under the University of Illinois - Open Source License. +

    LLVM is distributed under the University of Illinois + Open Source License, an OSI approved + license.

    @@ -54,7 +56,7 @@
  37. A copy of the README file for release 1.0.
  38. -Up-to-date LLVM documentation +Up-to-date LLVM documentation on the LLVM Web page. From brukman at cs.uiuc.edu Thu Nov 13 21:16:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Nov 13 21:16:01 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/index.html Message-ID: <200311140315.VAA22833@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0: index.html updated: 1.10 -> 1.11 --- Log message: * Enclose all paragraph text within

    and

    * Close
  39. tags * Hyphenate ``OSI-approved'' * Don't mention Release Notes twice, it's superfluous * Don't call the link ``Readme.txt'' if we aren't really linking to it --- Diffs of the changes: (+29 -22) Index: llvm-www/releases/1.0/index.html diff -u llvm-www/releases/1.0/index.html:1.10 llvm-www/releases/1.0/index.html:1.11 --- llvm-www/releases/1.0/index.html:1.10 Thu Nov 13 21:00:16 2003 +++ llvm-www/releases/1.0/index.html Thu Nov 13 21:15:45 2003 @@ -12,14 +12,16 @@
    - We are pleased to announce the public release of the LLVM Compiler - Infrastructure.

    - LLVM is a new infrastructure designed for compile-time, link-time, runtime, +

    We are pleased to announce the public release of the LLVM Compiler + Infrastructure.

    + +

    LLVM is a new infrastructure designed for compile-time, link-time, runtime, and "idle-time" optimization of programs from arbitrary programming languages. LLVM is written in C++ and has been developed over the past 3 years at the University of Illinois. It currently supports compilation of - C and C++ programs, using front-ends derived from GCC 3.4. + C and C++ programs, using front-ends derived from GCC 3.4.

    +
  40. @@ -27,10 +29,12 @@
    -

    LLVM is distributed under the University of Illinois - Open Source License, an OSI approved - license.

    + +

    LLVM is distributed under the University of Illinois +Open Source License, an OSI-approved +license.

    +
    @@ -38,9 +42,11 @@
    - The 1.0 release (24 Oct 2003) is available for - download. - You can read the Release Notes here. + +

    The 1.0 release (24 Oct 2003) is available for +download. You can read the Release Notes +here.

    +
    @@ -48,19 +54,20 @@
    -LLVM provides extensive documentation in HTML form. The documentation is -included in the source download (see README.txt for explanations). -You can also see the documentation here: -
  41. -A copy of the ReleaseNotes for release 1.0. -
  42. -A copy of the README file for release 1.0. -
  43. -Up-to-date LLVM documentation -on the LLVM Web page. - + +

    LLVM provides extensive documentation in HTML form. The documentation is +included in the source download (see README.TXT for details). You can also see +the documentation here:

    + + + + From brukman at cs.uiuc.edu Thu Nov 13 21:21:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Nov 13 21:21:00 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200311140320.VAA27730@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.29 -> 1.30 --- Log message: Brian implemented vaarg in the interpreter. --- Diffs of the changes: (+3 -3) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.29 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.30 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.29 Wed Nov 12 16:46:27 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Thu Nov 13 21:19:54 2003 @@ -163,14 +163,14 @@
  44. LLVM cannot handle structures with more than 256 elements.

    -

  45. Interpreter does not support the -vaarg instruction
  46. - Missing features in 1.0, implemented in 1.1:

    Bugs in 1.0 fixed in 1.1:

      From brukman at cs.uiuc.edu Thu Nov 13 21:31:00 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Nov 13 21:31:00 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311140330.VAA32631@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.43 -> 1.44 --- Log message: Brian implemented the vaarg instruction in the interpreter. --- Diffs of the changes: (+4 -0) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.43 llvm/docs/ReleaseNotes.html:1.44 --- llvm/docs/ReleaseNotes.html:1.43 Wed Nov 12 16:55:13 2003 +++ llvm/docs/ReleaseNotes.html Thu Nov 13 21:30:43 2003 @@ -84,6 +84,10 @@

      1. The interpreter does not support invoke or unwind
      2. + +
      3. Interpreter does not support the +vaarg instruction
      4. +

      In this release, the following Quality of Implementation issues were fixed:

      From criswell at cs.uiuc.edu Thu Nov 13 22:36:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Nov 13 22:36:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311140435.WAA17309@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.17 -> 1.18 --- Log message: Removed dead code. Inlined the functions that compute slab pointers from data block/pointer values. --- Diffs of the changes: (+2 -42) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.17 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.18 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.17 Thu Nov 13 18:16:30 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Thu Nov 13 22:35:10 2003 @@ -115,7 +115,7 @@ // Description: // Find the slab that owns this block. // -struct SlabHeader * +inline struct SlabHeader * BlockOwner (unsigned int PageSize, NodePointer p) { // @@ -130,38 +130,12 @@ // Description: // This function finds the slab that owns this data block. // -struct SlabHeader * +inline struct SlabHeader * DataOwner (unsigned int PageSize, void * p) { return reinterpret_cast(reinterpret_cast(p) & ~(PageSize - 1)); } -// -// Function: slabAlloc() -// -// Description: -// Increase the slab's reference count. -// -void -slabAlloc (SlabHeader * Slab) -{ - Slab->LiveNodes++; - return; -} - -// -// Function: slabFree () -// -// Description: -// Decrease the slab's reference count. -// -void -slabFree (SlabHeader * Slab) -{ - Slab->LiveNodes--; - return; -} - //===----------------------------------------------------------------------===// // // Pool allocator library implementation @@ -314,13 +288,6 @@ } // - // Increase the slab's reference count. - // -#if 0 - slabAlloc (Pool->FreeList->Slab); -#endif /* 0 */ - - // // Determine which slab owns this block. // struct SlabHeader * slabp = BlockOwner (PageSize, Pool->FreeList); @@ -422,13 +389,6 @@ // NodePointer Node; Node.Next = &(slabp->BlockList[((unsigned char *)Block - slabp->Data)/Pool->NodeSize]); - -#if 0 - // - // Decrease the slab's reference count. - // - slabFree (Node.header->Slab); -#endif /* 0 */ // // Add the node back to the free list. From criswell at cs.uiuc.edu Thu Nov 13 22:41:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Thu Nov 13 22:41:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311140440.WAA18217@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.18 -> 1.19 --- Log message: Removed needless pointer deferencing. This seems to speed up some of the Olden benchmarks. --- Diffs of the changes: (+18 -14) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.18 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.19 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.18 Thu Nov 13 22:35:10 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Thu Nov 13 22:40:09 2003 @@ -231,6 +231,9 @@ // Pointer to the data block to return void * Data; + // Slab Pointer + struct SlabHeader * Slabp; + assert(Pool && "Null pool pointer passed in to poolalloc!\n"); // @@ -246,23 +249,24 @@ // If we don't have a slab, this is our first initialization. Do some // quick stuff. // - if (Pool->Slabs == NULL) + Slabp = Pool->Slabs; + if (Slabp == NULL) { - Pool->Slabs = createSlab (Pool); - (Pool->Slabs->NextFreeData)++; - return (Pool->Slabs->Data); + Pool->Slabs = Slabp = createSlab (Pool); + (Slabp->NextFreeData)++; + return (Slabp->Data); } // // Determine whether we can allocate from the current slab. // - if (Pool->Slabs->NextFreeData < Pool->Slabs->NodesPerSlab) + if (Slabp->NextFreeData < Slabp->NodesPerSlab) { // // Return the block and increment the index of the next free data block. // - Data = (Pool->Slabs->Data + (Pool->NodeSize * Pool->Slabs->NextFreeData)); - (Pool->Slabs->NextFreeData)++; + Data = (Slabp->Data + (Pool->NodeSize * Slabp->NextFreeData)); + (Slabp->NextFreeData)++; return (Data); } @@ -275,27 +279,27 @@ // // Create a new slab and add it to the list. // - struct SlabHeader * NewSlab = createSlab (Pool); - NewSlab->Next = Pool->Slabs; - Pool->Slabs = NewSlab; + Slabp = createSlab (Pool); + Slabp->Next = Pool->Slabs; + Pool->Slabs = Slabp; - (NewSlab->NextFreeData)++; + (Slabp->NextFreeData)++; // // Return the block and increment the index of the next free data block. // - return (Pool->Slabs->Data); + return (Slabp->Data); } // // Determine which slab owns this block. // - struct SlabHeader * slabp = BlockOwner (PageSize, Pool->FreeList); + Slabp = BlockOwner (PageSize, Pool->FreeList); // // Find the data block that corresponds with this pointer. // - Data = (slabp->Data + (Pool->NodeSize * (Pool->FreeList.Next - &(slabp->BlockList[0])))); + Data = (Slabp->Data + (Pool->NodeSize * (Pool->FreeList.Next - &(Slabp->BlockList[0])))); // // Unlink the first block. From brukman at cs.uiuc.edu Thu Nov 13 23:38:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Nov 13 23:38:01 2003 Subject: [llvm-commits] CVS: llvm/CREDITS.TXT Message-ID: <200311140537.XAA15227@zion.cs.uiuc.edu> Changes in directory llvm: CREDITS.TXT updated: 1.6 -> 1.7 --- Log message: Give props to Reid Spencer for the namespacification work. --- Diffs of the changes: (+1 -1) Index: llvm/CREDITS.TXT diff -u llvm/CREDITS.TXT:1.6 llvm/CREDITS.TXT:1.7 --- llvm/CREDITS.TXT:1.6 Sun Nov 9 21:05:36 2003 +++ llvm/CREDITS.TXT Thu Nov 13 23:37:10 2003 @@ -56,7 +56,7 @@ N: Reid Spencer E: rspencer at x10sys.com W: http://extprosys.sourceforge.net/ -D: Sundry tasks for basing XPL on LLVM. +D: Complete 'llvm' namespacification, bug fixes and improvements N: Bill Wendling E: wendling at isanbard.org From lattner at cs.uiuc.edu Fri Nov 14 00:04:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 00:04:02 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/Use.h Message-ID: <200311140603.AAA07434@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Use.h updated: 1.3 -> 1.4 --- Log message: This is obviously illegal C++ code, but was apparently accepted by 3.3 bork --- Diffs of the changes: (+2 -2) Index: llvm/include/llvm/Use.h diff -u llvm/include/llvm/Use.h:1.3 llvm/include/llvm/Use.h:1.4 --- llvm/include/llvm/Use.h:1.3 Tue Nov 11 16:41:30 2003 +++ llvm/include/llvm/Use.h Fri Nov 14 00:03:05 2003 @@ -80,13 +80,13 @@ }; -template<> struct std::simplify_type { +template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const Use &Val) { return (SimpleType)Val.get(); } }; -template<> struct std::simplify_type { +template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const Use &Val) { return (SimpleType)Val.get(); From lattner at cs.uiuc.edu Fri Nov 14 00:39:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 00:39:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderInternals.h Message-ID: <200311140638.AAA12354@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderInternals.h updated: 1.64 -> 1.65 --- Log message: Fix PR 110: the constant folding code assumes that if something is not a constant expression, but is of (for example) ubyte type, then it is a ConstantUInt. This was not true for placeholders. --- Diffs of the changes: (+3 -5) Index: llvm/lib/Bytecode/Reader/ReaderInternals.h diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.64 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.65 --- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.64 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Bytecode/Reader/ReaderInternals.h Fri Nov 14 00:38:46 2003 @@ -14,7 +14,7 @@ #ifndef READER_INTERNALS_H #define READER_INTERNALS_H -#include "llvm/Constant.h" +#include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" #include "llvm/ModuleProvider.h" @@ -201,10 +201,8 @@ unsigned getID() { return ID; } }; -struct ConstantPlaceHolderHelper : public Constant { - ConstantPlaceHolderHelper(const Type *Ty) - : Constant(Ty) {} - virtual bool isNullValue() const { return false; } +struct ConstantPlaceHolderHelper : public ConstantExpr { + ConstantPlaceHolderHelper(const Type *Ty) : ConstantExpr(Instruction::UserOp1, Constant::getNullValue(Ty), Ty) {} }; typedef PlaceholderDef ConstPHolder; From lattner at cs.uiuc.edu Fri Nov 14 00:43:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 00:43:01 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200311140642.AAA12663@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.30 -> 1.31 --- Log message: Bugz go out, bugs come in --- Diffs of the changes: (+3 -1) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.30 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.31 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.30 Thu Nov 13 21:19:54 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Fri Nov 14 00:42:16 2003 @@ -209,6 +209,8 @@

    • gccld -Lfoo -lfoo fails to find ./foo/libfoo.a
    • +

    • [bcreader] Incorrect cast causes misread forward constant references
    • +


    Known problems with the C front-end

@@ -444,6 +445,6 @@ Maintained By: The LLVM Team
-Last modified: Wed Nov 12 16:48:33 CST 2003 +Last modified: Fri Nov 14 00:41:21 CST 2003 From lattner at cs.uiuc.edu Fri Nov 14 01:04:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 01:04:02 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp TransformFunctionBody.cpp Message-ID: <200311140703.BAA06549@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.50 -> 1.51 TransformFunctionBody.cpp updated: 1.13 -> 1.14 --- Log message: Fix spelling, remove bogus assertion --- Diffs of the changes: (+2 -2) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.50 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.51 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.50 Thu Nov 13 19:14:54 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Fri Nov 14 01:02:50 2003 @@ -812,7 +812,7 @@ } DEBUG(std::cerr << "\n\n"); - // We are allowed to delete any pool frees which occur between the last call + // We are allowed to delete any poolfree's which occur between the last call // to poolalloc, and the call to pooldestroy. Figure out which basic blocks // have this property for this pool. std::set PoolFreeLiveBlocks; Index: poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp diff -u poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.13 poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.14 --- poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp:1.13 Thu Nov 13 00:15:09 2003 +++ poolalloc/lib/PoolAllocate/TransformFunctionBody.cpp Fri Nov 14 01:02:50 2003 @@ -287,7 +287,7 @@ if (!isa(*AI)) DSGraph::computeNodeMapping(CalleeGraph->getNodeForValue(FAI), getDSNodeHFor(*AI), NodeMapping, false); - assert(AI == AE && "Varargs calls not handled yet!"); + //assert(AI == AE && "Varargs calls not handled yet!"); // Map the return value as well... if (TheCall->getType() != Type::VoidTy) From criswell at cs.uiuc.edu Fri Nov 14 09:36:00 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Nov 14 09:36:00 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311141535.JAA23953@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.19 -> 1.20 --- Log message: Fixed a bug in the code. Unfortunetly, this seems to make it a little slower in some spots. --- Diffs of the changes: (+2 -2) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.19 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.20 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.19 Thu Nov 13 22:40:09 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 09:35:14 2003 @@ -351,7 +351,7 @@ // Prevp->Next = Slabp->Next; } - return (&(Slabp->Data[0])); + return (Slabp->Data); } } @@ -364,7 +364,7 @@ // // Return the list of blocks to the caller. // - return (&(NewSlab->Data[0])); + return (NewSlab->Data); } void From criswell at cs.uiuc.edu Fri Nov 14 10:04:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Nov 14 10:04:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp PoolAllocator.h Message-ID: <200311141603.KAA26578@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.20 -> 1.21 PoolAllocator.h updated: 1.7 -> 1.8 --- Log message: Calculate the maximum number of nodes per page once for each pool instead of every time we create a slab. This provides minor performance improvement, I think. --- Diffs of the changes: (+7 -6) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.20 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.21 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.20 Fri Nov 14 09:35:14 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 10:03:39 2003 @@ -39,7 +39,7 @@ createSlab (PoolTy * Pool, unsigned int NodesPerSlab = 0) { // Maximum number of nodes per page - unsigned int MaxNodesPerPage; + unsigned int MaxNodesPerPage = Pool->MaxNodesPerPage; // Pointer to the new Slab struct SlabHeader * NewSlab; @@ -48,11 +48,6 @@ unsigned int NodeSize = Pool->NodeSize; // - // Determine how many nodes can exist within a regular slab. - // - MaxNodesPerPage = (PageSize - sizeof (struct SlabHeader)) / (sizeof (NodePointer) + NodeSize); - - // // If we can't fit a node into a page, give up. // if (NodeSize > PageSize) @@ -166,6 +161,9 @@ #if 0 Pool->FreeablePool = 1; #endif /* 0 */ + + // Calculate once for this pool the maximum number of nodes per page + Pool->MaxNodesPerPage = (PageSize - sizeof (struct SlabHeader)) / (sizeof (NodePointer) + NodeSize); // // Initialize the page manager. Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.7 poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.8 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.7 Thu Nov 13 18:16:30 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.h Fri Nov 14 10:03:39 2003 @@ -26,6 +26,9 @@ // NodeSize - Keep track of the object size tracked by this pool unsigned NodeSize; + // Maximum number of nodes per page + unsigned int MaxNodesPerPage; + // Pointer to the list of slabs allocated for this pool struct SlabHeader * Slabs; From lattner at cs.uiuc.edu Fri Nov 14 10:35:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 10:35:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderInternals.h Message-ID: <200311141634.KAA21132@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ReaderInternals.h updated: 1.65 -> 1.66 --- Log message: I can't believe the incompetence of the people I have to deal with around here. These fools don't even wrap code at 80 columns. Oh wait, _I_ wrote that. That explains a lot!! --- Diffs of the changes: (+2 -1) Index: llvm/lib/Bytecode/Reader/ReaderInternals.h diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.65 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.66 --- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.65 Fri Nov 14 00:38:46 2003 +++ llvm/lib/Bytecode/Reader/ReaderInternals.h Fri Nov 14 10:34:25 2003 @@ -202,7 +202,8 @@ }; struct ConstantPlaceHolderHelper : public ConstantExpr { - ConstantPlaceHolderHelper(const Type *Ty) : ConstantExpr(Instruction::UserOp1, Constant::getNullValue(Ty), Ty) {} + ConstantPlaceHolderHelper(const Type *Ty) + : ConstantExpr(Instruction::UserOp1, Constant::getNullValue(Ty), Ty) {} }; typedef PlaceholderDef ConstPHolder; From lattner at cs.uiuc.edu Fri Nov 14 10:42:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 10:42:03 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311141641.KAA21481@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.51 -> 1.52 --- Log message: Default to disabling the optimization --- Diffs of the changes: (+1 -1) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.51 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.52 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.51 Fri Nov 14 01:02:50 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Fri Nov 14 10:41:39 2003 @@ -50,7 +50,7 @@ X("poolalloc", "Pool allocate disjoint data structures"); cl::opt DisableInitDestroyOpt("poolalloc-force-simple-pool-init", - cl::desc("Always insert poolinit/pooldestroy calls at start and exit of functions")); + cl::desc("Always insert poolinit/pooldestroy calls at start and exit of functions"), cl::init(true)); } void PoolAllocate::getAnalysisUsage(AnalysisUsage &AU) const { From criswell at cs.uiuc.edu Fri Nov 14 10:49:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Nov 14 10:49:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311141648.KAA30775@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.21 -> 1.22 --- Log message: Removed commented out macros that mess with our beloved asserts. --- Diffs of the changes: (+0 -4) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.21 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.22 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.21 Fri Nov 14 10:03:39 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 10:48:05 2003 @@ -19,10 +19,6 @@ #include #include -//#undef assert -//#define assert(X) - - //===----------------------------------------------------------------------===// // // PoolSlab implementation From lattner at cs.uiuc.edu Fri Nov 14 11:10:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 11:10:00 2003 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Local.cpp Message-ID: <200311141709.LAA22101@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Local.cpp updated: 1.72 -> 1.73 --- Log message: Implement a small optimization to handling of GEP's that are equivalent to casts. This results in substantially reduced collapsing for some testcases --- Diffs of the changes: (+18 -0) Index: llvm/lib/Analysis/DataStructure/Local.cpp diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.72 llvm/lib/Analysis/DataStructure/Local.cpp:1.73 --- llvm/lib/Analysis/DataStructure/Local.cpp:1.72 Wed Nov 12 21:10:49 2003 +++ llvm/lib/Analysis/DataStructure/Local.cpp Fri Nov 14 11:09:46 2003 @@ -308,6 +308,24 @@ DSNodeHandle Value = getValueDest(*GEP.getOperand(0)); if (Value.getNode() == 0) return; + // As a special case, if all of the index operands of GEP are constant zeros, + // handle this just like we handle casts (ie, don't do much). + bool AllZeros = true; + for (unsigned i = 1, e = GEP.getNumOperands(); i != e; ++i) + if (GEP.getOperand(i) != + Constant::getNullValue(GEP.getOperand(i)->getType())) { + AllZeros = false; + break; + } + + // If all of the indices are zero, the result points to the operand without + // applying the type. + if (AllZeros) { + setDestTo(GEP, Value); + return; + } + + const PointerType *PTy = cast(GEP.getOperand(0)->getType()); const Type *CurTy = PTy->getElementType(); From brukman at cs.uiuc.edu Fri Nov 14 11:35:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri Nov 14 11:35:01 2003 Subject: [llvm-commits] CVS: llvm/docs/OpenProjects.html Message-ID: <200311141734.LAA28459@zion.cs.uiuc.edu> Changes in directory llvm/docs: OpenProjects.html updated: 1.13 -> 1.14 --- Log message: Stylesheets: they do a website good! --- Diffs of the changes: (+198 -164) Index: llvm/docs/OpenProjects.html diff -u llvm/docs/OpenProjects.html:1.13 llvm/docs/OpenProjects.html:1.14 --- llvm/docs/OpenProjects.html:1.13 Mon Oct 27 12:18:16 2003 +++ llvm/docs/OpenProjects.html Fri Nov 14 11:34:38 2003 @@ -1,159 +1,178 @@ - -Open LLVM Projects - - -

Open LLVM Projects

+ + + + Open LLVM Projects + + + + +
+ Open LLVM Projects +
-

- - -
-What is this? -
    + -This document is meant to be a sort of "big TODO list" for LLVM. Each project -in this document is something that would be useful for LLVM to have, and would -also be a great way to get familiar with the system. Some of these projects are -small and self-contained, which may be implemented in a couple of days, others -are larger. Several of these projects may lead to interesting research projects -in their own right. In any case, we welcome all contributions.

    +

    + +

    This document is meant to be a sort of "big TODO list" for LLVM. Each +project in this document is something that would be useful for LLVM to have, and +would also be a great way to get familiar with the system. Some of these +projects are small and self-contained, which may be implemented in a couple of +days, others are larger. Several of these projects may lead to interesting +research projects in their own right. In any case, we welcome all +contributions.

    -If you are thinking about tackling one of these projects, please send a mail to -the LLVM +

    If you are thinking about tackling one of these projects, please send a mail +to the LLVM Developer's mailing list, so that we know the project is being worked on. Additionally this is a good way to get more information about a specific project -or to suggest other projects to add to this page. Another good place to -look for ideas is the -LLVM bug tracker.

    +or to suggest other projects to add to this page. Another good place to look +for ideas is the LLVM bug +tracker.

    +
    -
-
-Improving the current system -
    + -Improvements to the current infrastructure are always very welcome and tend to -be fairly straight-forward to implement. Here are some of the key areas that -can use improvement...

    +

    + +

    Improvements to the current infrastructure are always very welcome and tend +to be fairly straight-forward to implement. Here are some of the key areas that +can use improvement...

    + +
    -
-
   - -Port glibc to LLVM -
    + -It would be very useful to + +

    It would be very useful to port glibc to LLVM. This would allow a variety of interprocedural algorithms to be much more effective in the face of library calls. The most important pieces to port are things like the string library and the stdio related functions... low-level system calls like -'read' should stay unimplemented in LLVM.

    +'read' should stay unimplemented in LLVM.

    + -
-
   - -Improving the Nightly Tester -
    - -The Nightly Tester is a simple perl script (located -in utils/NightlyTest.pl) which runs every night to generate a daily report. It -could use the following improvements:

    +

    + +
    + +

    The Nightly Tester is a simple perl script +(located in utils/NightlyTest.pl) which runs every night to generate a +daily report. It could use the following improvements:

      -
    1. Olden timings - Time the compilation and execution times for the Olden - benchmark suite, keeping track of these values over time. -
    2. Graphs - It would be great to have gnuplot graphs to keep track of how the tree is changing over time. We already gather a several statistics, it - just necessary to add the script-fu to gnuplotize it. + just necessary to add the script-fu to gnuplotize it.
    3. Regression tests - We should run the regression tests in addition to the - program tests... -

    + program tests... + +

    -
-
   - -Compile programs with the LLVM Compiler -
    + + +
    -We are always looking for new testcases and benchmarks for use with LLVM. In +

    We are always looking for new testcases and benchmarks for use with LLVM. In particular, it is useful to try compiling your favorite C source code with LLVM. If it doesn't compile, try to figure out why or report it to the llvm-bugs list. If you get the program to compile, it would be extremely useful to convert the build system to be compatible with the LLVM Programs testsuite so that we can check it into CVS and the automated tester can use it to track progress of the -compiler.

    +compiler.

    -When testing a code, try running it with a variety of optimizations, and with -all the back-ends: CBE, llc, and lli.

    +

    When testing a code, try running it with a variety of optimizations, and with +all the back-ends: CBE, llc, and lli.

    +
    -
-
   - -Extend the LLVM intermediate representation -
-
   - -Miscellaneous Improvements -
    + + +
    1. Someone needs to look into getting the ranlib tool to index LLVM bytecode files, so that linking in .a files is not hideously slow. They would also then have to implement the reader for this index in - gccld.
      + gccld.
    2. + +
    3. Improve the efficiency of the bytecode loader/writer
    4. -
    5. Improve the efficiency of the bytecode loader/writer
    6. Extend the FunctionPassManager to use a ModuleProvider to stream functions - in on demand. This would improve the efficiency of the JIT. -
    7. Rework the PassManager to be more flexible + in on demand. This would improve the efficiency of the JIT.
    8. + +
    9. Rework the PassManager to be more flexible
    10. +
    11. Some transformations and analyses only work on reducible flow graphs. It would be nice to have a transformation which could be "required" by these passes which makes irreducible graphs reducible. This can easily be accomplished @@ -161,126 +180,141 @@ href="http://citeseer.nj.nec.com/janssen97making.html">Making Graphs Reducible with Controlled Node Splitting and perhaps Nesting of Reducible and -Irreducible Loops. +Irreducible Loops.
    12. +
    +
    -
-
-Adding new capabilities to LLVM -
    + -Sometimes creating new things is more fun that improving existing things. These -projects tend to be more involved and perhaps require more work, but can also be -very rewarding.

    +

    + +

    Sometimes creating new things is more fun that improving existing things. +These projects tend to be more involved and perhaps require more work, but can +also be very rewarding.

    + +
    -
-
   - -Pointer and Alias Analysis -
    - -We have a strong base for development of both -pointer analysis based optimizations as well as pointer analyses themselves. It -seems natural to want to take advantage of this...

    +

    + +
    + +

    We have a strong base for development of +both pointer analysis based optimizations as well as pointer analyses +themselves. It seems natural to want to take advantage of this...

    1. Implement a flow-sensitive context-sensitive alias analysis algorithm
      - Pick one of the somewhat efficient algorithms, but strive for maximum - precision + precision
    2. +
    3. Implement a flow-sensitive context-insensitive alias analysis algorithm
      - - Just an efficient local algorithm perhaps? + - Just an efficient local algorithm perhaps?
    4. Implement an interface to update analyses in response to common code motion - transformations -
    5. Implement alias analysis based optimizations: + transformations
    6. + +
    7. Implement alias-analysis-based optimizations:
        -
      • Dead store elimination -
      +
    8. Dead store elimination
    9. +
    10. ...
    11. +
+ + - -
   - -Profile Guided Optimization -
    + -We are getting to the point where we really need a unified infrastructure for +
    + +

    We are getting to the point where we really need a unified infrastructure for profile guided optimizations. It would be wonderful to be able to write profile guided transformations which can be performed either at static compile time (compile time or offline optimization time) or at runtime in a JIT type setup. -The LLVM transformation itself shouldn't need to know how it is being used.

    +The LLVM transformation itself shouldn't need to know how it is being used.

    -Ideas for profile guided transformations:

    +

    Ideas for profile guided transformations:

      -
    1. Superblock formation (with many optimizations) -
    2. Loop unrolling/peeling -
    3. Profile directed inlining -
    4. Code layout -
    5. ... -

    +

  • Superblock formation (with many optimizations)
  • +
  • Loop unrolling/peeling
  • +
  • Profile directed inlining
  • +
  • Code layout
  • +
  • ...
  • + +
    -
-
   - -New Transformations and Analyses -
    + + +
    1. Implement a Dependence Analysis Infrastructure
      - - Design some way to represent and query dep analysis + - Design some way to represent and query dep analysis
    2. Implement a faster Dominator Set Construction Algorithm
      - - A linear time or nearly so algorithm -
    3. Implement a strength reduction pass -
    4. Value range propagation pass -
    5. Implement an unswitching pass -
    6. Write a loop unroller, with a simple heuristic for when to unroll + - A linear time or nearly so algorithm
    7. +
    8. Implement a strength reduction pass
    9. +
    10. Value range propagation pass
    11. +
    12. Implement an unswitching pass
    13. +
    14. Write a loop unroller, with a simple heuristic for when to unroll
    +
    + -
-
   - -X86 Back-end Improvements -
    + + +
      -
    1. Implement a global register allocator -
    2. Implement a better instruction selector +
    3. Implement a global register allocator
    4. +
    5. Implement a better instruction selector
    6. Implement support for the "switch" instruction without requiring the - lower-switches pass. + lower-switches pass.
    +
    + -
-
   - -Miscellaneous Additions -
    + + +
      -
    1. Write a new frontend for some language (Java? OCaml? Forth?) -
    2. Write a new backend for a target (IA64? MIPS? MMIX?) +
    3. Write a new frontend for some language (Java? OCaml? Forth?)
    4. +
    5. Write a new backend for a target (IA64? MIPS? MMIX?)
    +
    -
- -
-
Chris Lattner
-The LLVM Compiler Infrastructure -
- - -Last modified: Mon Oct 27 12:00:00 CDT 2003 - -
+
+ + + + From criswell at cs.uiuc.edu Fri Nov 14 11:39:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Nov 14 11:39:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311141738.LAA01130@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.22 -> 1.23 --- Log message: Added code to allocate multiple small arrays within a single slab (assuming the slab is a single page). This slightly improves half of the Olden programs from their previous settings. --- Diffs of the changes: (+44 -5) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.22 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.23 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.22 Fri Nov 14 10:48:05 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 11:38:01 2003 @@ -324,6 +324,30 @@ struct SlabHeader * Slabp = Pool->ArraySlabs; struct SlabHeader * Prevp = NULL; + // + // Check to see if we have an array slab that has extra space that we + // can use. + // + if ((Slabp != NULL) && + ((Pool->MaxNodesPerPage - Slabp->NextFreeData) >= ArraySize)) + { + // + // Increase the reference count for this slab. + // + Slabp->LiveNodes++; + + // + // Return the data to the caller. + // + void * Data = (Slabp->Data + (Pool->NodeSize * Slabp->NextFreeData)); + (Slabp->NextFreeData)++; + return (Data); + } + + // + // Scan through all the free array slabs to see if they are large + // enough. + // for (; Slabp != NULL; Prevp = Slabp, Slabp=Slabp->Next) { // @@ -345,6 +369,7 @@ // Prevp->Next = Slabp->Next; } + ++(Slabp->LiveNodes); return (Slabp->Data); } } @@ -352,13 +377,24 @@ // // Create a new slab and mark it as an array. // - struct SlabHeader * NewSlab = createSlab (Pool, ArraySize); - NewSlab->IsArray = 1; + Slabp = createSlab (Pool, ArraySize); + Slabp->IsArray = 1; + Slabp->LiveNodes = 1; + Slabp->NextFreeData = ArraySize; + + // + // If the array has some space, link it into the array "free" list. + // + if ((Slabp->IsManaged == 0) && (Slabp->NextFreeData != Pool->MaxNodesPerPage)) + { + Slabp->Next = Pool->ArraySlabs; + Pool->ArraySlabs = Slabp; + } // // Return the list of blocks to the caller. // - return (NewSlab->Data); + return (Slabp->Data); } void @@ -377,8 +413,11 @@ // if (slabp->IsArray) { - slabp->Next = Pool->ArraySlabs; - Pool->ArraySlabs = slabp; + if ((--slabp->LiveNodes) == 0) + { + slabp->Next = Pool->ArraySlabs; + Pool->ArraySlabs = slabp; + } return; } From brukman at cs.uiuc.edu Fri Nov 14 11:53:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri Nov 14 11:53:01 2003 Subject: [llvm-commits] CVS: llvm-www/status/index.html Message-ID: <200311141752.LAA10635@zion.cs.uiuc.edu> Changes in directory llvm-www/status: index.html updated: 1.12 -> 1.13 --- Log message: Emacs and pine hinge on the same bug #6. --- Diffs of the changes: (+18 -9) Index: llvm-www/status/index.html diff -u llvm-www/status/index.html:1.12 llvm-www/status/index.html:1.13 --- llvm-www/status/index.html:1.12 Thu Nov 13 17:30:03 2003 +++ llvm-www/status/index.html Fri Nov 14 11:51:56 2003 @@ -45,6 +45,23 @@ Status Notes + + + emacs + 21.3 + 14 Nov 2003 + FAILS + See bug #6 for details. + + + + pine + 4.58 + 13 Nov 2003 + FAILS + See bug #6 for details. + gawk @@ -327,14 +344,6 @@ with the types char* vs. unsigned char* has been resolved, and the patch has been accepted into screen - - - emacs - 21.3 - 1 Sep 2003 - - Error: invalid integral type size - ruby @@ -373,7 +382,7 @@
Misha Brukman
The LLVM Compiler Infrastructure
- Last modified: $Date: 2003/11/13 23:30:03 $ + Last modified: $Date: 2003/11/14 17:51:56 $ From criswell at cs.uiuc.edu Fri Nov 14 11:54:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Nov 14 11:54:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311141753.LAA03077@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.23 -> 1.24 --- Log message: Simplified code that scans the free array list looking for a slab. Corrected the free array scanning code to update fields when an array slab is allocated. --- Diffs of the changes: (+24 -16) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.23 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.24 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.23 Fri Nov 14 11:38:01 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 11:53:31 2003 @@ -322,7 +322,7 @@ // Scan the list of array slabs to see if there is one that fits. // struct SlabHeader * Slabp = Pool->ArraySlabs; - struct SlabHeader * Prevp = NULL; + struct SlabHeader ** Prevp = &(Pool->ArraySlabs); // // Check to see if we have an array slab that has extra space that we @@ -348,30 +348,38 @@ // Scan through all the free array slabs to see if they are large // enough. // - for (; Slabp != NULL; Prevp = Slabp, Slabp=Slabp->Next) + for (; Slabp != NULL; Slabp=Slabp->Next) { // // Check to see if this slab has enough room. // if (Slabp->NodesPerSlab >= ArraySize) { - if (Prevp == NULL) - { - // - // This is the first item. Change the head of the list. - // - Pool->ArraySlabs = Slabp->Next; - } - else - { - // - // This is some other item. Modify the preceding item. - // - Prevp->Next = Slabp->Next; - } + // + // Make the previous node point to the next node. + // + (*Prevp)->Next = Slabp->Next; + + // + // Increase the reference count of the slab. + // ++(Slabp->LiveNodes); + + // + // Adjust the slab's index of data blocks. + // + Slabp->NextFreeData = ArraySize; + + // + // Return the slab's data. + // return (Slabp->Data); } + + // + // Move on to the next node. + // + Prevp = &(Slabp->Next); } // From brukman at cs.uiuc.edu Fri Nov 14 12:25:01 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri Nov 14 12:25:01 2003 Subject: [llvm-commits] CVS: llvm-www/status/index.html Message-ID: <200311141824.MAA20998@zion.cs.uiuc.edu> Changes in directory llvm-www/status: index.html updated: 1.13 -> 1.14 --- Log message: * xemacs doesn't work: bug #113 * ed went back to not printing # of lines in file... --- Diffs of the changes: (+12 -5) Index: llvm-www/status/index.html diff -u llvm-www/status/index.html:1.13 llvm-www/status/index.html:1.14 --- llvm-www/status/index.html:1.13 Fri Nov 14 11:51:56 2003 +++ llvm-www/status/index.html Fri Nov 14 12:23:59 2003 @@ -45,6 +45,15 @@ Status Notes + + + + xemacs + 21.5.14 + 14 Nov 2003 + FAILS + See bug #113 for details. + % ./ed e /etc/hosts -185 -,s/local/far/ -Segmentation fault +[ ed should print # of lines in file, but doesn't ] Ed is the standard Unix editor! @@ -369,7 +376,7 @@ realloc: called with unallocated block argument last command: (null) -
  • xemacs-21.5.14 - integral constant out +
  • - integral constant out of range, test case in CVS (CFE) (29 Aug 2003)
  • @@ -382,7 +389,7 @@
    Misha Brukman
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2003/11/14 17:51:56 $ + Last modified: $Date: 2003/11/14 18:23:59 $ From lattner at cs.uiuc.edu Fri Nov 14 12:32:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 12:32:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp Message-ID: <200311141831.MAA23825@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/PoolAllocator: PoolAllocatorBitMask.cpp updated: 1.30 -> 1.31 --- Log message: Uncomment out my assertions, fix buggy assertion --- Diffs of the changes: (+3 -7) Index: poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp diff -u poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp:1.30 poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp:1.31 --- poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp:1.30 Sat Nov 8 21:09:43 2003 +++ poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp Fri Nov 14 12:31:08 2003 @@ -23,9 +23,6 @@ #include #include -#undef assert -#define assert(X) - //===----------------------------------------------------------------------===// // // PoolSlab implementation @@ -332,10 +329,10 @@ int PoolSlab::containsElement(void *Ptr, unsigned ElementSize) const { const void *FirstElement = getElementAddress(0, 0); if (FirstElement <= Ptr) { - unsigned Index = (char*)Ptr-(char*)FirstElement; - Index /= ElementSize; + unsigned Delta = (char*)Ptr-(char*)FirstElement; + unsigned Index = Delta/ElementSize; if (Index < getSlabSize()) { - assert(Index % ElementSize == 0 && + assert(Delta % ElementSize == 0 && "Freeing pointer into the middle of an element!"); return Index; } @@ -665,7 +662,6 @@ void poolfree(PoolTy *Pool, void *Node) { assert(Pool && "Null pool pointer passed in to poolfree!\n"); - PoolSlab *PS; unsigned Idx; if (0) { // THIS SHOULD BE SET FOR SAFECODE! From brukman at cs.uiuc.edu Fri Nov 14 12:39:02 2003 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri Nov 14 12:39:02 2003 Subject: [llvm-commits] CVS: llvm-www/status/index.html Message-ID: <200311141838.MAA29201@zion.cs.uiuc.edu> Changes in directory llvm-www/status: index.html updated: 1.14 -> 1.15 --- Log message: tcsh and glib aren't yet compileable by LLVM. --- Diffs of the changes: (+26 -13) Index: llvm-www/status/index.html diff -u llvm-www/status/index.html:1.14 llvm-www/status/index.html:1.15 --- llvm-www/status/index.html:1.14 Fri Nov 14 12:23:59 2003 +++ llvm-www/status/index.html Fri Nov 14 12:38:01 2003 @@ -63,6 +63,23 @@ FAILS See bug #6 for details. + + + glib + 2.2.2 + 13 Nov 2003 + FAILS + See bug #113 for details. + + + + tcsh + 6.12.00 + 13 Nov 2003 + FAILS + Inexplicably crashes in the JIT immediately soon start-up. Not yet + investigated. + pine @@ -137,14 +154,14 @@ 5.06 12 Nov 2003 FAILS - Requires several libraries, run with:
    -
    lli -load=/lib/libpthread.so.0    \
    -         -load=/usr/lib/libncurses.so  \
    -         -load=/usr/lib/libreadline.so \
    -         gnuchess.bc [gnuchess options]
    - - Does not seem to work on the command line or with xboard. - + Requires several libraries, run with: +
    +lli -load=/lib/libpthread.so.0    \
    +    -load=/usr/lib/libncurses.so  \
    +    -load=/usr/lib/libreadline.so \
    +    gnuchess.bc [gnuchess options]
    +
    + Does not seem to work on the command line or with xboard. @@ -363,8 +380,6 @@ @@ -389,7 +402,7 @@
    Misha Brukman
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2003/11/14 18:23:59 $ + Last modified: $Date: 2003/11/14 18:38:01 $ From lattner at cs.uiuc.edu Fri Nov 14 12:51:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 12:51:02 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311141850.MAA03987@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.52 -> 1.53 --- Log message: Indirect call sites that only call external functions, they don't/can't pass extra arguments. --- Diffs of the changes: (+3 -1) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.52 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.53 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.52 Fri Nov 14 10:41:39 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Fri Nov 14 12:50:08 2003 @@ -192,7 +192,9 @@ const PA::EquivClassInfo &PoolAllocate::getECIForIndirectCallSite(CallSite CS) { Instruction *I = CS.getInstruction(); assert(I && "Not a call site?"); - assert(OneCalledFunction.count(I) && "No targets for indcall?"); + + if (!OneCalledFunction.count(I)) + return ECInfoForLeadersMap[0]; // Special null function for empty graphs Function *Called = OneCalledFunction[I]; Function *Leader = FuncECs.findClass(Called); assert(Leader && "Leader not found for indirect call target!"); From criswell at cs.uiuc.edu Fri Nov 14 13:48:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Nov 14 13:48:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311141947.NAA15339@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.24 -> 1.25 --- Log message: Paranoia: Ensure that we're always allocating something. --- Diffs of the changes: (+3 -0) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.24 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.25 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.24 Fri Nov 14 11:53:31 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 13:47:12 2003 @@ -230,6 +230,9 @@ assert(Pool && "Null pool pointer passed in to poolalloc!\n"); + // Make sure we allocate something + BytesWanted = (BytesWanted ? BytesWanted : 1); + // // Determine if we can satisfy this request normally. If not, then // we need to use the array allocation instead. From lattner at cs.uiuc.edu Fri Nov 14 14:21:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 14:21:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/PoolAllocator/PageManager.cpp PageManager.h PoolAllocatorBitMask.cpp Message-ID: <200311142020.OAA00443@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/PoolAllocator: PageManager.cpp updated: 1.6 -> 1.7 PageManager.h updated: 1.2 -> 1.3 PoolAllocatorBitMask.cpp updated: 1.31 -> 1.32 --- Log message: Completely rewrite handling of singlearrays --- Diffs of the changes: (+50 -51) Index: poolalloc/runtime/PoolAllocator/PageManager.cpp diff -u poolalloc/runtime/PoolAllocator/PageManager.cpp:1.6 poolalloc/runtime/PoolAllocator/PageManager.cpp:1.7 --- poolalloc/runtime/PoolAllocator/PageManager.cpp:1.6 Wed Nov 12 16:46:28 2003 +++ poolalloc/runtime/PoolAllocator/PageManager.cpp Fri Nov 14 14:20:01 2003 @@ -27,11 +27,6 @@ unsigned PageSize = 0; -// Explicitly use the malloc allocator here, to avoid depending on the C++ -// runtime library. -typedef std::vector > FreePagesListType; -static FreePagesListType *FreePages = 0; - void InitializePageManager() { if (!PageSize) PageSize = sysconf(_SC_PAGESIZE); } @@ -63,6 +58,21 @@ } #endif +// Explicitly use the malloc allocator here, to avoid depending on the C++ +// runtime library. +typedef std::vector > FreePagesListType; + +static FreePagesListType &getFreePageList() { + static FreePagesListType *FreePages = 0; + + if (!FreePages) { + // Avoid using operator new! + FreePages = (FreePagesListType*)malloc(sizeof(FreePagesListType)); + // Use placement new now. + new (FreePages) std::vector >(); + } + return *FreePages; +} /// AllocatePage - This function returns a chunk of memory with size and /// alignment specified by PageSize. @@ -72,9 +82,12 @@ posix_memalign(&Addr, PageSize, PageSize); return Addr; #else - if (FreePages && !FreePages->empty()) { - void *Result = FreePages->back(); - FreePages->pop_back(); + + FreePagesListType &FPL = getFreePageList(); + + if (!FPL.empty()) { + void *Result = FPL.back(); + FPL.pop_back(); return Result; } @@ -82,18 +95,16 @@ unsigned NumToAllocate = 8; char *Ptr = (char*)GetPages(NumToAllocate); - if (!FreePages) { - // Avoid using operator new! - FreePages = (FreePagesListType*)malloc(sizeof(FreePagesListType)); - // Use placement new now. - new (FreePages) std::vector >(); - } for (unsigned i = 1; i != NumToAllocate; ++i) - FreePages->push_back(Ptr+i*PageSize); + FPL.push_back(Ptr+i*PageSize); return Ptr; #endif } +void *AllocateNPages(unsigned Num) { + if (Num <= 1) return AllocatePage(); + return GetPages(Num); +} /// FreePage - This function returns the specified page to the pagemanager for /// future allocation. @@ -101,8 +112,8 @@ #if USE_MEMALIGN free(Page); #else - assert(FreePages && "No pages allocated!"); - FreePages->push_back(Page); + FreePagesListType &FPL = getFreePageList(); + FPL.push_back(Page); //munmap(Page, 1); #endif } Index: poolalloc/runtime/PoolAllocator/PageManager.h diff -u poolalloc/runtime/PoolAllocator/PageManager.h:1.2 poolalloc/runtime/PoolAllocator/PageManager.h:1.3 --- poolalloc/runtime/PoolAllocator/PageManager.h:1.2 Fri Nov 7 11:21:24 2003 +++ poolalloc/runtime/PoolAllocator/PageManager.h Fri Nov 14 14:20:01 2003 @@ -30,6 +30,9 @@ /// alignment specified by getPageSize(). void *AllocatePage(); +/// AllocateNPages - +void *AllocateNPages(unsigned Num); + /// FreePage - This function returns the specified page to the pagemanager for /// future allocation. void FreePage(void *Page); Index: poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp diff -u poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp:1.31 poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp:1.32 --- poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp:1.31 Fri Nov 14 12:31:08 2003 +++ poolalloc/runtime/PoolAllocator/PoolAllocatorBitMask.cpp Fri Nov 14 14:20:01 2003 @@ -187,26 +187,26 @@ } void *PoolSlab::createSingleArray(PoolTy *Pool, unsigned NumNodes) { - if (0) { - printf("PoolSlab::createSingleArray has not been tested and is probably broken!"); - abort(); - } + // FIXME: This wastes memory by allocating space for the NodeFlagsVector unsigned NodesPerSlab = getSlabSize(Pool); assert(NumNodes > NodesPerSlab && "No need to create a single array!"); - PoolSlab *PS = (PoolSlab*)malloc(sizeof(PoolSlab) + 4*((NodesPerSlab+15)/16) + - Pool->NodeSize*NumNodes); + + unsigned NumPages = (NumNodes+NodesPerSlab-1)/NodesPerSlab; + PoolSlab *PS = (PoolSlab*)AllocateNPages(NumPages); assert(PS && "poolalloc: Could not allocate memory!"); - PS->NumNodesInSlab = NodesPerSlab; // FIXME: Calculate right. - PS->isSingleArray = 1; // Not a single array! - PS->markNodeAllocated(0); + PS->addToList((PoolSlab**)&Pool->Ptr2); - // Add the slab to the list... - PS->addToList((PoolSlab**)&Pool->Ptr1); + PS->isSingleArray = 1; // Not a single array! + *(unsigned*)&PS->FirstUnused = NumPages; return PS->getElementAddress(0, 0); } void PoolSlab::destroy() { + if (isSingleArray) + for (unsigned NumPages = *(unsigned*)&FirstUnused; NumPages != 1;--NumPages) + FreePage((char*)this + (NumPages-1)*PageSize); + FreePage(this); } @@ -345,18 +345,11 @@ void PoolSlab::freeElement(unsigned short ElementIdx) { assert(isNodeAllocated(ElementIdx) && "poolfree: Attempt to free node that is already freed\n"); + assert(!isSingleArray && "Cannot free an element from a single array!"); // Mark this element as being free! markNodeFree(ElementIdx); - // If this slab is a SingleArray, there is nothing else to do. - if (isSingleArray) { - FirstUnused = UsedEnd = 0; // This slab is now empty - assert(ElementIdx == 0 && - "poolfree: Attempt to free middle of allocated array\n"); - return; - } - // If this slab is not a SingleArray assert(isStartOfAllocation(ElementIdx) && "poolfree: Attempt to free middle of allocated array\n"); @@ -675,6 +668,13 @@ // of the pool. assert((PageSize & PageSize-1) == 0 && "Page size is not a power of 2??"); PS = (PoolSlab*)((long)Node & ~(PageSize-1)); + + if (PS->isSingleArray) { + PS->unlinkFromList(); + PS->destroy(); + return; + } + Idx = PS->containsElement(Node, Pool->NodeSize); assert((int)Idx != -1 && "Node not contained in slab??"); } @@ -705,21 +705,6 @@ // is already an empty slab at the head of the list. // if (PS->isEmpty()) { - if (PS->isSingleArray) - if (Pool->FreeablePool) { - // If it is a SingleArray, just free it - PS->unlinkFromList(); - PS->destroy(); - return; - } else { - // If this is a non-freeable pool, we might as well use the memory - // allocated for normal node allocations. - PS->isSingleArray = 0; - } - - // No more singlearray objects exist at this point. - assert(!PS->isSingleArray); - PS->unlinkFromList(); // Unlink from the list of slabs... // If we can free this pool, check to see if there are any empty slabs at From lattner at cs.uiuc.edu Fri Nov 14 15:17:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 15:17:01 2003 Subject: [llvm-commits] CVS: poolalloc/test/Makefile Message-ID: <200311142116.PAA29912@zion.cs.uiuc.edu> Changes in directory poolalloc/test: Makefile updated: 1.5 -> 1.6 --- Log message: Don't force Large Problem Size --- Diffs of the changes: (+1 -1) Index: poolalloc/test/Makefile diff -u poolalloc/test/Makefile:1.5 poolalloc/test/Makefile:1.6 --- poolalloc/test/Makefile:1.5 Thu Nov 13 11:50:57 2003 +++ poolalloc/test/Makefile Fri Nov 14 15:16:43 2003 @@ -15,6 +15,6 @@ # tests... test:: (cd $(LLVM_OBJ_ROOT)/test/Programs/$(SUBDIR); \ - PROJECT_DIR=$(BUILD_OBJ_ROOT) $(MAKE) LARGE_PROBLEM_SIZE=1 TEST=poolalloc \ + PROJECT_DIR=$(BUILD_OBJ_ROOT) $(MAKE) TEST=poolalloc \ report report.html ) @printf "\a"; sleep 1; printf "\a"; sleep 1; printf "\a" From lattner at cs.uiuc.edu Fri Nov 14 15:18:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 15:18:01 2003 Subject: [llvm-commits] CVS: poolalloc/test/TEST.poolalloc.Makefile TEST.poolalloc.report Message-ID: <200311142117.PAA29921@zion.cs.uiuc.edu> Changes in directory poolalloc/test: TEST.poolalloc.Makefile updated: 1.7 -> 1.8 TEST.poolalloc.report updated: 1.6 -> 1.7 --- Log message: Compute speedup, not whatever it was I had before --- Diffs of the changes: (+3 -3) Index: poolalloc/test/TEST.poolalloc.Makefile diff -u poolalloc/test/TEST.poolalloc.Makefile:1.7 poolalloc/test/TEST.poolalloc.Makefile:1.8 --- poolalloc/test/TEST.poolalloc.Makefile:1.7 Thu Nov 13 11:13:40 2003 +++ poolalloc/test/TEST.poolalloc.Makefile Fri Nov 14 15:16:53 2003 @@ -17,7 +17,7 @@ PA_SO := $(PROJECT_DIR)/lib/Debug/libpoolalloc.so # Pool allocator runtime library -PA_RT := $(PROJECT_DIR)/lib/Bytecode/libpoolalloc_fl_rt.bc +#PA_RT := $(PROJECT_DIR)/lib/Bytecode/libpoolalloc_fl_rt.bc PA_RT_O := $(PROJECT_DIR)/lib/Release/poolalloc_rt.o Index: poolalloc/test/TEST.poolalloc.report diff -u poolalloc/test/TEST.poolalloc.report:1.6 poolalloc/test/TEST.poolalloc.report:1.7 --- poolalloc/test/TEST.poolalloc.report:1.6 Thu Nov 13 11:13:16 2003 +++ poolalloc/test/TEST.poolalloc.report Fri Nov 14 15:16:53 2003 @@ -11,7 +11,7 @@ my ($Cols, $Col) = @_; if ($Cols->[$Col-1] ne "*" and $Cols->[$Col-2] ne "*" and $Cols->[$Col-1] != "0") { - return sprintf "%3.2f%%", ((100.0*$Cols->[$Col-2])/$Cols->[$Col-1] - 100.0); + return sprintf "%1.3f", $Cols->[$Col-2]/$Cols->[$Col-1]; } else { return "n/a"; } @@ -27,7 +27,7 @@ # Times ["Normal
    ExeTime" , 'CBE-RUN-TIME-NORMAL: real[\t ]+0m([0-9.]+)'], ["PoolAlloc
    ExeTime", 'CBE-RUN-TIME-POOLALLOC: real[\t ]+0m([0-9.]+)'], - ["% Speedup", \&Ratio], # Normal / PA + ["Speedup", \&Ratio], ["NumPools", '([0-9]+).*Number of pools allocated'], ["NumCloned", '([0-9]+).*Number of functions cloned'], ["NumArgs", '([0-9]+).*Number of function arguments added'], From criswell at cs.uiuc.edu Fri Nov 14 15:38:02 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Nov 14 15:38:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311142137.PAA23956@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.25 -> 1.26 --- Log message: Disable faster array allocation until it works. --- Diffs of the changes: (+7 -3) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.25 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.26 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.25 Fri Nov 14 13:47:12 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 15:36:52 2003 @@ -331,6 +331,7 @@ // Check to see if we have an array slab that has extra space that we // can use. // +#if 0 if ((Slabp != NULL) && ((Pool->MaxNodesPerPage - Slabp->NextFreeData) >= ArraySize)) { @@ -343,9 +344,10 @@ // Return the data to the caller. // void * Data = (Slabp->Data + (Pool->NodeSize * Slabp->NextFreeData)); - (Slabp->NextFreeData)++; + (Slabp->NextFreeData) += ArraySize; return (Data); } +#endif /* 0 */ // // Scan through all the free array slabs to see if they are large @@ -356,7 +358,7 @@ // // Check to see if this slab has enough room. // - if (Slabp->NodesPerSlab >= ArraySize) + if ((Slabp->NodesPerSlab >= ArraySize) && (Slabp->LiveNodes == 0)) { // // Make the previous node point to the next node. @@ -396,11 +398,13 @@ // // If the array has some space, link it into the array "free" list. // - if ((Slabp->IsManaged == 0) && (Slabp->NextFreeData != Pool->MaxNodesPerPage)) +#if 0 + if ((Slabp->IsManaged == 1) && (Slabp->NextFreeData != Pool->MaxNodesPerPage)) { Slabp->Next = Pool->ArraySlabs; Pool->ArraySlabs = Slabp; } +#endif /* 0 */ // // Return the list of blocks to the caller. From criswell at cs.uiuc.edu Fri Nov 14 15:53:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Nov 14 15:53:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp PoolAllocator.h Message-ID: <200311142152.PAA25851@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.26 -> 1.27 PoolAllocator.h updated: 1.8 -> 1.9 --- Log message: Fixed the faster allocation of arrays. With Chris's new numbers, performance is looking better. Half of the Olden tests show a speed improvement. --- Diffs of the changes: (+19 -13) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.26 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.27 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.26 Fri Nov 14 15:36:52 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 15:52:22 2003 @@ -152,7 +152,7 @@ // We must alway return unique pointers, even if they asked for 0 bytes Pool->NodeSize = NodeSize ? NodeSize : 1; - Pool->Slabs = Pool->ArraySlabs = NULL; + Pool->Slabs = Pool->ArraySlabs = Pool->FastArray = NULL; Pool->FreeList.Next = NULL; #if 0 Pool->FreeablePool = 1; @@ -324,14 +324,13 @@ // // Scan the list of array slabs to see if there is one that fits. // - struct SlabHeader * Slabp = Pool->ArraySlabs; + struct SlabHeader * Slabp = Pool->FastArray; struct SlabHeader ** Prevp = &(Pool->ArraySlabs); // // Check to see if we have an array slab that has extra space that we // can use. // -#if 0 if ((Slabp != NULL) && ((Pool->MaxNodesPerPage - Slabp->NextFreeData) >= ArraySize)) { @@ -341,24 +340,31 @@ Slabp->LiveNodes++; // - // Return the data to the caller. + // Find the data for the caller. // void * Data = (Slabp->Data + (Pool->NodeSize * Slabp->NextFreeData)); - (Slabp->NextFreeData) += ArraySize; + + // + // Disconnect the array slab if it is full. + // + if (((Slabp->NextFreeData) += ArraySize) >= Pool->MaxNodesPerPage) + { + Pool->FastArray = NULL; + } + return (Data); } -#endif /* 0 */ // // Scan through all the free array slabs to see if they are large // enough. // - for (; Slabp != NULL; Slabp=Slabp->Next) + for (Slabp = Pool->ArraySlabs; Slabp != NULL; Slabp=Slabp->Next) { // // Check to see if this slab has enough room. // - if ((Slabp->NodesPerSlab >= ArraySize) && (Slabp->LiveNodes == 0)) + if (Slabp->NodesPerSlab >= ArraySize) { // // Make the previous node point to the next node. @@ -398,13 +404,10 @@ // // If the array has some space, link it into the array "free" list. // -#if 0 if ((Slabp->IsManaged == 1) && (Slabp->NextFreeData != Pool->MaxNodesPerPage)) { - Slabp->Next = Pool->ArraySlabs; - Pool->ArraySlabs = Slabp; + Pool->FastArray = Slabp; } -#endif /* 0 */ // // Return the list of blocks to the caller. Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.8 poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.9 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.8 Fri Nov 14 10:03:39 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.h Fri Nov 14 15:52:22 2003 @@ -32,8 +32,11 @@ // Pointer to the list of slabs allocated for this pool struct SlabHeader * Slabs; - // List of slabs used to hold arrays + // Linked list of slabs used to hold arrays struct SlabHeader * ArraySlabs; + + // Pointer to the fast alloc array + struct SlabHeader * FastArray; // Pointer to the free list of nodes struct NodePointer FreeList; From lattner at cs.uiuc.edu Fri Nov 14 16:06:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 16:06:03 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp PoolAllocator.h Message-ID: <200311142205.QAA31382@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.27 -> 1.28 PoolAllocator.h updated: 1.9 -> 1.10 --- Log message: Do not export poolallocarray, make it static and move it before poolalloc instead --- Diffs of the changes: (+97 -97) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.27 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.28 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.27 Fri Nov 14 15:52:22 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 16:05:39 2003 @@ -212,101 +212,6 @@ } // -// Function: poolalloc () -// -// Description: -// Allocates memory from the pool. Typically, we will allocate memory -// in the same size chunks as we usually do, but sometimes, we will have to -// allocate more. -// -void * -poolalloc(PoolTy *Pool, unsigned BytesWanted) -{ - // Pointer to the data block to return - void * Data; - - // Slab Pointer - struct SlabHeader * Slabp; - - assert(Pool && "Null pool pointer passed in to poolalloc!\n"); - - // Make sure we allocate something - BytesWanted = (BytesWanted ? BytesWanted : 1); - - // - // Determine if we can satisfy this request normally. If not, then - // we need to use the array allocation instead. - // - if (Pool->NodeSize < BytesWanted) - { - return (poolallocarray (Pool, (BytesWanted+Pool->NodeSize-1)/Pool->NodeSize)); - } - - // - // If we don't have a slab, this is our first initialization. Do some - // quick stuff. - // - Slabp = Pool->Slabs; - if (Slabp == NULL) - { - Pool->Slabs = Slabp = createSlab (Pool); - (Slabp->NextFreeData)++; - return (Slabp->Data); - } - - // - // Determine whether we can allocate from the current slab. - // - if (Slabp->NextFreeData < Slabp->NodesPerSlab) - { - // - // Return the block and increment the index of the next free data block. - // - Data = (Slabp->Data + (Pool->NodeSize * Slabp->NextFreeData)); - (Slabp->NextFreeData)++; - return (Data); - } - - // - // We have a slab, but it doesn't have any new blocks. - // Check the free list to see if we can use any recycled blocks. - // - if (Pool->FreeList.Next == NULL) - { - // - // Create a new slab and add it to the list. - // - Slabp = createSlab (Pool); - Slabp->Next = Pool->Slabs; - Pool->Slabs = Slabp; - - (Slabp->NextFreeData)++; - - // - // Return the block and increment the index of the next free data block. - // - return (Slabp->Data); - } - - // - // Determine which slab owns this block. - // - Slabp = BlockOwner (PageSize, Pool->FreeList); - - // - // Find the data block that corresponds with this pointer. - // - Data = (Slabp->Data + (Pool->NodeSize * (Pool->FreeList.Next - &(Slabp->BlockList[0])))); - - // - // Unlink the first block. - // - Pool->FreeList.Next = Pool->FreeList.Next->Next; - - return Data; -} - -// // Function: poolallocarray () // // Description: @@ -316,7 +221,7 @@ // Pool - The pool from which to allocate memory. // ArraySize - The size of the array in number of elements (not bytes). // -void * +static void * poolallocarray(PoolTy* Pool, unsigned ArraySize) { assert(Pool && "Null pool pointer passed into poolallocarray!\n"); @@ -413,6 +318,102 @@ // Return the list of blocks to the caller. // return (Slabp->Data); +} + + +// +// Function: poolalloc () +// +// Description: +// Allocates memory from the pool. Typically, we will allocate memory +// in the same size chunks as we usually do, but sometimes, we will have to +// allocate more. +// +void * +poolalloc(PoolTy *Pool, unsigned BytesWanted) +{ + // Pointer to the data block to return + void * Data; + + // Slab Pointer + struct SlabHeader * Slabp; + + assert(Pool && "Null pool pointer passed in to poolalloc!\n"); + + // Make sure we allocate something + BytesWanted = (BytesWanted ? BytesWanted : 1); + + // + // Determine if we can satisfy this request normally. If not, then + // we need to use the array allocation instead. + // + if (Pool->NodeSize < BytesWanted) + { + return (poolallocarray (Pool, (BytesWanted+Pool->NodeSize-1)/Pool->NodeSize)); + } + + // + // If we don't have a slab, this is our first initialization. Do some + // quick stuff. + // + Slabp = Pool->Slabs; + if (Slabp == NULL) + { + Pool->Slabs = Slabp = createSlab (Pool); + (Slabp->NextFreeData)++; + return (Slabp->Data); + } + + // + // Determine whether we can allocate from the current slab. + // + if (Slabp->NextFreeData < Slabp->NodesPerSlab) + { + // + // Return the block and increment the index of the next free data block. + // + Data = (Slabp->Data + (Pool->NodeSize * Slabp->NextFreeData)); + (Slabp->NextFreeData)++; + return (Data); + } + + // + // We have a slab, but it doesn't have any new blocks. + // Check the free list to see if we can use any recycled blocks. + // + if (Pool->FreeList.Next == NULL) + { + // + // Create a new slab and add it to the list. + // + Slabp = createSlab (Pool); + Slabp->Next = Pool->Slabs; + Pool->Slabs = Slabp; + + (Slabp->NextFreeData)++; + + // + // Return the block and increment the index of the next free data block. + // + return (Slabp->Data); + } + + // + // Determine which slab owns this block. + // + Slabp = BlockOwner (PageSize, Pool->FreeList); + + // + // Find the data block that corresponds with this pointer. + // + Data = (Slabp->Data + (Pool->NodeSize * (Pool->FreeList.Next - &(Slabp->BlockList[0])))); + + // + // Unlink the first block. + // + Pool->FreeList.Next = Pool->FreeList.Next->Next; + + return Data; } void Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.h diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.9 poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.10 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.h:1.9 Fri Nov 14 15:52:22 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.h Fri Nov 14 16:05:39 2003 @@ -55,7 +55,6 @@ void pooldestroy(PoolTy *Pool); void *poolalloc(PoolTy *Pool, unsigned NodeSize); void poolfree(PoolTy *Pool, void *Node); - void* poolallocarray(PoolTy* Pool, unsigned Size); } #endif From lattner at cs.uiuc.edu Fri Nov 14 16:11:03 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 16:11:03 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311142210.QAA32492@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.28 -> 1.29 --- Log message: Make sure to reserve space for the slabheader header as well --- Diffs of the changes: (+2 -1) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.28 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.29 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.28 Fri Nov 14 16:05:39 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 16:10:26 2003 @@ -65,7 +65,8 @@ // if (NodesPerSlab > MaxNodesPerPage) { - NewSlab = (struct SlabHeader *) GetPages ((NodeSize * NodesPerSlab / PageSize) + 1); + unsigned NumBytes = sizeof(SlabHeader) + NodeSize * NodesPerSlab; + NewSlab = (struct SlabHeader *)GetPages((NumBytes+PageSize-1)/PageSize); if (NewSlab == NULL) { fprintf (stderr, "Failed large allocation\n"); From lattner at cs.uiuc.edu Fri Nov 14 16:14:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 16:14:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311142213.QAA00564@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.29 -> 1.30 --- Log message: While we're at it, allocate space for the links list as well. This fixes em3d in large problem size --- Diffs of the changes: (+1 -0) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.29 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.30 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.29 Fri Nov 14 16:10:26 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 16:13:16 2003 @@ -66,6 +66,7 @@ if (NodesPerSlab > MaxNodesPerPage) { unsigned NumBytes = sizeof(SlabHeader) + NodeSize * NodesPerSlab; + NumBytes += NodesPerSlab * sizeof (NodePointer); NewSlab = (struct SlabHeader *)GetPages((NumBytes+PageSize-1)/PageSize); if (NewSlab == NULL) { From lattner at cs.uiuc.edu Fri Nov 14 16:15:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 16:15:02 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolSlab.h Message-ID: <200311142214.QAA01148@zion.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolSlab.h updated: 1.3 -> 1.4 --- Log message: Remvoe the haxor out of assert. The release version won't have them. --- Diffs of the changes: (+0 -3) Index: poolalloc/runtime/FreeListAllocator/PoolSlab.h diff -u poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.3 poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.4 --- poolalloc/runtime/FreeListAllocator/PoolSlab.h:1.3 Thu Nov 13 14:13:42 2003 +++ poolalloc/runtime/FreeListAllocator/PoolSlab.h Fri Nov 14 16:14:19 2003 @@ -20,9 +20,6 @@ #include #include -#undef assert -#define assert(X) - //===----------------------------------------------------------------------===// // // Defintion of Slab Data Structures From criswell at cs.uiuc.edu Fri Nov 14 16:37:01 2003 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Nov 14 16:37:01 2003 Subject: [llvm-commits] CVS: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Message-ID: <200311142236.QAA01234@choi.cs.uiuc.edu> Changes in directory poolalloc/runtime/FreeListAllocator: PoolAllocator.cpp updated: 1.30 -> 1.31 --- Log message: Do not set the number of nodes per slab to the maximum if we're allocating an array that fits within a page. The array might have larger nodes. --- Diffs of the changes: (+4 -1) Index: poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp diff -u poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.30 poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.31 --- poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp:1.30 Fri Nov 14 16:13:16 2003 +++ poolalloc/runtime/FreeListAllocator/PoolAllocator.cpp Fri Nov 14 16:36:06 2003 @@ -92,7 +92,10 @@ // // Bump the number of nodes in the slab up to the maximum. // - NodesPerSlab = MaxNodesPerPage; + if (NodesPerSlab == 0) + { + NodesPerSlab = MaxNodesPerPage; + } } NewSlab->NodesPerSlab = NodesPerSlab; From lattner at cs.uiuc.edu Fri Nov 14 19:20:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 19:20:01 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311150119.TAA12851@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.53 -> 1.54 --- Log message: count the number of typesafe pools --- Diffs of the changes: (+7 -0) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.53 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.54 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.53 Fri Nov 14 12:50:08 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Fri Nov 14 19:19:27 2003 @@ -35,6 +35,7 @@ Statistic<> NumArgsAdded("poolalloc", "Number of function arguments added"); Statistic<> NumCloned ("poolalloc", "Number of functions cloned"); Statistic<> NumPools ("poolalloc", "Number of pools allocated"); + Statistic<> NumTSPools ("poolalloc", "Number of typesafe pools"); Statistic<> NumPoolFree ("poolalloc", "Number of poolfree's elided"); const Type *VoidPtrTy; @@ -401,6 +402,10 @@ ConstantUInt::get(Type::UIntTy, (*I)->getType()->isSized() ? TD.getTypeSize((*I)->getType()) : 4); new CallInst(PoolInit, make_vector((Value*)GV, ElSize, 0), "", InsertPt); + + ++NumPools; + if (!(*I)->isNodeCompletelyFolded()) + ++NumTSPools; } return false; @@ -534,6 +539,8 @@ if (Node->getType() == Type::VoidTy) std::cerr << "Node collapsing in '" << F.getName() << "'\n"; ++NumPools; + if (!Node->isNodeCompletelyFolded()) + ++NumTSPools; // Update the PoolDescriptors map PoolDescriptors.insert(std::make_pair(Node, AI)); From lattner at cs.uiuc.edu Fri Nov 14 19:36:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Nov 14 19:36:02 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/Olden/bh/Makefile Message-ID: <200311150135.TAA14271@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/Olden/bh: Makefile updated: 1.10 -> 1.11 --- Log message: reduce runtime a bit --- Diffs of the changes: (+1 -1) Index: llvm/test/Programs/MultiSource/Benchmarks/Olden/bh/Makefile diff -u llvm/test/Programs/MultiSource/Benchmarks/Olden/bh/Makefile:1.10 llvm/test/Programs/MultiSource/Benchmarks/Olden/bh/Makefile:1.11 --- llvm/test/Programs/MultiSource/Benchmarks/Olden/bh/Makefile:1.10 Fri Sep 12 11:02:22 2003 +++ llvm/test/Programs/MultiSource/Benchmarks/Olden/bh/Makefile Fri Nov 14 19:34:54 2003 @@ -4,7 +4,7 @@ CPPFLAGS = -DTORONTO LDFLAGS = -lm ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = 50000 30 +RUN_OPTIONS = 40000 30 endif include $(LEVEL)/test/Programs/MultiSource/Makefile.multisrc From alkis at cs.uiuc.edu Sat Nov 15 12:34:02 2003 From: alkis at cs.uiuc.edu (Alkis Evlogimenos) Date: Sat Nov 15 12:34:02 2003 Subject: [llvm-commits] [regalloc_linearscan] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp Message-ID: <200311151833.MAA18116@morpheus.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: RegAllocLinearScan.cpp updated: 1.1.2.12 -> 1.1.2.13 --- Log message: Make register allocation more aggressive. As a result two-addr instructions end up preventing a copy (a = b op c -> a = b, a = a op c in the general case; we avoid a = b if this is b's last use). When spilled defined operands are used do not load them if this is not a use (no need to insert extra load if we are redefining the value). --- Diffs of the changes: (+88 -74) Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.12 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.13 --- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.1.2.12 Thu Nov 13 03:49:50 2003 +++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Sat Nov 15 12:33:33 2003 @@ -222,10 +222,6 @@ inactive_.end())); DEBUG(printVirt2PhysMap()); - // process the active intervals (this will potentially - // expire intervals and hence free physical registers) - processActiveIntervals(curIndex); - // FIXME: holes are completely ignored for now // processInactiveIntervals(curIndex); @@ -238,20 +234,6 @@ reservePhysReg(physReg); } - // loop over operands and spill all already defined - // physical registers - DEBUG(std::cerr << "\t\tprocessing already allocated physical " - "registers:\n"); - for (unsigned i = 0, e = (*currentInstr_)->getNumOperands(); - i != e; ++i) { - MachineOperand& op = (*currentInstr_)->getOperand(i); - if (op.isPhysicalRegister() && - (op.opIsDefOnly() || op.opIsDefAndUse())) { - unsigned physReg = op.getAllocatedRegNum(); - reservePhysReg(physReg); - } - } - // assign physical registers to used operands DEBUG(std::cerr << "\t\tprocessing used operands:\n"); for (unsigned i = 0, e = (*currentInstr_)->getNumOperands(); @@ -276,9 +258,57 @@ } } + // loop over killed physical registers and clear them + DEBUG(std::cerr << "\t\tprocessing killed physical registers:\n"); + for (LiveVariables::killed_iterator + ki = lv_->killed_begin(*currentInstr_), + ke = lv_->killed_end(*currentInstr_); + ki != ke; ++ki) { + unsigned reg = ki->second; + if (reg < MRegisterInfo::FirstVirtualRegister) { + clearReservedPhysReg(reg); + } + } + + // loop over dead physical registers and clear them + DEBUG(std::cerr << "\t\tprocessing dead physical registers:\n"); + for (LiveVariables::killed_iterator + ki = lv_->dead_begin(*currentInstr_), + ke = lv_->dead_end(*currentInstr_); + ki != ke; ++ki) { + unsigned reg = ki->second; + if (reg < MRegisterInfo::FirstVirtualRegister) { + clearReservedPhysReg(reg); + } + } + + + DEBUG(std::cerr << "\t\tclearing temporarily used operands:\n"); + for (unsigned i = 0, e = tempUseOperands_.size(); i != e; ++i) { + clearVirtReg(tempUseOperands_[i]); + } + + // this will expire intervals that are dead right after + // the execution of this instruction + processActiveIntervals(curIndex + 1); + processInterval(curIndex); - // assign physical registers to used operands + // loop over operands and spill all already defined + // physical registers + DEBUG(std::cerr << "\t\tprocessing already allocated physical " + "registers:\n"); + for (unsigned i = 0, e = (*currentInstr_)->getNumOperands(); + i != e; ++i) { + MachineOperand& op = (*currentInstr_)->getOperand(i); + if (op.isPhysicalRegister() && + (op.opIsDefOnly() || op.opIsDefAndUse())) { + unsigned physReg = op.getAllocatedRegNum(); + reservePhysReg(physReg); + } + } + + // assign physical registers to not allocated defined operands DEBUG(std::cerr << "\t\tprocessing not allocated defined " "operands:\n"); for (unsigned i = 0, e = (*currentInstr_)->getNumOperands(); @@ -297,7 +327,14 @@ physReg = getFreePhysReg(virtReg); } assert(physReg && "no available physical register?!"); - loadVirt2PhysReg(virtReg, physReg); + // load from stack only if we are going to use the value + if (op.opIsDefAndUse()) { + loadVirt2PhysReg(virtReg, physReg); + } + // otherwise just assign the mapping + else { + allocateVirt2PhysReg(virtReg, physReg); + } tempDefOperands_.push_back(virtReg); } (*currentInstr_)->SetMachineOperandReg(i, v2pMap_[virtReg]); @@ -321,35 +358,36 @@ } } - // loop over killed physical registers and clear them - DEBUG(std::cerr << "\t\tprocessing killed physical registers:\n"); - for (LiveVariables::killed_iterator - ki = lv_->killed_begin(*currentInstr_), - ke = lv_->killed_end(*currentInstr_); - ki != ke; ++ki) { - unsigned reg = ki->second; - if (reg < MRegisterInfo::FirstVirtualRegister) { - clearReservedPhysReg(reg); - } - } - - // loop over dead physical registers and clear them - DEBUG(std::cerr << "\t\tprocessing dead physical registers:\n"); - for (LiveVariables::killed_iterator - ki = lv_->dead_begin(*currentInstr_), - ke = lv_->dead_end(*currentInstr_); - ki != ke; ++ki) { - unsigned reg = ki->second; - if (reg < MRegisterInfo::FirstVirtualRegister) { - clearReservedPhysReg(reg); - } + // if the instructions is a two address instruction: + // + //"a = b + c" but a and b must be the same register, + //insert "a = b" before it and make the original + //instruction "a = a + c") + + if (tm_->getInstrInfo().isTwoAddrInstr( + (*currentInstr_)->getOpcode())) { + assert((*currentInstr_)->getOperand(1).isRegister() && + (*currentInstr_)->getOperand(1).getAllocatedRegNum() && + (*currentInstr_)->getOperand(1).opIsUse() && + "Two address instruction invalid"); + + unsigned regA = + (*currentInstr_)->getOperand(0).getAllocatedRegNum(); + unsigned regB = + (*currentInstr_)->getOperand(1).getAllocatedRegNum(); + const TargetRegisterClass* rc = mri_->getRegClass(regA); + + instrAdded_ += mri_->copyRegToReg(*currentMbb_, + currentInstr_, + regA, + regB, + rc); + tempUseOperands_.erase(remove(tempUseOperands_.begin(), + tempUseOperands_.end(), + regB), + tempUseOperands_.end()); + (*currentInstr_)->SetMachineOperandReg(1, regA); } - - DEBUG(std::cerr << "\t\tclearing temporarily used operands:\n"); - for (unsigned i = 0, e = tempUseOperands_.size(); i != e; ++i) { - clearVirtReg(tempUseOperands_[i]); - } - DEBUG(std::cerr << "\t\tspilling temporarily defined operands:\n"); for (unsigned i = 0, e = tempDefOperands_.size(); i != e; ++i) { spillVirtReg(tempDefOperands_[i]); @@ -379,31 +417,7 @@ currentInterval_->start() == curIndex) { DEBUG(std::cerr << "\t\tprocessing current interval:\n"); unsigned virtReg = currentInterval_->reg; - unsigned physReg = (unsigned) -1; - if (tm_->getInstrInfo().isTwoAddrInstr((*currentInstr_)->getOpcode())) { - assert((*currentInstr_)->getOperand(1).isRegister() && - (*currentInstr_)->getOperand(1).getAllocatedRegNum() && - (*currentInstr_)->getOperand(1).opIsUse() && - "Two address instruction invalid"); - - physReg = (*currentInstr_)->getOperand(1).getAllocatedRegNum(); - // remove interval from active - for (IntervalPtrs::iterator i = active_.begin(), e = active_.end(); - i != e; ++i) { - if ((*i)->reg == p2vMap_[physReg]) { - active_.erase(i); - break; - } - } - tempUseOperands_.erase(remove(tempUseOperands_.begin(), - tempUseOperands_.end(), - p2vMap_[physReg]), - tempUseOperands_.end()); - spillVirtReg(p2vMap_[physReg]); - } - else { - physReg = getFreePhysReg(virtReg); - } + unsigned physReg = getFreePhysReg(virtReg); if (!physReg) { spillInterval(); @@ -454,7 +468,7 @@ // // remove from inactive // i = inactive_.erase(i); // } -// // move re-activated intervals in active list +// // move re-activated intervals in active list // else if ((*i)->overlaps(curIndex)) { // DEBUG(std::cerr << "\t\t\tinterval " << **i << " active\n"); // markReg(virtReg); From lattner at cs.uiuc.edu Sat Nov 15 12:37:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Nov 15 12:37:01 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311151836.MAA27277@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.54 -> 1.55 --- Log message: Don't bother destroying any pools allocated in main --- Diffs of the changes: (+5 -4) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.54 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.55 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.54 Fri Nov 14 19:19:27 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Sat Nov 15 12:36:41 2003 @@ -672,10 +672,11 @@ /*empty*/; PoolInitPoints.push_back(InsertPoint); - for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) - if (isa(BB->getTerminator()) || - isa(BB->getTerminator())) - PoolDestroyPoints.push_back(BB->getTerminator()); + if (F.getName() != "main") + for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) + if (isa(BB->getTerminator()) || + isa(BB->getTerminator())) + PoolDestroyPoints.push_back(BB->getTerminator()); } // Insert all of the poolalloc calls in the start of the function. From lattner at cs.uiuc.edu Sat Nov 15 12:53:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Nov 15 12:53:02 2003 Subject: [llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp Message-ID: <200311151847.MAA29174@zion.cs.uiuc.edu> Changes in directory poolalloc/lib/PoolAllocate: PoolAllocate.cpp updated: 1.55 -> 1.56 --- Log message: Pass zero when we have a collapsed node, so the PA runtime can be a bit more thoughtful --- Diffs of the changes: (+2 -2) Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.55 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.56 --- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.55 Sat Nov 15 12:36:41 2003 +++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp Sat Nov 15 12:47:04 2003 @@ -400,7 +400,7 @@ Value *ElSize = ConstantUInt::get(Type::UIntTy, (*I)->getType()->isSized() ? - TD.getTypeSize((*I)->getType()) : 4); + TD.getTypeSize((*I)->getType()) : 0); new CallInst(PoolInit, make_vector((Value*)GV, ElSize, 0), "", InsertPt); ++NumPools; @@ -685,7 +685,7 @@ Value *ElSize = ConstantUInt::get(Type::UIntTy, Node->getType()->isSized() ? - TD.getTypeSize(Node->getType()) : 4); + TD.getTypeSize(Node->getType()) : 0); AllocaInst *PD = cast(PoolDescriptors[Node]); From s49zwgu at netscape.net Sat Nov 15 19:10:02 2003 From: s49zwgu at netscape.net (Ulysses Aaron) Date: Sat Nov 15 19:10:02 2003 Subject: [llvm-commits] Re: Balance Due, account Message-ID: <32ma1-kp$--wvk-j5e$-i3@t29j6.pbu> An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20031115/9ee7083a/attachment.html From gaeke at cs.uiuc.edu Sun Nov 16 00:53:03 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 00:53:03 2003 Subject: [llvm-commits] CVS: llvm/runtime/Makefile Message-ID: <200311160652.AAA18757@zion.cs.uiuc.edu> Changes in directory llvm/runtime: Makefile updated: 1.8 -> 1.9 --- Log message: As per PR96, don't build subdirs if LLVMGCCDIR is not set to something reasonable, instead, print out a "LOUD warning". --- Diffs of the changes: (+10 -0) Index: llvm/runtime/Makefile diff -u llvm/runtime/Makefile:1.8 llvm/runtime/Makefile:1.9 --- llvm/runtime/Makefile:1.8 Mon Oct 20 17:28:45 2003 +++ llvm/runtime/Makefile Sun Nov 16 00:51:53 2003 @@ -9,7 +9,17 @@ # llvm/runtime Makefile: Build all subdirectories automatically LEVEL = .. +include $(LEVEL)/Makefile.config +ifneq ($(wildcard $(LLVMGCCDIR)),) PARALLEL_DIRS := $(sort $(filter-out Output/, $(filter-out CVS/, $(wildcard */)))) +else +PARALLEL_DIRS := +all :: + @echo '********' Warning: Your LLVMGCCDIR is set incorrectly. Double-check + @echo '********' Warning: llvm/Makefile.config to make sure it matches + @echo '********' Warning: the directory where the C front-end is installed, + @echo '********' Warning: and re-run configure if it does not. +endif include $(LEVEL)/Makefile.common From ptip98ugg at netscape.net Sun Nov 16 05:53:01 2003 From: ptip98ugg at netscape.net (Herminia Bowman) Date: Sun Nov 16 05:53:01 2003 Subject: [llvm-commits] Fw: Card Termination Info, application Message-ID: An HTML attachment was scrubbed... URL: http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20031116/faa96852/attachment.html From gaeke at cs.uiuc.edu Sun Nov 16 12:38:00 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 12:38:00 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200311161837.MAA03851@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.53 -> 1.54 --- Log message: Only default to the llvm-gcc in ~lattner if that directory exists. Only warn if python version is not right; don't abort. Add sanity checks for --with-llvmgccdir, with a big warning message at the end. --- Diffs of the changes: (+54 -4) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.53 llvm/autoconf/configure.ac:1.54 --- llvm/autoconf/configure.ac:1.53 Wed Nov 12 16:16:23 2003 +++ llvm/autoconf/configure.ac Sun Nov 16 12:37:46 2003 @@ -251,11 +251,17 @@ dnl case $build in *i*86*) AC_SUBST(OS,[Linux]) - AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/x86/llvm-gcc/]) + if test -d /home/vadve/lattner/local/x86/llvm-gcc + then + AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/x86/llvm-gcc/]) + fi ;; *sparc*) AC_SUBST(OS,[SunOS]) - AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/sparc/llvm-gcc/]) + if test -d /home/vadve/lattner/local/sparc/llvm-gcc + then + AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/sparc/llvm-gcc/]) + fi ;; *) AC_SUBST(OS,[Unknown]) @@ -401,11 +407,11 @@ then if test "$pyminor" -lt "2" then - AC_MSG_ERROR([Python 2.2 or greater required]) + AC_MSG_WARN([Python 2.2 or greater required for qmtest]) fi fi else - AC_MSG_ERROR([Python 2.2 or greater required]) + AC_MSG_WARN([Python 2.2 or greater required for qmtest]) fi dnl Verify that the source directory is valid @@ -603,6 +609,40 @@ dnl Location of the LLVM C front end AC_ARG_WITH(llvmgccdir,AC_HELP_STRING([--with-llvmgccdir],[Location of LLVM GCC front-end]),AC_SUBST(LLVMGCCDIR,[$withval])) +AC_MSG_CHECKING([for llvm-gcc]) +LLVM_GCC_CHECK=no +if test -d "$LLVMGCCDIR" +then + if test -x "$LLVMGCCDIR/bin/gcc" + then + LLVM_GCC_CHECK="$LLVMGCCDIR/bin/gcc" + fi +fi +llvmgccwarn=no +AC_MSG_RESULT($LLVM_GCC_CHECK) +if test "$LLVM_GCC_CHECK" = "no" +then + llvmgccwarn=yes +fi + +AC_MSG_CHECKING([whether llvm-gcc is sane]) +LLVM_GCC_SANE=no +if test -x "$LLVM_GCC_CHECK" +then + cp /dev/null conftest.c + "$LLVM_GCC_CHECK" -S -o - conftest.c | grep implementation > /dev/null 2>&1 + if test $? -eq 0 + then + LLVM_GCC_SANE=yes + fi + rm conftest.c +fi +AC_MSG_RESULT($LLVM_GCC_SANE) +if test "$LLVM_GCC_SANE" = "no" +then + llvmgccwarn=yes +fi + dnl Location of the bytecode repository AC_ARG_WITH(bcrepos,AC_HELP_STRING([--with-bcrepos],[Location of Bytecode Repository]),AC_SUBST(BCR,[$withval]),AC_SUBST(BCR,[/home/vadve/lattner/LLVMPrograms])) @@ -620,3 +660,13 @@ dnl * Create the output files dnl ************************************************************************** AC_OUTPUT(Makefile.config) + +if test $llvmgccwarn = yes +then + AC_MSG_WARN([***** llvm C/C++ front end was not found, or does not]) + AC_MSG_WARN([***** appear to be working.]) + AC_MSG_WARN([***** ]) + AC_MSG_WARN([***** Please check configure's --with-llvmgccdir option.]) + AC_MSG_WARN([***** Runtime libraries (in llvm/runtime) will not be built,]) + AC_MSG_WARN([***** but you should be able to build the llvm tools.]) +fi From gaeke at cs.uiuc.edu Sun Nov 16 12:39:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 12:39:01 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200311161838.MAA03923@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.52 -> 1.53 --- Log message: Regenerated with autoconf-2.57. --- Diffs of the changes: (+94 -36) Index: llvm/configure diff -u llvm/configure:1.52 llvm/configure:1.53 --- llvm/configure:1.52 Wed Nov 12 16:16:51 2003 +++ llvm/configure Sun Nov 16 12:38:14 2003 @@ -2271,14 +2271,20 @@ case $build in *i*86*) OS=Linux - LLVMGCCDIR=/home/vadve/lattner/local/x86/llvm-gcc/ + if test -d /home/vadve/lattner/local/x86/llvm-gcc + then + LLVMGCCDIR=/home/vadve/lattner/local/x86/llvm-gcc/ + fi ;; *sparc*) OS=SunOS - LLVMGCCDIR=/home/vadve/lattner/local/sparc/llvm-gcc/ + if test -d /home/vadve/lattner/local/sparc/llvm-gcc + then + LLVMGCCDIR=/home/vadve/lattner/local/sparc/llvm-gcc/ + fi ;; *) OS=Unknown @@ -4452,7 +4458,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4455 "configure"' > conftest.$ac_ext + echo '#line 4461 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5293,7 +5299,7 @@ # Provide some information about the compiler. -echo "$as_me:5296:" \ +echo "$as_me:5302:" \ "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 @@ -6302,11 +6308,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6305: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6311: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6309: \$? = $ac_status" >&5 + echo "$as_me:6315: \$? = $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 @@ -6534,11 +6540,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6537: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6543: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6541: \$? = $ac_status" >&5 + echo "$as_me:6547: \$? = $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 @@ -6601,11 +6607,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6604: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6610: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6608: \$? = $ac_status" >&5 + echo "$as_me:6614: \$? = $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 @@ -8613,7 +8619,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:10856: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10854: \$? = $ac_status" >&5 + echo "$as_me:10860: \$? = $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 @@ -10914,11 +10920,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10917: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10923: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10921: \$? = $ac_status" >&5 + echo "$as_me:10927: \$? = $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 @@ -12157,7 +12163,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:13086: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13084: \$? = $ac_status" >&5 + echo "$as_me:13090: \$? = $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 @@ -13144,11 +13150,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13147: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13153: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13151: \$? = $ac_status" >&5 + echo "$as_me:13157: \$? = $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 @@ -15088,11 +15094,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15091: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15097: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15095: \$? = $ac_status" >&5 + echo "$as_me:15101: \$? = $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 @@ -15320,11 +15326,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15323: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15329: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15327: \$? = $ac_status" >&5 + echo "$as_me:15333: \$? = $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 @@ -15387,11 +15393,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15390: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15396: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15394: \$? = $ac_status" >&5 + echo "$as_me:15400: \$? = $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 @@ -17399,7 +17405,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 -echo "$as_me: error: Python 2.2 or greater required" >&2;} - { (exit 1); exit 1; }; } + { echo "$as_me:$LINENO: WARNING: Python 2.2 or greater required for qmtest" >&5 +echo "$as_me: WARNING: Python 2.2 or greater required for qmtest" >&2;} fi fi else - { { echo "$as_me:$LINENO: error: Python 2.2 or greater required" >&5 -echo "$as_me: error: Python 2.2 or greater required" >&2;} - { (exit 1); exit 1; }; } + { echo "$as_me:$LINENO: WARNING: Python 2.2 or greater required for qmtest" >&5 +echo "$as_me: WARNING: Python 2.2 or greater required for qmtest" >&2;} fi @@ -23099,6 +23103,44 @@ fi; +echo "$as_me:$LINENO: checking for llvm-gcc" >&5 +echo $ECHO_N "checking for llvm-gcc... $ECHO_C" >&6 +LLVM_GCC_CHECK=no +if test -d "$LLVMGCCDIR" +then + if test -x "$LLVMGCCDIR/bin/gcc" + then + LLVM_GCC_CHECK="$LLVMGCCDIR/bin/gcc" + fi +fi +llvmgccwarn=no +echo "$as_me:$LINENO: result: $LLVM_GCC_CHECK" >&5 +echo "${ECHO_T}$LLVM_GCC_CHECK" >&6 +if test "$LLVM_GCC_CHECK" = "no" +then + llvmgccwarn=yes +fi + +echo "$as_me:$LINENO: checking whether llvm-gcc is sane" >&5 +echo $ECHO_N "checking whether llvm-gcc is sane... $ECHO_C" >&6 +LLVM_GCC_SANE=no +if test -x "$LLVM_GCC_CHECK" +then + cp /dev/null conftest.c + "$LLVM_GCC_CHECK" -S -o - conftest.c | grep implementation > /dev/null 2>&1 + if test $? -eq 0 + then + LLVM_GCC_SANE=yes + fi + rm conftest.c +fi +echo "$as_me:$LINENO: result: $LLVM_GCC_SANE" >&5 +echo "${ECHO_T}$LLVM_GCC_SANE" >&6 +if test "$LLVM_GCC_SANE" = "no" +then + llvmgccwarn=yes +fi + # Check whether --with-bcrepos or --without-bcrepos was given. if test "${with_bcrepos+set}" = set; then @@ -25042,3 +25084,19 @@ done fi + +if test $llvmgccwarn = yes +then + { echo "$as_me:$LINENO: WARNING: ***** llvm C/C++ front end was not found, or does not" >&5 +echo "$as_me: WARNING: ***** llvm C/C++ front end was not found, or does not" >&2;} + { echo "$as_me:$LINENO: WARNING: ***** appear to be working." >&5 +echo "$as_me: WARNING: ***** appear to be working." >&2;} + { echo "$as_me:$LINENO: WARNING: ***** " >&5 +echo "$as_me: WARNING: ***** " >&2;} + { echo "$as_me:$LINENO: WARNING: ***** Please check configure's --with-llvmgccdir option." >&5 +echo "$as_me: WARNING: ***** Please check configure's --with-llvmgccdir option." >&2;} + { echo "$as_me:$LINENO: WARNING: ***** Runtime libraries (in llvm/runtime) will not be built," >&5 +echo "$as_me: WARNING: ***** Runtime libraries (in llvm/runtime) will not be built," >&2;} + { echo "$as_me:$LINENO: WARNING: ***** but you should be able to build the llvm tools." >&5 +echo "$as_me: WARNING: ***** but you should be able to build the llvm tools." >&2;} +fi From lattner at cs.uiuc.edu Sun Nov 16 13:37:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 13:37:02 2003 Subject: [llvm-commits] CVS: llvm-www/pubs/2002-12-LattnerMSThesis-book.pdf 2002-12-LattnerMSThesis-book.ps 2002-12-LattnerMSThesis.html Message-ID: <200311161936.NAA04574@zion.cs.uiuc.edu> Changes in directory llvm-www/pubs: 2002-12-LattnerMSThesis-book.pdf added (r1.1) 2002-12-LattnerMSThesis-book.ps added (r1.1) 2002-12-LattnerMSThesis.html updated: 1.4 -> 1.5 --- Log message: Add book form versions of the thesis, as the normal format is nasty nasty nasty --- Diffs of the changes: (+14369 -0) Index: llvm-www/pubs/2002-12-LattnerMSThesis-book.pdf Index: llvm-www/pubs/2002-12-LattnerMSThesis-book.ps diff -c /dev/null llvm-www/pubs/2002-12-LattnerMSThesis-book.ps:1.1 *** /dev/null Sun Nov 16 13:36:17 2003 --- llvm-www/pubs/2002-12-LattnerMSThesis-book.ps Sun Nov 16 13:36:07 2003 *************** *** 0 **** --- 1,14359 ---- + %!PS-Adobe-2.0 + %%Creator: dvips(k) 5.86e Copyright 2001 Radical Eye Software + %%Title: thesis.dvi + %%Pages: 34 0 + %%PageOrder: Ascend + %%BoundingBox: 0 0 612 792 + %%DocumentFonts: CMR10 CMSY10 CMR12 CMBX12 CMTI10 CMTT10 CMINCH CMBX10 + %%+ CMR8 CMR6 CMR9 CMITT10 CMTT9 CMMI10 CMTT12 CMTT8 CMMI8 CMEX10 CMTI9 + %%EndComments + %%BeginProcSet: PStoPS 1 15 + userdict begin + [/showpage/erasepage/copypage]{dup where{pop dup load + type/operatortype eq{1 array cvx dup 0 3 index cvx put + bind def}{pop}ifelse}{pop}ifelse}forall + [/letter/legal/executivepage/a4/a4small/b5/com10envelope + /monarchenvelope/c5envelope/dlenvelope/lettersmall/note + /folio/quarto/a5]{dup where{dup wcheck{exch{}put} + {pop{}def}ifelse}{pop}ifelse}forall + /setpagedevice {pop}bind 1 index where{dup wcheck{3 1 roll put} + {pop def}ifelse}{def}ifelse + /PStoPSmatrix matrix currentmatrix def + /PStoPSxform matrix def/PStoPSclip{clippath}def + /defaultmatrix{PStoPSmatrix exch PStoPSxform exch concatmatrix}bind def + /initmatrix{matrix defaultmatrix setmatrix}bind def + /initclip[{matrix currentmatrix PStoPSmatrix setmatrix + [{currentpoint}stopped{$error/newerror false put{newpath}} + {/newpath cvx 3 1 roll/moveto cvx 4 array astore cvx}ifelse] + {[/newpath cvx{/moveto cvx}{/lineto cvx} + {/curveto cvx}{/closepath cvx}pathforall]cvx exch pop} + stopped{$error/errorname get/invalidaccess eq{cleartomark + $error/newerror false put cvx exec}{stop}ifelse}if}bind aload pop + /initclip dup load dup type dup/operatortype eq{pop exch pop} + {dup/arraytype eq exch/packedarraytype eq or + {dup xcheck{exch pop aload pop}{pop cvx}ifelse} + {pop cvx}ifelse}ifelse + {newpath PStoPSclip clip newpath exec setmatrix} bind aload pop]cvx def + /initgraphics{initmatrix newpath initclip 1 setlinewidth + 0 setlinecap 0 setlinejoin []0 setdash 0 setgray + 10 setmiterlimit}bind def + end + %%EndProcSet + %DVIPSWebPage: (www.radicaleye.com) + %DVIPSCommandLine: dvips -o thesis.ps thesis.dvi -t letter + %DVIPSParameters: dpi=600, compressed + %DVIPSSource: TeX output 2002.12.12:1702 + %%BeginProcSet: texc.pro + %! + /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S + N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 + mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 + 0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ + landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize + mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ + matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round + exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ + statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] + N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin + /FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array + /BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 + array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N + df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A + definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get + }B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} + B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr + 1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 + 1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx + 0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx + sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ + rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp + gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B + /chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ + /cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ + A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy + get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} + ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp + fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 + {2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add + chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ + 1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} + forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn + /BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put + }if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ + bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A + mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ + SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ + userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X + 1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 + index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N + /p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ + /Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) + (LaserWriter 16/600)]{A length product length le{A length product exch 0 + exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse + end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask + grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} + imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round + exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto + fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p + delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} + B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ + p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S + rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end + + %%EndProcSet + %%BeginProcSet: texps.pro + %! + TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 + index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll + exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics + exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub + dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} + ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict + end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{ + dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 + roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def + dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def} + if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def} + def end + + %%EndProcSet + %%BeginProcSet: special.pro + %! + TeXDict begin/SDict 200 dict N SDict begin/@SpecialDefaults{/hs 612 N + /vs 792 N/ho 0 N/vo 0 N/hsc 1 N/vsc 1 N/ang 0 N/CLIP 0 N/rwiSeen false N + /rhiSeen false N/letter{}N/note{}N/a4{}N/legal{}N}B/@scaleunit 100 N + /@hscale{@scaleunit div/hsc X}B/@vscale{@scaleunit div/vsc X}B/@hsize{ + /hs X/CLIP 1 N}B/@vsize{/vs X/CLIP 1 N}B/@clip{/CLIP 2 N}B/@hoffset{/ho + X}B/@voffset{/vo X}B/@angle{/ang X}B/@rwi{10 div/rwi X/rwiSeen true N}B + /@rhi{10 div/rhi X/rhiSeen true N}B/@llx{/llx X}B/@lly{/lly X}B/@urx{ + /urx X}B/@ury{/ury X}B/magscale true def end/@MacSetUp{userdict/md known + {userdict/md get type/dicttype eq{userdict begin md length 10 add md + maxlength ge{/md md dup length 20 add dict copy def}if end md begin + /letter{}N/note{}N/legal{}N/od{txpose 1 0 mtx defaultmatrix dtransform S + atan/pa X newpath clippath mark{transform{itransform moveto}}{transform{ + itransform lineto}}{6 -2 roll transform 6 -2 roll transform 6 -2 roll + transform{itransform 6 2 roll itransform 6 2 roll itransform 6 2 roll + curveto}}{{closepath}}pathforall newpath counttomark array astore/gc xdf + pop ct 39 0 put 10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack} + if}N/txpose{pxs pys scale ppr aload pop por{noflips{pop S neg S TR pop 1 + -1 scale}if xflip yflip and{pop S neg S TR 180 rotate 1 -1 scale ppr 3 + get ppr 1 get neg sub neg ppr 2 get ppr 0 get neg sub neg TR}if xflip + yflip not and{pop S neg S TR pop 180 rotate ppr 3 get ppr 1 get neg sub + neg 0 TR}if yflip xflip not and{ppr 1 get neg ppr 0 get neg TR}if}{ + noflips{TR pop pop 270 rotate 1 -1 scale}if xflip yflip and{TR pop pop + 90 rotate 1 -1 scale ppr 3 get ppr 1 get neg sub neg ppr 2 get ppr 0 get + neg sub neg TR}if xflip yflip not and{TR pop pop 90 rotate ppr 3 get ppr + 1 get neg sub neg 0 TR}if yflip xflip not and{TR pop pop 270 rotate ppr + 2 get ppr 0 get neg sub neg 0 S TR}if}ifelse scaleby96{ppr aload pop 4 + -1 roll add 2 div 3 1 roll add 2 div 2 copy TR .96 dup scale neg S neg S + TR}if}N/cp{pop pop showpage pm restore}N end}if}if}N/normalscale{ + Resolution 72 div VResolution 72 div neg scale magscale{DVImag dup scale + }if 0 setgray}N/psfts{S 65781.76 div N}N/startTexFig{/psf$SavedState + save N userdict maxlength dict begin/magscale true def normalscale + currentpoint TR/psf$ury psfts/psf$urx psfts/psf$lly psfts/psf$llx psfts + /psf$y psfts/psf$x psfts currentpoint/psf$cy X/psf$cx X/psf$sx psf$x + psf$urx psf$llx sub div N/psf$sy psf$y psf$ury psf$lly sub div N psf$sx + psf$sy scale psf$cx psf$sx div psf$llx sub psf$cy psf$sy div psf$ury sub + TR/showpage{}N/erasepage{}N/copypage{}N/p 3 def @MacSetUp}N/doclip{ + psf$llx psf$lly psf$urx psf$ury currentpoint 6 2 roll newpath 4 copy 4 2 + roll moveto 6 -1 roll S lineto S lineto S lineto closepath clip newpath + moveto}N/endTexFig{end psf$SavedState restore}N/@beginspecial{SDict + begin/SpecialSave save N gsave normalscale currentpoint TR + @SpecialDefaults count/ocount X/dcount countdictstack N}N/@setspecial{ + CLIP 1 eq{newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto + closepath clip}if ho vo TR hsc vsc scale ang rotate rwiSeen{rwi urx llx + sub div rhiSeen{rhi ury lly sub div}{dup}ifelse scale llx neg lly neg TR + }{rhiSeen{rhi ury lly sub div dup scale llx neg lly neg TR}if}ifelse + CLIP 2 eq{newpath llx lly moveto urx lly lineto urx ury lineto llx ury + lineto closepath clip}if/showpage{}N/erasepage{}N/copypage{}N newpath}N + /@endspecial{count ocount sub{pop}repeat countdictstack dcount sub{end} + repeat grestore SpecialSave restore end}N/@defspecial{SDict begin}N + /@fedspecial{end}B/li{lineto}B/rl{rlineto}B/rc{rcurveto}B/np{/SaveX + currentpoint/SaveY X N 1 setlinecap newpath}N/st{stroke SaveX SaveY + moveto}N/fil{fill SaveX SaveY moveto}N/ellipse{/endangle X/startangle X + /yrad X/xrad X/savematrix matrix currentmatrix N TR xrad yrad scale 0 0 + 1 startangle endangle arc savematrix setmatrix}N end + + %%EndProcSet + %%BeginFont: CMTI9 + %!PS-AdobeFont-1.1: CMTI9 1.0 + %%CreationDate: 1991 Aug 18 21:08:07 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMTI9) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle -14.04 def + /isFixedPitch false def + end readonly def + /FontName /CMTI9 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 98 /b put + dup 100 /d put + dup 111 /o put + dup 121 /y put + readonly def + /FontBBox{-35 -250 1148 750}readonly def + /UniqueXX 5000827 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacee583a5c939393e012707b47e0c1f + a47d284a1edc9d01a497d772bca8c543388e6dc0d1e2c4944740470e0914f65e + fb0737b0851b2ba713a9a00b36d07da6bcb52920b9b59efe587734027a3c5e65 + 66aad332fe6fbcced1417802822a3b81d6187875263d6bbda04bbcf6e4870fee + ad60f104bb3c5a766610dd11aea64a6b107b0b04439fa2888b8cc39232bb83f7 + 695aba81f0260cd5248b9e649cd800bcb325468c79ffacb9cd3036f2ed7bb65d + cc883aff8d6350d6e8af1a9c1d2d7fcddc4c554c7e350f2420586f43e2124611 + 487cdb176d453854b51cb8f9100bf241899bbef87d57f1135e589813995c4d86 + ce91db2b3757948f365186c2a4f32d845f659a8e95028f9c0168851997135c67 + ce7654f2de4f22f51311aa78f440e5fc2c58f6df901fd071b2d53b2697bfcebc + 43fe4508828b4756ebbe1f3e8512514162b3bb44493a65f11ab56deaf152fd01 + bc8b642e6021af01998edc76b6a1929fbb9fa4fd1a430bfd4464b53f75075f66 + c726fc037fc23cf09a178ffc60908f77d8ea9dea79c1e21fcb5a6a994e5a8e5c + c6d6291891df7695db58a2dfcf3bc9a17888c29559ce8f37dd35c0ae35def3e8 + daa6d8d574f457b0385efd1611c048b9ce76393fbfa006fd23d742cfe7016035 + 5fe95302b129a824c7794a9de47e463a7fdc42fd72b9da3fabc3e65d90258ac9 + c1ecbd3654b103a488715f9e0e649b57146b786aa399c6ff39f362816306a1e0 + ac83a4c83410030d740e15165683e843f69579ec1824c36935ed4705962f494c + 401400303b590614e5daa8dc53fdda083fc854e535fcd575b38aa43d3d5c4a38 + d56bafa926fb9e7fd69be1af2b502849500693dadd5f00b3185a8b18a0b64f28 + 9f33f5f1eceb14d6945a22d0def259076cb9b11d899318852053d98c379de350 + 8a8a7a3ae6c9a73e878f7cfaa856e64b993b13baa4ea8ad693b380171f4f04be + 5464e1fde8190f963ad3dac489ca9154a9d35f479635781233c57eba78a4b34c + 5b3f74db0cde46a05e26de79e8b958f6a99a3bbad79d0b461621fb80d7f5992b + 3a4a42a45d55ac22fff1ca04d5e0b14713cddc23f7d69c6c672092d9c73ad09d + 6a6b4b75a1ee53f5a7b701bf7ade07cbdfe35565254cf1a6fbceacf4064d492c + ac3be55b684593777156161fa67b80ffc41cf9f946233edf6f2027a848fbb5fb + 7a17e579214ca91c5ed68097d0400c6c204fce7e2d6c92a11019699105213570 + 1ce0ef5310d140d7a49e6b50d8661cd694714e54aff04d0b8fe665b568ec18d0 + fd8436e85d6b0563a7c8775ac5d1fd36bda1bcc115ca4f8a3edf54707f47c397 + 8cca1ec77bf39dde459efc23a66a64f253ee66b1fcae4575e7212b0c57fb9b4e + 807a2eaab3337dc9cd0710da9c783bec05788893248d55711c8b3188f6a90c8a + 963223a9b43fe89a6831c9a9078ab2e39c6244995ce303d72587652f6dbc416f + 03d8d99c4f80e255d8c9c4dfa961058bf4f0c73966202716af9a5fed9c01bc9a + cf81ebd4ff09f5e8e8620407a8d40c24b5578edf990555b4ff13c7f0181ef6f0 + ffee455095af5534fd50a557368b77872f1d94bb22008a98e278299af8416b2e + dec8000fc2ba760ef3e6004523845577629272688de41e11924600d6e2a4a930 + 9c1ad397f0d9788452263acf6bde64a15ea1dbb19005ac2891b218e3bfb204c7 + ea1eb6570f2e10204642104fd0b5a8bb24ec1b3519f29ebf9b6076a916dc2075 + 3f5d8baa4f193cfd8883e36f969b6a2778675956eec5857594915225fd146ff7 + 6254e647418516c47d6e13333b2d67e99b5a1a86a18c5195cf4fb3aff1448e48 + 617dfa4735f5ab46b90acf10859d9fb1c733572989fc938559ea83a05aad50c9 + ac81aa089b1d2eda9510a88aa577ed1d61dc18255cb5b5bb553dacf796dfb222 + aeb0c8ecb669422226443d124928b778bec3ae0dbf586942e5c70b216f533432 + 2c682749e272984683a8a7090d21910892090b2914400e1917d7a5249198fb33 + ee0f1d00a86b2d132cdcdb0d5b98489a2bf7fe13ba92316bc22105bfbb8c7771 + bfa71cc5cae34c9146a9916a54880a7c6572a4f4b5c20d259f840e8665f5e39d + b5ea95ca6bff1ae30a4e1cd9648d2e7d2d4cddaa9ab6f28af1b71b0186a04d89 + 87a4e22778af3a1f6cc51bb244a41a5b8564f9ae6461caddefa9869a0c701477 + 21be1b00f9e8781821944c4f9228dcfb4e360e807af266f31fefae39ae69dfd0 + 5bb9a1c949804abea495ec7eb99be3601cc4fa630535d078cf48a52c1f3d5d29 + 8baf0175c1adf38fc5d837597c429d06705da30451ed5c584890b9aeb81b571c + f6fef565ced5eea6405a7b782dca1d1bb55c13e244a3 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMEX10 + %!PS-AdobeFont-1.1: CMEX10 1.00 + %%CreationDate: 1992 Jul 23 21:22:48 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.00) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMEX10) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch false def + end readonly def + /FontName /CMEX10 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 83 /uniontext put + readonly def + /FontBBox{-24 -2960 1454 772}readonly def + /UniqueXX 5000774 def + currentdict end + currentfile eexec + 80347982ab3942d930e069a70d0d48311d7190fa2d133a583138f76695558e7a + e9348d37cac6651806d08527c1bb4a062a4835ac37784cc39ad8841404e438b4 + d52d3901e47a1de4f7924e0fb3daf442499175bab1226edf692a4956739f8828 + e80592f450c5d5c22ac88bcfbe9748f61d18243a16f4a4467f084e8e2be46ef4 + 7fc51c3a8199e3cda62ff9c4fb73956dab8b6683d2156377808cb35026073e80 + 523f59a30d195fcf9b9fce4ffafc6d5649664203ab24acb938d58d246707ffe7 + d62f04bec4b70c21ef75beb2b812622b3c74e969d72d3cd11bd7106294a99caf + 0b1629bc7d4de6b96ca82930831d64575f23f4ad06a0e45e315b1d392411be8d + 6d73c998789ff258a07a3c8c2057325784514c845500bfd1a971310cfc11d41c + 1a167dbd5ff012c60add4e87325f6e5299032a839de65fb1473a166aae1876a4 + 414a434f22c1d241591fb36f857df6fa930608750ffc0c54f44994662b1f00f1 + 400bf752ea8d83ffc4cb77a290bc2d99981ae59a191748ba5c7ba1a9d2583fd2 + 1398452b6ff5d83a059f7eadcd2ef744e9dd22bdf9c79d049bf06835e878c32b + 7765c69bdd8ef4deb4ea7cfff4cf9354a4ddffa689de961d16772491c7afbd7f + ffde42400764c68e954ee5c455a5687959829bc3b319b2147deaab3628662c80 + 30c5e02fea09609abe4eaa12e217bc3af673f1bc36a7039eb13fcacb4218fe0f + c5a3f9452d4edf46cc91db67b624d4f2d37502fb9f11af4da18ca40b61097f95 + d44329375467ed13c5cb585ec53f62b83ef9502cc755af44bf32b87b8ae9f3f2 + f8dbf72dab90acafbacd280db6aaffaefdff6d5eff26669bac56280a950560e3 + d01714ba38659b0e4e28bf8cdc1f15ff7e3ea9d95a6afbbe3d8e6905aa6d531d + 6b6dcab89e2036cc492c65f76ddcc3cfcff33fde3d9ffd10f7a90530fd5c7683 + 4329baa902e701ca42717476298c9ff511b1941244bb1dfd0e5cab92a43970cd + 1bdb292eadd055c97972844fdcdb0aa06401e7b2632b9d134f96bce0064860f3 + 9859da7a9a82be0a840672a1331212752ae1b521b693b384a72dba8d37a86eaf + a0341e7fc5f6ef7a8c566aacb91e8bf5005c18837894c4eacff41dba54e071ca + 83fe249b6aa6921340879a644a43e13b3ef9b1db789c61b5927c967d6bf493ca + 0c722a7ba6762fda1dcdfeb814981973f4273f9a2220e0fc2e6daa1a100ba89f + a91fba83b432117b682a73d3e36ba6a079c103a03999424264222e5b1040a79e + 96bba57dc7d01a8d79396179040acc9c522adc949683542abe58fba208c69e67 + 0cce82866c38aff4e1da5771809955c3023c40c6caeee0a28cbc5a2d3f30e340 + 345e624bdfbb5f23994d566225a7890711ed54d1dc68411a67f70b73c7bc3083 + 683abbfcc8ed1a3caf3ef8b751f1533b359fbc1b029a3c1902d943759319a1e9 + ba7f48b6a34717410abdb15e68c227b0d480ab5a7288426e827bbc9a641200a7 + fca27ee30c2aee6f42b3b29c573be209 + + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMMI8 + %!PS-AdobeFont-1.1: CMMI8 1.100 + %%CreationDate: 1996 Jul 23 07:53:54 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.100) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMMI8) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle -14.04 def + /isFixedPitch false def + end readonly def + /FontName /CMMI8 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 105 /i put + readonly def + /FontBBox{-24 -250 1110 750}readonly def + /UniqueXX 5087383 def + currentdict end + currentfile eexec + 80347982ab3942d930e069a70d0d48311d725e830d1c76fba12e12486e989c98 + 74c2b527f0925722787027f44470d484262c360cdfdddf3657533a57bb16f730 + 48bfbbfcb73a650484015441fdc837add94ac8fbd2022e3ec8f115d4b4bb7b7f + 15388f22cc6198efe768bd9fceb3446ee4a8dc27d6cd152485384ef5f59381ff + da43f2d20c8fb08aa27ab2015b774db10dacfdcd33e60f178c461553146ab427 + bdd7da12534ba078ad3d780414930e72218b3075925ce1192f11fc8530fcd5e3 + 038e3a6a6db2dcfbae3b4653e7e02730314e02b54a1e296d2bef8a79411d9225 + dad7b4e6d6f9cf0688b69ba21193bf1495807e7a196cf14c95a4e02f9cd2da8c + db2546c6df52e524745992e18d9ff87aa25e4e1800bbe4ebb357c6ef55ed6d03 + 6d3a00c1ee8073266c21d2f0ac85d656abf61d7e5a4fa87da8ec3b5329e434d0 + d2adab706b42a2e5331be5295399d803ccac03f631f01f39a022fcdf63486b68 + 7d15ef284a77def7fde4898543e7b5f7ec267756103e477f547cfb8d2311c4b0 + 09deff56085f5d419697af1846c8b88c1bbbae149f0f19ca3c8dafe19cec48fe + 6b38357246d8b5cef80b53bab4cbbbe8bc8318cc462a4158258f456e697f6058 + 86010493f252073ee4e4c9531f23485415ad6bc901bbaea659ef701f825f4b6d + 5c9bed0dce7b63810f906b33ea4955531ca1ed1fc120cc56dc1e277a33222cc6 + c3a97552607b865783faf0895cbeccd0df54f57bd162a88494768435eda71a39 + 69718c0c5912d3167bb0971546d733e735aa9bcd89f5aa154656031ab3f6fe41 + 94ec225ad03ab8b67a9da43ab365c4df17c23e79f685c3b6fd5b654e4a6f2603 + 6cec3a8641b0b57f93eb95f9e238832aeac2061f3153e0f375513c974f1c38f7 + b59edcc94716f2862cf71c9a2be8430985da1cd813b1e1c1b9310564a2eb1aff + 52c190f50fc981dccb64bb2c1f7a62c216f211c162c2ed1c554ef49fbaf12b31 + aa3b2a80fee259dc0a2a4242869ddec7c29e2941792b28bba7f2c6f77ef69638 + 12b07d6843f33b51e01c8626b26edc34e1e0fffadede5fb468e8cd5de7e5a64c + 366967578f415484d122834de4a647541d66989f7d8b25d1712d8d16729bd9a6 + 472df1ef13518758e7ab8ce8429d80f39ebd0dd390e52eccdf8e5c8ce701d846 + 7a509fd65b46fc1a98f5fda580cca38d8e7f3ce4f9d2a2d0d0610c542b67bafa + 60b4ab50adaae57f933a220bdf686b991078edb7253ce4e12e6014f07b7aab14 + d44d6aa72db4fb5404248c31fc9a7e54adb0568c3c95ef0a63bc9d5a7a3c0fab + 5b5b19c3d583c279a3a19e5f67ba5050cbdda4580b196dde5bf5d5ebe95e8aa4 + a86a79bbf0e7f8ee92f5c0f70831a10fb8c8a4361a5c4bc19989e431c635dbe0 + 8ea4133dddc3cd02d3d70718228f3e38325f3579324f124a7677456fdcbe95f5 + 1c9eefd4d3bad7e3d5732fbbfe4ce52b2d7ee9bbfaf12db1e81a51c066b9c7da + d2643303c5c904828d33d533a885fc9c7c0cc9b964d2769d1518d0ff0ccee282 + dc2d59481e40299d8ef2517341cd567390ed5b759f8a28b30a3a42f844deb4f4 + 31b8392f6795e01764bece67a87bd80826e24c4bc56a68f0ba0b79 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMTT8 + %!PS-AdobeFont-1.1: CMTT8 1.0 + %%CreationDate: 1991 Aug 20 16:46:05 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMTT8) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch true def + end readonly def + /FontName /CMTT8 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 38 /ampersand put + dup 40 /parenleft put + dup 41 /parenright put + dup 42 /asterisk put + dup 43 /plus put + dup 44 /comma put + dup 45 /hyphen put + dup 47 /slash put + dup 48 /zero put + dup 49 /one put + dup 50 /two put + dup 51 /three put + dup 58 /colon put + dup 59 /semicolon put + dup 61 /equal put + dup 62 /greater put + dup 63 /question put + dup 65 /A put + dup 68 /D put + dup 70 /F put + dup 71 /G put + dup 76 /L put + dup 78 /N put + dup 80 /P put + dup 83 /S put + dup 84 /T put + dup 88 /X put + dup 89 /Y put + dup 95 /underscore put + dup 97 /a put + dup 99 /c put + dup 100 /d put + dup 101 /e put + dup 102 /f put + dup 104 /h put + dup 105 /i put + dup 106 /j put + dup 107 /k put + dup 108 /l put + dup 109 /m put + dup 110 /n put + dup 111 /o put + dup 112 /p put + dup 114 /r put + dup 115 /s put + dup 116 /t put + dup 117 /u put + dup 118 /v put + dup 119 /w put + dup 120 /x put + dup 121 /y put + dup 122 /z put + dup 123 /braceleft put + dup 125 /braceright put + readonly def + /FontBBox{-5 -232 545 699}readonly def + /UniqueXX 5000830 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacdd6500abda5ed9835f6a016cfc8f0 + 0b6c052ed76a87856b50f4d80dfaeb508c97f8281f3f88b17e4d3b90c0f65ec3 + 79791aacdc162a66cbbc5be2f53aad8de72dd113b55a022fbfee658cb95f5bb3 + 2ba0357b5e050fddf264a07470bef1c52119b6fbd5c77ebed964ac5a2bbec9d8 + b3e48ae5bb003a63d545774b922b9d5ff6b0066ece43645a131879b032137d6d + 823385fe55f3402d557fd3b4486be533de8dbe3ccd493ef4c9656d5d5b76d531 + 9e704539dd76b065f45e6d6f62ec499c9ab91923a364237ef75e1d62d52df3a9 + 43713cbc63b16c1880feedd1633766248fed9d060ff709951f2ec84ecdc06bbd + 9cc4a865e1f275455525e5ac7e2e6289615e98cf7ce3763b6914d3a4c5b75b29 + b8043dbd898ccd5be448064cf1af2f80f969a44b4f9b801c42f6d6a6d0c3ff42 + e0b1cff748c1fc49b598eadde0c2802dd591c54b802ffd24cb7a7639295713d5 + 4e639514ac78460672c9c51742ae2014e4137ba4303051c06f686395aaef86c9 + 9d7f9a97009436c2ff55b770de3e80cef0d53f4df46aacecc21632c0c676e2f5 + ca7bb101a239a0ff67ebd37a6b8c4c8246dc2c90b759dc03fb26bde8f134f552 + 23ef3d6496aa0c4a2d7b6398de6e6a0474ee1b0d78b2d865614609f1db92fc56 + 4ab5921078b4944e11a2162902f0e04f4b29448aaa22b4ea92fac48f8dc47535 + d717dc7acd08b25d391c97c6c540ae0a98be5d6a8da564ab73e8b5d3b5e1989d + 6e25c3a35ea44d596b5fd6b2373b30de7d59c1831245edb76d6a67816ab91a80 + a27a6597c6dfd274db8b3e45cb01aedee59ba6efa1428e41ed557f051012a389 + 9b195ea44a4e4d0067398d9d40ea26195efbffd2cf785540bbeb8964f6391361 + 904fa5e187e4af3baeb4e8cbe7558fb7049c94a1769a2ff0b44f679bf6f14d8a + 974bb8bdc735d5a9798c89d7d81176ba98dc22dddf6766acd52020e3ddcbc94b + 71ad8a336dbe9262f302d8e8d5ced4481b19a586e1d73d0138ab0b732226185e + 8cfb8408890ecb590f032a5633352c42df62a7dd1a3cb4fb12083709edc26146 + f31161bae67a54aa5b41ca7af61b515c100b38a01b77f831245a013f804584b7 + bb764dab019978bf8eda94875f410d59fb0a513461ccf209b4390a3b22232833 + 5d59b3b98242df18ce0cae97700194c8145229c6056e25143ab119e938488866 + dba9bbf7b20d0d27119d3a7bfe9ad6bde4a707211770aa3e3a7330de406e4b16 + 94038feaf0072f12dd3f684aa742c1b420bd2172656fc485fc7bcafd9fdc85b6 + cc190c2c1e24061a1dc8bdaae081e18d8de7db2a38476d5335fe95f1535a332d + ae77ab8c7c993c9aa1463563782b129ecfda511afa376b376cdbb149d9d76c76 + 284ae3ecbc5349b74082390818dda5fb119c71dc9bc82c69d286f387133fbca3 + db104453a76a1eff744c42ec0b4f3aa3e8ded9b904867398f419981bfbf38c45 + 8cacd5400ec4abefd983d9399e7de5195e125aa60f66c0b14ead6e95e530ec29 + aff49adf24e382e743b8c26807e5789cfe9472a912465231da4cbd91fb078483 + 38955f98678b2dbc2ac0d15d1ec4aacc954450b5e723f9f0c74ca57b6b6abac1 + ea737048365031f099244a6a4ebcb793e5667e0046ce7f99f090c08ce078c0c0 + 741cab3040c0b6c4bec37fe92c9a9bbbe99a1e8a4a15c1dd1ed8b4bdc7cb93fe + 454f2616e24e7944d80e3b6e296ad8444ec3af8ecbbee7eaf52e9de35391df9c + 604c0bf606a88f1a6b9de07b5d4afa9a670a61473e89e3506e3ade27d28be7fa + e476a1f2408995c096efe52abc04a7fce829e23a4663e047c5b148b1df9adc7d + 5630f05ea307c13589a9bf693657d5b88bb996d1596a4ad5ecd2150648273fd8 + 5e4ded97635030608a27358618a80425acb2404e1fa3934436c04476ef73e3b7 + 830046fbd9b26861431818a48a9918511cfcc1879e505f53189b46104c8b38ed + 9c003237b2bb1b1b479686fcda4f227283603bceb11726626ebc386d522cbf6b + 9741aebc06b9e057baf3c376122ecdef2bcf6ed85ef5e20f3ce508261250d9b7 + 227ab8ddca630d383e2f2e5b9d4e2ad5cce0e48ae4186f1df5a4fde6e10003dd + 3e62e3a98d510c9ce0954444f2a631ec2f0a00f327cfd9bfeb56f39968a8bd08 + 074c1127ef59c915b2b718dc51b160140a81a6b64cb278f007fa50f3d2f9958c + 28ae0e1aeb1769897230ed2d619296b6ea1da6ee78157c4afa712b7e9e18a10d + c1c5d091a3f5e38b96e98186492deb116d672f76a4453993b739be29aee14d9e + c4c4a8b7f5e34e836f753fab6f2fb352568e74a433649e8140217c85a36f5c8f + faa23cab9e00bcd7ed3a27faf7aaa72a23a505085a2b6909c119804a3f014beb + a02b3c775c0550d77f9e4704ed540c8a0ab799a04a4aa10373398f358d23596a + 27b230178e89491fe8fb4fb951307769cf05ec97d54049a52c4d4bc20376ed66 + aff9d9976d754826c9a07c5d5ea61333361ca22adc2dbabd86b35f38cb6c06c5 + 207aae1dd8c7b829c124a4ef782990edb97df1ecf40ed2a315563eaf3f1402c2 + da6a3e2f43cb2dfb460e1818b4068688bcef1b38b574674164f95e198ecd6e4b + dc27c6524e153bddfd3e59ee25decbab339615f2a015012be41c4032c885e54c + 06247b50555c83012477e59f44879e1666d15759653d208351cf3dc6c8f5cf91 + 758f31e91fd3edb278bde93213beefe94e037241cf5ec5a0aa12087a836d0f78 + 9e8912bf4fcbf6ae33f302aa8ed941e6d83cf5581be3bb6f6b8b8b2e9ca3d0bf + 7f66908364114f1b032590ac0124b8202744c41f7c35bea5877ae5af3f5e8361 + db1fe88896f8c5c98d824181418afeb3ccd1f539fc5b8703d13cf965ea3f3855 + a3d24776fd4cb972a8ac0186dbe0e286fee653215e6dd635ca5d6e688235c27e + 45f7de2db504f60abf4c4ea8a6e5bb8488d70fd636df1213a124beb3e1bf3ded + a44223dc6b6fde29e4d78739eeba2480ed9201f87e7d1b2138f4b708af971edd + 4879a763f6124face0485f81102c0d7b46cc7d5d3680e1cac35abcc2926e237e + 048694d9663b8fbe6f376274d95ed10b6d1cec8df3b301550452f2eb53bb266f + 364e7ec8b02107b9ba52377183073de18d789af1cf7c6a1c51f412c1923f71d8 + 8033cad8aec9b3a2c3659621ad8859616dfd527e21590bf3a78c376f8b601b97 + 5be35c2dccc2c446ad7adea342dd4e26dd46096a4291ec6670ccbd34b03960b9 + ca46c37ade88edef704864aed98e17da9d8248404f28be2e2bdc4f643a9a3d4f + a879c01ec1dde4a6fcdd397c2ac1f48e60d3ce0a7a9eadc913a137f09d5bb247 + e7c8922089f72ad53ef4865311aef1520cfb8155876eb04ca1d6ffc13b566d6d + a4afee6f0f33a1dacd90f4e41d3b6423e5ddb703378697c2621832898a7af1c3 + 885c4c2e23523d594a79eec892c5889add422cf1f059cc566c9b44a341bd48bd + e02ba59854db4bf7a593048610650d6c717f45f36e1c17f49e92953bc8a5b06d + 118ea5abec8ffaf5e1d943f2041659e371cfbecbdca9d51cb5a511b781f754f3 + 64ba51f4c7fba6b366ce4fa46c2f8d3936389c02275ca316d971c5dd074d089a + 78fed59f5811559a48a2fb4287358ddeecb85a84263f56a0e4b5b8109c9c0731 + f6f9e326458d1527be5f6345fd23e0d73dd606b1345ef3c95601d5a32bfa5443 + 37774e8f2274fd5c3a1ec095839bf252799d29164acf1287661e201e8e4ce609 + f574cea4d259f5e77af239ae8c9db0cff33dda340da57e6ea4cac437787ce158 + e44a6032eec86cd3817b8c252f0c808443379425dbe60bec5d91594cf4fdf973 + 8d500fc7666bfa2ba8098412ffa855e5c437ad7787405c83ed6dd4b99975ea2a + 431bc36a7f1ad8b436447c2f34eaa47206b51bcdb790e8dfdc51e8e4280e0292 + 1cc17053ede13232a0acff98411ba40acc5b43798ffbf13e4d5603a6d56ebd78 + 7ecf2558cfa3de2de8d44c42d9eb29b23e3eedb740e4401f72583474502eb7b9 + b277131272d2fc63739194da70a167df8264dd4869aba37f3731d9d75fdeb93c + 437a5ee0d1c55645ca2964ecaa5d9fb876f54588fc81b1c1a6e4dc40bbc6b31e + 208e11bbae7b83de33c88c48d6383797274cacd9641786ffce70a09aba34946d + 89f173259c30d58898e58c85e164466d1e24679fabf5c8000cb61066ebba27d9 + 9e2821e6c050de2b49706042656012d01a899406b3bb36bd2014ad09eba4f6df + aad4bd6d3f44b7e9cf5c5cb35e00a2f92f1ee6af4532a9e9c761ad0d7b3aa2bd + dcfbdeeee59d45e4f38046aeca252d23e64349d5136b20f71384ed4c6347b0f0 + 465339d1396409352fd5c53ad941e0dae8ea856102816573127a6f80751088ed + f1e0d94246039b7bd0252480119bdf233264a6a4509d8f06411477988a3fbf46 + e40cf3f168e49e034be13c7a6eec83719e9b5f3715e1059d90ab2b96518058a4 + 4287ab482519db6c9b17daf8de0626d41b603842da3b3b87aa5ae79792aae45e + f3a5297655ee64f807b260dbcc2fecee9f9541ff25426b9e0ba0f3be9a0ec4e6 + 7f0e5081a47b4d1f51ce1eabf2337d747ca5831fc81a4884f15ab4856e0cdd25 + 83281894adc7b8a6f423c26234cde8b9c42d5b2a932e8feb63a6ef27ea140bcc + 485faef48dfe922b86ad75f6d81379154a3a07809299e1dacd2c52653423ad87 + 8c9dabf77b00f04e8a705892e14f59d75eb2eda4f6371d53196b07d19ceba6a8 + b455c69ff44f0ad48569b2bd99f8e75e3dde98e5b2bb0e6b14df6d98fd515e87 + 4c8b74a34cd3928d1028f9c1a3c9cc3d4c2d24548333f3955ada7a897f41f554 + b2184cdffea34b8a2953b1b750a733e13ad7fc3c5a4a0bb74747eb00bbdbca7d + b9abd2a6b2f69585c2603195b4efc5518e185d68d57a5253af34473bffc95087 + 60fe6c04d49838ba74be5e8d249fedbd909132b55c193d4073aa2f9b98ff869f + 6514041a367685192281667a676c21b526ff28c02f70149ad3dace8d335326c9 + 985d7baddaa626931ab3103254f3788b4fc3d5a7e852c02931fff926bf08b1ff + 48af38039bc342c87d91193eebdb6911a4ab9c64d33426876c2ef5d815f72cb5 + 50ea34b9457f5c9e1bbab18183b2fcabb1ab66735a165d6524a89e6243bd82b7 + e4a8d66d09ceaa6c09f9d82876a3802d7de272af0a7e8c831a92ce86b24b0c6b + 8cfdc01ef1de5853c412318e828722b8709423ccd4e6e98628b459ac8b8144b8 + ca5d196c7f746d123e9ef6b54e0e512a2b02195d1099f9002c4de37088bcd9cc + 87e2aa3531e5aa691692042d7cb1af4599a790defb08d1d4bb33dae50ee2b4a7 + c98c8f829c1edab66929673a99021758b969279116161fe3165c1b9f78729eca + 29a52e47eb9e51fdac0978632b95655501e94ec2a7ebe9806c1f1ce07d67f85d + e83bebb50c57403fd1699c3848a96d6117a0bb06d46e528914dd93c867b73e72 + b0f3cc19e7402b6590156353463f49cfa2370ad88f8e95c7690c9fc269f9face + ed2b38a8748783623b1214296cd6884932b3267130563742c4ee467c7e401155 + 86d40fbebf7364e409743f4781cad4d462e38a60d608b36b90435ee9072bcfdd + a52c0b2665a838daf6d75cd5a09e53d2bae2a5ea9044d4c42695accb2fe21563 + 0cdd7117bc61c7c19f44eac583831a3d5795281b8d6d40ff77243756aabd2452 + d9084f3487a64a9b15cc9eef878f69e1b3f759303ab49cdf0edc5199a530d78e + 356d56d40332d415af2012c1440aef70b17366176ef4ccc78235d06522437233 + 2bfb2da7c9f0f6f7329b68c334424e50ed07c53caba57ba6514441af037cf6a4 + a60b50672c8488dc48884957705e6f3913d11a947890f8d7c3da7ec7630521b1 + 21093a54824c48505b0d07a2b6b1dbcaa52e039c5f686ef5492fb91ccb5dbd7e + 7a9e00dc0bb90d412658fa7ae49587dcefbcbd4d34948067bce72939a19f9347 + 5b39af6b86f170d93a9e7eda99705b5d3144f7f9e6b7a648794d0dff32525f1b + 0065a140733e5892804f52956dbd2c6a04b80c7db913f80722449eba12c2de7b + 1b68e008663d9aa5034146d44150c33375f6c8f62493b0cb5f6eb159c3aa5061 + 211ac09604788584a8fec3467f103e2c6b2acd5d0936cc2e0efd25ca2f798976 + 01c4dabe1c4e9dd32d38282bb5d059fc2d3b26be8fcb5f1ad6bc2bf05885341a + 537d5abb2b9b81af41f4bf0f90f6ae08602d2954307b99280409b93776556fe3 + da85204d69c4495bf365acce94556488d31402aa01cc178dad5804e9ac76d3e5 + 5f4700ff298d0fea3be4ac9944a2b0e26342e508407cbd686f0a707090019655 + c847bf657cdecc162b7b850f32ce4f563adadf69ac11acb58064db07da43b5ff + 08f159c2e0324165826eb37d206ffd2d95980efe1f6e54c0537f3e6e3d884566 + 29213e2fce3e6ed58a75a087c50504b7e6bc8c2141a7b5ca96d187a732e76eeb + 595de08fd4a37230daf477f87c3400596899a38a137d8aeea45371d78bd8d068 + 6f0eb916ee0968eba6410d47599e0090a4bfe21aa6a1b5f28a4e00c9b065e338 + d77cc098d907c73e4cdf8661c347d27c9b754a82656dee87333385b39c5c3ae1 + fe1e5170eca53d7d02f0d091ee51eede62fe653ea1c00ad1ef837c1c845681a3 + 7499f1daa093b5f7097b087ffad3c6e686d015a219dd5e9ee306ce09400415be + 819f48cb278bfee0f286f7788530adf71b31e7e384f4264fb4570ffa3b023000 + 82b5461649a81f18e51a4058c07a29eb3a50020cea55c626698ec79733be19fe + 0c2b021837eb1a6d213f0d9b90e855b0e8edaaef4a679721bb60f3e4178653c9 + d06e11d4b57d7c1abacf04ff8d3d7bec4d0d5ab40c3a2d9ff169b2019871a4bb + ea6373b36b6589c5207cf726769debd0b44c58cea6ba8eb095dfd9c2a51c7755 + 3033ece6eb82c483a2e41e6113a7df50fe48c7c0c9e149aca0c280c925c69bd8 + f7850be67b7ae4f8d996d1098fc198bb5d6723f99d562ffc2d6ebbc86803e90a + a1c3b2e79e991e3c90973db5269fb90aa7bb1c7a44a823d413728472684d97be + ab57a96222dc213076d3549ccbf0776e82a7a1693f2853b95b8934ff087183d2 + 4c6c5725a21920d022a7a20f045b1174a6f49ef2164681008ef52b5b5f303369 + e42bed83a456b2e6bdedb9fecd54ffe15a2f7720ff479d558ac9b316c5a0ba25 + e705706bf86a86291cd579594de6529120cb2625808504251bcf0f7e0d544246 + 677f9c5b792368d7c26fac85586399d57a3416731565ec4e48ed5d499f9c8ff9 + 78ec476fc6170e7b5aae6ced11753eda7db86e252e2cf9ab4ffbdb4a625b74b4 + 143b53e528156ff85fc03cd99b52491b6577ab6663d9d9d854634d5b7afc0b0d + c5d116eb8e39dde3fa9545556c370b6789d2560424a43b1d5c04f4940831e1f6 + b40f94b2f7ebef09915b5d7ec412d76a1485208732614244b27bc83fb579f0c5 + 5cdc2fceb7ddf5832b2ff409e2fdbe86a87097a9c8e400495d76915d81e443c9 + 01d4bc4e3ee1adab26dd53e5a15e93d464bb9338234dba7972d48e9267448cba + fcb3956fe59c2aab3925ee400fd882f24cb06a5ed87e6305647abf19ad6288ff + f440d7a5c2dbc3dce4bfa24c6f122aa3bf9f1dd058e4b9005601e681d836a48e + 33f667bdc2e2d3ba917307764cfa5e9a3e36f2971520fa83c1bfb8c4f61dab61 + ea932e727caf4353a30357e184ec6d2e28f054c1a45c7c9f9dc17ab22814d5c9 + 1d2cf6c08304398d3fd73d4bc3c160460806803268783dc421620bfae452fcca + 03019580f574cbb36e541eee744d27a3312fc4a5d34ad5a446d7522960c06847 + 98860d1a67e391dca7207bdd4c61034cdc4ef4485fcc579a5387452c5370289a + 1ef95f102e1acb4e877e40a332f3077889f74d0855337b8f661391a73556c32d + 984c1abfdf72681f498a1c18323f0e4c9b95bf7e0750309370515b142baa7885 + 66a598ef9147f8ac9d5ec7b690ea27e5f4833bd75f795b14b84f2f6e62a10bdc + 0b515011ab522fe14baa538020cce6b234c58e8501b2ceb4bb99ce3bedeba318 + 5e0d119e8270ad27f6fedb9f4af1334bf829e44f310182f66b4e3b21a7607712 + b9d38f5ba4e08b3f821cfaad20329ba2b5a125159447a917af007700a026f811 + c98432605eb5afa676e18a11581c5db7962733c2235576f509083f0ef36a1c2d + 5036e34c84a12732f4b06f6a76510e4fa18e5fe701a502185677295de1a3564f + ee29b12def85f4d4f5600ec8245d9be10dab7335cc5fdd9301d717143666ef9f + 2cf281e113b1c52aec5b12794ffb1475029390c74da7a6fe1a7126686e85a171 + d6040ab727ad09adbba284d72c256b6c83a140e85635fb6cff6373f67a9a9a03 + fab86d4da2757a35b5f54191659cef171dac7a0c2ab9ef7bbb03b6564ffa77bf + 4d1a543ecca7e97674202c04b55567e9e411378537cd0404f8902b1dfa7bea97 + de66e5391bde043284a4bf243fe42ac33e916e66c4a23f5bcb6662f29fad19ac + 83bf9386f38ce1ce8d51ea2dae37419030a9e18c12b6cf4a49ccad17d659293d + e885e7953b8f4b5bb99f9b67ab075cab7930a541bbad6bdab62ba4a013570ee1 + eae06011be3219187ad3da5a4bb065aaff522118c58626e9db9f7d2a677c197e + 09c0fc4fb3b992bcac4c727c8285369ab62f8c9196bcc3ebc5d7c92c52e43472 + 7badcfff97f0736a457b3f26afc721984e541ebcc68873f64d7dce9f7aa362be + 6c708b95c16ba55de37ae7b6a89bb26bff5d1212f76eaf28a75be9a80a6a8ac7 + d2bd835d59e624558475c8a60d33f17c37a8ba40e0280ad53fc5abc86a51ad57 + c96be6b30115b7fa5b413d760448f3841754cc079200ea4839b0d590aef30057 + 07667138e36ff2d28312fb29c255dd85e62d816307ac59981f094e5c640be78a + aa9ce35aa31ca4783cb0101181a733929873511fcc849043f4fa119db9eb59a5 + f001fd01e8afa17066c1f75375e73f90aa62eef79f074f73311c362b47a874b0 + e125a5868ccbb58f06dc26be9c32cd8a09a1225113f0581f9796731b95e3885f + efd0ff335b8081b799cef2a6b69179a1e8127bff24bbeda61f87a700378458b6 + 95c26085e0ef09316d6c2fdca1fdea590361d86cd3adaf7e03c9594448ab5978 + ff6587451f6fb4bca8844a4ffba1c9f64c83443dacf754714afb63163dd79471 + d160c356d16434e28ebfc1382b7831d32030b2e4130f9060dcc88838da57431d + 8a0385facdc45161228b4916a4326f120cf2ae10d98c9bba8aa5e6491bdf90b6 + 434cbd65715f5a768b22b2307b21a741488ee8261c67b2ef186b6f0b5744b1cd + e34baa0621216ae8f2751c6d1e3377c2aeda322eb9f66e2d2a029987c6c19a89 + 1cc6879fb1b54a2458063a90a0e9849a68193e105344d96c2faf66fa700d1782 + 425babee0dcb4879010307e4fd9b86605b24903f5bef9cd73b48c853325231b1 + 5304a23bbc2d5a889dec70ae5d7fba7b1e34d14a874e4684e689752dcf82f314 + e11714dfd918cc0a798b623bc28e2e12bc1efe237bc11d5ba1c55ec48d5332ba + 8fa6c0abbe99968da148039dfc2360ff2ba238c403f69e6e646a80e7de989b33 + 03bbcfc933df85367e6a1767391b1da3bf5259cb063dd3f0261296d88a4594e9 + 94b7c355e2a6051be104f3af4e96059424204a822aac9d1d166d0d57af395cad + 985203b696ebb5d1fc1e6d1c2fa60021002ef6ceb550bf30fb4a927bc4ef4f75 + 69555bc0549adb171bd9aa31807cc85182b4bd6968e079d11a52b04c13e3b517 + da8685dd4f3e5b01075ff67bfd547b43de8dc14012f4c7a34524d5b166cdbe84 + 9f56a9d5e1a96dbeef0a8e1488b79b16cde75d580326a9f843477cf5b57936d0 + ae786f60e5c9d23f9b71a52fdd6926574b9cbb213bebbb70626261b171c42c7d + 4495a951194bac9595dbeba67912f1ceff56bc91f71b30d3c0fe67bb9404305b + 1ca03c1f7a84024a195c567cf678fca91fec81cae829a4c7adc1293d9ab51e97 + 3041a11348e8fcc3faa60939e0d8ee7dc55939f2cae310b53d81a4eb704401f4 + 45575b894c57eca1888c95401d0bac2f57d5a835ddfd20bf7351dfb32c92d0c1 + 3659652639d7b93b14a3fdac19c78910af9321f023bd3b996442299dc8afc259 + 899878d90398e15af6a5901520cb830db096cfebcf6fe63366365e96559b736e + 794178d2134d35416ab505b61c6ec2cb2dae6e5292f26e132d6176b5ed6f7b05 + 5caec54db1486a481fcc448720cdf333ce82d664e6d8dd8555e8417c52cd83d8 + 2c37ea642d6f0548674aa70c7108f276c64d3e268eb686fbf3c21ceea1673250 + 4403a9a71ab7aefc9b3ff5324481d020d3e2b19d2919d2ef406ac7da5d025e62 + 0526b4ef58b58ea5f7b9c1c005ce38f01f19fc281470db54c2debb48972c3504 + 3989cdf69802d070a389382b7bb415d61fc99d57ee031e8172495ce6fe8e82f9 + 8afdaa215593447d7b654ea03ed51a99afb4dac699e11492f1df8013c46e0577 + 4395be3d2df2b21adbf1e44607218f5e03f9ea6d444c21541fc9625cfa5b83f7 + eb6459ecea8e61553ca57410d61c15d82ce6e9e5a37957dbeb3c3521b4408967 + 021111f941d6da7e37d511b44caf841ae05216b68eab925b928a289649dc2f30 + ca71883a531c114e3caafdf34391440385429bade938b8002f847492fadd569b + 11963b15858653d253a64545f6fca549f6ae27070ecce9f4e7905e4a1667e7ab + e237bb38f6f0c1c81aa647f3fe900a8d8094a0eb508589228b1866982e83e584 + 407478325a6c55168c79b38722325e3581ab93b82bee14a43baff3c4ddb5b28f + 7f118bbca4e9116102332cae05299c9c991ce9ee82baa351ec1fd966b9c71a13 + 8cbf0efe28c95f65a520fe9c83d060029b7bed2b1b0d64406a3dbc41c54d091d + 2c0b9edac902a6acc70dadcfaad4fac8ef8a5a5b54e5d7ddbe5317f722b96f52 + 29e88e3b0e3a8a2d9a3c77bb1d8a188aea885f8e0e1a0e194671e4eaec6f80f4 + 5be2334cd2bb4509525403b8eb909cd4a4ae59f9f966ed48dd2ab6cb934f7a47 + 922fa1cab4d4c96df2792c3eb9c52aaa99a26e20c63b78389e11cbbc071e0507 + 85af0352a31656e0f28a9101dc00700319ab47c6886a22bb5390ec87acf66e35 + ab045c3148b149fd3fbf5cb249730f25dbe0e53d5f09c15d7dc87b07ff63a99c + 7732361356987ec6efcc60adceb9f4eb30099cb33e6c6bda1a3fd932e9f2a769 + 8cf9f798dc87f1c08ff668e87acb27a24236e3149c075a674bfc3b39409b9e0c + 7049bc7d0dbe6c545856e1732d41781ea86f79cc418e5e16fcf45793721090de + 7b35c407d92f55f8c97be6523f6865d5c067d981e172ae474f0c43d207ddeb4c + 8de42d8a2afdcbffe0b18d6dd3e04ad7fac1d19b99de13b589293ba96d30b53c + 87aabd477c7d9b707472a99dba20a414f186a213037b1375b882900af33f70aa + 825cc751bf3d779a48baf794c1ae32eacb7775a09a8c6eda123377637e2784ca + 6be1b710c36fa8d95d69c4c0519ed32b570c786593db24fc6e65c8d79c4f919f + 84a0bb19ca6aa95a3e2f36d98ddbf9a762af9aa875f40407f91803793d36f34b + ffd6fbc5cf11adf174509f66e01e50d5dab40fc72eb016c5d757926c6cd7ff32 + 974842378d5233f7a4d6533be2c0bcf035cda1713f2b58f67b580875ee38b105 + 485f321379141af4b8399384544889b8c10c93f4ec8c366019a26477764e3d53 + 9dd393116c4b10aedd5c99c02322d75fe1bba149076e191a24ef996ca443f742 + 98b125f6605824e2f52eb7780472d5d2494508760f568845facb2e07406bd529 + 849894904c56cae75f715e3b4e164f222b93b04a064dbdcd0fe2d830d6b8f08a + 48ba6cd7741a9bb8cc70112c726e9132538ba57237da12d7a47f5701922887d1 + a7282ea54ffd8de7a94e0538f484018eea83b80e40a1fa9d21325660010064ff + 928695a0173b0ac8f3ad02fe4d2c491f7276a5808336ff0c5875a18df3244a3c + b9622ccfd9a8308c910e68a9d8c70936de2ac37f4fc697c1438e698d0ebe88ad + 17cbc52e5fbc4a8757d829f39cbbc40066f2422f298f5e2fc314dc92d1d7e236 + 2530feaeb5a05558dd250a970b8ca67397faf4a3a8bea95b2f8f5f1426b05464 + e7e4f237fe8f5a8558298d2f888b2b017ec63bfde67e715285b54d6bdc8a5887 + f9f7aca1d2e21cc45d98a104dfe94b877862b08228942c1e2ca139e2edae3e5f + 492e032994f01fe975f8b22e9a707662e7a3cc7517375924067c0206990030c3 + 449cf61aec1d1a31a8af3f249d5b5d1c79c473adbbfb50da150e4f21354f067a + c23c115b14d350147db851262e47e9c4efb4c99be5b69f4ab11450acd7fe6221 + 61d1105b6ec97617226b0592ab408f55f461a2d0a9ce1a9cf6af1535dd3e623e + 8f01f2c5d4ec0bb9f1e9b1d02bf88fc57c3ade12 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMTT12 + %!PS-AdobeFont-1.1: CMTT12 1.0 + %%CreationDate: 1991 Aug 20 16:45:46 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMTT12) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch true def + end readonly def + /FontName /CMTT12 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 97 /a put + dup 99 /c put + dup 101 /e put + dup 103 /g put + dup 108 /l put + dup 109 /m put + dup 110 /n put + dup 112 /p put + dup 114 /r put + dup 115 /s put + dup 116 /t put + readonly def + /FontBBox{-1 -234 524 695}readonly def + /UniqueXX 5000833 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacdd6500abda5ed9835f6a016cfc8f0 + 0b6c052ed76a87856b50f4d80dfaeb508c97f8281f3f88b17e4d3b90c0f65ec3 + 79791aacdc162a66cbbc5be2f53aad8de72dd113b55a022fbfee658cb95f5bb3 + 2ba0357b5e050fddf264a07470bef1c52119b6fbd5c77ebed964ac5a2bbec9d8 + b3e48ae5bb003a63d545774b922b9d5ff6b0066ece43645a131879b032137d6d + 823385fe55f3402d557fd3b4486be79011d1f5b667eed85fade30ab2ec4e1c2f + 4fe750cf9a69506458071de8896261c001b1c290937fa42a1fa87de406e9f86a + 4c9c0f03f69fba719114f8ae51040a4c03a58b6f3de027f6726f32743dce7395 + 14c2c6f3c2de1aeddcfa8eed7da56dd68dbcde33c29ff7a694769049e4325ec9 + 61b2df16add2ad46f18781fbd63eec62c26f1db41e6a666a09886382dceba91d + 8ff7cedd64ddc8a2f15fe34076a064c46febd1f4dc3707aede0ce8af161bcb8e + 4ada202d0954baca5be71c28ab8bf32fd72029aa07f27d658a68f454a4bf386f + 6314224d16c7f0a8624f6b86319a4e2fd178f596f3b20db032ea28c157a68a69 + fad2bc88881658d2286c0d4ef061bc070c3145f2a37ebec03f51de7cda34cd97 + 7eeebd86b00f9758b3a496f41d9a74279ef3c6322dc54945f95062c5f37a1e51 + cf7eaf45f2b3634b2d7d01ec3b298ff35b6616cd3020e096f6c6aa2bf04c4a93 + 61c19f3c67a28d936ffc8120f1e46980b29bf54047c5f1fa48e67611a74fa434 + 3384f802a4079b28b94681e119ab0c1692de5bbf426440ad1023506cb80732de + c64d9061869cb34de924d2c26e404b7dbd9be55b9c0c5ae3095c15d278adbb49 + 12df1484ed2d73128e5d9c1f1a3b9ac19e2ce5366c96644f5b3d3eea589caedb + 586fd9b8f4df32ec910e9b7434d5bbe57e03892eb03890567df5b811afa0da5e + 929d456af362fda0789aa0cff464e238029294fde86cfc8d7d33d5c98b18c76c + 319811e4d3d49560f2ac39103594ec513e0b1377c2c3e22979866c19b61448d5 + a7201ca4b7538aa370f6347253b0853d4c5d575a7572f93cb73a598e2e26b11a + d46a1126e44e7e1795dff01562316b6ccc6678663e66a73db285746df3f4405d + d51714679581946ef721065356b58a2ed807297aa93c5087d0b9557a80acfd0a + 65dc0b461544cac3be2b6e96a3c2a0227cf1a5b5fdf1a45c87f041a430a078b7 + 6ef74e407a4d35027569f7640848125316ff38fe2598fd1ec206e818aed5290a + a30a3f2641baf34f7dab42cd2b82b7c8d6910ac216d3974f1fb076af4b3e71ed + da2a321c926c2f81051fed16a7f2bf37bdd367f2df86e2127c71f4df13dc8c9f + 1368983c00055650a12aba2670e952877a77710273a1128be52ed114cc09c598 + c8b7968b0d6b450c3e9abf44df46c95cee2bc4372adfa0c5ff456f77846fa87b + 2f59925d8ed0a466440f2bae3c2136f3ed36fd2727a42cb4467cc335d8a5e2f7 + 7c8cf6fe9166af079c55c35f1ee79ec9cd7436001a193232a7fc55b6daa17966 + ee40ef6dfc848dde8b82caec41e72e10dcb50b592ff0f35944a89ee75badbde2 + d8d6722fb2aa62a1dbf6b1a469eb9a7790d14ba5b3e4524f5fcc54515c3a3831 + c5e3d6beb32c52abfeddd96ea427f70ba24790b1a0482d36b3dc79e5a01093db + e35f7e636acb0b99ffafd23174c668c2d62d3e36997943c38b2aaca593ef533b + 960f446f5dd7ff5d80b0bcc8cfd60ba6e93846351989dbb49f836e0bd6f03bce + 5db018e25e8d0b48879d0bef948c7b32b5398aacf60e9e8ac208886d32a577da + d19e7691bd0553eeec24b226fa0e7fa099331615d93831b91f945223ffef4388 + 703d1cc8e43197421c0448d9aabfbb65f59290405d38505bf09c5df189b2a112 + 57f95816dcd86af0a260e88ee818f7b22348c099577e710399958506b885454b + 088034c1e111ad303870646eebe07b3501632e8df19143185913d79e06ea52ca + 08bebd2d1f40842b322252b80f830f7e3b66e4ead3aca26733dbf5a6f45a72d5 + 7f3065fc076b1e6c90ca279094d1ad8973ed371fc8649f55d74b63ba1b9acffb + a97896cd945da3efec9b53e9507c5ae9bd78f281e604641d14a953d709cd77f5 + d576433c513f33ec3ce628867412c49f5a281ed26c03d4886ac7a77e427423d3 + b96163bb40ae74cd75f572eab7aa11c0fa153681462f38160e840ad594f20204 + 61ab36338636022750bbd06f0bb42d2ec581e338ed87bc663b4ab0b92e914f49 + ba4d452f6a41c9a8ffe2288f35fe3b9f0f41e86f4bb02a431851121dd61aefb2 + a72983131191fa601224f9ee979598cd81f5b1a28c9c7b3e4fd0710819051d44 + 00248478257b75c752138a789be7899d704ea57a8e63e2974dc2cc57824afa0a + 20b8b7667baee43093e0214b8f38e38069e9c89cdce3968b26a3203cda7f034b + b65dd7a675e613b92941550baa44838d2d90779ccbff19d1161e6ecd428a823b + 72a26fc198733fd4b1612ed42cd45be89d875a1f848f3e4dbb9750f52d44fe6e + 7edd28af51591f309d88624f453bb764f2e6547941435df5f4605a48e9f6d170 + f98d0908f8574d05a8f5c59af7c815be3639630d7eed511f41f986c92cbcf7c6 + 2e37facc4128ad49365b5ade324675a19f40b50aab36520428b50ac89cc8c807 + 0e39bb83b285043e1becf76987b2c92dbbf595db81abdd18a12e651099e602dd + eb496fcc14d770e19929202925adcdc4fd9fc34c5407e88604c6e953635dbeb0 + 51f7923f578bba9a423ec17016d43335170d82a185c94f04066a33470ae7e186 + cd3b05c05eede3ed38bd60b504939c143c9c73337de42048c46102cb471ca616 + fc10d4461d7c48c09d18bffd2660c94414ae1cb8dc1470e407f7822e93e7d288 + a512eadc7dd629f8b7749c63bcd8b5c4d920e6cf6c0fc6c7c764f640c45ada54 + ab81fc5a891e5110e8e5d6450812222c097ca95f12d2c8dd0801fd59e07cea8a + 608d8ebf5dd12e172216a2dec840c5100acc7dc8774580664ee57200525f78ec + 30cc65976e9552ff251ace038c9a473e84aa0678b3c5b8f55614848e3a069e2c + ced96b99b6029a46ac3fa2f370184687c00c1abadc899a26ca9471e38b152215 + 2bbd9c4dd379c7cd299b7e69f9e0023728d005682a05a8355ff4321af0764bc0 + f9a71ef5bf09db71ceaf4541d2506e891d1eaa99a43c6b33c4bb6c58e07586e8 + e0b49aa950c93aeb118e5cfa774d66f6f58363d0c82dcd0258197d3111d8ea41 + d9b400dba20cd2827d1b7e0eb4195314da899e57c5d72b232ce15ff96029e525 + 9183973f9b44b1e4296a62432042e8dfc5ed21c19b625a81226ef0c18293d656 + a9f186bd966ec1c6cc62f86e0de07f4a494a0fba079a2ef35957c143bf88da73 + 5d680e25d1670cd14e70c3daf290d0cbb6904a0fa8c02db171a0c828c5bf168f + 35fac5be9bc0854a49722d1267beed1501cc83e9cce8ffe7274b934e31e4af60 + 48cf007b4ce30fd7b433c30fde6550a57d5376bacf4e9aebf86d078c6567d257 + b258c235cd4c42ab532dfc252214b2a53fd9e0d6aa065b49f7b403c442ec25c9 + 87169ddf5a818f858a2c0bd0cdb3440d900c86fe34cad0267dd8c6c305b24e58 + 184a56ff81e48c57ea891c710580d0595562fa6b7a768871673228fb0780e222 + fea847c43a48cc6247cfe7a5b8f276324f6bab18bf133bc4cecba2b83e3ab71b + 8a6702155ad7619f7833b241837c42d5fb7a5ae6210e9ee9fff2748fa6abc2c0 + 8cd77cf7d262dcadd7bb33cf325e89b6f2e7cab0e800df4f530b9c6f359790b8 + 35d8c839abbf5b4db113f41ec04a5d + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMMI10 + %!PS-AdobeFont-1.1: CMMI10 1.100 + %%CreationDate: 1996 Jul 23 07:53:57 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.100) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMMI10) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle -14.04 def + /isFixedPitch false def + end readonly def + /FontName /CMMI10 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 22 /mu put + dup 28 /tau put + dup 30 /phi put + dup 58 /period put + dup 59 /comma put + dup 65 /A put + dup 67 /C put + dup 68 /D put + dup 70 /F put + dup 73 /I put + dup 80 /P put + dup 82 /R put + dup 83 /S put + dup 87 /W put + dup 88 /X put + dup 89 /Y put + dup 90 /Z put + dup 100 /d put + dup 103 /g put + dup 105 /i put + dup 107 /k put + dup 108 /l put + dup 110 /n put + dup 111 /o put + dup 114 /r put + dup 115 /s put + dup 116 /t put + dup 120 /x put + readonly def + /FontBBox{-32 -250 1048 750}readonly def + /UniqueXX 5087385 def + currentdict end + currentfile eexec + 80347982ab3942d930e069a70d0d48311d725e830d1c76fba12e12486e989c98 + 74c2b527f0925722787027f44470d484262c360cdfdddf3657533a57bb16f730 + 48bfbbfcb73a650484015441fdc837add94ac8fbd2022e3ec8f115d4b4bb7b7f + 15388f22cc6198efe768bd9fceb3446ee4a8dc27d6cd152485384ef5f59381ff + da43f2d20c8fb08aa27ab2015b774db10dacfdcd33e60f178c461553146ab427 + bdd7da12534ba078ad3d780414930da4f8d58abefd45db119b10eb409dd89792 + 3c6e705479464a4b310b58348c4b42393988fef4925cf984423aaf65fea9f0e6 + 4629953bcf50b919d968d99bd185f83112b2759cc411764e9bde677f57c5ee5a + c555448d5f81a16259ded1e11bf4119d53e8ab07a802df900d3a2d5ccc1c6876 + d29c5e9effb7af3ef83400b0910c07873a8c56fa7b1eb1ba426043b00cc95dbe + dc6e136cbbbcb3f67509964f9f281ebf81fe5b018122eaf66c4a838487e82e18 + 6e006093042848a903efb3469ab6b4049767aadb95c30408dfd58d8a10f4cb22 + 168decd9f3ee100f07b49aa44c92139b669cc312ba20192454eb2375be6284b0 + 26659d964b96ae82d4942e758027fcf23c25ed01115af27ce7f20efe2a822bb6 + 84004f20243a49c9e93301fc21b80815c033c3e2ba58ef53da2157d524b395f2 + b37abca13bc6a2f42e824ab7e47106176b0d6db267fbb795ac7425582df2e3dc + 55863468a9200742bd7b552c48f8cf58bc21343bd3b95abfa140f33f37c6f3f7 + 8b0d8a5154eb7c1f62ec598267f13e841a3e64172663935ac8b665d86540d316 + ddece329c008049c5e74b27d59022c5515059bc3b89370b1bc6a169c888bb325 + e0b74282d6f053a50da4024ed1e433271a32ab8c17d41c632b41cf9f3ecd5fe1 + 24daf7aea7ce8a63047b245822930d517df7baaafa69d2d17f7d93cebd47deb8 + 5405d720de0bb4dcae731a8e27bdbb6e6be38d168b7daff815acfc32ce367374 + bf9fd98c0ae5ba1bccdb84d94b5c173abc92f7d18e19a68f64a2241a0a163910 + 8dc46b8a04ead17662b7bbff3d3d9a95d5937698573bfac64973dc8d8b8d9f68 + c52d0c133119eca4fae72f7553d276c817003234a98337d7c037c0f1bce8a804 + 57113bcd97515c002d20f836fa086a3277727873ec2b64a92bedb01193491134 + b6692a08de4a201a3f11dbe070d797f7629ad487d2b8dbf89a0631956c93864a + 4787fc56c48a58419429e490a166eb8eecc22d112b3e3a45c5f4ef77f27851d7 + 0fda2b1bffbb4e1822e9efa593bb9ff046ef62a60b87702022a1d0c182c1dd48 + 5a0acd738ed59b3f55d36bb5d05a7abcef17db4a3a0de65abba021b3b3606985 + ad86204149e95568fd672b787c1f3dbf1d889e59e71dba330eccba67b961b69c + e6c96dc127a613f086da1816638fe92d2be4d2453d19269e033e4f537b332170 + adada6a5f2816bed0172d53c2739dd877b7b09d6b46426e164027e988d9c633b + 48a3ea0c3ceca53d3d984a40e93c2e103d222e6e923a922d53c8e6387816834f + aa251339667b2e536056c312aabd108e42dd99f9a0dcb32022bcf26d46308ecc + b35590e4e86cb3da89bb504f1c990d5b5bf04cce15dbf0eb30a5caac9974ceb5 + 59d8d444061f63da78249201ab5cbe9b4dd96e35c55884f2eb960c2c5733dfb8 + 74b1040843c31bde65ab35a669057420fd8a59022b131fe1f63c3c2241fbceb4 + f2295c14119b7417ebfdfa3a9c2d2de2ebaafc9c41e290e4b967105209e59e34 + 6589090e254be0cb70d113856e9d8d89568d8794049b37268b734b22cc2eca26 + c427b9e9b366d47dc76c0af8586489135462856d99cc5519a64d8c22bcbec05c + 6238c5bc457a77a57497cf118afa2822d6773ad25dc7eb2f55c5a8f9749dbe42 + ceedcc52abff2cff737373d45a548a83fe958fd0cf1490aea4adab6e822717c9 + 4412d63b1f61fd022c8389b1b88d004be3920ea65a7e31927de68d6226cc38f1 + 79ef151ae134331dddd2f1fd3b3dd69f6082ebecae5da876cf2a426a69751c92 + 8d36e2cdc1cebe074263186e4e5bb8638d6fcf0de92b5ec9daab1c552c4e3910 + 27f332048917bee9c3c7fad9889fce83a48c088db9ec31a208d0668d34cea5eb + cd7408b41daa341575900ca459851ec724206dec6f5720d00a3124435b64284e + da464a53a1b32042eb526aa5fbd1921d095c8d741847093aeddc618daab5fd1f + c37737c20dc565775451e086e75022eca9f659b7ce5454d0094f33987856d3cd + f29d1ffbb6ec86a932ef1bc7b1c9f61347f5f70233b5d7de87af15cfcead36df + 7f5b05af28803790c0321d6cb83da24d7c1fd9cd51989f5871ef1d8c6ec6c10b + 1b884c9306f118bdfd73f1531febe2bd09782282b3d85ad2917611c52cee2088 + 5d442885817fdfaf285aac9664cec30adaaa53c7c54f9b5319cf3ee1db062b9a + 98b1000fae6a11ed57d06c533985be08bdfb8bc73767e637fc0578b35894a95e + daba238b4f2ee88664f545d7b790f9e324e138207ddbd8c1784e364e0c6e776d + 30bdef7ebc3f98094baa1f5fc6b02739fe72c5e8064d758db426a5115b3bdb74 + e360543505a8738e5c57e9271f14a64f10c4e7c010842adbbd245133cc5f526b + c1f3ce790473e3d5352cd397f4d33e1dab5a3b725240f2ff1e6423b5a5bdf4a5 + 2bf51fd0b41c143875eb7993e75ac1d6e017885764ef801bf9f7b2c0f6139a9e + f6a6e2ca55dbcac431cbec7eb1390d94216186fa0ec2433bf57f13be6fcff784 + 297872a1b250eb26e41d578c811db2a35dde5869fe99cddfb38bf0afb608d7ec + 61bf06b9fb1fb69115cfad022e9960bfb978ffbbacb07a92d217396c5a9f01fe + a6c9aa5c30db1cbe3cea2de2a37b8f5a9e59a6f3b4e41c1083aff76cdc845e4b + 77c6d16e53c304e3c26eb5c7f0997239a87a1104a7150e1c7911f22fbe1a9b9a + 995a220f503e437d6f6976cdd2bf90b424c1970cdb22a41670dee745974082b2 + cc5b9ec59e4c0ea7ba7745f5ee6a86507f486baedab7e85306a9a114a8cbd900 + 55d4a5331553396bbb56a6deba9f9428e3692cc3db34c7f79a94c706b33a4250 + b17a3dac842bab36959d1ac75ce02d6c619eb43d3b059501ed6f9dec1049ca9f + 13d5a250d9a581f0512c50b94ca3a6fb13bd57434e398c4874519bef740c3c3d + 6b18d2581d0b65f31fed7353a1b46c07f5e84c758e02e641a776041bda86a0db + 9b7cd263adad605eafc62b1fa21bce6c05d643ebb2a003d1b7e0c9279f50464a + a8cb69016e854467ade013186a5cfebb4aab604ab997155e3783cbdb17653bb4 + 93292c91887e7ef12beaac35da9d56bb6a1da2119383803c964394ed92f3a415 + 9f18dcb39aea7e0bcc1dced2401ec5e95ebe683f33c2e58796c17376daf23a19 + e17b661389608a8e8d7e9c525e4644acf5c20bf917df8be2b8bab107b4926594 + 4482ef7971737f0dae43a9d57a4b53dfab60c38f72c23845870c47111e6efd73 + 1023ee1c8cab571c0b0364a1fa1f70d6f1599198dd7091269dd1ed447bbb1e70 + a5114e39db8a61d4eb803d4ab70e9349316d299d20199b4184cf2040f48c0bb7 + fe6b567c2a37edb1d8cd9a55c70769703a8db4b07654c1b9205c075948552fe8 + 056356df1dbbbccce6629216073f7577068556569b2a790a0f289b9d7c9ee4b4 + d7933225fce8a9b525bdd0d70c06df5814a46865858ef2cd9621c1fb989c6305 + 7b599f6c17683375a9fd1927dcd0560e485d8f064c30bb8708b39d187d19f5bf + 461c033fca2f5063642810ab3dcd917349a94c33000b32ab5ac13768a7ac3d92 + f75c4f234fc4c0da316cd0823b46c59cf008d8a360f0a45543e2472409a1df01 + e1a76e95fa3de45ced03d3a0a8808e0626621a41fdc7112567208955b1c6637f + 5029aa498bcd1ebd3a1580c5253d42535fd6c2fac3ffc9006089f82d63d4e182 + fcf04796f1ed83f7324b3c1ce171f92acf62e783b9539f1c7f2280404eeec83b + 95895fc743f2eabfd216045e4979679daa55c3946dd2ab48cb7f08caa6bea5d1 + d0db126e5a3b6e74045991ab0d175c1830c8df048ea3176a45405a8a24477a1d + 52c7ca951b5f4642918139febd57b325871b5e1cce04349d4a80e9414fb331b9 + baabb47fc1132a88d5f9d9edd75ae3b9cac9966df4e2d630bc6b0ee656051c6a + c30abc182f4fa6bd026be6bbb2947cbbc1699b35a2e39fb8a681f243d08e5e1c + b52efa293ed1baf951b191ff159be6aaae989d2ad89c3ad8d9cf592098529974 + 91d84603cbb9eb60c106642865470e24f27183106ce26960d5b94d190fbeeea4 + a09b682747956f5e134b81bead929ab2addfed21bd67b4f6ce21c3076fa0b1cd + 1640c39c1712904286a4ace02bf211eed71e8aaba39b136a9c9fb9f8a85dd889 + 1dff4fd93ffc4418f3d61c40995e1fac8a257f25d231b02c7342cd717bbad69e + e69364620c7a04f5262091f74e123656d1f6768e14ea362fa73c896b36654dac + abb35c8d41a2a55328f55fc589f667c220e1e8557c4c0ff969660e7acac95835 + 14554209006d139e473562ed0e745790f5779b5a228ea3b7f08df714258cce6f + c7bc3d58623cd567cab40a45cf0f92843ab638491e2a2f182b0950494d7f14ce + b4753a5f6c84bf56a943aeacb48d783122f86f5a6510ae106f29c67d5fa0a33f + b6bd05dd4a8f3126e6e4972e5a701e7ce7e6d2ae56216780418b44766ca00cf9 + b845c5da40ed75a1d72a29a3c171dc508273b9435632fc3244caf32969d227bf + 442774da69132c146f0df4d00f92f58db4f6f582f73010f48d74393b0f7f946e + 702f78fd6bb06d7b1e2f8f61d10cf623688bd15c5fd439ea2e0431d8cc2cbb43 + 41d68ddf4169c9655f93d5732309e9215b20c6ef22fa0bd7b77dc320ac2ed168 + f0ad6c8b6f2b949a5cb06d826806520594041451eeaaefbf4df85c0b8f1aec4e + 192ac0b6fb161da3d9cb02ef20ca88183049b75ed62e6e22465bc5b0ceb4f2f0 + 3774482a3ab51f72ef0e8db1a0c710314c9bf89526a9bef129ef04c45a9370e5 + fd674936a23c23f486a62c86741664c41dc4c275be068b5c6796b423ca3cfa6f + 008e8a73a4f6f836616876f0261563415323aeb540dae61610fe95df0d6a445a + 0fca91eac722ddcce33e68d30b12283084906d042c13e890eaf00a2aa1018481 + 0cc82fb7113648aa1909a867eb3ae961eae39dd59f8d1db86665e84e1c6c43c5 + ae701f097bd38f2b640b2252a6f0c293832c095300f6400b47ff6cff0178eee2 + 338e6b0923e55956b3a0100283df3c61c397be022cb946177cd0c27d7bae69e3 + 233482ac16c4ae0091c553e8c2703d3334ab8a9de598ab379df77b434e75ff58 + ae7a29f03aea98ff0295dc8249fa0cf893eb3941d45fcc4ea87f21c8f0297785 + 2e2bcf03d6d34cd6146f77919c3ef4cd2162c9e739351df1a363db7e5bcb3bf1 + dde913123ba54ea387545bdd487400a87fa9f795ae552ef4ed6bcb588aa7f5f1 + 739fcc5ba007bded0f7cf65cebfa9597c77ce8bff50ac517b389bb6b46b4699a + d65aad8499619feb464ae1f66c4ab2dbb99d7bd1a413c76caebc57bc38ac5e85 + c56ac1b090d8f429f8594ea0fb28db941f2d23ffc3f0875a8bb03f973c27165f + 8954f09cad2f96eefc9ea379e0641295a62aeca7297f33091f5c21a3c96657bd + 369d3c06468cd6bf5443ccef128abc916bf8c6a711fc0b84169846905442e36c + 9c12794c8337797e0729be8da2a6ca02b03fb5e854b42b3c270272f2ae5ec01e + 2d179862869ae43c8b54080c881acbc0078d5d7fda71accbe2e4a47554acd95e + e4bf57dc3ea501bc9fdcb5830e7e00d14cd97d53d0d85ce4b5e90669a7ed7921 + 8d4af081cb22807be129088cf854e1f0ac4f934b016874d8d4bfdd2133ae2df8 + 73e80098f190e6b9f18588bf62ee098639baf9af826eb195c36e31206ad9a12d + 40c3f5cd172045d5134e3ce7239f36b6ff46d0bcc523d9a2ae90988e0e649267 + c16c9bd6ca31e8b068474034324ab3ba12df1a105cb737a8ba1882747ddebb21 + 34f6dbe5f68d9657fc0235ce9aefebb5e140d0c3cc2209b5c28f97e97176f718 + 23d84d69a6d92b4064e03d9ebf3e7af8b4fd66ce5e35bf88c368c55fa92e066a + 362161c75a856bac776542b5a8b7b469061553d07d2cabaffd2ce9732927056b + fe1a5c8d014d6232433d73f7a5c13be5fe885525d7d4fd5e042e7b573b59f4cb + 1a8f02fe2727de627047455a188d0bd10b1abc24c8d4999ead7ceeaca44a4c73 + fee00345442a11b3f4a51e5ab733f74afcb02a7a61210fa3e030bfe6456ac235 + 9d34a4f8daab0acb4e0f2bc15912d6798bc587fbf4ce7162b1871406e0bc2dfd + 2bb758244debca32e5684b254a6a520f852c8822edd5fa54bf061692c1439b6d + ffaa26144728c956c9ec8244167260bdf181efa95522c8ad3e30e2762685f138 + 318a4ee279023ec48fc9e7247f10d77ab6a840a9c3f2e6f9f0fdfb27e49ebf5b + a39657c855cb984258e1894a8987c3a15d65a5be6a06ef67d00081f2987be6db + f88cae0b1bdbba6cce2459b0b4eb43e2cf8bc5749499ebfd2f52bc20ab5248ca + d33d3159a1495bf773b9ba78e7a1546b56dcea2df3e9cccd0606e051a7faae55 + 6dd53e62137b7bf4e1b1fe96cabecec4caba3948fd499227b835d911e253ec1f + 357d74ec8f817812320d798e63a408f516e5e316908106d862af7cbaa16f7db7 + 2fd754ac013f90a70157efec1bfe8aa06c3b941a06c6d4f12064b05110fdecbe + 7801664500f21f55370df83f27f095b53396907147e6b3bbd2d88046da6ec99d + 6879d55504e3ef4d058d729bd75357b3b695b200fc28bb6fdcaadb926817eaef + 6ec5e96226c842d648d85ab13a21cfe755caadb3604cef40899b8d3344b31582 + dabd69d7028b31882cc78c9453645886a596de605990aa5c47ff9c10f13ed88e + bed32baa7e8a78a7b1bbd6913d6d35c2c68beb777e9205b5d645502a8c9d7d7f + 87d8b16cf9f55e5bee9f1c63b52574bd4c5fdaa2d9aec471434ef03eabf23c47 + 388dee991c832f40495f598fcd459c0c2e3308e21a7becafb5836c2c86ff9565 + 11e885d35f613305e612c8f775df3e5db0e00cc5ca8bb0dc1425fe9e51474307 + 1c4369e4034189cb458f2921afcf02d9f74e73922afd368ee426edce8d488def + 2d1ed58cc530a9b083b9d47b79d5f522f526db36b2fcc376201c619a84b30373 + 9372931ea0795bc71c02e74fa46b67aff27903c1bc74ac8e71ddd6640356829f + 178059cf8e368241fd15351f1e63669258d55f72040e0687c08392725e9974c3 + 3d5e0c09d0eb86fdf20d9708e1448719432b06cc3b98b6e0cf79f9ad0a5b54b8 + 9d3cd154c9b1fc6badb939c3da1f6e98c8adbdcce27c15925a679af2cd811351 + b32b936ba4a29ce0e3e1194d8a403b5fb6c4ad5aefc7026fb5e1546b77614159 + 0fe0b8b037154449dd4408ecc0764b980a9ff9cb20c19b3f16c46c3d29461a84 + 3ee52566d0eb77ae06124ecd598a0f7c7c92340953e9edcc9da08a1ea51bb54e + b0354b34df8a66f17d8e3561122b33b8cb194512efcb89ea782d47946b813e3b + 8ee61bdd8253533364ac8f56c6dcd297ec5564b3a5f1044da1ff835db20e6138 + 0ed152434e84c5117d75a50a42c321f229fd2f1f9d58e92dbb9526a65a91ee4a + de615525aff250e1488baf02d8e7f84c172c72fc6c119430459cdfa02362ecc4 + ef44075e2f8982c246ec63683846decb24b5f704bedc574591ac45681be32259 + 24a066df645f4360a2558177e51db5257301a49a1f67e956714de555c61230ef + bae4d7166fb2d6c4be9e0f21692c5ac429404c7aea693688278c1dae0685646d + f5e7a71263bf105c0ca5e5b846690548cf1b4c1e9c530738fec97ea64dc52b7d + 2e96c43bac7b28625ce9ed7f1f4cbdbbf0d115ebb442dc4d094d246a351b5da9 + ca81271829f4d02c5d58c88636d54b95f3f9cc0165555136e63034f62f542547 + 62c412b7e2b074eb47ef643d7fe61198f23113e98fd828996d0680a8ec898ad4 + 51a573d50723f534031d8be7ea7e3b8616014f4521712714b3e2166b1cd81868 + 8b45c8f5dea1dff0a010feca821fec0784fadd110db62ddb522c30c28b24c730 + 462b0a4ccbe0dd14c2ed650eb3fc56a4088e1e0f30fd2e2943489dcf5320351d + c9007bedabab2b98b5a4d1f3d50e4a12d867f9ef9e5c355f6dcb4ec682b2b892 + 54507779cd6bc575988e6295fc6c6521c9c33bc49da2070ee7262715e78c98d8 + 20a033ab835d1f81efa804e35ea4cbadaedf8ae0d7bb778ef9764ae6ecf64659 + eaeb30ddb8f897ec1c0044b5948f8e111287ef4be6d2608fbaaefc43ac6074eb + a4d359ad68fef727fa785cfe2033bb6eb864e821eb327bb3367798e2085d916a + 224417d705b2cf74982dbc17646ceb610beb2eb00f68bd4e90d0f621d058d78f + acc51276d4077f9644b500c5498e0298d33bca54bc589204dcb3d0bfaf64ee52 + ba6bdd7572fc61e105d84bc3cc6052037114929eff2bd7d557a6c5c83e7edb2b + af667f8846a11e54f2f42ed38a185b1443356f6cfbd13a2c3f84fa3b0ba9dc6c + 5bce152f86b626e3e8ec645f6ddff58dfb88622689365c721daed45611c65f5b + 380dd1d598e4c7341da464dcc6ad0210bdeb23c4527191927f9a25802a68936d + 76bdacfda5923aad262d3912355751f89a10fb8f82d8be20b9d09d90e361f3f1 + 906d8d030288553f6f5c7d5fd62d858b269c0c1bded1ddcc424aa7c0dde33f6e + a1b5de3b0760ad91ae66eb57008308823f82d36449872f96b124cdf6c2e52daf + c207c28b4c947141c0896645f398ad506b53b3cff00ef8fb433619748043546d + c0d531cf4bc488a2d5eaff572dd8e35017e5259422760ac7b52f1a0b935d1330 + 26be9a657e3fd9a96cb6523bd0c49bb1248b0af064b157c0e19d2b46705aec0f + 77090cb0cc8d8480e1fe34fa57ba7a5ac9acdd5ae674fe407edd8c5110289b71 + 1dd4bb8b494348b98871d2b40d0ef3ef48697d4852627160ecc80cc21a0b1bcf + 65a6c30bb5df1c2c590a055afd5ee5bba748c763880102d410c8934c956fcaad + 328ca353d6a119eec5228ffc1a61908c7ac8e8f349bdc3f9d279247043a65a73 + f692a8ead055184b54d12c6909b99f7070fbcddb147f1fb95440874112c1db60 + 3b26374a9c64ed9d045670a7731d52c93213a4b41d4882d7eb53074f046fe314 + 08fd1e80881e9129fcc4038a9238febba42c11947e7204ef0727a4762f38a994 + e9ec0762b024d735b8043da6db401be64841fabe124cb1fb312602c55445024b + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMTT9 + %!PS-AdobeFont-1.1: CMTT9 1.0 + %%CreationDate: 1991 Aug 20 16:46:24 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMTT9) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch true def + end readonly def + /FontName /CMTT9 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 40 /parenleft put + dup 41 /parenright put + dup 46 /period put + dup 47 /slash put + dup 58 /colon put + dup 97 /a put + dup 98 /b put + dup 99 /c put + dup 100 /d put + dup 101 /e put + dup 102 /f put + dup 103 /g put + dup 104 /h put + dup 106 /j put + dup 108 /l put + dup 109 /m put + dup 110 /n put + dup 111 /o put + dup 112 /p put + dup 114 /r put + dup 115 /s put + dup 116 /t put + dup 117 /u put + dup 119 /w put + dup 120 /x put + readonly def + /FontBBox{-6 -233 542 698}readonly def + /UniqueXX 5000831 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacdd6500abda5ed9835f6a016cfc8f0 + 0b6c052ed76a87856b50f4d80dfaeb508c97f8281f3f88b17e4d3b90c0f65ec3 + 79791aacdc162a66cbbc5be2f53aad8de72dd113b55a022fbfee658cb95f5bb3 + 2ba0357b5e050fddf264a07470bef1c52119b6fbd5c77ebed964ac5a2bbec9d8 + b3e48ae5bb003a63d545774b922b9d5ff6b0066ece43645a131879b032137d6d + 823385fe55f3402d557fd3b4486be465959b1188f76df7824c135a7fb382c4e1 + 1b0ddfe856b6f34552ca48c24b57dd8448fac257c4d93fb122e1218fd36b99b2 + d79dadb8a66613ef11039be77816a7a2d6781fe0d69cecc36232ae87a172afe0 + 95532a8c7ff40bdd4a5fcfb6ccfd8f73c572231734e0609c6743ee11010f6579 + 820b367c49069ac1d45760c0ce8dc1e67e2beb72be6d287910547e1b4bb52465 + b75947d224998223275a2c340a1c14c04328cc2935c53ee2723f1de6357a291e + 14863f6c1411477b3ea074052b30a4c1ef03ab324d678307e1cb02c7aaffa90b + 73975378b9debcd3f6aab626a361be8068c60edd0b2be4a7bbf4efa21cc23607 + bf7e2556c17b5923d7b0fc036d5fea743c55f2bbf72e8a61995bd63d7104a085 + b8dd5a83d9077376a4ae8f0c048606bb9e84c640c52d0a95b35d48cfafd6ebe3 + d6eb0ed88c1212818ca93e40614740a77c446b792d02945642014a5d55ba970e + f97dcdd5b839f621a052d1085a1e668161d3ac0227c7867324ede883589b39e5 + d152793009cb5a08eb6719a44dd01b6147e3436bdbb28215ce3d29a3b1dfc72b + d942f8cb3376b4e12cff53a793d935346ceb2afc3428cd9313c671ec1911252c + 19de341556999aaf7417aa5085daa35ee71353fdc2c7d83ec2dedaabb1b89b99 + e4cb5282159cbfb45a286f8d6bf3abdedccbdcebaf6994b17f1be07d10f00cba + 47f2fbf66c0d83921a5a0a4e2054a8a2dcf492cc40de855b476ae77bfe12ce22 + d1195e3f9d51272541e21267b2924e293e7a1090b4eefdb707d2c29ad62a240f + ad89834a3b49e3715ed086a4bcfb0b5118744fda024989692cdf4e88876c2dd4 + e1f3dbf5792893854a5c4495c99a9e9e2410ad797d5c79d940621c6e94fd03a3 + 3430a835efb9f316b5b6387f6e6f1ebb0447290eaf0a9f32be1be3ff058e5cb0 + ca51d98f63f9c56c811aa3f3844c9ae7741bcdcd6b2803ff9a73d2b22d56a777 + 2e851e737c239e1f441bd6b17d1bb9c036620710c5a58393d28fc01cb5a0873c + 6a039b646e94ab99072c4b0e4c1f78593ed8c76101acc2367d4db03a7e6f2362 + 6841ce0397bd68cd2dd40bf6c2f5a97bdde56333b433fa3d0995bb64bfca033a + 3bae2e342ae335051b19d500a02353f4977ea79d5fed3540047a16b15831b412 + c3a2f01cb190f4f16a1f3015812a046fce8771e0ac607b73a64c3c4688cd29fa + 907e0253221d5e67ac06070d3a48faf55810780945432212a708c22df7b38c06 + d4c631bab56c363d8de4a6249d4e33ca1cfa6ac46a62348319a32ebace12b4ea + 045926c1440036855b0dfdc0273d02b53d754de46416be9b77e538becb268fb1 + 9545fa7e599027c7245f070edc479157eee7c80b97b47cad50148b79c4069b29 + cae2102bcdb440c3df8603f2d60877957d20a6c5c9ba4553e7115742e83d8bfd + 1d52002510316f52e31080448c1601c4fd64697c8da069a77fe2575e3b923b80 + b5ee72646930efe047ddf882cc4cb88d33932b08520823a7184234fa42b958a8 + 639d993139c04678301e471500091b567ac0b8517a41f55b4711d910a0b0ff7c + 76b0a59187d8e955a85702fe1b6f4d506faba31d233bfca82248b2d561b94144 + d19bb41071a05b88dd53effe58174d149d7b9c1051d5a9bc8ebf580e86b4400a + 353879050cdcfa2c482a623c0fd35f615fbadfcf6845d5ff9dae82d54c618d3f + 53dd00f2f7ffa492065b078d8790a917d23021543495cd39c34cf22789f0ae14 + a2fd144d7d682028a8856bf347b6c5eb6dc241f7fc7be9fdb431af8a91dc68dd + 76c31cbd63032b6be5bcbe3e055ea8d60d20590aed675b977896ce842b6da987 + bbf11c2d1bf07bdf4e386e59a599b9f6828783734b49e39f26efec80240f60c4 + 0ad7eb1459c7ea4ab91ec8a6e0c89597da4b786a0f67692c424d297db73738fa + 66ab55c287b34d85ab9d9c53d19c4e4095fc4e6ea94f84da75c51123c9277513 + 660af9f8bf8ce85716241d21be8186db40728b6c41706409f4f30d78bb7413dc + d56dbc4808f5420082345769fbd4a42c4c9e41d2a909d48d2fa9228e23f28b62 + 06c749c7b2905d81d76efcc5e18c7594a43253963d074d4b32245f3562a4c7d5 + 117d8845a24844be3e6a1c1da8f387c025bb127ca989884da9b8fbbec1394fd7 + a7ccf51e5994e5d214dc38e1386ec7b107e4e8936266296c25a56821ba9483d7 + e57fc50241cb07e475bb0f8c9d53ec2c59de79ee595350d8e6ccd7e19031bf4c + 7b2ee6b16a1331c2796bfa1c62dd93d208c1aa99def84cfff64b69f4d9ad20ad + b1aa2c223c6d34dfb2595dfd7cd040257a858c4706b3e1783d91d8b11f85b9ea + 1a3f2b3e2365c61967a4299cfddbcc0a03e210d58896b11e4e38de9ed6b35e91 + 036e97a7ce794093e8361734f0d55bbdbecc10e3d0d25e8143a110b28481f286 + da20c5095b84ef423400f45eaf200879df1c46e1e378af9463dc3ff1259079dd + ebe383cc78185115f966ef693c543d34cdfac10f08bef62a235670228ee59d2c + cbbeef66acb53238316e663c7f8cc64f71a91e2c700f2ae3c929d1ef6511753d + 2a580308edea33cba7acd6edbf2567f9b5a1e82bfd20e26d426bd12fea4c2ae1 + 0ff2288504c6e925a3b3d2034ec3fe1bea7bfb710fdf473a0d691619f28d5578 + 63b22daba69b508e07af93b6d461d8c0099fb065b362710e071df84a57cef477 + a985294c96ee8bc8327b9c38b0889190e2a1acb8e97540c1e19f5cdf14a0eed1 + 8a1b30de9ac805bb825d9915f91c74c47a257ed9531b6cfc79ece50e5977bc03 + 02f22bcb695702e28ed9587800eb21f60cc39923dbfeb4368c857f905d175b8c + 99cd54ff74965fa89e3a024b5cc7b18081438c509e036ab59bc4ab89cd56a63b + aa9df6dfc315a71f4aa51773123b54379a0441a280342316b529589affca63c4 + a05a970993b94a93286e25a7fa83ef326ca396420cc01202b25621504943260f + 0cdac099c416649cf1a1980ca13c812a99f221c0234bc2330d5d6d0e6f6780ed + d034b03e543a90106465155aebfc6d5c48fce8b089985ac87ab88995fb8521e2 + dc99cdce3b4ad64efb46d85434cd54f58d7ac0d788a141c196a2004895bc6822 + 77e33549e70d5b3eb0501c6a893fee4c715826d08060ce27c9c95a04e60e780f + c5e36ad86334544ced18120f3ff4ab6e8f8723d8959fb1776ab4eea7f550ff0c + 7299385adfd7543e36cfedb743b56e5ba68561fe441fb81b29b864b2cd97a345 + 6773738063e146dd21678f417a0084fd892e1023ae83c5073741aa258b92da6a + 0e9197b78e6448e981f69f9082163f7279dff68648b3fef2aaed90361cc60a98 + 95d8c848fa333647f285917bc02e5ed48494afdc54b9e58cb489a468bb1b59c6 + 8489445cd270df31c7c2de3837e8889a0fe164202c5fbf2ebc16d0127736e125 + 1ec6bb9810496266cd9b122ab8e791b09630566b59856fab6f1ec5fe6a82bfd4 + f2d675bfb9abe8c1a4bca241200b213660da9a6d36b8990b68be1863a7c0fdf9 + 188eb8f8b37fb56ed5db37c9a66e23f96f9b96032abd29e65b42a73245b02958 + 629b28919141a3565940f821626c7f8a95d674df32b1757366fa7cd06800a8cd + 91e0477d87f548846117790d83c5d4047508f1773beef27dbe8c3fe1ebe07fab + e0db5d436c58f27ed012dd751fac6bfe7e2ac914193b5ccd3c522bcff84666f7 + 3772ab9ccc2d8a860222f148b60e8e27c93fed7a333447ba152a3167dde56381 + 38a20801b4321cc38fd6ab78118525f8c8717e203f91981d3d7a579c51e8501e + f43d10996ac5063f14891195688cc932ccf8ab595bf0d2dbbcad7def09f82d73 + cd93acc51268c75a479b70a12962cbf2c273f2033326a17d38f60ce45b70002f + ce31364ce5fda271152b24ab3fdc649376af83e6f0432892ee7ee5a85a4c4adb + 9071d5bfc530efc3dda1668eea34c31615629711907072b805220733aee1dcb4 + 647d74d41bd7dfd967292a178ffd85b7133bbb99df757ab3aa303e46112d95a8 + cd6df78331095b6cb25c85227416194e2bdada0a96db4d6c358c44247e90962e + 1c8d7527b68899d1e09e0849530730fb7aa05310b5e0f1e67b1c7284dc6e1fb3 + ba955338206f4df1b21bfa607655eb3e476337590f9166ef106d6ba060f74838 + b47d17993c175390cc28501f7c03e972b7e3ed22bda0af0bd379bbb9fe490bf9 + e6cf17571de5005256a16ffc7815f87b0d85b7b779ee2eb9e1ae0ceffbee3bad + 50a8818bcdf2823e32b63b3c2e58105fe5be81942812763be041aff824eec7f8 + 3d7651daec67addb0d0ad801386316650f2fc44b985edfa3342c8df1abb03fc2 + dc3ea655848814376b1bb47eb6ead27f85cf64a8058938e268017602ae47e002 + 28eef2ccf6607c8e90126140cf2bc583dc4475c07e296366c963ec6f7a286b06 + acd491bfbe9fcd7489437655ece96f9bdfebacb8906e4ac265edda2c7736d821 + 7874cce234892c014b60283e81f06139034add5fbb2721768b5dcb885ea77940 + 56b3b4bfa5f045ab350b63ff707501b538c9be8605e9b9383a0a0add16b8d1e2 + 4dc9604d333d0b7555f034a871d4df2f5a1aa01e4dedb50ded0d7278ebb9e645 + c60b1d8af5bfaff7e44b69e67cc352d4d8632d6cf3d0c70aa21308a92c254c6a + 5394cdd6dd036317b04d1d1521bc15406dbfe28768dc7ee799214789dbbe5131 + 90836f74cfa50305021e7f631d01912632088910166207b16f78d45d935de4a9 + 13dc3d037816a2f5cfe7d4b7afe5e8dab0ea2c6a5f8b5416211efc09bcc44e52 + 0f7159f1211d13f3d55ce32d79baf989727d4f7d3c042e88367f0917231f1ac6 + c852bc5b8099884eaad404374a685d0b9427d6e1c9763a1d69e9dd8d60f61b15 + d7a85c8dcfd97f8e24647b6b65ed009f3d6484c857a913263ace330b81dcd0f4 + 83f0e32cdf5a2563476b66a1de80db56e2ebedb4d9148455020ca9505c711384 + d833d72996bd49f91fe6c8c47d0885950df8a9a6541099ba5330592fb7932ed6 + 78db4b7d46d185d1425f2e5091607bc022d5324071b703b6dc655b403f55aa3e + 6381c3da088478f7d671d396ac45a441b161db756ea3932890fad26c4cd87389 + dcfc106312adb2dd4899c734c742770540f435369e86e5a066e48125c82cc186 + 7dde8c34ee85fe8ad36a8a4c562432c5752675791fff1c21ba47ed97de8449de + 99b545880874371002197bf754d7b9d43aa216192b166630c8c0a8d4ccaecb13 + 0a260307f8ed38c71df76da6864226acda2895f2c97dec5f1a30ac549186934d + 8be2ecaf2ca3254c996e653377fb4f357699a670007558f932199ff8569e26ef + 9668cf9dc842fab4ea8932cbdd338aa516b929f1dfc0d32f0151b8eec428e0bd + 8b5290b4fd2092e6899b9c72ad4ebcb8b446826b786d47a3e30c9fd0304d9459 + c6380d77c22fe4bf0b02a6d5992d0fdf4ebdee1eecb62a673329fd11e7b31200 + bd6239b54044cbdb123e8a931832b1768b6ad29d617fdb83d370e1ceeea95273 + 7d3fdfcfb84192b711373d8ec7bda9931e6df5420315bb6c2e1f8ffcffae5eea + ca0498c663c09bf321e3d91b174f542375d6f74e499360286610c9b58f84fea9 + 5ff3b16c07888b814994238a7e7a55e4197efaac18e32a1dc847abe1e4716017 + dac12ff887dd127445783c8638f00d938d5a13318641d87c30a674a76914e009 + 78582af8cb1e414c16d5b2b0de0607d40f3e4b323beda2cea6f553d7fe13faeb + f47e6fc90833dbd16880f0b25cfd288fc8dfefa7864e7c0ee439aa614d4be9e9 + 91dc9d98476000aefd57c4a03d78fd3b43a1176e07561c6ac45ee0f27058efb4 + c6a15f8bdfc33624800f85a5ae2024e2127a770880f6e6228f13bd2da7e5f3c3 + e2e86aa0d5f7a5627a4ff93599f79d623b46aa38285694f7696b604b7af7a614 + 5f6a86fcfdb3d4a023aac7d67dfd2590c99cace7ae270357eca20ba91e2f41e7 + 1e8a + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMITT10 + %!PS-AdobeFont-1.1: CMITT10 1.0 + %%CreationDate: 1991 Aug 18 17:48:50 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMITT10) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle -14.04 def + /isFixedPitch true def + end readonly def + /FontName /CMITT10 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 99 /c put + readonly def + /FontBBox{11 -233 669 696}readonly def + /UniqueXX 5000779 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacee583a5c939393e012707b47e0c1f + a47d284a1edc9d01a497d772bca8c543388e6dc0d1e2c4944740470e0914f65e + fb0737b0851b2ba713a9a00b36d07da6bcb52920b9b59efe587734027a3c5e65 + 66aad332fe6fbcced1417802822a3b81d6187875263d6bbda04bbcf6e4870fee + ad60f104bb3c5a766610dd11aea64a6b107b0b04439fa2888b8cc39232bb83f7 + 695aba81f0260cd5248b9e649cdbafa8977dcfa841fdff9afd3a7a7c7905c219 + 28506d4d50a72fd1db1b54a855775831bec099a567f3f795b812ed5e145213c6 + d5d27f9ec6709245e9e4068a6606742aef616dfcfc9e0b9af7e687fdcda43c51 + 81a08d6ab72b86fb38756fec992191c1b3fd151c417125d4777f0bd0c57d2959 + 0db35f1e9e27945498a3f7dd60bc54d72bc8a573457c16796914029dc282aaea + fdaa4b1439f4125add4b7399be6fc68e4d5a766cbe5ddd161180d4e1ee3c95d8 + 64e79fd0c65b8f459336e99827454d662768df3e6c1c3647b00b70b5f96a3944 + b7a197be0f58a1e995a77221bd374a40159d81c7196c94e8af7c3392255ee6dd + 0663e05998ff917a62d635ca45e952252342507d6b4d28833c7809c1b88400ea + 50c652efc339a66355c8017651fd24d9a5cc51ecb55bbe64ea523b094332c832 + 52f7b426909808ae113c1e5601b0e081fa8e7777ab93b42207100f43abbb9ce4 + ebbf51e584299a06fbea62b8ad3632ff0f281ebf9503ba6b8ae4f3b57f650388 + df63eea9e1ef1e08f7a2c6e4f5cae2c4dc7b42726a6ea6b7592e9355a01fe517 + 12264a713ba83c057cb5f663045791d4c7598b246cd3b8466a1130249568e95d + ee2c0b4abfabc8e362b78d9fdc025fc19cdf1887997d32fd1487cf2bf0ccc966 + 319e3e3cf4add90ab51f0c3e918a00e5726ee346ae410ec3ce90404580c47572 + 35b3ec4f5ddf23dd43224d90d8dc932ec7f0acfbbcdaf80f261482ea4a2a2644 + 129c27fb4b44ba8c78d23273122cbf1ca49ae879ddeb6991b87ce2ff25c655e6 + b5ad950028de17f6628f9eec6842b79f69c84b6c55ae423714e622eb4e47f9fb + c30a71808d70b89cc1a9b60f0ef21ad074a63d38344446947fcae80d22c6bf9e + efecac8e558ed73566db2222f58bbe4af32d01742ef7c7ab61550152f790bd0e + 6db2a267c707e8c730cfcccc623e26262381546c69a971f7cff90baa300eb0cb + 7a6219c9f7063a372acc9865e993ac8d49b73073cbd7d32528754f3add739887 + eaea5b1ac03b7f3b3103d5bf7310ed26fa1d9e529dcd895b4611ba0a13378693 + 1dcb19ee78c2491d8299e78bb10f92db87f0c16fb46d46be3425d2cfa97a70b4 + 60e957438deb754c6cb2e803f678defee02c4884f35d450e1028fbd46aa11cee + 2560facbc1779d0fd098efc43dcf97a348d5480628191b6a7ad9baafe3caa56b + a3cff5684d0e0b2306918facada797e50254f0397c23ebeb92d6525d1efd5a00 + 76ddd24f47f4c2b7858f3e213382562fc90c340ccc94 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMR9 + %!PS-AdobeFont-1.1: CMR9 1.0 + %%CreationDate: 1991 Aug 20 16:39:59 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMR9) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch false def + end readonly def + /FontName /CMR9 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 12 /fi put + dup 34 /quotedblright put + dup 39 /quoteright put + dup 40 /parenleft put + dup 41 /parenright put + dup 44 /comma put + dup 45 /hyphen put + dup 46 /period put + dup 47 /slash put + dup 48 /zero put + dup 50 /two put + dup 51 /three put + dup 57 /nine put + dup 58 /colon put + dup 65 /A put + dup 67 /C put + dup 68 /D put + dup 70 /F put + dup 73 /I put + dup 74 /J put + dup 76 /L put + dup 77 /M put + dup 78 /N put + dup 79 /O put + dup 80 /P put + dup 83 /S put + dup 84 /T put + dup 86 /V put + dup 87 /W put + dup 92 /quotedblleft put + dup 97 /a put + dup 98 /b put + dup 99 /c put + dup 100 /d put + dup 101 /e put + dup 102 /f put + dup 103 /g put + dup 104 /h put + dup 105 /i put + dup 106 /j put + dup 107 /k put + dup 108 /l put + dup 109 /m put + dup 110 /n put + dup 111 /o put + dup 112 /p put + dup 113 /q put + dup 114 /r put + dup 115 /s put + dup 116 /t put + dup 117 /u put + dup 118 /v put + dup 119 /w put + dup 120 /x put + dup 121 /y put + dup 122 /z put + readonly def + /FontBBox{-39 -250 1036 750}readonly def + /UniqueXX 5000792 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacdd6500abda5ed9835f6a016cfc8f0 + 0b6c052ed76a87856b50f4d80dfaeb508c97f8281f3f88b17e4d3b90c0f65ec3 + 79791aacdc162a66cbbc5be2f53aad8de72dd113b55a022fbfee658cb95f5bb3 + 2ba0357b5e050fddf264a07470bef1c52119b6fbd5c77ebed964ac5a2bbec9d8 + b3e48ae5bb003a63d545774b922b9d5ff6b0066ece43645a131879b032137d6d + 823385fe55f3402d557fd3b448685bdd20eb05d5e7c2126132e33a59a7170609 + dcf4871a5d023c9ef57d3362d9f2d7a440bb69bf653364105f16f4d0f03582f9 + aced3d05cc76489b16e3fa8a446094d30038b06ecceda269f2eab9d19a99c7f9 + 39f9548f206c5a457a19270b2b82c43b091dfc5573468eaa3e7a4a32f8042891 + d85e4b180fcbcb3091d2800e54c87d84ce9cad6869b5aabbbe47f40c68799893 + d22b765295e1e69e33aa048b7ed98ba480ceca91f3ebf8ef85fe9a3976909626 + b95ac5940d53f9b02215d84a44837ba25ed15cce0d504f1d335065594f3bc824 + 5405407591cccb11cfd4645da60d960c0b93f187b0cf7b105543c0b70f89af5d + 264b6c026e3ae646acf145950202ec73282111e3e601cf2bcde22ce3edf6db23 + 516481420f26552ff4472d749811f27768150450d0d0ebe3c79f999e99b5c0f2 + 2eaebb12d97782b1bd91b2a1f62a76412548ad53c0dd411d4a08c0f071c2c218 + 63d9adb75a4621803ecb84c2bb235b620b658984b2d8e0c4637e2811bc8f0d04 + 6c8935afc70141e1b2d9c23bdb251d304b3378faf8928bd09686aa0340fb0cb1 + dc48c996ef91530ff078666fad227a3589f50b605267212d3a65ebc1019a8eec + 9a0739a00279471a01e1505c17658c10030fae32f274fdc8c8774b0d5406c384 + a1d17068dcb0c2575c562fdc5a2176609bad9a2c255e426a4325a4fc3053c7b3 + 2f35f7bbc9aa50135f30223360fa2fbf019294b3af98224c5c05d6038db08bc1 + 4103010094dc215ef9ccfb96b237851332c8ed81a9184cced4edbda26b381f0c + 73a2bc4a92533b0e667e82ce49ddd8ac9e34d9d40fd4b5b9910eab3b1234bbf3 + af6608d66eaa424c158eddb75fbe39462708da8f5c18d92fbdb2f534598a844a + e076f96a741f8002af3b38d7e4bfa363f5f5d1193014f71cb274902c5989d2e5 + 471b02b69f1760f9777c9b774f0fde39e4a7149c40f1dc82f77410f35168d1e0 + 9ab3273423ad3322d91d43e0a34c26a86dbae9d1b4cabe365862981d069b80d1 + 020286e236a273cfe6dd66ffeacbfd2ad504ae96c2c8fdc6febd2b5d8c1c610c + e13ecf9157ca3282dd254b0cb771505099c5fd127011cd43f331f6d9059ce96f + a3e092da80b5eb943c4269ae8f4370e7ce71cfa1f510ac74a25f70a2c4a6f31f + 925ad0370b15d18ee2bcabbc6d1bcbceda432491bfa7d27da323430c6a008b45 + 82efced62a06014355e90cac5d6e681d857cff801a19dd50e02e6240ad622426 + fabd492dfd678cfe1c820765c04a11671ed104e92a5677e99b1115de313b9737 + 533d1f436a65e5455378ec52026865dd7971ca8dd2f0563d61791a724a65b3a9 + c5327d37763d1ecc31b3fab5188b6bc5666d34697991b79b442bd6853e938d1a + 57314f53c343fe07adcc730f6356d185ae998793ab790f8e67075b3c2d61984d + 4e917874e0e11d38babe366abc7528bdb46885b3a8fdf4fd76cba54c203a1924 + 8b0e0d356c8091f868da349ca2d1ce972d7ad4cd4cdb35347ebe9d643b6d5cbd + ed0de255dc608dfeed3c207cf9647c82ad006452169d2b6e6c738f52949a8e0b + feac85dd4823a383f9616941c9dcf2a8af132f27f817072cc2c94193020f2efa + c128feda2b642ba24dac9499d8b6e5234a0ec9af08d2c27741a6f8a04ca500fa + 15804cb6a16bf70d51e3f7dc376c47a155561004f5b545486df0487581211244 + da9bc86419be838af6c140eb6e7bdcfbb87e208c9b071537edf72cb87258bae4 + 8b542d930148ef6970fba1ccfd80cf244525f2eeeb0b997f7a81bd0a69739d74 + a50006fedfe5bf562805698a25c55a3799ae23c6cb5937e67c955f87e838d14f + a1656383d0ee817c0282570e496d1214029a481cb6b3407a4ee2c23349206b07 + 98085975813e03e4977367225bb314ee529e81667c96461e91ed53d696800cc7 + 58f4b53a89cf359800e397bb51714900a2cd060c729cd5f66200e58c6707d021 + b244290771942646d3a296222ebcd6cdb55db49281cb21b7f1d54d69271be4e7 + b89d05c9101db6a8cac1ea994909f56a64410a27e5a37c44d4743320b00e6ec9 + 7fd27dc3e252cefc3ecf174f64f3940166edd9503c0e26eed9fa2b287ef30801 + 71cb46281dc100b6f3fd96148c341a9a9108c6a20afd41a2cdaaeb12a4734b40 + d251835684ed0315914dd9d03b06f6f3999d582ecc7a3941d49719cbd0639cd4 + b682d51fd93a360fa8c6b21c595d0d4f190b741e19e7cb15f313035139db122f + 1faa58cba87a2316bf834dd1d3debb44e866a7936573e544fa01522a8c846cdd + 3ef5da4cd24c53dab402a06d94f5b1cbeb5be0bf1d0f6b1189271374ad19cfb6 + 842dd12a81dcf96e55fc6872d21407f70f5fca975f4970a942759a12c67b369e + aba6d13946d783724314d7c05fc5c089e449f1c181b31cc90dd858de619f7776 + 359f30fa2beb7fe201f3e0707720212e16268253902f9d63937ecbc03cfe2380 + 1c912ac83e0de35ac5a5e4b28743460156a52fe1f1002d42389aaf6ee0a64f7b + 79b9650eb5695f11e46b605fd413ddf337e7f42a8aee6ea9f4c664423b5a855a + b9087af45ae9b08f479c7110efb50560951ffdc6ed336c09d0c99fd5d7a76e2c + a246c1463151969de7a0cd0d4115919939d440ca9b7cf31197bad1e2bfcb79e7 + 1adae6bea00b6771da7e2a07d9f2341725fd0bd25b2b1e4a1bdf4ddc632b5c26 + 3337d67bb73d9dd6f656e5f6a32e912fd43472140d3fac0bc01e8d05b541e5d9 + a91aa0593c980ad35fc69fc5e5fa126ce39dd1dbdac81f0f236b230de86f91e6 + 64959d0b30f11e0d06f8bf0fb13e3d6f7fb62357d0213ca327a9f97f5bba13c2 + 562e1f212233b3728a617980c18d10143bfd3fd28788a7fed04b7ad93756e007 + 113b23e411d0e2a8c1122291c33b2bbbf3f01b9c8e90f25ad01985bfa44fb8cb + de4dcdcca121e26c7d130fcdb2d198d4adbe7b257d8ab4f84eaab4155abad56e + 5427041a84a2bf8bf5767b122024c99643343d5f5626579aea38ea0bb35ee401 + 2d6b5ffa085187a7c2ad5aceeda4427201b53feec71756d268f26ca9ddf333ed + 0dfc9f02d76241695c913e9ae3cc878a7610cda8aac855d5c29e1181284ea284 + 49484af83230274d328d2127a568c5a6a07597b303f4ab2a776114d6fe797b47 + 721ee21869c5d5bda99eb436f6e54de60df02af4d7c63084484bb84598bc5e35 + a7953d5150d54bc16cb56b0320479814907042f191aec1e96456772f714d8298 + fce7f3d649ac74dc3a107c77800d159268eb534fd7c8710adc2f1f264cac050e + b742640d7b9ab9c09e4a6c2ea40c380e0403380029cf6f5440234087a8868c0d + 7e6cff0f0b95ff6e2811d91145690b1c3eab28ea15a53cfeac4662d83e40ad96 + 31651a2e65ac71076973febb2aa8243e1cb4f89b1a10716dd8bfa95cb3004782 + c722c46079114e1b5b84ea2def56657e2ae1d313e700709c7086d1ed48a48797 + df036d752211934dbe67b48b429433fa5b048df93582da886b905b7a406aa3aa + cf991fa94320c716c09bb1ac9068ae83561d2bdff79c64842bd00a520cd84c07 + 11936eb37a9e31f96f514aeb1791ae0bd9a2e09a1e67c94b730b6e8a6169ba1b + 2023dadab789957be47131906003d9ec4978eafb474ea83ffd92a60126e0fd8e + 5caf847b1477a6ebb2be66259378753435a25a0065a68dc9ffefadcbd15129b4 + 1ae74429943676af65f091551486814a31c1aec2e71de095489983b328177a91 + 13e0c786008ac8aae215dddb6c0c6cd222be214c08af45f5470d19bf9e4f6c6e + 6980b2684b0de8ae2f2682ef0f13e42ee519e1cb5742bdb6782307b3514c17a8 + a660e363e399c4ccaf5b753dda45f9bb0d939b3efab955463700659afd1c14ac + 2d21b2523417752954534c50178b5c726d8a3baa4b69119592280af871432cd1 + 1b79a4900a4cb37389ef08dcd2eb15a43d05a8941daf4fca3a3a80d35b98cac0 + 78eba73f10e9bb7df7f1e01774c484c93c733259d0078de6374e7166a81a70e5 + c928cec28ddc17cdfe7af1e3606fb32795d6189f5cbd9f561c9d53fdf1d8b4c2 + 53e7434b8cd9617ede20626becafed7bba9ad0295f86fe634d34bf6df7033855 + 56f24d6e3893bfa1a88a656d4868ca60ec7f075e48bdd18a12f889383b4bbe24 + f6e76eba1b00e3d8f221f8de9d3f692f2bbb18e70164820e0777e44ab5f571bb + 82f53e847444b7c5e92ead5f20035f66899e76c8ad6c0b20be663bf433bed195 + a2afd48f6040d0b0e6a864dbb523c08007d2a436fe53f790741bd16e65f81a77 + 2763a006a11b58c28774f694ceb2a7219e429d78b788e74ed3d952475d4f4717 + f2239e1cf6c1afc790f38221c0d3c3c52fb470979f48f432ed6ee1a070327938 + feb8f5c88a6b75f508e76a9b9b86e532b18c467717046f9d7109c3d15dfc788d + 5e59cc0fc447503f603c0a4237e2f218ee5b6554732512cf7703f9edbd60e71b + 867e730ccca37264d6ac35e757266d43e0698bd9796a5ff6273714766176fea2 + dba85a7f74edb51ceb7729eb2bccdc0e9b52382df5f62753a3eb75432fb3253a + 0c938ee1356c808e23fa4bd669939b50032850fff886fcdc4a8d7735349785b8 + fafdcf0c6308d6c350dd0d92d8106d5420ea9663163bf9bcc0b4b610b94642cd + 0c45712a109064a3df5bf71f4accecd0ef87a8724708489a9c1165df862f8ad8 + 840d5f3f05524e189007152418afa6fc570bc1fe94e38ed471bf1e276636f67b + 421681c7e7885a30a0f1be10696a1a829ba2dcf45772036de0c5058dc1c1da8e + d054a193348515d614bf579e3f2562cb17cbc083ff9bc369825d6a61f0234233 + ade4ba8be05e1e168a16a9acc562bceb930d393574fb07b5fbc816558c069ffb + f8b5246badbb379b46decc337e8628f8ba08fe78ae7c3d6a53fe6766a2afc828 + 6691306661ec1dc9ecf64ca24e7b367162d81b3a57e3298f99f559991973541d + 8c310cdb25d8dcf83bfea51624b84227ac8780799a4b031f4607ab8870d349f5 + e2f0f52a142db9b4b5c89b22bce39f03771a1b6697f11e3c07c5512335dabc2d + 7a0ac07441150a9a0c970f4234287d55ac25aceb175278d13af354cc21370593 + 13996b6bfc6bb1201779ff3415b72d8c4300accfb99911416c2abe569a37bcda + c2419d21e16ff55f7feb0a43ee317d3811000fdeaad3cb138eadcf8fd6292662 + be4277430563e001040ca8108a9495673a596d777ac8e578d2da710783c73d54 + 70f3de240d47b25c3bdaaf1b371291dbcacfbfe7499793ad787bea336e189dcd + 1c5d276bf9508738cf22375c86da14598423db0dc58fb3a6597b59575e7fc98f + 17c956aeffac352558f056970d3b9200ade95cad886e4ab76ad046c87ea64c8e + 76632e2269e102820b8676f41f61a8012ffdca22d247ac0f18e92f15227b86bf + 102bae5944db1be201b7f9fc3ff7b57ab16bab66633a67812126d9f1a2768b73 + 930a06a80774c5a6effe53f7656e2f585bf5977ae887db077612d5280114ef57 + ffc84eea8c59bbb07222c3d52a75824c5af3bc6cc84607c54ed4b748a9f44a72 + cdee2c467f2a890ffb5cb399d0d9b82df9c6ca4312af35f925decac4f58074f2 + 56c8ab3613e43907e3583ca350cae9d6d3d68d4b5869083a2b49ce470f057cce + c2632189158ccc9b26fde9a67367c6d73fe05ec6e01ee1f4a527818c18e8df1e + 5e6bbb1da8e43912a512395d81d985c81b17e48bb02af6b95018ccead2306ecb + 2dbe1c496d46957f4d2daab7264a1a97e714d86a0defd94b5d9f5d7a231efe60 + 4fe7f25be842937544d894576ac19a182bd04b58ea44286e19e135bf78920970 + b33b3a847cc1d70eb7698cd4bf9d4bc28caa63f7a97aeaaeddf46cb86e2aa50b + 402ebb39e33b40ab4a920071a7653ea2675f0825f4ba8e07e176e739f0c66c23 + 13ce6239c809381b898127f5de792f0df01fdacfe18ffd5021d5379475716660 + 1cc88863c7ae3f11bd7bf044ae86d2b7265bd6d0830fdaace8d145db4bcf362b + 2fedc59a44fb8855e12e8d4566ad63351a6bd367e4cf34ffa87a757c8925ca85 + 9da32aa411d1b0ca58f62148e73efbee88b5972173c2e4aa7bff9f344edf566e + 5937a158c70d2ca72dd325a3a2d4dc146b6d2de1726f089cc1462bcccb659191 + 70ff748747546e483bd6818ff95da4ffb01356d2539397fa5ca7a279d690f045 + 5a76a77235de2361dc6453202d8587b2497bab454cdfc21c907fc5a427c51dd0 + 2548d092f6192f8e9e29ac6575a176dfcafcd787625488609c1a29c4ab16b102 + 6d0713d1a02b64b3813232f80facca85da0c75c841ee520091c4488b5cebdb04 + db471630e9061d25eecf655844b7386fda273f6cfc5b4d19ec386e31f0fff91a + 41bdfb7395dff2dac0473fe4c20f9640ca14837cf3c7aad549c3bd39dd53b569 + 3492f9736dd1de1287e80941db5be4551d7dfd25155010c83882eb34d66074d4 + 21d6146e42019640750d2609de62f0146831ba366fb989ddf2dfc8c7bf2af74e + f6fa72c7dae48e8f649ff00e3062a3e3ee5e2ca45da9f995254806634f8a1b31 + b6923a07cdfc6b23ea9db5d5f17a9b86339482d9486c0669bdd8864b723141b7 + 102c6cab8fe27c8f05697f39a19348e11bcf56e95d4dc841aae5a2fbcb7f66f0 + 32397f7733f5f148dee21a4b8c9150e805743bd2babb3a83eaa00aaf95f6f205 + 9da86cc425fb16185de776d6859e1d62408b59890a0cf62f4f55ccd5e6c9c43b + 5ddb0259e3b6a7bb76b19bb191a70357b982c356c25af1a1c93a1d161d9c1014 + 2d5b3d406aaf2ae7114fb1b3b2af70d9ca55a9bfcdd3ff5bd274c59fcdf5544c + afa428cb95bcdf236ced2941d17702391330ea1cff7aefb4883bf8a555204048 + 0477ec3fe99f3826b411b7d05dff2a70bba48a8514371acbc02325d36b814a44 + 6590085b1317fbe77f663fb8aeba4a45cabab226f80297f348909b0c2800bb35 + 6feb10aa38368a63e5d1b87bd928ba8e7e75615486953448047c7f8e7e923477 + ac46c605ff5d23d35974fd3b5cf0d145ddcbddf34b3bff993994d41ea459731e + f49a8d9b99ceba481cab29d33f72f5128bad22ee751209ecbd25834460d55b52 + 867f899874801b52988ca311777116c6f672c85ecceb772d74a58a06bd64cd4d + 42812b51f077ce769cf41e3f32809a4bb8a009995849dcae4a5f0aae71b7d853 + df8f7a602da1655f658cd1b0f9c1875bbbecfd79002b67471683ed2a77944b85 + 36dc0080954ae624fd61734c5e315c5d250e4012725a8a58b88e238fa950970f + 6e9998e8aa7980350acd3ead4fea83158af8ad2456d15acd07c54f95f43bf6fb + 2e99b935cf17ccf4a832feb78d959e4d4b0d3e5811b0b6add4ed2023963ddc72 + 5fa6712100f7cb19b4bef60c0c26990e082d68488e70d480ff1ba0f76db023bd + 67381a15da296f65553435b8e4ce1b3ff3d6f1ea8123da4149c344fd33492df2 + 3393c2b1ac25469e33a22356d520a7c7687495b87641cc6df9619843b156f40b + 0f48108b0603b5fb159c3baf0555b4cb9a22cc73fc02e214ce4c3f30e39fe83b + 7fbf758eecf174a5879f9800e56d22970e8ef5425e7d575976787417bc254919 + db768d5bd3454ef0ac289087eadc1c88e349102d72848b059a3820c0da5378d6 + b3e319d8edf0b55b24bb803952aa8a0732723bd235e1674c36c45cda78ae9cb2 + 2504255c6d97eb1d6132a1cfb4d4191868d9a93af0c8b019ceb809ff2b38bda6 + 3f70c1d7ec86d7d93093b35009571834265bdb25a5e115aab79a5be0a7b5737f + 8ace08a688a281e9c1075e73ce72b4ef773a1b911f85240f5f3496245b5ab9af + 27bb70c8574b2dd32cc7497d5e419ad4bc49e92e6703593e5a156fce8f59b26b + 6259bca661581eff169298ab2d5742221fa9f5704b985a452d1ed084037e1b65 + 90ee1178621172c1d5742eb162aeba23683eeb692a799fcde676aaeb327af788 + 19db7e98e12eeea0418943b40794d0c31f58de490bf31455abb814ac3dbfcc0a + 271ea909f76acc066f049819d5d500b0b51c0a23feae784478334f0bfb51d6c6 + c98d31b818b156f1af26a3d6b65dd8d5065e3edd1154a37ec0893f48e9394d5b + 816fdbea2d9d7a6813cb135cc5ac1be13d23cc2ae9eb06396b9806ce4305f963 + 7ec543e69c4a944a3abc19d4d5c98708cb9c1cb5b22b849dd067cdec9a6f45c9 + 181cd0ca6c636579943e09bed3f166b6336076d7d590c10fd5c37a4c1a54da5e + f3eb9784d297b94bfcd51f373f216cb0ebc5fe48bd3dd23b7c388ab6d20a19fb + df5daa4f8a7b6469362e12ff69ee30e4f7087326135eeca8e0f957e265ebf858 + 4af8e5991fe250f8dbfb7db56bef2830635b7e0435e92440710961a4586df086 + 132bf7a4ef493bb8c0299f9936ad7b19e25db77b1bd4e1b4adf9107470233967 + a6e87078daef9e6535ca8c2006b86a5e263b78ad95713ed23ff4bfefe4b23c81 + 67cd4d1d2f18bbd99b0c1bb793b386c77e2a7b8edf0edb3a4978cd2938596a23 + 4f7a7dc440a6db5bca8e0ca04d5cb57dc472d8d0262a872ef9fe10dc63a10e74 + 3188b9e3f29a93ad7ab782a04f2e1a82100b0663224daf03e35b4216cb1e10ad + 316506a1edf54fa7ecc6a4c97ca0174c6f1606c14b9a8ec0e17efc9eeebe7886 + ec7b41445a6e7b6f43ea94a109ee96b1e0f43fd51066ef147b46deaf3b2db1fe + 59a56a10034c8d7da1ae7b6b593ba7f144e85ff50da8f88878c7a7e6d2e7ec82 + d36edabf0c98cecf9faf0a3913ba652501147723feb073e85b70fb22190de641 + eb244e16f55e59f8d1d2969a4775d5db9e3e67b014d3b7f1e96022f0778291b0 + 0fd08b9502cabbf23a39dd6427b4f2871ac2e170e9196f1ae927e536bd212001 + ffd5b6fb4f8ed8fd59028f93f8896e856cbeaa8d2166f276b7526d61cb5fcdbb + 0de6629e352e1826ac0f67c6ce60164e0271fbc127679a802f127097e0ffd11d + e57c38aea01f1e2b708edb1d9b02a243eece74c98ba3e3b9fa9d2f5cb0532073 + d0213c3d0ca93129e450451d0f651c56deb4673f481c72ec52bc805d6c3beae7 + 5443754fa7f06a730688b7154a5a9c19d1a697c9856cef1aaee9c0dee450da89 + 5262055be7f582ef7a25c9e36d89b738afc9b2ef8e4d95bee77c3783fb671503 + 5613cd17110656804c97092250ca40c357f0c549d7f2f6900052c4d34fda6d91 + 88aedb2f5e1e8f0dea117078ba83aef1ef4b76fa73b851c0027cc1b1d7ff7c24 + a8ab2d7fdb68c4ab21cd1c7ff5148c4d34dfd89f939e7b5cb2b3d95b5463ec91 + 51ab17e52ee78c38aa6ee60509a6da3158f19cb51518a5ee1600606e46780ed5 + 73c4608f34a1ca1699e4a5ac1aac39743ed0ed2e934cf25fcf637ac1a637099f + 609abc1ea15022a1a32d2ee9c23c005982939d9f4d1ea223b17a8ddf1c572ab4 + e15c32aeea823471b1d01fc833aa1f20ae1fda5977e5f7bc9593e281b064f9de + 0b7871bd8feb506b552ce0b1d7bd849f598042e54803e29cabdddd492ac8901d + 0f5242dd293d3f509cf816b225d70bd0e531a0034f7847813cf1b271c58e09be + 676f009e3c6df1d1c1360f4b2660a8e815442ca6ee1b485b2d5fca2365c6e74f + ed6435a9a70a27d7793b7429369b9c26dc9528bd7dc9c5b2a38d14921b68c311 + 169a25a30fe28a0fc1da9b17a66fff461ab3c973084e4d9872d5756ecdf0f443 + a6ff6318233e4f477f7cf0ffc3b023cda5e6c45d6b95517d0d94fadfff849325 + 64180fbda2988a8f426b2aa7628d20011c02e26de454e433cede59211b5fb30c + db69d1fb77fd64e12a34ef59cacb672f3eedd0b97dcd0521f1b38f7dd9f3ff58 + e8b26f41256bcfb99c474490acb1e3c20bda613ba40d6f09885bfbf3f2b21c81 + 2197e7831acd3bce9551aa1c5fc47dc03d572728be981df75dcce57bf99c0094 + 83a0d0ea6fede6d5d990cba49e480c4e99f39f6eadcd219fa8d92b06ceecdde8 + db1a2977018c2d1cb4f5d991fa8866bfd7ef1cc4b0d14200bea2af0fc15c8064 + 0936d0a3f2fa3990a21a03aa7989a48ea2af4a081873ad26751ed05702f14bfc + 6fdd88578268691db50f2171279cbe2691ba9c9205576a0d7a798bf813a61336 + 135ce31e7ddbf42133a3830ef54e2d4c4ae878336f4e9c3ef8404cfa079c3f6b + ed43779e173b4a0d7ade2134e038744401b4725b1f4612158d5503b0b677ee22 + 76cece4c0ef08d929e91b9d8b837945c3719fd1f08ee62794e809bf01dce1963 + 53e38a9f64a748f4de22ef20a5f3f7f4cfc4fa0b91795a80785bc03929f2533b + db3f87a8b0c88cb193d2e94e3b6dc851805b08629c2dda39cee63bafe30dc9bb + 39f7dbab59c5c5cbd889dfea77ee7cb286798593c655d06aac4c2f4b6c747896 + 795c8468f3ab8be353c1b5610aaebc01f6020c9ae5c99f5802d7cfeb431ab81d + a3197373a1312f8e48d6fc5ace279f60e8b7ab01fd4f5016a412b0eaadbf71d3 + 36748944b53d0cf5954670373ca514e45fb9af8b5c3a57abcdacfaf1e6b2e815 + fc1bea5cededb31ed476948e55e7862fdb39e562270c89c7cecbaaeb11f99882 + 781919950068a8479c37d0bc75c3c3adf527c29b540a28c4ab5aa364dd8e3b8b + 6f38c10d542b492ac2fec2b6ecaf862124a0800fb85e91d4f6b2dd971715abad + c50656618dfc4d28138db81387ffb20bdb1fff03df7bc8ec7733056c8beadf6e + 7a47af8a8c3788b4a53642b53e108869772fe84f2f41f921b3bb236a6587aaa1 + 329c76328820769e706cbee9a6845d7a92fc69461dfd0a3f0c912b7d9efeb350 + 49e9986708e55886274ec592e841b30123e16893ee27cf4ad8f999ad741f0bb2 + 5feb9a7dc3debde493e116bf526ee71d3493331942411c94fbf2cf9a6fee1324 + 049c24c36d69c662c9708aba72c8c1534ea257c6e68316a5439b27ba45d8863c + 94e2c803f23355587264e02cabcb086f0e7c1601a3bc37b246c7ff68fa06305e + 52aaacbd9aeb7934a28199129fdd93577668130ba85e5d4273f61c0da0193778 + 043bb0e98be941751ab4722d8e58be3dc301ad121358d033e6fc0419e905990e + 046b4fd4b3ecd4b6e7d8202a14210a51aa1fa4f1d7e96f171636ac6035200009 + 23695758d05fbde7f9d8a9dc5f9b571f169f84433198e70320ecaa94cfb21819 + 8a6a812729a6a7dcbfaa746bffc794b3cba2ec784fe77a95304d38c132bdd7cb + 4bd527fbcc4bd41e609287c04c89bd592d77008d25bd61fd8b84b4bb49f97436 + 670994d30bd7a1db895bc9e8dadcab18c7a1b07a1e5eb467b09ff281eb0c9140 + 3a986746c9d99084513693cf5a701457b5e444fe2e8014c19191aff26edc6401 + 64d820447d81b3f4049c25b42088fac88db839ffd47a5d5943313f83b0faa9e8 + 001685da1615401c55fa3f7c4dae31c3fdd20db34e6265342c956056bc3f8152 + 9c54f2ff14692feb63efaad3353f1b58955337c6b7ad0b0d5d2663d2b19d4626 + 5d6685f4e268497a312b971868a53180ab7c4138baf7e7d05e77fbdcb2cbcb0e + 41a65c8012b901769f977be382857746f7f091e425cfbc7b28855cb443edee2f + 6d28cea17aecf142a5c2fb08bd11409f571663f546532e0fb706496be3677d2f + 60740f1d34fe35bf6c6b60bae06443686ad5bbdeaa7cf336dd876147d658f0dd + 364cc734a0071de3ef0e774bb40ddfe58043ab14808e91b3590ad1fdaf545c1e + d9e85ae76a2c37b5bdf8b0ed3a6d74465f5d5c0112252107610429a34328eefb + 4c856c6b5352df64a0f7d2d51de4e88b213b1c6a76b627585060c366155c169c + 3c8e489c60c455b730445b50f50cedbec4e832bbe321e4e8fcc14a09407241b0 + 5ac3e778f2c8a9faea18dc12c5bdc4f1b03de0e99232014dc7dcd21f302cd41e + ebc67ef50ccad3cc586aef1c7b7e54b69c9259c680f82a539a6293e48f4e8365 + c7a16736b720f750a9e87f5e37f9ca8e765547f57e47cb624e5b92c046165c6c + dd52b13fa3f122766446633ebbbde0591a37d61c71e7999f87439387eefc979d + 55bed1af348d4a2004036e3194287c3dd41f8a4697608e80272bbed1bc16f696 + f99750d9bf7ef57a4ea53fcb93fd19a5ac07c8bfca0b23de642cea865b7f91cf + 51d169670e340e3e69d717d9745bf22cf19d3fd5e6321407b0b8a08643d1f239 + 7e91633c17e3421f6b166f145ea3576e6e0c542c1dbabf6f3533a59af0a1533f + 87e68a6e84e8a3dab432bd43a3fd731f086e2e0461110bfa5439997bf29608e4 + e2b9e36c8432ce1098486df3604444c871b795389fc48e630fc4c26df54191c9 + cd0f7ff8b058878337670535ca62bbaacb1e99b7a039cf8a929ed205ce333e98 + 86a60ae12aad334955c331e6937068f220fa99c68ff5ecf1d6429ac9bd6781f8 + f007ef62e0332ea3897f91e5ea33a90c6af8573bb370f44b6a0424bf342e5dfa + 5e4b9e5ca6dce3a1fdfaf051799e4356b3dc636a70bdb857f22d281d40468c86 + 83f28d240fe5bb03ed7700e0a566bd3a8a3ea8cbcbf610e2ead0f41db1c26abd + 48149e668f9ff87fca390accb0a8f088e6b03b0ceae18fb424f3a53c6540403d + 0b5ca79272ba0f4ac40acd57b6839ceba1d99c1af62a5641329f59a565773943 + a452b940f828c812689cf9a3b8811947782bc692cd67ebe0ef1ad40d80dce883 + ce72d40ad9dd28be353c262f7d796542f0387c1dd098b842f3d7ce4414aeb5ae + 3da9161143035a47aaf83e92d28c4f045999b8868b52de29e3a53153e118c313 + 7bdd71febc283d9d2c2321e00d9c4ffc860c0f9fa7bedff54f11f441156e6aea + 63ea122d74736fed3cdacd158e8c00d33aad6794a55d1763abdf224196089343 + bec7ce6955c1f06c860e2ab466a9553d355e0964cb748dc139d7f8f2835247e0 + 4ccfa12cce22dedd9550648f0f71949c77d2e91f274146eb4e3f0d74ece6d2b7 + e6146ea028e30009e5ff23787f624444d6e1aa0f1ac9af3bcce4f2da5b69c867 + 483f194ddcde442f1d2c37ac1b2a33c741cf256a7cec97241a204654d5f1241a + 1d120e7cd73b63c33de04e5e2949c479c4fd2a688e8d6349d8d08ee910162935 + b5834a275d492f677075e203e9bf0b0cae71aed86436b4c947f74f5140808fd4 + afd9ae1f4b356c8d565dc08214c966eb247fec99203cc422c1fc3823983e8e63 + e3a593168383487dc47818a64f6b183807c00835a999d0e3659e41ad43f204c5 + fa2fc09373b9240501354afa751c54315c61bd3bb1c1096abf3a3e791a3ed64c + 9244ce53921cf814f5ee0d0501d93fc136e60e373e02188959c9811cd2899383 + dc4e6a8ff7723a178c01654797330eabf484ef218146718c25fc57ba23706abb + 04 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMR6 + %!PS-AdobeFont-1.1: CMR6 1.0 + %%CreationDate: 1991 Aug 20 16:39:02 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMR6) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch false def + end readonly def + /FontName /CMR6 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 49 /one put + dup 50 /two put + dup 51 /three put + dup 52 /four put + dup 53 /five put + dup 54 /six put + readonly def + /FontBBox{-20 -250 1193 750}readonly def + /UniqueXX 5000789 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacdd6500abda5ed9835f6a016cfc8f0 + 0b6c052ed76a87856b50f4d80dfaeb508c97f8281f3f88b17e4d3b90c0f65ec3 + 79791aacdc162a66cbbc5be2f53aad8de72dd113b55a022fbfee658cb95f5bb3 + 2ba0357b5e050fddf264a07470bef1c52119b6fbd5c77ebed964ac5a2bbec9d8 + b3e48ae5bb003a63d545774b922b9d5ff6b0066ece43645a131879b032137d6d + 823385fe55f3402d557fd3b4486858b2a4b5a0cc2e1bf4e2a4a0e748483c3bcf + 5de47cc5260a3a967cac70a7a35b88b54315191d0423b4065c7a432987938c6b + edad3b72ad63c2918b6e5a2017457e0d4ebc204b031f3fc6c13d7da7277a94ba + 018e9998b3dd888011a5d7c4204989f30f908b95533bda845746b673ab71ea57 + 65a0d14f4350707e47c8276305b28513cbe1bb0dbd269a53719bda46e536685d + df78ca0146b6b93e760256b74d939d4e35b5e77238f04c92298dfdd188feea30 + e053eefbcbb52f2011772b3aae39f5805597bbc1e8bb75a446ce014030f4f2f0 + f49f9e962ee4a1024a746fa92a3628db5270732b54e43fe5ecfa524f127e5fcc + 788e77e66098336ad67fe4cccaf0253272d5df79864bf4b734cb9a5859d557d8 + bc11b8e00221ebc12e97de4b1f466ead83a4c894709363bca9040410a52d592e + 34ee40cc7e5efa920546b981aa659513a24b1b85c221a1875b62d0b89e57a368 + 321b8043a5b094e0379760a443d632892b14ad6d19dacc8c78093243ad67e6a3 + 08e56e6b68412ee690b10dac6e17708754a00d51fc957b500eb80175716eef4b + 2ca1ef867614659bee3f2b7319e97b6fdf1efc847bf3cee3156f72f21751da8e + 5fb6898919e6799820d3de0642d756e09d6fae4ff08dd3deda3173bff4bb11f7 + 9109c97ddc05897af709ea199a90fcee8ce4c7a3c15b18170c41c04de2d3fba8 + f34296a95b8e1e8de3739b17273f8f2c85e914615e8eac5e8bd2387ba3b1edf4 + 7968f06e2067d836d0f9f3e085cdfd2de06a62c81d786b304326f7002e83160a + 36598589228b4dddddc43c85e1d126f8fe81b828028e26317af5894aaccf4f69 + 6301e1a9fc45935d8a414957f08febebbc3a72ada80f101e47447d019ade56e9 + f4fab969bba2b44e47399fedf5caa1bcea216d7ba713d523da5d7776ec0bb452 + fc23761a3e881b097d783e6608a001eae5a6b8bb69589902e05d9dbc92f27c27 + 2348ae1f0ca880d6428de6fc0eed6c08a0a7814bd38e9bd9ea8abac49d5455ad + f6eb7b914537823b7d84f63fceb9b4b655dc671dd1f5bbb2c0565fb9841d8f88 + c25332d81167dd2e49cbf91b8ff9aaec3caff6f74b9d057de435f022e7bce755 + 85dd57330b4a524700b0a0e39d0697795b55e7b1aa507019f565f02f1d67de5f + 353296ef3feb20647e28e6e2e380bfa1ee330fe17e58c44ae95716c6a2f09f4d + 646a81965cecb7620e62b0b72a5a432364cd0560da0db5a4af5b0e8b4905fcba + b791ddcd766688f158da449332daa27ef2ef2998b0946101bdd4a521433e0c2c + b3ee2aa43022952dd34509c8cb57975a5332ff89b4c150ea14529eb9e7323d34 + f9a1adbb512ad2b78172df0cfb85be7f73d31fe0ac0d6cf98d7e25192196f519 + b57e599040f7c29a34a661bfbe350cbb4c050d22e10acf5380b450d073164518 + a0bf97017d5ca7f23c8b245a90b0c5876e270cd583ce2ef6932c64b9ab57109c + 3c10d0ad9e58346513442514d9f7f9829bf36a5cd2a0a4c41fcc029b3abd86e2 + 342d2d4f5ad996a02b9d931b09d9b960650fc66dac32b561eddfe9f2852619bc + a885cd130b5cdf131a421a2ceecac3cf636e8a091850e5967052f80bdc72d5a4 + 40f35b29e65532db482f07d9ae5b7bf9d49064156f644072de2962c8b73b9d4a + 6814b98a16af84222ab2fb12f82b3e936036ee316f01a782734ba7285aea2ed0 + df5875cd0a781978aa6c55d34c2067529cee81accfb090c9e9ca4654cd6a9a29 + 3695138f98362a46be6c8a507fc5dea916d9c64a8cda8bf3b996e6faac2358e9 + 9fbb29ae326d6b3fd434957c41cb6e8b54eb000003103170093d2f927f266ce1 + f7fe2b5147028c4d41a36277f534b801aa1b28ca6aa004a692dcb5f22348c2fb + 2c25faef9ed78cad84ff3d52b3c83d2b56c4a0c2702eb526a2006b52fde7b619 + e1627a170be9eb71f2559520707ccd737002471ee8a5089040d0731a667dcabb + bb30a6e5595695aad80742dac5ceb37924132116791565d50d86b692ce777412 + 21b45baebd359adda98c084a0102d6d52f9f774c5798b0bea1ad3ae86111126a + 50da58673572778d3bec5fc0161341ad43f221713fcf5d783cc2855d7d17b376 + ee7b97b5452c7cc87c2be2fe187420969facd599b10de1578b0bad79cda626fe + 45851f43b5785ba8989cd8290791a8f40931ad8353ac077bd58cc2a99bc95f32 + fbe74ad2e8c2dad4db14612aed39c9c9fdf558eb80e6a92ee5d2fa5ff8ae4a21 + 2d3cb19ef141679106b28f30dffd06d9e3a8a592f67a0407eccea6921c55d0bf + 961036adb22fbdce5a84feb3dcf64c4408087516edda733b4240e607e26607e1 + ce8b691b28d2c1741caf5d252c97831594479ac0ae2d2261d21a0f45266a9862 + d4ce67aac80573d4132a6cf7472bd3fa17f2c3deef3c7f23e7b5bfd640d4cdea + 79331fe5cfad5822352b68c29d18088367d063837b4a6c78ef1e4c3dc3795a4e + 3b2cfa5cd67c94aa65c210572001b9fef4a37bd2e557c0353e24857fc5bfb7ab + 49e709218905235efa101cde008f98f6cf896186e780ac8877bd4b0935a6 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMR8 + %!PS-AdobeFont-1.1: CMR8 1.0 + %%CreationDate: 1991 Aug 20 16:39:40 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMR8) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch false def + end readonly def + /FontName /CMR8 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 49 /one put + dup 50 /two put + dup 51 /three put + dup 52 /four put + dup 53 /five put + dup 54 /six put + readonly def + /FontBBox{-36 -250 1070 750}readonly def + /UniqueXX 5000791 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacdd6500abda5ed9835f6a016cfc8f0 + 0b6c052ed76a87856b50f4d80dfaeb508c97f8281f3f88b17e4d3b90c0f65ec3 + 79791aacdc162a66cbbc5be2f53aad8de72dd113b55a022fbfee658cb95f5bb3 + 2ba0357b5e050fddf264a07470bef1c52119b6fbd5c77ebed964ac5a2bbec9d8 + b3e48ae5bb003a63d545774b922b9d5ff6b0066ece43645a131879b032137d6d + 823385fe55f3402d557fd3b4486858b2a4b5a0cc2e1bf4e2a4a0e748483c3bcf + 5de47cc5260a3a967cac70a7a35b88b54315191d0423b4065c7a432987938c6b + edad3b72ad63c2918b6e5a2017457e0d4ebc204b094541f345ec367ae85ca9bd + 24568a01d3b9f8095f7420e6c423c414b3dcce6da48dd1c89a56d078e0d0e2f2 + 62a13640a06d17e44ee3866c3471fb58fedf5a3b77294517651c16bdd7267d39 + a54e7171752dbde63ac19bb4b3021ce95eb5fe67390b09ae4d9ed4d704a67443 + f55dce17acd996c1f5e023c9e5a18cbeecc3097f23763acb86cdd7cd13381ae7 + 4e48495ec7fa520539d87f8a8dcb3c826275469b6800876a457e7d1e5be867c7 + b1ccad69742a8c9b0ad943482bf2a4ad0aed40baeb69a0233bad36b4ca2d2da7 + 322956c70375d152653500b2f22d2ab6990cadde2da14b4917f7515e64bc3d96 + bf775258fc7dae4e42a4c9b6da8eddec4a800c8aadc8d75e48cae52137e05c03 + 677f5d6a82fa46d9f2fc7f56d62e5c605a1b7898b8d1401c2cac1a0122a2c8a7 + aae09607f2c5f29293a09b9959399283be89051452898238b777db9830ff4318 + a298b221c4a820c700ca964fc99e6b1d9eb0bafc39be9aa9dffa2fa326b2a466 + 1e67261bb3dbc85844e76f9313ab533ee16bcb478166de5502b68e6ec1ea6110 + f53206cf1cfea419571b0243244b32ea38b828a01e62b03bcf476a32c2341cec + b8a0fa2a3f3f339315d5f3aa7704408f6617d026ffee4925aa48537a4b2e556d + 225be09392546ad561cd46cf766f0ba14c6854c5af1a528c3842b0c5aeefefcf + 19f19cbce5d967153c4f88e51c776cfbe10d39328466f7a3b83d85601ef4d1ce + 0cc136610fa6a74d9676e4e99291d565cad27b9eb2337b0eba4148efd0eb2866 + ebf0a4209ba135ad1376cf9cc2d4110f36121055caa3f2e382967145d2ca0070 + ff81d04bae74a4871f8f1948e413f3f0d614fa43ce6eced541e039fcfd95efd4 + ed3c497e7a025dbac8a51b8c648d49bc5c24290a18aef337d9ebf689e5d71f4c + c7031ee3009f11bc604cbde630e5df852dda365adb3b4696013454a6978aca09 + 68e60dc444167f8fd5705261210d450cdde7d235c272bb60d2b87d736072393b + 8f233bd4569a095f4cfd2b684bea5a51aece21a7a5f0abf21adb144d5d4eed80 + b38af01b8a078d63f9b4c6701ab60e43e2a9692a990574017bf142ed7b5b586e + 3db0019b5a07ccab33f8929681f6f3bafabc5cb646ece83496f6d49f86b0c928 + dd58feec85e8b324d1d4cf35e64b3c593e2e4c263ed380d1541d9e91593c7347 + d0fcb96afd96eb5b3bedffae0eb5ec31ca5263c7ea242f2580d00abaaa752368 + bdcc0102d61a76b6e12b1309d36c9b2f1c0b1b3f37c98a0f20d95bdb656662a6 + a900a01d076ef81109c1dcd185919f9beb03c0f89d5607a39f51e9acd2e71752 + 223d3d544f720aba4c20ff568d11e416877e44d1ef91de790b1ff24e668ee632 + dfa4b651b62728b5ac8d063573f2521685fb83b612f7d27b36d2323bbf8c5ef6 + c150cc4b3c60b6d7df09eb78888039ff415a26bb8946b584d382ffee727f3f38 + 33b190f70ae2f01ee4466151e0c0499c42a59c0c233dfeefe71d1e0269b81d3e + e61292016b21e9e5ae78f5040e3f39b1e8d1c75ee1513518ed5ba929fb128523 + 7062f5e35c983a4151b0af3f3f14404657300651bc0b8f45f44e14bb76b212d6 + 289c635027042cd1785547fb1c158c8ac6b7a0d3dd53c7139abcd2b833f1dacb + e914a4a76c15c9866c1bef549c94a658fd662acfc2f206a545d9fd78b24e3d32 + fa173b77c8a89de601965bc890ddbba3132530fa827cc61e3bbd7beff534364c + 9e4acf55be37138031ea963c2a66322bbf0508aae761e818a28786377abe188a + 992d1541ca7349e5ba32531d25e2629f1f9a99e6ffadc9cce7eccedae14f251e + abcfd2b740bd544b4b5dd004778f326bba9c05677e51880cd3ce198a4565eb78 + e2ed1cd4f445de118a3412ec34c444142368cd2d4f5198276f34c8360a54b81c + 31a3f357e00aa93b2c25e1915c44ce2801f83b3a61099b510c1b404056481eb1 + fb75d2412a38615cde49ef95cb996a3552766f8887a1f0ff5cb746b9d97540f8 + f202c5a976e4118e301648d82ba52f6e64d3ff1f2b0d64269f6ef422fa2d6b38 + 36ed842113a1db7fc31011f2bd0c6b4bfc99bc5a0b0b37574898a6273278dea3 + 5fe3e27cf5ac2f7b39682082bf00287ec4e44ed1579d26fa8889ed981af825f8 + 0412616c9d058a96d1aa6988da4eda73bfe646b9720c6d1489899330c16632f0 + e9799fd011ff85e19f6c365a1f1c392263dcbd92623928dabde8000b6a6322b2 + d0e277127de16cfd978777237fb52704625ee5990cdbfd3c8593254a19125c9c + ae2abb22d1c32f67d1f7d23ddeb5feb452359f0b6946b412c7bec2effe2036f8 + 9f053439cabe56df1fc8ece56370db6136bfa16770d0f410b277f54e35d25923 + a3982c01a821d33a6fe349d91a4c7daa65ddeb628a7180057a13b6cf8bdb3512 + 861a8039d2c6ef43950a7b23acb0c8da7c + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMBX12 + %!PS-AdobeFont-1.1: CMBX12 1.0 + %%CreationDate: 1991 Aug 20 16:34:54 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMBX12) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Bold) readonly def + /ItalicAngle 0 def + /isFixedPitch false def + end readonly def + /FontName /CMBX12 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 12 /fi put + dup 15 /ffl put + dup 38 /ampersand put + dup 40 /parenleft put + dup 41 /parenright put + dup 44 /comma put + dup 45 /hyphen put + dup 46 /period put + dup 49 /one put + dup 50 /two put + dup 51 /three put + dup 52 /four put + dup 53 /five put + dup 54 /six put + dup 58 /colon put + dup 65 /A put + dup 66 /B put + dup 67 /C put + dup 68 /D put + dup 69 /E put + dup 70 /F put + dup 71 /G put + dup 72 /H put + dup 73 /I put + dup 76 /L put + dup 77 /M put + dup 79 /O put + dup 80 /P put + dup 82 /R put + dup 83 /S put + dup 84 /T put + dup 85 /U put + dup 86 /V put + dup 87 /W put + dup 97 /a put + dup 98 /b put + dup 99 /c put + dup 100 /d put + dup 101 /e put + dup 102 /f put + dup 103 /g put + dup 104 /h put + dup 105 /i put + dup 107 /k put + dup 108 /l put + dup 109 /m put + dup 110 /n put + dup 111 /o put + dup 112 /p put + dup 114 /r put + dup 115 /s put + dup 116 /t put + dup 117 /u put + dup 118 /v put + dup 119 /w put + dup 120 /x put + dup 121 /y put + dup 122 /z put + readonly def + /FontBBox{-53 -251 1139 750}readonly def + /UniqueXX 5000769 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacdd6500abda5ed9835f6a016cfc8f0 + 0b6c052ed76a87856b50f4d80dfaeb508c97f8281f3f88b17e4d3b90c0f65ec3 + 79791aacdc162a66cbbc5be2f53aad8de72dd113b55a022fbfee658cb95f5bb3 + 2ba0357b5e050fddf264a07470bef1c52119b6fbd5c77ebed964ac5a2bbec9d8 + b3e48ae5bb003a63d545774b922b9d5ff6b0066ece43645a131879b032137d6d + 823385fe55f3402d557fd3b4486be79011d1f5bfae5c1f476ee6f05eb1d2caeb + 269958b194521197b312fcced4867f3c8fbd030bd715d8ffda1dcd454b174e7a + 1a97b59fe770e67702519d9d9b23d61ac08424d555242a8ca08c49aef300945d + 99b999a79ce74804ae6bfde623f4463371442f6523a5f6ce19c839a708c02513 + 2e22c696c8ccade45680e5197189d0f98e7f0d5f955e353970b392cf530a68cc + 56b0035ddfbf206c3074beeb0739dcbca272a6e629fb7aea2c5ba7bae50c7b4c + a595df78200c352997ec3ee564df229fbb5473f5e8ccb1cc0153e9a7e299a8ea + a29b69d1b622b1f0cffc58291248759607d91150cb0651120970dc9f743bebef + 44f6ae92facec57658999c8bf01f60611560043962c0695e1bb87d090e0fdaab + 659d6557208a660be9aeef8ae55f71b8bc76394d792967e41bd8023b6e7f8c3d + 9987d5e54c53bf2bbb32855b946473b44833bd78873df8e4c7e668ffff25aabb + 8da4148f744b9d0524d6cb8281247b3052cc5d66f3f1bcf8a56a3fb446ea587b + d8be30257652cee035628aeddfd8283b5ad21b8b1480ad24d898970ac8a1e33e + 543ce4e3c48f9ee621c5ce3e8ae930f890011b630866c988606068d9e92396eb + f51bb3db204505fc3d09d4701ac703a14d92bbfe27bd7411b363a88e33a8e9a8 + 025ac31f21e73dc52b333b918d0b1270c54873a490222d041a66e0192612be6d + 2c88958a8f70c10390146ee5091df020ab97675e8e6acf98b28b539cd0a20d24 + a42f535ae44b8f5e9290b38fc6b02e1bbbdf1aca96558c2dd5afbec53f03ab51 + fbce958ed4a65b17fbc03f9defd4aea4a15229f3c320876235f2d8b69bda5f48 + 03a2798790d35b394c63295997dd487bc603cdd10d18f3e3fcc7f17d2a6afc77 + f1d7f6cf69d2a86b104b9d3b260e4a78716927a485ad8a650d610e68378f4514 + 3610b087981f0a0655090163dd2dd4d0030faf6a953896a9cb2cd033ec988b6f + cd7eb31108291a22bbc656f4d968df891e07b3ad0b3b294d2f5d538ca5be14bc + 749699fd04d339f68beef22e5b53e375cd3cd31016424177df66491e4d3a3c01 + 968da13a509fa5ec4532861e8b0bc27ae0326a7cb77569af46ac3dbb0692154b + 0241608369a0eb0d778aec47c23e9b64da0345b03a54271515e2297ae78981b6 + 8980941772db16a168ed50217c4b97955f4e141459fc145481b3c363991e2721 + c2cd62d1e9638b7dfeac1f01a0c4d2822a2f0f31abc02e16a5474088be0ca890 + 2aa9b79928bf2af32265a1ff459d87de94d0c299c0e279c0418099b4c4331c55 + 1398ff8da82d570bea169fb8211c75ecabb2c5a63229f7ecfdb269b8f4caede0 + 4ac2e23fd0b829d97537a8ea3d32d7734e5f0ba2f306b6fb68d731a3542b3c00 + 3e15ccc7033ee7d10118219886f498d0c0be23a04cfe969c370d713147cf3c76 + 3d187283b0f0862b385a060b0829f6d21e67ff1f063926d1fa2b58e282a7c302 + 854c7a47c17ca544448082fe4e24268f1c523640185ec3128cb96ca807e9270e + 1b2905f31b48b7a28d20a9b952aa54d095dc852c614b41f89fb4f51d531e5d6d + 02eb80a300bc5e72261465154e37ad74946e7b3436874b5aea4e7992c14d2268 + 87a2850dd8b8a8de7ee5fd03ff8381122c7620c48c9d83e7dc0033807b02fab5 + 91274f7be07430f1578d380c9f27baddba85d64b50a2f2cfbc903a1c03e00b5d + e486661a343660e7f6790c1b89765a79cdd1db5d4343e3ec137d934a01becf0b + 600aa6d813fc59ec94d4b608cf9b5399b4934d63f5a22333a1d0c05aac16ebd1 + 1b65ed19ebe35e1e75ee63eb71a10e76a84ca1e7fe2ffb774628a0931639f57e + 8a59ef78083498ec5ea74ed854bad6820659297d69a4a390048fa22862a49a23 + 3e4376a82e2ffb50c777c13bf90bd374a278061ade4732e4317d23729286247b + aef37d2c991c907934c0984a1598d855b7b53228b82202fa9d16b0182186baac + bb7634c4c57f66bfe167e397cadb4cc33469a2665eff21c406983a8282720c50 + 82dc7f9fe8a52d107ece08914403a7aa48562a1491ce4a7162fa61027410966f + 2c7ad0b1e9f1bec66a976870d37d79ef8d1ca7507efa9d05c752865d5630ed5a + a3ed8eaf2bb80172be723aef9ccd8cb60b3215faffeb4e0fd555eae0cefa4879 + 06995f12174a6d85976da90263a98b301b3c2afac7aaf87ea7b7ca3e95578118 + 9cd26881252ba5ac7357438a4e026e05b722b2410ad0fcceb6750b7f3f8abf07 + 67c7da419f7094c28dc5bf8af5735fe2078d2abd4378bef5244af8d4268c08a5 + fdabb840eaa367961dc904b4895231c4283b30842bd3b2ec2b43ddd0dd91a2b5 + a968c64df6bd546f5b8e230eb46489d9147c09bca362183a63264bde0eccf8ed + aedbae0c887029e2d10151136917961af1420e775f67fe0fec3a42c7f261df68 + c3de44e699eb35589aa6b1c0d89d3f7bec687c50d48100306a400936a2863b32 + 3f15140554e127584e06036c48c4289406aa4079b8ab1f891ed182b3805c7acd + 7764b7c6288910492eef672f294a4483f29fa1d6e12bfe6777600b3e3fb22b1b + 43276d34ed67c41b0eaa2e74d8f0421d804417c88b3fd6314234b8851ccb4539 + 1b764dc2f568918c2a2d127be81f9e65c65327a379bcf7580832f5d50e2d76e9 + 4e21914b7c59b1bc0415e328e69610dbd5f83ef453034bb5372e109b35614fea + 27190a19f7b44428f470c83b8b367f55cdb173bf6184fdd0157840033031066e + dff9dd0e16bfefcbbf9ad34b1abcda8c06c502e304c62842e69a243fe9204903 + 306bc3677d54f13d851ee1303f8c8acaa316c11c459409f388578a17bdf4e5cc + cee7c2fde77ac345787b3ce317c49aeee1b30ea3803971d37089022d91193509 + e89e3d036b416b2b1a61b08f78dde7970bbcfa995c6a810cabed0ab4599ee7a5 + 6b9bc1986623bfc9bb932a539c6aefde12687365c5f117c91309ace664cc6b45 + 75e7d00ebfc06532b3f6e59809964cb7cd665d7c94650e5a1f9f4a7472cba0c8 + ba802cc2bddaaddc693ba5d74f8f6b34f2e077941256d24a56a97ec8239a37b6 + 8c58b64912fedc76f51c6b49492d6aa2da82c749dbaa7eae989b2bcab0100f32 + 4b326ae3896151d7212eeb9609d03a80223cc359fe9b56e2bc842f2bc24fdcc1 + 74c01f05a9dffdb0c39e099523b1027620e0f19093853df8a286d86e65e55242 + 597be099382a746a5297c1222fa1bd29e74cf8d401c8ae39dc8ca07530879bd8 + e4dbc4159438c37247838d0aa4164103f122f1ee675a757bb60e3522763ca27b + d7f1e3f4a8b872514491c3c19bcc090e09da71e1c69d8d02dff0e63f0a62a928 + e46ea2e8fa51be43a17145d3d137c3afbcef00d3c2baaa81aca513900262df62 + a895b876ca45ca8e55424fd8b814e7a69e8564a94fb455a3a92c58700d126dc2 + db9cc2551ae24296a6da727b9dff1564ec515ab35f333017b1a5579bb78566d9 + 1629e9ae7b60eb36f0bfd3960fd10b24c8bfe2b1daaf9f7de5ffdd1c6b765d8b + 2d4ce987b1b3ae3b4b45366b8746b7356973aa1445ed086c12588aa805b227ee + 7ca81ad1307d200f723fb3fce4b803f9bae54493342e3edf53b607c670c08dcc + b1bc3fb1e49218c6df81ba6f67afdfed30a25e4fe6507d5f5443a9ad982172e6 + f4de114593baf47ccdac2a36d2c14aae0cf85379eff68d8d2e910d4090b8821f + 9df3c0409c37cbb5f4af78685df67cd903bce500be6c40e3b578b705e854bc10 + 9da32a83583c8e3e0ce42f056d1fc80a217dd0a27ca824798f776c7640e5e405 + a59369e25029d69cf806006e3c672ddee522af15fba2f14e04bee4fda95788a2 + 8e255504db10781f6034575a9dd2575b90ed1789e4c0b2293ca9eee67b246bb0 + c8655e09aa78291ccbdb0082d4146170c14651b12f2a57ab32c07cfc923cf32b + 04c383719741a68d78024ea885ab9ad25a2b11ce82d8f816184f02b7e018a53e + 01552270e7dc3d9018fe02e9fd7c57d1529019dfba16d76f676669f5776a46f3 + 29417acf08fa4fdcf006452d05309f70a94c458f805f2c9b5099a4063c184545 + fc1c37c5c6079cf83086172244444a9c88f0af640a516d0b98fd9e100290541e + 02a36a903376ded6d99997edf1cdb9ae79a1aeaa2eefb87467a4f89e2f5cded9 + 4bd7f29f2dea72ea528895d4b72cf13ef0b15fbea73790017f221f63a43eb78d + fa1344a2a61fcca76b577f1ab50fd16b937351328005534c5d25c30bab66827b + daf7aef9b75fecb5431c2e567ef55466f704c226587748eb04ad53212b60e000 + c2c6cea172f093d2f4e85a8f7649821671db40a597e79468a51997bb02c47c1c + b66f971d5096ea553eab10b0a6825d418e2b8ad57efc223327c20cfd4cf86358 + 50026eba68258c9a819ba613519e06181b768159add4e4d19e01b908298a7718 + 356f2f45bebea24ffedd358201fc90a118f2722a117dd210cbb754345b13a711 + 3ba1232ddba12097d561aed0535ffb321cbf921218de52329e718e882bfbee08 + 8cd64321536a9c91093700899e160557da3469a3d675a363817fda9c4bff7db9 + a5fb6085e44cee6898061bf3cc30e127398487bc28362ce5a47471249b370b3e + 6475cb5d38901e7c8dedb478d816a81ce453a7ca99757b4d5108508a7f708265 + 58974bd5e49ada421183dc37cb3eddea302f4e871e50c42d2c772d5c152913ab + ed86cfa2dd3c6d29f79e44d94f1c28260a50f82c9c012022735c073120fadb9b + cd11778e7393c2551d771b00e1d4b30d7f587bb0675dc6ebc5238dcbf615eb10 + 74bc4384cc7443ad9f47a167507bdbbba89b4dd89f611c88915c066d1db4e38d + 409238c1bef91cdd527dab270e998f02ff05414f683248261769fe7c2844d0df + c5ddf391816d4e72f2c7621bf13343e91de3645ccd5046a49ecdaf3961fa15a6 + b31125f3812744f4614a27d849f54739f38c3126c5132f70c1826cbc5b726d8b + da8f8bcddfe81ac22332b376e9adf614da3f1f6fa0c8f48eaac4add501c0dbe9 + 0cd47b2518093cc1a57b0f6df6d4275121f0fea86c44f0af340e5f23e37e6ec3 + 2352fe5c3dd2c1b03e073e2993033d4faefec688bb32500200ae96033b1875d7 + 1cc944924b76046da50610a6f369d137d005b54452a247dabdc3d2d1dfd9709a + fe313756b36a82f21ff1786bb15c5c181f91c11bec8a7e14ab625dcdd3058650 + 8f304b0a4dc6b62160ab8d261840e95cb0d8f50e66e9e4cacd4206c487ee551f + 8813b8584aef8f035a48a02bc1958545c4c5726bf8feef3b291f3d6de6372104 + a42f94c3a84c8bb264c06c4d3ed52465accb4e1ceead79507e5639ba04c102bc + 84236bc808d9089386ca42aad7780588117685823424d2620ee572800bf4ba32 + d8dddbc15cb078c8b179c08f2fd66bdb65f9b195e6dc93f0decc07110f18819e + b98101401758c3f890295d8ec9789dff37232b07036e4400149a8a85e512d4d9 + a4f06364e692e7992337ee82eb04ed63c4463bddbe948cf8526f995595012585 + 3c8cab9bd4f2d3c79f70b5d69b84d3e3d4eb580737a49cdc269a2ab0aef75b81 + 3edcf1b9e9e5cc617f6370babfca7ba9cae25b0884c4488ea81d9528f58c7406 + c9b27aa018dde37aa3a685ed4699f75396da92812b6d3319aa9ec5e549ec958e + 9355ad01905e1a51b72731730e00acc686bf540702178478425ddaa267e4232a + 9b239941c9c492d9b44dc85f85ba9123f1ba390daeb7fdd9a5f289fa9b424471 + b57c02d2006add4b55920319e4317b8d456aec44875c8efe4ced20eaa2f5a2a9 + b840eefc2b454f788b79959b0b62c632b507efbc6c7b48da10d6b6c97f0d76d8 + a34a422c4ec7285572c6ce91eb3633e426f38d91c7e7a67e3c87c542256b0b6a + 7850a10a7d5acf8bcee23e53f00e8fb91d22a86d23c722a0c888a1bfc794d1e4 + 9272799faf56cc8f2937dffefa87ae15fafde329c8146ed40e8e07da9ca79b42 + 838f1ff211d59656e75a23f3bd5124fce372fe697b9117bc67fd64fd96f5b2f0 + 334df513e6359c652593bbb9d9f41e69ed220b253508e7d58a9cde1f5835c067 + 824276ba0ba4c3be7e12fe010080c46924b2724cc3ceedbbdf405f53b5a7cc12 + a59ea5da7b79c284964a97ef0aaadae185fdf9e01f4f18e2254f440df5477801 + 13da747b6fa9995419fb8edad9a850e9850c06a9e3cfb91db2f310315cb92fa8 + 06182f999cb46d572946604a2656aa86951a796e7ef787adf15eaf1133de81bb + 3797a7e3d7d474a3134a5439f665bcef4bb993a610372c5205dddbc420123e2b + 2fbd7f55597994ca93dea5969b7db696b8f7c42a259828fa52e66398d1abac07 + d6a0231209e1a2246d3b9fed41edeb554a5ed9089a1ca6f3a387f1eecc47e2e8 + 68b92d1506da44b57204745dd28b29b96ff8d551c3796db505f953f8455b5043 + 44d6df7fa9cbfc769ba331a7779de36a76bbfd6073c603655a3ac31856b46d37 + b3a2a430ff70f775265a4dc17ede4535b46b853918266f904068add144bed640 + 424a3101e6a1e5a492efe8e835e687f27af1f1408f16e98f7d5232dbe2e434ef + b5f51057abd8cb5ec38c5e0b438960c6a9e9b4b0c1c558c6ce5478432b6bb2b0 + 90c76f992177eed752fcab9b70cf04f79e96e00a8da645a322e6dd8582e9a76b + c900a8929bea143d8dda6fae42030e472e2e336beb74dcd9390e42f2e31995fb + 7ae7503e60e2eb77c2c73dece23afefdbaab45362814951b44b8c56f581cafbf + c9b93e61a31de02f5d45abc579dc74efc6d01547f0dbbf015361de6764d140c3 + afdf94e5137f1276b86ae3123a8a20d81cddda08d0935f6d61a397fc3be12210 + ac271fa43cab7e69705bb0355ffaba72d5007f7dab7e8d75e28e3ead9a57cef6 + d9177ec2516e28e3d8123582c9fecd6604db93ad18f105f0312a90bf0e6545e8 + 623df11fede10b6672616ba46cfc6409fe254f7ca69adfdf9739f5211a046a21 + b22202ed60bad3c61cf27cf308eec67098fcb240e6746d0ac6ac88c4fc99e912 + 702375ec6313463287b6f9dc91020c56ca46185e9d008673734a5348e0a08aac + d6363623687502e67e8a95dcc8e4b56681cbdeaf2c14eca98cfd9eb8f08257d9 + e98f3fd4ca848c8e726906d46271b8c3727c5338e4656f04f55474197f9c6821 + aced753404b784a7cc5b0bcc13491c586126515c63e8359975d14fc3edbd0ca3 + 19913d01f9f9f65dcd067bf62c216a8506b55ff2504f2dcb54f168203c13a8c0 + e2cb29f49103c1ad7c2c59ab1f2ce6225c3ca656b80808e10e259931a570004b + 6d2b6fc0954adf1e4daa106dbe0857774c0303ed6e24713319bb85f8d33bd618 + 0291dd8cb4540da97f5d8528e1801961c117f8cd5e7dadadebefcdec2a383c40 + afa778c99b2d84136cc06eba5f69fdf747697c31a2e8d1230a1be6911f951611 + f4e37058c1d3e593f20694f42ff7554acdae237a7ebd740d39ed07e21b30bd5b + 743a952634e09db3421209e1c71d79f1a213af0da00a8cbaea8f814d49b38411 + 09146156a6224dc71d3c940dcfaaa704cd450b97d1df8a03cd465665793c705f + 65707ef8604394b3df782e6a4e048ba50bf97876da46ce3618cf7b88e36b867e + 33545a9d4198fb577cbbcacbe62118a078af9732555c74da2eb674c1c6e8a58d + 1228f1d8e18461a1c96f73f50be69c32372e25ba8b0015824dfdac31cfc79eea + 4494b5b8331fc10eaaf588ba1a31b410eef98bc298b5d18650161d0ebac0e16a + c977c9dece576aa7f6956988e79c8278c44d62fa7772cdfe2a027a7e982109c6 + bf407619111a094294a0de49a8e4b865830de5fee46ccb0e7180e2a751cb6517 + 4ccfa1fc9ff4a677aa2b6afd3326dbfeda41f119908d98e52e6388b6e4e7acf2 + 21dbcfe1680c610d74febe94149262e35ae418e8a804f5bd0e978d348aa1f047 + 37f4de5a02d74fc3f5958146987d0df7f68520fade6e8be14bb0d7be64ce7da5 + 00c877a73b7a01422f8f38824c63d505fbad8308359b4d27ea1afa6903e3e5c6 + 1274cd213b454a6127045cd7abbdf70a97b1eef7f8b89bb81c6be4801173f487 + de3d6e02982f615e7c63da5438bf24faeb47fd3d6cd7b44db7232d757a700efa + e5b7d0ed6622bb02d6cf6a8bcb7bd6c44811e937cbdcdfa6bb2815e2c07274b6 + 9b06087150ac74477a536b708d2d7f6977580dac1186f776a21f7683e87e79fb + f7b881a590eb9b53e3f71397ef969c2fd9c0a6ea794de64f5a9bb3d1cdea65d4 + 169e00a43bed350a079cb6dc89dfa79c09b0a4add7575f1e290388126a5414b7 + 8fef08474bfa840bde465ed15d1a1df64198574052711f22fd5d09cc0e29bc5e + 82e1e024163e93f026a162f225db997fc1c8fccfd942af25f2b2bf1d336de3a8 + ce6332c261f9a2bdba431318ed9153dda94cff04471682f5e68d68f15d188005 + 6295458ac38d14a220185cb8740e5b87a2e5a617ad49ea3554c4c434a6e9f4cb + f89a1ba20910d55089f30ed95336234adfc707b6e26f6bb2580fe9f14dd685c5 + 78cacb86e1332bebc07bdf2797ea5030d0d1ec6dc610cbf924dde9d885c41cff + 2cdffa8665200fa96f21a1ab118d4e336def0bcfd0639c80cf60e0733682641e + bae01a89cec64ed77d42fdb9f9a5af472214bc4494f999b4f36a49941efd65dc + e1f349eb5a62a156235b955ff61844ea17c5f53f5049d6a1fb35ab7909c94b80 + 7a42776f3b956c7a916171cdb0ae61c0ef101b4893d8a54517313226e6b98b4d + e33d95c128add0253c1abca3c06167473b7a7dc4923068f2f6efbdf083521374 + 9840294e54f1d9f1fc41d7b03232e4a26867396a6ed437fbf80bca41c016f9bb + 6e23cba4a9a2fb2055188d0e1e29f4663bf5baba45afaf83c3349c1aa8585620 + 4d0a9640fdf87c823f3ad9f9c82393237379222080aff5857747814fca8a2de0 + 8f468a4b587b9528599aba188f43d653ed5a8b836e0aab1bfe11aee0bfd72333 + 179c0180cd6a36d50d530c6efc79acf4d71c51e5c2f064e371a8191741e4c797 + 6cdf632a187e8e07d668b5ec6b4c3cac3e4462fb3bd14f7967d163ab4b384879 + 81279d1ac161793dd4f051620a54276181718015091ba6a9cf6e63d23777b0db + 60dfe5d39814a61b6c0f239356b074b0afbecd055828c35bcfe8a8eb82ee0b09 + 21b48831473aac2c763388607f3410efac9aa174caa7bc78fed745eeb4f5ce4a + da92fcbc788ae44e91ee1d89bf38f53fd125eb8c8a12295f9a72b85b8b853f3e + 38b8bc9ee56e4f042fe3fb989b3bfe279606fc56cdd470bd0d7a00ec8c6b6169 + 6dc6d4a9a94b2e0278f1aea3b2671c550d00e4a0a29e18641e3e29949b78b813 + 784063c6b77a305969cef797ae3642ed19aea9d0c92b0f84f2e3936b0e7a1655 + 61dfb082b98e3caae52be39729d641ffc54660a96159f3006d121b179f6a6f36 + c97ec1b9686e39b6dddfd89a038abf7d64024625ac621cedbf302549c49969ee + 1e6873660d88836375fe45022ac4dfe302e178eb02de593bb88aecf7d3a621e6 + 622035c2819023ccb7aede4a03d866584e677be915b062d8ca2df0a42f42fdf5 + e1d31c2e3d18a52794d100f1688fbffb8bbd3ae0a8024fed227469bb123f8a16 + e6758a2b328ee29bb8deb4f6173898dca2c41c831d6927e596c4acfbd36ef24e + ca5941d593d813dde2d1cfdb69eec5a52d7793de8255413e86fb9b19189f447b + fc107c4fe6e8150755a3e864289a48642de7cdee2f08311a738eb0d8c1276490 + ad77369e3c541affb1191216fc3e7f7fe96ceb3d7d0d74b58b7f94ee41ba36ca + 8c7e4046f1b86fc77e03f8cd15b84c24d7ee1376972a388c3e5d71bdb1e9410e + 46564d12d01398b4d6f20990e96ba9b47c426c693d536bceef5a91bd309f31ae + 4fdb79bc8d310e91755e1ff9c14117e8548f9dbc23adc77ac113b8ae2da3ee28 + 9bfcd419cbe6e9c782cf98058734a68558a4d1fca2459419d7a89df37ee5d9ec + 40fb8197a1c18542a14359bbdcfe8ec786e08758cafb24b3864e18c98d9f1147 + 7598fb7e52d562d5312f6bc8677c55e07754544aa044b2dfa59482656bb18ea6 + 260a2a6940d0a2f476c3478071770f835fd25359cec811b2d9fc9c5348aff1d8 + c69299432bd3d0956efdddfe65a29885723151ec868655f9990dd40754efe71a + 44384ee6bd848eb00027161bfd872ad58f723ceba2271cf71c2006b1d730e2e3 + 1459fcc8bf511dd3639a967460148f7c96fb73ba389e9aff7daee7732ec02ffc + c5995ee82dca69cb484d693802632268d10dcb1eee3fae4207bd002826b314a5 + ca9ff598a57849a73fec452da60d96382bc3a50fb0e7b737749d34e6b7dff001 + fe83c2a0bea1eef8bd147e0f8744f92b60960c4a720896dafb32ca5f0da5522f + b082982a38bf2920bb5317aa9da22d2373de595041e2b843127839c425169d44 + 10e7c5d81e49e9bdaa092c8ab5bddf88281a9932f54073023f35b01cedabfee7 + 39b84da59f8c4dd109ecab78e4a5cd6ccb98f4275643b0b2f9eb3e012a2db1c9 + 9c53f7715afbbf0e1f4d6bb6ff025c167bdbfd8d74cf9da2247187e4b6a21f99 + fa7e47caa7fc278c20a376c51745ef7884878440bd43806b0b22723007bc29a5 + da78781fa9386e6e3e482be12342be59fb6e6826d18fa107ca714e8bdd711aba + b8d6b54dab7a4a7a71998d560d640aad2e0e007c61871c92e3846f9d1014a961 + a206f7a631b0a3ff7fb558e517e872fe6a54bc78cfb1fb65de8ba7bd42eea37a + a2898b0bf674fa898cd3639e677182b33ab53c88689d714e6803415af2f0f433 + 63876873ac98d8e76e4850aaed6c09eb1a24009af53c9e5874c0602d6dd17433 + 472b2a532a88a7bb97ad8e6564258a37c76bab3301f404760b0ccdf44f540eb8 + 338a8150b1564580a0545496b4b713c708faf2cdc194df5bdb7e50dfda960f58 + 7e1ce6aed2d588e859f5d5c86cbe6e5bc88645f3930067319ab3d4d9958d5100 + 4c7ce4f580850d5c742869c40eaa0508deef32a53d7590daba3f6f5a27e2802c + 11c91e6048ff3856f981f2eaaa6db651e06cbfa61d550bf029e07c58877eb9f8 + 2452a2760222e439c3bd6d4cbff3d205b3183688856616db64042f875257c07f + b3e3a650769f1bf4acbbb34c03a897f7230ff5a8bc579c45a239c7a3336b15ec + a65be298dd4170b5bf40bac8a8ae8afa9c8e62a30cf69aec8888c9b7df7a2b6a + d746c9094de7ae001ff2e48ebeca472e483854ee96503c23c61f7bc887678530 + 3be3db6f7dbb41e7e1d90333feba06dad87f9a10921ff09d9a3543e3594b542b + dd1ede6b759c853825eea385c90b07c61b8b89208c5bd6627a72c01d0f7199af + abc9c607528be99154e7c1eac3e71de79d80823c17c9c4bf8da2041c79f28216 + 68988c9ec80a573ae99a77b030cd9e11d8e2e5e28d743f05079a38848460c7f3 + ba8825ef88cfc70802f3783febe185cb072ae7a11a71574045d1362af4a972c2 + cc84b673391d121eddf0721e539a8a3689c86df95fb1e9b086ad335198ef965a + 25a229c742e9f6613ad9ae23761241674e38bfa48dfa8f65029f6e6fff800329 + 25307b72c1d785dff49d8929e0f730bc028f2e301458e25fd25d0dbaf9c879c5 + fd67ea311086177ead858fd9b4314aa62bc659acb4f246ad6250191f4f53f954 + 2bcefe9fc52ee6b96326e6052b07ec1e2a0c2cd47208b7914e0af7462f1c8f0d + c8916ed68fc13e02ce97d67513050fdbc226fc25e7d0a71fcb1c733a1d46572d + 4621b10edf09756d93ca1f3c30d7a73e4cbbe245fb356a00a6b7163f51d41f99 + c736078781477a2665f00d78e312d112ac170729f4bd877c0acb29dc6eb03e02 + 204677460ca82406b7e0a509bb4b974784ee7bf70a0e351a81ed084324982631 + 94246deeb6028af4e60c8d95d4dacbad36b638647b3ddce3a9bf9ec29ac912f3 + f1683afb6870a294b154a848cd063f70bbdd7630e05a787f281d007f7a5a438e + 96c4aa09e5a8adef651ae79d15ecdaec3af8a33e4905cde15bd322bdf06fe1ff + b3b445be8706f30524d0bd3c4ad9ff16c01a3d5a56f9a033021089ab1ef47bab + 0293c081e64a61c83d18970edd14c38ca2c95532f50c2a32526a7540ca86eee2 + b322798cc4a01a977b875abc64843042280e5383a304caed2496e21584bb47f8 + 5f6735c2c8ab8915d7eaaea7e99387e938ebb43b92526b6193acdcb9d8f392bf + 15d731098f15dd4cd19d8fd4cb75dd5676a15cd215251ade93a3ae3da645deb1 + 36227cb0c5cc1d4a8cd8d2a7b6ab9d30b9b61c55892fee0574e50ff67135ed6c + 8c042b01d16defd876ca7e347cc9ef02e1f44739e33f7a06f8759fabddc4c888 + 0063d411169e34aeb7be63600226a6c1032475d40b7b0ec969d6b572ed3e9478 + 671056b8e5e74c3e185fbd22db7878a960027e891a80b17a9b232f2fa3d86253 + 6a61e81660c28978e1bf6a7c53ccad776f15133170ff89c6215c0f3c49d01943 + d9e1378e935bfb41019e7a0dea67f7fe5d3658811acc40e610ffbd14ab9f0eff + 7318f00a319356661178607c6f9f1d809be1a6e38a686cc2e143750e13a430b0 + 8e181e7d91afdc9d384ac1c6c8719629da45c7262ffb79fa4d4ab25c08747b65 + 6f035f067eb79d57b3f3ad85585cc5378d2cd3ec23ef4074ffa554452a7ebbd9 + 5471ed0e6b9195b61090949727d0d8d24f96b328f6c264c64ff79861169afa15 + e2a90068dcc2ca1911e91be6ef76d018407088212f7fb71cef826bb244e5d336 + f3df435093a063f8f0334cd94fef2f52af974cfa19d8b0a6480a67b240f48411 + 458d7f16c1ab25e476564471e58f8ee500b2548f291a1a723598dd7b8ffb66f1 + 50cf8cfa29b2d2579b4625250367588306312db1fed9a6e9db0ec4f87f35e3dc + f3b018d0dbb997cecaba78200acd1a49be9c5e800c523de5eb4380346e49e4b0 + 8b89e02e2a72aea41e2058ba99643b3fdbaacfc1932d2a12f3692045b4f4a2fd + 05b47436608f2c1ec76c9b05832a65735284526a5c548486e7200122545cfe08 + d92a2b9025de486f45ba4f5c3442e45d90adcae7014f5c450646c1b06232ec34 + b4b3549803a19622cf6dd6b3a46ee46547e7125520bca074a170e495f56ab5eb + 1169481c65dc458e898470a1865e34ee4dae14188948b3fffd1aa1100a945271 + 70e7d37ba0e9560a612cefe3158a23f8660c31efdc65f2a9d645867d03352aef + e7c7f19233f3c13f866fa57487964d3424ef7c42bebab5fda98ca9e649f3beab + f1005b6e261302382847fa4ed36e2ebb6da5f479b9d73fe969f3af7d1b5d8be3 + 239b95fa9b326d44ca76971d355ca65f92fd5f945fcaf9849e84dfed1571d3c4 + 53c98dfb03d73772dd224e3253ae3009bc1d2924b3ba5d280310d636d16521d4 + aca5cf48bba45424bcae50727590be254c6f57f692fa6a070d7439edebf5a94d + c8648d3527cde0242666de4c194973d141329cc1622be0f6d2855ad6aec06c30 + 711141124a137736aa67e425a17605a79b81beb95a3b7608c566199d7db790df + 11fcbf922c5c52070887402f8822a5b69f138b7971d60833e4c6eea60be94391 + c11ea2209b544797 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMBX10 + %!PS-AdobeFont-1.1: CMBX10 1.00B + %%CreationDate: 1992 Feb 19 19:54:06 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.00B) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMBX10) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Bold) readonly def + /ItalicAngle 0 def + /isFixedPitch false def + end readonly def + /FontName /CMBX10 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 12 /fi put + dup 35 /numbersign put + dup 37 /percent put + dup 45 /hyphen put + dup 47 /slash put + dup 58 /colon put + dup 65 /A put + dup 66 /B put + dup 67 /C put + dup 68 /D put + dup 69 /E put + dup 70 /F put + dup 71 /G put + dup 72 /H put + dup 73 /I put + dup 76 /L put + dup 77 /M put + dup 78 /N put + dup 79 /O put + dup 80 /P put + dup 82 /R put + dup 83 /S put + dup 84 /T put + dup 85 /U put + dup 86 /V put + dup 97 /a put + dup 98 /b put + dup 99 /c put + dup 100 /d put + dup 101 /e put + dup 102 /f put + dup 103 /g put + dup 104 /h put + dup 105 /i put + dup 107 /k put + dup 108 /l put + dup 109 /m put + dup 110 /n put + dup 111 /o put + dup 112 /p put + dup 114 /r put + dup 115 /s put + dup 116 /t put + dup 117 /u put + dup 118 /v put + dup 119 /w put + dup 121 /y put + dup 122 /z put + readonly def + /FontBBox{-301 -250 1164 946}readonly def + /UniqueXX 5000768 def + currentdict end + currentfile eexec + 8053514d28ec28da1630165fab262882d3fca78881823c5537fe6c3dda8ee5b8 + 97e17cb027f5c73fdbb56b0a7c25fc3512b55fe8f3acfbffcc7f4a382d8299cc + 8fd37d3cea49dabdca92847af0560b404ef71134b0f3d99934fc9d0b4e602011 + b9cfb856c23f958f3c5a2fbe0ef8587d1f5774879c324e51fcb22888b74f2415 + 50d7401eb990d4f3a7af635198422283cac1b6cd446ddbcbd915db9bff88844e + 784c6bf7389803d9450b0c21756a017306462c563d51ece66fcc9c831843ecae + 1fefc1a232e2724f7baee428ae03aadb95c3035345c15e9922fe49e1f2cfc980 + 237316572dbc57064edac9b0db8913a5e2d45e97e19a91435ccf8adfc835b585 + 48e74b291446d689c7f2f8c4325e8356e974ae30c3e2977477baeaa33d141fb7 + 80f59351e84bfc88c87b3a4a1d25e168b9d134554f6a581378c7d2d6eca8ac09 + 045cc3a5e0ed86f147133f094029e3483bebc81cfde69942cf645ea20d0a2b64 + 5140ccc2f9cb4a3d969f4b0a79cd3329b440dfcff5285494406f3dd08d804c86 + df191e57232f6f1f83df6430f214e03fa5412b1e13d83c60c52a698bc9a38159 + 19a64162af7b83a9468fae9507c6cb55ea80df8c696dfbc3296c663902d77e89 + a181502627281181ac8624f65be9de5fb32f056cc7dd7cbc7366a91717b5892a + 34ef6b441871c6993da3a81afc9bf70ff3842a21a29c0e49da1ccba37dd6b920 + 2702db510b8b1109acf4c27ee8d676bdbd16abe189f34a9b61532eb777457698 + cee0561838eaab2d3939c5093afbb215bac433d1918c739b62566906bb2187f3 + 378521fb52e70c18886e1aa15f53a1f8a169528cf2ddd54c203613ff88e619f2 + 6c9c50c2c3b8b8c868a88afab1dc8472e7b6f3f992a161723a3c0904865a7c42 + 3281601eee91f35222c4a71f343739f102eb43145a47e4fac3bd666e4c114a90 + 5950618ecb1bdc29f90f6ebed1d8325fe6b52e14a8870e9b4bb088e585c71b91 + 493c12845a101937e3473ac5e9ae24f7c358f06d590d7618e1a1d5834d87621f + e3f5432b655eebd4ca61a7b00dde0aa740796ce88a43d1c6952f8d2ca63d30b6 + dcbadbb0dadf13150a442714675dbe51ff838f2e47ebe8cd44f1eac6ae5b6ceb + 0b07af03f5d3896ff935a198aa635e337e367e1e128d15e31afe3ffca8245e41 + a3e17011340e49d52fa1e322b435b4f7f2f49ae01f6a319f68d3d786c24be810 + 1e1c975a8feb5dd7e4922e00e3a08cacae5a945e1e8f8a20f1fe9534153307aa + 5ac7424759743e08af90b9bcca7447375222a669367e0b26b4073189c2c4fb62 + d17ec874ae7521159af2392e25944af6bcccb0346c77ac611504a3b5e86be18d + 622cf9a6763155e7ff56d2c71432b8c317b93697b5f0316d999c44e51a4a8b7f + 6709b21b4c3ed9c9481329dfd957b9c9356803ca4a2618e619be598aa0daa64a + 0c97bafb2e59dad849a57b48b5189b5fad374b6a01c14dd87672c8d454f050d2 + 629d2ab8ef5b8c023bd8bbb5045bfc233a1fd777e3cb78e86ed91434bc5c233c + d19fa0b95901a47ffd3c2b315eff5c5d634d4d1fe8e42f93f351474cb24e1b56 + 9f42a1540817d42b58761dfba9605f27f9d28bf893823431e43b9e602de68a10 + 8e04bacc337546ee101100010d8dccda85eb025766860126b869a4b833ecb05e + 6e03fbbedb12dfeca26dcca82f2d194e15ee18a0de72fc1e722baad2ed43a00e + 2130df4cf30ea50d27056390e30854be48c3681897fc24af154de09ba910f1b8 + 9da8beeaa449fc9e6a73817ca8ce6c8c8dbf4c82459202cfa7f5ff47117e31ee + 7604c8c02dcd76c32d4f258a56b5710e7b8415f1144c410cb72bc57f6eb5b0be + b9a622480a476e52d381989bb76aeabb8d4b7f71fbee9e3e170037ebbad587d2 + 0dde01010d8923fb4af9cdb846daf8ecb356172e8b99353b9198246577da8695 + cb0def676c9fd4d3139fbfec815c37e3c2e84ff40b63ffe9b4b11f3fe03ee61c + 19741eb525434a0cd41b084b2be80fa308e8c8690b8d098f795fdbb39218a994 + b50c1fd2f3c47cca9a030aaf6a4ff3da396324dde19b981c85225d1c376fd5ce + 216f8170a881e68915fdafee6409e5a491a485c3b57320cf4a9aecd600934043 + 1460c776cc2d1f29b706501b0fc532eafb507561eac1cf2d2c535400192fd440 + a93b370587fac52ea1c52636fb0d92e731362cb28e5518b94caabae83927175e + 42d3707892c0e8354f6b3a08b5296d3f762fb5175585559202831a434c1fa9af + f3a04e3d6bb300d8ee285df5e4276fa101c77489c9d76a4a73cc4ee3ebdfb0e1 + 1c02aae35e141d791f5d8483a290861df49ee8c7fbad14cf97e05be289384ebf + b754478340cd10998e674df730dbadaa9b42acd4c845961a8838ad66aaccbe0a + 759299347d1b9adb5a96189a09d5fe011d1e218112cd853398ce78ff6640debd + c26b06341f0a5619717e79af0b3c8eca70a0d29d0bb9bf3ad38396e2925f24c4 + a150c63eed932896f263e2c360698298bc3ec5c560c057dd0d0f3d366ee919c3 + 1113ad6fbe54c07d1237e5389863d88da381d8e1cd74f1c3de8701e2246380b3 + 2ca281cdaa4ce69e24e496f702c4b51dced69a8fefd9b1443534363f09cd22d7 + 255972619d5aab9ad00bd6f373a70ab6e0f8a4267b671ed5e6db3fc1d7e25471 + e3d75ef3b909519635aa80aa2643c7a1edc6ce62cec4fa7e02e22c78aff1d30c + 8c247caaffe20c5fe55cc006c1a59a0b0e306f2ca669f7015d15da9d6fa046fe + e8c4e3be5f3cef6da73b4654a0617e36473d31ea1c78979aa4a6bda6d3af8bd9 + a039db550918c1250e40fe6971823ebc1e301d1ba7e7192daa6274b6acc70e79 + 2c64fe7f7d897834916218841ab40ad5cd8d0afcad4c043cddb79c6af6ab010f + 32e665fc9e44ac5c19bc58d2e9defa821d8a7ba600e318ce827bf52ac36d0ed1 + de776977ce68f40f68469d1277ed5a6f19044cc0fc0b0bcbeec77aea66e83dc4 + aa20821f3b897df343f67e23a9908ad7abefa0d0a87133f9cfc38b9f87ab61e1 + 5c9f18da0c03acc521802830459d0432761097a61fbea4f2b092843708305a6a + 1450c68858e8fd9b3af52bcb8189c64501e2895385df7ea7b9eab748edba3720 + 893a04ba0c2688726837ecfaba5f17c0cde434bc63b207c545f8ca01eaf3f62e + e0de26afb11d2b609a279f1d7c5bd4ae82779fc1ec7ab94fce28e6541f494e80 + d5da3f0d2673ffb33ce73d59cdf3b0427549c0a63aeb6e736bacbf4e832cab78 + d7179d5370349dea17d028596e86d305c2323894a6e5b9c8a8f4a932654e7dd5 + 02c9f011fb314ef339197305635a67f315baecb6ffbe1a657fa067a922aa9be5 + 50a6264d968345c0d98426c9a3e1a9a8f6dd5f76d443f32cd2a3a8ea03f27c7f + e03eeabead353d6439e8fd190d7f261e5e616cacd877b0358a50ad6bab37313f + b2f4ab4fa72448cc4689e2431257f7fbf85a06b98086ea4425c59fe6362db782 + cb497d4bd90942ef8d3eade432708331cf2e7c9afb48b0928eaceb8046ccadcf + 9fde61a4c3c1f8c3b8481d26ab255667707334d3e174f388aad15d7a328a503d + 26dcd2b64e4c3bfa9de5c9294caaa7868ca5f7b796b6888255374e9e59e72219 + 7ad5b530e0b8082dfd2e38c42d2c7e1b0b5c934080cf87dd8b9a3204004bbd3a + a7f97670c50e7ce3664b904f58097a05d1ad62189d84893ead4eeeace0815e57 + 85de1c842a35623195bc4b50b744f1a5905e81949f3b1d49dd3cfe26b9ad2b64 + 90c97e0a5b683d84dd4709f9d343483d2f151455106e298d478d03404c81682a + 0c6d14ab3e1aab01153fcd4e55c694dc0ac516f3e7ada8e5db442ca741cf263d + 06cafa4225001f1d10245428e82b9fcbd2e8baff783a867739f0b0a4a4d0c294 + 026a4b1212bbae5e7bdce9b282bda433e75b8a8ea08238719c3a4813cc97c133 + b84d554764a45dc0e0e8e768576a2ffcff747babdf3c60a83e9e02706632180e + b68463a6d024106dbf7ccd47b56da76c36e88cdd406bb8a26c61c045c9883e23 + 0fe6851143bec84a0e538c7287198e9ba7801797ff7b08a6ecb9844ce5e5fdc8 + 9424fca323ada574bb7a09b97d2afe71cf3d6ea5674d59d65df88abecd1d8510 + 24286d0a66bb5fda902fc0e9479f9a2f88c8b95dc4cbde1a5264d84947731657 + 6fb4fec108020f637d3f52ae9be10faf1e25b2c3778deb655ccac787554ee9c9 + ad185e37f4fa44d3ee16833dbd0da4a43ba8b64fcfa8fed8109d4245bdea3e51 + f0ea41a125aa0fc427a7defef94dd99641611c74c8b94db19347d45354d85ff6 + 1073514832c081cd8de720e2f78c8e96bc24a0441a52d69baf08cfc2a0d66807 + c6ede178baf41a43b606a86aeeaadb30b273606fc62abd389e19418c88173363 + 3b93a1c9a12a3590c0ab5a136cc0fe410c797fd8b77a4cc738df292e7103bb5d + 76158f82e3188eac6943c1ea69f2d61dcca3d8c7ff36415b803d7705d94e73b7 + 288e2d1ab3dd642170acf83c4a617d7a7188a7b9912ff1b9f0efa082f62129cd + 1b50ff35abd834186104450037f6590e7ad4b95f89b570d5f42f58d6e200938e + fb02d7ac36fdacfc0fbd6d7b175b81d6ed2b165412bc757902c293caafff08c8 + 6d77fb6fd2813aaef752c1ba8b176f1a4281a33cc0d086e5417c5ed76fb704b9 + 13ccfdf68c3f4c1c91957f491e5dca5c45e5e27c5136c5e5f68d18b1ddc6c405 + 53e3b820456a0a5f003d2843bde9f833b18de4df68972ebfbd01112e44f3f006 + 34d5bea936e9de61fcc86dcb58477e1842b58c5d7912ad02e6a3fc200cee4c07 + 93c0a83bd0d3b998139af05bcaca23aceb02e38066aa9a673700fac467a4aa66 + f7458ad4e1dba989e53816bf5d494a33843922523238776a282d5804840ed191 + 513a2eea9ffdf7e831f89a9bab950991a61d331af5c2a7f97271c1441946330f + d3feef2372a134ef7c62f52861485a53bdb48d7d608e45a921b3b9b918f0ce10 + 5e9c757376d959c3c9af4c8e0b9593a810781659d3bcd3fa7e7b4ddcac93c6aa + b1abc6573dd72754eb3ab6b1844b556ba2edba693c776f3044ff6a11cb1e4479 + 9bb24106c5fb7f153c6e17e509febe96ddf5c7b033ee29fe5b6859d17e6262b8 + 5c7816dde3a73efe879f3c88fba27e57bad5efc37cb62829289ae001d2d0ef2c + db513e12f926f1d2828319a19b2d6a9b319964931eeb0d9b99bc16eeb776eacd + f90ba23f2042d49c1bf0b855713d823bcb89cba4e3283e78bdc97161d6561bdf + d3390ef29843fbce0d31b4c47fc2b08e5434e49181ade78576eed48d8a375b91 + 8d66d9f731733f6e41fc4175413e18cb60a2012f4c619aa2d90acfcf5c197511 + a908e52db2db50b562af06a1e77fdbac81960bd79b13d2fab0af2194e3efabd3 + 72d56e9d192121f61964d6210894f31db8115849ff16ec39d9f1dae5031bec6d + dac1b74561d18c605a2a1ecd210987ba4a20f7f2e219405251f2bac4c0dee878 + dfd217989debed90b550d74b62cf9be6cad604a9f41aa67347a7209db83bfda7 + d39d29e3a85a3a908185c2230d1dd56940e70692e64848029a7621b578fdd12a + ee07059fce80db04a91c4f2494f93da6802cb53370b97fa950fe7c7a45860d9e + c4846eff560a6bbb1e6124fa8f4c20db7b5e97bdfd4d6c4f62925a2145b869d6 + 0f1589ee9ee9d970692028e3ab1900875896ed9bfdbe13c1710656ae405283ad + 81a19f7f993af7fb712296bfbbe849c8c8e6e310c5dd389e10876b7d605022e7 + 79483073dce4f6bd28b9889825cf6fd5ce461771f1ee373736e74a8fdb986de9 + aba96b0d5a962308bffdc7c8daafdcabfd00f6d2f75673b2cd0b3a5a0e2f7b32 + 9d041e76b7da4d2d49320c41405127b31e256ba66c84dd4a154b102d09e213df + e347593efc9d6298973b57fdc45158c38d2ed25a3a61909339f1f5aef51e0bee + 3a09c000f7eb93a247e26a5451d5339882afdf9c0bd0698e3f030476d6aefb72 + 8f69ffe873fc616acef1387960d54b3265c8597fe628cec1fcb7f86d6ea4b6b2 + 199a53450fd915ebd5008200c3b1736fcedfac5f0db8d359f425935c05b03ecc + d364e4890ac646e599d58a904adb9f27ff95af35bdd09fd457d1d366e35f9657 + 140e1c19f6a9ac51e26432357a9dfe3020dfaf619d76a9734608bf2e411e94f9 + baebdd116139e3d8f46f02bdef6b48d946c9f6bcc5a7166c55ce070a62740e7e + cd343e7db42b98ae3b1c25780bc5e1db2e0cee40cb7c8d9172619f0a2de3bbba + 1e8dfb41095d165405c753be6ee1d250cba63996daef0ff35f9aa05085200b92 + 817ec012eefe5b0f3fec74d45788bc088c11c29bb95e02e93d1bf0e83d39657b + e94777fa5826d28eb39b8112f821cdccc6fefbad76f402577ae8f8edf897b9d6 + 4c8a3e9b6bb34a50f2ecc899b0543afbe6d70f413d80a6334396a5b4db84ac21 + f99551831c6d9ba2c063c0573c43246060d190b3135a39b84a2118248ad2c34c + 51df604c2c8107575c9066bef27e07d59e574d49ac02e3fd0ecc418a58302bf5 + 30918a12461821b4f1715f28a5a2f794d067f106db86c35316540333b56c7aa5 + fe84f4073f1dac5750e5e0ca2983474724f78de40390aff7436f0582f57d5ab2 + 1f836590b1a2d969bcf18c3599af0182c75ebb77ed251b451a50280bdc926798 + ddff3805b0661356967a36391e0fe34bfd3d0c745611ccc31c8a638461758cf8 + 581972d3169c2ded72f1b59954039ed696d85b70df5253749b69ba42a4c19aee + 884965a0339060be3c705e137f1dfa667c9c00b2ae3bdb9d4c1ff30dd1e57c77 + beaa41e479ad34732af58e59d9e0cf5d08ab184f262866f1fdddaf7ee5135a12 + 105476da023da7955f6d99bc7718c88d06c1416ac62a4fae179ec59ae9dd6181 + 7e44d8285911d4dade435ebbeac228f6b3055de43777c30911a5d34b9d636c14 + c04ecdf5d0c7af72f0d09647ffcdb969615ba12ec20e90a43b5efba3dbfc958c + 45e5635035632571a92cf63682f7f544ce357c4cf4e032fb3fa3315cb2d3b878 + 7982446d8104baf76d4f8d4cf9fc876544dba7d01dcc9c171d655c6a08c2c73d + 58905ce634ac594acdae9621d8f6d33a4db326da5b0a98934f9cea0cab27e919 + aec63df062b7c8f8d3d131df630731314ae0e606c607aa0da186ba46f943f86d + 558037dfe34a5d2e860e7b14ae84bfbad1796f36853bfe047160704072b22135 + f310fb9183b90e46a0b669bd797dc055aca8eefa646d17ed35cc5bcbc3af7301 + 8d37fd4d880dadc186137f4641089a122bfdf158add0e360a71029bfd67a6277 + 047ffcfc66da75bf85fd286028445924b1afed03531b6c8bdc26ab737707d723 + 237043f346b872af1b6a2753b28295370ddac234eddf5c932a86e85d456ea419 + 1e72c0f5fcfc25023d3945ec70b9436e9fc2402f88e082f784654590584b4067 + d2c319f756eb10b7e33cd115e8bf06c1e998311987bb318da995a9fe5b999d06 + 83802d90d829a8cce7c126e5363ec188c66dcc78ea2ba3d668958c2c9b2644a3 + 8ba35b6cf749b4e0a8bf19643db5113b59eec889b248327e6336b23912c1992f + 764cd4170b7bec2112ceb3996a812ab60e896032e27883afd54c92b292a63c8a + 2b4d7b0a471e4ea0f166698140a76350949c7a2ad8b73d24edfd14876f58e65f + 9718099427742d32e00f3617cfbbf5262e49311c7ec300aabdc554ac11b4f105 + 6ea1a7758c1ebe3dc3068034fd4a6f75a290e5eb0fe1b75cd2932384d659a847 + 86e8525b17cdf127f477e3f2a26d738a5ec0c3ddb41cc46944d544a0f9c17feb + 6eb01e5c272e0db082f3a6ae4233c1902942be6ac8859957e74eb5f88229d541 + 9df9593e3077a3d2e2b4b77f7cd91cfb8bbcc858647f851236e6b39c256d765a + 97e141916d0a05bb1246b63b29c79ccf8c29f2c73d6140c925d1a19c5a1e4368 + f55c99428086806ef24b9591f24831e45366ee24e64cc2b1c088fe4ff3330d5a + 8740f059b10866853bc553f9a3d066e64f59caf575ac65c8d393deceb48c4871 + 62ef9b518659ef117ea123a756a100ed76fb4aa1cc769235afa718e405e5a6e2 + e432ba32ea72d917d4b7a7024fca937e64c3d266be8b1c7e7a5bdfe1489a915a + 81589866ddb85cb64367f1d73458a7338c6d484b364e54537cc84bffe1d68c46 + a8c996c8899b27622fcb5cb7330363a8e542e138b93ddac8d5bc031089ec547d + 38414dcdf9478d2d2151bbebd6171c8c9b63743f831297e5150bbaeff6edede9 + 57649cbb4801042c409cff5e2e477d098d4e8352e0823b95df9937e08a649358 + 86903466cd2ed27f6df90733b9ac48165162224a2ddbc5f86c370faa0937b05a + 0eff8f832a5072cd22c4e6cf86ebc851f61bd383c3865b0e781d112761575bd7 + f91880bbbbfb39d8b7ede45cfe083cee6b6f25a3a34fbd624c0bf8a99f49e79a + ac23c980e58ac06baf7e4095bf3fec0bae857021afe284d380caa14607e323c1 + f37d984c0914dd4234ed721fd97ce824e3978235f8ba16d914df4a3fccd0052b + 8c7b2875f7c0c2b04cdc1f5f863f48700ca4c55b58c76adc544ab936b2cf860b + 746231adb3e4276243cb8a1b97931d25c02d4b4f9136c7dfdbd1227484022401 + 3f0b4d141f766e1947a7501ce9760c253efe4c6a61e4a7284588ae10d672d2e9 + b651af0350a0f69844913f3ba3c463b2cf6bf6c18ca803ccd022f1d6d9b926c5 + 553aba957e3399fbb87ff9779bf72dd1078137e42bb23ebf234e788d3465baea + 5f02d2f5cc7aea2ae2d030d6ddfd7bc301749f4d1e9376c0c5c484f419545eaa + 513db892f48634be8c496c13c9631b85b1d57140bb7c945559616177739d50de + 04d283bd7065ec9806819d2962290fd3471d918d158000f02d6157211815fe8c + 4635a8530075901cbd0c10c2fdd45b713c05067987511c03fefda445aac1c871 + 87e98c84f0d55ba11aa5d5390776f08e2d38cf328737dff28f7c8bdabbf30ef8 + 155c6a4c6d3ffd5938dd2e85a573164ed5adea7e6fde5a11ecd84909ea6a48b0 + edc54668106fb840cbd6f7719c71322f7162e24688d740c77f5bc195296994d7 + 73b9ada676e7c24d97be15e72589d0761710b94b6eb4f8443b3abae78956cec7 + 676adb53fca8f5a7c68c4136d2694a71577b370930c715cb8315191f8de84613 + 53a526ae51505821b3f59834038ce569246b6b3c3ed605f30e4be11693ce636e + 9fed86bf401358463678da7c85eed394b11e9e1f4226dcdc25b3dc67dd6255c9 + f149b90240ef4178cc1398d8742d66bbc9f2d3450f6dd7919afcd4c8353cab95 + 831f680bfa93cc65fc9825445f187d82450718f76e97239f4fc62dfb535b23e9 + 2931d3d967933056a5d8f232046447d995744f06c1d505a4aac783ce0f5570a4 + 0b5d2b70207d7f58923f3c602382b8e363b71525cdb9c0e4dbe8ea584012a9a0 + 7ee40832a79f71037f9f27a5aa7bb7d3cd0bd6505061b2ccf7b96149a40a3858 + 1fa650f4293e3b85c2ba3ee82ee04f669b2cebbbd9c792fe19e123c95494004e + d4e1dacbd32aca122f3d9b5698bb7a45c61a7807ce440f6f0f5472962141933b + 63a60410f0aecdada28fdb23626f16ca1e7b3456d303e05b7688e280365098ca + fa52bbbacf5c6886041f7ad787e9dea1f9fe9862d1af0c51f3f5066feaff835e + 78293c900a12124220dafe69bbc731b6664f9ebc66f3adf2de7180435dc75e53 + 8449715fd1242b32240ba5b4163290362c5499c1adeb2503eec2624b135e9aaa + c7e59c73755558952d1c38adf69e2f43256b5d6b4950b05efb3b795e037d81fc + 3e2861f1fbc1e9807a181a7d56b1af782a9b30bf7e145a56b76a574738160b3c + afd288785d55f2ba78f530a8f47e1cc5aeeb7cb348efd47bd4ce9f9bf4816176 + c3f081ae1ab9eaca8d94ccb1fffb02aa09bdd6d1dfb616791c0abd12da272c3e + a09dbcc0dbe16752a021873ac56739cf1aa99e8e40b28d1d2b931eb31e1f6cc4 + 72049f9c0ece652a0e394c61ccb142e8a3223e8581b9defe019691bed34332ba + 8889abf31e2ea973653df8f128803163e9f3b85d607bf40bdb1f00d175325a7f + 3308faee75f77799d96b3b6c3f2d2bc0e428c79269f93a45e0152fd6f7c04dcc + d9470b01ca4eedc39455b29f4f4094af27cbb4dbd5004b1813b4b1a99f9df336 + b718d09683736988a00b7df05264a1bfec2690c7a255f02dc514dd30f2c0a681 + 61704cf40a13506478711deb2920d6d7b1b43e5005e537b2ce514428b8935342 + bf44e45e358d69c81398ae705708379f8305645c72131daa1534acf06613b906 + b9eb9a5f228563ce5cb77a8429dbea57184d52b889d22b95790a260143a743c5 + 8cb2bc81001ce240ccc8f38bd7f1b6c4ba0cd64bb09ebf56fc3fa0985bf4685b + 92577dc3d073da917c43c2e8a7ca43ef216a58bf58c96b495d8ca40cd22d57fd + 4e0156b9323909dd141ff5ef0b3afd8e6c027eb384ebb231ecedfab60f6796b1 + 30ba99600787c187a66bf93ead9348cc32748133689a8901643fac9e225cb205 + 47662623aed1931a80bcfd1102c2b9df63f334e27b24c8f149a2856207e7eb86 + fc36959bc3fcdb8bfb28333f44c38f26d8b17111f9c6c0fb48077b2d0913df72 + 572989ee66a9f0af0f2378cddc7c0a558e7edaca1919ef1ba525582b40fcebad + 5fa949b9ff807004d22abf819ebedf0eb87c3c9263a9595dae4a251d589d2565 + 3cba95e652aeea96008299a5f03e1bc448b303615cb184760cd337d279027f6c + 83d1a22e81358c5e60db61d338e9b7b86a9c22c33a1b4dc90c799ab68b239c87 + 68ecd08623beaabfb079b1ebdb1c627255cb0efd0c1584225907de18389846db + f623e6a652698a115db6015d1cf3dbdab985700e081d392fa7a028873a4e91e3 + b835b233856cebd4a207e5bcdcb72e5127207c0ada3eb4273c86b631f7ee8fa7 + 183591eaaf1fb178c057de962c82fca642328f547c86b05d74cbd33defb4e7e7 + 405f61d49c8e3111b085246479cbde97d22fb8e983df452d31d954745a7e1223 + e0e9e39edd7c146f2bb821967f9f30cd09b62df321463146959ccb76dcaa027d + debfce8196eb3fa15618eec077fe8ad03205778e92c6216e9a47513ab36488be + 12e1eb9332250727cf8f030ba5d37f2cd2b231ae6d2665a7f0a899bbde1cce93 + 67b682217375815816576cbae46ef95f872740b2cd8b47590c6b43411fea47b2 + 772134361b0fc3536799d1bf923c27482a81565310e6366dd3a30885e2e98fb8 + 6e7ee08671bfb0ef4d4245ac8075670505cde812f58d689074edf503f3527638 + 5669bb5c70e9b44aa978f01ae153f02c8d34cd17bf109401d204da6333ee757b + 9a5c3b566c0250ca8d356dfe7a00b5af5d3bbec8f3547c54a9eebdc13357bbf8 + 08ce3fbd435efe097623946b0d3f77baab01e3d864c7fa36b60280f7d98d1ebc + d8abb511fbb8f1dc24d0a38d3e652380a0f70b19f84e6d536f0da84e43779141 + 517bad54c04b3db86f0e4504fb5cd5449097eb1ab7f935dcfd152a7ef2700ea4 + dd3c1f21cb9f395b72563301d0f141940aa01f015fdfdbf8c8ca119c71c92463 + f64a3e486903ea3a9f109c8999826817331e8476d82fa9be651f142951944cd1 + 2a106e3936050094159b62c87a9e077664ee1afe0267fb895266c74a72f9130b + 07ea8da170c81eb090889a4ecde1378b16eb2d1eacaedb0d1dfdcc76e68ea7f4 + e20d14b4c28feeb7e525382c2770f675f4e4216bf434e4edb0d8a3c2bed51f59 + 79c0b640c8fedc8e9e672175b04abdf4abd6f64abdc4453101e542a40c5120bd + 19e73f71cc0f53cfd06ae8511c9c2a7ad8c9179fda0dce1c2e3814105e18d037 + b02a0ef36e2e20ac4c9584bddcb4974a9f3b18c5c8dd097e2d1a01b70f12b206 + 67aac62894ae76b39ae9bb2303e632d288484df100b13b066843281028bdcac2 + dc32b235c8db5b7b74e58b016d80ef5308db8472977f5d16e9582ab736a0e9ba + 5b4cba8a46c9326ad2f31fcf780dffd05d70dd93afdc2f4aa43971342de56d6c + 79ab2ccb19bd451fec4bbdd1d4eb922f196bf43732298dd58f7add584c8951d9 + 2b3caa316341ab963bd87847c1871f041739c7e8ab488e21e4360c9b59b556fd + 3227600e787bc70887ba998ee1a788c9bd1ef44f655ab9d3e7021c5accac555b + 652906fff0950bbca6a43e8d91a6fc0b03a6e2efc9888081f9fb6b8546fc0ae7 + bb77657b105b5027e2ee891c219da82d6dbfa35f6a9eed617014d89bb7369b14 + 26eb99dfcc6f1a182d2b9198883ab146802438d874617dfa048199f9e9c3f63a + 92e73ecaf276d284d452169ac423513339dfad788c0a07c2e980e78f57c4f69d + 19709405c5fa26cbd91c9309b67d045cd652e298f31c547a9672cc2c5950ccf7 + e42cf6ef79662c4033ce5dd3bba1ba01144b49a3a4858ad5fc3d4558d24b189b + 73f1e1c7e403071d872505190e42f16c23a1a258d4681bb1a539cdafb3033fef + 6a6c5977f4b5ee924871f1789634d5242e0e18f9059e85ca3baa8286006429f4 + 82f084e09557b6666ab357254d86e8e28dd06153bbcb45e32a1952f536827969 + cd4690a3858885f954fa5fb0b474ebfd612fc266a8d98798c39ba7c4fb9f1c6f + 52945fcf673221084a8a0e5b75ed8bb9028adf9c7d862d0a5eb42b027814ebd2 + 34cb1e3e835cb406827afb4ba30d5f5e0118d7a9c2de1a2644f15a0094d6723a + 5cd193f6551afae7e3135e27dfccc497da62cacbc2f658333ad579de88f23c4a + 01f31f19788632075af3d0066ac0536d22a8f3f5db19d9d09a8a49bf2014405a + be9f22ac0897d26feca3073a78adc21d2a826e3e710a110a1e10f9aa9bb9e25a + 2695ff2df6b51914ceac4014fde6a090f247e0af65eeec0d1bf614f61ec8f6ef + 4ec532d0f0eca120eb60f8246ca01b1c78f499ae045fd298a45e1eed8ae11e22 + 99e27db81b81901c57b268136ca45cbecb3f8ae3812fc196accd844979d4e22e + e44755c8273a38cd7763f45db614a115315c84c5e5d2f13f574438b37eb96c80 + 58e5f77217ac70f64abe83bd1e3974cea44bd8a79e27576640c9f93a78fb83cb + 44265b9104f4c7368d4c5632e4d4e54531cb55c1da6e8e0871e943693459512b + 7ce8f62e79ce48b8fa1d1d7f12c944784c4186872516fb3ebd316336d87ae691 + 0a004e14c83ee26cef7ea1a695cc17bef9674196b0e0d4045ff1b53e548e92e3 + 4529ba75ead3f3805db43ad8e546e8a96a9d544864f17f18df41164729661770 + 723027c22da627f46a638e722a1b3c75848b3d4a9a6c2c5bcb4b0848d511501c + 0f2e785ead94557c2ead04992f1315c376f30622e1321608e6f2163fcb1bcb18 + 2f3acd0e993cb9d2c13247c0c1e17d6fddbc3ba1cd28da406bb0 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMINCH + %!PS-AdobeFont-1.1: CMINCH 1.00 + %%CreationDate: 1992 Jul 23 21:20:25 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.00) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMINCH) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Bold) readonly def + /ItalicAngle 0 def + /isFixedPitch false def + end readonly def + /FontName /CMINCH def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 49 /one put + dup 50 /two put + dup 51 /three put + dup 52 /four put + dup 53 /five put + dup 54 /six put + dup 55 /seven put + readonly def + /FontBBox{24 -106 1014 716}readonly def + /UniqueXX 5000778 def + currentdict end + currentfile eexec + 80347982ab3942d930e069a70d0d48311d725e830d1c76fba12e12486e989c98 + 74c2b527f0925722787027f44470d484262c360cdfdddf3657533a57bb16f730 + 48bfbbfcb73a650484015441fdc837add94ac8fbd2022e3ec8f115d4b4bb7b7f + 15388f22cc6198efe768bd9fceb3446ee4a8dc27d6cd152485384ef5f59381ff + da43f2d20c8fb08aa27ab2015b774db10dacfdcd33e60f178c461553146ab427 + bdd7da12534ba078ad3d780414930da4f8d58abfa96398f7d8e2958a1a8cd05a + dd1eb8953a9b41dff84c047e8dc71301a8880f7dde70ffa283c7c87b7ec2ec1a + 574a50756a2d9948c7e123c5796ff04311b38665c588ec21713c6cf1ef4d6534 + 48c0705956ab6c924a5447ab967362dc1235ef9c85aac6dfc18c9587a48e3f6c + 7605f2adbb86dbc05cae90c90676357e30005fcf117f0c141bb1ed869d5052a1 + 2d9e3b25137f2b45a8ef40f1d3cb1c75ab3bf240c4e402db9748da2d914e13e8 + 1f7db640a2488f5a072fd62076f87332f2e9ddb12030236bc2b94428fa0e0ac8 + ea10b176956b645e71306f4bee8f906301b3848ae7468a7719f083d57cee6fbb + a62398714367d5bf21d3afb1cb0a7e77723a4a645e4098384743d473cfc0619d + ef5b44e8308b31712d38991ecf3db7f8a6e5c9de8319e618e9c0ed29ca3ecd0d + fd5ebe68f93f717c0ce3b3abb83465e4e4b64ddb1d16f7a2de61a24a152295bb + a110c90ed300100f698a951f479a6e956f9ae467ab7b755d2092d7455acad742 + 974ac2c35f730ad7313aa3b015f9b173d8626f23018ac697b3a4276b0a7469a6 + 3149e37b6eb2f0ae6f7b31f802d9311f7a1d5766ff1bf5f04636e1db3fef1a29 + 76f57929dfb5de88b070712f62a6e6bff11d9ebda37a071d65bd821dbc445fa8 + b96790ea9e9e1608533cae68e9e8a80d5f8396efec2828cfa0acf80687d66100 + afd0c4b6962bbbe6331e17eea90ae4d56f9a2ceccaa13db8de668ac3a200a299 + 998825f836ef3640c9a04d6d535f54a40f3af65ac907332970ec7cf02ee00cf1 + b2e4799495607495686545d12d2ac3706da06c8a1a4a8075abac2356be7cf800 + 546690fc96ba20fc3c744f6d0a8087ac38c858ead8b5fbd30bc8c61b35274fc4 + 60b5a12d23455463029310605aad807cee35fe7b56a49d8d5170805837b2021f + 096f2c5fa9ca2d240a3c6142b5dbddd1e687c002c8373966ecc9db2781bc81ad + fbe546fc4df9159d559ab250ad7a62768739e6389aeaed7f83745aed78a6d924 + 9fc365c713f9dff6723d8468b823e1868010eb01b744789a0c740b650d73f99b + efeeb4b397b6fbf710050851c07c70ba18fe7cd717828cdb04eb34cb77de899f + 0aac65944f487d21c1615f4d3efe77454c504f8fb88571f91e8115d877597d2e + e72720cb5152e3492aa91a27563090a854d009dcb7db6ee584f435006b8a6033 + e24f39f5f1e8f5d3e85b590c1de2de4887abf9821a09dc9cb865f31ef9347672 + 5314d5a94b885eee7c8d111dd2189724b5851935de0dffa1ff9f11b2e89d380a + e7d9143b5040b9654c72179fe1e81c54652fbcdfee8547bf43fd2a766b520384 + b93cfa72fc9eb3a40c108ce3e761b46073d623c8b0c3a6e6c132533cdc5d4f52 + 63a65d55967cb9711f518ca490d27f5e405a732b7766f9e975cb540199f39e93 + 404912910c0076ed6962bdebae9b052df77e8ce9c208e01ea53466d2fd4cf776 + 59310838bf993fcb6088bc716de59b2aa1a43ff60f8b1ad6590bdbfed5410d90 + e22740830b0c2f2c73a5f41e7437e670a271ed67a3de88cb728f3a632278209f + 73347bff1eddc9e74f80feb0bd89768ef214a7227ef650fe229e05a3ccf58d1b + a7121f3e22c01479fe04fd16b60c53d119569d297f21ad6f8c9c8e42d57b1199 + d9ca0b66ce7873665495ba5c6d8ba97751d40f600afbc314705de10b6ebfa8f4 + 65f44630b3f510075b2c74de8dd9662910c03bd7a8bb569052d875c4bd2a2bbb + 9aacd3591c7ebe80f3340305b2737350ce5fc7a3907ce56b3be4d1ce554dca99 + b4bc8d8b20369a6b08ae8e89101729775fe6a6db63109e7be0f6689b29711aa7 + 36ed0bc13417e2c3d21dbe4732f6431709798eb4f54427e75556fc02bdfa5555 + 94d174c1aeb5107a09bed753462c8274b0a775e2909c50d3d56b60be391bf120 + 63e4ed8d665ce1393360766158c5b6911fecc1295439220726d1b441d2aa7064 + 490dac5c1126e00362aba1cb391d7f0d98e49856c3436de6692dabc3ec51d62e + c44d26fd1521102f35015fb8201f5af29c6995005f20d03d7dd0d07d955695f0 + 90a63c249ec8ed29c1a492fd8c6f8844074a0af546eda29feaf7fe6a15c0fec1 + fd72761503a6084142edf0bc0c69a6e76f52770afc6e1201985d12d96ec30ea5 + 02a3245b1f9705b9997ff53149074bf5f36e1ca70d7fbf7f6795df6e65a21158 + 5ead46379d3a88f2c4ebe1f5a6e903c525d29ee71ebbe7864b6445370a5b31bb + 8d0971f65c9586eeba867f309fa9103a814df2eafccb0aaa5516e7243e040562 + 3f28784081f149883af91c80473a986a10a533d039ca2a242a4ebe6e9155f1d1 + 67b9efb1b91eb24472cdc38b8aa51d9c182e4c6807c816dc8c2efb43a96a5f2c + c2192b853769bd071b9f27c561edfdc8446f71a9e11eb8b8c0c47810beffe96b + 9b72f746d25aa9e170ebaecfb1dd7bd030c9db6240995958f068a21edbfe3d0b + 9cc9fef45e4dc41fac123053aff839b8fee391cd5cb093fca2172b2c7151946c + 604ef72f09d6b891e2f24331077d192b1fc6a17408a07b40c1fd17afffa614f5 + 70d732e4c7ca6f52b3c3a1cc726dbd1ce3e808 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMTT10 + %!PS-AdobeFont-1.1: CMTT10 1.00B + %%CreationDate: 1992 Apr 26 10:42:42 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.00B) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMTT10) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch true def + end readonly def + /FontName /CMTT10 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 33 /exclam put + dup 34 /quotedbl put + dup 37 /percent put + dup 38 /ampersand put + dup 39 /quoteright put + dup 40 /parenleft put + dup 41 /parenright put + dup 42 /asterisk put + dup 43 /plus put + dup 44 /comma put + dup 45 /hyphen put + dup 46 /period put + dup 47 /slash put + dup 48 /zero put + dup 49 /one put + dup 50 /two put + dup 51 /three put + dup 52 /four put + dup 53 /five put + dup 54 /six put + dup 55 /seven put + dup 56 /eight put + dup 57 /nine put + dup 58 /colon put + dup 59 /semicolon put + dup 60 /less put + dup 61 /equal put + dup 62 /greater put + dup 65 /A put + dup 66 /B put + dup 67 /C put + dup 68 /D put + dup 69 /E put + dup 70 /F put + dup 71 /G put + dup 72 /H put + dup 73 /I put + dup 74 /J put + dup 76 /L put + dup 77 /M put + dup 78 /N put + dup 79 /O put + dup 80 /P put + dup 81 /Q put + dup 82 /R put + dup 83 /S put + dup 84 /T put + dup 85 /U put + dup 86 /V put + dup 88 /X put + dup 89 /Y put + dup 90 /Z put + dup 91 /bracketleft put + dup 93 /bracketright put + dup 95 /underscore put + dup 97 /a put + dup 98 /b put + dup 99 /c put + dup 100 /d put + dup 101 /e put + dup 102 /f put + dup 103 /g put + dup 104 /h put + dup 105 /i put + dup 106 /j put + dup 107 /k put + dup 108 /l put + dup 109 /m put + dup 110 /n put + dup 111 /o put + dup 112 /p put + dup 113 /q put + dup 114 /r put + dup 115 /s put + dup 116 /t put + dup 117 /u put + dup 118 /v put + dup 119 /w put + dup 120 /x put + dup 121 /y put + dup 122 /z put + dup 123 /braceleft put + dup 125 /braceright put + readonly def + /FontBBox{-4 -235 731 800}readonly def + /UniqueXX 5000832 def + currentdict end + currentfile eexec + 8053514d28ec28da1630165fab262882d3fca78881823c5537fe6c3dda8ee5b8 + 97e17cb027f5c73fdbb56b0a7c25fc3512b55fe8f3acfbffcc7f4a382d8299cc + 8fd37d3cea49dabdca92847af0560b404ef71134b0f3d99934fc9d0b4e602011 + b9cfb856c23f958f3c5a2fbe0ef8587d1f5774879c324e51fcb22888b74f2415 + 50d7401eb990d4f3a7af635198422283cac1b6cd446ddbcbd915db9bff88844e + 784c6bf7389803d9450b0c21756a017306462c563d51ecefaacd079732f12c29 + 315e4b9623a5752c6f1d8145869e120d910b2644887cea7e30b15676a92537c2 + 9d3aa80dc30082aba94b40990b82fb1a877e805e0c8c48f61e9f2edac05b944e + e4d8084ec1d5cc517aaeec5b3ea379dd011eeb454cecab3ad2443c887c582789 + 72355673e503affe0394fc7db31de364e4f56c24033c7df2265c56445ec63a1d + 5695a6041ea1b94407e1cdb7c5635603a4fd047e6edcaeb2d0da6c9e0e9396d5 + 1a4a58e8fdc1578730f992435560a6e2d3e3687703ee2f78f5896389ac8470bc + 806169eb01762e89b6dc9adf857ead656620e2589aae722c37a2ed7a2941c360 + b067ee34d8d5ca3bf68db725614d936bcb207781f4d4ec2ac67b13a5ad161f3f + 059add7b5e3d904831e31c20c04546fae83ca93a35989e65c201756888f727b9 + 7e5313c9870ec96e4cec3901ea03a5c744754485e7d169bbc98bf872d0796e18 + 9d43b712950c3786257d8be06ab6080b9d9392313298327549a8a41c00a2cea3 + 690b4a333e45aa815a64facae1c2b44640860b8b8687afbefdbd5b4a541a7251 + 4ee7d3e0752af3e96a88c95d31fa16d34ba2f02fdb0088b165844f02611c734a + dbcc2037bf741fdea7e8bcdc130c70c33772f777d8bcddf4611db99001ccff14 + d7af2bb05defc3480bdab312a0eff2f375afb4e0df2f803c594b7c93f71ca4af + 861ae1711932fef19bfe2f9b7adb69d68e5a70ea4d1a3d5bd85231b16993f65e + fb37a0a823f0542f8c2340a073dc1be4a8347f9d3068a6435cd8278b0db1809e + 8af9664c2c989b9f16873c009449b6284b85da4dee11c96a05ba83292f0edbd9 + 2cf674aad6ac1a5ff966ffc37e88a66048deed053565b55ef6bdb8c2f2f67832 + f8939a32442ea54f13d003494d6350a2864b427a9126a9c26a031909fe53fa84 + 63b80c3ffd536c9a5dd29ceb03148dbc24c0033ae3542e26551168a474b72c73 + a7e2c34e90c8b7c4125d8657cd89e0449b5969f05212e64175cce0f9faa61069 + ed82a8ef9276f14e2a08d8dc7e5a15f1707902c2b2f41cb1fafaa593385c2ea4 + 1499e485ac560bdf047680f9ce615f750000e1c30ff1b6ac44e0a4425d941622 + 24e74d9a481598245aa1a2b368da7c1f71bba518d1327a44d8b4770fa08ff5f9 + 1134098c0f6d7aa2c2270ca47c418152e453602628fa113422c703ec5648a554 + 91d86aaaaf1ac92fc3e64e0e403a73c84cb4fb0a0232e1a153b61bc15d3597ca + d921e3b3b1d02a8dcb0bc8b62d67765e1fe4e78acce9ecb284f8c18225d324e2 + 6c1658f7cadabdb3e1231fb1c1ecc63492f3d3de4defdb9352f17f36e6053b33 + 88e75f0a1dd6ed1a29681d66f23e2d7744832623960d919d3d43568232ce9312 + 5977aacbb8fe7894283ff2841be77c1ad9b5543d6802d41ca0414284cbd3bb3d + 354deff981aed4f443aae0c448baad6439ae88fd1946510e3b63c45b99b4a574 + ecfb451d7bcb8b70d4351c23b4f629673c18471e0cf890df367c1964d97be3fc + 7a748717b85a08861ba0b9b391fe883e5ca814d0a177ffd6254de8b52c5996e3 + 434de464afbfa04362cfc23593dae5f564a629e735bb6e9431f7f3a947466e47 + 66c853e76e0f70716dce014a67cfd57e1d7153a2a814504d96f7530917e21c54 + 4983c17fd20c4c3ba3ebcdb4f21fa6b601a721ed0cf863cd9df35492dcf9714d + 9cc574ec0cfabd0ebbb8af259da4d6a3aa4917f2624856b3d812d8e1627f0f0f + 77874df1a5c233740f66096e66d9e0645257a16c9b6a7b9cfdc0c3ecaa6ab87b + 2186d732e1c6f13ec1b9e5873de31eb56bd8e34695e915c8df8ebda11f2be8f4 + 2867137d24ec7c10bb5f05e7ecc48613c2810f5b80411090719f0354742749cf + 947d02cae376d3701d39ffae46389534af9c9e4bf5a4951816d1343e85718b27 + 4bf646ced8871c72ba2d0e911c7f03fed02d58a0898fac07822c9f4a597667fa + 7fb89028464cde24310942b19c518f093ad8a2a9c209aab55a37a363309b0c76 + 8540cd8ed8dd6ebf8f3ea91af446bc9984899d4419e0b70bccc4f83c29229171 + 5990157098a13d5d64f3b9a564c6116db14e7b30ee6fa45869c1f9bcd8c42462 + 4893dc5113373d3a639a2d75c9fc161f25381290c795749a669a97aa2bf7de59 + 929614331e58564da4d4f21e74830947aaf2fc517d896b3353977ff8280921ff + 19fe14833e865a0668a3d5818b7bcc076975a76df079a1d9c867df1d260552d0 + 2972a74f930d15a54c036e87186fdd89c4ebe170afdf8b30edabdd155a04d94a + 5b356d8e6498bf7c89bf8c8beebcf0d0c43432e612f932d1a205d673826cbf01 + e6b8a167b789f4ea204aba5725179f01e69ab697215e65ae86ec22ea83b513f7 + ecf24da03dcb40d6ebbaecc16df563ac6455c0a1d953ade733c4ee8a4a756fd2 + 048c025724abd884cf16ea53da251bfe9bb875c8a004ced39b8ff1b1569fad53 + ec4b6ea0d479782685af33b3ee0964469bbc7a1347140a5552f1369d535569fb + 219b1cfd43ed51e22f767f0f8f92faec7648102248595e40fafc1ac208da6385 + a67f642d8a62479c3718f4fee04ee59328fcc839f4d4e8f38ff7b840afb52f5b + aee9521a841a90677ff3cec9599967851053e315e9a78841f5c039f652c93b45 + 220274fce8163972efe1794e0625ef65f60f496ec427ef40aee55dfef8085be8 + 543baeb76d66d5db75e99c135311f6f3bfd8c170daef0831d31bc9760207d45d + a7d5ba1c8a329ac19c38b6c165a15f6fb87768f7399f2bf493a5b63ba1069143 + 67a075ce5f56bd583983ec3eb6031b71d9ffd97f3df1e4b00b6e55f2ffde6fe4 + 493ae1b5670931cfc3d0b6ab57dcbcdfd86b161f7022b47757ab6744dc5e5f05 + 1d56134f46c06af06ca6c8b43781ccd46d0645688d10e9d9b481d1038f354b22 + 5b41cdb45c2bcbaa2af863ba11f7fc5d94b73f1b157ff2c5d507695e505b9445 + b303bf1ed8ffb9491ddfddb9d920ad201693849202f04df8722bc0b7d25005d5 + fa7576dfd9d08517e9399513644bd13162d12b5d60a88711cd2dea5d6122b327 + 28b5d7f29a38bdf0246b991b9088783a4e2399d1aac03c0c06af6a21618a1141 + 63ff6f85e1e0b82cafdf381060e94cda0c8cffe01db8e28d7ec3a476c6531843 + 9c2664b21327da475b797d39d48e5a7fde1d21df9040e55272579c3536955b04 + 89262f7c1532d34f9cb8cbd7d9cb1a5ef42d3f9d6533da957acdf60d591f5139 + e2179b92b2b850d6aff007005fb64517457bd57955fc15f03e4bceea24f9f9e0 + fe6a6d480d1a3090c76b46c08f2b86d68966f67b12562ca4d7d81834ece213c2 + 48e450d16cf782219ad361d22da4d93b6a1670774247fdf488773a43c7b37c92 + 02e3c7d225df09e2b230f8409a790c8b3aca4e717f7816e9a60d095a0a3e79e8 + 02e28a4aa20864dec5333ebc9ecc9b061f02550c302c5eefd68d649999f64e10 + efd4231d5cd4d59e142544fa6ab43df960479122b849d65905fef814c978e580 + 0f16a0dbe2166dd718fb0f5f5b0764ad0b57a0ee90f28576c412fe980f2da8b3 + 51b4388be0dc235428c5a26b296b9f1d0d0525e112c7bb24fffc799ad6f4f630 + 002f8eba90de33f42ed71222c0f9022b0bb28660ce4de5ba53bcf34cfa9a684c + ebf29220e4decdf186005bae72299072fbe5a872df9d632eaa9dfdc8484c3966 + 21c00d3786561d1aa1784fc1f46db4e03b8f55e92112ccd81483e7356d0fed7e + 5be8d4bbb9827bab9e05f1b6369100e7d2e4f3934312ad9655fe5ea78c1d1967 + 1fd10d195a5e119cb5f55124ae813975724db3ff63bbffbd63714af1ceaa2d71 + 70a00254024e2c645b97fa76fa732c8e702b7c573f0c06a39de14c02b2a41f3a + aa10253819390887e345b7c2a7e6e324977d812948d53948db0aac8066c8a4f2 + 78ace05755e3a756023a2f650cb231f978774523b37e0e771c1a2575b36160a3 + d9e89a5de4694f2e14aeaf384d05e5f48ddc6b5cd49d2b55e4294b6e277048b5 + e0e1a07af6b3e33840c11718119701b5fd31ab3023e7c52a48ca3cce443bb9a3 + 81e3fb7467e92cbb6ad49fd4eb1f9ecad4fda55d1582029f1df04285e300a8cf + df0eba044822ab25da21a9bd6fedd7054755cf5d1b2ab55b879adb733a5d3baf + 62bee277f9105fe072fb49325018e738d80add9433f388ffd23afdc4bcce7811 + 9a56de50b383e5715898711a0df616290d4c5b5a3b1465da73cb30a54e728849 + 05b8131d2ae9a301f16f0913b2d0789988b48aba029085a57f938967d80a9a02 + 388e05c66081d238770253283219ddc3ae6b309e891201c4ce1775eb60126b60 + 7cb1ce9fb379fb3f6f880efcd8cfca4a73326427ed4e3565e481fb6b99e81c45 + a963396a84fa1e5f3a4b6a3d5d94f039fc16ff5804be340ef6fca070193979a0 + 8dac37cbd4c588812e710f7d9750a05ddd5b25097a8d4ee1a0cca56a46ae0687 + 33691ad8a5613c50299764c9542502c3880c38cfc0412912800b7104892872f9 + 3fe112a9d0fe65e3dcbe056b1c40b60c7b94f09730232d0799e5bd11a67bc35a + 3f21b3eec51b1226139032903b05c0fcf024cc704676827051b7d235c421ff03 + 7a17db1bdc17fcbd415a274817690a5b52036867d41ecd4cd0826a17d9b336cc + fcabb0d06346089d25878b7cde5c736e74e4cc4bd595a7aab68b56d0f217aae8 + 4d6b359eeb0457f6997487dfd1d300fc1cb579f49970752ba27c44ddbc2ced17 + 0dc8a212a564f4a797ff81b2b6b6cd77a27b9b8f298ac681c1491e11a681c7de + cff712019f851ecf94a382dc6aaf1f4a7cfcc0faa0b0a537d3a8ae8d007ca759 + 5419ba89527b4133e9a76d6c999250a5431cc3e1bfc0e5c8100c4486b0a974fe + 9f031e9e3f2f35c59259913e026e675fa0c115f661bffda95690d7d46b06423b + c044d7d21129849a46d05591c44fe605def94bf205696114cdf0d87dcbb15ea5 + 7d445fce44731938a0837322bf52fa67860a50c6e39aa2198271591b66f161c4 + 575075ecf70024f6149b6dcd0bd62264af954fca351ab77465e0806ddb1d090a + d475551c69c3561ca449c40d84999744c5cb115ee44797760beca223b4fb5b9e + d4b385c2e46d0fd1d4f7c654d8eada1c407cd95610d301fcdd56a9ffa4baeca4 + 7fa2a57e0a6fede7f4d42a59d57db9656ff589f404a861d5098d0212c9236006 + 98bc3d298a89eadd6f674954eea9d644521fc70ff19ec4659c7190a4ae51db29 + 97858b1eb5fd68a739602ccb8f289b58f4aaefcc78df4a8f1643df66b033310e + 531200d4afd54bdf1e85ca4b31663e1ad95975bae65da21948bbe64381d74bab + 6a39481f41c28caab82193160ceeae7fd26f1f2531696627da41152c8878b18c + 974a02d6bf24686028142c31ed322968b79c31be49baa96e04d5f8879cb3e1a7 + 993c5d9e5299a4801d8f111801468457fdee6a1b49f678433ec672ddda948ad9 + 642bc9df4e07cf831fd0c6397958b7ee295690eb5dcbd18d10808c7d2474abf7 + 9f71d11611400c4805ad21104cf30851f4050d225dbd2d5a5c815f153f693fd5 + 10536c87947669c1ab933f7586ea67cd21af4f6608ae8f10bad39e3f82a73b06 + 8930389b6812b7485ec87c5158bd4441c6e487c2d87c30912f7ecafc1205b21e + 4783d57a283182fa4b1b41aaa8f7c37500c32d71f6fb873207a2a70a54b75000 + 2d748f250b499edb9a9c422f8aab4c2f103c9a70c095003a7e652cd728d2ac3a + 1f4aa1bcabdfbad1e4dbb82c5a948542a90b552c3f08f0dc06b540e491d8d8ac + ce6014cf470eaa9f9316b99f29f9ba2abc1ed8c8438670e6f32f933716bde276 + a113565dbaa920dd9672eaca11d06aa4224f42fef1e35a2aecf7a8d435df6476 + 6f878545c6a57f27f3459afedbbe5dd6ad74cb662970db994553c6e3999f1b01 + 64c4753c1b4a32ccee4c4fdc9b2f3de09a70bf6cd1775d423789ffb0e9e9a2bd + 1424f2c224d5bb4d873e27a4233bb40f027a8da917d12c5a0da961a3f62391c4 + fd19d19f8b7b8cac90fee6bad4cd2e801fbb1e7f997055c6f3fa2539335785b8 + d02dbfb81c58bae708a0811d330209b2c826883819a0bde5c35cba26da509ef8 + 3e80e3e04ec67458aa00a50dbcfe88b195a1e4188803033c66634bfde1027641 + 3c7b3c32c2f27469c78976d1f0a47d803a59c8191cd07d70633cc8bde3945f49 + ed7a482eb42e732c7792c47d14f404d0e3ba4fba3d5d414c5a42a8e8de557a4a + fcdf99915bdd3a6c588e275e9fe5fbb09f318e9fe7dd98c936b9d94068c0989a + 34e8afab4765bc352b605872a6080c4d41228e609730e638b15016892be14505 + 9c628931611cf9a0f17d0af4710d14ae4997e401ae2dd8fb776004536f9f3c86 + c69d21207ac15a6da077f2c6af48a42760b205d2d029055daf00bbac86e514a8 + 8f20ec44bd83bc7198527034542a05853f8f80d6ff3cd17a83cbe36b61a5de52 + bd9b1703712e3594164851e8c192b682f2ff2f7c9b692206ded603346cf14214 + 037696d6e0ccd537bcaf257296c7888e973b80186c7308f2fd52fc38b6303916 + 4445cfc27f47a7756fc4011ec5cf5bf1fe7af107240555c04ec42dc1fd822cec + 9ce375f6d50885846e5b18d05101ddd1cf4ab2e5fad89830bd0f3efc42ac2dcc + 870551184c028d816b0a3a485048ece74bbfcef0c7c81efc83cfe47e7dfcbd8f + 2b4d1c85000f2cdb4ab367df163c38e10929a447ee15cafddd1da5015eb21ab4 + e683e946ac33fd9e57198cab4e5b8f20f08ba9c2375d86802d866da504a45003 + 19d7179a1b9083e1a0e81ee7ac49d2edec78cac0e9515aac7c9cc169fdde9a5e + 4e02c9dde347f64fcbf7a17a61a5748d91c4572fd3091ac82cc68b6feffb1b88 + 44882dec9d35dd5c1dcb2253f052fe006f4ce1c53f8112e5406a197a06c504e3 + c1d41aab85cac009147f8f97d7e8ef011558d31b432586bec4884b906297ca78 + c953a098227c6a4a9d054926017329700c06a6798a3a998be72c6977ade850a9 + ae4ecfb05397fc0db077269a4488b091f2888d5c650d2dfed7a6178e9377f832 + 0a3b478e1c3e57c71e2b78b760d11d52fe9e6186071fb6d9b08a353fcd7eebef + 86911f0921a64dd4f60ac6e07fff62a4ba88739b3aba853f7320eef7996a3adc + 753c035356e355be4eec5485ad095c15bcb2c2e6bbbe46292911c40ee2f8189a + 522469a68c6e1a1a132dc9d56bbd18ba3b8161fb14df1f2875a91bc6e772094f + 836d45a3b8815d9b450d775ff1fc0000278f20c402167a837c2ad737ddd77402 + 4d62f8fdf053efcb9504d287bf9fa62dc107c6e4eb936271312e21471247d13d + 4820cb487de04a404b6bcd9df694c0541897a718be2f9b3d65a477c0a890ddc2 + e08ae8e0dab5d71e42952e0a39fae81ad304993440368ab114bd62dba2a77cec + 2edf0ca2b67d3aa779a617bfc97200e3b582055754c3428acc8f1bc37f36a7a1 + 3d3719613333d6a329bb172974be75850860930b63353fdd0d5c14cccf220133 + d06492f0ec67dc090be95eb4ddc5fbade327b6ab38773843e03b280fa2898580 + 58333539a86c4ae56b20974bb619a44b903c9bcd72841804c8c7ad0c1489b37e + 0c95306296de7ef6ae0fe3a4f8a28bc2b54af7307434359360385bdd051ada87 + 9d996baf30118130f916f1898d4801cf00179e98a7d965ae2a29a411c6021a03 + 7820affda185d4901c4fbfdad902ae81ce6407a0ac0889eb6db8d61a146dd90b + fe492dac09ea796ee9141077766c1c23c4069c0e4f60d3b4401af3d1694727ff + 5fede0b07fde8790b1543085602aff94f79359f76486a4f3457366c17c36d1b3 + 3b415b7e1dbe6d1c08724b40bd31a9d18cd1d8eddb9d3856a74c516c2826d6f7 + 68a4e62b1c629ff8acba8ae8a69802a974834b50d99b848e2e122b0e191350f0 + b144bdb3ef26e89da5475016520671cfb1aba04d8033a74e96d4b8baeb7fa946 + 3777a40be04e131e8123efaf684ee26a9abc0289190a5851a26b6ebda4871676 + 3ff6d6eb83c06102598184e5df244cc631555d5c59a09619175bb8399b87509b + 7232079a8069d6a3a86d2e0dea63883c9c976d5a154e9374ad706f0767f9d0d1 + dde10886f0ef3edf9edc245514df22e470816b3577d7bfe4eaa87adbe6613557 + d091128942ebfde52c7916ffaab40cdf8d423c63cf7437416cb8b1e005e4a505 + f7c4d69dce9bddcb1103eafc2beb5f9f7479f605e5d8c79e51eb467d260638d6 + c0b526d8b5a294d05ce8ca4b1fe37530866ec9e31750c3ffe52efeb594f4b347 + 168f78a9bc24bb10daf7f450076a56eceaff84bcce16068153c34697115fabef + 8fe7bad4964d16a3c27db4946edf6ba94c3a50a4bcc0eb1faf136735e0e6c702 + 8be86b9288e499ee04c999e88ae3efb6d1f7c2db25cecb8091e76d6995267377 + ab0feaa3fc8074809a77a52bfc9ef8bed95bb3853baf288717778511812939cd + 1ab28af7b20ac64250cf662fd15d98d446b61a626d5eb30f26c5e174962f528d + 053b23e9cd779dd52ac83d0d1efb907dfc0a416ee1b102e135d04146de305d65 + 1c843eddcab6e293c106c35d4a2cfae42cdd3390f572dde222c22846acb52fbd + e93e0e2f8f8ac0089c950182d6106efaaf2fd26efd32731e62516996ea3280db + f1cc6fb9a60d9efe0c926b5c816b65f2945ae0da2670543dba0999c893741ec1 + 32fb7e89cae72f3f116fa2be7858bf62cb531f25475ce490479fca566f33bb59 + d0cf9d67813bcd73811b852dcc0295eb5142b289a3cbcabcdccd746cb145f3c7 + 1223abb5a94761e32e519694ffae441b1bd99161c35e013e40233ec00430ebf5 + 04ae780a51594f7092413362d60f85ca2145aed458e8ce2405c6db663e156afd + a957cd564af100d1aa92986eb825bf5db5f2bd6c2ead7d13444a58c394c1fda2 + 9f44d429f98202be7281459f5b13104736e4e16ecaaa467da0e870c4f42ebd01 + 43f4bbd0ad2ece62c54481a16bd5511f9b8bf4fd307988c5c61cd83ad578d990 + e843ff86e695957f142ebcadb7c4077850449098f527efa0b6400f61744ecabe + 7cd4b0eb2d13b486efaf58de55f0d2599d69cd9a530407fe63095b9ec8af0799 + 0d96496403045c37d660b7d0ef202a9093b4ace165351c1117e1bd02f0ff531a + 90a773dbb3066b06818f316c5ddf6e9c0db8e19dd36d30f528ca68155afdccb6 + fe376c60e3ed8d992ab8022d4a4898ddb8cb71ad31d5bd57d43d72f604470e1a + ea2a1c32a0fda0d57cf8889a0dca6d43bab11913f269fae1cd8d3670c2ed2a04 + 954bbe3f6c4323f4f4833648d22ed10f423ef5b736dedf748b0a92a01f77a94b + 1a0737d6b17680a341a9b353a5b88c8d80766ceb1ef3ac85f2083a31fc8524cd + bb6f3a5da478557795d227050340f6625454608c3de0c8b33b7fca6560e293cb + 6d22a83b7b291aae3f78fcc9f4f7e652348c79a523c63a891dba994446e5d42e + 7973603145a90722846cd4e50875e270d88a68481d7b5bc95fbb7ce5a8bf7a63 + a2102d00fafc1d471ec1c41f1570b9d648c9709ab41a7699f5c6f495f67587a4 + 77fc869f43abb49d58a94dceb2d6dcf51877816844eba4db0058552765361a18 + d0cdabd93033aaf7579ec8b91b6dd875749d1379ec3570a0726f24a72b8417ea + aa3f6da6633940ddc63736d988ee3e0f959f25682f8d58625075cbe2cf1f7c67 + 0025c097f56374cdf430e7ecad70404c1086469c44ae871e67f71a089c275bfc + 02032668de01c850f63dd9e59272ba6f48192ff26e3055041896dff810145603 + be4359cca5e9fe3e4308b931d1288d1d91352c4fce59df439352cb672a85863a + a7daa88987460648a4644a77f63cae2785fd270acaa6e3e0202c0e7d6fde6e59 + c1660708aba56f78ce0b97e7f8734c55205da09057d6c9898140b6868f01ddfd + 4104cd763ea132b5b8811aaef23e68d63f4f1eeeedf19ed46a30c672b52134fd + 398665e078b72e94caf62c50b666d37190e35f68dd56d262b4ba541f0e212cb5 + 1c0976ada8a2c23d313ede68f40cabe911e4e521622be8d18acf91bf83da7daa + 547f7b568093adda157453a7518b338d9db6dc0ba62928b825431a26debf7605 + 884b26c39d2c61a0fee94d4f9037fba074fa12d2ab4ea1db631cfe21db105bbe + 748e57c4973c4ece0e2ab51b717c0ba870fa88421716e1bf76753faa0b3c80ca + 1048f10b84b9eeb48beaa3559ece9983dd70b2461de467cc654b6741484d1d91 + 00827f9c2b99815e4fd6278176dad2e52a09fb7869fefe297b798489d4ad7e33 + 00621cd802d24cd5a30d184f52b06212c45b673e14f09b08d45dafccacec1221 + 7a401007fcd19478a34312850ea280a4db9536701fc960a6423c8f22580226f6 + 3b625552420aad23152270b48968c4ea20dcdc7ff861291dab308ac3e5c7c4f1 + ea8868611a8d66b28f26909fe6009acd348b16dae24c78b097affbd6c6012a6f + ae41be66cf946d021ba620e8c5e4618f39cc6f96aaf3731fb3dad88261c8cce7 + eaada9bc57ec1e500396b2fadc9ed180c56d1b53f9f9e2d930a5514102eefa94 + ce883054062e9ef78609084a4f73ba7128a42ab7d67ce4a62b046c5c662ed0a2 + 3fb7607f4ea5bf498a22c0074d1a65d41342f58f0f0935ca160df4560ef398b5 + e354ebaf091a19390e136e6b875cddc42d9494a49a386d436238d6887e637ded + 679750c9cc0eac4d8f8baa9ba74e272b99224fc00246edba008e4bd956362d9a + 87ec022cc9084aed7028011c7801685ccdb900d973964b2f94827bee4372dceb + c57ae5a79b86723c04c4401896dae015304054381b97dd55526378c38d720e28 + 512eb58c8dec48ff6d23b6530a1c6091786ee576d619e2f23578a86bc3b73563 + aab9ff11849508cb2c3a55f13fdf1099ea2e769ec09b11422b758fad024e6625 + 3b97cca424c84aa5f38916aa0fdba434dec931291bdc7342db05fba18303b706 + fc4bd39d8c795ab6fcadabebff61f407f88f5ad26ddee0703853a1ff04ff2d01 + 5789e2836bedecf7dfefe6401cfd5be10b272fc21a379aa57b2f1c69458b01fa + 8a86b7bc62bc33b9b18753481948fda789855bd81f81e84133a5b9db3a446f69 + b2b1ae98599ecd2bf8731c9c0e7f658bdef938994d5c41c2e37acf8bf502cfab + 3190c171b86bce647a294544874a21f9c644e5641bccc2e0c3fe3b530a13dd9f + 4046e49ef66cb4bcb3d7cfc229e2b906508d7f6d040faf83c8d0733f96ce98e8 + d41c6a4e6f816950883dd2aa446cc8fa224a04f1eccaf4c594cded94e707978a + 4e7824624d17d94567f517f949a9d871d7c82eb0c2ce40bc75cea089fdc57c41 + d75846a6ad2f67d846d8fdd28f5ddc3bdfc497963e77f92f09b2e5eaa50207cc + c3b650ff421087cf7ccb2ba8066cada7d705cd6f50236bca6f4412a7e475bf0f + e2c61bbe622b938afac0ced65c22ab35ce4c4e1aac3f3531d3f6d6ac8ed9f524 + 7e723ada6e6ff1626fb2a07c11852d53b9bf23687dd8682105cbefc84a96ee6a + 20b22ad3f7ee582eefc831e4324c7cd34b11b937955d34aa8d51a39f1b4c687d + dbf219643679eebb69f8a5d548159087f5e1ebc1c0ddf80f4bd50a52a1142d22 + 3f11442909ef6bb1d2b14e95aede3e75a55f60b6850372577c68f1538baf4fcd + e99013da29dda722d337d212b62cbaed562ae8ea1b37ebee3c34bfb6c169dd9b + 062e64603c80528a8ab4b342b1669acc7985a98a197fa705b6609f3d7b30e11d + a67dd3a4011822d6b92312998f2801b7685f217ac708e1e18aab52d14f3213c8 + 972776f188ed9fe08c44d7af134386fef09d290294efa499e6f1326c6c6afb1b + 3689a3765fe673b51d5196baece4fe9a0fc581bd25e8cf4d1dc02f88c20aa6a4 + a696c0913c22572cd4b413dc0b84c1df68cff0e3e7bb0274ad9c1822571d5ae4 + 408221ddd59563f104b8c33664014da9647ac2d3bec454091f332d3a0ddd60a7 + ac33f58acc98e09d74bdb2f5cf3a74e9edca6d25653afa06eaf2e67586b2fdf9 + 99a48470fc6930de0afe887f1490758c98582d971f1439412af27b5b20279980 + 92c51398738c415ed378f496712907d710c9b34d23e10a7830215c74537fc3e2 + ac4fadce79bccf78d57dd429ee94156fbec0da272543a874b1514e3d34c72250 + ad1edc3ba3126396507ac2b60ac1190a8a7051302d0913c5dd28a6e610f325dd + 889ea8552b66d29e1ccd15007652033b7883e0d45bf8c4d9e813e1f907616f54 + 5aa158deb820361df62b0e7e5768be362ea04ef0c8454fe55f747e4e4ceb1538 + 984aff55aed201b8f4f5ed9922902a747899955a44af4cce34afdbaad9ea5958 + 8bbd0523f0e0ab7341c74e2384f0f6b3a4c29d3b97116077bdbdecd6938801cb + 630c4070645633d9ff8b2beb980554a0b19af8f51ec6c7d3c76805ae447d8a1a + 050e6145536b3351dff1412206c2742cb9a8babea173e4d41d4b8479eb6b989d + 8056205fb5e2d7cb36559ae8a8d8fb6599953e998ff61f21155c3bf218bc75a9 + 782aad5b8d39dcd2638f42cf3e1c390a4c2643a03af3a3d6d7c010f9d91584b3 + 680306429c56f94880efb04b657382dc04297916a03cc146c03d140b1017031e + 029f989225cf910c7930995692a757d69ed179c6785d8544af1ea2625cb6d336 + 0f6ad8e6c501802a2c29851b5c9b6457dfb70ef75f355bf2a25ccdf25c992357 + 85d49cf6e2ca37438c42069861b0101eabeab5f518ec0f8132029172ab41f8a3 + 42957e14fc2e7a73b966cd40814755043ed1af00fb3a1e96a69f1c4b5cb86fd5 + 9e23d3184486411f227f42c129cdda7dddf926df964200e974be024b851ae5dd + 3d174b811dad100c6862d73f07bdc9694a7c8c38d1d5312224c0e938f639d386 + 34ebbdf2585a4b01f7e5188560a6fd7810141de99b2eff5e71230aebe9c541b3 + 14f2c1733d999069a444a87e730a74ca40942436448e88054b97400a3ef01b61 + 7f438701c638cfbac4861f61fd32dce3a35407c2fff1dc125c1f630a73897451 + fc065b82bb398fd51851ad4d06024e88b00ec75adacc43b55912bb38ca94a145 + d411206e5a4804afd4792d1ebcd45175d0b2abdd466823cfa001e89e15903122 + 5db903e01e07a606788f2bee74ace623388f1e84f9577c735f1e25badda4f950 + ba3a1a6c05ba011cac4ec3ec295614c6908c48e3029e54938946792048d3a2b1 + 4fb2040cfc47a145ffcd70ce466020274a925d0a58e54ef73fac08188cf9e45c + 2843eb934399cf9533093ff6606df6280bd3cc56097514110d41ea2ed9af177d + ad3c45e01ed3010f0b903c53310259fbacfe7651b42e2e16d3e41ddba0f31d21 + 644a2e4f40f273b0bcf8507bb1cd88769f4a459193a50ad3af037ffafba1c5e5 + b04ad68529dd4e34d0dad698adad2e7191b7c6beb5bbe0e5b9318e755a5cbd42 + 48da57335ededceddf9f13a6ab93a6bb7f1ea1c90ed2fb7acb38dff6ffcebb9b + b114cb1940b5467b376266a80bcd951d6fcc6eaeca6c191d2ce0f5a113aee240 + c42ea730e91b7f2a010c29ccb7d8e1d590c82e8372d6be396dc8311ac2d9c10c + 9f797d18d6de29d953639a77899f66e55f99bc162ec463a70c5186734238a987 + f23b90e5b0af606aa3b23571c72a4f67d03d7dd3838f5ab177ad789e3f315e37 + d18d3ba6310fb02ebf955a7387d3327cc0bbfefb6f89bb7dc875d745edf3fe00 + 41ec260ec76dcad8a39f3a931e4da23d7d48cb6d6dd9fd10ecb73c3a36612505 + c8ba3998d544555994d19abbf248c495bb9e57aa5c949e71b14153796c085583 + 77ad3a3132eb6cf905df00ebc5803657237a6d19bcc639cb539e9efe4744c388 + b3f87c646712567a17f37a89c1760c414603c26877ccaf77b9bf6a06335aeb53 + fa012114b4aa94606030df458e1e093a21ee388f987d97b1fe0d2843e2b5cafa + c9454d7315b587812a5fe0a8fa50da5ac62fd2ae555466e3921afbb23a5eee06 + d4c58d245de10fccffab3568d7d4aad0f4eed7d1387b7c0a46049c94be695bd7 + b8fef9d655507d117e3eecc0867b75cab2997652a18a835bb792d89aace17ab1 + 498c0edac72cd26a9e6fdc108999392a5612f4d1fa8f8f0e873511fb207e05d4 + a062d90c65db45dda92b493cbe00f60abf719fe6f839caf82d220f2822bafec4 + c4cfe405915581dd2378bcaf9a68e57e94aaea14e8ee3251d2db1d8d978384f5 + 01e3f66d7686ec6082d2ce27e3648598ef53b012dbdfc26a8fbefc82a1d0fb25 + bc8745f8b50474127d4c46e9f093242b0960ec1df75f3786cfd16a5261dfeaf0 + 62013e4dc8a5eeefb2981ea79b7afe92c146cae0c415f3ea03662d0bc604a022 + b334a8522077cbeed4d2768f5580d90d1eb52430cb557ab1184ad7dee71a934a + 4410fe3d26096b516965fc42d273e639324d08d3f6a7f68ad97449f731363533 + d47dd50d0c4ecff7b112502aa70439b62bb52393a4a0d8da8fc363bd1881b2fd + 1d2f4ba813ed7b6d72ed5920ca65fdd86e630e7c8379abc463abdc1da6ea5523 + fca1132084106dd6cb924baa9ad408bbb046265334838131aad0c2cb071d3c23 + 7676925883e095647d9896f4004c4ae7658ec2dfa7336426ac6f674f19241fe9 + c2d4ba5dbcad71153a0814fcbeaf7bfb21a24bddb10b3d9b4fb5069737a9b910 + dbd64aedd0c22caa0c76c5d9a4bc6128bcfea57e0bf1ba22fcaf244aff01ee6f + cb857105b7f2d55a195d420d91705711ebe09f6a8670e4593c562b9dd4ec3d2c + f18e70047dbf3e2cebf03050203c52ad70d45547df2a884af2461a9be81fd5b2 + 2d8cac9a24173e147bce23738c533deafa2fad423d0197b63d98f0f7bd8a4503 + e1bb9a4d8f183121e46d6d7a09f8feaa462d2cb11b37d5c2380fa713582c6665 + 7786e5d08200d9a46ecc9ba02375913c4c01146f0aed02ee0946c10957b06ad5 + ad4d49095edf01b2ca614191ac340632ec2b0d72a71c306dbcacd010b42d7fb1 + 6dbc427e812a9c13c2eb2f8cbb0f0efcc0264dcc33479c874f2d407fa53d3eb7 + c5493ac0ec811987eccd6348079fbc9df3bb1ecfcabac7b6286bb07b73bb3a8b + aade1fa3ef92eed94e8fb7b6754ee45595181a67e1e7c5968dca269e268c0a76 + dbd6d0cd4061e89860c71cb6bc11657b45dacf3ed1b175dec4e39146ebfb5590 + adaa143efddec9d6090da8489a59314515e12d5f9d458808c008895531b2dd57 + 7060cd8dc387890397725e219ba377bdf186e700c6ffc4600def22463be1bb6b + f363c4354b6a39b7e209d711135844a93ce3353d83df429009fc1bc6d5ee4d34 + 17b96c56756202175314d18a24ed2b0fcd1456a7283932d11f50a593a25c0a1d + 36a08ada356622540d9cf313ed4227e83c6c8bdf0d1c77a63e0b763d72defa1c + 1aa26e32eae2ba1e4234be5607baaef9b3a60622423a9a08b00f5200879325b2 + 710354a06ac8b1b8f4980fbd54fc281e1ab472cd1ef200f7047b37ff863b0e26 + 06d94d7b9ea5a5ec5ce5d2bd1ee3f8d36673c4efe18576b5fb02c9fb1884d2f0 + 28cf365781540c7204b6d9ac510148f3ce037130aff4dfdc71f3272db57b8a02 + c3357872d494c8be133140f4c540578ab96e3ccefad6f091243f93fc9222061d + 4bbb4e1a928d5ab3a6f8174cceb609834cc5c85610f38200a1a58b7a831bba0c + 62e52cca514e97fee03a060592e0bb88a2e76a232fe9642a796364b740ca9563 + e2378202835e74e459f301679b5a10729d45072ebd0312d2cec3155244cd8221 + 66c1596938442025e7d42e097810db8ac6270a30fae20a048996b86b81958c43 + 82dab042a84ff17be9acc8bfa8648e6aada796dc4b979a129a7ddf6c38f3331c + 0c7a066e022f7b87bfc8f58a17c62fb68cf5871830be879379decd7cc1bac994 + dbf3fe8a8bbd2de1b2d0c11a826be5ec92745f7fdf7d379873f6902f8520c2d0 + 2c4f321858c134781c221ed42dfcb02ded4e3454fa8391cbf108164c15cba288 + 65cb381267bd601d965219fb02db411d7917dbb786a1bbd1cd46078baf6242f0 + 24544f857e169da4348376e294f62d82bb55a89af0b4fc5742774d138ddb101e + d47f5881369ec64616c2e1901e562f3354140eae601b84014542f4bc51f25c83 + 79176de6197c3b5963dc4de2cc0fa55acca5667120172ab0d2053a1a3494e28d + 0b6e789cd0c8f3761ef72750f5d58af604d00ba24ce462c7539c8b5d0c741b15 + acd872623d1342faa5ccdc9146d09b47344d37e7ab60db909c6a046bc9716dd5 + 69f033f890251a65968e8fb276c250f12ebf06188ab5a8c4897d02b0a5d34dcc + fe793520f2795a7bc62cea4fdae9b8bfd9d509b84a7763282adb5260e8a46a03 + 2467fcabd4d89114a2a39c139ca2c99e2ff5d414ba85843c36be0e982ffff61d + 35fc4bd0dff050dd88cc7cb8ad9242209104725d986810e130d1001e5b045c18 + 7cdf087ba2b8e6911dea051c265ebb3934db459be925f56480a69bbc644e630e + 1e2692316fb264e926e3e7fd23b56c871fd30e962326acf4b227e135f76640e1 + 5d3a26f5e121d313f3c8622c9c61a283fc935b15ade6b8808f5403a7141fcc78 + cc3d580883d7ffa57cca76f4a0185cc4f72bbdd1ced06b641328e7a025db0d5d + 0badbcaf279f85f77e9ded589791eb21659e6c80f21fdafdfa1eabd35a8056cb + a5b86414e1b8f7c3ed95eaa7e47613b809b7dd577ec8905e22ea647b7b419589 + ca96975e0d6898fce4b50a298f27f5e512c355e5034b6d2be1baa3a4a84a4874 + a8aaa7bb9b024f4708a3c934cdc250e4d74f1d7dd70eed0e6dca074841da9e50 + 7eb551fc9290dbbd214c652832baa595a8bbb864607cbf2ac7c4bef4b78e93ac + d2286b41d598fbaab79dbb4e26be359deff22fcc17e24f233a916b73866d8f2d + 8d6f742a23e08b6f4956634449c8686a4706822883079c2fc2acf2b08e4a02e1 + f9c9166505189e3719a167820eed7d7429b94a813da2108aa7ed6978034a3d63 + 7c3c34c1273add67edfc0464c931e48a349784bd0bd308b66f1d2993360aebd5 + 7e48be0cca53dc9e29ea24079b0596e6167d72ff0dd8a8faefae44ce11d486e4 + 19661ed478bec347da95c6775af904a5a1fd44778d8fe11c8f760bfd38cc3b9f + 74a6c173ac861f6391e44680351ea00d78b3250b05cae8a6fd5093cf30657da9 + 18f5a0e8abb9fca0087b042967ba35509d05617897d93d3043c034ddca77b2c2 + 14b7ac0d355006f60ad540e3fae1b969a6cf87834e03c49336dc99e85cebf3ad + 5ed518416588a042fa0d00bd2df7e47e3528ad1b5f386ee2ed13eac93911ef29 + 7b742d00a089f58b9090ed629aee8a9ffe69f17eb91bb57fdda4ddc9b38cf328 + 429ed1579074d3210eb90f3868de70960bd83c7f3c85e1cec6754e7dc3d36a25 + 39a71c4de76fc990bdecc4a60f49635d2624526d98c510d2eb586a08ebf3de1b + 462123b617cee735ed0e0e80cfb3057dba769b5863d68591fccf8e529e39d8d1 + f7e7c5e164b1730496418b8196961b35280fa52c73d6dd4179c94277ccefb488 + 265b8bbe41b9548bdd9801e2179a9789a0db474b413054b33eafd642e0be19e2 + bee99312c1de10d30275c92e326e4398258d6619dfe56444d8c87d7015119b3a + 9dafd6ee06a9829f79c62ec8687e1ae48262fa9fc6e32912e565feb0a50b879b + 0bc0f5f7b4905944604e6f3c59adb8762c4c936fec4ea3fb88d3945c4840b1f0 + 0b259d96eb041145b974fbe8a1c1a1c11a76c18e94132b491135e59f766ef8c8 + 90d6fdf96600590e01b54078511f83c32105dacada515956cfa7cd9a68341fe1 + f40d361d2188b759c6e2a50efcd7f3d15010b5959e5ff33c56a0258a917a5c2c + 2b841c1e67ee2add2cede5fd752781b7ff8532775963421c7546c9f3dced6e8e + 46224abdf2bdfba4e8d642bcb9b43b9214fc47509d1708c0d21fbcfb57dd7a18 + dd97ffbcad0547e24f3d81d7a8b536b540c6ab443f1819b012b6470d5435d1ab + 53887f76bc2d9cfc43e438076dcb4b50c294d06022e45881fce4b332aec78efe + 716986e37b59d3b5638de2db5da07934aba3a6ada41ef14fe148d70d8024da6f + fbf4fbdf4839241c39114667320f2adaa770c77b4285dc99bffdbe4239d8d1dc + 310cf55e3eb9a979953b2c0fd8f11119cf42340716dfc7cf1b12cbc2b32b9d01 + c6f495a2c8e4443730532f1889476818e29be94eaf7cb88c3730f5eb46e5c3b5 + 47e0b62b58b3f761aac807f1b1381308f022f8f92818877b9da36663dde9c1d0 + f7612314147f8bffc98dfd857181ad46463f0798a86838330105baf4bc640dd1 + 51c9d2c080fdb2235f6343307c29729c9fa1ba173e15733cc42d20c8fcad04f9 + f8cf2f05cdeae82f5fe669d39d8bf7cbb8a7d64f0e08df4c3448d93a4d3e3fde + b3d92476f36c95099574f5e06f75e9f0767d9e49052052be236546cba6c0a0ca + 9217ced0711c754f224de66fac0f461db777cf62a35b908ffaaa17d93c6eea9d + 76a46e62865622b7750463bc225245f33c7da393ea1964d45a03787de13a44b6 + bf00f599501f2cc859af0c8a4e98c9f43d71e8ddb5114b7960bb24c146c3189a + 46ae546b227fc9f2d32a024fc014ce776a10b4015b3c50cfb763954f08472e1c + 3558647242f15b4468c8acf6b25190702ead07e2b34bb7fe4f04c5ccd49e51f9 + 74853e221de56f430636e95b3ba8c7dc778ed208806251c2f240605a9fff765d + 06de549af433a307afe3f69f8fcf3f1dbec2b1f8b7a089c9152b97fd8ac9ffd1 + ba47438fc9eccb4f91e127ecd61f78403e8b2f69ff1079666d5dd4a84918e78a + 7d6c32d1876b52a53d7fa0eddb053a663c4d14e91f863728b1e465c52ad24b6e + 01e551911ea7eb5ec7dac3276d202993fc7885a3e51e5b9b96b864e75be1ce38 + 27079da4f2c651e49a2cf95933494a6d070e59be3e8ff6da40c5f5eec5a5125b + 7d4bad809d97b3c34ede7d07b2e7ba332dd838934f11e4da4bfa4de069d49e2a + 789c6a70d780e18f8678630b61abdc799cf60efcff9b2023c6dc481212c34980 + 255e0b005326db7cb8c665b320f4d9dde9accfe37c51bbe3af9ba020d77f789a + eef01d6de8ba95c751d28fc65be954329a + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMR10 + %!PS-AdobeFont-1.1: CMR10 1.00B + %%CreationDate: 1992 Feb 19 19:54:52 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.00B) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMR10) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch false def + end readonly def + /FontName /CMR10 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 2 /Theta put + dup 11 /ff put + dup 12 /fi put + dup 13 /fl put + dup 14 /ffi put + dup 15 /ffl put + dup 19 /acute put + dup 34 /quotedblright put + dup 35 /numbersign put + dup 37 /percent put + dup 38 /ampersand put + dup 39 /quoteright put + dup 40 /parenleft put + dup 41 /parenright put + dup 42 /asterisk put + dup 43 /plus put + dup 44 /comma put + dup 45 /hyphen put + dup 46 /period put + dup 47 /slash put + dup 48 /zero put + dup 49 /one put + dup 50 /two put + dup 51 /three put + dup 52 /four put + dup 53 /five put + dup 54 /six put + dup 55 /seven put + dup 56 /eight put + dup 57 /nine put + dup 58 /colon put + dup 59 /semicolon put + dup 61 /equal put + dup 63 /question put + dup 65 /A put + dup 66 /B put + dup 67 /C put + dup 68 /D put + dup 69 /E put + dup 70 /F put + dup 71 /G put + dup 72 /H put + dup 73 /I put + dup 74 /J put + dup 75 /K put + dup 76 /L put + dup 77 /M put + dup 78 /N put + dup 79 /O put + dup 80 /P put + dup 82 /R put + dup 83 /S put + dup 84 /T put + dup 85 /U put + dup 86 /V put + dup 87 /W put + dup 88 /X put + dup 89 /Y put + dup 90 /Z put + dup 91 /bracketleft put + dup 92 /quotedblleft put + dup 93 /bracketright put + dup 97 /a put + dup 98 /b put + dup 99 /c put + dup 100 /d put + dup 101 /e put + dup 102 /f put + dup 103 /g put + dup 104 /h put + dup 105 /i put + dup 106 /j put + dup 107 /k put + dup 108 /l put + dup 109 /m put + dup 110 /n put + dup 111 /o put + dup 112 /p put + dup 113 /q put + dup 114 /r put + dup 115 /s put + dup 116 /t put + dup 117 /u put + dup 118 /v put + dup 119 /w put + dup 120 /x put + dup 121 /y put + dup 122 /z put + dup 123 /endash put + dup 127 /dieresis put + readonly def + /FontBBox{-251 -250 1009 969}readonly def + /UniqueXX 5000793 def + currentdict end + currentfile eexec + 8053514d28ec28da1630165fab262882d3fca78881823c5537fe6c3dda8ee5b8 + 97e17cb027f5c73fdbb56b0a7c25fc3512b55fe8f3acfbffcc7f4a382d8299cc + 8fd37d3cea49dabdca92847af0560b404ef71134b0f3d99934fc9d0b4e602011 + b9cfb856c23f958f3c5a2fbe0ef8587d1f5774879c324e51fcb22888b74f2415 + 50d7401eb990d4f3a7af635198422283cac1b6cd446ddbcbd915db9bff88844e + 784c6bf7389803d9450b0c21756a017306457c7e62c1d269f306bd3402e266de + fc3b5e7d8a8d2f5bf0fe6ddd40d07391df4fad4a6018dce29a2b8f692b29f202 + 3a7c0e66de8ed85c14f1f8492167357f51a7e84cc5d92e0fee4d81cf7fbc8de5 + 2d2e7bb57142033993f9c08c315abade8dbc4a732e84e142d3bee51557910e12 + cd8aa37c459a5e6b7f5269f59078aba3be4641a11ac48d0b625c8325b38ec08e + 4c9e5e7fed976a5650d99d82114f449b9ca14c4ec957702295a39a93ef93f618 + 99b8ea06b092c3c1e503e6e436e0a9fa22576c8930ab3dc8c20f5d82b69cddf8 + ff4dacfa9c54bed5a3aa3ea5b129fe96be632843b9b6bc91b615581a985db56b + 1e01ca60ee69ca92cf5c0882ece62edad3e106d835348822400f0b66af658f2a + e56ed08f8b0010571807009b73ab12a8cf14ca6c71f03c2a48c500f9d62266af + 154a6375ff600d9bac3f05ce34142d6867a79581c533176bb2f3117336671e2e + 44638a97167e2ea9644e31ea16c2ad2990ea33c54001e0c8156e6de8ab6a4d40 + a7137ba275f39589fea2e2db8256adc103d6f9cc038037a47e8fd469c5f98a5e + 3c15bd4ace40d340018b1cff7d1ed8abb0ac57b5b5a2c20a51957b96c453edb7 + dae5affd91a46d938fe0a13363001d844ded4323f1ee6d30012aea19b024a552 + 315505535c85dc26bad31e09c50e6512802976d298c4e90d0044c362e6bf3ab3 + 62a454ee93de25ce54411090c29e9d75c80ce26a84404bd9de3aee0e3f921ac5 + 87f907572b8354a5c3165eea7e8b2ba4e333802132f760b41a900c698eb3d273 + 8bea0aaf7aae96a558f08b61aec7c7d65b2889bb7b99800cffee5ba19ac90fce + 11437be1ddfcf0bca5670b543b9644a71c8726d0c1005abdb96f6e0cf7caaa31 + 95017ca81519151c2c0b04f81e717c0691b63a76e9b25329ce2625b711cb7bf9 + 9d23ec2bb5ec8aefb8c1a3b422ad617b3da4d49685fd44cc21a1fe5e1541163a + b3e1594601d63c7e98801d7746474377ce93f81404f3570afbd5dbfe77578605 + 917ab96963987e6efc2d3f99fa56ecae6422579852567f90cc90e4ef6d6f71d1 + 858270205477e221018a375ca83c572b3f972c5181d18643cecb04909d84cf76 + 7174b3c0c8ec69bf1e9fdfbc0fc7ed97ec67d878ea4ddac8caa522fdc6932df7 + 21b81af837ab56b547d4799241310d6692918fcf8a46189a78d6638aad7cb446 + 2d8774ec73d184076595c94c0b4a8233c593a896c1c7e1f6b3f953a068897fb7 + 6523926599b073ffa918a82c85a8b5185e329127301849bce77619fd46d40239 + f4bf13e2b8064f1eb4d6e9c83dd4bc6f2a59458c53dd46d2c1742e0751b14e18 + 0b8aba11b226608b632034cdc03d994854ed430c204d4e7dadd1dd46332fe1e3 + 9918585aef0c012289099771d3a9eaecdade8f4d7005807a9d7ad9e5748faca6 + 8d6dc63bf01d5ed993262dd75df03c201a7c22d07f8e5d348da80fc12978b761 + dd33df9cff6895b88672c62660b9285d48969ead8bb1f9762f044d8e54dc3e4b + 6f88284269c730c8fb7babdc4c1cc31eaab91208f9c7e9b7bee181c42215284c + 17298577616020a4cb5c64e0ea081e043f36abbf551f364143f93d6e80c6a6a3 + 027ecae805411368a42f29910ea67af1bd0c1828c79bd919946278ff48d160c6 + 45986c242a501b1bbef4a1cfb0024114dbef8b69deee5d672b72f8e2d02d774f + e70644d378008b690756ebab2c4943c2addb6f21992e8920bfe912f413711564 + c8061e5cb5b4254e873dff293a61fb77a7e52876e155d38a077e089813a5b830 + 9406c31a83aac8b9717c54fed6b6905029bc41cc9d5ce196ccdf823ce575e28a + b739e9242022a2702d5777ed40d932ae2d12b10ea658c5356067c562625ac931 + e693e60b0e10a4ffe21dc182694f8fd63d1734b1cfd82f9975df79a5bce2013e + 80d48fee2b194ec4fb4e54a190f5f3cd42cfea2f2d410123c5c2b75b54756fad + a04dc19395762e26ebc92568ef5fcec65987cd20a8d35ac22dbd49a24e857733 + a6cf5725376230df4cf30ea50d270563930f25a82f2774e3caada5a17b00661a + 20e7820bfc2a7fc6333ec946a8a0e8dbfbcd5009b87e6267d7fd17761c507431 + b685c1acd382caef7c57d570b9a1b560fbee3594092a3b4131bb7cd60e3e69d1 + 17eff9a003aabb64ef2ed6794f183f1a6fe83d7aadb86cde563cd785c6a82c99 + fcf12d2cde2d807276535c12f48ee697546a96a0dbedbc8223e6056d6e11501b + 1ea8173ff64a82186b603530efbe1f649b3d501824148be323a92c79ff53d1cb + 1f66755722b77b87f71b9c788c133386ff4dda1c8312941d0aeaa20c9b8f99ce + 696470540987ed11e59d134c58f663979261c61bd09d9c22a1099a5851f3b595 + d039c6ecf0c24c94e84d39901ee311091f0df686b840800296a39db284683dbf + 3b392abef88aa0c13be53777e6c6153c9f8591ea18bba94d7768eb54971b017c + b0ddf34cd47a0b492a363d3bdd0f57b0217039779daaf3afd1390f80604b70b9 + 97acdbb0818b6f481ad51e17863dd6d5a47584cdd6dc153eebff4ec6de822abe + 5fbe81b2dfd593d3e216b86f6923261e06c0597f16313acaaf7b4586d0c4b939 + 273d164e1380d6d5208ed7b4803eda941de1046bbcc2735f0543752921d274f6 + eb3f2957fde2719511f621f7411e2b827712028132c24a3a343ab7f3b5e2307a + 6a92c556a2757267794703870c66171895d47c1115848d1d01e5e1f9277f62c4 + f9699db4988bd57f22d72fb3652cda8b52fe4d9975b5006be6038c691f0cf93e + 7c1b388e7c2cae1a76ca083da10a22ee091fe66ea4a98c53bedd01b9501ba6e7 + e32ea22f8532231d7eea7f73ccd8781af33eb5b2e86493d7172d98750bb75b3d + 7db6af1b24077b747da12a3b7097ecae90b7279e0050d0da623396fcbd1b4eb5 + 4e407ae23094ead221e7389ccb8a4bdb419408746ef11f6d47224ab388007624 + 6ed88cc272a97972c35be546d52c0fbffcd6d31e54d7e403ff7e7c6e6de2811f + 25852fbdf96718b3d71051310f33e371f7a04bfc30de2347e0cbc0039b3c15ce + 06edcbe4436d7a92d86afe23d69fbe5b2e508667899ac7d17652333164020723 + 4793daa576fb56ec06c3ceab01714c1283a2f791e859c78b148d328c0e8b5a5b + 663c9ada07b8e859f1724d45c2d8cfe7da9999179ba42b1077089710f6c2a57f + bb729179f582cc994956103d269c4d28facf4d81ea308924e4ad673813ed74d3 + 1093912079ba720ff1bc84c60f102cdd3c09129d59d01f98ff69b29a580a5708 + 266bb259460e7f700ce067451592dde51b320a05b2a9d7a7ebaa73f7760c7789 + f019d975b9ad40c188f8473d3a182ebee36bf263da0727735afe1942540647fa + 07d88bd4e03670d8156c708897417d080c9c5fe411abc89108fab8dd88573017 + 51160336c9811b5dd129da825f62c37ff6653be7a08dafa573b59eb4e1a1121f + 9494b69ca0d4026de4b2d3c96fdfe167ee41942b8856d8de0366a2227219987c + 931c43da21891beaae54ce0ae5ee5d1ccff7f7d4450da9513b997b5d6b30d5ed + 7744bcd8a0f9a8e4614bfbde940dae46525952183799abf7e34ba7469cbce170 + 34d7ec4355c49e3c982e7b40ad188b870ea31a3926b103dac51dcf478caa40e8 + 17f07696a05f403b4c9ac678e3f6f68c8d9ccdc89759c79db04e6b392624a969 + 207a98874f8a01cf9920c6672027dcdebde92a6d20b896afaacc0a6f064ca1a9 + 4d5365f97bd57e223e249bcacc96cd5e513ae8853ae0b88ea4adbfccfc910496 + 74017543d7ef4123299d9937f7a94fc060635ddb17b5cbdcd4209b3e00e70e5d + 3dcb612bef9f321e96ab3c9300631662d17b71b75e79c45f579430333aa498d5 + 0197fdc8924ddd2ae769c5009a93ace3601a8033065ef439bc7a4381d12920f1 + aded32fe59322c02e24951082017872a23458653fef464e32b4f012c77511e80 + dd8e348783ef256e23f4f200cd5bb8f1d7a846b7cc75defc5dadeaeacffdafed + 995d3ddb42fd6e965e0103b3caeab8befce16691175d660b31b742f2bb29abda + 521022711b75ce2508a6452d8fa076620881deeeb6ff7b1d949b2346e5c1fc8f + 19cc64e0857368da23ff914cd5a9bc853c4485c81972d8a47b47c947a2699556 + c4c7b4765293341ce22d3532eeee58761cb6880d9a74943a54334f2bbaf539c6 + b1dbd79d31b90f84139c5388a261b8c7732c9d05e02d73220b298da449323376 + 928b3aa349ccfe6673f1ffa5fff2044888e768d9f53dc1038190fed004b9e0f6 + 0b5ba8bf35531d0fe3e961e253e5ed5790675815317fa4d6d2ec9ee64f980f88 + aae786379c2bfe56e55c88f9643aa8fd069171fbc21caee422570b5f03ea2fcf + b8f110b1d8236452c8110e88a2cabb60a9ef1053859eec93779c5db3225c4e8b + d31d696f1dc5e066391bd74e34846c5c184baee232811f68067ebb3521243709 + 89badc8b01b5ad3770e667c343ab82e56dca3d90c7342dfef25d016d3ff2e94c + 24db20552cc21cfdae862352ec7ef7284704975f4c143a24370095e92fcb3fc9 + 50f531bfeffa679b5c69b7e383dc49c7143b70dbade32114e95231caccac0fb4 + fbdd7a589084fb9bd7e00bedff65bf4524222048db7b1293002d6c99befa5211 + 4f9b2b63587f63fe3f629297beb56660db8c22385c63bf140663df78255d5b1a + 083215e25920d74a21db663d54a22a47f5665cfbac448db0732aa33fa4490a70 + 6daf564ace0db3973fb92da56e987794fff0ce5eb2c790128041f05a25f9539a + 549b6bfb37ae8d538a68b527bbc1605ff04d5b06a309ea9be6a5834103aca66c + 589e718b89e64153c3c8727ecc5e0b51c15e02ac298dd2eed41766147b1ce8b4 + 0ded39cb02c8281465817661d507820c706b9ad870ee2124f12418c41bd08e9b + 6b332190509e037902c713b584eeb51217792f3f69b5f0f1dff7920988814489 + eb21e7c1a607559b0d386055265d6f40e05f4e32333581ee03e3bbecb53a0949 + 6c28385440d02d736d8f7d766d8845bf22d14f3e115d4782f3665928320c7b4d + 8e397eb4eee4f1272945aa2aab457e756f5de4dced85f9234051e15a35a963ad + 44825b51c1431f0ae860723decaf742199f0f0aaf18ee069ea92151ff5289111 + f4ad2753f4605d2ad8a002064d7dec0c81628b2b7098134766f765d090699d68 + 2496734d5b5fe551ea3a76e946dfc3fb1d6f8a6621f5ce119450ca14f2d804b2 + 577f025b22a74c2e9f59efc90159befcfcf2eca0abf8f4846af62b94ef484d06 + 60a77603b15f99269ea231bd6c180ae5292924ecb045335055d50ae4536a030b + ace910eeb736645c9bea406b340ed4392147699faa45bf8d518361005adca08c + 6750c620fdfd70064d9fa12cb1bf5843f1c7cec067cf59c0e6793737d510155f + d27511e34127d0f64f3f41cb5731cb6edd177dc08d16acfaea94c0cf2e4be757 + fa1905d2571ae0338a1c89a7e48250a0bd4d38dcdbe0249ec5d13b1722de756b + 1ab244f9ac3fa8ce8b46b45155f6781d9a1fd8a206abf2d984b446b155c0d2c6 + 078d65d6713b881959b6533a9563ba85287eafc26a4f048962ef36c1dca205f7 + 73f20d0ef240266a9d762ac36fc28308a6f108475ce6144b0d2f2bc086d46182 + 71433c3184346eac46347b0d35149d1d75cce00549efba02e714f36544d37af2 + aa0ddae14feba5c5e6ada8a5c74cb29ab1d4b6d76c20f27184cbfef7f54402b6 + a530f63b761541f98a2cf3678f40c882fe07fa3904e291e7b022423e147360ac + b2848e3eae8e20db1aa33dee3d95dffb3ac3554ceedf300d084b93e28d2d0b86 + a08a913d5abc4059549d18b0dd051dff45533977eca10c0f31506914145f1099 + 251af85f29a9f42ccf9ffd0bd67f9406ae6d2ca31ebf0c5f4dc64f3f703c0394 + 596540068d2564d3d1f9ff5f608e495d6e551af2b3d1209c74c90ed3cb5bd538 + 2039d13068d633d9d8ae5fc1c7e3a8723daeb8915e2c56066622a2e752a59547 + 28b6986551f602816aad9c0cbac2576baf242aeaa6dd6048b3f2f35ef9024a3f + 1f297960aea2db504659e01a72bc56be3427baa29114044b06cd10faf7861401 + ff360c22e0828302b48a03b0e35fe7437b0e16449e01572e7b88f94d5aed9b2a + a6d3c838b9bed09df8ec1cb200dd352d54da1a902cf561a28c3763e04dd443b2 + 77a68de746166ee09a2bf274c14bedafaf89bc76a6db23263b34e89885edf953 + a4597c5b1e1eba795d453465463368c0778945752d77c4870d2ae22680fa76be + 3c091e4d97262257962bca1b68927d62a6838a60b6902b5354eb95e7ab683dd7 + cadf66891843b9e7621dd38c0bd6a6802a6913c0fa8d53604c0f6881ab0e07c6 + 3c66d48f33404f6f1b3b66f2887c2ed9872409428cd3e5a83203c1bb1384eb80 + 3e44260be74be4d4e383b0ab9b9640a1b92efeeb4b3964cb14ec247bcf8799fc + 4f8b8926a2e153dd395d1f778e293b0da6911dd585aa369998a7247c6f814e17 + b17c3a18102ccd72e08f18491f51e30e58776280052eb69ba487c8564d851eeb + dbc032b2185c4a99f99fe6dafc3889894f15a03e8750df46231e2a7631eaaaf2 + 55d3c52f6314dc79ed8aad1a0a35f9fa57d502b626270f1fe64f0cb72870f1b2 + a70b4422664600a6f0e431cc2833560678324bc5bc03b78dec1b8181fdbcc171 + 034ed20192688e7a6334cad947e1d8de56515f53e5878c9c28adfc98f1de5716 + 7bed7a51adbf2ba28da5171de79f68a4c5f950581f34c96187e3bf807e82a972 + 688255deb8a51985876370d3b61252067aca215b9c32f956d5d9f8a2e2a6a54f + 17d89b4670b6d0ff7061f92ac9c838001d1e6113405ada20b47b5f3ebf9c3a0f + 18eec6a0026b63eb4f5ecd180125f417c4c4c79f8615cbd4b61a67f35c2ed40f + 4aeca86fbab366e09a57ca0c520752934639b802fbfe12701198f07dfb7aac58 + ba7d02abe3ed7e0097e04d593d40c6516acbef06bca1931d0a461f9f9c9789d2 + 0a3ff442790e8508f35428a12ea651534e2adb65137a89d4bf3f588baca6a3e5 + 463c650a5347528ed6edcbdd42e7c15468ad2922d890093c98ed678256b0ff37 + c293d919805ce662eee8f220568b81cd77154870a26611363ba29b1426477ee6 + 3c3be0d452483c40f0b153d6dafef6ff10a2bc6067dc50d43888c717262d9d75 + 0ee1eb5d26164b252b56cf74e651ad0476d3e3fa9b7c2ce5285483f7ff474e51 + fafe59bba8ec9fc76613d088ce4099881521e63798a4272f7a12bb987ffa7739 + 382ed63011b977633b27aeb055886feb07dab6eeebc538890aec126c236f8ea8 + a41c8f380ee20e7379d1afad731ea0ab31203c56ad20d91c9221fa171d7dbc18 + d3204712b7aa86ea9fe5f5e9c34304bba36d3437cc4e917917a3f195c48d4fdc + be96848ef811dbb5cc7fac045526cd42884f84320c3123fd66d9e54a6313a2a6 + 6853020f2910eee519e7979a9f6dfb92a0d0a8929f837fde0271dc99266c113e + 92550f2ed905e1119eb8728f53222c75b00cfcedcaa52c73159e595a751683dc + 18d64348e689e9a19ef17a9ad3643b431b605f7f3d7f50c5e0d38c5be9bedb45 + ba501039459a5243617bd0df47f14309a9063c0b962a82dfd742c8288f7fff9a + 232be485afc2002de2f72ecac99e1f2f02ee655419908d1ab0d19cc9ef12cc39 + ef2f3544e684d995cdaaeaa3f0fbeb8ba8e99ed4e91c0fb7151a43890131184b + 533130f61742e7ed7222b05f7a567f3a74829b2af0d7f65a01b979fcb9b02de2 + cbf0efe8f60b3ad8678c8db7bb422f24a8ac450d5b003c17ba929b75565b44d5 + de4adc0cb142e3d54e84c30652ccdd445392851a272e298f77a572dcff43da16 + 3e50b0f341bf7f9f47884bf7d4c68e627a603a31871d58b19156e6f70905709c + 2fda9069cfa285347f6ae2cf5973c034871922ff9b4556195b062891948dc4ff + d5f73f0d052d8dca84f9bc51cd9be6a518b61ae71b81d0a8f7f5350a274a8fe4 + 5c19ca5c1d3b51a5c359a039056b446b70a31dc7a35f7e63e6d05e27c93c4fe4 + 0aee946bcf362c5c9a95b1d6825ea926947d83d344f56256e672a1a94bd416d9 + 6f491009c94416f9939c5899af6228bfa860c4a755b9fb256b30f49d28d3dca2 + 7fe154594ae7eb0a10c4a87d1af98165c91d57edf1d86db950a4511a862fba20 + 1c00631f07b3d597acf182f8b6c052f78856eedd16980c86f02331d694c93b4a + 40ef7748a1aa207a5bb8e8237fac32511fa379f48e91243a46e68e9a75c6605c + f5cb3652bddccd777072537008b79cdee0e4aa6c39ba6dae1ec75e4b124826ac + 269eeb3d4f57e83e8116f38319c4d4fa336d8263a51656da78b79cfd4dc1af62 + b8517f806c83ae84a5bd3694edf15591d70853242b77e0145a726761430f41f2 + 628baa00707fb0b2108adfad76263ab5242d5487cb5417a5cdabe35b136f66b1 + c09cb678745e3e9f08316013002979b27468cf6e71529e7a5d728145fef29ad3 + 0b29be1ee4ed857047e46d69a89fc399b8d1433b3cd71a23b529ddd8126719a8 + 400f3e6360fceea4f0d610cb20494a0bbc583f68047b4c6ce37b543b8943ce56 + 33ef7ebcdb65f46c66a2e678824cd2c1b30f0268c985262222a28e7845861b23 + d26c694ac3ab6b11415009f2168a5b48d5ab29993516e70ae6c375de1d717f7c + f80ee42681de360d40f246fdd57a474530e4c40f160107f76b745bc6c0c1cd02 + f86eb7d4b935e32d73134f39b8506ddd6bd605a56db034a4799884175015d9c0 + 1772e7aeddf3b7d8469d8229db63b7e2047eca61a9c499bea7e3ddaa1e179398 + 42410e1bb34f96f30dee7d6a18b29516e2917b569104941c7111741d139515b6 + f5c00cd3213447aeee0aa4467d4a84a896fbf8a905097e33859198da462f3c95 + 31f1be4443b67f49bcd33d391bebe7e62035bfc3fb2d41df29485f4478c90be2 + f8270ef994088680b5e737f2d7516bf7bba8cc171730a471ea6216fb58c453fb + 929b7c764e561b6cfa00afd48db3c4f5a9119f7eeb4d295ada50b4480e7c2987 + 42f4cd6a670f9d7ac2741fb7b9124fc4d1c88df6966b107ba33677775fd0fcf1 + 52113acd2f94b1b0b6dd85ff3740591fae2c9a5f7dc9f30cb36f7366094eb74c + d89f205b88e8d14211d7109d46ef9bd4d19678d508cb6901622fa0192c952c62 + f9b57a1d9e4b64b1a3df13dac2f70ac84bf5cc972f435cf99a953e34865f9d00 + 3cfc09fb1059a22952e4177b16bc75217e77d88bb4a160bda25cf63903629a92 + 27fd76253bc8f73482b8e131044efdbe4bba54b432df85b760f331dbe8d459ba + c8627bfc36d01b368934de658afc4c4be5b8c74fbef69561aad595c2cf357742 + e4cf6a75a4166805af2577a8e9399634e6e1db7f73ab47f655466ecfcc02d6c2 + b3b35f65d0cc82c4df8e13e85da479419e65c26393cc92120f62c3cfa90c6e16 + a14c6ec0f02547152e56dbc4d1d5e4fd036e336d81bddf4fd9b2bf7569fc100b + 096c939ad765d36d8a29d9692759dd4b3c1a4de737d73328ac0f77a9842c0876 + dadd172d65ada6bef421240e67640bc42a49531759fab5c7fd7c4a4e77968039 + 9756ec31e94f135308bced496345adb3d8e5a5011c80b904517c51512645e550 + 1e7b689be1ebf6810d7866fdee6432933c475eb0da6b28461fd2b64921c40816 + a7769506479b2a33b705c73be072a1ebb5593c59c93cfc3fc73b845dd8ab2506 + 2d4c2d4dbde102b971afe3f05f954e8b481b2ce21cdb05ae3357737db1056096 + 15d77215c96d9eeae3133730735b4ce5b634174dc5180bb14986a90571ae2944 + 5a99c0d7378b1e7c1773f9f4f6b77ae8bd0abbb511d1a0b2018660bc48904123 + d8f3c7121787459966ef7f9a8bf13c988eae6a7402fcbee6af66f6da3063cad6 + c2ec908aa4fe5719d224f7a65c1de2e6ee938d541b87f59bc4a3d5954392d379 + 80d2c6b16d5dc4b882d3c2b724d7537f8327df3553fb6ea6a9d552e442aafcf9 + 1d6ef56f170cdbcdf42e296fa1cea075fb2a79f87eced40bc922e0ccae9068c7 + 12d7f663cbc280b64b998e44f4f6128bd0dde522b7d975dd12743ed3f6d3c923 + fc9686917d0f64ac675c8c4d8e52acf45318849d64415083c48b2f44fee7268b + caf4c15a6a6eb1b0fddb80ad8f4cddff304d53587c54346f282de01517278c50 + 38903c9c07cb2a602f34e88cd3cfcd6de6d4500422dcf607e6f5d2192c4feee4 + 8eadd9d69d994406d827c836587dbc142c2bbb72939e468dd1698bd6709b70d7 + 944b6d512dffc30ff4492524b69b2e30821756d2260aa24a4e1b2215f067a8b0 + 10f79d139c9b1654a28ae1f27058e813b7947d9ccbcf98b014668a98fb2279cc + 13c4fa00948733d24498e54b3347943f6f23f13fc89f4c53e9c7a144e679f98b + b61dbe6a8104beab7e5ecb1697fecab9536dc82eddfb37d8423500b3a0664099 + 99d75da1153c519a4153d6819cd42949444216d1e17a3ffb6f49bff42acb7621 + f80d69595c944e26b731217d984abd5a3a18eadd2131c600ab2f20c43e37dcb5 + 2c1f039a53bccfa8a3bdbcc2443c845704e629f146a78d42399351695a6a4342 + 1e3009cc592d696c7e356dc2aa16f32a61195a127bf4d70484c2f90302b59cc7 + 0a32d6e495b8edc1a533dab4541d6172f7c7ec7e42313dcea2fd90e294931920 + 841fa4a0387f9575a2c34c933f2edf736ce99452e226fcd7f381001d9aff1a65 + 2fe1d74c09c14f6f9414b7825da9dfbc4acf5951cc4b3bdfdc39548c08cae085 + 4570519315c0a06939b349c41ed215d01b9f9269e49020c9c2a7ae391cdf8de4 + 58ed3a0701ea4a5a1076be87e4913ed1ba1038c7ecbb8d7ca19308d3c1a6b987 + 5ac98c7a3e5d9cd40f524c398b38d146c8ffd7aa10ed1ff19ce9c0a4e64c1539 + a6bcce00a6cde9b17c216afaef5e53e8bb3368fc5db1bb38908f45b73e3922f6 + f548de79d9b00ef2220970a4d175de20c3f54dc1256f54533f148cbdf89e747c + 43baa59821ee557f70561a3e1088ceb16732b96b7317ba870a50c54a7607bf8c + 6f8c8d9697b64f0c937fc159d68b5e26a1d5f890ca6bd272ab818b9a65148f03 + fdfd2582001b27a9ebf4cca6de621d6732106f8357915367847ccb8bdef625eb + 25c24d215f727828ba0ef38472d2ac0380f4dc1f43313b6037c4ace6b8f0c2b0 + 2cacf09883cfe1f2a17fd345bbba1da143b7573d36a6c2b17de00f779ec1eaf9 + 5d4614a423dae1f3d553e8fdc5a659ebb0850b65c62eb09e2e0773394d0e4941 + 2cb06efb73badced2711a8ba6603d2a6f3e20805264093bcb1fc311c50dc52d1 + 2cb46ae1deb355d8a3a25ddc1723f6468e69e616e2bfa438f499e8e09cae137e + 824eb3aba9dbc7701516a81a8e0d166543ba70e4dec7b811ce85af18d7cc03cd + 71597ee1b6797842602c6b3ca696786cb4513edc65ac636305de75fabc75b2b0 + a08ff047af744344ffecd93c766593ac2480eced8a6c718316dc3f627336f430 + 7cc497f9163f4e4be3cfbc57ee14817ba8726150724067361c8cfeda118cb73b + 2dd4410e28eda7d96cebdc4878490df0aa5255b7fb78c64de3c57f38e25f08c7 + b9ae2768fa1afb38c9fadbb320c188198edd3a692f07f7038cecef95c13dc12b + 4c4246883a3fecb7e00fde3fd79eb4f5dcd1a74a4ace50844d68d8afe98621e3 + 706e6d0d7fee82958d6d623674007bf7dbcf61084954cebef067acd2cdfa58eb + fd7d2885381837d2c9286e47666a46c17ed13f98c5e724270e9b5755dc788a7c + 7c03b9ba5002b89d9129f6046087e497e9c3a5e1282b3926230b852100809a37 + 381b981dff24f870607c4a35e8a04f56e3625cca1c60467873b398966a66971e + fed09045947eeb7eb9fd5f994c038a7567ac655366c9946963c325194b614c48 + f00c1783a064f60cba4edcd01725d6778b98c09016e0a2be348cff038d50c655 + cdec22de041e3a53233bf81c911ce9f59619608a568e1ab0533516cb7c349d2b + cea0e25f820f92c816e67548b621d6a8654b13eacd7d5672b8f6fce596c46816 + 25f73519fd71c7cece70952d4957bc27f7542e4c2bdd73e05d5d707f8de89f61 + 05f484582dcf6d96fec2c5736951980f0c374b99e08a9c7628feef1679b3a66a + 1d730ba5bba2e68fb43bfe00b6043fb4a71b25f265aebb30afff6c47e552c392 + 5b198af5ab6b8095039fbddd297afa0047bebdf09c7d3cfaaaed25d379c2ece4 + 290a4e61181c109c07a4f40fa5a91eb25afc9d85f7c6ae1e8e8b224c9b1505bf + 188870f2d93f13735fe5cde7d432c40a913234bfe6ee6c5c3f3f6816d2d41b9d + 07af52b58d5e45812e0e07af0a056a9b428ec8136b21ef5573cb81efc09e4f89 + 199cdd4475cef6f159036aafbabe4acfe698b54f3b6eaf21eec621a03ead1c01 + 79d31aac3e935081753a3ff709987db3efff8429b76f57e24d8c008bd25d4b95 + 08f5f703f39a27899d5cc8053ae99f187d00ff89b4498aff95ba370b7048e76d + 47d6edd824af12adc447b5ddcefef0c89763c45215ba89b65411016efe927edf + cf0b9782723efeb66a0a440491b6c02ea73860e4305d69932482079cb7b2dc04 + d724e3f274888d5ad685b1a8228975d4af3a56bb7172e91ee8f748b3f2c3001a + 7d47aaf9fafc9e13d9bc7f1a1a1c12f994b8876cada46400e303945fa1443593 + 042df509a8f36474ab9bd6eb80d18b936cb7f7d625dbcb0f298bf77204ee2e99 + bdc663e5e893c830505ad023597b59eb9bfe254b1c5e85eb6e01e06f21f597a5 + 69495d1a8ddced7af3c9aa8e0c7e61a3993667055e23db3355b023411fb351b0 + c35c316c502ec6af2a951943e589a44cc3aa3dbed6224c00bc0c2c88313809b5 + 29346f33c4ce55bd59a21554c13aefe4620be15df0f7174cee9d57d650d29ef6 + 7d4fe65e6dfcebb7c910253942efa1287d25ffbc3142d9b366adca93653c330a + 607c54c55361ab09d2d9f5e139ba03d0899d15ff893aca6afab323d2b3ace013 + e56990074eedc6d471ecbac1a20c7ebcb89888e09b4e8325e30c2c6ff850c20f + a45c73bc5580f3d9638ad3ebd27e94ed42ea5e5cec793b8d85a18d1ee49521b9 + 239998790a06d7a898fc0e29d926bc4049373f80cf77423f6055b3c9d8c0a15f + deb1c1aec61799a63e2c0fa058a90e2258dbee47e3d4bad2742bfc9efb8dc41a + 6ba0088ec2ac91127016cef4d6dbb640c84aa086dd5cb7b1006dfa09921f1afe + ac0439684821f302c03fdaad219d5cefc48aae6c13adb686db0317841dc095ef + 051fc5bf449cc078fec323915559b921fd7457a0a1a04529a820e57a3a77d5cc + 88869b16c2b066aa7566aaab3f26544f10c6ce809914bdb4c26b735f4fc55d8b + 6c1a63491ba9eb0821f1ac9f6b4c44aff1293081008a3fd5130bf432ce03f429 + a626f74387ef2c9d9df806ddc5eaf20860d1585ab6402abbbc5eef891bc38f3d + 13b015022253b885f5dd01854e386571a3599c638007b714c3a4aa75c826cc76 + e4b214b793be5074ad7e4836666c38da82473f3f499e6363193737d85a7d06d4 + 55f442c7ac9c0a5b09ef4b6efebb7feca939cd0fc06e02cdc6fbcf43a645920b + 076d053ab3e5534baec4a887b7fc3c72dd316e014cb44e6c75dc6e6ed09f9692 + 12bb0ef9ef8cab46b5951bb96a19ddbc92cab542defebd3965b02eca1157c180 + 314ba01eeb5d65ce9493479ebfccd5851ae80b96ee87863665b519a33fed714e + cfe54f69f5b2242e0f1162d258de36e0bb14f7848f907ec5a2a2c9386c50390c + e36453e20443f46c6e5da52b650bfaa21183495cc909033b5d27137cadb4bb8a + f192022bb565458d3b78cf3598712bd35d47ed8dbb88acf992b88ee365824968 + 3b695602a97bb0e620d9d5cd9455f6958a187e6624667621d5da9fad07b3183b + 4f8e0ac809c1457b3cc034d4c1779b81c6a2149a081ec68412cc90b9fff47fa5 + 3490cdde8f19702bc9d90108d1f3871f9a8b0ae0d5fcd0d198efa0ff5c8b518c + 9568d341d1dce856503c121bd27439edad0fa06cf2d4c82ba2dbff975c6119ad + e982d9d7c10aef22eb91b795759b63a9d718c1c2b25e2c99d4f36a574f926ff2 + 16bca73eb1e75962ee6aaa14194dc472b6eacee333cc60f2976c8f08e2b7fdd3 + 7870c0eb88b3bdbc2d7531f863ee32b0428e0e00a00c12184a0bf8c856c9be2c + a18b7b70da0434f4c4e7e6a3bf0781cd31bc2364d7a09ff307dea1bc3481b31f + 1324ec924baed8fb451851f6bc988255c1c4dd53bb6836110982e11efdad9bae + 0044f7df88531968a3d2416fe8e6b9ad1f1f95ec0780855716cdd304d2ac5a2d + 31c12a5a0762327e5b1782574372f657e3a3b9eba1040cf996ada62eda26e114 + bd977c927dc39d4f4746a4b418bc8778ab444de271af3da2c13776db8d9f15f7 + 0015517783ebcb96a7a3778fb63385696ad2c5b373f564d322daa9e1038e2a9b + 3101be611932b26b1c765c6b4f40562e17a608335e6659728c9bda410b68efe7 + 1fdaa45eca69e2b1313a2519e6bd285961aad037a71f94ebc8cab81d35ed1057 + ee9f7817fc2f7fc20edf626b2ff22cad3f854153abbfff7d870a6a0d316bb0d2 + 0660ab3259d81dfa8e22800ff8955fdf2a8a60971c8916c922098e12756b9b48 + e580a76f6a252ea872333ff8d1f8401c57c50706027ae6f4334c968c40a991c5 + dc11de525842492aacbce87ced1925d64cdb2a3c67f7d7958fdfe03039385935 + bafce5062dae849cdbd4e4bdb4aec31bc91a4e56f3c43bca0b73de18d66291c1 + 49cd5bc41ea833857a61dd50c913cd9028aef309f14a56ff286252ff4e2a44b2 + e2b080a6d7768277a39f8e92e5f565daf683fe544d497c71f640f6830f7cc4e1 + f70dc6d6a560f4481953cfae657c2f83b48b40fd02386f431a8dc946792b7817 + 63accd0a98160d3b0c86d245618594f9d0d9381cdf4f9996fb85c9676a5e1727 + 7e424409166831b36ac64fb470bdc3b0d5f5b938fb13a7d06ea88765c2684ad4 + 7e1f0a2d3481e1a1c9cc95926d8a3b57660d5e335beb94dc25843a87dfc8b838 + 7819d601d6ec92f04c0fae6259ec370b98abc4793f53c86c6e417a9b2d97635d + e12b0d9b6dc51fdc0b1df722091ab56a9e684b833d4d922736b3de32b9f415d8 + 0c20ea388c8e8945909e6f6c365f191847f484765c8a568d53c8f73a0ba3f904 + fc210eacae324373d0137033bde24be9b038a6a3544d894e1b2323ca7b742672 + a441f8e9adc36b7720a79342bd1d879199045954e2629fffafdec2414e7b7171 + da70ee9e5b524a249dcc00fe895acf5fe8bbaf8c793125bb3fded215b02ee09d + d94d66c606f905a7e10ebe159fb58b6890d1c099da5d3f2ef707b981facf3e6d + 8eb9e1efe5a9deb7d2ccbd4248ca41e66ae0ab7e93cac3f7db135f605c66c219 + 571f21aea359bb32208c7658d423d166ba06704cfbda15dcd9e3aadc02cedfac + d358da18bb5d02c38db445de07fcf67769e60e229273a2c3d24c8700b5446cea + ef02a7a443fcc10136765117d3c20013e957fec05b2f051f948198abc10a1e36 + 279b9fb2e74baccc19656668d7cd8a038e6918c76c09161603acce4af330194e + 37ba3180edca3fb1900ecee7de290e38646a81d080988721fc2a670a3628cb08 + 1119a2b29ee93d3f5ea0ce8e602bb9e007479da900a3f0c62a2388b774defab3 + 6bfa04d89bb080c5b9815d08f8022cd6e7251b942212e020922090216a656f59 + b92289481fa86508d2479e11eb878c124e9ddf67e616a7428fa4f178e24210e9 + 93301b23938a6a4506bbe1fd312f22bcbb1c0f93633f95428eb3fc602783450f + 694a34e782ccd1fd6603a612fe63ed9c2dea4b1f736aa0f67d14db7cb4d873f4 + bf76d15d7ba269905c4eed41ce9e6c8e445bf306f8ae05f1b1eac749bdd1bd26 + 3fed4a6c0aed237a1b040b8fe97d86d309b92047435bd8543eb4d5b7c242a323 + 91cef961c8119a719faa8c5c4539f6a9fad675b1816f701dafbbf2b9e91c2282 + 9242d4e356ff29a59f2e8b40db48c2f60d5faab556c8d4b89ca51b1879ce14c2 + 8d53451bc91f931446ab1b8ca490193fa186c6a55bdc8c54f9ffb88fc6f3ef6a + 025cec3420a35f88d785135b8bb9e5ab68561e3cfa7c8b202136414bc2b7009f + 817ce6dfca980911e1884f6dae0e598c3c2fc2f4e1bf4b703efa44a09775db0a + bda8fb50709675a6530505030a0858ace1eab55b7b9a7d651cdc7e915a910857 + cc47a889299ff425b33138026fc349a76b93df582bd09d98769f3e9fa8727fb3 + abfa166e3ae3c39f4619f147c52f7f88c65c098ac8533f3146b78bdd738ed914 + 3d1ef1dda895e288a2e149a0086ef2b8125881f56e847ac9407a5d715f11c96d + 04d200a8fd8d8c4bb235889ab80b5d335642839ecdbc2c52dc55a5c1b8e5609f + be2d83f3ccc68d952694c22c75c97100dcd14d8101bc45b3b910f9be74946f5a + ecf35b69605c1b10299afc5d9108206affb65c667ae9a52cf311c47483778364 + 31ddd2b6804a412ffc252be49a05eef1d258b7d23b74541669a17aed5fd96662 + 022de8f3a5fb647feab8a7ee53e0f439516aee7f2b92e79db44ea1ee64fe8268 + 906ca2513b43d5f43092968e2fd6f5aaf40025edf037fd57acf1905ea5dc6537 + 0b18e514aaac97f0fadbf4c3a8488c2348d1816f5ba6bf736cd21447919b81d1 + a517b556aa3e9ae3f48d1525c00348097e1f5142849926260605a08fb80000e5 + de482e952e282e6f92177ba59171f8d4f5471a41f8fb4d9d1df3f8ac3f11f5fb + 6416bdc94814d9d5337aa084d03e74709a78d4f8fada3c77ba8ccfc072e8d1d1 + ba0f6adb0c4490f0a2a69158ef17f4a9e906a77be1e2e85c0c824c2bfdef67ae + 1c291e4a98072f2d58dd150b732c5b82e124f979e72638dca21f82c074641bbb + 9f621ec2439731719d347fcdbf6ca0f973af0104149490c6a172114f8efe9b00 + eecca51a6de409335531df7c93e486868d19536d3940fe3e12ad0379a489d989 + 665314dccc3ac6e0766f0d47b502d8e3f0ca7a575c888c531cc3a89ba2482f58 + 80e55ceada3e1af0645f8e0a6a4eef8f9c0d1adbf574b704ddf5ceaf685cfcb5 + dee0732693fce081f04cb8a6b1c3185d69a5f24fa584ae2e84503cc3607c9b6a + b09014847630983e4d8752779729f25f2e177eeff75996ab3b1da4b90232d139 + ec4e84ed31041260c73d2dff431cbc1abe8dacca8e51d80e5f8feeeb52d2a0bc + f2051c391b9e7b805cf0b6f1ef46fe172d947ec4c9699748dafabd935268d6b1 + 1e456ccd6dda56588b44cb05a1fa21fc74aa4026886a232c37c4192b49178956 + 0497a751db7079b43ea16a2abcc68991c6b92eaf6b273d29413d5141e0e8ccb1 + 52e54327d803a402f0203dfece7d341c4ad12236a803e6869a34355e2e4ece60 + 528c2d58702ca4ea84d3ba0c7a80bab3b03b90d9ee550330eff6785d3bf4655e + 711d5ddac142d7d2d68279f4015072a5f4da4b3b781f7fc204861262149d67fc + 87d148df020050f56a8de9024479d973f8e6cffc304b7d913142e30f72789ca4 + c093e278ebee0e243308ce7b5c6e10876cc8c71ba62938cc7846a26520971b35 + 2e682158184ad08ae7d1e1ea4816e87a2ad5f5aa7e6983fb95cb11bc08acdea3 + 2e3c65727c4e15ef3d182b6ee7b3194795311253acccbe53037eba0dba424609 + 85471361878858c4e0e33ecb5b3391c78d978b2e0edf546bf7ab933dc269745b + 26f7f7c8f1527ca840a800aed0d50bba1d2220e4e45ea744cc68a30c07727b50 + a5a3b6b57e012605335c7da4f8c88f01a8fd728797e69c6121d9b488c9aa6052 + 36e913a2f949ceaa616bc66b72d5c520393281e275bcb4e84292891d0f72a883 + 195b002c9ce3503b66dcd377cf5f4f74f2147cb836f2800b418ae52a1bd423d2 + 5c135f2405ee8a9f0742f91a0b5fb4af60f4c931cc99f823cb75be4039f94126 + 992ed5208ee369c5f3eddd42a4fc357d46a7cdf584edf52e293d319b6bf613f8 + 8b0566bd0c6ecc5ea3ce8403600c8c4b30ceedf34c7711d2caefadaa4e837809 + 6789bdfcd6fb49966d125df032d46e688b9372f29834f2691345a4c005887fad + c52a008f25132431dda7c4d6b89137ac27606cda47bbba8172d884f3bf5239f6 + 1809173f5c69d8fb2364b561028348ef7bb2b6b7477ff07abc0792ad0565b2b3 + 86973ab6c533cfeffcbf9085f6a89a9faf1f5e1a3f8649f7c4c96544c6985075 + c7015af478ec038a6d4de7eac77ef8a181f2b12fe20cbf57fae86efc6c86e753 + d616664ca9d9cae70585bf39d45901304fe56b91cbbd772805af27c01ec98b94 + bcb99f99046ec4aab487ab60de36caa4e9406012ec58c41c94fd5926cc057e90 + 5b32ac5db40ae2e4fb816177b880783184b5369b016cafa1a4bb6ae2200c56cb + 52777077de33b9f8328e64eb0d3338effdf06e0a2702ecf237255f6550afe7f5 + 5fef3db0fc030af29357b41ce7ce5dbda715a7163d67f17ded5ba851b73a6907 + ac81a0d5af2d7b9c0d6c875f4d3884f7ce6829dcea67d3605ddd1dda429af32d + 9ee5977c49bead67f2b7924f8671d85ce5df55a0952e209c1b00093832befdab + 4dce70e998618e5d184dc238d3e9c2d6dbd77497ebbd7b1e3518aa7d16902d2c + 28080297d12c9269d87d65fad02ab0b2f438b226093272a8ebeebe1c1b67376f + 6e60ea2db83489018817648a0f5a5c09928180e2453e49b0463e7dc5823ee452 + af0a75fe8112b0e799f1e963c1816ea0471d5bde5e46e6bc974eafda67435635 + 8c36ea2cb7aa81dd047fd62379fb00c7440d52fa22b7d4bdafb7be5db5ef2056 + e39e23a546aeb34a7dada8db2b495aa63c3578481e10a2c9982887deba3417cf + b40cce2c4c3fad7a5e67f1f92446232a606c8941bb100cfa4abcfe5b838afef9 + 69940914e7a053402ef7a519699daa12775bede213a179737c0ff6de36d68342 + ecae463b2b0138783d3b9703ef028af8008ce871494c1372d6cd9554ac3cd775 + 3c3ea16f15a51b97baf68f1b7fdab478dd61212cbb2378ba1b9cc3ba87eb9ba3 + b7d64138f0fa69ce9f0e6d0e3013d8095b334992443a036c2715cfc522dbc69a + 97f0fed92676ea2ae53d33c32f5d9765ac368fa002abdcb535e0810843d41704 + 7a8b748a60d13d7dd4b2491c8168570e25905718156b0c70e4f06e2ed85f9afa + 6bc2e8db17d7a0785a1bd7647dbb31bdeff1f9a60ac3f1e1888796700b4f026b + c096b8bcbd6a9cbe680dd5fe68a9a9f76227b03beaa1c466e63be92df8d9c403 + 0df4eab217df18131ef971d3374a6e5eef5196ae3a4605fd5c98bb87d0a36a1b + 4c60973700a003eb7252aa779423197863a1ae14b6303130207860bdf83b309a + 469f45feeee2a251c7c7f884272bae085b27a63676427dcc3e2a02f657235acd + 6b63b8f4da0cd003c5d19a1b6a099f908a7ad5d4ab81667586e2fe002393ab4b + 4a81ba69843ab3f7ae376c23bd96ca19c97153996c3c944e7120995d47f9f537 + 6c26a143311ee4f29644e869e4d010d72851dbee3330d4349f8e2c98b5977f1a + 1a39b429b8acd091a08055736471a1df42a754843d9f2373eed7580255d50f57 + 41d04da3768f046cbe3f9744e47243a65af12c4b04ff836dcc32948ce61d185e + 40a03b1b390aa895ee6a913d4ca6f0ce33a70bbbb80cb319b119c348ea4bc9a4 + d27eb15e1c075cb608a77c1297e6eee6c9b71975776e35c0ca051637d58bc948 + fce5b913f625761f9c0760f182f92f5313eb01f1051f8ac0f68380e35c648c97 + d88c98d0760b31877e3d95020f8674d2563eb11c907370c8ec9626b336398744 + 3eaf0d99bf4fd4b6c4ef8dc827b1d86903f940e4c8b6591af5effd978093a9af + c73b7a898d1db3cd15a26e2a260d6e82c9fae3923496a100c0e29f906e2488eb + b11b80b569a9e2069035b1e34bee163676ae6437e099c52b5a006e26378b743a + 9ab85fca84966e4fab1f5ebc5bfbdf73b189957896e49a076deac227bf14d92c + 2ec501729bd6d585df90e688a6b0038ad721c5802bffd749b76774792c4cf18f + eb6a4b5f5e1f7355e0d725630351d0f50e1598a21bcbc9435cc8d5ab47fe7062 + 82afa17996702df94eeb4bdb72a5842132fd698fe05dde37aa37494207d3ae18 + ff7ac5a38c9e01d0c3f0eb22299770aff8194b52a4c361e860bfb14944f586ff + 35262dde72fbbe72c6b6200ac90acf471c88c3f5a72e327dd22f1829fe6d97de + b59faed299e8850e0a195761f96681337f9ca94207cf9707901be07bc796389e + 6970f4405b5bd931af4b11c5b561bf1096c32cb3330df69562e5198c3ebc6f60 + 6800c5fff2686c195ce63f3e0158110151c232d386ae690f7b38f261ea51ca99 + b40d226697e443cec0badafa410a962afc85b2201918d7a6430774748e4dd155 + 02b39a18362ab1edb8b26fa37265b845959d17458f34d0cca968a085fa56ad28 + 19f29cd5d23871579f1d463bd95a3689df1decacfdbccb1902c21a2085c3e407 + fdc34b4984531693c3201bfa99796fefa92f665182d98ae9185b157792321f01 + 9d11eb68b74418f69507d218fb174408a9dd3249e7c2a97c7d2805c63489ca7f + 41634e577655401eb144c1a52c0be9bc38dadeae170686118b1856dc1dbb1ca5 + c522593137753ac7bea0b0bb1eb6a6cd1d13360a1a1137bda5b9a645ae48da38 + 812bbd201666ab3d2a515580c8860e43d633148a8f503126e640e4359eccf5c6 + f7cbc02419bcf1ceaab31a0fe547fe5d792764eb0163d366b965d90669964daf + 2efdacf54e810bcfa63bec1f2e618c837ae80bc6c5087cb5b9f5ded292909b38 + 255ce34d0ca398bed6564fb68ab8fb9396e502f4e7589ee74fdf7abe7df69f32 + ce896a375b475391342f4e71a1ce69a0c372d7d7f6b9a2c3e2ce1971dafdfc51 + dd9f743f501540d838e15b92280c91375ae254ff2e35ec62788b142b7b89b4be + 4a77e33ebade67397cd51a8f99cc25f9d4242be4216f76ec82a12656906cb42a + 6b6ef61032618d12a5983f5668638692624ffeff693d79fd339e00b44e3f6014 + 8026b36de7bbdf05ad0cf453b5abf8f4c43c16c156b297333967091a6938b148 + 4b6224764f7f40e29bde834cc01e2c4a0768fa830e40ceb453b83772eeaf0b3c + 098cfbcae03ebc545c4f544cec9a1524cc92cc870119982f3bddaa8f41137389 + c6ba51eed30cdb8a6bc6a8334ccb1929784dbe93b78515e64d1cc1101f0792ef + c984c1cdfcd821d64d68bcbcb4a01f06b3206d7aba5e9b7076f030f24c3506b7 + 92fb94deb1ff8c8ad074b3a43fd3d565df67634bb8469e0b31fa6881bef6d810 + 734934f7513bca0647934303c8455079068fd8f21f6e8551469343c8f05713e8 + 71d8272e02fd658a46bc04479bd018b3198a39d146957b57797782e353c5b2d3 + f00c927049b731d72bc7d11230b82db3398a3a32513e209fb2772dd3f8dd7a12 + 7e166ec6b53f5b5578b6b865a1c38ce602b5165ac34041385cbee2fcdd35bbb5 + 06567ff2bcf33fc0cbdd130053a8b714ab649c41f2c70265a0e9bc76ecf65cac + 689dde80ceeb445fde4e53d02960729511c5322fdcb85caaca0cac467ff4a521 + 2efffd62a769a302b1739d45a1fcf41d39bfaca662af68cd150f6d341b5b3270 + 45087ad0b5dd63d49e715f7bcb9b17e431bfcc6a09fa48668cf6c020aa5f55e3 + c9bf8d3efacd37a31c859846d0e59e8bf0933434070e0b8a356178af63e72d58 + dbe437ad27832c8187db0afcb18be6c1c852ffe50fef1625e81f465d7581d072 + 92b6f7e20beeae7d746f7391b9c166274dbb676d461607e9b2625515270bb4e7 + 5c3439274d69302d8ea09ead0321e5cf9e2547dc3632efec508a9d89efee725a + c68639edfd9c97b18900ea5273aa94fbc984845d424b658fbf07d0598e368987 + d3875ad024143f7021ff8414de9e9afde949de8d182c4c1297e8369db20abf08 + 5fc5ca87a02699555a81820a3bbb7356a1e60ec8cec2b04d45ce30c48a4d0e0e + b3d27b0059db1936c343a9762727c207aefd72e106986396250003c6ae5d3090 + 7a939dbf01b98ee71d033fa46f53d8838f61ae62a85db85ba6118f0b8cf9f3d0 + df160243271723c70125cd9832e4d2765104612329adc88db3dbec62d9855ad4 + 66538984399b9a47821be4b5830001bcde73684984061ee9813dfda9f1fa3b59 + 303deb742d40f3f97921b69fb0148e00c4c0743fd66279040bf5917dee00ee8e + 3cf895ccb865ed7c64866c0fa230fac0198d3d8ca80aff456c8a8ff17cefd63b + c2709c347d84e5151cf7979728853c86f27f808059f9bade75a625c1e327a294 + b442ebc6c8632c8c1a4d3a94d549ab69b2b7b910f49c2e8fc968c8856f2c634f + 074a7fe7ad47a8487227a951d83c6394828540ae6b5659b0979be6de04bdbc50 + 86fa391a6c6a5aca147405074223cf66028e18fb4f70955fa8ff8e5f09b009bc + 2aa99af0fde8aa8996160d5cf819e360e4cbf9b2690cfd4bc7ce3268a567abd1 + 611a5881bd66fa11550307cd40e23cf6821a552a50014d4aa5f752fb3b3638ac + 11285e6acc4bd61cde6252b3e2c0ade48d3f029e44ab2f5132de6290b74e5deb + 52399f14d9d38745f2e2018196a6cfa8eacfb7784aed5b9bd8eb94f73f5c1120 + d4454724f31ec3d30a2c7f4072912f6ef817f0d9632759ac025146e79e87f584 + 5b81c7fd8bfaff240f73c2a4be8bcc19049f469b4d938f67c43efb33b89cde31 + e2b5972b15a10917d47f0404770f4cf36e6d316d516523c51e5fb74b1fca9d0b + 72b15a738828f4edd87f11fe75aac03472e29ad46892937897fd5986130a2690 + 6c68231d8b9227e4943bfa2a514e5b76f5e89a95da6c3659edd0f44ef2d6070f + c61f36e88b8817c39456f185511d2d437ca0931e374933290b5ee3725e6974b9 + 80714a67ae9cb3c051bd14b7456155b6a81174107a65bfb4c7b1ea16ada7743d + e601f986def47521fc5294f1b8cc89e5d3217649a59f8dfbb87f42605cae5bb0 + c24ce96ae2dbba792586d82f42500172265f021213099e09335f7b7543e5a3b4 + 40559fd4564c776a7c6a96e658ae3d0ff6cffb377e38029ff25ef0c53905c018 + 30312245f733d5cbd1b71f2d7f6ed58cbe3ab38a6fe4eb77ace3789cbdfee065 + ab12a0636f1cd77ed4a327249ccc3366d288be90ec05d62a7dd3b0574ecd2b0b + 16f665b7d137eed616af685c4037f48fe66445b3720f7713ee0dbb316c3df20a + d39fe774f85ae735ad1c07803a3c8471e1ef831bddcd53a3c0019920739fab9f + d0ccbab5129ccf04b5fee54a20b944bd7abeab4ef4d6e22175687165378d3d56 + 55d19a33b2ba930fb463d4f5fa0442e678e3a1275e67178b1ec3f9174fd26ee5 + 64d07e731a32e6513227aa01acab40e75cacbbacc07e5d5cb9c4ca54673f618f + bcbe695d530d7d04e43b6208cb0329111138a1a1ff0971d35b84e2f887b21a79 + 6965d2549a90b4f400aa4cb206c2301cd251ca2f1a6025a64716268608de5503 + edd8e27af29439e4c7122e5b40fe1a52bee72daa1efd0058a43660642eb66539 + 3da7a45e7bb0667f0cb298bb60cb4413dd5816709163acf55f0a1e1be50f734b + 30de5ed319481a52be3ca0332a70281b4b8761cc3b791c1fdae39e2e1f18f773 + bb74d191f53e + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMTI10 + %!PS-AdobeFont-1.1: CMTI10 1.00B + %%CreationDate: 1992 Feb 19 19:56:16 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.00B) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMTI10) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle -14.04 def + /isFixedPitch false def + end readonly def + /FontName /CMTI10 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 12 /fi put + dup 39 /quoteright put + dup 40 /parenleft put + dup 41 /parenright put + dup 42 /asterisk put + dup 44 /comma put + dup 45 /hyphen put + dup 46 /period put + dup 47 /slash put + dup 48 /zero put + dup 49 /one put + dup 50 /two put + dup 54 /six put + dup 55 /seven put + dup 56 /eight put + dup 57 /nine put + dup 58 /colon put + dup 61 /equal put + dup 65 /A put + dup 67 /C put + dup 68 /D put + dup 69 /E put + dup 70 /F put + dup 71 /G put + dup 72 /H put + dup 73 /I put + dup 74 /J put + dup 76 /L put + dup 77 /M put + dup 78 /N put + dup 79 /O put + dup 80 /P put + dup 82 /R put + dup 83 /S put + dup 84 /T put + dup 87 /W put + dup 88 /X put + dup 89 /Y put + dup 91 /bracketleft put + dup 93 /bracketright put + dup 97 /a put + dup 98 /b put + dup 99 /c put + dup 100 /d put + dup 101 /e put + dup 102 /f put + dup 103 /g put + dup 104 /h put + dup 105 /i put + dup 106 /j put + dup 107 /k put + dup 108 /l put + dup 109 /m put + dup 110 /n put + dup 111 /o put + dup 112 /p put + dup 114 /r put + dup 115 /s put + dup 116 /t put + dup 117 /u put + dup 118 /v put + dup 119 /w put + dup 120 /x put + dup 121 /y put + dup 122 /z put + dup 124 /emdash put + readonly def + /FontBBox{-163 -250 1146 969}readonly def + /UniqueXX 5000828 def + currentdict end + currentfile eexec + 8053514d28ec28da1630165fab262882d3ffd20326947b1065649b533eb5e9e3 + a88a87fe987918a687950b26f647d6e08bf14d983ed1d4a8ca1e2da8d985f944 + 2eb916f5b6ed0697ac7c33e1e36a3bf460d34ce45f1631871097cb04f18e3889 + 4cf4ac1538eb19481311d24fe3be7beaa4a3730e8b4831fe59d6d9ce2e46116b + 629c7ba2f9ce3ecba2f43bc162a5a077ca1b2882a42afdcec3f4b75b5d63e0bc + 8e5dc95257766d8ea467ad9cbaf47be60f797580cced6884b3a68f70c91f4fdf + 80fd00ed9139e7f480dc3a76af72ad9b434187730bdfaefe4cbfe5c7edcaaf24 + 9204fd703011932e5a3c27be468b7dab69daa18dbbb6335ab8ddfdc607961c7c + 02582763fa069d43563ba17704029945cf42fcb19cf78c51df0ec4d851086d43 + c1ab38e865ef36865fff3a08b01cbcb070ba4893f7482dc7819ad03d337e520e + 7d8cd83bb8ac7aff4df36751f4f12aaaea2b6d7260c09a26e987c904003e0723 + 7dbcc4a8e4e85cd3259f40d3caf55c742cbb40ad0db1044c20a4f122a63f7b81 + 1d945bfa69662189ce4d089464d2ead9f6ed60b581b04114d5d45e97be27a576 + 35154e9b8464f2a0df18da855eb51b8f64d3054b0b2e84621f025a0776d16fed + b988a43d2d64c32768dd106b9f541ae8e68ac0bb7399e16f4d4ba074b2152d0a + 4e9b5bfc21bfa0d531e28165e518ffc054dd4ed0d74eca079d20e79670419f92 + e03bcbfeecf3554d661596f6f29e12170804d15a250d917ffe7a8b6e8fa53047 + 1ed97ba56481589a65ca13619129f1e26affe6c22f0c38540f8ce37efb6e9e9b + 60b51a5a9cb4454fd7c7f92f2f9437159687ab590f35b946a54491a7739c9269 + e0f1fb48b129811c82edb3171cbd5105fe65906974db8a7da92f4f43dc7f6b36 + 6981146d86d23613a0b38d9d6191db9fea0172e982cb1cc50e382f69da1b377c + 1be9407f88a2a761b56f398467a057f35d18c01cc377e006182c891ec80272e2 + 2e3a5c7123cd27eccdc87392a9fdf63bb40f02b7649cfc53ef933c6518744cb8 + 9cbbd437830ef5b1d58b00b67bbcf4426dc1e6ef583b0b4ad3aebd741e3ff0f7 + 29ae271f032019b1e7268043fd215be590f9cf24da14a90f1683afcba8006cef + 5d5632c2481fbc1bd8224e8952debb7c4596a237e5505ac143180956ca1f603e + ec70cdb4a33e1c4ca174436a38b06fd9d2b9196f02114b77a9a5f66595727faa + ba323668573ae328f1f84e529ab714e14650381ee6dc0b0fa83b7d09c9b9029c + 290e8ec4560a29e37b19e23968d459c07df031286b41187efa84387bb852e87c + 45c2ccaa6b4b0c080c138968cca54d831f2977ea82c868f0124528e1f2ada142 + 20754df9015814ae62535d67d0acc4624e5bed0c619ddd03afd03f574982e6d5 + e2b977e2fc07ac49f7cd48f6a05bedc0e168f1e25b2767556d19cd921eb5ca0b + 3aa9fe7c245ca0cedf26999d213bff2dd1084ef8b1ee8d5b98d1d4445ac3db7d + 59904ffce49d7c22774085774216e2f2b8c867af2d6b58d387528d50d30eaeca + e5c915ead5f8f8f5c51e5336f6e73514843baf1d494781e5600303eac6921c68 + 20b3131b1a15521475c91015fd8b679cc4122cef6fedab70325d3348cc6e7287 + fa910c9f50d991bf87f7f350b511ca18c47461e5740efd697b6812968ae63f79 + 06a78f87f641f7afde745c6736e7ea3c4ac2d3cc5bc05553d62b6fb6d7cdc084 + da1a22d8cd14d29ab1a3776c39d013a7d2a462db05418df5e7a71db1af45e324 + a3c2bca6bee558b77010453e1cea19e7924e69d49a9991e39718f1e9f9b3c31f + a573bd400627af3ea500b132b0e44580bfa89e1fb360594d35fd829ed2a3cd51 + 133b0213ca54375e90e8b99e2f09cabf7a53c5dd7eee757d30b9e2757d649c86 + 6c628fccbec65b4c0725902120238e640aa99b10c8647a8f67a6d38c3ac35753 + 2b8b37dad3a89070ef134352ca1cd050e08a8a336bd6fb0bfe9e93d8e307eb6a + 9cee5d31604051dc0c08677bf4740848cd7dbbc15e842cd712b945a7cb5a424d + eb3c89ca0984a87a02c6c7501d3a2d105012d3a8e0f0459c258548adbf971c67 + 9995527c1fb1b15167f482fb8c917dec4dcb2ff6e1133e2369b60440955f5f2c + 62671d9d40a22e61143c42639b821eed133424adb88fc56925bbd77e3e6139f7 + 73e35f20e4fffc9e6dd7df4cd56f1d665abd8eec0e6d98668d7d07f16ef93813 + 68ad0686446b4f93fc30b19c61cb50f05ddaab29c33287e25a3f654341f5272d + 2306ec78ee825a5c60ad0d8f9c7fed5ef05a701a6e5439893bca92a98b609535 + f5551e3cf836d8bdb6330fb2af656dace891faa36b62118d3d046e7bce0a7cf6 + 5ba2e200850c5a939d627342096c287a8ce18e7264a85b5075855b5343d33ceb + 36af27623c9d4d1a860ff1c4c4baf83fb54abc2cead567bc127f57c49f7d7cdf + f4fe4aff771d109511b3009d56d680264cbb03787283b53428a8ab86ad5d6eed + 965e44097a7ce82c6c8d2ea88e4f9f5e41af34960bc08da0ef40309d5148e279 + 4849684eaf30163c807d408e222dca18347b35b5d6d3a1724a9742a721544497 + 5f0cf59fb030c8f1b9236cda336f981c1e3a3c7e9e716159ec00c6bac45126f0 + 174b8c1f69209bda2ecb4e19b5e51d07a0021d1873ef8d1c7860aab9b7863473 + f0107bf56c17f078f14c7abb3b711f65b4866b70c4d919ddf0219676bb6a5f26 + 7d43cd63d68ba4e75ad2215cfee505d4c8661e57fd451b756cada522332a669e + 2d3272728537f87c9dd984bfbd3f491056b361e3d44cc1f0b1d485a840a1adf0 + 589ce8f6153e4c04181e290b7a4dcb0bfeab291e9ffb7ca30be48390d649dab0 + 3bc86d8320ecd5f3f8ea8e0c721417d7e58d771eb0e3dcdf7e71f5e64995929f + f840fd6a71c6288a24e87938cc87020e1501d939843d213fd8cf1c2c70e07342 + 75fa13c6aed19c60033402c74877412d5cf8d9a93136540725e433c0b9ab1b9c + 80e78b771ef64734ea6024a7f49db0e150e69adb50f61714c8d64500e838341d + 92eb2545095ae2f18bd3d2f6f5bd9ea0c1e028a07d3b6a7e59c9d5ef9f79edba + d0fffbede3bf6258974e38fc393d3b306c55f3f456846e2fff867d0fd78026cc + afcc2d49037e9c655d2ad8a00f19a1c4f71de91f4d88308a39621019910e1919 + ab128ccd1c3a371ab8359f1118cb02436f19d71f5dcc368beca00287443b290e + c754a1cb100409ebc044dca9ed79dec844eeea5cd1eb335049964c8c921d03a6 + 357ba99fa1e33c17dd8b512f654dc2cc21f33f829f73484f2838f088b39cf0dc + 4a5fbb68d45d2efa240b376a3df03e1d408f50b0663169f7f0ec4f958e72a555 + e5b2786eec4aed4f06dc6fb07b7c34424d0658e624afce2c40b0a37065e310ba + f81ec1599642cba62c1b6c9cbbc13c5270155cebcce83160ca1d13f41be56919 + 3a4424ee71d5cda52ca5bc0bb5bcf6497028bfb4b478fb46605cb78c52a190de + 37d8e84daa7de30c4e0b37a85ca94b58d25408c4d95e9515c251abbb6323177c + f6126f7cbf23e50fff4efb2248ce081eac52f97e5dd7ecca3d62bc24fee6e483 + d911ffa436060bfe6da74c13f02a2c11d4ba18e1a7dcd3d6ec8cacb31c45d2f8 + 21b0ea7958c870ee1286e7c6662f1e04e91249b2072f90ed6771193ef6285989 + b028bb5ca07fe97dcc554431d1987856ad07db6d3bf201b6bb9c39d40e323209 + bd9ac6732d513f04fd7f48ffd07457cea2dd07820923f75bad5ea5951e2f15e9 + d6b43bedd2e83071c061a0ccb4a6fe3f1c45f57783daf6122f4215e9880a6518 + ace8a6ac1dc5462f0abec56d738c5b43b805b144c74c2c326e7b74d65906722b + a7cc4181d387a473548f4e7222010d5e9a31c39fcef9b9a46ae73c672007426c + 5f1a827a1d1c93e84046998c730f58d02d9661e17a34bd49b65ed6aec6737a56 + 76a6b575d6fcd874caff197917a9b866be1d043e2a872dd22858e681b54146a9 + e16f61a9284df607a85fc308ca52a148d01cc499fee9ae120a5414a57a3ef91f + 3986f475d4d4677639fb8fd475d2c6d6d752d9dacbd6a9dbc520283f51607493 + 25df2f3415be36ed9182017b99c510caa5c893425039f5e8f2ba814ada1ec987 + 5b0589051fa78246ad6ea90d6946c8da8157f3112f131fedc0f002455cd29746 + a7cd158de17069a148e221cae53f273a00e34ed6b536bede9bfa028a5dcd9c5f + 5b7ce1d97c590676264baaf73f84cbe350334797bf54451470feccaf573cc1ac + 8bb2fcc94a1084b5e14b21a4333687c171ebf1477a7e2f93bc396ac99bd8ae66 + 66d8783e2ad19af03882bdaa28aca6e807e8dc23d522212503efcc5bbf71a710 + 5b5b50f14bc1392b5102886ecdbf691c3ac0a7a08ed1b9aa0051100a899a2aa1 + 89b917cf2aca6d2a6787f1c4bb932dab95488e32005fa62a1f02b77a7c29cc51 + 470d319aa29e384675b76e302037a813aeeb97195745b90abb8e729432115d03 + 7fa4dcc4bb874e3048ab6923c8ce751906e25bb25c73cbd44d2c253e7246ee7c + 9a57159fab2d92ae4fffe8c15d522f1400212e47c91aac55b854b71a71156a33 + 439a156c0adf3705d61f26114949ba4d2705652e7b9cb5714d72ebed2fb2845e + 49b87cd9d05f11efd6cd49b2fc04b39a295e2a838ddab4b0a515f8c2605ffd2f + d1aa4686b665d729fdf953d59152251b20f8aed2dc26f4f341f518224a76381e + c90eb8241bdf0fe7033b7b1f7533336310c42005b9979d179ac0d54f972edda5 + cb0a238a3b94da67c891c1c5b35dfc6cb75a8702c7a71fbcf5a6850126defab7 + af9c073a3f978dffecee87ccf13528683eb7cd8622506b7a6ebf60a04a4f538e + 2ad96ed64e17d31584a503bf60fae831430e1271543c827afa2e9c73f1dd5573 + e139b0b20cff787cfee66f57da3334ee009958a4ba6bb090e100b226dc4b8a89 + 58801f981d2da4d2681629538720abfd255dcb1d453ff28b5409e69c77e6fbdf + 5ee70ee2b4c9df1d9a02fd9a7cccc1b63862352d63c2886b3e2cea2195926453 + b437df702c0c52a5a99151b0fbc32fb6e182471b51339ab83c55a2e3e76aba09 + 13e5985ac70bb40cec24f7121bc08ce6486aa56ad1f575fb3e43e4f1a3c057dc + b5769818a8e0e68ad7d928722c66e80c8a54bd691869736cc38647e119fd3d7c + 087dc63fbcb79bc5664b7dcdc7131ffa1c547a2b00106f4cfffb4aed897fd2a9 + a554ad835a93f0c2b984dfc72560020427f208c6ea42c044ba737c6021539742 + eef43cf0065d48e3fdb6c3f0021e46af41ad65a68f49ff1af54f856934486bf6 + 7afbadb5a9f79c9be61e02ce9790a162cb560f756650fed577d5c0b79fc4e946 + 5794067662d05582f72147b7908e615a4e0bbba48a0b826dd3b37bf0823a23fb + 8103488b38728b297560ca2a599f6b2e4309dd26c0c286d133b55e03f5902bd3 + c1bba70210ae09bfc17f1b2e1ba4fdde69c4efac5019260efb2d0dbb78b0a0b7 + 4806caa8c7f133d17c8b2fb05c19bf612e78793fb06c4bad196b1f4f4e4fd71a + 8a7e14099087af636d047b8e509e401ce07a6d96d153fc699bd25bde91d17a4f + 58c4a3c7aff369c03605e4189afcbb0e6db0c8768f3c06327f46235c5b95a9b5 + a360dd0176d1b0897d39976bcdf50286e9ab91301a58a32a057825fb5e72e0f1 + b8140a1304249a2a838bd14759efcb36777f2636e6b8c36a9f03b9a984682323 + ec49f78bd2c41d99e3de296ec940e4ee11209b50e8e64caa1e22e55632dd2456 + d81579b523d78cd0d003b91503493f1818c4267b0d1572b8793766414d17dd22 + 4a9916988c0ce2120f3c9ca23fd3b94888cbc0ecca261d05f756de2ec3ea4035 + d654bb235baa7bbaf83f27c25f5683dd3cd3e7bde83f4e3da96307af76cc49f5 + 94e2581ebf2d6558e657284c2af33dd1a464f8cae665798c4465864e2b6625c4 + 7e269a667681368ca404864777c7589f97de07a5af32ae9408497d8f9f874cce + acd98f8fea89be4f88a7fe0785044eee92eb206f25aacd58e0e63f1bff17c6dd + ec4321b144e54feb1a242cdfce39f97cb5ec8615cb0912edd992384913137840 + f459c3747ea32222466f07c9b0ae2c7176a1d134d280df69725b19a0d51de984 + 992442d5daef4d321a01e46c56f7128cb448e1273bb6984d92c6c97155226d50 + 10d10ca986b05ffadf7f13563a55cd6cf5117b93f7d22a30c5f31aa403283b9d + 6bbb700d7b4ece1203173065ac85965814cccde20880ba8173b5d90f1bb7ee71 + aeea4da6e350f7e51ec2c520191309c648c0d5cf54671e82bd959ff8b5bf356d + 3e326e9c3c6a8614b38327ee381a1c697650dcd86d7d1e6be37fdb1be19a5fec + fecfb7660cee4f6e7f79cce68e0573ab55ac44a6baa23d27120a0fefe71796b9 + b0f11a99bd89e1ad47a2ae480e66b8978cd67b03f82000f0eecadbd90a7c8712 + 7f88fcc487dffec65d3d246ffe57131953a1eb4c60b1dbd1d9c603e3ad595494 + 310c2b9260380382ddf4745768feea92691517e79dacde6503bd0a192b7ba0be + f67f28ad8cc5b55369b36d77dc510de53e0b2d75ee6bfa24621557d3842f86fc + 3f6b89d23bcf7e308129038185ffb819bb10cb8bef47ce7e5d2a42bf0e6f342a + 808a6333e1c939eb98d7782c31015f06cb891786a9d0ee73519a3615da0194d5 + 7e154367c05c2889b3bc272ec9bfe510f1f0ed58b948df43565cbc50c9a81f11 + 3a2e109abb262b512b7aee9244fd2974b2b17ca675e6c73ea1084bb3365d0194 + 845b7c1e020824408fe256a357e38459cd3a59c5e5493805adddd6406e178eb0 + 90718453bfcdcc12fb7b919e37982c3e04aae7600c83ee6e6d0d69ec8e51149d + 93ac86986ec32fe4cf0e3e149c68ddd7663d2ab4cf1a8afb2fedfa663a7ea941 + 692be219500c2733fb70b35ace29889d0518975a67d2c4ca44c6fc8a2f410395 + e053f6be79a0f582cf41e920ef189af511b2ab5b1e5673d4bbfa0d73021092c5 + 5b35c2ebf4b64ae77565b64a7365fc0275ee2768801a2528f6272ab81a8726c8 + cab195d9157e4869b01d3043eead180ffb54783a4dbd5f3a943b576cd6237361 + 98654808ed4645e09f334dd68f2e180b4629373d8db25041a2219a817c4168e9 + e503db501175024a0064decc2fba2bc8caaf3cee4583ed4c83c850ed8e5f14fe + 8bbe235befd439bb4f2b6f97b21d61aec47534ab3817c1afaf019a54ba112ab8 + 6890133a378998d0909223e2dfcc06781d1b2673ba5d96317ca2ebeca26f9fc3 + f23e08e74139ae9b395e2cc70e97e3250f66e4b1d3a55c60f4840c6758b31d28 + 4a2a82b6f2b4a4d998d19d36deee449dd1a7e538c7793d8a584c9a4f7f874800 + 6a06548cdf8733fb11057042c83769790c7a6af5557b7332800578c5d96af604 + 516912f4721d48a016d4971e44169afa91cbe893c3f7cfc3564f6610d909230b + ec0030f40c869412e70c24d9724379a230374f28adceb5d98a8437c8f858a2c3 + dfe623098660d45b04f647d838ae7f93e3ffd109fa33429268183a9a2d2a809a + 0103f4b0bba8a14b7ec94edbcc78eb6334147b4ed7155803620b25c76a847c79 + 007ee3e1af2847dbb80989011daad0be0eeb030c3f145d65e68400ba4475afed + 0a44b8981b75b6e9c040747cca82825e3d27d542385fcda3fb36f9865d2a3eb8 + cd956654e324aff079b32b84da39576915b19bd34f31873fcd799c08846383a1 + 790c3f4e0950c6cf49eb33c4679ae321638cc7b762c36a7c1e2f0ef8a5d40f3e + ee940e5c477498f1fc28902640b1cb65e55698e259e2830031f6f631a7df2c7e + 364763bba1cd9a00b1a635b1f51b59b6f0ce3e2989157a7247f531bea31fa827 + 202ead129361e709c653f2e9e4bcaf5c00cc8ab1f7e187aa57335caf2c546373 + 28ad8b7867e1419c4ed5244aff608cce83f0ab3f5c9e0920301811ffbffc7d39 + 82d88fbfc30a766778dbd844d4ea8f08e27f6bb3e48ae7603fe8cf1cfb26a0a3 + 41e180438aa94d7fa5d59effc15d32e56de3c2d672d8f57c19f8af993e71251b + 4a2d0d402d9ae988222074c0eca104960aaaea9dbd4e60bad45c0ef1efcebb83 + dccdfe60a28ae3279179663eee255fdd1b35a101a32a38a69420fdd71a305bff + c9b3c0328c2b6c33429ade080e7dc161923d5bf6b033fa5e25a8f41776fbfcfa + b9f8f280488499fb23348106eb95bbd06db25de4cebb0f684879ea85226dba09 + 4c5a2a67c81b2550e43a726461293c5f5a2bdb42b00a9fb96b7bee8653dd4742 + 75a39bfb9bfccd0a45932e147f89147cc9cefca3e7da0a44188ef9023b3725fd + 65c654cabfe03598fb8849a58ed91d752eff91f2cf99bd80e0ae99cee1972289 + cf364b15928162e453020fb57eb071bc98c8ffab46c03460f75a39849c5a2692 + 794ce2170c799dff2d27d71f2f7f220a6d7f63cf19bfeaea8ef444549c7876f4 + a24e32c0b5ac4a7cd0173be77cbe4ec59bd54725f59eb37216aeda2d70f7f108 + 9dfb1145066867f1e36a070a2c664719d729ba1a75c78a052ff17e7508f631f3 + 830481dc58ca730f2727d876bdcd20b64efc9959961b92d0262e671f9d2fcae7 + 100bc62a8af42a705b7603c4fa645631bb6580d7e70f9c05f010db48a24d98d1 + 4efe69303f2e8074dddcbc9dbd0d4572d266e794446800389148f88b62739bd4 + c6cff55b844c4adbc0e86021f0895c19e404966d6e58cdf04a361bab744bdce6 + fe0eb4dfed141a180961d002933f5a5b2f67c59fb9c1cf0da3597a3219e423f4 + 834287f1b7ed2f9f91dde14412a2037b3fb67ee52336acae96417bff7d989646 + 09a3d2ad66de9f1f104007f3e67ef8d27057c03d27f1b1e4e7194563ab225312 + 7813201a9fb2cdf6c7f8ddeecb78b8cba3a60f46b4d04b6ef7f21c83488691ef + 4da33b8bfed37c3ae4f47966791ccd0cde9628d9c92d2ec2f0d13acb200fb39c + 702e793a0356359ddde8b40999e1f2eddc2b3bea67db08b69d203bc2e8949e7f + ae16e7fd9242a4bd3ab0dc073a7b5cc4dcbd225217c4e96d388ef2780292bf7f + 7dd382328ee59e84f3e87d30d9529dbf011322059cefc40f99aff671c68e1f4f + 1dd223385538bcb8960b973da1ec1705e77f2fa58f03d98574db18781de22d84 + 21a2b55fcfd2169b7966331532edd3217372ca490ea57fd0ca312a936c0f354a + 0751bf2fd3af986f2199fb9ad0b208892e8ecfc4cbade3fb7f22c06e89ed626d + 683e6ccca7c24d6195162431d45bf7d83e5e2a7d277c3d97515f97997cfa8690 + 52ae59ec0a173cdf8338293419f15311e493828447fc286b68bab7e38122f1ea + 66cb9a594854bb06f1aaaa35bc27c153d6106d01e380d83985634f4f7f57edab + 3ec19f29dcb62130bc07b3dead66814a8b0e1dc0ebb190f4c8bed76f61cd2a5a + fa2da8ffc21573894fb1181a75e056dce31232c7eb821aa79848672266839d90 + 46c5d6cf3ce8f34d7d2ffedd6ac7104ba411cbcc2957fd95e3cc60ab9fa1dc2a + 406dd78e3195a4c2bc6d42259218a61e892e1051c4dcb7c97544e3ad22974d34 + 3cd68a1af4a97cd2e03e85a85b844055c05d42556d4a0ae07769e7d4e41a07e3 + 312a17067b74842e8041932e9ced1e14a41e0fb72ea3c2b83d2c02519567ed72 + ae72e207d49cf768e7ae9918a662673679299b37803ffb25a1aca86463d848a4 + 6fa8d9109c322187303e206eafd009db1e4c0ea33ac1bf764de0ed97090e9425 + 0477253f0815f1d7317347f35d4e85223a318bdf8dfae6a45935b9116fcd33b3 + 169fb5322212539c8aac9cf462d0ef41318f8f81704f05a6cb62f9e5f7603efe + 866570eb6c7899f3410cdf61261dbdc44d209b349f441f72ce682caf6ab446b2 + b3039efe1ff3468f280edc0e30194306343f234402455b9e49f119fb7de49c16 + 705979394676958ac3d338d4e85c56f9146ea0bca387020ec0a4e1743e6b377c + 3731a3710482c5e15dffdb152c6d193230a5f426a524a33eaa533a604bdf6e9d + e991152626299d24fe95bd3ba71a2945cdbf29ed0503be2ddf77380054654f7f + eb9207484aa47e793dde815890cc4b66e35cb4df7740410d67befe469bb0a051 + 55be76de3be171c27604d7b89063accf1c6758e005d4bb3b4070227b8a6056ff + e76117a40bdbd6d6b6cf3dc0d858e17e639bccc0e84d25fab164d73e58e89d5a + 244763b1a26ca0c4eed91ac8063a9ae819cf35ba48d46bdffa7b3d7b4956488e + 34a5ad7b6f6a885f006d808dc8457edcf79027af50bb2a0e3724d291b7f06f49 + 8fbc86a307fe2a6389cb710ca919bb51364d01f20c8ea62c74bb18042778b2da + b6eedb02ad2765fc6c5aa2a0930f1c8ecb19856fe3b4e3cef0fdeb53e7053c6c + b115ce5f94dc3fd7157cb88847f2161395014b22ae6935c71f2511ed01f860c2 + 0c0b81fe0b8221af720e79ee71da23a18d113de7de9f63e8aa00bba04b182932 + 0a532cf94eaa557d8459e11e8232d74fe35f4096749e3bf386384d60dad79b5d + ab769072d1877565515722f25d928692ef1f7f3bc8f5c4675f4a0e69f5489c3d + d26c87fcde9c04bc66e35556dab445c17619a8b8abc2d2114b7194a2fbd33645 + 44249d4190b79c7221dbb136af974ffb3b390104e1e06b7a0293f56e612cc012 + fee4c79deda975c6b9f461b1a1d58e9ad56c0eee8cac7d34528b65f3e9c59f11 + d4e6b21c6f2efad5153fb961de522872393a7b463e92178d0d1211132a4d9477 + d99d5a1a957315b6b3f53f3ed0145cdb90f2772cde68792ce9265e9f04281ff5 + 75a90a6b35915d9721eda68c46b8e41158d7c9e3fb5a674a23e32a1f889c3827 + 8ab64bdfc0e72ddadf509501de9ce577ba4748a7432755bdfaf33ca10c102121 + 35708ab20d75a2c248d8182dc68de61d05b6861291587337215e0e5eb89511cd + f5572da634513f1e6b9b799d2f71aaf6a134bff77a428b85eeb184164810a82f + 49d251cbca7fc9b9645c2fef1c019cc2d03bc54fa276d04d5d55067c7860f752 + ad1df3d7dc95b9cf7f98b941760387f8a0f12f3eb4f900542929d274aa90cca4 + 4697302a909ffdc5527db99242b15df27b5ed5b37720ca35d2fc845e92289d29 + 8a1e4d094374d1d6ac36f35e8bf62eed149e377572f71a073b38ea7db474a9fa + 7a6849f4acbf2bc01b268ea637fe348183f1541d7003426b5832d12fbfc20291 + 20d8895319e19352a578109c2d2d597f3e696c15bd42dc09a7b6106d316d82f2 + 19e6d174f32f5bdab6028b60581ab6cf1462880cb2165a4dffb150a3fc4a36b4 + 35d89a40d8665886c2f366f96973737c4216d2487af3d6a9694773aca79f9cb0 + 22eff811c9a1f76878699d4dba90b2482ad145e70c306871ae4e7a13d0cb0335 + 8aa46e1c9f3f672df239cc54a74823e5eb22255416f20aa9a605b5c52fc8c8c9 + a09b20c5b127af976ce4502f97a4f9e9f2a423621801ff4ffd40eeabbcc82ae9 + 9f9b5359d3f6afd1345f24de2ac4a5f24eff4de6c3c238188114a18aba495c51 + e48da3260c120b86720630648b60586d7e3b5ee5ac4443083a65b9cdbcf2b296 + 1f42548eb0a551f7f10479103288ee1cc5f281263ad90a0e8f6b2222a0fafca5 + 28877f7c0b40b5c8370cb86aee9523779fc8df80068bea9c88308f08ee4a3505 + e7c896c9e52ad695029391f57be88a8d260e2cbad1be375830ddaac5c882ab60 + 7450e9be6495d3834cf612270568cb0d914380d35850b5cdb7e26442a9009422 + 92411f81ca4ae0b9b4bd4b28b75521661bfe60f904c9304b30349db916fe407b + 40dc657cd42109930f07031ac8ccac68156e040b3f44dfeb695b95f06e5ce1aa + 279b14e82160354bb0da1d49dba501ccab64071358e48fcb977bc0790c361ba5 + 8adbde954ae7890ae74e493efc869572377dd6f09b6fce3eeecc15c98d2341fe + 82a3ab5d08a79c801fafa7fdd05f58d177b8c553444e906107316a415e87df20 + 47971c83fcfb0263235e87908b30ee4e31f15b2b7a08c26b7404d38ca026e7e4 + 3f6094ae9952f357d907d1503d29b9e7e5703ebacc54b333633525b2d6f11228 + cc0da1b8c22b44f2e073f2d1c12bcfefe0b52f91ba2d413e61206eddf1bd00b3 + 1ad5e613b692a22d698fc4af176a45a0bf7817fe6eb5576d2412966386c802c7 + d33dda153c9942f764b4564993f986d1c6866d77df6f8458f139f3dabf82946f + 12dbfaa785943efaf4429ca4f8df25a22582ebb4e97585b290bdcd2fa0e15ab5 + b6b4b49980840677ce17b1a485ef6c03426eb48ed9e9ecb79e17589e433dc583 + ea71528aa72399d0dee834e5ae0930cdca462faf39929c7535db7e93a9bf2dbf + a1ca3af7ea871f00e46f5afff62cfaa618ab16e5dbadb5a4aa2a1c6cc7fcefef + 8f69c457052a9fe6c7e6b06ca20edf1bb4954c7e93edcf402cec404847d0d286 + 9318988936625d7f0031a0b5f90979e0ba7bb1fe3a9bdfbe00d55aa50091b3d4 + 9a6a121f30110c7a2ff59791e1430bb1a5e3bdd63def0c74f4c08455f37a6bf7 + dc4abe4fe4ec02c86e676787d45b2c288cadcb40dc26633e0635361852e68055 + 4fe2f1f7dfba6a479bfd932f627dfbbeb8b52134c70d3031114f115552801774 + 5a3233045582e553539883294776773ffc330873fb285a4ccb9d2df7ea2810d6 + beeb6fd218c7defcfb11bf71d857e669dc9d2d5f0d47d97c624daa19d10b15ed + 1b700fc12d91abba496c4009338a144eb2ce3489f6f2d7ccd4cef448c92684e7 + 13a3925ea7bfd0584bd2b415ae43673b08d56d1ea8b8594311e85f5b7c8dd7da + 94259301df1614800f9823a835aa1ae521d26f6d964e0ccf2e11ac2a327c5b07 + 54f7a2c282b7537bbc624aa744b61a91484d56aee1e824b5684fd39652b2e5a4 + 3f13c2726a82c9f28ca4d0d4a5206699909aa94c0a6c7e7bbaf945aaacd5a40e + 7bba8d16da471de57458b656bae3dbc158e7d9d5f6e43bad608b9e197d7be036 + 78ec23d113fc79e6fa6895df00964b185d5145b53783fa82a4888dd29e4717bd + d3e42c3ca848eddaf99b31a1fe5c079c65656e81461e0f13497deb54d66cc8eb + fb8d6e59b5d938f9bed0cad4339e5a6cafedc0bad279cdefd3e58374e057fbc0 + e4d5ea59764d3d1c898aa40783894480de06f0bf9af1674a4ba6becfbbb8cf9e + 07bac4f184624a36751fdd7bc4f48d3cb23dd0a11588d25947f02841bdfd0fc3 + ff9cccb2a716685911b175f3f26a4d162f8afbc98e4556aa421b55055fdda664 + 6d527629893073790a02b7635adc00f39e1bb0f814f0668375d6e8c86fab7a0b + 52bb27bd54788663d84fedbd5a030ccebc6066e6987be81bfd92bc99d65c94dc + e24bea4e46a7686b54e7fe0dc1b9d3e379661ea9524c822cd519d54f62d283dd + 66430406fd7da6cb37be217a4d8442f26a28026408305c5ad934a4df38886ff3 + 9055454dfda960ee181c920a419143a1d97733658f1f38a7113042d143e060b0 + 04c642cd5ce57205677ef12cd1bcd7dc6c5d2bd300c7a015aa0a1288195f2f54 + 94afffe6d2de699b6471ef0060774c4321c46547df930b43fea9d75ec92abb2e + 4d2ca8585aa0f417d804b8f755e155e084852ef4f7f2f8066277636292d5d028 + c68edd63a7891f4e398393ea195fba1b4ff52e878da01d2a96fac0bc29890f32 + db02354a3ded1d404499db5d45acd94fca370d510cbe1e94acb01f7c756ec532 + 0f5ee7b6639f4f6d4ff68a3fb104d7f37eee45050393d2a7d22470f719d2db24 + 191e4ccd1a313e4253bf485892590a6e5c299b8c1b1f79141237d6969bf207bd + 28e956aa010b9bb47341b895773567b44e4fd03173225a3d9b9a899a474ad07c + fe61260c2ed4a8b8e58e227248b469c615edc8754bc1f4691078cc3ca8ab220d + fa2a8376973c14394553d680fd5b3debb712ad7235dd77a45fde6c341e2a60b4 + 236a95fabe6f0ee528fb9b9ae32813c97ebe75074d720294ebfe22c395ce29aa + 2c4a67035ade775fb08937b4c81513b30eef38645c60649006a69d1361e901bc + 725d913ce11237c2371dab07d541abc0469bc951ef518bb01ef8306a4f634a9b + 301480189559eaceb973d6f86a813f9e138ff385da7935161f950af30ad3ba50 + 2c1bd26edb944772ef44226dbd21cfdd349e29b7636ea186349fd271b2684bc5 + fffd60f5d1e8a3b9e706adae469bb312926dfdc635f43ab56a9904d7c386c2b4 + 08b49f160f3225524448fc998baf02dac558d17a7cf046caf8c9da9813e657e1 + 7dea8eea3c92e2640aaa575765990df24073e73437a50b3f48677fb4b486744a + 210933bd645af4ff0270ac840725da65be6bdc315a83a8aceb7d464c60b62ffa + f5149f623c23194af358c920b7f34a777cc787cf410acb53b9f997199138e6b2 + 9fa963ddc1dccd4b431d73285b3fbef3280343a370e2e2c345c566106307ce7f + 72ffe43ad6ac633b0a20d6b7effa0ceb825121d910e05caccbd65b6ef4ebbd52 + 0aef8c41aa16e52f9b60eef33d30d341d2148d7fc3a26dc38571c3f87019701b + 2ebb0fde96743e8f065050e2f6a200d349c1f974364c2882e9c57dd163ffd77a + 574d4a2c56e97962289a73f61c5547d7f95bda672272bd1d9bf65b2ff93e1297 + 0f593eb0ce0c071d8e8a6e1ceda6c9cda647b2d84b7ed687a1deff559333e6f4 + d7bddf1d78fdb0331fa80efb3f83483a0ced3e534b644ca7305f1e66a63fc533 + d5fbc2abfca17c61a0a535d84b94c3720003f711255891c6519a781a0e84b137 + 3bbcbbc84ecc090f97e972b915713282bc37bb33b47892a00f58dc8d6fc76ffa + 91e3b48bc731b7069d63102bb1abedc80edaf6030cce7c26c11da2915207d791 + 40a4eabc98281af6acbdb6361ddaa87ebe0cf113465c69aa9391a7e6c76920e3 + 514d5db5d46a3ae389efa4571920a0c1b968e8cba91aa80e085219baaf39610b + 5459a56c57840126447e2716b03e4a4862c67ef0de1c657d1b88ad746e9b4318 + 834eee6b0365396036b2c3b8310d0e49f720603438136537734d0599abf016ae + dffc7e50d996be0b88ff49782c3b67873b1a85126cb8ae7439c810894491251e + b04ef8a22115686beb199be62a125d65e15103fc86e1f11577449a0e50a6271a + fd5e9cebc3308795155126d11c61b75c407c527958afaa49c90f99f860c1a427 + ea6957e364afc4e47fafb171a4de67d1aab33ac02d5659f9a13970c8952b436c + 05fc6c1acb8f0e711af2366f0a427f9d43afd70c19d57f30f35d78955e39ac90 + 21cdf2659b7063ff019996d9ffcd3070ce7b208487f8c61f5e4f17f0a2aeff31 + 8eda70a5cb9284d5e93b5d53fc0093544795fed47b64935dc72d2a4ff88a2114 + 8e84d8f50a3555b8c0059e2e95dc26764111706cffa7c3fac03d6e7bea43d6d3 + 8412835c39aba9c6bd8218a43572b98722489b1b641e56e93c792db4f0b3d276 + c829137cd03da45cdcf5792893854748680bb38e6d791cf3eb0f7d4b4b32fd1d + d62083fefa79e2833a087b8a1c6dc82fbedc13231811bc6761109b5c56ea8d42 + 054b2308be465b2fb9c54e3199ea8ada267b39d9c3631c1abd22fa0585ccb551 + 65de900667cb40e6c38f5ec23a591a8895de967d917c05a0a822b7c1ebff6a1c + 2469457edecb819c0c4f83cb07ae7f3faa266b2072e284d306148348dafa4388 + dac42e847728739fab9f88ca036c915b2814510b794cade44a62cb37fd4bc587 + dbc62ef5a6202c44a4660a8fc71a23631cdbbbab2d4a9e14fb0a5187dd63e45a + 6965284f30bee1b4fc165d3837e4210249f39884c659adffc077f0c5ed5a9862 + b28500f49f253bff6061d18e34362dcf13f956c27f3aab5eaa2d1c7c15961cdf + 3a3ef7bef51a594f929bde27c269871b6a8e197dca4e2ce7d38a3ff61d05af33 + ad5906e3bca5029858db5076022165fbaea31388eaa683bbfe5d8976a81a4ce4 + 4f0d92a3e016633338acb41c6c9f9c3c0c2b361d9b82c1a7b93c39514ad2f49e + e3ccb3e56105e66ba9e9f782a4ca0f6f4551c14f822718109571aceb92ed382f + cb80a0f63e0954b20fea565ec01f0b17bc965b3eec3e231a1679942340c7cc07 + 53149fa58d3e3f53c93c6a7322c0ef87587bc5de75316ad3cf883e86311845f6 + a71a5377c763d475e523c23c1353e6a188a5a3f66648cc0837b7117366e2df64 + 42512b93bccec6b2837a60d861905938fdd5bd41098a148f248d91f5bf42b407 + a2410ba8c66b38682652a5cac38e5f8aed760394386bae3fd8f89ec8f5e49f09 + a9452ea6830e76e9d26a530b822efb8125e213457da1d9b6001878859cfa189a + 96c41920192ed4afdc9ff872726ec59783b60b69f87deeff96bbb2e3703aca70 + d6bc110aa47783eed2f6f27c297a2c708202ea7e29f76942ebf5b38b8207ede4 + ebb32ac6d1111f06475835ecf5bbda707000ba3f6eba8c552e6dcd44a5b43823 + ea0283c86a62164121b3d11300b64249b4a1cf9f9c68aff8d8ab127ba65bc6eb + 24e71dd2fdd8fc147bd20c70bd7e9519ab2cb3a354678b51ec7f05adb84031d5 + 0cf84010006341b459725df728b08829b497dfa4613550619c466d8259c9c7e4 + 1a3de0f0b28c5cde5687e5e30947dcd3a42f881d6e3778c719dc3c8b9f5cb593 + d8d724bd3a704662e96c0697770d029cbc311c203b7905a942d46beddd83deee + 7be4878847f2e9125f7cdfa9a45ddf401964ba7435be9a22bdb134566db2ac7c + 9a625836caa2ade8bb5613b142fa4072156e41fca43a6823392e574092044b78 + 50d23597f5d03874da836d9f11c10bf1fc39fe939a94e75cd02b9182d79df864 + 24799a94d5199e2467fb8908c95bde673f42364434f76336de04e3a52a7ab621 + df895bca5a76d0e7754fe046bf2f44ddb1007d1166fc08c5fee84cf580b40a4e + 38650030673a7fb76c8e39df6cd390a55fa4a94005f7ca916a17f01d8d14cff9 + b8d1585cd99a0c054a33d9dbb7c6a74d4c02168f6a671d0f5fc11bd0575b86a8 + ff41884ec4339a69f86eaf9082b716e0870c3322aa37d05af7002c65e057e3a8 + 8ea2c050efbe1696cf2b1b9d74c8d9ee461b6db43f776e112ac655a52467341e + 3b47998f7815641aa9c67dca8e2e3e3b1eab8fd4116541adb735484864d25404 + 1d58e28b1aac7de9d2a16d14ab0bfd3b4e5a169dee29e207330fa0f2afc3843a + 787e042d4a8030b571d1b0d68adf447e87e9da92a517823fba5d032dd79f63ae + d9ac4838577d8ee88c9b2d5f83ec2ce6a1f0ad0db5fd386ccc480fac58b3eba8 + ecbcc28c5cd1f3a0d1a80f337af95b5a0243bfd9ca4a303f8fbbad4e9f7b1f1f + d25f460e4f416a36265a5ff9e99d1106015cb81cba4e5d7e1ab874b012d26c7d + 46a5f9b5be593a00c6541bb2bd1b9285e0685b11aceb56f143596b2ca2da9662 + 0128f0fe65e938a025b58b8c6bdc7d7e2f5680ddc4e57cec48253a409c4218b2 + 363eba43335356ac04623e4a8393b8230de3a562d3d30ce70867c4ffa19b77d5 + 2d53cb0a34aa16c13469eb4807f233f2213111e259b3e9fec3f2de7be5b7b12b + 4e6a944818db2fba8e71c27b326fcda75bd291d66c9a65aae17a974186f50acd + 65e6dea5a6386a2f3de908e442535edfc5166f25324f3b0ba1aa6af99d7abed5 + 87aaa89d1e18e913a66475ecd3e49b3d5baa0cd5f6c35664cdcc2527889d60a0 + b411ba12266cc238b2f95a0dcf3bcd6b178a59fda752bc562031a3497f57734b + e636d1c5f71227de1d492917466eeaefcd92f4266521465e758ccaa9d9e4181e + 0fb2b64fe034a9c53394b394e8962b1b19aa7a8bf32b7a1a549c4106a7d7a25a + 43354ffb31f6ccbe12f8d741e4d0c654537ffc3c911f37fa2af06cd9facaf703 + 0c7752ab75875cd0cbb043f32fa65daf30d33fa6e282717c4af44ad24cafcb89 + ad0c3c9151598bba5ca67fe0f32cc84eba30fe257064c25bd936310b8b578994 + baa557c50525a51a1abf45466f5f8e7ea5b18fbeab5477dd5eb0352083ff8a7a + 31c5f0ac564655f02b8784501f18822b39bc1efdaf8c20cf01894041f47befc3 + 47f0cec57158b4e587c4c1e4206bd307397e6b361b1bbc5b0e4921571e7e19d0 + 0c7cf28eebb846d1351eb2c3bbc38ac50f5dfc60ae0b2bcbeeda5c0e579309a8 + ebeb4daf3c8d544f66d929f6a08e4741bd36878a5fa852ee822ab619102204fa + 46da28891530a359ebf8059abe5a28943dd53f726d7133e5a1fa87608f84a71a + d8eb1cd99c744d69c6e807a52de4bc14eefb292aec257c494f5fe717b3838d03 + 58f503e6d570cc31ca1e40ccfda29624b86370cb396c28fed71055f2a24fdca0 + af15cf276bd60fec8c70897ada541d26545ba642c5d4562b85925c3a910fb2a2 + df01c051dbc455fb494753ceb1f1615da4222487224c613d7cca1765a67429c9 + de807ff81821b779f19afa0a31a2f2d42c776b19df4af1ce0fbd1c370db3d56d + 19f15ccbacfceff0495c9072283994f232c51d74f6061ebc2585224c33a5d609 + ce8d062ecd4896967bd8eb84e7112e93f1e07e3e666013e38c90aabd7808d33e + 91060f801c1c10582a691dda6a79596a6c12bd572173a44c36741f80314a753b + 8c5cff17dfc30e7b197715d79c628d16886bf1caa26c0178400329c8e69a0c09 + 95316d692ee81a3a2f274397c4f94bb3bbc422a724a766822f014c52613da531 + 253b04293e8859af843f52497679735a28c8637f03e6f68491a79fb8ede67e24 + f491fe9f08eb0de960532a20d22008a678a8cc37aaab12f478780b37c555c1e0 + 96c918b0eb27e36c46941a16a75fa8032c346fda91f4fdac3b135f24a7012c9c + 436762b351666eb731c335806db4f78734f6d703e927a03569d10ee978bddaa6 + 3dfd22c8c438e877dc1833c6ae3225b7728541ef63329f76666b84bc77ab52a5 + 371839b705d05f55398f6a97fe7e52a73f8f629ec5bba79e035aca84bd947a16 + c228eab4d51cfe413321b9ac5fd4ad9e5370ab95003dd7a7f48ed3a2f26488de + b97fb46bd4d758ebbd9de7d4c75598d4d2c77f7acf58691420aa5db2d09f6c6d + 2ad3ee8050082a93ac9a2f583e726e49b404e8daa5a4c9819753f48c55d55593 + dcf5691b27def51c64bc90732ef8f00fee76d786ea3cd294325e9a3dec7e6c37 + 71b1107ed46aa0b5c9bee05c9bc05ca399b0a7b1dad6c66858555d7b1726a355 + b4ac7c13e980afda300d8673c8651c71a6c81dbb1bc9a904cd55908891b53a9d + 675f4fce65617cfad5d3601d47676eb68fbea69a3a488610568f2e8918335c7e + 3ab01b9018f830c912c5f9f71866a14f03f0be6fce30acfb0d65cc5062159186 + 3b5dfd0a5c764c6b4b5c9a0c1a11be462085b4cb8c97003dd31b0d4bf2cfcbef + 72a185216bc40dfed5c5ae9b9e1c296d16f74cf5c88259d079fbc99fc167508b + cb5121d858e42e832b3915a8a12071edfa00b5464ee4f5a80356a3448072f90a + 2cf8cbe5d382e8d49267b439797de121799f0fa49b755fb2d8170d42021d77d6 + f23755d0480b83dafdb072506093c9a667ae4ea4691d64b71e222709a1c7dd92 + 6d4fc2105b5622796ee195f18859a653ec0576a1b80580c94c8aa6ad045dfaaa + 5481835b534db066da231010fa169a11442e052b357dc2412abdd842156c40cd + 385f4b20db40b239541f3bf7aebf9c35fd04e12bfa4904a661b9b05f3285829a + 578f54bc2bac6c14db6fea678b70cb994e69d3e34bf3205dc88aeff446edb9a9 + 93b196dc2b4ddefee82c480a0080c9acfb1e70fae37006d10306afa8c1e2b6ac + 64fea43bb7cd45b289aac6dfd9b6104c7a09831cc0b9f5707e7b41991b358ede + 8d4f88b73c81a87ff69e04d3357da19262bf + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMR12 + %!PS-AdobeFont-1.1: CMR12 1.0 + %%CreationDate: 1991 Aug 20 16:38:05 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMR12) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle 0 def + /isFixedPitch false def + end readonly def + /FontName /CMR12 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 45 /hyphen put + dup 58 /colon put + dup 65 /A put + dup 67 /C put + dup 69 /E put + dup 70 /F put + dup 71 /G put + dup 72 /H put + dup 73 /I put + dup 76 /L put + dup 77 /M put + dup 78 /N put + dup 79 /O put + dup 80 /P put + dup 82 /R put + dup 83 /S put + dup 84 /T put + dup 85 /U put + dup 86 /V put + dup 90 /Z put + readonly def + /FontBBox{-34 -251 988 750}readonly def + /UniqueXX 5000794 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bacdd6500abda5ed9835f6a016cfc8f0 + 0b6c052ed76a87856b50f4d80dfaeb508c97f8281f3f88b17e4d3b90c0f65ec3 + 79791aacdc162a66cbbc5be2f53aad8de72dd113b55a022fbfee658cb95f5bb3 + 2ba0357b5e050fddf264a07470bef1c52119b6fbd5c77ebed964ac5a2bbec9d8 + b3e48ae5bb003a63d545774b922b9d5ff6b0066ece43645a131879b032137d6d + 823385fe55f3402d557fd3b4486858b2a4b5a0cc2e1bf4e2a4a0e748483c3bcf + 5de47cc5260a3a967cac70a7a35b88b54315191d0423b4065c7a432987938c6b + edad3b72ad63c2918b6e5a2017457e0d4ebc204a520640fd7c4d05e35ea5486f + a43d0e970787203855daccb1ed0b16325828b13b7c767a1a58c87902f0546ea5 + 404440fa6526975783c2d7a9572b8e5d5176bac598b8960609f49016aebf3763 + 89c1adfe6a1ffc0c53b3acd9d168ec3a278fd4f1d9b085dc2df701346c9d0887 + 3d230a161692b42a45bb5da343b4edd839dd60685a59aaa49fc65cd8e2ad2a9c + 5cab953495172a1a9f40d5f38e922443a519dd96f667201a408bd1d89e35f4ab + 98e2f68c3366efc14b5afe1018d9c845d808d4f8e07ea8168518a171ab4d6e21 + 70eeac099eb7ef46eb9781384da1fac3b3133bb718bc80082eaea88759745188 + f266b31d0c7e791d633f16ed94e05517a32163e74cbd96dc5db066f2a5313d6d + 7f09465608cb404613e0f058073af000e5bdfafbbf9da0c0d5c02a3447f2cdc1 + f56481901e34265c26d331ac3f85bdcbc7c51ef9eddf2b9c189c5253f8e74282 + d6f053d7d183ae17ea175e5ebc401e67d21a9fea139cbbf3bb1358c713a75843 + b39a69aa2b1a7b975f53ff22d1dc3bdf7acd17afa1da21568310c68241b31d3d + 03bf404bd30baf9cc19c75b958bce7155f03cb0cfe2cae0327aad4b603284a51 + 7c26de75b8c6f6aaa9debe4aec08ca4b646d787bab1e702054272909211e814c + 1d2c33152bda973de70ec02436551ff9be604d16ffa29b93380b5a04a493f00a + c1d3c429bd6c92508652f7ab7347e9dab047409e478b59e22a73993a96ad13f7 + 3a58f110ca20a1d65e0577f470498b6faed25a690fcb92f9f19bac5ac431c893 + 607dfdc528e7d7ccd1a953ffda264220271f146682ae3af7b7d80807576dcb76 + 0e5c25929b3a4ac45cc6fa965b8ba72eb5f411d089e080b28c17e3345b0fdcf8 + 7ee9a08f4f4254baca3d7de661e4314359f48ffa605439d5a53f2bf91a54f2f1 + d25078a4578298d6a09111157aa6e42392a912b0248e38f0db90bae3807d4e5d + 2a346759bff018f7d14d803a653504b1125267d95d402ac123b9135bc5d20039 + b963cbff9139ce88890fbcd90f013a6e305492f68285bb46fffd86beb8d43e0d + e342eab02cc93e46713891c145b385486ee6e689326d2067aaa18e2f88a7f588 + 952072b0c3c8fc7641aa375266608556b7262863bbeee7df6c89c4c25ba03640 + 3e517a48c23760bdb7122606918dfa1fa4755900b0cc56d4c6d2cfe60cdfe287 + 7dd8996c959cce6001d13035378048e22a29245e05641cfd45c6d96142e4133c + adc13231c99d9abdd7ff7f7e638b851f6165e0d830f00d1e53ceb7a647ff6c88 + 69d9a25ea85567125e36b1b48f2bf986a04a8bf2d150408ddc942733ac4dd069 + c111776161e802014b7246473d88faa3d4cb328e4d58d6215496f8b55d9e612e + 040b12d828d9d2fd007d6bfd80d218e69cc8cef8737ac6b1176c961edbff26e6 + 66c10c230b35125d61fbda360b04a49aaf03389bb396d20d9edfe20a25c076f9 + 9104cd4ff7c0e347247d077246c7f9aab78a6ad76eb2ce3b6e0ca9ed0102be8a + 4af0284a79a38148f6cea9e7722c782f2906cab3e8264d48a3d4ffb95d976f62 + c056d0da8ea2578f69261b3d54a58516caf485e41d9b8fd56547751c3450b8e5 + 206a2249a3c9d88f949e82aa692354efaf9e6a40e14a40eea62e9ab31a892227 + 624ef08e12a0e23a8910d9143b7629d32ec3496eaf38cdce27af8d77510f4b90 + 916f443a4e8e555401b7f0e31f587c095d315ed377453ee5d0cad21a0e6af2b0 + f1ab7775de6557d4c45b714944bda7db27da5611137e7ff343da495102f12b72 + bf107900d1f04fbde796ac12e731419c4b3631c1e08cd2531db2d7ba794a3a77 + de7d9afc7f9c219718ac01bfca67a8ea6f221992333b925c898c0da64285e803 + 4dcfa3e8b8b00f3412850c6a2c36e4cb48ca631d992382075236028d5a49352f + 2c0304920ee02a4e6e787b56130e2d94fe05ceda85f1e6b4a23122a11b78c708 + 963cb5ffd3de0197c5b39bca9e0f7f798694a098ca3ebe39474695f4195cb872 + 9b9b2522f67769a4f4e52651a7b8178a7411da6a0db59628e2e36f42440ce6ad + e7a6643c4d5462a82785df182f49e3d6c412487dd6355f72097d48bb82397a68 + e409aad3ae838247476eb85dafb6efcd8755884fe9d4a1bc6986ce9dfe79254d + 2b09c8c23dfc9f5b0a5cde6dcd6351cb5dc26473bfe3ab3f3b0c84924ec7ef93 + 8ca9a51684faa4cd82c8913f40c9c0de8fd4f2a1c8d42879ce6e7164840f4ab1 + f7ac92efc12cd1e63ff7259156c014108b33a70c89371acc4fd8ca15a5a335e8 + edfa380b4a7a21af6346b4dace31e5fdec60020593ec75046e27d841233b75b8 + f073b1cbb5914d0bb01ce04193bb588266c3207f183dd3625b3717840122e3eb + 61d659e850618f39eedc598edd4dc9997fe964d989b10531e0973496b776ae94 + b0fbc55fe6cf2c47c979fb71028db3e21145ea44691da621b88b5f082e26ce82 + dd1b2dc2aeedc1ae2cac9ab4089958c9bdbc4af761d6e89005bf4973c24d4b8f + dacd5845315531642e0c64a8fd9c7ef3505dc68ef30a7c599af8fa7f4ed9a58b + 7dc63e745c5cc7f477064c8a8f7aa591c52a85b8b255273015c5b06c73cf507f + 80cb7752d8236a3d5449c1f28270d76b04ea243b50503df02082cfea4b4b2c0b + fcf426832710e809c2cb3d097849f2aff4e83c895c81e20d77cbb18285ffc724 + 2d59a6bb571727c0115ad948e88e51fb14649078693f2ff793eae9fa69c7eb57 + 4fe77530c68e7b69d07994a627ffcd337213c7b5258be9fab969d936c6799e1e + a48ab6caede9b580e88adb75b6a3def19394903fc73ff52fc74f408a25984ea1 + 5f138a4dab57b88eb4023fa60911ad0b06e133558326f3027ffc1c3d10b036e2 + a969ec28c8878152ef381f6843ecdb214d43696c23e66cbb637d986257fc9fe2 + 4fe8a12c57a1c3306924312575f24365a4c17bd8a449744a2632622cd66b5a70 + 94ca3dc105d8a20587f7b18f6c251d16391cd1e0b1836d3a4e6eb0ca560ebd8c + 796fe717a1e229c76a26e8c380afa8e1ea2a81474b5a6ad64f599b6a24836b61 + e9dca91273be6293ee5bfa2cdc3ca44873b4e6ac2f99c3a36d3e8b78a17a3b71 + 073171d9492120bc3385a8ade9321135fb1899f2d9cae40944c447d35af63f62 + e43c005dde3121b290e58ff20327e70fff6234917c1008f5d7cd0779082e0b71 + 0a0ff5e0a4366566e89533b67608051c377438c6ecca5a5e99734791a95f6ec4 + fb9bb680592c65c05d99c353eba60db4bec21cf712328e4da287d64e8aef6e57 + 8f9d3b69f42232756155e3d6a38e5cb6dea7b37b9b36c986cc895c5efff53680 + 7fdda7851d704ca51722674c7b50724cc362341f72ebbf2c3ba1a642ec584464 + 94d878141adf8439bb5868892def0059fe9b93d50b2316a14f486c43ce76d1d9 + 23caf4a78b94047573a72b0e33241bcbb11a2136f69214962d1b6ba8fc75365a + a7a549c2043bfc926caab7810895af2c991fcbc07521773f225e5d239c95516a + 0892fe5b08294ede22af61135f3566db3eea73eded497d8df6498d795613af48 + 0191ee7b877db6422cbc90a848fdb9bd9e4ed296a6c6bdfbd0f86e7d05cce253 + 0c68b0d2c5f98998ae2aed2140c2870fde90e4529d7dd9f09fe36e715cb25196 + 4987c184139bb7923061e9b41915c016424b68e812a492885af1dca40151503f + 6ffc53e3e712b9cc64203f0cd8191caf214d374efa01c566600804707d161975 + 1a826547d7b6579f868dab0607a58240ebff785ba64d30f601896b063c36044a + 5fddea9adc25523fcb80666553604c5b5e3038efb9dfa04d78c327d645ab3476 + aed9522b56972b61f17c639afdaa9e30f174a6720f0c81fe620bffea7adf9074 + 91f8a32698e36b024f53a22fbb80a1f57557053fc66f417288f954532fed91c3 + 269b04c7572987645cf98046c3e6115525bf51b1306f6f1584b79c47f7be323a + 1b3ab552b7c3304a28f445e360a9a2a183e66859de5257b34135f64ed16fbd3f + 69de25bf939b31a8567b15c0004bdeb9510152edcfce68bc1d8a666612d30f2c + 5440d8f9ba672d013ee366af47bb55a1f060f0824aeaacebaee944ab572cce21 + de4652054cee45dd9d59531b76d711d6f1bec7773fb3ea269c86eb1294971714 + 0d7ebb772651fdf76d276a05ad28fa7ba59b4d37e93746db741a5e24586502da + 3807a1d39bf279a2145d8e11c9e25718336c929a0bd9800f7704a51d541f8223 + f4d68814943bb3176480baabd47c226bfbc56fba6724aea8b3d5a23c1d8bee19 + 5f970de58973fdec522c0b30dd623a3ae39b169dee0bc2f787dcc2c3de410b62 + 12bb54719194270744620f9da2720ad9f6353d07c04f0fcb60cb4095d6fc117f + a4593eacd4685a19f908b5e8ae29ba55f6281b26325b960d88e13ad9e26b359b + 15be936d5fead9bdd600202161ed57fcf28bd964d3ec26cab75a21b9a6cca341 + 07c18d86813e1229c38d5e3824e30ce1b0ca7f43c079e2fc7f2af2232bb850f5 + 650c0702adf01523cd1b64b5088f6a2d2b55594dd980247cc7028bf57300c411 + eaa13b014d2902988babf1c34b17a7cd889eeac329be8c8edb635a2b044040d7 + 2cc4ee2f806bf7a11b1585ce5767174b500d8c23d495c4304527be6946bd8091 + 8f9757c8eb4e66bd3eb2fb74007cfd9978895ad2edb05d09f34c057b10958fb7 + 8fef811a32018e65f248ac5a4c4117bb1008a9fbfc8acf6433305e468bb6f71f + 8c1501620dba4ec5d63fc49f39414933ffc758fdd8b246309026a8dc42ef191b + 4ed52f0f2efc12df9516f026a02c10efb93d121bf6ecbe70f45e31ec628e28c2 + e45eec1ba1a5cc2dcce3a6ff1e85e5920755af98b1e5ed7b465a026e98ccb485 + 45a053adeddf25dbe661b0c73783b11836c718039a717d4337acd782c268862b + 0cfb000d80b92a6a22e6d9756c685971a0bff00eec6c5bf54cdb245ccd6df787 + e3b0644af07fb4cb9c084d815ae83ddbd3a8dd764a3a2ae51b3209123d8e0f22 + c0d209676bfa243c4e64faf005c388b3726fea5aae01f2f3e3107d79af5aec8b + c2f1981068fdf9b99e8ef4aa96e566f4a4c54dc739af12cc3bae9be29733773f + efa9157b07526d5a1a27366ab3ddc6e28af7ccd233ad30c9f677620480eaabfb + a45e8dbda61972b9cca78de769b424e6280aa66f28e1a988d2f52c8ff0928210 + 561043bc6c24f08dc2e1cf3a932c9159122f3a4bbbeb1e21f44778326a3cac13 + 9d0681856f5098351f458f0ec75eabb905aeea1fb37aaea723a0dea0f071b605 + 1d23e0ffd60bed3a91013a476bb689adef2a74c72e91c67204ef31df03ef4adb + 720cbbaa2e44aa9a36c70c7e20bb406f285ca0 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + %%BeginFont: CMSY10 + %!PS-AdobeFont-1.1: CMSY10 1.0 + %%CreationDate: 1991 Aug 15 07:20:57 + + % Copyright (C) 1997 American Mathematical Society. All Rights Reserved. + + 11 dict begin + /FontInfo 7 dict dup begin + /version (1.0) readonly def + /Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def + /FullName (CMSY10) readonly def + /FamilyName (Computer Modern) readonly def + /Weight (Medium) readonly def + /ItalicAngle -14.035 def + /isFixedPitch false def + end readonly def + /FontName /CMSY10 def + /PaintType 0 def + /FontType 1 def + /FontMatrix [0.001 0 0 0.001 0 0] readonly def + /Encoding 256 array + 0 1 255 {1 index exch /.notdef put} for + dup 3 /asteriskmath put + dup 13 /circlecopyrt put + dup 15 /bullet put + dup 33 /arrowright put + dup 50 /element put + dup 56 /universal put + dup 58 /logicalnot put + dup 59 /emptyset put + dup 102 /braceleft put + dup 103 /braceright put + dup 110 /backslash put + dup 120 /section put + readonly def + /FontBBox{-29 -960 1116 775}readonly def + /UniqueXX 5000820 def + currentdict end + currentfile eexec + 9b9c1569015f2c1d2bf560f4c0d52257bac8ced9b09a275ab231194ecf829352 + 05826f4e975dcecec72b2cf3a18899ccde1fd935d09d813b096cc6b83cdf4f23 + b9a60db41f9976ac333263c908dcefcdbd4c8402ed00a36e7487634d089fd45a + f4a38a56a4412c3b0baffaeb717bf0de9ffb7a8460bf475a6718b0c73c571145 + d026957276530530a2fbefc6c8f67052788e6703bb5ee49533870bca1f113ad8 + 3750d597b842d8d96c423ba1273ddd32f3a54a912a443fcd44f7c3a6fe3956b0 + aa1e784aaec6fce08dae0c76da9d0a3eba57b98a6233d9e9f0c3f00fcc6b2c6a + 9ba23af389e6dfff4efec3de05d6276c6be417703ce508377f25960ef4ed83b4 + 9b01b873f3a639ce00f356229b6477a081933fef3bb80e2b9dffa7f75567b1fa + 4d739b772f8d674e567534c6c5bbf1cf615372be20b18472f7aa58be8c216dbd + df81cc0a86b6d8318ca68fe22c8af13b54d7576fe4ca5a7af9005ea5cc4edb79 + c0ab668e4fec4b7f5a9eb5f0e4c088cd818ecc4feb4b40ec8bd2981bf2336074 + b64c4302813551ec0153be72f1f9695b56a658dabe99f86a31e4ff66f78ac445 + f6b938c7179c3e1aafa21dcd8d79a9ca22998fc113e9e9df9cb916f5cbc2ac30 + 2db01b015450be0672f9e2d0837c41f017527a90965bbdaad3abeeb1534b714f + 6b2887225d9c855e861c13451a2c1b347664fc13db2ccb4ddcbd6eaf9e1c78de + 50150580f969da56d98345357777f95c8f3fa79bae018b3153be30ac0b600da0 + 47fea222f1a1db6fbdab176c227a56925237d9b60f2a38c3beb4acae4e8b48fe + 78f6ef02b3239011cc68368e002e1b929df32c069cc37ee833f1fbe0ff7dedf0 + 36dce94fab78a74c74c69ea40a88c0a94b60db10ab0384f37d64f2acc89fd24c + a1ce241393c5f103eb189acb8587a53b768b0a452b8df27d84cdf13a9beee44f + d617e5a668e9440c3f41c630de57bcec4b6ce908a0597c9434a8c56b982775a1 + d149609516b9bab4d82a9f4e9e0abef765e6201630fa4140e9f736d9f32b6b5a + 7bd7d0aa345e182a46a3386ffcfc6fe11eba491fa40a6b64467542fcd4d2174b + 2db65151337e7b65c2187cff1eae93143d2c77bf4840bdb484e56417c0c5b97e + e4895fb6a29fdd3b4837c51e183cb0d32352f20feeca1db8898607a8f051556f + 6bc65d64e6863e1b33fad778eeac32099b5ad45740528fbafba571cc67232541 + 1b1d0cf925e28b0f84aa4327881f92b1426a35f166563ada702af6643a3b2a9f + ce090bcc19642aec1b6b5b0d8c31d66312926cb2521c0b0835612046e0eff5b9 + a666ccc9631d949ec366fd18f88662cbac4a41fa8c5318cd72a8e9fa6c5c539c + 949aca6e788fb80e6a7b988e52bcd4f9507fa50571d2214a4f1a29a7396ace0d + 3feb4f0a4ff72da90c0e85d372c92c0ebb211986b1d6d210b809bebf26961caf + 1193684f1b5a05bbcbed024a66a8e1f80bf41747954469b3e47e297ef20e3ee7 + adfe6921bd48f90d979a28dcefe007bc9429c6aacfb642a64da76fed7f4c2e91 + bf02b8c54b75bd97e686940572575520613c4aa16329da6c37257f5666e11760 + 86feaca2eba3282414bfca1f54751fd0c525fca0e6e4dfb3f77fcb31ec6bfd56 + 21bc9038708670ad1c4740fb9f1f56a378b0d5a42362f8431dbd141c287d9eb7 + ba99decbc3d22ae4989cd45c65acf43b20ef4c07ab91ef911bde188d83b72526 + d9f2121c6aec2b066fa6ae4ad33f891908382f8c6a46a7a702e5807305028fc9 + 9313c2c320e240e3a8c224daf3419d910f427bdbb8068cb1692d20cccd3fc622 + 450a9a4141d0937de79f83959fe7ffdd63ff036551779da48fdce5a81d9fae46 + 8140848099d1ca9a1019ccc23aaeb30f4453d3f6ad7cfa3ca9f72e7e8de6f05d + c4cb899e25f129062c27ca47d68c03e3fed42a3edf5458eac5eb8c8f2c1bb57f + 0bd271a8c8307d927440ebecf99d1f01b0d72f7437efcc276575b72f18d77c71 + 3dc44fa2722624066fe34caf62511770557025bc03b10c4a0f54c692ffa2edb7 + 5b25628d513ffec70766781de29e1e8f72ce28763b4618fb34bf2ed701a6c487 + b80231f1471d5a782d702a91cd3584a1f9632c3f346e1b769f0e93f982c803cc + e51879f89e78bfbf41790de44617955950993caf3db4a96b95fd08a560aa240e + 856cb3328d0c3b83de9e1370601ce1962e3719be07dfc94e94070c6c090a7f26 + 01c48336d167cc4b2d80e3316bef1ae6282c255aef47423d60a56a17adad8ff3 + 3bea0f415b43ac506462dc496bb7c201a45b86a8845277059c201d05a263bad7 + bb3f2fb4657c0ebd4dc2c4270f903f20dbbc153fcdf04edaa6ff3bf2b391798d + 068db2f5586aae4a20973851debc2038d49f0ff224959cabc016a3b2069361aa + 07c4e4f98d8fa4c5aea31b824dac46ec300a916455f3fba6b16d3776e501d6e8 + 3f732d81c479233247dfd7f551f369293b5fbf789d268daecdb9cc0f954a056b + af8d5f28e58d72829bdfa07bf3dd8e63744f82846ee0ec0fdce90c06d2cc6d22 + 0c0de34823131dd7e0c5d8bd2797a4e1ee92fe6d0ee354eefd393e39e80ed217 + cb308df6984945e7b10e2e14fac10501f5ffcb812ec2be6d8bb7db4ffa62ab01 + 1b571e77d91f2553c90f6b94d7923b8d986e8c2f01a02982a128fc1c9571aaab + b62edb15b0dbd189b2528bc4e0d339bdd785086a93b15fb85dd5e25897f12eaa + 86f780a7e4ba11961a4aa9e83dc91e5e38ad83ce06fe0cd2a05d23058d730768 + b3fd82781bb688e8b38828799f7422ec057d4f022313b0e6d951e71372cefc1d + ca5a4616ad8d43bf0851e83fdb9392204b66c1567be3424c0169fcc268b9eaa9 + 2be65e635caf37b9dbbc4a9f396fd2d2e93e6b3c51db517e3af6b62c998d2356 + 543c63d377f537e0fd12569a588662dd929985cd733148a3034eddff6824b348 + 8d2c16841fcb33d462ea1ea6a489c51c02e3b74a268512c404918dd919206703 + b94113cc39468b2fd696311722b11dfe515c3441fae42cf2a68f4f8debca9dda + da6031c8e4d56793b5f1c12411a77114db177c80e8a458dfa2afe887a73893a6 + 9b16403077614db3a0d2fce745b2cb6837748a13b15fb48951ab5a99faa82f00 + f8e6ede67c5221cec8d4b4ae5c0cd87944afc8ea9a72c70ab7da707a61239bb4 + b4135dca711774b01c2b8515c951bbb432708f7d274889a8260494059565df3f + e7a04c9b1b263365e06feddf122a45cb82356a47eb09b660a8a5688433e0de75 + 9c0afbc1fb42905f232a4b301b8c68dc6c95e01501244e8a86a863aceebf700a + 2e9bf9e37dd467ef0279ea + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + cleartomark + + %%EndFont + TeXDict begin 40258431 52099146 1000 600 600 (thesis.dvi) + @start /Fa 134[37 9[39 10[39 1[35 98[{}4 74.7198 /CMTI9 + rf /Fb 172[69 83[{}1 83.022 /CMEX10 rf /Fc 150[24 105[{}1 + 66.4176 /CMMI8 rf /Fd 130[35 1[35 35 35 35 35 35 35 35 + 35 35 1[35 35 35 35 35 35 35 35 35 1[35 35 35 35 1[35 + 1[35 5[35 35 3[35 35 2[35 1[35 1[35 4[35 35 1[35 2[35 + 1[35 35 35 1[35 35 6[35 35 35 35 35 1[35 35 35 35 35 + 35 1[35 38[{}54 66.4176 /CMTT8 rf /Fe 139[51 51 51 1[51 + 1[51 51 51 4[51 1[51 1[51 1[51 97[{}11 99.6264 /CMTT12 + rf /Ff 135[52 3[33 43 41 2[44 55 1[27 47 1[31 1[43 2[47 + 9[62 53 75 86 3[56 69 1[58 6[40 2[58 1[75 65 1[68 5[25 + 25 27[54 1[40 5[55 22[{}28 90.9091 /CMMI10 rf /Fg 135[39 + 39 1[39 39 39 39 1[39 39 39 39 39 1[39 1[39 39 39 39 + 39 39 39 39 38[39 10[39 39 4[39 39 40[{}25 74.7198 /CMTT9 + rf /Fh 156[48 99[{}1 90.9091 /CMITT10 rf /Fi 133[34 41 + 41 55 41 43 30 30 30 41 43 38 43 64 21 41 23 21 43 38 + 23 34 43 34 43 38 4[38 4[79 58 1[55 43 2[52 60 58 70 + 48 1[39 28 2[50 1[59 55 1[58 6[21 38 5[38 38 1[38 38 + 21 26 21 2[30 30 21 4[38 21[43 12[{}56 74.7198 /CMR9 + rf /Fj 201[30 30 30 30 30 30 49[{}6 49.8132 /CMR6 rf + /Fk 201[35 35 35 35 35 35 49[{}6 66.4176 /CMR8 rf /Fl + 133[50 59 59 81 59 62 44 44 46 1[62 56 62 93 31 59 1[31 + 62 56 34 51 62 50 62 54 10[85 86 78 62 84 1[77 84 1[106 + 67 2[42 1[88 70 74 86 81 80 85 6[31 5[56 56 56 56 2[31 + 37 31 2[44 44 27[62 12[{}52 99.6264 /CMBX12 rf /Fm 133[60 + 71 71 97 71 75 52 53 55 1[75 67 75 112 37 71 1[37 75 + 67 41 61 75 60 75 65 10[102 103 94 75 100 1[92 101 1[128 + 81 2[50 105 1[85 88 103 97 96 102 6[37 3[67 67 67 67 + 67 67 2[37 45 37 5[105 22[112 2[75 12[{}54 119.552 /CMBX12 + rf /Fn 133[46 55 1[76 55 58 41 41 43 1[58 52 58 87 29 + 55 1[29 58 52 32 48 58 46 58 51 10[79 80 73 58 78 1[71 + 79 82 99 63 2[40 82 82 66 69 80 76 74 79 6[29 10[52 1[35 + 7[87 1[87 22[58 12[{}48 90.9091 /CMBX10 rf /Fo 200[274 + 274 274 274 274 274 274 49[{}7 498.132 /CMINCH rf /Fp + 130[44 1[44 44 44 2[44 44 44 44 44 1[44 44 44 44 44 2[44 + 1[44 44 44 44 44 1[44 1[44 10[44 3[44 1[44 1[44 4[44 + 2[44 6[44 1[44 8[44 44 44 44 2[44 44 44 44 44 1[44 4[44 + 33[{}41 83.022 /CMTT10 rf /Fq 134[44 44 1[44 46 32 33 + 33 1[46 42 46 69 23 2[23 46 42 25 37 46 37 1[42 10[62 + 62 1[46 2[57 2[76 52 2[30 1[65 2[63 60 59 62 19[28 23 + 44[{}34 83.022 /CMR10 rf /Fr 130[48 1[48 48 48 48 48 + 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 + 48 48 48 48 3[48 1[48 48 48 48 1[48 48 48 48 48 48 48 + 48 48 48 48 1[48 48 48 48 48 48 48 48 48 48 2[48 48 48 + 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 + 48 48 48 48 48 2[48 48 33[{}82 90.9091 /CMTT10 rf /Fs + 131[93 1[37 44 42 60 42 49 30 37 38 1[46 46 51 74 23 + 42 28 28 46 42 28 42 46 42 42 46 3[28 1[28 1[68 68 91 + 2[65 51 66 1[62 70 68 82 57 1[48 35 68 70 59 62 69 65 + 1[68 3[70 2[28 46 46 46 46 3[46 46 46 46 28 33 28 1[46 + 37 37 28 26[51 12[{}66 90.9091 /CMTI10 rf /Ft 133[103 + 123 1[168 123 129 90 92 95 1[129 116 129 194 65 123 1[65 + 129 116 71 106 129 103 129 113 9[240 175 1[162 129 173 + 2[175 1[220 140 2[87 2[146 153 1[168 1[175 65[{}36 206.559 + /CMBX12 rf /Fu 165[60 3[73 73 70 54 72 1[66 76 73 89 + 61 2[35 73 77 64 66 1[70 1[73 6[27 12[33 45[{}20 99.6264 + /CMR12 rf /Fv 135[40 9[45 6[45 45 42[45 61 1[51 5[61 + 16[91 17[45 1[91 9[45 3[{}12 90.9091 /CMSY10 rf /Fw 128[45 + 3[45 40 48 48 66 48 51 35 36 36 48 51 45 51 76 25 48 + 28 25 51 45 28 40 51 40 51 45 3[25 45 25 56 68 68 93 + 68 68 66 51 67 1[62 71 68 83 57 71 47 33 68 71 59 62 + 69 66 64 68 1[43 1[71 1[25 25 45 45 45 45 45 45 45 45 + 45 45 45 25 30 25 71 45 35 35 25 71 76 1[76 45 14[45 + 3[76 76 51 51 53 8[71 2[{}90 90.9091 /CMR10 rf end + %%EndProlog + %%BeginSetup + %%Feature: *Resolution 600dpi + TeXDict begin + %%BeginPaperSize: Letter + letter + %%EndPaperSize + + userdict/PStoPSxform PStoPSmatrix matrix currentmatrix + matrix invertmatrix matrix concatmatrix + matrix invertmatrix put + %%EndSetup + %%Page: (0) 1 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + showpage + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 1 1 bop 355 818 a Fu(LL)-11 b(VM:)34 b(AN)e(INFRASTR)m(UCTURE)j(F)m(OR) + d(MUL)-8 b(TI-ST)g(A)m(GE)34 b(OPTIMIZA)-8 b(TION)1884 + 1870 y Fw(BY)1313 2083 y Fu(CHRIS)34 b(AR)-8 b(THUR)32 + b(LA)-8 b(TTNER)1277 2295 y Fw(B.S.,)30 b(Univ)m(ersit)m(y)i(of)f(P)m + (ortland,)g(2000)1785 3379 y(THESIS)925 3591 y(Submitted)f(in)g + (partial)h(ful\014llmen)m(t)f(of)h(the)g(requiremen)m(ts)833 + 3704 y(for)f(the)h(degree)g(of)f(Master)i(of)e(Science)h(in)f(Computer) + g(Science)1342 3817 y(in)g(the)h(Graduate)g(College)h(of)f(the)967 + 3930 y(Univ)m(ersit)m(y)h(of)e(Illinois)h(at)g(Urbana-Champaign,)f + (2002)1642 4930 y(Urbana,)g(Illinois)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (1) 2 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 3 2 bop 199 423 a Ft(Abstract)199 938 y Fw(Mo)s(dern)35 + b(programming)g(languages)h(and)f(soft)m(w)m(are)i(engineering)f + (principles)f(are)g(causing)h(increasing)g(prob-)199 + 1121 y(lems)27 b(for)g(compiler)h(systems.)40 b(T)-8 + b(raditional)28 b(approac)m(hes,)g(whic)m(h)f(use)g(a)g(simple)g + (compile-link-execute)j(mo)s(del,)199 1304 y(are)43 b(unable)g(to)g + (pro)m(vide)g(adequate)h(application)g(p)s(erformance)e(under)f(the)i + (demands)f(of)h(the)g(new)f(condi-)199 1486 y(tions.)69 + b(T)-8 b(raditional)40 b(approac)m(hes)g(to)g(in)m(terpro)s(cedural)g + (and)e(pro\014le-driv)m(en)i(compilation)h(can)e(pro)m(vide)h(the)199 + 1669 y(application)e(p)s(erformance)d(needed,)i(but)f(require)g + (infeasible)g(amoun)m(ts)h(of)f(compilation)h(time)g(to)g(build)e(the) + 199 1852 y(application.)340 2034 y(This)k(thesis)g(presen)m(ts)f(LL)-10 + b(VM,)40 b(a)f(design)g(and)f(implemen)m(tation)j(of)e(a)g(compiler)g + (infrastructure)f(whic)m(h)199 2217 y(supp)s(orts)32 + b(a)i(unique)f Fs(multi-stage)h Fw(optimization)h(system.)51 + b(This)33 b(system)g(is)h(designed)f(to)i(supp)s(ort)d(extensiv)m(e)199 + 2400 y(in)m(terpro)s(cedural)26 b(and)g(pro\014le-driv)m(en)g + (optimizations,)j(while)d(b)s(eing)g(e\016cien)m(t)i(enough)e(for)g + (use)g(in)g(commercial)199 2582 y(compiler)31 b(systems.)340 + 2765 y(The)43 b(LL)-10 b(VM)43 b(virtual)h(instruction)f(set)h(is)f + (the)h(glue)g(that)f(holds)g(the)h(system)f(together.)81 + b(It)43 b(is)g(a)h(lo)m(w-)199 2948 y(lev)m(el)32 b(represen)m(tation,) + f(but)f(with)f Fs(high-level)k(typ)-5 b(e)33 b(information)p + Fw(.)42 b(This)30 b(pro)m(vides)g(the)g(b)s(ene\014ts)f(of)h(a)g(lo)m + (w-lev)m(el)199 3130 y(represen)m(tation)j(\(compact)h(represen)m + (tation,)g(wide)d(v)-5 b(ariet)m(y)34 b(of)e(a)m(v)-5 + b(ailable)34 b(transformations,)f(etc.\))47 b(as)32 b(w)m(ell)h(as)199 + 3313 y(pro)m(viding)j(high-lev)m(el)h(information)e(to)i(supp)s(ort)c + (aggressiv)m(e)38 b(in)m(terpro)s(cedural)d(optimizations)i(at)f(link-) + g(and)199 3496 y(p)s(ost-link)c(time.)45 b(In)31 b(particular,)h(this)g + (system)g(is)f(designed)h(to)g(supp)s(ort)e(optimization)k(in)d(the)h + (\014eld,)g(b)s(oth)e(at)199 3679 y(run-time)g(and)g(during)f + (otherwise)i(un)m(used)e(idle)i(time)g(on)f(the)h(mac)m(hine.)340 + 3861 y(This)25 b(thesis)h(also)g(describ)s(es)f(an)g(implemen)m(tation) + i(of)f(this)g(compiler)g(design,)g(the)g(LL)-10 b(VM)25 + b(compiler)h(infras-)199 4044 y(tructure,)k(pro)m(ving)g(that)g(the)f + (design)h(is)f(feasible.)42 b(The)29 b(LL)-10 b(VM)29 + b(compiler)h(infrastructure)f(is)h(a)f(maturing)h(and)199 + 4227 y(e\016cien)m(t)36 b(system,)f(whic)m(h)f(w)m(e)g(sho)m(w)g(is)g + (a)h(go)s(o)s(d)f(host)g(for)g(a)g(v)-5 b(ariet)m(y)36 + b(of)e(researc)m(h.)52 b(More)35 b(information)f(ab)s(out)199 + 4409 y(LL)-10 b(VM)31 b(can)f(b)s(e)g(found)f(on)h(its)h(w)m(eb)f(site) + i(at:)41 b Fr(http://llvm.cs.uiuc.edu/)2111 5568 y Fw(iii)p + eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 61 67 bop 199 91 a Fw([42])47 b(Bjarne)32 b(Steensgaard.)46 + b(P)m(oin)m(ts-to)34 b(analysis)e(in)g(almost)h(linear)f(time.)46 + b(In)31 b Fs(Symp)-5 b(osium)36 b(on)f(Principles)f(of)386 + 274 y(Pr)-5 b(o)g(gr)g(amming)35 b(L)-5 b(anguages)p + Fw(,)32 b(pages)f(32{41,)h(Jan)m(uary)e(1996.)199 531 + y([43])47 b(Mads)40 b(T)-8 b(ofte)41 b(and)e(Jean-Pierre)h(T)-8 + b(alpin.)69 b(Region-based)41 b(memory)e(managemen)m(t.)71 + b Fs(Information)43 b(and)386 714 y(Computation)p Fw(,)33 + b(pages)e(132\(2\):109{176,)37 b(F)-8 b(ebruary)30 b(1997.)199 + 972 y([44])47 b(Da)m(vid)38 b(Ungar)f(and)f(Randall)i(B.)f(Smith.)59 + b(Self:)54 b(The)36 b(p)s(o)m(w)m(er)h(of)g(simplicit)m(y)-8 + b(.)62 b(In)36 b(Norman)h(Meyro)m(witz,)386 1154 y(editor,)i + Fs(Pr)-5 b(o)g(c)g(e)g(e)g(dings)40 b(of)e(the)g(Confer)-5 + b(enc)g(e)39 b(on)f(Obje)-5 b(ct-Oriente)g(d)38 b(Pr)-5 + b(o)g(gr)g(amming)41 b(Systems,)f(L)-5 b(anguages,)386 + 1337 y(and)34 b(Applic)-5 b(ations)34 b(\(OOPSLA\))p + Fw(,)c(v)m(olume)h(22,)h(pages)f(227{242,)i(New)e(Y)-8 + b(ork,)31 b(NY,)g(1987.)h(A)m(CM)f(Press.)199 1594 y([45])47 + b(F)-8 b(rederic)31 b(Vivien)g(and)f(Martin)h(Rinard.)40 + b(Incremen)m(talized)32 b(p)s(oin)m(ter)f(and)e(escap)s(e)i(analysis.) + 42 b(In)30 b Fs(Pr)-5 b(o)g(c)g(e)g(e)g(d-)386 1777 y(ings)33 + b(of)g(the)g(A)n(CM)f(SIGPLAN'01)h(c)-5 b(onfer)g(enc)g(e)34 + b(on)f(Pr)-5 b(o)g(gr)g(amming)36 b(language)d(design)g(and)h + (implementa-)386 1960 y(tion)p Fw(,)d(pages)g(35{46.)i(A)m(CM)e(Press,) + f(2001.)199 2217 y([46])47 b(Rob)s(ert)28 b(Wilson.)38 + b(An)28 b(o)m(v)m(erview)i(of)f(the)f(SUIF)g(compiler)h(system.)g + (Unpublished)d(man)m(uscript,)j(Stanford)386 2400 y(Univ)m(ersit)m(y.) + 199 2657 y([47])47 b(Rob)s(ert)27 b(P)-8 b(.)27 b(Wilson,)i(Rob)s(ert)d + (S.)h(F)-8 b(renc)m(h,)29 b(Christopher)c(S.)i(Wilson,)h(Saman)f(P)-8 + b(.)28 b(Amarasinghe,)g(Jennifer-)386 2840 y(Ann)38 b(M.)h(Anderson,)h + (Stev)m(en)g(W.)f(K.)f(Tjiang,)k(Shih-W)-8 b(ei)39 b(Liao,)j(Chau-W)-8 + b(en)39 b(Tseng,)h(Mary)g(W.)f(Hall,)386 3023 y(Monica)33 + b(S.)f(Lam,)h(and)e(John)g(L.)h(Hennessy)-8 b(.)46 b(SUIF:)32 + b(An)g(infrastructure)f(for)h(researc)m(h)g(on)g(parallelizing)386 + 3205 y(and)e(optimizing)h(compilers.)41 b Fs(SIGPLAN)32 + b(Notic)-5 b(es)p Fw(,)31 b(29\(12\):31{37,)36 b(1994.)2104 + 5568 y(61)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (2) 3 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 60 66 bop 199 91 a Fw([30])47 b(Chris)38 b(Lattner)i(and)f(Vikram)h + (Adv)m(e.)69 b(Automatic)41 b(Po)s(ol)f(Allo)s(cation)h(for)f(Disjoin)m + (t)h(Data)g(Structures.)386 274 y(In)28 b Fs(Pr)-5 b(o)g(c.)33 + b(A)n(CM)d(SIGPLAN)g(Workshop)k(on)e(Memory)g(System)g(Performanc)-5 + b(e)p Fw(,)31 b(Berlin,)f(German)m(y)-8 b(,)30 b(June)386 + 457 y(2002.)199 714 y([31])47 b(Chris)29 b(Lattner)i(et)g(al.)41 + b(The)30 b(LL)-10 b(VM)31 b(w)m(eb)f(site:)42 b Fr + (http://llvm.cs.uiuc.edu)o Fw(.)199 972 y([32])47 b(Microsoft.)316 + b(The)122 b(.NET)h(Common)e(Language)j(Run)m(time,)146 + b(see)123 b(w)m(eb)f(site)h(at:)386 1154 y Fr + (http://msdn.microsoft.com)o(/ne)o(t)p Fw(.)199 1412 + y([33])47 b(G.)29 b(Morrisett,)h(D.)g(W)-8 b(alk)m(er,)31 + b(K.)d(Crary)-8 b(,)29 b(and)f(N.)h(Glew.)38 b(F)-8 b(rom)29 + b(system)f(F)h(to)g(t)m(yp)s(ed)g(assem)m(bly)g(language.)386 + 1594 y Fs(A)n(CM)i(T)-7 b(r)i(ansactions)36 b(on)d(Pr)-5 + b(o)g(gr)g(amming)35 b(L)-5 b(anguages)33 b(and)h(Systems)p + Fw(,)d(21\(3\):528{569,)36 b(Ma)m(y)c(1999.)199 1852 + y([34])47 b(R.)31 b(Muth.)40 b(Alto:)i(A)30 b(platform)h(for)f(ob)5 + b(ject)31 b(co)s(de)g(mo)s(di\014cation,)g(1999.)199 + 2109 y([35])47 b(T.)38 b(Romer,)j(G.)e(V)-8 b(o)s(elk)m(er,)43 + b(D.)c(Lee,)i(A.)e(W)-8 b(olman,)42 b(W.)d(W)-8 b(ong,)42 + b(H.)d(Levy)-8 b(,)41 b(B.)f(Bershad,)g(and)e(B.)h(Chen.)386 + 2292 y(Instrumen)m(tation)31 b(and)e(optimization)k(of)d(Win32/In)m + (tel)j(executables)f(using)e(etc)m(h,)h(August)f(1997.)199 + 2549 y([36])47 b(A)m(tanas)31 b(Roun)m(tev)f(and)e(Satish)i(Chandra.)37 + b(O\013-line)30 b(v)-5 b(ariable)30 b(substitution)f(for)g(scaling)i(p) + s(oin)m(ts-to)f(anal-)386 2732 y(ysis.)52 b(In)34 b Fs(Pr)-5 + b(o)g(c)g(e)g(e)g(dings)38 b(of)e(the)h(A)n(CM)e(SIGPLAN)g('00)i(c)-5 + b(onfer)g(enc)g(e)37 b(on)g(Pr)-5 b(o)g(gr)g(amming)38 + b(language)f(design)386 2915 y(and)d(implementation)p + Fw(,)f(pages)e(47{56.)h(A)m(CM)f(Press,)f(2000.)199 3172 + y([37])47 b(SGI.)40 b(SGI)30 b(Op)s(en64)g(Compiler,)h + Fr(http://open64.sourcefor)o(ge.n)o(et/)o Fw(.)199 3429 + y([38])47 b(Zhong)41 b(Shao,)k(Christopher)c(League,)46 + b(and)41 b(Stefan)h(Monnier.)75 b(Implemen)m(ting)42 + b(T)m(yp)s(ed)f(In)m(termediate)386 3612 y(Languages.)h(In)29 + b Fs(International)35 b(Confer)-5 b(enc)g(e)34 b(on)f(F)-7 + b(unctional)34 b(Pr)-5 b(o)g(gr)g(amming)p Fw(,)33 b(pages)e(313{323,)j + (1998.)199 3869 y([39])47 b(Mic)m(hael)g(D.)e(Smith.)82 + b(Ov)m(ercoming)45 b(the)g(c)m(hallenges)i(to)e(feedbac)m(k-directed)h + (optimization)g(\(k)m(eynote)386 4052 y(talk\).)e(In)30 + b Fs(Pr)-5 b(o)g(c)g(e)g(e)g(dings)35 b(of)e(the)g(A)n(CM)f(SIGPLAN)h + (workshop)i(on)f(Dynamic)f(and)h(adaptive)h(c)-5 b(ompilation)386 + 4235 y(and)34 b(optimization)p Fw(,)f(pages)e(1{11.)h(A)m(CM)f(Press,)f + (2000.)199 4492 y([40])47 b(Amitabh)25 b(Sriv)-5 b(asta)m(v)g(a)26 + b(and)f(Da)m(vid)h(W.)f(W)-8 b(all.)34 b(A)25 b(practical)h(system)f + (for)g(in)m(termo)s(dule)g(co)s(de)g(optimization)386 + 4675 y(at)31 b(link-time.)42 b Fs(Journal)33 b(of)g(Pr)-5 + b(o)g(gr)g(amming)36 b(L)-5 b(anguages)p Fw(,)31 b(1\(1\):1{18,)j + (Decem)m(b)s(er)d(1992.)199 4932 y([41])47 b(T.B.)39 + b(Steel.)67 b(Uncol:)58 b(The)39 b(m)m(yth)g(and)f(the)h(fact.)67 + b Fs(A)n(nnual)40 b(R)-5 b(eview)41 b(in)f(A)n(utomate)-5 + b(d)42 b(Pr)-5 b(o)g(gr)g(amming)43 b(2)p Fw(,)386 5115 + y(1961.)2104 5568 y(60)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 4 3 bop 199 423 a Ft(Ac)-6 b(kno)g(wledgmen)g(ts)199 + 938 y Fw(This)26 b(thesis)g(w)m(ould)g(not)h(b)s(e)f(p)s(ossible)g + (without)g(the)h(supp)s(ort)d(of)j(a)f(large)i(n)m(um)m(b)s(er)d(of)h + (p)s(eople)h(who)f(ha)m(v)m(e)h(help)s(ed)199 1121 y(me)k(b)s(oth)e(in) + h(big)h(w)m(a)m(ys)g(and)f(little.)340 1304 y(In)35 b(particular,)i(I)e + (w)m(ould)g(lik)m(e)h(to)g(thank)f(m)m(y)h(advisor,)h(Vikram)e(Adv)m + (e,)i(for)e(his)g(supp)s(ort,)g(patience,)j(and)199 1486 + y(esp)s(ecially)32 b(his)e(trust)g(and)f(resp)s(ect.)41 + b(He)31 b(has)f(sho)m(wn)g(me)g(ho)m(w)g(to)h(comm)m(unicate)h(ideas)f + (more)g(e\013ectiv)m(ely)i(and)199 1669 y(ho)m(w)k(to)g(\014nd)e(imp)s + (ortan)m(t)h(and)g(meaningful)g(topics)h(for)f(researc)m(h.)60 + b(By)36 b(b)s(eing)g(demanding,)i(understanding,)199 + 1852 y(and)30 b(allo)m(wing)i(me)f(the)f(freedom)g(to)h(explore)g(m)m + (y)g(in)m(terests,)g(he)g(has)f(driv)m(en)g(me)g(to)h(succeed.)340 + 2034 y(The)h(inspiration)g(for)g(this)g(w)m(ork)g(certainly)i(stems)e + (from)g(one)g(p)s(erson:)43 b(T)-8 b(an)m(y)m(a.)48 b(She)31 + b(has)h(b)s(een)f(a)i(con)m(tin-)199 2217 y(uous)h(source)h(of)g(supp)s + (ort,)f(ideas,)i(encouragemen)m(t,)i(and)c(understanding.)52 + b(Despite)36 b(m)m(y)f(man)m(y)g(late)h(nigh)m(ts,)199 + 2400 y(unimaginable)27 b(amoun)m(ts)g(of)g(stress,)g(and)f(a)h(truly)f + (o)s(dd)g(sense)g(of)h(h)m(umor,)g(she)f(has)g(not)h(just)f(tolerated)i + (me,)g(but)199 2582 y(lo)m(v)m(ed)k(me.)340 2765 y(Another)c(p)s(erson) + f(who)h(made)g(this)g(p)s(ossible,)h(p)s(erhaps)d(without)i(truly)g + (understanding)f(his)g(con)m(tribution,)199 2948 y(has)35 + b(b)s(een)f(Brian)g(Ensink.)53 b(Brian)35 b(has)f(b)s(een)g(an)h(in)m + (v)-5 b(aluable)35 b(sounding)f(b)s(oard)g(for)g(ideas,)j(a)e(w)m + (elcoming)h(ear)199 3130 y(to)29 b(o)s(ccasional)h(frustrations,)e(pro) + m(vider)g(of)g(min)m(ts,)g(and)g(help)s(ed)f(me)h(tremendously)f(with)h + (the)g(pap)s(erw)m(ork)f(and)199 3313 y(other)k(anno)m(ying)g + (requiremen)m(ts)f(of)h(submitting)f(a)h(thesis.)340 + 3496 y(There)d(are)g(t)m(w)m(o)h(others)g(who)e(ha)m(v)m(e)i(b)s(een)e + (v)m(ery)i(imp)s(ortan)m(t)f(to)h(me)f(during)e(m)m(y)i(time)h(here)f + (in)f(Champaign-)199 3679 y(Urbana.)62 b(Jim)37 b(Oly)g(has,)i(on)e(n)m + (umerous)g(o)s(ccasions,)j(pro)m(vided)d(a)h(critical)i(ey)m(e)e(for)f + (m)m(y)h(writing,)h(and)e(more)199 3861 y(imp)s(ortan)m(tly)e(has)g(b)s + (een)e(a)i(great)h(friend.)52 b(Finally)-8 b(,)38 b(this)c(w)m(ork)h(w) + m(ould)f(not)h(b)s(e)f(p)s(ossible)g(without)h(the)f(Co)s(ca-)199 + 4044 y(Cola)k(Bottling)i(Compan)m(y)-8 b(,)40 b(whic)m(h)d(pro)m(vided) + g(the)g(ra)m(w)h(materials)h(that)f(fueled)f(m)m(y)h(w)m(ork,)h + (sometimes)g(late)199 4227 y(in)m(to)32 b(the)e(nigh)m(t.)2113 + 5568 y(iv)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (3) 4 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 5 4 bop 199 423 a Ft(T)-19 b(able)77 b(of)g(Con)-6 b(ten)g(ts)199 + 959 y Fw(List)31 b(of)f(Figures)80 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)77 b(vii)199 1163 y(1)92 b(In)m(tro)s(duction)24 b(.)46 + b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)130 b(1)336 1276 y(1.1)94 + b(Existing)31 b(Compiler)f(System)g(Approac)m(hes)58 + b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) + h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)130 b(2)545 1389 + y(1.1.1)106 b(T)-8 b(raditional)31 b(Approac)m(hes)g(to)g(Link-Time)f + (In)m(terpro)s(cedural)g(Optimization)89 b(.)46 b(.)f(.)h(.)g(.)130 + b(2)545 1502 y(1.1.2)106 b(T)-8 b(raditional)31 b(Approac)m(hes)g(to)g + (Run-Time)e(Optimization)40 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)g(.)f(.)h(.)g(.)130 b(3)545 1615 y(1.1.3)106 b(T)-8 + b(raditional)31 b(Approac)m(hes)g(to)g(Compile-time)h(Pro\014le-Driv)m + (en)f(Optimization)f(.)46 b(.)f(.)h(.)g(.)130 b(4)336 + 1728 y(1.2)94 b(Multi-stage)33 b(Optimization)e(with)f(LL)-10 + b(VM)86 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)130 b(5)336 + 1841 y(1.3)94 b(Researc)m(h)31 b(Con)m(tributions)f(of)h(this)f(Thesis) + 89 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)130 b(6)336 1954 + y(1.4)94 b(Organization)31 b(of)g(this)f(Thesis)82 b(.)46 + b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)130 + b(7)199 2157 y(2)92 b(LL)-10 b(VM)30 b(System)g(Arc)m(hitecture)64 + b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)130 b(8)336 2270 y(2.1)94 b(The)30 b(High-Lev)m(el)i(Design)f(of)g + (an)f(LL)-10 b(VM)30 b(Based)h(Compiler)64 b(.)45 b(.)h(.)g(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)130 b(8)336 + 2383 y(2.2)94 b(Compile)30 b(Time:)41 b(F)-8 b(ron)m(t-end)31 + b(&)f(Static)i(Optimizer)57 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) + h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)130 b(9)336 + 2496 y(2.3)94 b(Link)30 b(Time:)40 b(Link)m(er)31 b(&)f(In)m(terpro)s + (cedural)f(Optimizer)f(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(10)336 2609 + y(2.4)94 b(Run)29 b(Time:)41 b(Pro\014ling)30 b(&)g(Reoptimization)39 + b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) + h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(11)545 2722 + y(2.4.1)106 b(Gathering)31 b(Pro\014le)f(Information)g(at)i(Run)d(Time) + 54 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f + (.)h(.)g(.)84 b(11)545 2835 y(2.4.2)106 b(The)29 b(LL)-10 + b(VM)31 b(Approac)m(h)f(to)h(Run)f(Time)g(Optimization)45 + b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(12)336 2948 y(2.5)94 b(Idle)30 b(Time:)41 b(O\017ine)30 + b(Reoptimizer)78 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) + 84 b(12)199 3152 y(3)92 b(LL)-10 b(VM)30 b(Virtual)h(Instruction)f(Set) + k(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) + f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(14)336 3264 y(3.1)94 b(Ov)m(erview)30 b(of)h(the)g(LL)-10 + b(VM)30 b(Virtual)h(Instruction)f(Set)83 b(.)45 b(.)h(.)g(.)f(.)h(.)g + (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(14)336 3377 y(3.2)94 b(Three-Address)29 b(Co)s(de)64 + b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) + h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h + (.)g(.)84 b(15)545 3490 y(3.2.1)106 b(Static)31 b(Single)g(Assignmen)m + (t)g(F)-8 b(orm)66 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(16)336 3603 y(3.3)94 b(High-Lev)m(el)32 b(T)m(yp)s(e)e(Information)70 + b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) + g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(17)545 3716 y(3.3.1)106 b(T)m(yp)s(e-safe)30 b(P)m(oin)m(ter)i + (Arithmetic)f(with)f(the)h Fr(getelementptr)c Fw(Instruction)60 + b(.)46 b(.)g(.)f(.)h(.)g(.)84 b(19)545 3829 y(3.3.2)106 + b(Distinguishing)30 b(Safe)h(and)f(Unsafe)g(Co)s(de:)40 + b(the)31 b Fr(cast)e Fw(Instruction)70 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f + (.)h(.)g(.)84 b(20)336 3942 y(3.4)94 b(Explicit)31 b(Memory)g(Allo)s + (cation)h(and)e(Uni\014ed)g(Memory)g(Mo)s(del)55 b(.)46 + b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(22)336 4055 y(3.5)94 b(F)-8 b(unction)31 b(Calls)g(and)e(Exception)i + (Handling)84 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(23)336 + 4168 y(3.6)94 b(Plain-text,)32 b(Byteco)s(de,)g(and)e(In-memory)g + (Represen)m(tations)74 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h + (.)g(.)g(.)f(.)h(.)g(.)84 b(25)199 4372 y(4)92 b(Optimizations)31 + b(with)f(LL)-10 b(VM)35 b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(26)336 4484 y(4.1)94 + b(Simple)30 b(Analyses)g(and)g(T)-8 b(ransformations)84 + b(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.) + h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(26)545 4597 + y(4.1.1)106 b(The)29 b(Instruction)h(Com)m(bining)h(P)m(ass)73 + b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(27)545 4710 y(4.1.2)106 + b(The)29 b(Lev)m(el)j(Raise)f(P)m(ass)26 b(.)46 b(.)f(.)h(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(27)336 4823 y(4.2)94 + b(Data)32 b(Structure)d(Analysis)56 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.) + h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(29)545 4936 y(4.2.1)106 + b(The)29 b(Data)j(Structure)e(Graph)83 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.) + f(.)h(.)g(.)84 b(30)545 5049 y(4.2.2)106 b(Construction)30 + b(Algorithm)60 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(34)545 5162 y(4.2.3)106 b(Complexit)m(y)-8 b(,)32 b(Results,)e(and)g + (Applications)54 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(38)336 5275 + y(4.3)94 b(Automatic)32 b(P)m(o)s(ol)f(Allo)s(cation)95 + b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(38)2125 5568 y(v)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 59 65 bop 199 91 a Fw([20])47 b(Da)m(vid)34 b(Ga)m(y)g(and)e(Alex)i + (Aik)m(en.)48 b(Language)34 b(supp)s(ort)d(for)h(regions.)48 + b(In)32 b Fs(Pr)-5 b(o)g(c.)36 b(SIGPLAN)e('01)i(Conf.)f(on)386 + 274 y(Pr)-5 b(o)g(gr)g(amming)35 b(L)-5 b(anguage)33 + b(Design)f(and)i(Implementation)p Fw(,)f(pages)e(70{80,)i(Sno)m(wbird,) + c(UT,)h(June)g(2001.)199 531 y([21])47 b(Adele)c(Goldb)s(erg)g(and)f + (Da)m(vid)h(Robson.)76 b Fs(Smal)5 b(ltalk-80:)66 b(The)44 + b(L)-5 b(anguage)45 b(and)f(Its)g(Implementation)p Fw(.)386 + 714 y(Addison-W)-8 b(esley)g(,)32 b(Reading,)f(MA,)h(1983.)199 + 972 y([22])47 b(J.)34 b(Gosling,)j(B.)e(Jo)m(y)-8 b(,)36 + b(and)e(G.)h(Steele.)53 b Fs(The)36 b(Java)h(L)-5 b(anguage)37 + b(Sp)-5 b(e)g(ci\014c)g(ation)p Fw(.)54 b(Addison-W)-8 + b(esley)g(,)37 b(Menlo)386 1154 y(P)m(ark,)31 b(CA,)f(1996.)199 + 1412 y([23])47 b(Ra)5 b(jiv)32 b(Gupta,)f(Eduard)f(Mehofer,)i(and)f(Y) + -8 b(outao)33 b(Zhang.)42 b(Pro\014le)31 b(guided)g(compiler)h + (optimizations.)45 b(In)386 1594 y Fs(The)39 b(Compiler)h(Design)e + (Handb)-5 b(o)g(ok:)55 b(Optimizations)40 b(and)f(Machine)g(Co)-5 + b(de)39 b(Gener)-5 b(ation)p Fw(.)39 b(CR)m(C)d(Press,)386 + 1777 y(2002.)199 2034 y([24])47 b(T.)30 b(Halfhill.)42 + b(T)-8 b(ransmeta)31 b(breaks)f(x86)h(lo)m(w-p)s(o)m(w)m(er)g(barrier,) + f(2000.)199 2292 y([25])47 b(Mic)m(hael)35 b(Hind.)48 + b(P)m(oin)m(ter)34 b(analysis:)46 b(ha)m(v)m(en't)35 + b(w)m(e)e(solv)m(ed)h(this)f(problem)f(y)m(et?)64 b(In)32 + b Fs(A)n(CM)i(SIGPLAN)g(|)386 2474 y(SIGSOFT)g(workshop)i(on)f(on)f(Pr) + -5 b(o)g(gr)g(am)36 b(analysis)f(for)f(softwar)-5 b(e)36 + b(to)-5 b(ols)35 b(and)g(engine)-5 b(ering)p Fw(,)32 + b(pages)g(54{61.)386 2657 y(A)m(CM)f(Press,)f(2001.)199 + 2915 y([26])47 b(Simon)34 b(P)m(eyton)h(Jones,)h(Norman)e(Ramsey)-8 + b(,)37 b(and)c(F)-8 b(ermin)35 b(Reig.)54 b(C{:)49 b(a)34 + b(p)s(ortable)h(assem)m(bly)g(language)386 3097 y(that)h(supp)s(orts)e + (garbage)j(collection.)59 b(In)35 b Fs(International)40 + b(Confer)-5 b(enc)g(e)38 b(on)g(Principles)f(and)i(Pr)-5 + b(actic)g(e)38 b(of)386 3280 y(De)-5 b(clar)g(ative)34 + b(Pr)-5 b(o)g(gr)g(amming)p Fw(,)33 b(1999.)199 3537 + y([27])47 b(Suman)m(t)31 b(Ko)m(wshik,)g(Dinak)-5 b(ar)32 + b(Dh)m(urjati,)f(and)g(Vikram)g(Adv)m(e.)43 b(Ensuring)30 + b(Co)s(de)g(Safet)m(y)i(Without)g(Run-)386 3720 y(time)h(Chec)m(ks)f + (for)f(Real-Time)j(Con)m(trol)e(Systems.)45 b(In)31 b + Fs(Pr)-5 b(o)g(c.)35 b(Int'l)f(Conf.)g(on)h(Compilers,)g(A)n(r)-5 + b(chite)g(ctur)g(e)386 3903 y(and)34 b(Synthesis)f(for)g(Emb)-5 + b(e)g(dde)g(d)35 b(Systems)e(\(CASES02\))p Fw(,)f(Grenoble,)f(F)-8 + b(rance,)31 b(Octob)s(er)g(2002.)199 4160 y([28])47 b(Chris)30 + b(Lattner)i(and)e(Vikram)i(Adv)m(e.)43 b(Data)33 b(structure)e + (analysis:)43 b(An)31 b(e\016cien)m(t)i(con)m(text-sensitiv)m(e)h(heap) + 386 4343 y(analysis,with)40 b(applications.)67 b(Submitted)39 + b(to)g(the)h(A)m(CM)f(SIGPLAN)g(Conference)g(on)g(Programming)386 + 4526 y(Language)31 b(Design)h(and)d(Implemen)m(tation)j(\(2003\).)199 + 4783 y([29])47 b(Chris)149 b(Lattner)i(and)e(Vikram)h(Adv)m(e.)398 + b(The)150 b(LL)-10 b(VM)150 b(reference)h(man)m(ual:)386 + 4966 y Fr(http://llvm.cs.uiuc.edu/d)o(ocs)o(/Lan)o(gRef)o(.ht)o(ml)p + Fw(.)2104 5568 y(59)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (4) 5 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 58 64 bop 199 91 a Fw([10])47 b(F)-8 b(red)33 b(Cho)m(w,)g(Sun)e(Chan,) + i(Rob)s(ert)f(Kennedy)-8 b(,)33 b(Shin-Ming)f(Liu,)h(Ra)m(ymond)f(Lo,)i + (and)e(P)m(eng)h(T)-8 b(u.)47 b(A)33 b(new)386 274 y(algorithm)k(for)e + (partial)i(redundancy)d(elimination)j(based)e(on)h(ssa)g(form.)56 + b(In)35 b Fs(Pr)-5 b(o)g(c)g(e)g(e)g(dings)40 b(of)d(the)h(1997)386 + 457 y(A)n(CM)28 b(SIGPLAN)g(c)-5 b(onfer)g(enc)g(e)30 + b(on)g(Pr)-5 b(o)g(gr)g(amming)31 b(language)f(design)f(and)h + (implementation)p Fw(,)f(pages)e(273{)386 639 y(286.)32 + b(A)m(CM)f(Press,)f(1997.)199 897 y([11])47 b(R.)32 b(Cohn,)g(D.)g(Go)s + (o)s(dwin,)g(and)f(P)-8 b(.)33 b(Lo)m(wney)-8 b(.)45 + b(Optimizing)33 b(Alpha)e(Executables)i(on)f(Windo)m(ws)g(NT)f(with)386 + 1079 y(Spik)m(e.)41 b Fs(Digital)32 b(T)-7 b(e)i(chnic)g(al)34 + b(Journal)p Fw(,)e(9\(4\),)g(1997.)199 1337 y([12])47 + b(ANDF)28 b(Consortium.)34 b(The)26 b(Arc)m(hitectural)j(Neutral)e + (Distribution)g(F)-8 b(ormat,)29 b Fr(http://www.andf.org/)p + Fw(.)199 1594 y([13])47 b(IBM)31 b(Corp)s(oration.)40 + b(Xl)31 b(fortran:)41 b(Eigh)m(t)31 b(w)m(a)m(ys)g(to)g(b)s(o)s(ost)f + (p)s(erformance.)40 b(White)31 b(P)m(ap)s(er,)g(2000.)199 + 1852 y([14])47 b(Karl)32 b(Crary)-8 b(,)32 b(Da)m(vid)h(W)-8 + b(alk)m(er,)34 b(and)d(Greg)i(Morrisett.)46 b(T)m(yp)s(ed)30 + b(memory)i(managemen)m(t)h(in)f(a)g(calculus)g(of)386 + 2034 y(capabilities.)67 b(In)38 b Fs(Confer)-5 b(enc)g(e)41 + b(R)-5 b(e)g(c)g(or)g(d)43 b(of)e(POPL)e(99:)58 b(The)40 + b(26th)i(A)n(CM)d(SIGPLAN-SIGA)n(CT)g(Sym-)386 2217 y(p)-5 + b(osium)40 b(on)f(Principles)f(of)h(Pr)-5 b(o)g(gr)g(amming)41 + b(L)-5 b(anguages,)40 b(San)f(A)n(ntonio,)h(T)-7 b(exas)p + Fw(,)39 b(pages)e(262{275,)42 b(New)386 2400 y(Y)-8 b(ork,)31 + b(NY,)g(1999.)199 2657 y([15])47 b(Ron)36 b(Cytron,)i(Jeanne)e(F)-8 + b(erran)m(te,)39 b(Barry)e(K.)f(Rosen,)i(Mark)e(N.)h(W)-8 + b(egman,)39 b(and)d(F.)h(Kenneth)e(Zadec)m(k.)386 2840 + y(E\016cien)m(tly)e(computing)f(static)h(single)g(assignmen)m(t)f(form) + f(and)h(the)f(con)m(trol)j(dep)s(endence)c(graph.)44 + b Fs(A)n(CM)386 3023 y(T)-7 b(r)i(ansactions)35 b(on)e(Pr)-5 + b(o)g(gr)g(amming)36 b(L)-5 b(anguages)33 b(and)g(Systems)p + Fw(,)f(pages)f(13\(4\):451{490,)36 b(Octob)s(er)30 b(1991.)199 + 3280 y([16])47 b(Kemal)30 b(Eb)s(cioglu)g(and)e(Erik)h(R.)h(Altman.)39 + b(D)m(AISY:)30 b(Dynamic)h(compilation)g(for)e(100)9 + b(In)30 b Fs(Int'l)i(Symp.)h(on)386 3463 y(Computer)h(A)n(r)-5 + b(chite)g(ctur)g(e)p Fw(,)31 b(pages)g(26{37,)i(1997.)199 + 3720 y([17])47 b(Brian)33 b(Ensink,)f(Jo)s(el)h(Stanley)-8 + b(,)34 b(and)e(Vikram)h(Adv)m(e.)47 b(Program)33 b(Con)m(trol)g + (Language:)46 b(A)33 b(Programming)386 3903 y(Language)27 + b(for)f(Adaptiv)m(e)i(Distributed)e(Applications.)35 + b Fs(Journal)30 b(of)f(Par)-5 b(al)5 b(lel)30 b(and)g(Distribute)-5 + b(d)29 b(Comput-)386 4085 y(ing)j(\(to)i(app)-5 b(e)g(ar\))p + Fw(,)33 b(Octob)s(er)e(2002.)42 b(\(accepted)32 b(for)e(publication\).) + 199 4343 y([18])47 b(Man)m(uel)30 b(F\177)-45 b(ahndric)m(h,)29 + b(Je\013rey)g(S.)f(F)-8 b(oster,)31 b(Zhendong)d(Su,)g(and)g(Alexander) + h(Aik)m(en.)39 b(P)m(artial)31 b(online)e(cycle)386 4526 + y(elimination)23 b(in)e(inclusion)g(constrain)m(t)h(graphs.)j(In)c + Fs(Pr)-5 b(o)g(c)g(e)g(e)g(dings)26 b(of)e(the)h(A)n(CM)e(SIGPLAN)g + ('98)i(c)-5 b(onfer)g(enc)g(e)386 4708 y(on)33 b(Pr)-5 + b(o)g(gr)g(amming)35 b(language)e(design)g(and)h(implementation)p + Fw(,)f(pages)e(85{96.)h(A)m(CM)f(Press,)g(1998.)199 4966 + y([19])47 b(Mary)29 b(F.)h(F)-8 b(ern\023)-45 b(andez.)39 + b(Simple)28 b(and)g(e\013ectiv)m(e)k(link-time)e(optimization)h(of)e + (Mo)s(dula-3)h(programs.)37 b Fs(A)n(CM)386 5148 y(SIGPLAN)32 + b(Notic)-5 b(es)p Fw(,)31 b(30\(6\):103{115,)36 b(1995.)2104 + 5568 y(58)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 6 5 bop 545 91 a Fw(4.3.1)106 b(Run)m(time)30 b(Supp)s(ort)e(for)i(P)m + (o)s(ol)i(Allo)s(cation)d(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) + h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(40)545 + 204 y(4.3.2)106 b(Iden)m(tifying)30 b(Candidate)h(Data)h(Structures)42 + b(.)k(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g + (.)g(.)f(.)h(.)g(.)84 b(41)545 317 y(4.3.3)106 b(T)-8 + b(ransforming)29 b(F)-8 b(unction)31 b(Bo)s(dies)90 b(.)46 + b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(42)336 430 y(4.4)94 + b(External)30 b(Uses)h(of)g(the)f(LL)-10 b(VM)30 b(Infrastructure)46 + b(.)g(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(43)545 543 y(4.4.1)106 + b(Ensuring)28 b(Co)s(de)i(Safet)m(y)i(without)e(Run)m(time)g(Chec)m(ks) + 47 b(.)f(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) + 84 b(43)545 656 y(4.4.2)106 b(Program)30 b(Con)m(trol)h(Language)h + (\(PCL\))64 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) + f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(44)545 769 + y(4.4.3)106 b(Adv)-5 b(anced)30 b(Compilers)g(Class)c(.)46 + b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(45)199 + 973 y(5)92 b(Ev)-5 b(aluating)31 b(the)g(Infrastructure)61 + b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) + f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(46)336 1086 y(5.1)94 b(Ev)-5 b(aluating)31 b(the)g(Maturit)m(y)g(of)g + (LL)-10 b(VM)85 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(46)336 1198 y(5.2)94 b(Ev)-5 b(aluating)31 b(Pro)s(ductivit)m(y)g + (with)f(LL)-10 b(VM)63 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h + (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(47)336 1311 y(5.3)94 b(Ev)-5 b(aluating)31 b(the)g(P)m(erformance)g + (of)f(LL)-10 b(VM)31 b(Infrastructure)68 b(.)45 b(.)h(.)g(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(49)336 + 1424 y(5.4)94 b(Ev)-5 b(aluation)31 b(Summary)38 b(.)46 + b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) + 84 b(51)199 1628 y(6)92 b(Related)31 b(W)-8 b(ork)45 + b(.)h(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(52)336 1741 y(6.1)94 + b(Compiler)30 b(Infrastructures)37 b(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(52)336 1854 y(6.2)94 + b(High-Lev)m(el)32 b(Virtual)f(Mac)m(hines)91 b(.)45 + b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(53)336 1967 y(6.3)94 b(In)m(termediate)31 b(Represen)m(tations)68 + b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.) + g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(54)199 2171 y(7)92 b(Conclusions)51 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) + h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h + (.)g(.)84 b(56)199 2374 y(References)29 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.) + h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h + (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)g(.)f(.)h(.)g(.)84 b(57)2113 5568 y(vi)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (5) 6 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 7 6 bop 199 423 a Ft(List)77 b(of)h(Figures)336 868 y + Fw(2.1)94 b(LL)-10 b(VM)30 b(system)h(arc)m(hitecture)h(diagram)g(.)45 + b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)130 b(8)336 1064 + y(3.1)94 b(LL)-10 b(VM)30 b(co)s(de)h(snipp)s(et)e(illustrating)i(t)m + (yp)s(ed)f(op)s(erations)62 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) + f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(16)336 1177 + y(3.2)94 b(C)30 b(co)s(de)g(for)g(example)h(lo)s(op)g(b)s(o)s(dy)h(.)45 + b(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(17)336 1290 y(3.3)94 b(LL)-10 b(VM)30 b(co)s(de)h(for)f(example)h(lo) + s(op)f(b)s(o)s(dy)55 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(17)336 1403 y(3.4)94 b(Examples)30 b(of)h(LL)-10 b(VM)30 + b(t)m(yp)s(es)79 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.) + f(.)h(.)g(.)84 b(18)336 1516 y(3.5)94 b(Examples)30 b(of)h(malformed)f + (LL)-10 b(VM)30 b(co)s(de)82 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) + 84 b(18)336 1629 y(3.6)94 b(C)30 b(co)s(de)g(for)g(complex)h(memory)g + (addressing)89 b(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(19)336 + 1742 y(3.7)94 b(LL)-10 b(VM)30 b(co)s(de)h(for)f(complex)h(memory)f + (addressing)41 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(20)336 1855 + y(3.8)94 b(Examples)30 b(of)h(casts)g(in)f(LL)-10 b(VM)61 + b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.) + g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(20)336 1968 y(3.9)94 b(P)m(oin)m(ter)31 b(arithmetic)h(example)f(in)f + (C)87 b(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(21)336 2081 y(3.10)49 b(P)m(oin)m(ter)31 b(arithmetic)h(example)f(in) + f(LL)-10 b(VM)39 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g + (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(22)336 2193 y(3.11)49 b(P)m(oin)m(ter)31 b(arithmetic)h(example)f + (with)f(the)h Fr(getelementptr)c Fw(instruction)87 b(.)45 + b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(22)336 2306 + y(3.12)49 b(C++)29 b(exception)j(handling)d(example)j(.)46 + b(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(24)336 + 2419 y(3.13)49 b(LL)-10 b(VM)30 b(co)s(de)h(for)f(exception)h(handling) + f(example)59 b(.)46 b(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(25)336 2615 + y(4.1)94 b(Lev)m(el-Raise)33 b(example)e(C)f(co)s(de)48 + b(.)e(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g + (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(28)336 2728 y(4.2)94 b(Lev)m(el-Raise)33 b(example)e(ra)m(w)f(LL)-10 + b(VM)30 b(co)s(de)38 b(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h + (.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(29)336 2841 y(4.3)94 b(Lev)m(el-Raise)33 b(example)e(LL)-10 + b(VM)30 b(co)s(de)h(after)f(lev)m(el)j(raising)62 b(.)46 + b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)84 b(29)336 2954 y(4.4)94 b Fq(Lo)r(cal)27 b(DSGraph)g(for)g(the)h + Fp(do)p 1501 2954 27 4 v 31 w(all)e Fq(function)78 b + Fw(.)46 b(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(31)336 + 3067 y(4.5)94 b Fq(C)27 b(co)r(de,)h(in)g(SSA)g(form,)f(for)g(Data)h + (Structure)f(Analysis)g(example)88 b Fw(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(32)336 3180 + y(4.6)94 b Fq(Lo)r(cal)27 b(Analysis)g(Algorithm)90 b + Fw(.)46 b(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.) + 84 b(34)336 3293 y(4.7)94 b Fq(Lo)r(cal)27 b(DSGraph)g(for)g(the)h + Fp(addGToList)c Fq(function)33 b Fw(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f + (.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(34)336 3406 y(4.8)94 b Fq(Pro)r(cessInstruction)25 + b(for)i(the)h(LL)-9 b(VM)28 b(virtual)f(instruction)g(set)59 + b Fw(.)46 b(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f + (.)h(.)g(.)84 b(35)336 3518 y(4.9)94 b Fq(Bottom-Up)27 + b(DS)h(Graphs)f(for)g Fp(addGToList)80 b Fw(.)46 b(.)g(.)f(.)h(.)g(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.) + f(.)h(.)g(.)84 b(37)336 3631 y(4.10)49 b Fq(BU)27 b(DSGraph)h(for)f + (the)h Fp(main)e Fq(function)88 b Fw(.)46 b(.)f(.)h(.)g(.)f(.)h(.)g(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.) + f(.)h(.)g(.)84 b(37)336 3744 y(4.11)49 b(Source)30 b(for)g + Fr(ProcessLists)d Fw(function)84 b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f + (.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.) + h(.)g(.)84 b(39)336 3857 y(4.12)49 b(Bottom-up)31 b(DS)f(Graph)g(for)g + Fr(ProcessLists)d Fw(example)46 b(.)g(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(39)336 + 3970 y(4.13)49 b(Main)31 b(data)g(structure)f(for)g Fr(power)f + Fw(b)s(enc)m(hmark)49 b(.)d(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h + (.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(40)336 + 4083 y(4.14)49 b(Candidate)30 b(iden)m(ti\014cation)i(algorithm)75 + b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(41)336 + 4196 y(4.15)49 b(F)-8 b(unction)31 b(transformation)f(algorithm)63 + b(.)45 b(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.) + g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 b(42)336 + 4309 y(4.16)49 b(Source)30 b(for)g(p)s(o)s(ol-allo)s(cated)i + Fr(ProcessLists)61 b Fw(.)45 b(.)h(.)g(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g + (.)f(.)h(.)g(.)f(.)h(.)g(.)f(.)h(.)g(.)g(.)f(.)h(.)g(.)84 + b(43)2100 5568 y(vii)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 57 63 bop 940 143 a Ft(References)245 741 y Fw([1])46 + b(W.)40 b(Amme,)i(N.)d(Dalton,)k(M.)d(F)-8 b(ranz,)43 + b(and)38 b(J.)h(ery)-8 b(.)68 b(Safetsa:)59 b(A)39 b(t)m(yp)s(e)h(safe) + g(and)e(referen)m(tially)j(secure)386 924 y(mobile-co)s(de)34 + b(represen)m(tation)g(based)e(on)h(static)h(single)g(assignmen)m(t)f + (form.)48 b(In)32 b Fs(A)n(CM)h(2001)k(SIGPLAN)386 1107 + y(Conf.)c(on)g(Pr)-5 b(o)g(g.)34 b(L)-5 b(ang.)33 b(Design)f(and)h + (Implementation)p Fw(,)g(June)d(2001.)245 1362 y([2])46 + b(J.)31 b(Anderson,)f(L.)h(Berc,)h(J.)e(Dean,)i(S.)f(Ghema)m(w)m(at,)i + (M.)e(Henzinger,)h(S.)f(Leung,)f(D.)i(Sites,)f(M.)h(V)-8 + b(andev)m(o-)386 1544 y(orde,)34 b(C.)f(W)-8 b(aldspurger,)34 + b(and)f(W.)h(W)-8 b(eihl.)50 b(Con)m(tin)m(uous)33 b(pro\014ling:)46 + b(Where)33 b(ha)m(v)m(e)i(all)f(the)f(cycles)i(gone?)386 + 1727 y(T)-8 b(ec)m(hnical)29 b(Note)f(1997-016)j(Digital)e(Equipmen)m + (t)e(Corp)s(oration)g(Systems)g(Researc)m(h)h(Cen)m(ter,)g(P)m(alo)h + (Alto,)386 1910 y(CA,)i(July)e(1997.)245 2165 y([3])46 + b(L.)29 b(O.)g(Anderson.)37 b Fs(Pr)-5 b(o)g(gr)g(am)34 + b(A)n(nalysis)e(and)g(Sp)-5 b(e)g(cialization)34 b(for)e(the)f(C)h(Pr) + -5 b(o)g(gr)g(amming)34 b(L)-5 b(anguage)p Fw(.)38 b(PhD)386 + 2348 y(thesis,)31 b(DIKU,)g(Univ)m(ersit)m(y)g(of)g(Cop)s(enhagen,)f + (Ma)m(y)h(1994.)245 2603 y([4])46 b(Andrew)37 b(Ay)m(ers,)j(Stuart)d + (de)g(Jong,)j(John)d(P)m(eyton,)j(and)d(Ric)m(hard)h(Sc)m(ho)s(oler.)63 + b(Scalable)38 b(cross-mo)s(dule)386 2785 y(optimization.)43 + b Fs(A)n(CM)31 b(SIGPLAN)h(Notic)-5 b(es)p Fw(,)31 b(33\(5\):301{312,) + 36 b(1998.)245 3041 y([5])46 b(V)-8 b(asan)m(th)35 b(Bala,)h(Ev)m(elyn) + e(Duesterw)m(ald,)h(and)e(Sanjeev)h(Banerjia.)51 b(Dynamo:)c(A)34 + b(transparen)m(t)f(dynamic)386 3223 y(optimization)f(system.)41 + b(pages)31 b(1{12,)i(2000.)245 3478 y([6])46 b(Thomas)31 + b(Ball)i(and)e(James)h(R.)f(Larus.)43 b(E\016cien)m(t)33 + b(path)e(pro\014ling.)44 b(In)30 b Fs(Pr)-5 b(o)g(c)g(e)g(e)g(dings)36 + b(of)e(the)g(29th)h(annual)386 3661 y(A)n(CM/IEEE)29 + b(international)34 b(symp)-5 b(osium)33 b(on)e(Micr)-5 + b(o)g(ar)g(chite)g(ctur)g(e)p Fw(,)32 b(pages)d(46{57.)i(IEEE)d + (Computer)g(So-)386 3844 y(ciet)m(y)k(Press,)e(1996.)245 + 4099 y([7])46 b(Mic)m(hael)f(Burk)m(e)d(and)g(Linda)g(T)-8 + b(orczon.)77 b(In)m(terpro)s(cedural)42 b(optimization:)67 + b(eliminating)44 b(unnecessary)386 4282 y(recompilation.)104 + b Fs(A)n(CM)50 b(T)-7 b(r)i(ansactions)54 b(on)e(Pr)-5 + b(o)g(gr)g(amming)54 b(L)-5 b(anguages)53 b(and)f(Systems)h(\(TOPLAS\)) + p Fw(,)386 4464 y(15\(3\):367{399,)36 b(1993.)245 4719 + y([8])46 b(Brad)30 b(Calder,)g(P)m(eter)h(F)-8 b(eller,)31 + b(and)f(Alan)g(Eustace.)40 b(V)-8 b(alue)31 b(pro\014ling.)39 + b(In)29 b Fs(International)35 b(Symp)-5 b(osium)34 b(on)386 + 4902 y(Micr)-5 b(o)g(ar)g(chite)g(ctur)g(e)p Fw(,)33 + b(pages)e(259{269,)j(1997.)245 5157 y([9])46 b(Da)m(vid)d(Chase.)73 + b(Implemen)m(tation)43 b(of)f(exception)h(handling,)h(P)m(art)e(I.)74 + b Fs(The)43 b(Journal)h(of)f(C)g(L)-5 b(anguage)386 5340 + y(T)e(r)i(anslation)p Fw(,)34 b(5\(4\):229{240,)h(June)30 + b(1994.)2104 5568 y(57)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (6) 7 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 56 62 bop 484 346 a Fo(7)940 244 y Ft(Conclusions)199 + 842 y Fw(This)34 b(thesis)h(describ)s(es)f(the)h(design)g(for)f(an)h + (aggressiv)m(e)h Fs(multi-stage)g Fw(optimizing)f(compiler.)55 + b(This)34 b(compiler)199 1024 y(is)i(built)f(with)g(the)h(idea)g(that)g + (a)g Fs(low-level)g Fw(represen)m(tation)h(with)e Fs(high-level)h + Fw(t)m(yp)s(e)f(information)h(is)g(p)s(o)m(w)m(erful)199 + 1207 y(enough)k(to)i(p)s(erform)d(aggressiv)m(e)j(link-time)g(and)d(p)s + (ost-link)i(optimizations.)73 b(T)-8 b(o)40 b(supp)s(ort)f(this)h + (claim,)45 b(w)m(e)199 1390 y(presen)m(ted)h(sev)m(eral)g(example)h + (transformations)e(whic)m(h)g(require)h(high-lev)m(el)h(information)f + (in)f(order)g(to)h(b)s(e)199 1572 y(e\013ectiv)m(e,)35 + b(and)d(m)m(ust)f(b)s(e)h(p)s(erformed)e(at)j(link-time)f(\(or)h + (later\))g(for)e(full)h(e\013ectiv)m(eness.)48 b(Op)s(erating)31 + b(on)h(a)g(lo)m(w-)199 1755 y(lev)m(el)i(represen)m(tation)g(allo)m(ws) + f(the)g(compiler)g(design)f(to)h(b)s(e)f(e\016cien)m(t)h(enough)f(for)g + (practical)i(use,)f(and)f(allo)m(ws)199 1938 y(man)m(y)f(traditional)g + (optimizations)i(to)e(b)s(e)e(implemen)m(ted)i(in)f(a)h(simple)g(and)e + (e\016cien)m(t)j(manner.)340 2120 y(The)25 b(LL)-10 b(VM)25 + b(virtual)g(instruction)h(set)f(is)g(k)m(ey)h(to)g(the)f(o)m(v)m(erall) + j(design)d(of)g(the)g(LL)-10 b(VM)25 b(compiler)h(system.)39 + b(W)-8 b(e)199 2303 y(describ)s(e)31 b(some)h(of)g(the)g(no)m(v)m(el)h + (asp)s(ects)f(of)g(the)g(represen)m(tation,)h(including)e(strong)h(t)m + (yp)s(e)g(information,)g(built-)199 2486 y(in)h(supp)s(ort)e(for)i(lo)m + (w-lev)m(el)i(exception)f(handling)e(constructs,)i(SSA)e(form,)i(and)e + (explicit)i(memory)f(allo)s(cation)199 2668 y(supp)s(ort.)58 + b(T)-8 b(ogether,)39 b(these)e(features)g(and)e(others)i(p)s(ermit)f + (the)h(dev)m(elopmen)m(t)g(of)g(a)g(v)-5 b(ariet)m(y)38 + b(of)e(tec)m(hniques,)199 2851 y(including)30 b(no)m(v)m(el)i + Fs(macr)-5 b(osc)g(opic)35 b(data)f(structur)-5 b(e)32 + b Fw(analyses)f(and)e(transformations.)340 3034 y(Pro\014le-guided)j + (optimization)i(is)e(an)g(imp)s(ortan)m(t)g(family)h(of)f(tec)m + (hniques)h(for)e(extracting)j(maxim)m(um)e(p)s(er-)199 + 3217 y(formance)38 b(from)e(a)h(giv)m(en)h(application.)62 + b(W)-8 b(e)39 b(sho)m(w)e(ho)m(w)g(the)g(LL)-10 b(VM)37 + b(compiler)g(infrastructure)f(can)i(obtain)199 3399 y(highly)f + (accurate)g(pro\014le)f(information)h Fs(in)h(the)h(\014eld)p + Fw(.)59 b(This)36 b(pro\014le)g(information)g(ma)m(y)h(then)f(b)s(e)g + (used)g(for)g(a)199 3582 y(v)-5 b(ariet)m(y)32 b(of)f(transformations)f + (either)h(at)g(run-time)f(or)g(sc)m(heduled)h(during)e(idle)h(time)h + (on)g(the)f(mac)m(hine.)340 3765 y(One)42 b(imp)s(ortan)m(t)h(con)m + (tribution)g(of)g(this)f(thesis)h(is)g(an)f(implemen)m(tation)i(of)f + (this)f(design.)77 b(The)42 b(LL)-10 b(VM)199 3947 y(compiler)33 + b(infrastructure)e(is)h(a)h(mature)f(system,)h(already)f(supp)s(orting) + f(the)h(dev)m(elopmen)m(t)i(of)e(no)m(v)m(el)h(analyses)199 + 4130 y(and)f(transformations.)45 b(LL)-10 b(VM)32 b(has)g(a)h(clean)f + (system)h(design)f(and)f(extensiv)m(e)i(do)s(cumen)m(tation,)h(making)e + (it)h(a)199 4313 y(natural)e(matc)m(h)g(for)f(teac)m(hing)i(topics)f + (in)f(adv)-5 b(anced)31 b(compilers.)340 4495 y(Although)j(the)g(LL)-10 + b(VM)34 b(compiler)h(infrastructure)e(has)g(b)s(een)g(a)h(quiet)h + (success)f(in)f(the)h(\014rst)f(t)m(w)m(o)i(y)m(ears)g(of)199 + 4678 y(its)e(dev)m(elopmen)m(t,)h(the)f(exciting)h(part)e(is)h(w)m(atc) + m(hing)g(it)g(gro)m(w.)47 b(Ev)m(ery)33 b(da)m(y)-8 b(,)34 + b(LL)-10 b(VM)32 b(is)h(gaining)g(new)f(features,)199 + 4861 y(b)s(eing)25 b(applied)f(to)i(new)e(problems,)h(and)g(expanding)f + (in)m(to)i(new)e(areas.)39 b(I)25 b(lo)s(ok)g(forw)m(ard)f(to)i(seeing) + g(what)e(LL)-10 b(VM)199 5043 y(will)31 b(lo)s(ok)g(lik)m(e)h(t)m(w)m + (o)f(y)m(ears)g(from)f(no)m(w:)41 b(at)31 b(the)g(rate)g(it)g(is)f(gro) + m(wing,)i(it)e(seems)h(that)g(an)m(ything)g(is)f(p)s(ossible.)2104 + 5568 y(56)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 1 7 bop 484 346 a Fo(1)940 244 y Ft(In)-6 b(tro)6 b(duction)199 + 842 y Fw(Mo)s(dern)25 b(programming)g(languages)i(and)e(soft)m(w)m(are) + i(practices)g(aim)f(to)g(supp)s(ort)e(more)h(reliable,)j(mo)s(dular,)e + (and)199 1024 y(dynamic)39 b(soft)m(w)m(are)i(applications)f({)f + (increasing)h(programmer)f(pro)s(ductivit)m(y)-8 b(,)42 + b(and)c(pro)m(viding)h(higher-lev)m(el)199 1207 y(seman)m(tic)d + (information)e(to)h(the)g(compiler.)53 b(Ho)m(w)m(ev)m(er,)37 + b(in)d(man)m(y)g(cases,)j(these)d(features)h(imp)s(ose)f(a)h(run-time) + 199 1390 y(p)s(erformance)30 b(p)s(enalt)m(y)h(on)f(compiled)h + (applications.)340 1572 y(A)m(t)f(the)f(same)g(time,)h(micropro)s + (cessors)f(are)g(con)m(tin)m(uing)h(to)f(ev)m(olv)m(e)i(at)f(a)f + (break-nec)m(k)h(pace.)41 b(Pip)s(elines)28 b(get)199 + 1755 y(deep)s(er,)33 b(cac)m(hes)i(are)e(gaining)h(additional)g(lev)m + (els,)h(and)d(memory)h(access)h(times)g(are)f(getting)i(slo)m(w)m(er)f + (\(relativ)m(e)199 1938 y(to)i(the)g(CPU\).)g(T)-8 b(o)36 + b(comp)s(ensate,)i(hardw)m(are)d(designers)g(are)h(exp)s(osing)f(more)h + (parallel)g(execution)h(resources)199 2120 y(and)30 b(in)m(tegrating)j + (features)e(that)g(w)m(ere)h(once)f(the)g(sole)h(domain)e(of)h + (compiler)g(dev)m(elop)s(ers:)42 b(register-renaming)199 + 2303 y(engines)31 b(and)f(reordering)g(bu\013ers,)f(for)h(example.)340 + 2486 y(Situated)46 b(b)s(et)m(w)m(een)g(the)g(mo)s(dern)e(programming)h + (language)h(and)f(the)h(arc)m(hitecture,)51 b(the)45 + b(compiler)h(is)199 2668 y(resp)s(onsible)23 b(for)h(making)g(the)g + (application)h(p)s(erform)d(as)i(w)m(ell)h(as)f(p)s(ossible.)38 + b(Compilers)24 b(do)f(this)h(b)m(y)g(eliminating)199 + 2851 y(pro)m(v)-5 b(ably)43 b(unnecessary)e(o)m(v)m(erhead)j(from)e + (the)g(program)g(and)g(b)m(y)g(making)h(e\013ectiv)m(e)i(use)d(of)h + (the)f(resources)199 3034 y(exp)s(osed)35 b(b)m(y)h(the)g(pro)s + (cessor.)56 b(The)35 b(solution)h(to)h(b)s(oth)e(problems)g(ab)s(o)m(v) + m(e)h(is)g(conceptually)h(simple:)51 b(increase)199 3217 + y(the)36 b(scop)s(e)g(of)g(analysis)h(and)e(optimization,)40 + b(allo)m(wing)d(the)f(compiler)h(to)f(do)g(a)g(b)s(etter)g(job.)57 + b(Unfortunately)-8 b(,)199 3399 y(traditional)25 b(approac)m(hes)e(to)h + (compilation)h(are)e(p)s(o)s(orly)f(suited)h(to)h(handling)e(these)i + (new)e(demands)g(placed)i(up)s(on)199 3582 y(the)31 b(compiler.)340 + 3765 y(This)40 b(thesis)h(describ)s(es)e(the)i Fn(Lo)m(w-Lev)m(el)46 + b(Virtual)h(Mac)m(hine)41 b Fw(\(LL)-10 b(VM\),)41 b(a)g(compiler)g + (infrastructure)199 3947 y(whic)m(h)36 b(is)f(w)m(ell-suited)i(for)e + (mo)s(dern)f(programming)i(languages)g(and)f(arc)m(hitectures.)58 + b(LL)-10 b(VM)36 b(is)f(designed)g(to)199 4130 y(ac)m(hiev)m(e)e(three) + d(critical)j(goals:)310 4412 y(1.)47 b(Enable)30 b(an)g(aggressiv)m(e)j + Fs(multi-stage)d Fw(optimization)j(strategy)-8 b(,)32 + b(pro)m(viding)e(maxim)m(um)h(p)s(erformance.)310 4670 + y(2.)47 b(Serv)m(e)33 b(as)h(the)f(host)g(for)g(leading)h(edge)g + (researc)m(h)g(and)f(dev)m(elopmen)m(t,)i(pro)m(viding)e(a)h(strong)f + (foundation)427 4852 y(for)d(b)s(oth)f(curren)m(t)h(and)g(future)g(pro) + 5 b(jects.)310 5110 y(3.)47 b(Op)s(erate)20 b(transparen)m(tly)h(to)g + (the)g(end-user)f(\(a)i(dev)m(elop)s(er\),)h(b)s(eha)m(ving)e(iden)m + (tically)i(to)e(a)g(standard)f(system)427 5293 y(compiler)30 + b(\(including)h(realistic)h(compilation)g(times\).)2127 + 5568 y(1)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (7) 8 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 2 8 bop 340 91 a Fw(LL)-10 b(VM)36 b(is)f(designed)g(to)h(address)e + (one)i(simple)f(observ)-5 b(ation:)51 b(h)m(uman)34 b(patience)j(is)e + (limited.)56 b(Supp)s(orting)199 274 y(this,)37 b(LL)-10 + b(VM)35 b(pro)m(vides)g(excellen)m(t)j(end-user)c(application)j(p)s + (erformance,)f(go)s(o)s(d)f(compile-time)i(p)s(erformance)199 + 457 y(for)25 b(application)h(dev)m(elop)s(ers,)g(and)e(a)h(pro)s + (ductiv)m(e)g(researc)m(h)g(en)m(vironmen)m(t)g(for)f(compiler)i(dev)m + (elop)s(ers.)39 b(In)24 b(order)199 639 y(to)j(understand)d(the)i + (design)f(decisions)h(made)g(for)g(LL)-10 b(VM,)26 b(w)m(e)g(\014rst)f + (describ)s(e)g(existing)i(approac)m(hes)f(to)g(dealing)199 + 822 y(with)k(these)h(issues)f(as)h(w)m(ell)g(as)g(the)f(de\014ciencies) + i(of)e(these)h(approac)m(hes.)199 1201 y Fm(1.1)136 b(Existing)46 + b(Compiler)g(System)f(Approac)l(hes)199 1474 y Fw(Compiler)27 + b(systems)g(ha)m(v)m(e)h(enjo)m(y)m(ed)g(a)f(broad)f(range)i(of)f + (researc)m(h)g(in)m(to)h(di\013eren)m(t)f(metho)s(ds)g(of)g(pro)s + (ducing)e(high-)199 1656 y(p)s(erformance)34 b(executables.)54 + b(Most)35 b(aggressiv)m(e)h(compilers)f(use)f(one)g(or)g(more)h(of)f + (the)h(follo)m(wing)g(tec)m(hniques,)199 1839 y(often)f(v)m(ery)f + (e\013ectiv)m(ely)-8 b(.)53 b(Unfortunately)-8 b(,)35 + b(these)e(tec)m(hniques)h(are)g(not)f(suitable)h(for)f(a)h(compiler)f + (whic)m(h)g(m)m(ust)199 2022 y(pro)s(duce)k(high-p)s(erformance)g + (executables)i Fs(and)f Fw(ac)m(hiev)m(e)i(lo)m(w)f(compilation)g + (times.)63 b(The)37 b(three)h(tec)m(hniques)199 2204 + y(are)33 b(link-time)f(in)m(terpro)s(cedural)g(optimization,)j + (run-time)c(dynamic)h(optimization,)i(and)d(pro\014le-driv)m(en)h(op-) + 199 2387 y(timization.)199 2702 y Fl(1.1.1)113 b(T)-9 + b(raditional)38 b(Approac)m(hes)g(to)f(Link-Time)i(In)m(terpro)s + (cedural)f(Optimization)199 2944 y Fw(In)m(terpro)s(cedural)30 + b(\(or)h(whole-program\))h(optimization)g(is)f(a)g(highly)g(e\013ectiv) + m(e)i(tec)m(hnique)e(for)g(pro)m(viding)g(high)199 3126 + y(p)s(erformance)i(executables.)52 b(The)34 b(underlying)e(idea)j(is)e + (to)i(gather)f(as)g(m)m(uc)m(h)g(of)g(the)g(program)f(together)i(in)m + (to)199 3309 y(one)h(place)h(as)f(p)s(ossible,)h(increasing)f(the)g + (scop)s(e)g(of)f(analysis)i(and)e(transformation)h(b)s(ey)m(ond)f(a)h + (single)g(trans-)199 3492 y(lation)j(unit.)63 b(The)37 + b(most)h(imp)s(ortan)m(t)g(decision)g(determining)g(the)g(scop)s(e)g + (of)g(optimizations)h(p)s(ossible)f(in)f(an)199 3674 + y(in)m(terpro)s(cedural)30 b(optimizer)i(is)e(the)h(follo)m(wing:)42 + b(at)31 b(whic)m(h)f(\\lev)m(el")j(will)e(the)f(program)g(b)s(e)g + (represen)m(ted?)340 3857 y(In)g(existing)h(in)m(terpro)s(cedural)g + (optimizers,)g(there)f(are)h(t)m(w)m(o)h(answ)m(ers)e(to)h(this)f + (question:)310 4139 y(1.)47 b Fn(V)-9 b(ery)35 b(Lo)m(w)f(Lev)m(el)d + Fw(-)f(Mac)m(hine)i(Co)s(de)427 4359 y(A)21 b(large)h(amoun)m(t)f(of)g + (researc)m(h)g(has)g(gone)h(in)m(to)g(p)s(erforming)d(in)m(terpro)s + (cedural)i(optimizations)i(on)d(mac)m(hine)427 4542 y(co)s(de)25 + b([5)q(,)h(16)q(,)g(24)q(,)f(34)q(,)h(40)q(,)g(11)q(,)f(35)q(])h(at)h + (either)f(link-time)g(or)g(run-time.)39 b(The)25 b(adv)-5 + b(an)m(tage)27 b(of)f(these)g(systems)427 4725 y(is)33 + b(that)g(they)h(often)f(w)m(ork)g(with)g(unmo)s(di\014ed)e(fron)m + (t-end)i(compiler)h(systems,)g(allo)m(wing)g(the)g(dev)m(elop)s(er)427 + 4908 y(to)d(use)f(an)m(y)g(compiler)h(they)g(w)m(an)m(t.)427 + 5128 y(These)25 b(systems)g(su\013er)f(from)h(a)h(v)m(ery)f(imp)s + (ortan)m(t)h(limitation:)40 b(mac)m(hine)26 b(co)s(de)f(simply)g(do)s + (es)g(not)g(pro)m(vide)427 5310 y(enough)31 b(high-lev)m(el)j + (information)f(to)g(supp)s(ort)d(aggressiv)m(e)k(in)m(terpro)s(cedural) + e(analyses)h(or)f(transforma-)2127 5568 y(2)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 55 61 bop 340 91 a Fw(A)29 b(n)m(um)m(b)s(er)e(of)i(attempts)g(ha)m(v)m + (e)h(b)s(een)e(made)g(to)i(mak)m(e)f(a)g(uni\014ed,)f(generic,)i(in)m + (termediate)g(represen)m(tation.)199 274 y(The)24 b(goal)h(of)f(these)h + (pro)5 b(jects)24 b(has)g(b)s(een)f(to)i(reduce)e(the)h(amoun)m(t)h(of) + f(e\013ort)h(required)e(to)h(create)i(a)e(new)g(language)199 + 457 y(or)e(micropro)s(cessor.)37 b(These)22 b(pro)5 b(jects)21 + b(ha)m(v)m(e)i(largely)g(failed,)h(ranging)d(from)g(the)h(original)g + (UNiv)m(ersal)h(Computer)199 639 y(Orien)m(ted)k(Language)g([41)q(])g + (\(UNCOL\),)f(whic)m(h)g(w)m(as)h(discussed)e(but)h(nev)m(er)g + (implemen)m(ted,)i(to)f(the)g(more)f(recen)m(t)199 822 + y(Arc)m(hitecture)k(and)e(language)i(Neutral)g(Distribution)f(F)-8 + b(ormat)30 b([12)q(])f(\(ANDF\),)h(whic)m(h)f(w)m(as)g(implemen)m(ted)g + (but)199 1005 y(ultimately)j(failed.)340 1187 y(LL)-10 + b(VM)44 b(is)f(m)m(uc)m(h)g(less)g(am)m(bitious)h(than)f(an)m(y)h(of)f + (these)h(pro)5 b(jects.)79 b(The)43 b(primary)f(di\013erence)i(b)s(et)m + (w)m(een)199 1370 y(the)38 b(LL)-10 b(VM)38 b(virtual)h(instruction)f + (set)g(and)g(these)g(pro)5 b(jects)38 b(is,)j(again,)g(the)d(lev)m(el)i + (at)e(whic)m(h)g(they)g(represen)m(t)199 1553 y(programs.)56 + b(These)35 b(uni\014ed)g(in)m(termediate)i(represen)m(tations)f + (attempt)h(to)f(describ)s(e)f(languages)i(at)f(the)g(AST)199 + 1736 y(lev)m(el,)45 b(implying)40 b(that)h(they)g(m)m(ust)f(include)g + (features)h(from)f(all)h(p)s(ossible)f(source)h(languages)g(and)f + (preserv)m(e)199 1918 y(information)j(that)g(migh)m(t)g(p)s(ossibly)e + (b)s(e)h(used)f(b)m(y)i(a)f(target)i(mac)m(hine.)77 b(Instead,)46 + b(LL)-10 b(VM)42 b(approac)m(hes)h(the)199 2101 y(problem)33 + b(the)g(same)g(w)m(a)m(y)h(that)g(a)f(micropro)s(cessor)h(do)s(es:)45 + b(implemen)m(t)34 b(generic)g(lo)m(w-lev)m(el)i(features)d(that)h(an)m + (y)199 2284 y(language)k(can)f(b)s(e)f(mapp)s(ed)f(do)m(wn)h(to.)59 + b(All)37 b(high-lev)m(el)h(concepts)g(can)e(b)s(e)g(implemen)m(ted)h + (in)f(least-common)199 2466 y(denominator)29 b(forms,)f(and)g(in)g + (some)g(w)m(a)m(ys,)i(LL)-10 b(VM)28 b(simply)g(app)s(ears)g(as)g(a)h + (v)m(ery)f(strict)h(RISC)f(arc)m(hitecture)h(to)199 2649 + y(a)i(fron)m(t-end.)2104 5568 y(55)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (8) 9 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 54 60 bop 199 91 a Fw(mak)m(es)31 b(aggressiv)m(e)i(optimizations)f(ev) + m(en)f(more)g(costly)-8 b(.)340 274 y(On)21 b(the)i(other)f(hand,)h + (these)f(systems)g(o\013er)g(features)g(that)h(LL)-10 + b(VM)22 b(do)s(es)f(not)i(curren)m(tly)-8 b(,)24 b(including)d(securit) + m(y)199 457 y(and)34 b(guaran)m(teed)h(p)s(ortabilit)m(y)-8 + b(.)53 b(LL)-10 b(VM)35 b(b)m(yteco)s(de)g(is)f(completely)i(p)s + (ortable)e(if)g(the)g(input)g(program)g(is)g(t)m(yp)s(e-)199 + 639 y(safe,)j(but)e(details)h(ab)s(out)f(the)g(endian-ness)g(and)g(p)s + (oin)m(ter)g(size)h(con\014guration)f(of)h(the)f(C)g(compiler)h(can)f + (leak)199 822 y(in)m(to)c(LL)-10 b(VM)29 b(b)m(yteco)s(de)i(for)e + (non-t)m(yp)s(e-safe)h(programs.)40 b(Because)31 b(these)f(systems)f + (do)h(not)f(supp)s(ort)f(non-t)m(yp)s(e-)199 1005 y(safe)36 + b(programs)e(at)i(all,)i(this)d(is)g(a)g(small)h(issue.)55 + b(Another)35 b(strength)g(of)g(LL)-10 b(VM)35 b(is)g(that)h(it)f(do)s + (es)g(not)g(require)199 1187 y(a)f(sp)s(eci\014c)g(ob)5 + b(ject)34 b(mo)s(del,)h(set)f(of)g(exception)h(seman)m(tics,)h(or)e(an) + m(y)g(other)g(high-lev)m(el)h(language)h(feature)e(from)199 + 1370 y(a)40 b(fron)m(t-end.)68 b(This)39 b(mak)m(es)h(it)g(v)m(ery)g + (\015exible,)i(but)d(a)h(set)g(of)g(in)m(ter-language)h(con)m(v)m(en)m + (tions)h(w)m(ould)d(need)g(to)199 1553 y(b)s(e)32 b(de\014ned)f(to)h + (allo)m(w)i(co)s(de)e(pro)s(duced)f(b)m(y)h(di\013eren)m(t)g(fron)m + (t-ends)g(to)h(comm)m(unicate)h(\(an)e(LL)-10 b(VM)32 + b(Application)199 1736 y(Binary)f(In)m(terface,)h(or)e(ABI\).)199 + 2114 y Fm(6.3)136 b(In)l(termediate)47 b(Represen)l(tations)199 + 2387 y Fw(The)39 b(LL)-10 b(VM)39 b(virtual)g(instruction)g(set)h(is)f + (an)g(imp)s(ortan)m(t)g(part)g(of)g(the)g(LL)-10 b(VM)39 + b(system,)i(whic)m(h)e(determines)199 2570 y(ho)m(w)f(man)m(y)g(of)g + (the)g(larger)h(comp)s(onen)m(ts)f(w)m(ork)g(together.)64 + b(Among)38 b(other)h(prop)s(erties,)g(the)f(LL)-10 b(VM)38 + b(virtual)199 2752 y(instruction)j(set)h(is)f(a)h(strongly)g(t)m(yp)s + (ed)e(SSA)h(based)g(represen)m(tation)h(whic)m(h)f(is)g(a)g(suitable)h + (target)h(for)e(an)m(y)199 2935 y(source)32 b(language.)47 + b(Note)34 b(that)e(the)h(LL)-10 b(VM)32 b(virtual)g(instruction)g(set)g + (is)g(b)s(oth)g(an)g(on-disk)f(format)i(as)f(w)m(ell)h(as)199 + 3118 y(an)g(in-memory)f(format)h(used)f(for)h(transformation.)47 + b(This)32 b(distinguishes)g(it)i(from)e(a)h(v)-5 b(ariet)m(y)34 + b(of)f(w)m(ork)f(whic)m(h)199 3300 y(aims)f(to)g(mak)m(e)g(fron)m + (t-end)g(creation)g(simpler)f(\(e.g.)i([26)q(]\).)340 + 3483 y(A)42 b(lot)g(of)f(w)m(ork)g(has)g(b)s(een)f(done)h(in)g(the)g + (\014eld)g(of)g(t)m(yp)s(ed)g(in)m(termediate)i(represen)m(tations.)74 + b(F)-8 b(unctional)199 3666 y(languages)31 b(often)g(use)e(strongly)h + (t)m(yp)s(ed)g(in)m(termediate)h(languages)g(\(e.g.)42 + b([38)q(]\))31 b(as)f(a)g(natural)g(extension)g(of)g(the)199 + 3849 y(source)d(language.)41 b(The)27 b(T)m(yp)s(ed)f(Assem)m(bly)h + (Language)h([33)q(])f(pro)5 b(ject,)28 b(fo)s(cuses)f(on)g(using)f(t)m + (yp)s(e)h(information)g(to)199 4031 y(pro)m(v)m(e)35 + b(program)f(safet)m(y)-8 b(.)53 b(The)33 b(SafeTSA)h([1])g(represen)m + (tation)h(is)f(a)h(com)m(bination)g(of)f(t)m(yp)s(e)g(information)g + (with)199 4214 y(SSA)c(form,)g(also)h(fo)s(cusing)f(on)h(safet)m(y)g + (prop)s(erties.)340 4397 y(In)k(con)m(trast)j(to)e(this)g(extensiv)m(e) + h(w)m(ork,)h(the)e(LL)-10 b(VM)35 b(virtual)h(instruction)g(set)g(do)s + (es)g(not)g(use)f(t)m(yp)s(e)h(infor-)199 4579 y(mation)42 + b(to)g(pro)m(v)m(e)g(safet)m(y)g(prop)s(erties)f(of)g(the)h(input)e + (program.)73 b(In)40 b(fact,)45 b(a)d(feature)f(of)h(LL)-10 + b(VM)41 b(is)g(that)h(it)199 4762 y(allo)m(ws)36 b(represen)m(tation)g + (of)e(arbitrary)h(programs)f(generated)h(b)m(y)g(a)f(C)g(fron)m(t-end,) + i(ev)m(en)f(the)g(w)m(orst)g(b)s(eha)m(v)m(ed.)199 4945 + y(An)e(in)m(teresting)i(feature)f(of)f(LL)-10 b(VM,)34 + b(ho)m(w)m(ev)m(er,)h(is)f(that)g(it)g(is)f(v)m(ery)h(simple)f(to)h + (detect)h(when)d(t)m(yp)s(e)h(violations)199 5127 y(o)s(ccur,)j(as)f + (describ)s(ed)f(in)g(Section)i(3.3.2.)56 b(In)34 b(general,)j(the)e(LL) + -10 b(VM)35 b(virtual)g(instruction)g(set)g(is)g(designed)f(for)199 + 5310 y(maximal)d(p)s(erformance)f(while)h(pro)m(viding)f(imp)s(ortan)m + (t)g(high-lev)m(el)i(information)f(to)g(p)s(ost-link)g(optimizers.)2104 + 5568 y(54)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 3 9 bop 427 91 a Fw(tions.)47 b(These)32 b(systems)h(t)m(ypically)h + (target)g(v)m(ery)f(lo)m(w-lev)m(el)i(transformations)e(suc)m(h)f(as)g + (in)m(terpro)s(cedural)427 274 y(register)f(allo)s(cation,)i(inlining,) + d(and)g(trace)i(construction.)310 531 y(2.)47 b Fn(V)-9 + b(ery)35 b(High)g(Lev)m(el)30 b Fw(-)h(Abstract)g(Syn)m(tax)f(T)-8 + b(rees)31 b(\(AST\))427 751 y(In)20 b(order)g(to)i(solv)m(e)h(this)d + (problem,)j(compiler)f(dev)m(elop)s(ers)f(in)m(v)m(en)m(ted)h(tec)m + (hniques)g(to)g(preserv)m(e)f(source-lev)m(el)427 934 + y(information)30 b(all)h(the)g(w)m(a)m(y)g(un)m(til)f(link-time.)42 + b(In)30 b(most)g(cases)h([19)r(,)f(4,)h(13)q(,)f(37)q(,)h(46)q(],)f + (this)g(is)h(implemen)m(ted)427 1117 y(b)m(y)k(writing)g(out)h(the)f + (high-lev)m(el)i(compiler)f(In)m(termediate)h(Represen)m(tation)f + (\(IR\))g(to)g(disk)f(at)h(compile)427 1300 y(time.)41 + b(A)m(t)31 b(link)f(time,)h(the)f(link)m(er)h(reads)f(these)h + (serialized)g(v)m(ersions)f(of)h(the)f(program)g(AST,)g(com)m(bining) + 427 1482 y(them,)g(optimizing)i(them,)e(and)g(\014nally)g(p)s + (erforming)f(all)j(co)s(de)e(generation)i(at)f(link)f(time.)427 + 1702 y(This)j(approac)m(h)i(solv)m(es)g(the)g(problem)e(with)h(the)h(v) + m(ery-lo)m(w-lev)m(el)j(approac)m(h)c(to)h(in)m(terpro)s(cedural)f + (opti-)427 1885 y(mization)24 b(\(lac)m(k)i(of)d(high-lev)m(el)i + (information\),)h(but)d(at)h(a)g(high)f(cost.)39 b(Because)25 + b(almost)g(all)f(compilation)h(is)427 2068 y(p)s(ostp)s(oned)f(to)j + (link)f(time,)h(an)m(y)g(c)m(hange)g(to)g(a)f(single)h(source)f(\014le) + g(requires)f(almost)i(complete)h(recompila-)427 2250 + y(tion)f(of)h(the)g(program.)39 b(Additionally)-8 b(,)30 + b(compiler)e(IRs)f(are)h(often)f(proprietary)-8 b(,)29 + b(sev)m(erely)g(restricting)f(the)427 2433 y(amoun)m(t)k(of)g(in)m + (terop)s(erabilit)m(y)h(b)s(et)m(w)m(een)f(compilers.)45 + b(In)31 b(fact,)j(in)d(some)h(cases,)h(ev)m(en)g(di\013eren)m(t)f(v)m + (ersions)427 2616 y(of)27 b(the)g(same)g(compiler)g(cannot)h(comm)m + (unicate)g(b)s(ecause)f(they)g(are)g(dep)s(enden)m(t)f(on)h(the)g + (memory)f(la)m(y)m(out)427 2798 y(of)k(the)h(in)m(termediate)h + (represen)m(tation.)199 3114 y Fl(1.1.2)113 b(T)-9 b(raditional)38 + b(Approac)m(hes)g(to)f(Run-Time)i(Optimization)199 3355 + y Fw(Lik)m(e)c(in)m(terpro)s(cedural)e(optimization,)k(there)c(are)h(m) + m(ultiple)h(w)m(a)m(ys)f(of)g(approac)m(hing)g(run-time)f + (optimization.)199 3538 y(The)h(most)g(common)g(approac)m(h)g(is)g(to)g + (simply)g(ignore)g(dynamic)g(optimization)h(completely)-8 + b(,)37 b(as)d(most)h(static)199 3720 y(compilers)j(do.)62 + b(By)38 b(not)g(using)f(an)m(y)h(run-time)f(optimization)i(or)f + (monitoring,)i(ho)m(w)m(ev)m(er,)h(the)c(en)m(tire)i(range)199 + 3903 y(of)h(dynamic)f(program)g(b)s(eha)m(vior)h(is)f(missed.)68 + b(F)-8 b(or)40 b(this)f(reason)h(and)f(others,)j(run-time)d + (optimization)i(has)199 4086 y(b)s(ecome)31 b(a)g(frequen)m(tly)f + (applied)g(tec)m(hnique)i(for)e(ac)m(hieving)i(high)e(p)s(erformance)f + (in)i(mo)s(dern)e(systems.)340 4269 y(The)h(t)m(w)m(o)i(most)f(common)f + (t)m(yp)s(es)h(of)f(dynamic)g(optimization)j(systems)d(are)h(as)g + (follo)m(ws:)310 4551 y(1.)47 b Fn(High)35 b(Lev)m(el)f(Language)h + (Virtual)g(Mac)m(hines)427 4771 y Fw(Run-time)43 b(optimization)j(and)d + (Just-In-Time)h(\(JIT\))f(compilation)j(are)e(v)m(ery)g(common)h(among) + f(the)427 4954 y(class)32 b(of)f(high-lev)m(el)i(language)g(Virtual)f + (Mac)m(hines)h(\(VMs\).)45 b(These)31 b(VMs)h(often)g(target)h(v)m(ery) + e(dynamic)427 5136 y(languages,)47 b(suc)m(h)42 b(as)i(SmallT)-8 + b(alk)43 b([21)q(],)k(Self)c([44)q(],)j(Ja)m(v)-5 b(a)44 + b([22)q(],)i(and)d(C#)f([32)q(],)k(and)c(use)h(a)g(mac)m(hine-)427 + 5319 y(indep)s(enden)m(t)32 b(b)m(yte-co)s(de)j(input)d(whic)m(h)h + (enco)s(des)h(these)g(languages)h(at)f(a)g(v)m(ery)g(high-lev)m(el)h + (\(e\013ectiv)m(ely)2127 5568 y(3)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (9) 10 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 4 10 bop 427 91 a Fw(at)29 b(the)g(AST)f(lev)m(el\).)42 + b(By)29 b(using)f(a)h(virtual)g(mac)m(hine)g(and)f(a)h(v)m + (ery-high-lev)m(el)j(input)27 b(program)i(represen-)427 + 274 y(tation,)e(these)e(systems)f(are)h(able)g(to)h(pro)m(vide)e + (platform)h(p)s(ortabilit)m(y)g(and)f(securit)m(y)i(services)f(in)f + (addition)427 457 y(to)31 b(reasonable)g(p)s(erformance.)427 + 672 y(Unfortunately)-8 b(,)28 b(a)f(high-lev)m(el)i(represen)m(tation)f + (presen)m(ts)e(the)h(same)h(problem)e(to)i(a)f(run-time)f(optimizer)427 + 854 y(that)44 b(it)g(do)s(es)f(for)h(an)f(in)m(terpro)s(cedural)h + (link-time)g(optimizer:)68 b(no)44 b(substan)m(tial)g(optimizations)i + (can)427 1037 y(b)s(e)33 b(p)s(erformed)g(at)i(compile)g(time.)53 + b(In)34 b(the)g(case)h(of)g(a)f(JIT)g(compiler,)i(this)e(means)g(that)h + (the)f(dynamic)427 1220 y(compiler)21 b(m)m(ust)g(sp)s(end)e(v)-5 + b(aluable)21 b(run-time)g(cycles)h(p)s(erforming)d(m)m(undane)h + (optimizations)j(lik)m(e)f(common)427 1403 y(cop)m(y)27 + b(propagation,)i(whic)m(h)e(reduces)g(the)h(n)m(um)m(b)s(er)d(of)j + (run-time)f(cycles)h(a)m(v)-5 b(ailable)30 b(for)c(more)i(in)m + (teresting)427 1585 y(optimizations.)55 b(On)34 b(the)h(other)g(hand,)g + (these)h(high-lev)m(el)g(represen)m(tations)g(do)e(pro)m(vide)h(the)g + (dynamic)427 1768 y(compiler)d(with)f(a)h(ric)m(h)f(information)h + (source,)g(allo)m(wing)h(a)f(wide)f(v)-5 b(ariet)m(y)33 + b(of)f(in)m(teresting)g(optimizations)427 1951 y(if)e(run-time)g + (cycles)h(can)g(b)s(e)f(spared.)310 2198 y(2.)47 b Fn(Arc)m(hitecture) + 35 b(Lev)m(el)g(Virtual)f(Mac)m(hines)e Fw(and)d Fn(Dynamic)36 + b(T)-9 b(ranslators)427 2413 y Fw(A)m(t)31 b(the)g(other)f(end)g(of)h + (the)g(sp)s(ectrum)e(are)i(mac)m(hine)g(co)s(de)g(reoptimizers)g(and)f + (instruction)g(set)h(transla-)427 2596 y(tors.)39 b(These)27 + b(systems)g(either)h(manipulate)f(nativ)m(e)h(mac)m(hine)g(co)s(de)f + (to)h(ac)m(hiev)m(e)h(higher)e(p)s(erformance)f([5)q(])427 + 2778 y(or)37 b(dynamically)h(translate)g(mac)m(hine)g(co)s(de)g(b)s(et) + m(w)m(een)g(di\013eren)m(t)g(arc)m(hitectures)h([16)q(,)e(24)q(].)62 + b(These)37 b(sys-)427 2961 y(tems)23 b(ha)m(v)m(e)h(dra)m(wbac)m(ks)f + (and)f(applications)i(similar)f(to)g(the)g(mac)m(hine)h(co)s(de)f(in)m + (terpro)s(cedural)f(optimizers.)427 3144 y(They)27 b(tend)i(to)g(w)m + (ork)f(v)m(ery)h(w)m(ell)h(with)e(trace)i(formation)f(and)e + (optimization,)32 b(whic)m(h)c(rely)g(on)h(highly)f(ac-)427 + 3327 y(curate)j(pro\014ling)e(information,)i(but)f(are)h(incapable)g + (of)f(high-lev)m(el)i(restructuring)e(transformations.)199 + 3637 y Fl(1.1.3)113 b(T)-9 b(raditional)38 b(Approac)m(hes)g(to)f + (Compile-time)i(Pro\014le-Driv)m(en)f(Optimization)199 + 3878 y Fw(Pro\014le-driv)m(en)d(optimization)i([23)q(])e(is)g(an)f(imp) + s(ortan)m(t)h(tec)m(hnique)h(whic)m(h)e(uses)g(the)h(estimated)h + (run-time)f(b)s(e-)199 4061 y(ha)m(vior)40 b(of)f(the)f(application)j + (to)e(impro)m(v)m(e)h(its)f(p)s(erformance)f(\(often)h(b)m(y)g + (optimizing)h(common)f(cases)h(at)f(the)199 4244 y(exp)s(ense)30 + b(of)g(uncommon)f(cases\).)42 b(The)29 b(traditional)j(w)m(a)m(y)f(to)g + (in)m(tegrate)h(pro\014ling)d(in)m(to)i(a)f(compilation)i(system)199 + 4427 y(is)f(to)g(split)f(the)h(standard)e(compile)j(and)e(link)g + (stages)h(of)g(compilation)h(in)m(to)f(a)g(\014v)m(e)g(stage)h(pro)s + (cess.)340 4609 y(The)f(\014rst)f(stage)i(of)f(compilation)h(compiles)g + (the)e(program,)h(but)f(inserts)h(pro\014ling)f(instrumen)m(tation)h + (in)m(to)199 4792 y(the)46 b(program)f(to)h(cause)f(it)h(to)g(gather)g + (some)g(form)f(of)g(pro\014le)g(information)g(at)h(run-time.)85 + b(The)45 b(second)199 4975 y(stage)c(links)f(these)g(instrumen)m(ted)f + (ob)5 b(ject)41 b(\014les)f(in)m(to)g(an)g(instrumen)m(ted)f + (executable.)71 b(The)39 b(third)g(stage)i(of)199 5157 + y(pro\014le-driv)m(en)23 b(optimization)i(requires)e(the)g(dev)m(elop)s + (er)h(of)f(the)g(application)i(to)e(run)f(the)h(generated)i(executable) + 199 5340 y(through)i(a)g(series)g(of)g(test)h(runs,)e(whic)m(h)h(are)g + (used)g(to)g(generate)i(the)e(pro\014le)f(information)i(for)e(the)i + (application.)2127 5568 y(4)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 53 59 bop 199 91 a Fw(sp)s(eci\014c)28 b(trees)g(to)g(mac)m(hine)g(sp)s + (eci\014c)f(co)s(de.)40 b(Optimizations)29 b(ma)m(y)f(b)s(e)f(p)s + (erformed)f(at)i(the)g(\\appropriate")g(lev)m(el)199 + 274 y(for)i(the)h(analysis)g(or)f(transformation.)340 + 457 y(Lik)m(e)24 b(SUIF,)e(the)h(SGI)f(Op)s(en64)g(compiler)h(p)s + (erforms)e(in)m(terpro)s(cedural)h(optimization)i(on)f(a)g(high-lev)m + (el)h(AST)199 639 y(represen)m(tation,)36 b(deferring)d(most)h(of)g + (compilation)h(to)f(link-time.)52 b(Additionally)-8 b(,)36 + b(the)e(strong)f(pro\014le-driv)m(en)199 822 y(optimization)45 + b(framew)m(ork)e(dep)s(ends)f(on)g(the)i(traditional)g(\014v)m(e)f + (stage)i(mo)s(del,)h(whic)m(h)d(leads)g(to)h(a)f(n)m(um)m(b)s(er)199 + 1005 y(of)c(problems,)g(as)g(describ)s(ed)e(in)h(Section)h(1.1.3.)66 + b(The)38 b(m)m(ulti-lev)m(el)j(represen)m(tation)e(is)g(also)g + (detrimen)m(tal)g(to)199 1187 y(mo)s(dularit)m(y:)45 + b(phases)31 b(are)i(designed)f(to)h(w)m(ork)f(on)g(a)g(particular)h + (lev)m(el)h(\(or)e(set)h(of)f(them\),)h(so)g(they)f(cannot)h(b)s(e)199 + 1370 y(freely)e(in)m(terc)m(hanged.)340 1553 y(In)20 + b(con)m(trast)i(to)f(these)f(t)m(w)m(o)i(systems,)g(the)f(LL)-10 + b(VM)20 b(system)h(uses)e(a)i(lo)m(w-lev)m(el)i(represen)m(tation)f + (with)e(language-)199 1736 y(indep)s(enden)m(t)34 b(t)m(yp)s(es.)55 + b(Because)37 b(the)e(represen)m(tation)h(is)g(a)f(simple)g(lo)m(w-lev)m + (el)j(three-address)d(co)s(de)h(represen-)199 1918 y(tation,)f(it)e(is) + g(compact,)h(regular)f(and)f(do)s(es)g(not)h(need)f(to)i(b)s(e)d(mo)s + (di\014ed)h(to)h(supp)s(ort)e(new)h(fron)m(t-ends.)47 + b(Using)199 2101 y(a)31 b(lo)m(w-lev)m(el)j(represen)m(tation)e(also)g + (allo)m(ws)g(most)f(optimization)h(to)g(happ)s(en)d(at)j(compile)f + (time,)h(instead)f(of)g(de-)199 2284 y(ferring)k(most)g(compilation)i + (to)f(link-time)g(as)f(these)h(systems)f(do.)55 b(Although)35 + b(these)h(systems)f(b)s(oth)f(pro)m(vide)199 2466 y(m)m(uc)m(h)j(more)h + (high-lev)m(el)h(information)e(to)h(the)f(link-time)h(optimizer)h(than) + d(LL)-10 b(VM,)38 b(w)m(e)f(main)m(tain)i(that)e(this)199 + 2649 y(information)29 b(adds)e(little)j(v)-5 b(alue)29 + b(o)m(v)m(er)h(the)e(LL)-10 b(VM)28 b(represen)m(tation.)41 + b(Additionally)30 b(these)e(systems)h(pro)m(vide)f(so)199 + 2832 y(m)m(uc)m(h)j(information)f(that)h(a)g(run)m(time)f(and)g + (o\017ine)h(reoptimization)h(system)f(is)f(infeasible.)199 + 3210 y Fm(6.2)136 b(High-Lev)l(el)46 b(Virtual)f(Mac)l(hines)199 + 3483 y Fw(In)33 b(recen)m(t)i(y)m(ears,)h(in)m(terest)f(in)f(high-lev)m + (el)i(virtual)e(mac)m(hine)g(tec)m(hnology)j(has)c(explo)s(ded.)51 + b(Virtual)35 b(mac)m(hines)199 3666 y(ha)m(v)m(e)46 b(b)s(een)e(a)m(v) + -5 b(ailable)47 b(for)d(decades,)49 b(p)s(erhaps)43 b(starting)i(with)g + (the)f(original)i(P)m(ascal)g(P-Co)s(de)f(in)m(terpreter.)199 + 3849 y(T)-8 b(o)s(da)m(y)g(,)35 b(man)m(y)d(language-lev)m(el)37 + b(virtual)c(mac)m(hines,)h(suc)m(h)e(as)h(SmallT)-8 b(alk)34 + b([21)q(],)g(Self)e([44)r(],)h(Ja)m(v)-5 b(a)34 b([22)q(],)g(and)e(the) + 199 4031 y(Microsoft's)d(Common)d(Language)i(Run)m(time)f([32)r(])g + (are)g(a)m(v)-5 b(ailable)30 b(to)d(host)g(their)g(corresp)s(onding)f + (language)j(\(or)199 4214 y(set)e(of)g(languages)h(in)e(the)h(case)h + (of)f(CLR\).)f(These)g(platforms)h(o\013er)g(a)g(large)h(n)m(um)m(b)s + (er)d(of)i(securit)m(y)g(and)f(platform)199 4397 y(indep)s(endence)j + (features,)i(and)f(tend)g(to)h(use)f(dynamic)g(compilation)i(to)g(ac)m + (hiev)m(e)g(acceptable)h(p)s(erformance.)340 4579 y(Note)46 + b(that)f(these)h(systems)e(all)i(represen)m(t)e(a)h(program)g(in)f(a)h + (m)m(uc)m(h)f(higher)h(\(and)f(language)i(sp)s(eci\014c\))199 + 4762 y(represen)m(tation)e(than)e(LL)-10 b(VM)43 b(do)s(es.)76 + b(Although)43 b(this)f(presen)m(ts)h(a)g(lot)g(of)g(high-lev)m(el)h + (information)f(to)g(the)199 4945 y(run)m(time)36 b(optimizer,)j(it)e + (also)g(mak)m(es)h(it)e(largely)i(imp)s(ossible)e(for)g(the)h(static)h + (compiler)e(to)h(do)g(a)f(meaningful)199 5127 y(amoun)m(t)f(of)f + (optimization)i(b)s(efore)e(run)m(time.)51 b(As)34 b(men)m(tioned)h(in) + f(Section)h(1.1.2,)i(this)d(requires)f(the)h(run)m(time)199 + 5310 y(optimizer)g(to)f(p)s(erform)f(man)m(y)h(m)m(undane)e + (optimizations)k(at)f(run)m(time)e(just)g(to)i(get)g(acceptable)h(co)s + (de,)e(whic)m(h)2104 5568 y(53)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (10) 11 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 52 58 bop 484 346 a Fo(6)940 244 y Ft(Related)78 b(W)-19 + b(ork)199 842 y Fw(LL)-10 b(VM)29 b(is)h(clearly)g(related)g(to)g(man)m + (y)f(di\013eren)m(t)h(pro)5 b(jects)30 b(in)f(man)m(y)g(di\013eren)m(t) + h(w)m(a)m(ys.)41 b(This)28 b(Chapter)h(iden)m(ti\014es)199 + 1024 y(and)f(ev)-5 b(aluates)31 b(some)e(of)f(the)h(most)g(imp)s(ortan) + m(t)g(w)m(ork)g(related)h(to)f(LL)-10 b(VM.)29 b(Because)h(the)f + (\014eld)f(of)h(compilers)g(is)199 1207 y(so)e(broad)f(and)g(there)g + (is)h(so)f(m)m(uc)m(h)h(prior)f(art,)i(only)e(a)h(small)g(fraction)g + (of)g(related)g(w)m(ork)g(ma)m(y)g(b)s(e)e(included)h(here.)199 + 1586 y Fm(6.1)136 b(Compiler)46 b(Infrastructures)199 + 1858 y Fw(Man)m(y)35 b(compiler)g(infrastructures)e(are)i(a)m(v)-5 + b(ailable)37 b(in)d(the)g(researc)m(h)h(w)m(orld,)h(targeting)g(a)f(v) + -5 b(ariet)m(y)35 b(of)g(di\013eren)m(t)199 2041 y(problems)40 + b(ranging)h(from)g(language)h(supp)s(ort,)g(mid-lev)m(el)g + (optimization,)k(and)40 b(lo)m(w-lev)m(el)k(co)s(de)d(generation)199 + 2224 y(issues.)54 b(Because)36 b(LL)-10 b(VM)35 b(is)g(targeted)h(at)f + (mid-lev)m(el)i(in)m(terpro)s(cedural)d(optimizations,)k(w)m(e)e + (brie\015y)d(examine)199 2407 y(the)e(SUIF)f(compiler)h(infrastructure) + e(and)h(the)h(SGI)f(Op)s(en64)g(compiler,)h(whic)m(h)f(b)s(oth)g(excel) + h(in)f(these)h(areas.)340 2589 y(The)d(SUIF)h(compiler)g + (infrastructure)e([46)q(,)i(47)q(])g(is)f(p)s(erhaps)f(the)i(most)g + (in\015uen)m(tial)f(compiler)i(for)e(in)m(terpro-)199 + 2772 y(cedural)34 b(optimization.)51 b(SUIF)33 b(is)h(part)f(of)g(the)h + (National)h(Compiler)e(Infrastructure)f(pro)5 b(ject)34 + b(and)f(has)g(b)s(een)199 2955 y(used)i(for)g(an)g(amazing)i(v)-5 + b(ariet)m(y)37 b(of)e(researc)m(h)h(pro)5 b(jects.)57 + b(It)35 b(is)h(built)f(around)f(a)i(source-to-source)h(translator)199 + 3137 y(whic)m(h)28 b(uses)g(a)h(v)m(ery-high-lev)m(el)i(AST)d(represen) + m(tation.)41 b(SUIF)28 b(has)g(b)s(een)g(used)f(for)h(p)s(o)m(w)m + (erful)g(in)m(terpro)s(cedural)199 3320 y(and)i(pro\014le)g(driv)m(en)g + (transformations.)340 3503 y(The)d(primary)g(dra)m(wbac)m(k)h(to)g(the) + f(SUIF)h(system)f(is)h(that)g(it)g(is)f(v)m(ery)h(slo)m(w,)h(b)s + (ecause)e(of)h(a)g(v)m(ery)f(general)i(but)199 3685 y(also)h(v)m(ery)g + (large)g(AST)f(represen)m(tation.)41 b(An)29 b(additional)h(problem)f + (of)g(using)g(an)g(AST)f(represen)m(tation)i(is)g(that)199 + 3868 y(new)i(fron)m(t-ends)f(cannot)i(b)s(e)e(added)g(without)h(adding) + g(new)f(no)s(de)h(t)m(yp)s(es)g(to)g(the)h(AST.)e(Extending)h(the)g + (AST)199 4051 y(requires)f(existing)h(mo)s(dules)e(b)s(e)g(up)s(dated)g + (to)i(w)m(ork)f(with)g(the)g(extensions,)h(whic)m(h)f(mak)m(es)g(it)h + (di\016cult)f(to)h(add)199 4233 y(new)g(features,)i(and)e(di\016cult)h + (to)g(supp)s(ort)e(older)i(co)s(de.)48 b(F)-8 b(or)33 + b(this)g(reason,)h(man)m(y)e(imp)s(ortan)m(t)h(features)g(\(suc)m(h)199 + 4416 y(as)e(exceptions\))h(are)e(still)i(not)e(supp)s(orted)f(in)h(the) + g(o\016cial)i(SUIF)e(distributions.)340 4599 y(The)45 + b(SGI)g(Op)s(en64)g(compiler)h([37)q(])g(is)f(an)g(outgro)m(wth)h(of)g + (SGI's)f(high-qualit)m(y)i(commercial)g(compiler)199 + 4782 y(pro)5 b(jects.)49 b(As)33 b(suc)m(h,)g(it)g(is)g(an)g + (industrial)f(strength)h(compiler,)h(with)f(man)m(y)g(robust)f + (compiler)h(optimizations)199 4964 y(built)39 b(in,)h(including)e(in)m + (terpro)s(cedural)g(and)g(pro\014le)g(driv)m(en)g(transformations.)66 + b(The)38 b(compiler)h(uses)f(an)g(in-)199 5147 y(termediate)f(represen) + m(tation)f(named)f(WHIRL)g(whic)m(h)g(represen)m(ts)g(co)s(de)h(in)f + (\014v)m(e)g(di\013eren)m(t)h(lev)m(els)g(\(language)199 + 5330 y(sp)s(eci\014c)29 b(through)g(mac)m(hine)h(sp)s(eci\014c\),)f + (using)g(a)h(con)m(tin)m(uous)g(lo)m(w)m(ering)g(system)g(to)g + (transform)e(from)h(language)2104 5568 y(52)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 5 11 bop 199 91 a Fw(Finally)-8 b(,)34 b(the)e(fourth)f(and)g(\014fth)g + (stages)i(recompile)g(the)e(program)h(\(often)g(from)g(source\))g(and)f + (relink)h(it,)h(using)199 274 y(the)e(collected)i(pro\014le)d + (information)g(to)h(optimize)h(the)f(program.)340 457 + y(While)d(pro\014le-driv)m(en)f(optimization)h(is)f(an)g(imp)s(ortan)m + (t)g(to)s(ol)h(that)f(can)g(ha)m(v)m(e)h(a)f(large)h(impact)g(on)f(the) + g(\014nal)199 639 y(execution)22 b(p)s(erformance)e(of)h(the)g + (application,)j(this)d(approac)m(h)g(has)g(man)m(y)f(sub)s(optimal)g + (features.)38 b(First,)24 b(pro\014le)199 822 y(information)30 + b(is)f(only)h(useful)e(if)h(it)h(is)f(accurate)i([39)q(,)f(11)q(].)40 + b(Realistic)32 b(programs)d(\(as)g(opp)s(osed)g(to)h(b)s(enc)m + (hmarks\))199 1005 y(often)38 b(ha)m(v)m(e)h(man)m(y)f(di\013eren)m(t)g + (w)m(a)m(ys)h(to)f(use)g(the)g(application,)j(and)c(the)h(usage)g + (pattern)g(of)g(the)g(dev)m(elop)s(er's)199 1187 y(pro\014le)d(runs)e + (ma)m(y)i(not)g(matc)m(h)h(the)f(usage)g(pattern)g(of)g(a)h(particular) + f(user.)53 b(Because)36 b(of)f(this,)h(static)h(pro\014le)199 + 1370 y(information)k(ma)m(y)g(actually)g(b)s(e)f(coun)m(ter-pro)s + (ductiv)m(e:)61 b(optimizations)42 b(based)e(on)g(it)h(ma)m(y)f(slo)m + (w)h(do)m(wn)f(the)199 1553 y(cases)32 b(the)e(user)g(is)g(actually)i + (encoun)m(tering.)340 1736 y(The)d(larger)g(problem,)g(ho)m(w)m(ev)m + (er,)i(is)e(that)g(dev)m(elop)s(ers)g(are)h(often)f(not)g(ev)m(en)h + (willing)f(to)h(use)e(pro\014le)h(guided)199 1918 y(optimization)37 + b(at)f(all)g(b)s(ecause)g(it)f(is)g(to)s(o)h(cum)m(b)s(ersome)f([11)q + (].)56 b(In)34 b(order)h(to)h(use)e(this)i(tec)m(hnique,)h(dev)m(elop)s + (ers)199 2101 y(m)m(ust)i(mo)s(dify)f(build)f(pro)s(cesses)i(and)f + (testing)i(cycles)g(to)f(accoun)m(t)h(for)f(the)g(new)f(\014v)m(e)h + (step)g(pro)s(cess.)65 b(If)38 b(the)199 2284 y(application)d(is)f(not) + g(easily)h(scriptable)f(\(b)s(ecause)g(it)g(is)g(graphical,)i(for)d + (example\),)j(man)m(ually)e(exercising)h(the)199 2466 + y(program)30 b(to)i(build)d(pro\014le)h(information)h(is)f(ev)m(en)h + (more)g(error)f(prone)f(and)h(exp)s(ensiv)m(e.)199 2845 + y Fm(1.2)136 b(Multi-stage)46 b(Optimization)g(with)g(LL)-15 + b(VM)199 3118 y Fw(The)32 b(LL)-10 b(VM)31 b(system)h(arc)m(hitecture)i + (\(describ)s(ed)d(in)g(Chapter)h(2\))g(is)g(designed)g(to)g(address)f + (these)h(problems)f(in)199 3300 y(traditional)e(systems.)40 + b(Brie\015y)-8 b(,)29 b(the)f(static)h(compilers)f(in)g(the)f(LL)-10 + b(VM)28 b(system)g(compile)h(source)e(co)s(de)h(do)m(wn)f(to)199 + 3483 y(a)f(lo)m(w-lev)m(el)i(represen)m(tation)e(that)g(includes)f + (high-lev)m(el)h(t)m(yp)s(e)g(information:)38 b(The)25 + b(LL)-10 b(VM)25 b(Virtual)h(Instruction)199 3666 y(Set)k(\(describ)s + (ed)f(in)h(Chapter)f(3\).)42 b(This)29 b(allo)m(ws)i(the)f(static)h + (compiler)g(to)f(p)s(erform)f(substan)m(tial)h(optimizations)199 + 3849 y(at)h(compile)h(time,)f(while)f(still)i(comm)m(unicating)g + (high-lev)m(el)g(information)e(to)h(the)g(link)m(er.)340 + 4031 y(A)m(t)h(link)e(time,)h(the)g(program)f(is)h(com)m(bined)f(in)m + (to)i(a)f(single)g(unit)f(of)g(LL)-10 b(VM)31 b(virtual)f(instruction)h + (set)g(co)s(de,)199 4214 y(and)40 b(is)h(in)m(terpro)s(cedurally)f + (optimized)h(\(sev)m(eral)h(examples)f(of)g(high-lev)m(el)h(in)m + (terpro)s(cedural)e(optimizations)199 4397 y(are)e(included)f(in)h + (Chapter)f(4\).)64 b(Once)37 b(the)h(program)g(has)f(b)s(een)h + (completely)h(optimized,)i(mac)m(hine)d(co)s(de)g(is)199 + 4579 y(generated)30 b(and)d(a)i(nativ)m(e)h(executable)g(is)e(pro)s + (duced.)38 b(This)28 b(executable)i(is)e(nativ)m(e)i(mac)m(hine)f(co)s + (de,)g(but)e(it)i(also)199 4762 y(includes)h(a)h(cop)m(y)g(of)g(the)f + (program's)g(LL)-10 b(VM)31 b(b)m(yteco)s(de)g(for)f(later)i(stages)f + (of)g(optimization.)340 4945 y(The)23 b(LL)-10 b(VM)23 + b(run-time)f(optimizer)i(simply)f(monitors)g(the)g(execution)h(of)f + (the)h(running)d(program,)j(gathering)199 5127 y(pro\014le)d + (information.)38 b(When)20 b(the)h(run-time)g(optimizer)g(determines)g + (that)h(it)f(can)g(impro)m(v)m(e)h(the)f(p)s(erformance)f(of)199 + 5310 y(the)28 b(program)e(through)h(a)g(transformation,)i(it)e(ma)m(y)h + (do)f(so)h(through)e(t)m(w)m(o)i(routes:)40 b(either)27 + b(direct)h(mo)s(di\014cation)2127 5568 y(5)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (11) 12 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 6 12 bop 199 91 a Fw(of)29 b(the)g(already)g(optimized)h(mac)m(hine)f + (co)s(de)g(or)g(new)f(co)s(de)h(generation)h(from)f(the)g(attac)m(hed)h + (LL)-10 b(VM)29 b(b)m(yteco)s(de.)199 274 y(In)h(either)g(case,)i(the)e + (LL)-10 b(VM)30 b(b)m(yteco)s(de)h(pro)m(vides)f(imp)s(ortan)m(t)g + (high-lev)m(el)i(con)m(trol)g(\015o)m(w,)e(data)h(\015o)m(w,)g(and)e(t) + m(yp)s(e)199 457 y(information)i(that)g(is)f(useful)g(for)g(aggressiv)m + (e)j(run-time)d(optimizations.)340 639 y(Some)24 b(transformations)f + (are)h(to)s(o)g(exp)s(ensiv)m(e)f(to)h(p)s(erform)e(at)i(run-time,)h + (ev)m(en)f(giv)m(en)g(an)f(e\016cien)m(t)i(represen-)199 + 822 y(tation)j(to)g(w)m(ork)f(with.)39 b(F)-8 b(or)28 + b(these)f(transformations,)h(the)f(run-time)f(optimizer)i(gathers)f + (pro\014le)g(information,)199 1005 y(serializing)35 b(it)e(to)h(disk.) + 48 b(When)33 b(idle)g(time)h(is)f(detected)h(on)f(the)g(user's)f + (computer,)i(an)f(o\017ine)g(reoptimizer)h(is)199 1187 + y(used)26 b(to)i(p)s(erform)d(the)i(most)h(aggressiv)m(e)h + (pro\014le-driv)m(en)d(optimizations)j(to)e(the)h(application.)40 + b(The)27 b(o\017ine)g(op-)199 1370 y(timizer)f(is)f(equiv)-5 + b(alen)m(t)27 b(in)d(p)s(o)m(w)m(er)h(to)h(the)f(link-time)h + (optimizer.)40 b(The)25 b(di\013erence)g(is)g(that)h(the)f(o\017ine)g + (optimizer)199 1553 y(uses)31 b(pro\014le)f Fs(and)i + Fw(in)m(terpro)s(cedural)e(analysis)h(information)g(to)h(impro)m(v)m(e) + f(the)g(program,)g(where)f(the)h(link-time)199 1736 y(optimizer)h(m)m + (ust)e(do)g(without)g(pro\014le)g(information.)340 1918 + y(Note)39 b(that)g(this)e(system)h(collects)i(pro\014le)e(information)g + Fn(in)43 b(the)g(\014eld)p Fw(,)d(whic)m(h)d(pro)m(vides)h(the)g(most)g + (ac-)199 2101 y(curate)d(information)g(p)s(ossible,)g(and)f(do)s(es)g + (not)h(in)m(terfere)g(with)f(the)g(dev)m(elopmen)m(t)i(pro)s(cess)e(at) + h(all.)54 b(The)33 b(use)199 2284 y(of)38 b(the)f(LL)-10 + b(VM)37 b(virtual)h(instruction)f(set)h(allo)m(ws)h(w)m(ork)e(to)h(b)s + (e)f(o\017oaded)h(from)f(link-time)h(to)g(compile-time,)199 + 2466 y(sp)s(eeding)30 b(up)g(incremen)m(tal)h(recompilations.)43 + b(Also,)32 b(b)s(ecause)e(all)h(of)g(the)g(comp)s(onen)m(ts)f(op)s + (erate)i(on)e(the)h(same)199 2649 y(represen)m(tation,)h(they)e(can)h + (share)f(implemen)m(tations)i(of)f(transformations.)199 + 3028 y Fm(1.3)136 b(Researc)l(h)46 b(Con)l(tributions)g(of)f(this)g + (Thesis)199 3300 y Fw(The)36 b(\014rst)f(main)h(con)m(tribution)g(of)g + (this)g(thesis)g(is)g(to)h(sho)m(w)f(that)g Fs(aggr)-5 + b(essive)38 b(interpr)-5 b(o)g(c)g(e)g(dur)g(al)42 b(analyses)d(and)199 + 3483 y(tr)-5 b(ansformations)28 b Fw(ma)m(y)d(b)s(e)f(p)s(erformed)f + (on)h(a)h Fs(low-level)i(r)-5 b(epr)g(esentation)p Fw(,)29 + b(pro)m(vided)24 b(that)g(it)h(has)f Fs(high-level)j(typ)-5 + b(e)199 3666 y(information)p Fw(.)340 3849 y(The)39 b(second)g(main)g + (con)m(tribution)h(of)f(this)h(thesis)f(is)g(to)h(sho)m(w)f(ho)m(w)g + (the)h(lo)m(w-lev)m(el)i(represen)m(tation)e(can)199 + 4031 y(b)s(e)e(used)f(to)i(build)e(a)i(compiler)f(system)h(whic)m(h)e + (includes)h(sophisticated)h(optimizations,)j(while)d(still)g(b)s(eing) + 199 4214 y(practical)32 b(to)f(use.)41 b(Sp)s(eci\014cally)-8 + b(,)31 b(this)f(system:)336 4496 y Fv(\017)46 b Fw(...)67 + b(\014ts)39 b(in)m(to)h(the)f(standard)g(build)f(mo)s(del,)j(op)s + (erating)f(as)f(a)h(drop-in)e(replacemen)m(t)i(for)f(pre-existing)427 + 4679 y(to)s(ols.)336 4936 y Fv(\017)46 b Fw(...)39 b(supp)s(orts)24 + b(sophisticated)k(in)m(terpro)s(cedural)d(analyses)i(and)e + (transformations)i(at)g(b)s(oth)e(p)s(ost-link)h(and)427 + 5119 y(link-time)31 b(\(with)f(and)g(without)g(pro\014le)g + (information,)h(resp)s(ectiv)m(ely\).)2127 5568 y(6)p + eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 51 57 bop 199 91 a Fw(reduced)32 b(b)s(efore)g(link)h(time.)48 + b(In)31 b(the)i(case)h(of)f(these)g(b)s(enc)m(hmarks,)f(the)h(static)h + (optimizer)f(reduces)f(the)h(input)199 274 y(to)e(the)g(link)m(er)g(b)m + (y)f(2.67x,)i(3.94x,)g(and)e(3.60x)i(resp)s(ectiv)m(ely)-8 + b(.)199 653 y Fm(5.4)136 b(Ev)-7 b(aluation)46 b(Summary)199 + 926 y Fw(Clearly)-8 b(,)37 b(LL)-10 b(VM)35 b(has)g(progressed)f(a)i + (long)f(w)m(a)m(y)h(in)f(the)g(\014rst)f(t)m(w)m(o)i(y)m(ears)g(of)f + (its)g(dev)m(elopmen)m(t.)55 b(As)35 b(LL)-10 b(VM)35 + b(is)199 1108 y(b)s(ecoming)h(a)h(commercial)h(grade)e(researc)m(h)h + (compiler,)h(it)e(is)g(an)g(increasingly)h(attractiv)m(e)i(for)d(new)g + (researc)m(h)199 1291 y(and)e(dev)m(elopmen)m(t.)54 b(As)34 + b(dev)m(elopmen)m(t)i(con)m(tin)m(ues,)g(w)m(e)f(exp)s(ect)g(LL)-10 + b(VM)34 b(to)h(con)m(tin)m(ue)h(to)f(gro)m(w,)h(gaining)f(new)199 + 1474 y(capabilities)e(and)c(p)s(ossibilities.)2104 5568 + y(51)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (12) 13 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 50 56 bop 934 3 2430 4 v 932 116 4 113 v 984 82 a Fn(T)-9 + b(ransformation)p 1735 116 V 100 w(#)35 b(Changes)p 2340 + 116 V 217 w(Time)p 2794 116 V 100 w(Time/Inst)p 3362 + 116 V 934 120 2430 4 v 932 232 4 113 v 1203 199 a Fw(ADCE)p + 1735 232 V 389 w(3843/229)p 2340 232 V 220 w(1.42)d(sec)p + 2794 232 V 160 w(4.112)h Ff(\026)p Fw(sec)p 3362 232 + V 932 345 V 1211 311 a(GCSE)p 1735 345 V 465 w(90105)p + 2340 345 V 241 w(24.06)f(sec)p 2794 345 V 115 w(69.673)h + Ff(\026)p Fw(sec)p 3362 345 V 932 458 V 1216 424 a(LICM)p + 1735 458 V 471 w(55798)p 2340 458 V 286 w(0.90)f(sec)p + 2794 458 V 160 w(2.606)h Ff(\026)p Fw(sec)p 3362 458 + V 932 571 V 1214 537 a(SCCP)p 1735 571 V 467 w(57337)p + 2340 571 V 286 w(6.85)f(sec)p 2794 571 V 115 w(19.836)h + Ff(\026)p Fw(sec)p 3362 571 V 934 575 2430 4 v 643 729 + a(T)-8 b(able)31 b(5.4:)42 b(P)m(erformance)31 b(of)g(sev)m(eral)h + (optimizations)g(on)e(the)h Fr(254.gap)d Fw(b)s(enc)m(hmark)199 + 1007 y(C)33 b(fron)m(t-end)f(do)s(es)h(v)m(ery)g(little)i(optimization) + f(b)m(y)f(itself)h(\(relying)f(on)g(the)g(static)h(optimizer)g(to)f + (clean)h(up)e(the)199 1189 y(co)s(de\),)f(so)g(the)g(input)e(co)s(de)i + (is)f(almost)i(completely)g(unoptimized.)340 1372 y(F)-8 + b(rom)42 b(the)f(results)f(in)g(T)-8 b(able)42 b(5.4,)i(w)m(e)e(see)f + (that)g(the)g(infrastructure)f(is)h(quite)g(e\016cien)m(t)h(and)e + (e\013ectiv)m(e.)199 1555 y(Despite)35 b(the)g(fact)g(that)f(the)h + (input)e(is)h(v)m(ery)g(large,)i(eac)m(h)g(pass)d(p)s(erforms)g(quite)h + (w)m(ell)h(due)f(to)g(a)h(clean)g(imple-)199 1737 y(men)m(tation)27 + b(and)d(a)h(sparse)g(SSA)f(based)h(approac)m(h.)39 b(Additionally)-8 + b(,)28 b(all)e(four)e(optimizations)j(are)e(quite)h(e\013ectiv)m(e)199 + 1920 y(at)37 b(deleting)g(instructions.)59 b(GCSE,)35 + b(LICM,)h(and)g(SCCP)f(are)h(able)h(to)g(delete)g(tens)g(of)f + (thousands)f(of)i(static)199 2103 y(instructions)f(from)g(the)g + (program)g(as)h(they)f(run.)56 b(ADCE)37 b(is)f(able)h(to)f(delete)i + (3843)g(individual)d(instructions)199 2285 y(and)27 b(229)j(basic)e + (blo)s(c)m(ks)g(w)m(orth)g(of)g(instructions)f(as)h(it)h(runs)d(\(ev)m + (en)j(though)e(the)h(C)f(fron)m(t-end)h(do)s(es)g(not)g(output)199 + 2468 y(an)m(ything)j(trivially)h(dead\).)p 468 2594 3363 + 4 v 466 2707 4 113 v 518 2673 a Fn(Benc)m(hmark)p 1084 + 2707 V 1101 2707 V 296 w(ADCE)p 1861 2707 V 1878 2707 + V 437 w(GCSE)p 2547 2707 V 2564 2707 V 382 w(LICM)p 3188 + 2707 V 3205 2707 V 361 w(SCCP)p 3829 2707 V 468 2710 + 3363 4 v 466 2823 4 113 v 518 2789 a Fr(254.gap)p 1084 + 2823 V 1101 2823 V 298 w Fw(1.42s)p 1398 2823 V 102 w(3843/229)p + 1861 2823 V 1878 2823 V 119 w(24.06s)p 2221 2823 V 102 + w(90105)p 2547 2823 V 2564 2823 V 118 w(0.90s)p 2861 + 2823 V 102 w(55798)p 3188 2823 V 3205 2823 V 118 w(6.85s)p + 3502 2823 V 101 w(57337)p 3829 2823 V 466 2936 V 518 + 2902 a Fr(255.vortex)p 1084 2936 V 1101 2936 V 154 w + Fw(1.39s)p 1398 2936 V 147 w(125/91)p 1861 2936 V 1878 + 2936 V 164 w(18.75s)p 2221 2936 V 102 w(65532)p 2547 + 2936 V 2564 2936 V 118 w(1.23s)p 2861 2936 V 102 w(16053)p + 3188 2936 V 3205 2936 V 118 w(6.91s)p 3502 2936 V 101 + w(52884)p 3829 2936 V 466 3049 V 518 3015 a Fr(300.twolf)p + 1084 3049 V 1101 3049 V 248 w Fw(.26s)p 1398 3049 V 146 + w(161/98)p 1861 3049 V 1878 3049 V 210 w(2.45s)p 2221 + 3049 V 101 w(52002)p 2547 3049 V 2564 3049 V 164 w(.56s)p + 2861 3049 V 101 w(62993)p 3188 3049 V 3205 3049 V 164 + w(.83s)p 3502 3049 V 100 w(20663)p 3829 3049 V 468 3052 + 3363 4 v 252 3206 a(T)-8 b(able)31 b(5.5:)42 b(T)-8 b(ransformation)30 + b(timing)h(and)f(e\013ectiv)m(eness)i(results)e(for)h(large)g + (SPECINT2000)g(b)s(enc)m(hmarks)340 3484 y(T)-8 b(able)42 + b(5.5)g(con)m(tains)g(data)g(for)f(all)h(three)f(large)h(SPEC)e(b)s + (enc)m(hmarks.)72 b(F)-8 b(rom)41 b(this)g(table,)k(w)m(e)c(can)h(see) + 199 3666 y(that)h(the)g Fr(254.gap)e Fw(and)h Fr(255.vortex)d + Fw(b)s(enc)m(hmarks)j(are)h(similar)g(with)f(resp)s(ect)h(to)g + (optimization)h(times,)199 3849 y(but)d(the)g Fr(300.twolf)e + Fw(b)s(enc)m(hmark)h(is)h(m)m(uc)m(h)h(faster.)73 b(W)-8 + b(e)43 b(b)s(eliev)m(e)f Fr(300.twolf)d Fw(is)i(optimized)h(m)m(uc)m(h) + f(more)199 4032 y(quic)m(kly)35 b(b)s(ecause)e(the)h(program)g + (represen)m(tation)h(and)e(in)m(termediate)i(data)f(structures)g(for)f + (transformations)199 4214 y(\014t)27 b(comfortably)i(in)m(to)f(the)g + (cac)m(he)g(of)g(the)g(pro)s(cessor,)f(whereas)h(the)f(larger)h(b)s + (enc)m(hmarks)e(su\013er)h(from)g(capacit)m(y)199 4397 + y(misses.)56 b(These)35 b(transformations)h(ha)m(v)m(e)g(not)g(b)s(een) + f(optimized)h(in)f(particular,)i(so)f(their)f(cac)m(he)i(usage)f(could) + 199 4580 y(probably)30 b(b)s(e)g(impro)m(v)m(ed)g(b)m(y)h(a)f + (signi\014can)m(t)i(margin.)340 4763 y(One)c(thing)f(that)h(is)g(imp)s + (ortan)m(t)g(to)g(note)h(is)e(that)i(this)e(test)i(is)e(designed)h(as)g + (a)g Fs(str)-5 b(ess)31 b(test)p Fw(,)e(not)f(as)g(a)g(t)m(ypical)199 + 4945 y(application)43 b(of)e(one)h(of)f(these)h(optimizations.)75 + b(In)40 b(practice,)46 b(previous)41 b(optimizations)i(will)e(ha)m(v)m + (e)i(greatly)199 5128 y(reduced)26 b(the)g(size)i(of)e(the)h(program)f + (b)s(efore)g(the)g(passes)h(execute.)40 b(Because)28 + b(the)f(static)h(optimizer)f(w)m(ould)f(ha)m(v)m(e)199 + 5311 y(b)s(een)36 b(run)f(on)i(eac)m(h)g(of)g(the)g(translation)g + (units)f(as)h(they)g(are)g(compiled,)h(the)f(resulting)g(program)f(is)h + (greatly)2104 5568 y(50)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 7 13 bop 336 91 a Fv(\017)46 b Fw(...)39 b(enables)25 + b(no)m(v)m(el)i(strategies)f(for)f(run-time)g(optimization)h(whic)m(h)f + (can)g(op)s(erate)h(on)f(mac)m(hine)g(co)s(de)g(with)427 + 274 y(the)30 b(adv)-5 b(an)m(tage)32 b(of)f(ha)m(ving)g(high-lev)m(el)h + (information)f(a)m(v)-5 b(ailable.)336 531 y Fv(\017)46 + b Fw(...)40 b(collects)30 b(pro\014le)d(information)h(and)f + (reoptimizes)i(the)f(program)f Fs(in)j(the)g(\014eld)p + Fw(,)f(allo)m(wing)h(for)d(the)h(most)427 714 y(accurate)j(pro\014le)f + (information)h(and,)f(consequen)m(tly)-8 b(,)32 b(the)f(highest)f(p)s + (erformance)g(applications.)340 996 y(The)f(third)f(main)h(con)m + (tribution)h(of)f(this)g(thesis)g(is)g(an)g(implemen)m(tation)i(of)e + (this)g(design.)40 b(This)28 b(implemen-)199 1179 y(tation,)40 + b(the)d(LL)-10 b(VM)36 b(Compiler)g(Infrastructure,)i(is)e(a)h(solid)g + (infrastructure)e(whic)m(h)i(is)f(hosting)h(a)g(v)-5 + b(ariet)m(y)38 b(of)199 1362 y(curren)m(t)c(researc)m(h)g(\(see)h + (Chapter)e(4\).)51 b(Of)33 b(particular)h(note)h(is)e(the)h(fact)h + (that)f(LL)-10 b(VM)34 b(has)f(successfully)h(b)s(een)199 + 1544 y(used)g(as)h(the)f(host)h(infrastructure)f(for)g(an)g(adv)-5 + b(anced)35 b(compilers)g(class)g(\(Section)h(4.4.3\).)55 + b(Studen)m(ts)34 b(tend)g(to)199 1727 y(b)s(e)c(m)m(uc)m(h)h(less)g + (forgiving)g(than)g(researc)m(hers)g(ab)s(out)g(a)g(p)s(o)s(or)e + (design,)i(lac)m(k)h(of)f(do)s(cumen)m(tation,)h(buggy)f(imple-)199 + 1910 y(men)m(tation,)37 b(or)d(p)s(o)s(or)f(extensibilit)m(y)-8 + b(,)37 b(so)d(this)g(demonstrates)g(a)g(great)i(deal)e(of)g(maturit)m + (y)-8 b(.)53 b(In)33 b(time,)i(w)m(e)g(hop)s(e)199 2093 + y(to)c(b)s(e)f(able)h(to)g(mak)m(e)h(LL)-10 b(VM)30 b(a)m(v)-5 + b(ailable)33 b(to)e(researc)m(hers)g(outside)f(of)h(the)f(Univ)m(ersit) + m(y)i(of)e(Illinois.)199 2471 y Fm(1.4)136 b(Organization)46 + b(of)f(this)g(Thesis)199 2744 y Fw(In)28 b(order)g(to)h(fully)f + (understand)f(the)h(design)g(of)h(the)g(LL)-10 b(VM)28 + b(System)g(Arc)m(hitecture,)j(Chapter)c(2)i(discusses)f(the)199 + 2927 y(to)s(ols)d(and)e(ho)m(w)h(they)g(w)m(ork)g(together.)40 + b(Chapter)23 b(3)h(describ)s(es)f(the)h(features)g(of)g(the)g(LL)-10 + b(VM)24 b(virtual)g(instruction)199 3109 y(set)38 b(whic)m(h)f(mak)m(e) + h(it)f(suitable)h(for)e(use)h(as)g(the)h(common)f(program)g(represen)m + (tation)h(in)f(the)g(LL)-10 b(VM)37 b(system.)199 3292 + y(Chapter)24 b(4)h(describ)s(es)e(some)i(applications)h(of)e(the)h(LL) + -10 b(VM)24 b(system,)i(sho)m(wing)e(that)h(a)g(lo)m(w-lev)m(el)i + (represen)m(tation)199 3475 y(can)41 b(successfully)g(host)g(a)h(v)-5 + b(ariet)m(y)42 b(of)f(aggressiv)m(e)i(analyses)e(and)g + (transformations,)j(if)d(accompanied)g(with)199 3657 + y(t)m(yp)s(e)f(information.)69 b(Chapter)40 b(5)g(ev)-5 + b(aluates)41 b(the)f(LL)-10 b(VM)40 b(compiler)g(infrastructure)f(in)g + (terms)h(of)g(maturit)m(y)-8 b(,)199 3840 y(pro)s(ductivit)m(y)g(,)28 + b(and)d(p)s(erformance.)39 b(Chapter)26 b(6)g(brie\015y)f(describ)s(es) + h(related)h(w)m(ork)f(in)g(the)g(\014eld,)h(and)e(Chapter)h(7)199 + 4023 y(concludes)31 b(the)f(w)m(ork.)2127 5568 y(7)p + eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (13) 14 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 8 14 bop 484 346 a Fo(2)940 244 y Ft(LL)-26 b(VM)78 b(System)f(Arc)-6 + b(hitecture)199 842 y Fw(The)32 b(LL)-10 b(VM)32 b(system)g(is)g + (designed)g(around)f(a)h(m)m(ulti-stage)j(approac)m(h)d(to)h + (compilation,)h(as)e(brie\015y)f(describ)s(ed)199 1024 + y(in)g(Section)h(1.2.)43 b(This)31 b(c)m(hapter)g(con)m(tin)m(ues)h + (the)g(discussion,)e(describing)h(the)g(individual)g(comp)s(onen)m(ts)g + (of)g(the)199 1207 y(LL)-10 b(VM)34 b(system)g(design)g(and)f(their)h + (in)m(terfaces.)53 b(This)33 b(compilation)i(strategy)h(is)e(unique)f + (in)g(the)h(fact)h(that)g(it)199 1390 y(allo)m(ws)28 + b(aggressiv)m(e)g(optimization)h(throughout)d(the)g(lifetime)i(of)e + (the)h(application)h(while)e(remaining)g(practical.)199 + 1768 y Fm(2.1)136 b(The)44 b(High-Lev)l(el)i(Design)g(of)f(an)g(LL)-15 + b(VM)44 b(Based)h(Compiler)199 2040 y Fw(Compared)36 + b(with)g(curren)m(t)h(compilation)h(systems,)g(the)f(LL)-10 + b(VM)36 b(system)h(is)f(designed)h(to)g(p)s(erform)e(more)i(so-)199 + 2223 y(phisticated)e(transformations)e(at)h(link-time,)i(run-time,)e + (and)f(after)h(the)g(soft)m(w)m(are)h(is)e(installed)h(in)g(the)f + (\014eld.)199 2406 y(In)27 b(order)g(to)h(b)s(e)f(realistically)j + (deplo)m(y)m(able,)g(ho)m(w)m(ev)m(er,)g(the)d(LL)-10 + b(VM)28 b(compiler)g(m)m(ust)f(in)m(tegrate)j(w)m(ell)e(with)f(exist-) + 199 2588 y(ing)34 b(build)f(sc)m(hemes,)j(and)d(it)i(m)m(ust)e(b)s(e)h + (e\016cien)m(t)h(enough)f(to)h(b)s(e)e(used)g(in)h(common)g(scenarios.) + 52 b(This)33 b(section)199 2771 y(describ)s(es)27 b(the)h(o)m(v)m + (erall)i(approac)m(h)e(to)h(compilation,)h(explaining)e(ho)m(w)g(these) + g(requiremen)m(ts)g(are)g(addressed.)39 b(A)199 2954 + y(diagram)31 b(of)g(the)f(o)m(v)m(erall)j(LL)-10 b(VM)30 + b(system)h(is)f(sho)m(wn)g(in)g(Figure)h(2.1.)349 3767 + y @beginspecial 0 @llx 0 @lly 1428 @urx 277 @ury 4320 + @rwi @setspecial + %%BeginDocument: figs/LLVMDiagramHighLevel.eps + %!PS-Adobe-2.0 EPSF-2.0 + %%Title: LLVMDiagramHighLevel.dia + %%Creator: Dia v0.90 + %%CreationDate: Fri Dec 6 16:34:26 2002 + %%For: lattner + %%Magnification: 1.0000 + %%Orientation: Portrait + %%BoundingBox: 0 0 1428 277 + %%Pages: 1 + %%EndComments + %%BeginProlog + /cp {closepath} bind def + /c {curveto} bind def + /f {fill} bind def + /a {arc} bind def + /ef {eofill} bind def + /ex {exch} bind def + /gr {grestore} bind def + /gs {gsave} bind def + /sa {save} bind def + /rs {restore} bind def + /l {lineto} bind def + /m {moveto} bind def + /rm {rmoveto} bind def + /n {newpath} bind def + /s {stroke} bind def + /sh {show} bind def + /slc {setlinecap} bind def + /slj {setlinejoin} bind def + /slw {setlinewidth} bind def + /srgb {setrgbcolor} bind def + /rot {rotate} bind def + /sc {scale} bind def + /sd {setdash} bind def + /ff {findfont} bind def + /sf {setfont} bind def + /scf {scalefont} bind def + /sw {stringwidth pop} bind def + /tr {translate} bind def + + /ellipsedict 8 dict def + ellipsedict /mtrx matrix put + /ellipse + { ellipsedict begin + /endangle exch def + /startangle exch def + /yrad exch def + /xrad exch def + /y exch def + /x exch def /savematrix mtrx currentmatrix def + x y tr xrad yrad sc + 0 0 1 startangle endangle arc + savematrix setmatrix + end + } def + + /mergeprocs { + dup length + 3 -1 roll + dup + length + dup + 5 1 roll + 3 -1 roll + add + array cvx + dup + 3 -1 roll + 0 exch + putinterval + dup + 4 2 roll + putinterval + } bind def + %%EndProlog + + %%BeginSetup + %%EndSetup + 28.346000 -28.346000 scale + 1.059400 -23.550000 translate + + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + 0 slj + 0 slc + 0 slj + [] 0 sd + 1.000000 1.000000 1.000000 srgb + n 16.900000 15.300000 m 20.727110 15.300000 l 20.727110 17.228529 l 19.961688 16.907107 19.578977 16.907107 18.813555 17.228529 c 18.048133 17.549950 17.665422 17.549950 16.900000 17.228529 c 16.900000 15.300000 l f + 0.000000 0.000000 0.000000 srgb + n 16.900000 15.300000 m 20.727110 15.300000 l 20.727110 17.228529 l 19.961688 16.907107 19.578977 16.907107 18.813555 17.228529 c 18.048133 17.549950 17.665422 17.549950 16.900000 17.228529 c 16.900000 15.300000 l s + [ /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /space /O /p /t /i /m /z /n /xi /xi /g /L /k /e /r /period + /R /u /d /C /o /P /f /l /ampersand /T /a /c /I /V /M /N + /v /b /s /H /h /S /one /x /parenleft /plus /parenright /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi /xi + ] /e0 exch def + /Courier_e0 undefinefont + /Courier_e0 + /Courier findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding e0 def + currentdict end + definefont pop + /Courier_e0 ff 0.800000 scf sf + ( ) sw + 2 div 18.813555 ex sub 16.298244 m ( ) + gs 1 -1 sc sh gr + 1.000000 1.000000 1.000000 srgb + n 16.800000 19.300000 m 16.800000 20.900000 l 26.700000 20.900000 l 26.700000 19.300000 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slj + 0.000000 0.000000 0.000000 srgb + n 16.800000 19.300000 m 16.800000 20.900000 l 26.700000 20.900000 l 26.700000 19.300000 l cp s + /Times-Roman_e0 undefinefont + /Times-Roman_e0 + /Times-Roman findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding e0 def + currentdict end + definefont pop + /Times-Roman_e0 ff 1.200000 scf sf + (!"#$%$&$'* +$',-.) sw + 2 div 21.600000 ex sub 20.500000 m (!"#$%$&$'* +$',-.) + gs 1 -1 sc sh gr + /Times-Bold_e0 undefinefont + /Times-Bold_e0 + /Times-Bold findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding e0 def + currentdict end + definefont pop + /Times-Bold_e0 ff 1.000000 scf sf + (/) sw + 2 div 5.700000 ex sub 19.400000 m (/) + gs 1 -1 sc sh gr + (/) sw + 2 div 5.700000 ex sub 20.400000 m (/) + gs 1 -1 sc sh gr + 1.000000 1.000000 1.000000 srgb + n 34.350000 14.300000 m 34.350000 15.900000 l 44.750000 15.900000 l 44.750000 14.300000 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slj + 0.000000 0.000000 0.000000 srgb + n 34.350000 14.300000 m 34.350000 15.900000 l 44.750000 15.900000 l 44.750000 14.300000 l cp s + /Times-Roman_e0 ff 1.200000 scf sf + (01'#$%- !"#$%$&-.) sw + 2 div 39.650000 ex sub 15.500000 m (01'#$%- !"#$%$&-.) + gs 1 -1 sc sh gr + /Helvetica_e0 undefinefont + /Helvetica_e0 + /Helvetica findfont + dup length dict begin + {1 index /FID ne {def} {pop pop} ifelse} forall + /Encoding e0 def + currentdict end + definefont pop + /Helvetica_e0 ff 0.800000 scf sf + (!"#$%$&-2) sw + 2 div 43.200000 ex sub 17.100000 m (!"#$%$&-2) + gs 1 -1 sc sh gr + (342-) sw + 2 div 43.200000 ex sub 17.900000 m (342-) + gs 1 -1 sc sh gr + /Helvetica_e0 ff 0.800000 scf sf + (5.46$7-) sw + 2 div 36.400000 ex sub 16.800000 m (5.46$7-) + gs 1 -1 sc sh gr + (8 9.:;-) sw + 2 div 36.400000 ex sub 17.600000 m (8 9.:;-) + gs 1 -1 sc sh gr + (<'64) sw + 2 div 36.400000 ex sub 18.400000 m (<'64) + gs 1 -1 sc sh gr + 1.000000 1.000000 1.000000 srgb + n 34.450000 21.900000 m 34.450000 23.500000 l 44.750000 23.500000 l 44.750000 21.900000 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slj + 0.000000 0.000000 0.000000 srgb + n 34.450000 21.900000 m 34.450000 23.500000 l 44.750000 23.500000 l 44.750000 21.900000 l cp s + /Times-Roman_e0 ff 1.200000 scf sf + (!667$'- 0-4"#$%$&-.) sw + 2 div 39.650000 ex sub 23.000000 m (!667$'- 0-4"#$%$&-.) + gs 1 -1 sc sh gr + /Helvetica_e0 ff 0.800000 scf sf + (5.46$7-) sw + 2 div 47.500000 ex sub 18.950000 m (5.46$7-) + gs 1 -1 sc sh gr + (8 9.:;-) sw + 2 div 47.500000 ex sub 19.750000 m (8 9.:;-) + gs 1 -1 sc sh gr + (<'64) sw + 2 div 47.500000 ex sub 20.550000 m (<'64) + gs 1 -1 sc sh gr + /Helvetica_e0 ff 0.800000 scf sf + (++=>) sw + 2 div 11.400000 ex sub 22.600000 m (++=>) + gs 1 -1 sc sh gr + /Helvetica_e0 ff 0.800000 scf sf + (++=>) sw + 2 div 11.300000 ex sub 17.700000 m (++=>) + gs 1 -1 sc sh gr + /Times-Roman_e0 ff 1.000000 scf sf + (++=>) sw + 2 div 18.800000 ex sub 16.600000 m (++=>) + gs 1 -1 sc sh gr + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + 0 slj + 0 slc + 0 slj + [] 0 sd + 0.815686 0.815686 0.815686 srgb + n 22.500000 15.300000 m 26.327110 15.300000 l 26.327110 17.228529 l 25.561688 16.907107 25.178977 16.907107 24.413555 17.228529 c 23.648133 17.549950 23.265422 17.549950 22.500000 17.228529 c 22.500000 15.300000 l f + 0.000000 0.000000 0.000000 srgb + n 22.500000 15.300000 m 26.327110 15.300000 l 26.327110 17.228529 l 25.561688 16.907107 25.178977 16.907107 24.413555 17.228529 c 23.648133 17.549950 23.265422 17.549950 22.500000 17.228529 c 22.500000 15.300000 l s + /Courier_e0 ff 0.800000 scf sf + ( ) sw + 2 div 24.413555 ex sub 16.298244 m ( ) + gs 1 -1 sc sh gr + /Times-Roman_e0 ff 1.000000 scf sf + (?:#$@-) sw + 2 div 24.500000 ex sub 16.500000 m (?:#$@-) + gs 1 -1 sc sh gr + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 18.813600 17.228500 m 18.800000 19.300000 l s + 0 slj + n 18.405261 18.497391 m 18.800000 19.300000 l 19.205243 18.502643 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 24.413600 17.228500 m 24.400000 19.300000 l s + 0 slj + n 24.005261 18.497391 m 24.400000 19.300000 l 24.805243 18.502643 l f + /Times-Roman_e0 ff 1.500000 scf sf + (+$A.:.$-B) sw + 2 div 22.100000 ex sub 14.900000 m (+$A.:.$-B) + gs 1 -1 sc sh gr + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + 0 slj + 0 slc + 0 slj + [] 0 sd + 0.815686 0.815686 0.815686 srgb + n 35.898933 19.000000 m 43.132267 19.000000 l 44.130982 19.000000 44.940600 19.516464 44.940600 20.153555 c 44.940600 20.790646 44.130982 21.307110 43.132267 21.307110 c 35.898933 21.307110 l 34.900218 21.307110 34.090600 20.790646 34.090600 20.153555 c 34.090600 19.516464 34.900218 19.000000 35.898933 19.000000 c f + 0.000000 0.000000 0.000000 srgb + n 35.898933 19.000000 m 43.132267 19.000000 l 44.130982 19.000000 44.940600 19.516464 44.940600 20.153555 c 44.940600 20.790646 44.130982 21.307110 43.132267 21.307110 c 35.898933 21.307110 l 34.900218 21.307110 34.090600 20.790646 34.090600 20.153555 c 34.090600 19.516464 34.900218 19.000000 35.898933 19.000000 c s + /Times-Roman_e0 ff 1.500000 scf sf + ( ) sw + 2 div 39.515600 ex sub 20.518599 m ( ) + gs 1 -1 sc sh gr + /Times-Roman_e0 ff 1.300000 scf sf + (C4B# >:;D$'-) sw + 2 div 39.479900 ex sub 20.500000 m (C4B# >:;D$'-) + gs 1 -1 sc sh gr + 1.000000 1.000000 1.000000 srgb + n 1.100000 17.300000 m 1.100000 18.900000 l 10.100000 18.900000 l 10.100000 17.300000 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slj + 0.000000 0.000000 0.000000 srgb + n 1.100000 17.300000 m 1.100000 18.900000 l 10.100000 18.900000 l 10.100000 17.300000 l cp s + /Times-Roman_e0 ff 1.200000 scf sf + (E#:#$; 34%"$7-. F) sw + 2 div 5.700000 ex sub 18.400000 m (E#:#$; 34%"$7-. F) + gs 1 -1 sc sh gr + 1.000000 1.000000 1.000000 srgb + n 1.100000 20.800000 m 1.100000 22.400000 l 10.100000 22.400000 l 10.100000 20.800000 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slj + 0.000000 0.000000 0.000000 srgb + n 1.100000 20.800000 m 1.100000 22.400000 l 10.100000 22.400000 l 10.100000 20.800000 l cp s + /Times-Roman_e0 ff 1.200000 scf sf + (E#:#$; 34%"$7-. ?) sw + 2 div 5.600000 ex sub 21.900000 m (E#:#$; 34%"$7-. ?) + gs 1 -1 sc sh gr + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + 0 slj + 0 slc + 0 slj + [] 0 sd + 1.000000 1.000000 1.000000 srgb + n 11.910402 18.370946 m 11.910402 21.529034 l 15.489568 21.529034 l 15.489568 18.370946 l f + 0 slc + 0 slj + [] 0 sd + n 13.699985 21.529034 1.789583 0.526348 0 360 ellipse f + 0 slc + 0 slj + [] 0 sd + n 13.699985 18.370946 1.789583 0.526348 0 360 ellipse f + 0.000000 0.000000 0.000000 srgb + n 13.699985 18.370946 1.789583 0.526348 0 360 ellipse cp s + 0 slc + 0 slj + [] 0 sd + n 15.489568 18.370946 m 15.489568 21.529034 l 15.489568 21.819728 14.688345 22.055382 13.699985 22.055382 c 12.711625 22.055382 11.910402 21.819728 11.910402 21.529034 c 11.910402 18.370946 l s + /Helvetica_e0 ff 0.800000 scf sf + (/4 6$7-B) sw + 2 div 13.718500 ex sub 20.700000 m (/4 6$7-B) + gs 1 -1 sc sh gr + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 10.100000 18.100000 m 12.000000 19.600000 l s + 0 slj + n 11.124236 19.418238 m 12.000000 19.600000 l 11.619952 18.790331 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 10.100000 21.600000 m 12.000000 20.600000 l s + 0 slj + n 11.478364 21.326564 m 12.000000 20.600000 l 11.105767 20.618630 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 15.400000 19.900000 m 16.800000 19.900000 l s + 0 slj + n 16.000000 20.300000 m 16.800000 19.900000 l 16.000000 19.500000 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 15.400000 20.100000 m 16.800000 20.100000 l s + 0 slj + n 16.000000 20.500000 m 16.800000 20.100000 l 16.000000 19.700000 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 15.400000 20.300000 m 16.800000 20.300000 l s + 0 slj + n 16.000000 20.700000 m 16.800000 20.300000 l 16.000000 19.900000 l f + /Helvetica_e0 ff 0.800000 scf sf + (++=>) sw + 2 div 16.500000 ex sub 19.000000 m (++=>) + gs 1 -1 sc sh gr + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + 0 slj + 0 slc + 0 slj + [] 0 sd + 1.000000 1.000000 1.000000 srgb + n 28.210402 18.370946 m 28.210402 21.529034 l 31.789568 21.529034 l 31.789568 18.370946 l f + 0 slc + 0 slj + [] 0 sd + n 29.999985 21.529034 1.789583 0.526348 0 360 ellipse f + 0 slc + 0 slj + [] 0 sd + n 29.999985 18.370946 1.789583 0.526348 0 360 ellipse f + 0.000000 0.000000 0.000000 srgb + n 29.999985 18.370946 1.789583 0.526348 0 360 ellipse cp s + 0 slc + 0 slj + [] 0 sd + n 31.789568 18.370946 m 31.789568 21.529034 l 31.789568 21.819728 30.988345 22.055382 29.999985 22.055382 c 29.011625 22.055382 28.210402 21.819728 28.210402 21.529034 c 28.210402 18.370946 l s + /Helvetica_e0 ff 0.800000 scf sf + (/-G-) sw + 2 div 30.000000 ex sub 20.000000 m (/-G-) + gs 1 -1 sc sh gr + (H77@% I) sw + 2 div 30.000000 ex sub 20.800000 m (H77@% I) + gs 1 -1 sc sh gr + (':#$@-J) sw + 2 div 30.000000 ex sub 21.600000 m (':#$@-J) + gs 1 -1 sc sh gr + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 26.700000 20.100000 m 28.300000 20.100000 l s + 0 slj + n 27.500000 20.500000 m 28.300000 20.100000 l 27.500000 19.700000 l f + /Helvetica_e0 ff 0.800000 scf sf + (/-G-) sw + 2 div 27.400000 ex sub 19.100000 m (/-G-) + gs 1 -1 sc sh gr + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 31.740600 20.200000 m 34.090600 20.153600 l s + 0 slj + n 33.298652 20.569315 m 34.090600 20.153600 l 33.282860 19.769471 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 37.707300 19.000000 m 38.490600 15.850000 l s + 0 slj + n 38.685724 16.722884 m 38.490600 15.850000 l 37.909367 16.529830 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slc + n 41.040600 15.900000 m 41.323900 19.000000 l s + 0 slj + n 40.852754 18.239723 m 41.323900 19.000000 l 41.649434 18.166917 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slj + 0 slc + n 31.790600 19.400000 m 34.590600 19.400000 32.050000 16.300000 34.350000 15.100000 c s + 0 slj + n 33.825759 15.824687 m 34.350000 15.100000 l 33.455706 15.115419 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slj + 0 slc + n 31.740600 21.300000 m 34.390600 21.300000 31.440600 22.700000 34.450000 22.700000 c s + 0 slj + n 32.540600 20.900000 m 31.740600 21.300000 l 32.540600 21.700000 l f + 0 slj + n 33.650000 23.100000 m 34.450000 22.700000 l 33.650000 22.300000 l f + 0.100000 slw + [] 0 sd + [] 0 sd + 0 slj + 0 slc + n 44.940600 20.153600 m 49.040600 20.800000 46.740600 22.600000 44.750000 22.700000 c s + 0 slj + n 45.528923 22.260366 m 44.750000 22.700000 l 45.569062 23.059358 l f + showpage + + %%EndDocument + @endspecial 1208 3963 a(Figure)g(2.1:)42 b(LL)-10 b(VM)30 + b(system)h(arc)m(hitecture)h(diagram)340 4244 y(T)-8 + b(raditional)22 b(compilers)f(break)g(the)f(compilation)i(pro)s(cess)f + (in)m(to)g(t)m(w)m(o)h(steps:)36 b(compile)21 b(and)f(link.)38 + b(Separating)199 4427 y(the)d(t)m(w)m(o)g(phases)f(pro)m(vides)g(the)g + (b)s(ene\014ts)f(of)h(separate)h(compilation:)50 b(only)34 + b(the)h(translation)g(units)e(mo)s(di\014ed)199 4609 + y(need)21 b(to)g(b)s(e)f(recompiled)h(\(although)g(the)g(en)m(tire)h + (application)g(m)m(ust)e(still)i(b)s(e)e(relink)m(ed\).)38 + b(A)21 b(traditional)h(compiler)199 4792 y(compiles)30 + b(source)e(co)s(de)h(to)h(an)e(ob)5 b(ject)30 b(\014le)e(\()p + Fr(.o)p Fw(\))h(con)m(taining)h(mac)m(hine)f(co)s(de,)h(and)e(the)h + (link)m(er)g(com)m(bines)g(these)199 4975 y(ob)5 b(ject)34 + b(\014les)g(together)g(with)f(libraries)h(to)g(form)e(an)i(executable)g + (program.)50 b(In)32 b(a)i(simple)f(system,)h(the)g(link)m(er)199 + 5157 y(t)m(ypically)e(do)s(es)f(little)h(more)e(than)g(concatenate)j + (the)e(ob)5 b(ject)31 b(\014les)f(and)g(resolv)m(e)i(sym)m(b)s(ol)e + (references.)340 5340 y(The)25 b(LL)-10 b(VM)25 b(approac)m(h)g + (retains)h(the)f(distinction)h(b)s(et)m(w)m(een)f(compile)h(and)f(link) + g(time,)i(allo)m(wing)f(it)g(to)g(retain)2127 5568 y(8)p + eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 49 55 bop 199 91 a Fm(5.3)136 b(Ev)-7 b(aluating)46 b(the)f(P)l + (erformance)h(of)f(LL)-15 b(VM)44 b(Infrastructure)199 + 364 y Fw(Despite)30 b(the)g(fact)g(that)f(LL)-10 b(VM)29 + b(is)g(a)h(strong)f(researc)m(h)h(infrastructure,)e(care)i(has)f(b)s + (een)f(tak)m(en)j(to)e(ensure)g(that)199 547 y(LL)-10 + b(VM)32 b(remains)g(e\016cien)m(t.)46 b(This)31 b(is)h(imp)s(ortan)m(t) + g(for)f(clien)m(ts)j(suc)m(h)d(as)h(the)g(run)m(time)g(optimizer,)h + (but)e(is)h(also)h(a)199 729 y(reasonable)e(\\qualit)m(y)h(of)f + (implemen)m(tation")h(metric.)340 912 y(As)22 b(with)f(maturit)m(y)i + (and)e(pro)s(ductivit)m(y)-8 b(,)24 b(measuring)d(the)h(p)s(erformance) + f(of)h(an)f(infrastructure)g(itself)h(is)g(hard.)199 + 1095 y(F)-8 b(or)30 b(this)f(reason,)h(w)m(e)f(will)h(sho)m(w)f(ho)m(w) + g(sev)m(eral)h(w)m(ell)g(kno)m(wn)f(optimizations)i(are)e(e\016cien)m + (t)i(as)e(implemen)m(ted)g(in)199 1277 y(the)35 b(LL)-10 + b(VM)35 b(infrastructure.)53 b(Since)35 b(these)g(optimizations)i + Fs(dep)-5 b(end)36 b Fw(on)e(the)h(infrastructure)f(for)h(a)g(v)-5 + b(ariet)m(y)36 b(of)199 1460 y(lo)m(w-lev)m(el)d(needs,)e(their)f(p)s + (erformance)g(is)g(indicativ)m(e)i(of)f(the)f(infrastructure)g + (e\016ciency)-8 b(.)p 562 1581 3176 4 v 560 1694 4 113 + v 1178 1694 V 1581 1694 V 1598 1694 V 1836 1660 a Fn(Unoptimized)p + 2658 1694 V 2675 1694 V 547 w(Optimized)p 3735 1694 V + 560 1807 V 611 1773 a(Benc)m(hmark)p 1178 1807 V 101 + w(#LOC)p 1581 1807 V 1598 1807 V 147 w(#Inst)p 1996 1807 + V 116 w(#BB)p 2348 1807 V 100 w(#Fn)p 2658 1807 V 2675 + 1807 V 148 w(#Inst)p 3073 1807 V 116 w(#BB)p 3425 1807 + V 100 w(#Fn)p 3735 1807 V 562 1810 3176 4 v 560 1923 + 4 113 v 611 1889 a Fr(254.gap)p 1178 1923 V 365 w Fw(71k)p + 1581 1923 V 1598 1923 V 199 w(345,328)p 1996 1923 V 103 + w(25,393)p 2348 1923 V 131 w(1421)p 2658 1923 V 2675 + 1923 V 118 w(129,153)p 3073 1923 V 103 w(21,659)p 3425 + 1923 V 177 w(885)p 3735 1923 V 560 2036 V 611 2002 a + Fr(255.vortex)p 1178 2036 V 221 w Fw(67k)p 1581 2036 + V 1598 2036 V 199 w(246,844)p 1996 2036 V 103 w(18,515)p + 2348 2036 V 177 w(965)p 2658 2036 V 2675 2036 V 163 w(62,712)p + 3073 2036 V 102 w(13,345)p 3425 2036 V 177 w(688)p 3735 + 2036 V 560 2149 V 611 2115 a Fr(300.twolf)p 1178 2149 + V 269 w Fw(20k)p 1581 2149 V 1598 2149 V 199 w(168,892)p + 1996 2149 V 148 w(7,083)p 2348 2149 V 177 w(335)p 2658 + 2149 V 2675 2149 V 163 w(46,912)p 3073 2149 V 147 w(6,071)p + 3425 2149 V 177 w(310)p 3735 2149 V 562 2152 3176 4 v + 885 2306 a(T)g(able)31 b(5.3:)42 b(Static)32 b(statistics)g(for)e + (large)i(SPECINT2000)e(b)s(enc)m(hmarks)340 2589 y(T)-8 + b(able)26 b(5.3)h(describ)s(es)d(the)h(three)h(largest)g(SPECINT2000)g + (b)s(enc)m(hmarks)e(curren)m(tly)h(compatible)3705 2556 + y Fk(2)3771 2589 y Fw(with)g(the)199 2771 y(LL)-10 b(VM)37 + b(C)f(compiler.)60 b(These)36 b(statistics)j(describ)s(e)d(the)g(n)m + (um)m(b)s(er)g(of)g(lines)h(of)g(C)f(co)s(de)h(for)f(eac)m(h)i(b)s(enc) + m(hmark,)199 2954 y(along)e(with)f(t)m(w)m(o)i(sets)e(of)g(columns)g + (describing)g(the)g(size)h(of)f(the)g(LL)-10 b(VM)35 + b(represen)m(tation:)52 b(b)s(efore)34 b(and)h(after)199 + 3137 y(optimization)47 b(b)m(y)f(the)f(LL)-10 b(VM)45 + b(static)i(optimizer.)87 b(The)44 b(dramatic)i(di\013erence)g(in)f + (size)h(b)s(efore)f(and)g(after)199 3319 y(optimization)d(clearly)f + (illustrates)h(the)e(v)-5 b(alue)40 b(of)g(p)s(erforming)f(aggressiv)m + (e)j(optimization)g(at)f(compile-time,)199 3502 y(instead)31 + b(of)f(p)s(erforming)g(all)h(optimization)h(at)f(link-time.)340 + 3685 y(T)-8 b(able)31 b(5.4)f(con)m(tains)h(data)g(describing)e(the)h + (e\016ciency)g(and)f(e\013ectiv)m(eness)j(of)e(four)f(w)m(ell-kno)m(wn) + i(optimiza-)199 3868 y(tions)k(when)e(run)g(on)h(the)g + Fr(254.gap)e Fw(b)s(enc)m(hmark.)51 b(Because)36 b(this)e(b)s(enc)m + (hmark)f(is)h(the)g(largest)i(\(consisting)f(of)199 4050 + y(71,364)28 b(lines)e(of)f(C)g(co)s(de\),)j(it)e(w)m(as)f(c)m(hosen)h + (as)g(a)g(represen)m(tativ)m(e)h(for)e(more)h(detailed)g(analysis.)40 + b(F)-8 b(or)26 b(these)g(tests,)199 4233 y(the)33 b(LL)-10 + b(VM)32 b(infrastructure)f(w)m(as)i(compiled)f(at)h(optimization)h(lev) + m(el)g(-O3)f(b)m(y)f(the)g(GNU)h(G++)f(3.2)h(compiler,)199 + 4416 y(and)d(tests)h(w)m(ere)g(timed)g(on)f(a)h(1.7GHz)h(AMD)f(2100+)h + (pro)s(cessor.)340 4598 y(The)37 b(ra)m(w)g(input)f(to)i(eac)m(h)g + (pass)f(is)g(the)h(en)m(tire)g(b)s(enc)m(hmark)e(link)m(ed)h(together,) + k(but)36 b(with)h(no)g(prior)f(opti-)199 4781 y(mizations)c(p)s + (erformed)e(\(other)h(than)g(what)f(the)h(C)g(fron)m(t-end)f(do)s(es)h + (automatically\),)j(in)d(order)f(to)i(stress)e(test)199 + 4964 y(the)i(optimization.)44 b(This)31 b(con\014guration)g(corresp)s + (onds)f(to)h(the)h(unoptimized)f(column)f(from)h(T)-8 + b(able)32 b(5.3.)44 b(The)p 199 5043 1560 4 v 303 5097 + a Fj(2)337 5128 y Fi(The)33 b(LL)-9 b(VM)33 b(C)g(fron)n(t-end)f(is)h + (missing)g(minor)g(pieces)g(of)h(functionalit)n(y)f(prev)n(en)n(ting)e + (it)i(from)g(compiling)h(all)f(b)r(enc)n(hmarks.)199 + 5220 y(Sp)r(eci\014cally)26 b Fg(setjmp)p Fi(/)p Fg(longjmp)j + Fi(supp)r(ort,)d(and)f(the)h(abilit)n(y)f(to)h(de\014ne)f(the)h + Fa(b)l(o)l(dy)g Fi(of)h(a)f(v)l(arargs)g(function)g(are)g(missing.)2104 + 5568 y Fw(49)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (14) 15 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 48 54 bop 590 3 3119 4 v 588 116 4 113 v 640 82 a Fn(T)-9 + b(ransformation)p 2779 116 V 1488 w(SLOC)p 3154 116 V + 99 w(Ra)m(w)35 b(LOC)p 3707 116 V 590 120 3119 4 v 588 + 232 4 113 v 640 199 a Fw(Aggressiv)m(e)d(Dead)f(Co)s(de)f(Elimination)h + (\(ADCE\))p 2779 232 V 510 w(203)p 3154 232 V 329 w(387)p + 3707 232 V 588 345 V 640 311 a(Global)g(Common)f(Sub)s(expression)e + (Elimination)k(\(GCSE\))p 2779 345 V 169 w(129)p 3154 + 345 V 329 w(263)p 3707 345 V 588 458 V 640 424 a(Lo)s(op)e(In)m(v)-5 + b(arian)m(t)31 b(Co)s(de)f(Motion)i(\(LICM\))p 2779 458 + V 780 w(117)p 3154 458 V 329 w(223)p 3707 458 V 588 571 + V 640 537 a(Sparse)e(Conditional)g(Constan)m(t)h(Propagation)h + (\(SCCP\))p 2779 571 V 253 w(310)p 3154 571 V 329 w(546)p + 3707 571 V 590 575 3119 4 v 523 734 a(T)-8 b(able)31 + b(5.2:)42 b(Source)30 b(Lines)g(of)h(Co)s(de)e(\(SLOC\))h(for)g(w)m + (ell-kno)m(wn)h(compiler)g(transformations)199 1014 y(in)24 + b(terms)h(of)f(the)h(abstract)h(V)-8 b(alue)25 b(Num)m(b)s(ering)f(in)m + (terface.)40 b(This)24 b(V)-8 b(alue)25 b(Num)m(b)s(ering)f(in)m + (terface)i(enables)f(GCSE)199 1197 y(to)h(automatically)h(mak)m(e)f + (use)e(of)h(alias)h(analysis)f(to)g(disam)m(biguate)h(load/store)g + (aliases,)i(allo)m(wing)e(it)f(to)h(remo)m(v)m(e)199 + 1379 y(redundan)m(t)h(load)h(instructions.)40 b(The)27 + b(LICM)g(pass)g(mak)m(es)i(use)e(of)h(Alias)g(Analysis)g(to)h(disam)m + (biguate)f(memory)199 1562 y(references,)38 b(allo)m(wing)g(it)e(to)h + (hoist)f(memory)g(access)h(instructions)e(out)i(of)f(lo)s(ops.)57 + b(Note)37 b(also)g(the)f(di\013erence)199 1745 y(b)s(et)m(w)m(een)26 + b(the)g(SLOC)e(and)h(Ra)m(w)h(LOC)f(columns.)39 b(The)25 + b(di\013erence)h(is)g(due)f(to)h(extensiv)m(e)h(commen)m(ts)g + (describing)199 1928 y(the)k(high-lev)m(el)h(algorithms.)340 + 2110 y(The)d(second)g(pro)s(ductivit)m(y)g(indicator)g(is)g(the)g + (dramatic)h(rate)f(of)g(progress)g(that)g(LL)-10 b(VM)29 + b(has)g(made)f(in)h(the)199 2293 y(t)m(w)m(o)36 b(y)m(ears)f(of)g(its)g + (dev)m(elopmen)m(t.)55 b(Despite)36 b(the)e(fact)i(that)f(the)g + (optimizer,)i(infrastructure)c(core,)k(and)d(man)m(y)199 + 2476 y(other)f(parts)g(of)g(the)g(infrastructure)f(ha)m(v)m(e)i(b)s + (een)e(almost)i(completely)h(dev)m(elop)s(ed)e(b)m(y)g(a)g(single)g + (programmer,)199 2658 y(it)e(is)g(a)f(v)m(ery)h(capable)g(system)g(and) + f(is)g(able)h(to)g(supp)s(ort)e(in)m(teresting)i(researc)m(h.)340 + 2841 y(There)g(are)g(sev)m(eral)h(reasons)e(that)i(LL)-10 + b(VM)30 b(is)h(a)g(pro)s(ductiv)m(e)g(en)m(vironmen)m(t:)41 + b(it)32 b(is)e(written)h(in)f(a)h(high-lev)m(el)199 3024 + y(language)42 b(with)f(mo)s(dern)e(programming)h(tec)m(hniques;)47 + b(the)41 b(in)m(terfaces)h(to)f(the)g(infrastructure)f(are)h(simple,) + 199 3206 y(orthogonal,)26 b(and)21 b(stable)i(o)m(v)m(er)h(time;)h(and) + d(the)g(infrastructure)g(mak)m(es)h(use)e(of)i(sev)m(eral)g(h)m(undred) + d(regression)j(and)199 3389 y(feature)j(tests)f(to)h(do)s(cumen)m(t)f + (implemen)m(ted)g(features)g(and)g(to)g(ensure)f(that)i(bugs)e(sta)m(y) + i(\014xed.)38 b(Do)s(cumen)m(tation)199 3572 y(and)30 + b(commen)m(ts)h(in)f(the)h(co)s(de)g(assist)f(dev)m(elop)s(ers)h(as)g + (they)f(are)h(new)f(to)h(LL)-10 b(VM.)340 3754 y(The)42 + b(most)h(imp)s(ortan)m(t)g(reason)f(for)g(high)g(pro)s(ductivit)m(y)h + (in)f(the)g(LL)-10 b(VM)43 b(framew)m(ork,)j(ho)m(w)m(ev)m(er,)h(is)42 + b(the)199 3937 y(LL)-10 b(VM)32 b(virtual)g(instruction)g(set)g + (itself.)46 b(Because)33 b(the)f(LL)-10 b(VM)32 b(IR)f(is)h(a)g(v)m + (ery)g(simple)g(represen)m(tation,)h(free)f(of)199 4120 + y(complicated)25 b(sp)s(ecial)f(cases)g(and)f(strange)h(b)s(eha)m + (vior,)h(co)s(de)f(in)f(transformations)g(and)g(analyses)h(are)g + (simpli\014ed.)199 4302 y(An)34 b(additional)h(adv)-5 + b(an)m(tage)36 b(of)e(the)g(LL)-10 b(VM)34 b(virtual)g(instruction)g + (set)h(is)f(that)g(it)h(has)f(a)g(w)m(ell-de\014ned)g(textual)199 + 4485 y(represen)m(tation)d(that)g(ma)m(y)g(b)s(e)e(used)g(to)i + (visualize)g(exactly)h(what)e(a)h(pass)e(do)s(es,)h(and)g(to)h + (construct)f(test-cases)199 4668 y(for)h(passes)g(man)m(ually)h(in)f + (LL)-10 b(VM.)31 b(This)f(mak)m(es)i(writing)f(regression)h(tests)g(v)m + (ery)f(simple:)43 b(simply)30 b(sp)s(ecify)h(the)199 + 4851 y(pass)f(to)h(run,)f(the)g(LL)-10 b(VM)30 b(input)g(co)s(de,)h + (and)e(the)i(exp)s(ected)g(output.)2104 5568 y(48)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 9 15 bop 199 91 a Fw(the)24 b(adv)-5 b(an)m(tages)24 + b(of)g(separate)g(compilation.)40 b(Instead)22 b(of)i(compiling)g + (directly)f(to)h(mac)m(hine)g(co)s(de,)h(ho)m(w)m(ev)m(er,)h(the)199 + 274 y(static)j(compiler)e(fron)m(t-ends)g(\(describ)s(ed)f(in)h + (Section)g(2.2\))i(emit)e(co)s(de)h(in)e(the)h(LL)-10 + b(VM)27 b(virtual)g(instruction)g(set.)199 457 y(The)c(LL)-10 + b(VM)24 b(optimizing)h(link)m(er)f(\(describ)s(ed)f(in)g(Section)i + (2.3\))g(com)m(bines)f(these)h(LL)-10 b(VM)23 b(ob)5 + b(ject)25 b(\014les,)g(optimizes)199 639 y(them,)h(and)d(\014nally)g + (in)m(tegrates)j(them)e(in)m(to)h(a)f(nativ)m(e)h(executable)h(whic)m + (h)d(it)i(writes)e(to)i(disk.)38 b(This)23 b(organization)199 + 822 y(p)s(ermits)32 b(sophisticated)i(in)m(terpro)s(cedural)e + (optimizations)j(to)e(b)s(e)f(p)s(erformed)f(at)j(link)e(time)h + (\(where)g(they)g(are)199 1005 y(most)e(e\013ectiv)m(e\).)340 + 1187 y(The)20 b(executable)i(written)e(b)m(y)h(the)f(optimizing)h(link) + m(er)g(con)m(tains)h(nativ)m(e)f(mac)m(hine)g(co)s(de)g(directly)g + (executable)199 1370 y(on)37 b(the)h(host)f(arc)m(hitecture)i(as)e(w)m + (ell)i(as)e(a)h(cop)m(y)g(of)f(the)g(LL)-10 b(VM)38 b(b)m(yteco)s(de)g + (for)f(the)g(application)i(itself)3869 1337 y Fk(1)3909 + 1370 y Fw(.)61 b(As)199 1553 y(the)37 b(application)g(is)g(executed)g + (in)f(the)g(\014eld,)i(a)f(run)m(time)f(reoptimizer)h(ma)m(y)g(monitor) + g(the)f(execution)i(of)e(the)199 1736 y(program,)31 b(collecting)i + (pro\014le)d(information)g(ab)s(out)g(t)m(ypical)i(usage)f(patterns)g + (for)f(the)h(application.)340 1918 y(Optimization)j(opp)s(ortunities)f + (detected)h(from)e(application)i(b)s(eha)m(vior)f(ma)m(y)g(cause)h(the) + f(run)m(time)f(reopti-)199 2101 y(mizer)c(to)f(dynamically)h(recompile) + g(and)e(reoptimize)i(p)s(ortions)f(of)g(the)g(application)h(\(using)f + (the)g(stored)g(LL)-10 b(VM)199 2284 y(b)m(yteco)s(de\).)53 + b(Ho)m(w)m(ev)m(er,)37 b(some)d(transformations)g(ma)m(y)h(b)s(e)e(to)s + (o)i(exp)s(ensiv)m(e)f(to)g(p)s(erform)f(directly)i(at)f(run)m(time.) + 199 2466 y(F)-8 b(or)37 b(these)g(transformations,)i(idle)d(time)h(on)g + (the)f(mac)m(hine)h(is)g(used)e(b)m(y)i(an)f(o\017ine)h(optimizer)g(to) + g(recompile)199 2649 y(the)j(application)h(using)e(aggressiv)m(e)i(in)m + (terpro)s(cedural)e(tec)m(hniques)h(and)f(the)h(accurate)h(pro\014le)e + (information)199 2832 y(detected)32 b(from)e(the)g(end-user's)g(actual) + i(usage)f(patterns.)340 3014 y(The)f(k)m(ey)i(p)s(oin)m(ts)e(of)h(the)f + (high-lev)m(el)j(LL)-10 b(VM)30 b(system)h(design)f(is)h(that)g(the)g + (LL)-10 b(VM)30 b(virtual)h(instruction)g(set)199 3197 + y(\(describ)s(ed)h(in)h(more)g(detail)h(in)f(Chapter)f(3\))i(is)e(used) + h(the)g(comm)m(unicate)h(b)s(et)m(w)m(een)g(the)f(di\013eren)m(t)g(to)s + (ols,)i(and)199 3380 y(the)25 b(to)s(ols)g(\014t)f(in)m(to)h(a)g + (standard)e(dev)m(elopmen)m(t)j(framew)m(ork.)38 b(Op)s(erating)24 + b(on)g(a)h(common)g(represen)m(tation)g(allo)m(ws)199 + 3562 y(the)k(transformations)h(to)f(b)s(e)g(shared)f(b)s(et)m(w)m(een)i + (the)f(di\013eren)m(t)g(comp)s(onen)m(ts)h(of)f(the)g(system.)40 + b(Sp)s(eci\014c)29 b(asp)s(ects)199 3745 y(of)i(eac)m(h)g(comp)s(onen)m + (t)g(are)g(describ)s(ed)e(b)s(elo)m(w.)199 4124 y Fm(2.2)136 + b(Compile)46 b(Time:)60 b(F)-11 b(ron)l(t-end)44 b(&)h(Static)h + (Optimizer)199 4397 y Fw(The)24 b(LL)-10 b(VM)25 b(system)f(is)h + (designed)f(to)h(supp)s(ort)e(m)m(ultiple)i(language)h(fron)m(t-ends,)f + (eac)m(h)h(of)e(whic)m(h)h(translates)g(the)199 4579 + y(supp)s(orted)31 b(source)h(languages)i(in)m(to)f(the)g(LL)-10 + b(VM)32 b(virtual)h(instruction)f(set.)47 b(Eac)m(h)33 + b(static)h(compiler)f(p)s(erforms)199 4762 y(as)h(m)m(uc)m(h)f + (optimization)i(as)e(p)s(ossible)g(on)f(eac)m(h)j(translation)f(unit)e + (to)i(reduce)f(the)g(amoun)m(t)h(of)f(w)m(ork)g(required)199 + 4945 y(of)e(the)f(link-time)i(optimizer.)p 199 5024 1560 + 4 v 303 5078 a Fj(1)337 5109 y Fi(LL)-9 b(VM)27 b(b)n(yteco)r(de)f(is)g + (con)n(tained)g(in)g(a)h(sp)r(ecial)g(section)g(of)g(the)f(executable,) + g(so)h(it)f(is)h(only)f(paged)g(in)n(to)h(memory)f(when)g(and)f(if)199 + 5201 y(accessed)i(b)n(y)e(the)g(run)n(time)g(optimizer.)2127 + 5568 y Fw(9)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (15) 16 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 10 16 bop 340 91 a Fw(The)24 b(primary)g(job)g(of)h(the)f(language)i + (fron)m(t-end)e(is)h(to)g(translate)g(from)f(the)h(source)g(language)g + (to)h(the)e(LL)-10 b(VM)199 274 y(virtual)33 b(instruction)f(set,)i + (but)e(it)h(can)f(also)i(p)s(erform)d(language-sp)s(eci\014c)j + (optimizations)g(as)e(w)m(ell.)48 b(F)-8 b(or)33 b(exam-)199 + 457 y(ple,)f(a)f(C)g(or)g(C++)f(fron)m(t-end)h(can)g(optimize)h(the)g + (call)g(\\)p Fr(printf\("hello)p Fv(n)p Fr(n"\);)p Fw(")c(in)m(to)k(\\) + p Fr(puts\("hello"\);)p Fw(",)199 639 y(b)s(ecause)f(the)f(high-lev)m + (el)i(seman)m(tics)g(of)e(the)h(functions)f(in)g(question)h(are)f + (de\014ned)f(b)m(y)i(the)f(C)g(standard.)340 822 y(Because)i(all)g(of)e + (the)h(LL)-10 b(VM)31 b(transformations)g(are)g(mo)s(dular)e(and)h + (shared,)g(static)i(compilers)f(can)g(c)m(ho)s(ose)199 + 1005 y(to)i(use)f(some)g(\(or)g(all\))h(of)f(the)g(LL)-10 + b(VM)32 b(infrastructure)f(transformations)h(to)h(impro)m(v)m(e)g + (their)f(co)s(de)g(generation)199 1187 y(capabilities.)61 + b(Note)37 b(that)g(this)g(includes)f(the)g(in)m(terpro)s(cedural)g + (optimizations)i(used)e(b)m(y)g(the)h(link-time)g(op-)199 + 1370 y(timizer,)h(whic)m(h)d(ma)m(y)h(b)s(e)f(used)f(on)i(the)f(more)h + (limited)g(scop)s(e)f(of)h(a)f(translation)i(unit)d(as)i(w)m(ell)g(as)g + (the)f(larger)199 1553 y(scop)s(e)c(at)g(link-time.)340 + 1736 y(Key)e(to)g(the)f(design)g(of)h(the)f(LL)-10 b(VM)28 + b(virtual)h(instruction)f(set)h(is)f(the)h(abilit)m(y)h(to)f(supp)s + (ort)d(arbitrary)i(source)199 1918 y(languages)h(through)e(a)h(common)g + (lo)m(w-lev)m(el)j(t)m(yp)s(e)d(system.)40 b(Unlik)m(e)29 + b(high-lev)m(el)g(virtual)f(mac)m(hines,)h(the)f(LL)-10 + b(VM)199 2101 y(t)m(yp)s(e)32 b(system)f(do)s(es)h(not)f(sp)s(ecify)g + (an)h(ob)5 b(ject)32 b(mo)s(del,)g(memory)f(managemen)m(t)i(system,)f + (or)g(sp)s(eci\014c)f(exception)199 2284 y(seman)m(tics)c(that)g(eac)m + (h)f(language)i(m)m(ust)d(use.)39 b(Instead,)27 b(LL)-10 + b(VM)25 b(only)h(directly)h(supp)s(orts)c(the)j(lo)m(w)m(est-lev)m(el)k + (t)m(yp)s(e)199 2466 y(constructors,)36 b(suc)m(h)e(as)h(p)s(oin)m + (ters,)g(structures,)g(and)f(arra)m(ys,)i(relying)f(on)f(the)h(source)f + (language)i(to)f(map)f(the)199 2649 y(high-lev)m(el)27 + b(t)m(yp)s(e)e(system)h(to)f(the)h(lo)m(w-lev)m(el)i(one.)39 + b(In)24 b(this)h(w)m(a)m(y)-8 b(,)28 b(LL)-10 b(VM)25 + b(is)g(language)i(indep)s(enden)m(t)d(in)g(the)i(same)199 + 2832 y(w)m(a)m(y)32 b(a)e(micropro)s(cessor)h(is:)41 + b(all)31 b(high-lev)m(el)h(features)f(are)f(mapp)s(ed)f(do)m(wn)h(to)h + (simpler)f(constructs.)199 3210 y Fm(2.3)136 b(Link)44 + b(Time:)61 b(Link)l(er)45 b(&)f(In)l(terpro)t(cedural)i(Optimizer)199 + 3483 y Fw(Link)d(time)h(is)f(the)h(\014rst)e(phase)h(of)g(the)h + (compilation)h(pro)s(cess)d(where)h(the)h(ma)5 b(jorit)m(y)3292 + 3450 y Fk(2)3375 3483 y Fw(of)44 b(the)f(program)g(is)199 + 3666 y(a)m(v)-5 b(ailable)34 b(for)d(analysis)h(and)f(transformation.) + 44 b(As)32 b(suc)m(h,)f(the)h(LL)-10 b(VM)31 b(optimizing)i(link)m(er)f + (is)f(a)h(natural)f(place)199 3849 y(to)g(p)s(erform)e(aggressiv)m(e)k + (in)m(terpro)s(cedural)d(optimizations)i(across)f(the)g(en)m(tire)g + (program.)340 4031 y(All)40 b(transformations)f(are)g(mo)s(dular)f(in)g + (LL)-10 b(VM,)39 b(allo)m(wing)i(the)e(LL)-10 b(VM)38 + b(optimizing)i(link)m(er)g(to)f(use)g(tra-)199 4214 y(ditional)f + (scalar)g(optimizations)h(\(emplo)m(y)m(ed)f(b)m(y)f(the)g(static)h + (compilers\),)i(to)e(clean)f(up)f(the)h(results)g(of)g(large)199 + 4397 y(scale)32 b(in)m(terpro)s(cedural)f(optimizations.)44 + b(Lik)m(e)32 b(the)f(static)h(compilers,)g(the)f(link-time)h + (optimizations)h(op)s(erate)199 4579 y(on)40 b(LL)-10 + b(VM)39 b(b)m(yteco)s(de)i(directly;)k(th)m(us)39 b(they)h(are)g(able)g + (to)g(tak)m(e)i(adv)-5 b(an)m(tage)41 b(of)f(the)g(high-lev)m(el)h + (information)199 4762 y(enco)s(ded)h(in)m(to)h(them,)i(making)e(them)f + (more)g(e\013ectiv)m(e.)78 b(F)-8 b(or)43 b(example,)j(the)c(Automatic) + i(P)m(o)s(ol)f(Allo)s(cation)199 4945 y(transformation,)31 + b(describ)s(ed)d(in)i(Section)g(4.3,)h(fundamen)m(tally)f(requires)f + (the)h(t)m(yp)s(e)g(information)g(pro)m(vided)f(b)m(y)199 + 5127 y(LL)-10 b(VM,)33 b(while)f(the)h(Data)h(Structure)d(Analysis)i + (transformation,)g(describ)s(ed)e(in)h(Section)h(4.2,)h(is)f(made)f + (more)p 199 5206 1560 4 v 303 5260 a Fj(2)337 5292 y + Fi(Note)26 b(that)f(shared)h(libraries)h(and)f(system)g(libraries)h(ma) + n(y)e(not)h(b)r(e)f(a)n(v)l(ailable)i(for)f(analysis)h(at)f(link)g + (time.)2104 5568 y Fw(10)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 47 53 bop 1277 3 1745 4 v 1275 116 4 113 v 1327 82 a + Fn(Source)35 b(Language)p 2149 116 V 100 w(SLOC)p 2523 + 116 V 99 w(SLOC)f(\045)p 3020 116 V 1277 120 1745 4 v + 1275 232 4 113 v 1327 199 a Fw(C++)p 2149 232 V 713 w(67194)p + 2523 232 V 216 w(96.14\045)p 3020 232 V 1275 345 V 1327 + 311 a(Bison)p 2149 345 V 745 w(1578)p 2523 345 V 261 + w(2.26\045)p 3020 345 V 1275 458 V 1327 424 a(ANSI)c(C)p + 2149 458 V 696 w(796)p 2523 458 V 260 w(1.14\045)p 3020 + 458 V 1275 571 V 1327 537 a(Flex)p 2149 571 V 840 w(323)p + 2523 571 V 260 w(0.46\045)p 3020 571 V 1277 575 1745 + 4 v 854 734 a(T)-8 b(able)31 b(5.1:)42 b(Source)30 b(Lines)g(of)h(Co)s + (de)f(\(SLOC\))f(in)h(LL)-10 b(VM)31 b(Infrastructure)199 + 1014 y(tree)24 b(con)m(tains)h(8637)g(lines)f(of)g(HTML)f(do)s(cumen)m + (tation)i(\(coun)m(ted)f(with)f(')p Fr(wc)p Fw('\),)j(extensiv)m(e)f + (in-source)e(commen)m(ts)199 1197 y(describing)30 b(the)g(v)-5 + b(arious)30 b(subsystems,)f(and)h(extensiv)m(e)h(do)s(cumen)m(tation)g + (automatically)i(extracted)e(from)f(the)199 1379 y(source)f(co)s(de)g + (b)m(y)g(the)f Fr(doxygen)f Fw(to)s(ol.)41 b(F)-8 b(or)30 + b(additional)f(dev)m(elop)s(er)h(supp)s(ort,)d(LL)-10 + b(VM)29 b(has)f(a)h(w)m(eb)g(page[31)r(])g(and)199 1562 + y(sev)m(eral)j(mailing)f(lists.)340 1745 y(Although)e(SLOC)e(and)g(do)s + (cumen)m(tation)j(can)e(giv)m(e)i(some)f(indication)g(ab)s(out)f(the)h + (maturit)m(y)g(of)f(the)g(infras-)199 1928 y(tructure,)k(b)m(y)g(far)g + (the)g(b)s(est)g(indicator)g(is)g(ho)m(w)g(LL)-10 b(VM)32 + b(has)g(b)s(een)f(used.)44 b(Chapter)32 b(4)g(describ)s(es)f(sev)m + (eral)i(w)m(a)m(ys)199 2110 y(the)28 b(LL)-10 b(VM)28 + b(infrastructure)f(is)h(b)s(eing)f(used)g(to)s(da)m(y)-8 + b(,)30 b(b)s(oth)d(b)m(y)h(the)g(author)f(and)h(external)g(con)m + (tributors.)40 b(These)199 2293 y(uses)d(sho)m(w)g(b)s(oth)g(the)g + (capabilities)i(of)f(the)f(infrastructure)f(as)i(w)m(ell)g(as)f(the)h + (features)f(the)h(infrastructure)e(is)199 2476 y(able)i(to)g(o\013er)g + (to)g(new)e(dev)m(elop)s(ers.)62 b(Of)36 b(particular)i(note)g(is)f + (the)h(fact)g(that)g(LL)-10 b(VM)37 b(has)g(successfully)g(b)s(een)199 + 2658 y(used)26 b(as)g(the)h(host)f(infrastructure)g(for)g(an)g(adv)-5 + b(anced)27 b(compilers)g(class)g(\(Section)g(4.4.3\).)42 + b(Studen)m(ts)26 b(tend)g(to)h(b)s(e)199 2841 y(m)m(uc)m(h)h(less)h + (forgiving)f(than)g(researc)m(hers)h(ab)s(out)f(p)s(o)s(or)f(qualit)m + (y)i(of)f(implemen)m(tation,)i(lac)m(k)g(of)e(do)s(cumen)m(tation,)199 + 3024 y(buggy)i(implemen)m(tation,)i(or)d(p)s(o)s(or)g(extensibilit)m(y) + -8 b(.)43 b(LL)-10 b(VM)29 b(w)m(ork)m(ed)i(quite)f(w)m(ell,)h(pro)m + (viding)e(another)h(measure)199 3206 y(of)h(maturit)m(y)-8 + b(.)199 3585 y Fm(5.2)136 b(Ev)-7 b(aluating)46 b(Pro)t(ductivit)l(y)f + (with)g(LL)-15 b(VM)199 3858 y Fw(The)44 b(LL)-10 b(VM)43 + b(infrastructure)g(pro)m(vides)h(a)h(solid)f(foundation)f(for)h + (researc)m(h)g(and)g(dev)m(elopmen)m(t)h(as)f(w)m(ell)h(as)199 + 4041 y(teac)m(hing.)e(Pro)s(ductivit)m(y)30 b(is)f(v)m(ery)i(hard)d(to) + j(quan)m(tify)f(without)f(a)i(detailed)f(study)-8 b(,)30 + b(but)f(some)h(indicators)h(ma)m(y)199 4223 y(pro)m(vide)g(a)f + (reasonable)i(argumen)m(t)f(that)f(LL)-10 b(VM)31 b(is)f(a)h(pro)s + (ductiv)m(e)f(en)m(vironmen)m(t)h(to)g(w)m(ork)g(in.)340 + 4406 y(The)26 b(\014rst)f(indicator)i(that)g(w)m(e)g(use)e(sho)m(ws)h + (the)h(n)m(um)m(b)s(ers)d(of)j(SLOC)d(that)j(are)g(required)e(to)i + (implemen)m(t)g(sev-)199 4589 y(eral)f(w)m(ell)f(kno)m(wn)g(compiler)g + (transformations)g(in)f(LL)-10 b(VM.)25 b(Statistics)i(for)d(four)g + (di\013eren)m(t)i(scalar)f(optimizations)199 4771 y(are)31 + b(pro)m(vided)f(in)g(T)-8 b(able)31 b(5.2.)340 4954 y(These)e(n)m(um)m + (b)s(ers)f(are)h(quite)h(mo)s(dest)f(considering)g(the)h(capabilities)h + (of)e(the)g(individual)g(transformations:)199 5137 y(The)45 + b(ADCE)g(transformation)g(mak)m(es)h(use)f(of)g(the)h(Dominator)g(T)-8 + b(ree)46 b(and)e(Con)m(trol)i(Dep)s(endence)f(Graph)199 + 5319 y(pro)m(vided)26 b(b)m(y)f(LL)-10 b(VM)26 b(to)h(optimistically)h + (delete)f(basic)f(blo)s(c)m(ks.)39 b(The)26 b(GCSE)f(transformation)h + (is)g(implemen)m(ted)2104 5568 y(47)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (16) 17 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 46 52 bop 484 346 a Fo(5)940 244 y Ft(Ev)-13 b(aluating)77 + b(the)h(Infrastructure)199 842 y Fw(Ev)-5 b(aluating)38 + b(an)f(infrastructure)g(is)g(di\016cult:)54 b(there)38 + b(are)f(v)m(ery)h(few)f(asp)s(ects)g(that)h(can)g(b)s(e)e(used)h(to)g + (directly)199 1024 y(ev)-5 b(aluate)34 b(the)f(qualit)m(y)g(or)g + (maturit)m(y)g(of)f(the)g(infrastructure.)46 b(Infrastructures)31 + b(exist)i(solely)h(to)f(enable)f(in)m(ter-)199 1207 y(esting)d + (applications)f(of)g(the)g(infrastructure,)f(not)h(as)g(an)f(in)m + (teresting)i(application)g(itself.)41 b(Despite)29 b(this,)f(there)199 + 1390 y(are)k(some)h(imp)s(ortan)m(t)f(qualities)h(that)f(mak)m(e)h + (infrastructures)e(more)g(successful)h(than)g(others.)45 + b(This)31 b(c)m(hapter)199 1572 y(attempts)f(to)g(ev)-5 + b(aluate)31 b(and)e(quan)m(tify)g(sev)m(eral)i(asp)s(ects)f(of)f(the)g + (LL)-10 b(VM)30 b(compiler)f(infrastructure)g(in)g(order)f(to)199 + 1755 y(pro)m(vide)34 b(an)g(idea)g(of)g(the)f(e\013ectiv)m(eness)j(of)e + (LL)-10 b(VM)34 b(in)f(the)h(role)g(of)g(compiler)g(infrastructure.)50 + b(The)33 b(qualities)199 1938 y(w)m(e)e(attempt)h(to)f(estimate)h(are)f + (Maturit)m(y)-8 b(,)32 b(Pro)s(ductivit)m(y)-8 b(,)31 + b(and)f(P)m(erformance.)199 2317 y Fm(5.1)136 b(Ev)-7 + b(aluating)46 b(the)f(Maturit)l(y)h(of)f(LL)-15 b(VM)199 + 2589 y Fw(One)21 b(simple)h(but)f(extremely)i(limited)f(w)m(a)m(y)g(to) + h(ev)-5 b(aluate)23 b(the)f(maturit)m(y)g(of)g(a)g(co)s(de)g(base)f(is) + h(to)g(coun)m(t)h(the)e(n)m(um)m(b)s(er)199 2772 y(of)39 + b(lines)g(of)f(co)s(de)h(it)g(con)m(tains.)67 b(This)37 + b(metric)j(is)e(useful)g(for)g(establishing)h(the)g(o)m(v)m(erall)i + (size)e(of)g(the)g(pro)5 b(ject)199 2955 y(but)34 b(is)g(prone)g(to)h + (p)s(oten)m(tially)h(signi\014can)m(t)g(problems)e(\(insigni\014can)m + (t)h(details,)i(suc)m(h)d(as)g(co)s(ding)h(con)m(v)m(en)m(tions,)199 + 3137 y(can)42 b(dramatically)h(in\015uence)e(the)h(n)m(um)m(b)s(ers\).) + 72 b(The)41 b(LL)-10 b(VM)42 b(compiler)g(infrastructure)e(is)i + (written)f(almost)199 3320 y(exclusiv)m(ely)c(in)d(high-lev)m(el)j(C++) + c(co)s(de,)k(making)e(extensiv)m(e)h(use)f(of)f(the)h(Standard)f(T)-8 + b(emplate)36 b(Library)e(and)199 3503 y(other)29 b(mo)s(dern)f + (features)h(of)g(the)g(language,)i(so)e(these)g(n)m(um)m(b)s(ers)e(are) + j(a)f(conserv)-5 b(ativ)m(e)31 b(estimate)f(\(compared)f(to)199 + 3685 y(pro)5 b(jects)31 b(that)g(do)f(not)h(use)f(these)h(features\).) + 340 3868 y(A)m(t)h(the)f(time)h(of)e(this)h(writing,)g(the)g(LL)-10 + b(VM)31 b(CVS)f(tree)i(con)m(tains)g(o)m(v)m(er)g(100,000)h(lines)e(of) + g(co)s(de)g(\(including)199 4051 y(whitespace,)i(commen)m(ts,)f(and)f + (HTML)g(do)s(cumen)m(tation\),)i(not)e(coun)m(ting)i(the)e(test)h + (framew)m(ork)f(or)h(automat-)199 4233 y(ically)41 b(generated)g(co)s + (de.)68 b(Coun)m(ting)39 b(Source)h(Lines)f(of)g(Co)s(de)g(\(co)s(de)h + (without)g(whitespace,)i(commen)m(ts,)h(or)199 4416 y(HTML\))32 + b(yields)g(the)g(information)g(con)m(tained)h(in)e(T)-8 + b(able)33 b(5.1)2336 4383 y Fk(1)2376 4416 y Fw(.)45 + b(Note)33 b(that)f(these)h(n)m(um)m(b)s(ers)d(only)i(coun)m(t)g(co)s + (de)199 4599 y(in)e(the)h(LL)-10 b(VM)30 b(CVS)g(rep)s(ository)-8 + b(,)31 b(whic)m(h)f(do)s(es)g(not)h(include)f(the)g(C)g(fron)m(t-end.) + 340 4782 y(Another)42 b(reasonable)g(metric)h(for)e(ev)-5 + b(aluating)43 b(an)f(infrastructure)f(is)h(the)f(amoun)m(t)i(of)e(do)s + (cumen)m(tation)199 4964 y(curren)m(tly)30 b(a)m(v)-5 + b(ailable)33 b(describing)c(it.)41 b(This)30 b(is)g(an)g(imp)s(ortan)m + (t)g(metric,)h(b)s(ecause)f(do)s(cumen)m(tation)h(is)f(necessary)199 + 5147 y(for)36 b(external)h(dev)m(elop)s(ers)f(to)h(use)f(the)g + (infrastructure)f(e\013ectiv)m(ely)-8 b(.)61 b(F)-8 b(or)36 + b(do)s(cumen)m(tation,)j(the)d(LL)-10 b(VM)36 b(CVS)p + 199 5226 1560 4 v 303 5280 a Fj(1)337 5312 y Fi(Coun)n(ted)26 + b(b)n(y)e(Da)n(vid)i(A.)f(Wheeler's)i(\\SLOCCoun)n(t")f(to)r(ol,)h(a)n + (v)l(ailable)g(from)f Fg(http://www.dwheeler.com/sloc)q(count)q(/)2104 + 5568 y Fw(46)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 11 17 bop 199 91 a Fw(accurate)32 b(due)e(to)h(the)g(SSA)e(form)h(used) + g(b)m(y)g(the)g(LL)-10 b(VM)31 b(virtual)f(instruction)h(set.)340 + 274 y(The)24 b(design)g(of)g(the)g(compile-time)i(and)e(link-time)h + (optimizers)f(p)s(ermits)g(the)g(application)h(of)f(a)h(w)m(ell)g(kno)m + (wn)199 457 y(tec)m(hnique)d(for)f(sp)s(eeding)f(up)g(in)m(terpro)s + (cedural)h(analysis:)37 b(A)m(t)22 b(compile-time,)j(in)m(terpro)s + (cedural)20 b(summaries)h(can)199 639 y(b)s(e)k(computed)g(for)h(eac)m + (h)g(function)g(in)f(the)h(program)f(and)g(attac)m(hed)i(to)f(the)g(LL) + -10 b(VM)26 b(b)m(yteco)s(de)3457 606 y Fk(3)3497 639 + y Fw(.)39 b(The)25 b(link-time)199 822 y(in)m(terpro)s(cedural)40 + b(optimizer)h(can)f(then)g(pro)s(cess)g(these)g(in)m(terpro)s(cedural)g + (summaries)f(as)i(input)e(instead)h(of)199 1005 y(ha)m(ving)32 + b(to)g(compute)f(results)g(from)f(scratc)m(h.)44 b(This)31 + b(tec)m(hnique)g(reduces)g(the)g(amoun)m(t)h(of)f(analysis)h(that)f(m)m + (ust)199 1187 y(b)s(e)j(p)s(erformed)f(when)h(only)g(a)h(few)g + (translation)g(units)f(need)g(to)i(b)s(e)e(recompiled,)i(th)m(us)e(p)s + (oten)m(tially)i(sa)m(ving)g(a)199 1370 y(substan)m(tial)31 + b(amoun)m(t)g(of)g(compile)g(time)g([7)q(].)340 1553 + y(Once)f(link-time)i(optimization)g(has)d(b)s(een)h(completed,)h(a)g + (co)s(de)f(generator)h(appropriate)f(to)h(the)f(target)i(is)199 + 1736 y(selected)e(to)f(translate)h(from)d(LL)-10 b(VM)29 + b(to)g(nativ)m(e)g(co)s(de)g(for)f(the)h(curren)m(t)f(platform.)40 + b(If)28 b(the)g(user)g(decides)g(to)h(use)199 1918 y(the)h(p)s + (ost-link)g(optimizers,)h(a)f(cop)m(y)g(of)g(the)g(compressed)f(LL)-10 + b(VM)30 b(b)m(yteco)s(de)g(is)g(included)f(in)m(to)i(the)f(executable) + 199 2101 y(itself.)56 b(Including)34 b(the)h(b)m(yteco)s(de)h(directly) + f(in)g(the)g(generated)h(executable)h(eliminates)f(the)f(p)s(ossibilit) + m(y)h(that)199 2284 y(the)31 b(run)m(time)f(or)g(o\017ine)h(optimizers) + g(will)g(acquire)g(the)f(wrong)g(b)m(yteco)s(de)i(for)e(a)h(giv)m(en)g + (program.)199 2662 y Fm(2.4)136 b(Run)44 b(Time:)61 b(Pro\014ling)45 + b(&)f(Reoptimization)199 2935 y Fw(One)h(of)g(the)h(k)m(ey)g(researc)m + (h)g(goals)g(of)g(the)f(LL)-10 b(VM)45 b(pro)5 b(ject)46 + b(is)f(to)h(dev)m(elop)g(a)g(new)f(strategy)h(for)f(run)m(time)199 + 3118 y(optimization.)f(This)30 b(strategy)i(is)f(built)f(around)g(the)h + (mo)s(del)g(of)g(gathering)g(pro\014le)g(information)g(at)g(run)m + (time,)199 3300 y(and)d(using)f(it)i(to)f(con)m(trol)i(reoptimization)g + (and)d(recompilation)i(of)g(the)f(program)f(from)h(the)g(LL)-10 + b(VM)28 b(b)m(yteco)s(de.)199 3616 y Fl(2.4.1)113 b(Gathering)38 + b(Pro\014le)f(Information)h(at)g(Run)f(Time)199 3857 + y Fw(Av)m(oiding)42 b(the)f(traditional)i(approac)m(h)e(to)h(pro\014le) + f(guided)f(optimization)j(\(describ)s(ed)d(in)h(Section)h(1.1.3\))h(is) + 199 4040 y(an)35 b(imp)s(ortan)m(t)g(goal)i(of)e(the)g(LL)-10 + b(VM)35 b(system.)54 b(There)35 b(are)g(t)m(w)m(o)i(primary)d(disadv)-5 + b(an)m(tages)36 b(to)g(the)f(traditional)199 4222 y(approac)m(h:)42 + b(the)31 b(pro\014le)g(information)g(measures)g(the)g(usage)g(pattern)g + (of)g(the)g(dev)m(elop)s(er)g(\(not)h(the)f(user\),)g(and)199 + 4405 y(dev)m(elop)s(ers)k(rarely)g(actually)h(use)f(pro\014le)f(guided) + g(feedbac)m(k.)55 b(The)34 b(use)g(of)h(run)m(time)g(pro\014ling)f + (\(in)g(the)h(\014eld\))199 4588 y(eliminates)29 b(these)e(t)m(w)m(o)h + (problems:)39 b(the)27 b(end-user)f(of)h(the)g(application)h(pro)m + (vides)f(pro\014le)g(runs)e(as)i(they)g(use)g(the)199 + 4771 y(application,)32 b(with)e(no)h(extra)g(w)m(ork)f(b)m(y)g(the)h + (dev)m(elop)s(ers.)340 4953 y(Note)38 b(that)f(the)g(run)m(time)f + (reoptimizer)h(ma)m(y)g(use)f(a)h(v)-5 b(ariet)m(y)38 + b(of)f(di\013eren)m(t)g(tec)m(hniques)f(to)i(collect)h(pro\014le)p + 199 5032 1560 4 v 303 5086 a Fj(3)337 5118 y Fi(Note)26 + b(that)f(this)g(is)h(ac)n(hiev)n(ed)g(without)f(building)h(a)f(program) + i(database)f(or)g(deferring)g(the)f(compilation)i(of)f(the)f(input)g + (source)199 5209 y(co)r(de)h(un)n(til)g(link-time.)34 + b(This)27 b(eliminates)g(the)e(p)r(ossibilit)n(y)i(that)f(the)f + (program)h(database)h(could)f(b)r(e)f(out)h(of)h(sync)e(with)h(the)f + (ob)t(ject)199 5301 y(\014les.)2104 5568 y Fw(11)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (17) 18 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 12 18 bop 199 91 a Fw(information,)40 b(ranging)e(from)f(PC)g(sampling) + h(tec)m(hniques)g([2)q(])f(\(to)i(\014nd)d(hot)i(functions)f(and)g(lo)s + (ops\))h(to)g(path)199 274 y(pro\014ling)c([6)q(])g(\(to)h(determine)f + (the)h(hot)f(paths)g(through)f(a)i(complex)f(region)h(of)f(co)s(de\).) + 53 b(Ov)m(er)34 b(the)h(lifetime)g(of)199 457 y(the)27 + b(application,)h(the)f(run)m(time)f(optimizer)h(will)f(ev)m(en)m + (tually)j(b)s(ecome)d(dorman)m(t,)i(only)e(c)m(hanging)h(the)f(program) + 199 639 y(if)31 b(strong)f(phase)g(b)s(eha)m(viors)g(o)s(ccur)h(whic)m + (h)f(can)g(b)s(ene\014t)g(from)g(con)m(tin)m(uous)h(optimizations.)199 + 955 y Fl(2.4.2)113 b(The)37 b(LL)-12 b(VM)38 b(Approac)m(h)g(to)f(Run)g + (Time)h(Optimization)199 1196 y Fw(Unlik)m(e)33 b(other)f(virtual)g + (mac)m(hine)h(based)e(systems,)i(the)f(LL)-10 b(VM)31 + b(run)m(time)h(optimizer)h(can)f(c)m(ho)s(ose)g(to)h(do)f(ligh)m(t-)199 + 1379 y(w)m(eigh)m(t)d(optimizations)g(directly)e(on)g(the)g + (precompiled)g(nativ)m(e)i(mac)m(hine)e(co)s(de)h(while)f(referring)f + (to)i(the)f(LL)-10 b(VM)199 1561 y(b)m(yteco)s(de)34 + b(for)f(high-lev)m(el)h(information)f(ab)s(out)g(data\015o)m(w)g(and)g + (t)m(yp)s(es.)48 b(This)32 b(capabilit)m(y)i(is)f(enabled)g(through)199 + 1744 y(the)i(use)g(of)g(detailed)h(mapping)e(information,)j(whic)m(h)e + (maps)f(b)s(et)m(w)m(een)i(the)f(nativ)m(e)h(and)e(LL)-10 + b(VM)35 b(co)s(de)g(repre-)199 1927 y(sen)m(tations)d(for)e(the)h + (program.)340 2109 y(This)21 b(information)g(allo)m(ws)i(for)e(simple)g + (transformations)g(\(co)s(de)h(la)m(y)m(out,)j(for)c(example\))h(to)g + (b)s(e)f(implemen)m(ted)199 2292 y(safely)31 b(\(due)f(to)h(con)m(trol) + h(\015o)m(w)e(information)h(from)f(the)g(LL)-10 b(VM)31 + b(co)s(de\))g(and)e(e\016cien)m(tly)j(\(b)s(ecause)f(the)f(mac)m(hine) + 199 2475 y(co)s(de)j(is)g(already)g(generated)h(for)f(the)g(co)s(de\).) + 48 b(More)33 b(aggressiv)m(e)i(transformations)e(\(based)g(on)g(the)g + (results)f(of)199 2658 y(v)-5 b(alue)33 b(pro\014ling)f([8)q(],)h(for)g + (example\))g(ma)m(y)g(instead)g(elect)h(to)f(mo)s(dify)f(the)h(LL)-10 + b(VM)32 b(b)m(yteco)s(de)i(for)e(the)g(program)199 2840 + y(and)38 b(regenerate)i(mac)m(hine)g(co)s(de)f(from)f(it)h(instead.)66 + b(This)37 b(approac)m(h)i(is)g(useful)f(optimizations)i(of)f(medium)199 + 3023 y(complexit)m(y)-8 b(.)43 b(F)-8 b(or)31 b(v)m(ery)g(exp)s(ensiv)m + (e)g(optimizations,)h(the)f(o\017ine)f(reoptimizer)i(is)e(used.)199 + 3402 y Fm(2.5)136 b(Idle)45 b(Time:)60 b(O\017ine)46 + b(Reoptimizer)199 3674 y Fw(Some)33 b(t)m(yp)s(es)g(of)g(applications)i + (are)e(not)g(particularly)h(amenable)f(to)h(run)m(time)f(optimization:) + 48 b(these)33 b(applica-)199 3857 y(tions)d(often)h(ha)m(v)m(e)f(a)h + (large)f(amoun)m(t)h(of)f(co)s(de,)g(none)f(of)h(whic)m(h)g(is)g(v)m + (ery)g(\\hot".)41 b(Because)32 b(of)d(this,)h(the)g(run)m(time)199 + 4040 y(optimizer)f(cannot)f(a\013ord)g(to)g(sp)s(end)e(a)i + (signi\014can)m(t)h(amoun)m(t)f(of)f(time)i(impro)m(ving)f(an)m(y)g + (one)g(piece)g(of)g(the)g(co)s(de,)199 4222 y(although)j(it)g(can)g + (probably)e(still)i(detect)h(the)f(most)f(frequen)m(t)h(paths)f + (executed)h(b)m(y)f(the)h(program.)340 4405 y(In)24 b(order)f(to)i + (supp)s(ort)e(these)h(t)m(yp)s(es)h(of)f(applications)h(and)f(to)h + (supp)s(ort)d(other)j(optimizations)h(whic)m(h)d(require)199 + 4588 y(p)s(oten)m(tially)34 b(exp)s(ensiv)m(e)e(analyses,)i(the)e + (o\017ine)g(reoptimizer)h(is)f(a)m(v)-5 b(ailable.)48 + b(It)33 b(is)f(designed)g(to)g(b)s(e)g(run)e(during)199 + 4771 y(idle)23 b(time)f(on)g(the)h(user's)e(computer,)j(allo)m(wing)g + (it)e(to)h(b)s(e)f(m)m(uc)m(h)g(more)g(aggressiv)m(e)i(than)e(the)g + (run)m(time)g(optimizer.)340 4953 y(The)38 b(o\017ine)g(reoptimizer)h + (com)m(bines)f(pro\014le)g(information)g(gathered)g(b)m(y)g(the)g(run)m + (time)g(optimizer)g(with)199 5136 y(the)31 b(LL)-10 b(VM)30 + b(b)m(yteco)s(de)h(to)g(reoptimize)h(and)e(recompile)h(the)f + (application.)42 b(In)30 b(this)g(w)m(a)m(y)i(it)e(is)h(able)g(to)g(p)s + (erform)199 5319 y(aggressiv)m(e)36 b(pro\014le)c(driv)m(en)h(in)m + (terpro)s(cedural)g(optimization)j(without)d(comp)s(eting)h(with)e(the) + i(application)g(for)2104 5568 y(12)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 45 51 bop 199 91 a Fw(along)38 b(with)f(the)g(con)m(trol)h(\015o)m(w)f + (graph,)h(dominance,)h(con)m(trol)f(dep)s(endence)e(and)g(call)j(graph) + d(information)h(is)199 274 y(required)d(for)h(successful)g(analysis)g + (of)g(this)g(high-lev)m(el)i(information.)54 b(Because)36 + b(whole-program)g(analysis)f(is)199 457 y(required)30 + b(for)g(this)g(w)m(ork,)h(link-time)g(analysis)g(is)g(essen)m(tial)h + (to)f(the)f(w)m(ork.)199 772 y Fl(4.4.3)113 b(Adv)-6 + b(anced)38 b(Compilers)g(Class)199 1013 y Fw(LL)-10 b(VM)29 + b(serv)m(ed)f(as)h(the)g(host)f(compiler)h(infrastructure)f(for)g(the)h + (Univ)m(ersit)m(y)h(of)e(Illinois)h(Adv)-5 b(anced)29 + b(Compilers)199 1196 y(\(CS426\))45 b(class)f(in)e(F)-8 + b(all)45 b(2002.)81 b(All)44 b(studen)m(ts)f(w)m(ere)h(required)e(to)i + (use)f(LL)-10 b(VM)43 b(to)h(write)f(a)h(simple)f(global)199 + 1379 y(transformation)31 b(\(Scalar)g(Replacemen)m(t)h(of)f + (Aggregates\))i(and)d(to)h(complete)h(a)f(group)f(pro)5 + b(ject.)340 1561 y(Sample)25 b(pro)5 b(jects)26 b(include)f(m)m + (ultiple)h(implemen)m(tations)g(of)g(SSA)e(P)m(artial)j(Redundancy)d + (Elimination)i([10)q(],)199 1744 y(sev)m(eral)g(implemen)m(tations)f + (of)g(Anderson's)e(Alias)i(Analysis)g([3])g(with)e(O\017ine)h(V)-8 + b(ariable)26 b(Substitution)d([36)q(])i(and)199 1927 + y(Online)32 b(Cycle)g(Elimination)h([18)q(],)f(and)f(a)h(framew)m(ork)g + (for)g(incremen)m(tal)h(recomputation)g(of)e(in)m(terpro)s(cedural)199 + 2109 y(data-\015o)m(w)37 b(problems)e([7].)56 b(Other)35 + b(groups)g(researc)m(hed)h(more)g(op)s(en)f(ended)f(problems,)j(suc)m + (h)e(as)h(using)f(Data)199 2292 y(Structure)i(Graphs)f(to)i(in)m(tro)s + (duce)f(static)i(memory)e(managemen)m(t)i(for)e(programs)f(with)h + (explicit)i(allo)s(cation)199 2475 y(and)30 b(deallo)s(cation.)2104 + 5568 y(45)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (18) 19 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 44 50 bop 199 91 a Fw(c)m(hec)m(ks\).)41 b(Con)m(trol-C)25 + b(a)h(subset)e(of)h(C,)g(whic)m(h)f(includes)h(heap)g(allo)s(cation,)j + (p)s(oin)m(ters,)e(and)f(most)g(other)g(di\016cult-)199 + 274 y(to-analyze)34 b(features)e(of)f(the)h(C)f(language,)i(although)f + (it)g(elides)g(some)g(features)f(that)h(are)g(t)m(ypically)h(not)f + (used)199 457 y(b)m(y)c(real-time)i(con)m(trol)g(applications)f(\(whic) + m(h)f(is)g(the)h(target)g(of)g(the)f(w)m(ork\).)40 b(Once)28 + b(co)s(de)h(has)f(b)s(een)f(certi\014ed)h(to)199 639 + y(b)s(e)34 b(safe)h(to)g(execute)h(b)m(y)e(a)h(compiler)g(using)f + (their)g(analysis,)i(it)f(can)g(b)s(e)f(installed)h(in)f(the)h(\014eld) + f(without)g(fear)199 822 y(of)h(it)h(corrupting)e(the)h(state)i(of)e + (the)g(con)m(trol)h(system.)54 b(This)34 b(safet)m(y)j(is)e(implemen)m + (ted)g(though)g(strong)g(static)199 1005 y(analyses,)d(eliminating)f + (the)g(need)f(for)g(run)m(time)g(o)m(v)m(erhead)i(imp)s(osed)d(b)m(y)i + (dynamic)f(safet)m(y)h(c)m(hec)m(ks.)340 1187 y(This)45 + b(w)m(ork)g(uses)g(the)h(LL)-10 b(VM)45 b(system)h(in)f(a)g(v)-5 + b(ariet)m(y)47 b(of)f(w)m(a)m(ys.)86 b(It)46 b(hea)m(vily)g(relies)g + (on)g(the)f(link-time)199 1370 y(in)m(terpro)s(cedural)32 + b(capabilities)h(of)f(the)f(system)h(to)g(p)s(erform)e(a)i(\015o)m + (w-sensitiv)m(e,)i(con)m(text-sensitiv)m(e)h(analysis)d(of)199 + 1553 y(arra)m(y)37 b(b)s(ounds)c(constrain)m(ts.)59 b(V)-8 + b(arious)37 b(SSA)e(prop)s(erties)g(of)h(the)g(LL)-10 + b(VM)36 b(virtual)h(instruction)f(set)g(mak)m(e)h(the)199 + 1736 y(analysis)27 b(more)f(e\016cien)m(t,)j(and)c(the)h(data)h + (structure)f(graphs)f(\(describ)s(ed)g(in)h(Section)h(4.2\))g(are)g + (used)e(to)i(analyze)199 1918 y(and)j(ev)-5 b(aluate)32 + b(memory)e(references)h(for)f(safet)m(y)i(prop)s(erties.)199 + 2233 y Fl(4.4.2)113 b(Program)37 b(Con)m(trol)g(Language)j(\(PCL\))199 + 2475 y Fw(Ensink,)26 b(Stanley)-8 b(,)27 b(and)e(Adv)m(e)h(describ)s(e) + e(a)i(framew)m(ork)f(for)g(language)i(supp)s(ort)d(to)i(ease)g(dev)m + (elopmen)m(t)h(of)e(adap-)199 2658 y(tiv)m(e)38 b(applications,)i + (named)c(the)g(Program)h(Con)m(trol)g(Language)h(\(PCL\))e([17)q(].)60 + b(PCL)35 b(supp)s(orts)g(adaptations)199 2840 y(in)h(distributed)f + (applications)i(b)m(y)f(separating)h(the)f(adaptiv)m(e)i(logic)g(from)d + (the)h(underlying)f(distributed)g(pro-)199 3023 y(gram,)28 + b(pro)m(viding)e(an)g(abstraction)h(of)f(program)g(b)s(eha)m(vior)g + (whic)m(h)g(can)g(b)s(e)g(used)f(to)i(reason)f(ab)s(out)g(and)g(sp)s + (ecify)199 3206 y(adaptation)35 b(op)s(erations,)f(and)f(pro)m(vides)g + (high-lev)m(el)j(mec)m(hanisms)d(for)g(monitoring)h(and)f(adapting)g + (program)199 3388 y(b)s(eha)m(vior.)340 3571 y(Conceptually)-8 + b(,)30 b(PCL)d(allo)m(ws)h(programmers)f(to)i(c)m(hange)f(the)g(b)s + (eha)m(vior)g(of)f(an)h(application)h(at)f(run)m(time)f(b)m(y)199 + 3754 y(mo)s(difying)i(the)g Fs(static)j(task)g(gr)-5 + b(aph)38 b Fw(of)29 b(the)h(application,)h(for)e(example,)h(b)m(y)f + (adding)g(and)f(remo)m(ving)i(tasks)g(and)199 3936 y(edges.)42 + b(The)29 b(static)j(task)f(graph)f(pro)m(vides)g(a)h + Fs(glob)-5 b(al)41 b Fw(view)30 b(of)h(the)f(en)m(tire)i(distributed)d + (computation)i(to)g(ev)m(ery)199 4119 y(participating)h(pro)s(cess.)41 + b(This)30 b(allo)m(ws)i(an)m(y)f(pro)s(cess)g(to)g(mo)s(dify)f(the)h(b) + s(eha)m(vior)g(of)f(an)m(y)h(other)g(pro)s(cess)g(simply)199 + 4302 y(b)m(y)38 b(mo)s(difying)f(parts)h(of)g(the)g(static)i(task)f + (graph)e(through)g(high-lev)m(el)j(language)f(extensions)g(and)e + (without)199 4484 y(in)m(v)m(oking)27 b(an)m(y)g(explicit)g(comm)m + (unication.)41 b(The)25 b(PCL)g(compiler)h(and)g(run)m(time)f(library)h + (hide)f(the)h(complexities)199 4667 y(of)31 b(mo)s(difying)f(the)g + (task)h(graph)f(and)g(p)s(erforming)f(remote)i(comm)m(unication.)340 + 4850 y(PCL)f(is)g(built)g(using)f(the)h(LL)-10 b(VM)30 + b(infrastructure,)g(whic)m(h)f(pro)m(vides)h(extensiv)m(e)i(in)m + (terpro)s(cedural)e(analysis)199 5033 y(capabilities)37 + b(as)d(w)m(ell)i(as)f(high-lev)m(el)h(information)f(ab)s(out)f(program) + h(seman)m(tics.)54 b(F)-8 b(uture)35 b(w)m(ork)f(in)m(v)m(olv)m(es)j + (au-)199 5215 y(tomatic)e(or)e(semi-automatic)i(extraction)g(of)e(the)g + (task)h(graph)e(from)h(a)g(program.)48 b(Data)35 b(Structure)d(Graphs,) + 2104 5568 y(44)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 13 19 bop 199 91 a Fw(pro)s(cessor)26 b(cycles.)40 b(As)26 + b(the)h(usage)f(pattern)g(of)h(the)f(application)h(c)m(hanges)g(o)m(v)m + (er)h(time,)f(the)g(run)m(time)e(and)h(o\017ine)199 274 + y(reoptimizers)31 b(co)s(ordinate)h(to)f(ensure)e(the)i(application)h + (is)e(p)s(erforming)f(at)i(its)g(p)s(eak)f(capabilit)m(y)-8 + b(.)2104 5568 y(13)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (19) 20 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 14 20 bop 484 346 a Fo(3)940 244 y Ft(LL)-26 b(VM)78 + b(Virtual)g(Instruction)f(Set)199 842 y Fw(The)23 b(LL)-10 + b(VM)24 b(system)g(arc)m(hitecture)h(is)e(designed)h(to)g(pro)s(duce)e + (the)i(highest)g(p)s(erformance)f(executables)i(through)199 + 1024 y(an)32 b(aggressiv)m(e)h(system)f(of)g(con)m(tin)m(uous)g + (optimization.)46 b(One)31 b(of)h(the)f(k)m(ey)h(factors)h(that)f + (di\013eren)m(tiates)h(LL)-10 b(VM)199 1207 y(from)34 + b(other)g(systems,)g(ho)m(w)m(ev)m(er,)j(is)c(the)h(program)g(represen) + m(tation)h(it)f(uses.)51 b(This)33 b(program)g(represen)m(tation)199 + 1390 y(m)m(ust)27 b(b)s(e)e(lo)m(w-lev)m(el)k(enough)e(to)g(allo)m(w)h + (signi\014can)m(t)f(amoun)m(ts)g(of)f(optimization)i(in)f(the)f(early)h + (phases)f(of)h(compi-)199 1572 y(lation,)32 b(while)e(b)s(eing)g + (high-lev)m(el)i(enough)f(to)g(supp)s(ort)d(aggressiv)m(e)33 + b(link-)d(and)g(p)s(ost-link)h(time)g(optimizations.)340 + 1755 y(The)f(LL)-10 b(VM)31 b(virtual)g(instruction)g(set)g(is)f + (designed)h(as)f(a)h Fs(low-level)g Fw(represen)m(tation)h(with)e + Fs(high-level)h Fw(t)m(yp)s(e)199 1938 y(information.)50 + b(It)34 b(pro)m(vides)f(extensiv)m(e)i(language)g(indep)s(enden)m(t)d + (t)m(yp)s(e)h(information)h(ab)s(out)f(all)h(v)-5 b(alues)34 + b(in)f(the)199 2120 y(program,)h(exp)s(oses)e(memory)h(allo)s(cation)i + (directly)f(to)f(the)g(compiler,)h(and)e(is)h(sp)s(eci\014cally)h + (designed)e(to)i(ha)m(v)m(e)199 2303 y(uniform)g(abstractions.)55 + b(This)34 b(c)m(hapter)i(discusses)e(the)h(ma)5 b(jor)35 + b(features)g(of)g(the)g(LL)-10 b(VM)35 b(virtual)g(instruction)199 + 2486 y(set.)42 b(The)29 b(syn)m(tax)i(and)f(seman)m(tics)i(of)e(eac)m + (h)i(instruction)e(are)h(de\014ned)e(in)h(the)h(LL)-10 + b(VM)30 b(reference)h(man)m(ual)g([29)q(].)199 2865 y + Fm(3.1)136 b(Ov)l(erview)46 b(of)f(the)g(LL)-15 b(VM)44 + b(Virtual)h(Instruction)g(Set)199 3137 y Fw(The)40 b(LL)-10 + b(VM)40 b(instruction)g(set)g(represen)m(ts)g(a)g(virtual)h(arc)m + (hitecture)g(that)g(captures)f(the)g(k)m(ey)h(op)s(erations)f(of)199 + 3320 y(ordinary)22 b(pro)s(cessors)f(but)h(a)m(v)m(oids)h(mac)m(hine)g + (sp)s(eci\014c)f(constrain)m(ts)h(suc)m(h)f(as)g(ph)m(ysical)h + (registers,)i(pip)s(elines,)e(lo)m(w-)199 3503 y(lev)m(el)h(calling)f + (con)m(v)m(en)m(tions,)j(or)21 b(traps.)38 b(LL)-10 b(VM)22 + b(pro)m(vides)f(an)h(in\014nite)f(set)i(of)f(t)m(yp)s(ed)f(virtual)h + (registers)g(whic)m(h)g(can)199 3685 y(hold)29 b(v)-5 + b(alues)29 b(of)g(primitiv)m(e)h(t)m(yp)s(es)f(\(in)m(tegral,)i + (\015oating)f(p)s(oin)m(t,)g(or)f(p)s(oin)m(ter)g(v)-5 + b(alues\).)40 b(The)29 b(virtual)g(registers)h(are)199 + 3868 y(in)22 b(Static)h(Single)g(Assignmen)m(t)f(\(SSA\))g(form)g([15)q + (],)i(a)f(widely)f(used)f(represen)m(tation)i(for)f(compiler)h + (optimization,)199 4051 y(as)g(explained)g(in)g(Section)g(3.2.1.)40 + b(The)22 b(LL)-10 b(VM)23 b(t)m(yp)s(e)g(system)g(is)f(explained)h(in)g + (more)g(detail)g(in)g(Section)g(3.3.)40 b(The)199 4233 + y(LL)-10 b(VM)25 b(virtual)g(instruction)g(set)h(also)f(has)g(a)g + (unique)f(mec)m(hanism)h(for)g(explicit)h(represen)m(tation)g(of)f + (exceptional)199 4416 y(con)m(trol)32 b(\015o)m(w,)f(whic)m(h)f(is)g + (describ)s(ed)f(in)i(Section)g(3.5.)340 4599 y(LL)-10 + b(VM)23 b(programs)f(transfer)f(v)-5 b(alues)23 b(b)s(et)m(w)m(een)g + (virtual)g(registers)g(and)e(memory)h(solely)i(via)f + Fr(load)e Fw(and)h Fr(store)199 4782 y Fw(op)s(erations)34 + b(using)e(t)m(yp)s(ed)h(p)s(oin)m(ters.)49 b(Memory)33 + b(is)h(partitioned)f(in)m(to)h(a)g(global)g(area,)h(stac)m(k,)h(and)c + (heap)h(\(with)199 4964 y(pro)s(cedures)38 b(b)s(eing)g(treated)h(as)g + (global)h(ob)5 b(jects\).)66 b(Ob)5 b(jects)39 b(on)f(the)h(stac)m(k)h + (and)e(heap)g(are)h(allo)s(cated)i(using)199 5147 y Fr(alloca)26 + b Fw(and)h Fr(malloc)f Fw(instructions)i(resp)s(ectiv)m(ely)-8 + b(,)30 b(and)d(are)i(accessed)g(through)e(the)h(p)s(oin)m(ter)f(v)-5 + b(alues)28 b(returned)199 5330 y(b)m(y)39 b(these)f(op)s(erations.)66 + b(Stac)m(k)39 b(ob)5 b(jects)39 b(are)g(allo)s(cated)h(in)f(the)f(stac) + m(k)i(frame)e(of)h(the)f(curren)m(t)h(function)f(and)2104 + 5568 y(14)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 43 49 bop 427 91 a Fw(structure)28 b(in)m(to)i(the)f(called)g + (function.)40 b(If)29 b(the)g(function)f(has)h(not)g(already)g(b)s(een) + f(pro)s(cessed,)h(it)g(is)g(added)427 274 y(to)i(the)f(transformation)h + (w)m(ork-list.)286 486 y Fp(void)42 b(ProcessLists\(unsi)o(gn)o(ed)37 + b(N\))43 b({)374 586 y(PoolDescriptor)37 b(L1PD,)42 b(L2PD,)f(P1PD,)h + (P2PD;)374 685 y(List)g(*L1,)f(*L2;)130 b(unsigned)40 + b(i;)374 785 y(poolinit\(&L1PD,)d(sizeof\(List\)\);)374 + 885 y(poolinit\(&L2PD,)g(sizeof\(List\)\);)374 984 y(poolinit\(&P1PD,)g + (sizeof\(Patient\)\))o(;)374 1084 y(poolinit\(&P2PD,)g + (sizeof\(Patient\)\))o(;)374 1283 y(L1)42 b(=)i(\(List*\)poolallo)o + (c\()o(&L1)o(PD)o(,)38 b(1\);)374 1383 y(L2)k(=)i(\(List*\)poolallo)o + (c\()o(&L2)o(PD)o(,)38 b(1\);)374 1582 y(/*)k(populate)f(lists)g(*/)374 + 1682 y(for)h(\(i)h(=)g(0;)g(i)g(!=)g(N;)f(++i\))g({)461 + 1781 y(addList_pa\(L1,)c(&L1PD,)j(poolalloc\(&P1PD)o(,)d(1\)\);)461 + 1881 y(addList_pa\(L2,)g(&L2PD,)j(poolalloc\(&P2PD)o(,)d(1\)\);)374 + 1980 y(})374 2080 y(useLists_pa\(L1,)f(&L1PD,)k(L2,)h(&L2PD\);)374 + 2180 y(pooldestroy\(&L1)o(PD\))o(;)37 b(pooldestroy\(&L2PD)o(\);)374 + 2279 y(pooldestroy\(&P1)o(PD\))o(;)g(pooldestroy\(&P2PD)o(\);)286 + 2379 y(})1095 2575 y Fw(Figure)31 b(4.16:)43 b(Source)30 + b(for)g(p)s(o)s(ol-allo)s(cated)i Fr(ProcessLists)340 + 2864 y Fw(The)22 b(transformed)f Fr(ProcessLists)d Fw(function)k + (\(Figure)g(4.16\))i(allo)s(cates)g(four)d(memory)h(p)s(o)s(ols,)h(one) + f(for)g(eac)m(h)199 3046 y(data)30 b(structure)f(no)s(de)f(in)h(the)h + (t)m(w)m(o)g(disjoin)m(t)g(data)g(structures)e(in)h(it.)41 + b(The)29 b Fr(addList)e Fw(function)i(is)g(transformed)199 + 3229 y(similarly)-8 b(.)199 3602 y Fm(4.4)136 b(External)46 + b(Uses)f(of)h(the)f(LL)-15 b(VM)43 b(Infrastructure)199 + 3875 y Fw(LL)-10 b(VM)32 b(is)g(designed)g(to)h(supp)s(ort)d(a)i(wide)g + (v)-5 b(ariet)m(y)34 b(of)e(compiler)g(researc)m(h)h(with)f(man)m(y)g + (di\013eren)m(t)g(fo)s(cuses)g(and)199 4058 y(needs.)56 + b(One)35 b(of)g(the)h(b)s(est)f(w)m(a)m(ys)h(to)g(ev)-5 + b(aluate)38 b(this)d(capabilit)m(y)i(is)f(to)g(see)g(ho)m(w)f(w)m(ell)i + (p)s(eople)e(other)h(than)f(the)199 4241 y(author)c(use)h(the)f + (system.)44 b(LL)-10 b(VM)31 b(has)g(b)s(een)g(fortunate)h(to)g(ha)m(v) + m(e)h(man)m(y)e(pro)5 b(jects)32 b(use)f(it)h(in)f(a)h(short)f(amoun)m + (t)199 4423 y(of)i(time.)48 b(These)32 b(pro)5 b(jects)33 + b(are)g(brie\015y)f(describ)s(ed)f(b)s(elo)m(w,)j(hi-ligh)m(ting)g(the) + f(features)g(of)f(LL)-10 b(VM)33 b(whic)m(h)f(mak)m(e)199 + 4606 y(them)f(viable.)199 4916 y Fl(4.4.1)113 b(Ensuring)38 + b(Co)s(de)f(Safet)m(y)i(without)e(Run)m(time)g(Chec)m(ks)199 + 5157 y Fw(Ko)m(wshik,)k(Dh)m(urjati)e(and)f(Adv)m(e)h(describ)s(e)f(a)i + (language)g(called)g(Con)m(trol-C)f(whic)m(h)f(is)h(designed)g(to)g + (pro)m(vide)199 5340 y(co)s(de)27 b(safet)m(y)h(and)e(correctness)h + (guaran)m(tees)h Fs(entir)-5 b(ely)28 b Fw(through)e(static)i(analysis) + f([27)q(])g(\(as)g(opp)s(osed)f(to)i(run-time)2104 5568 + y(43)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (20) 21 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 42 48 bop 199 91 a Fl(4.3.3)113 b(T)-9 b(ransforming)38 + b(F)-9 b(unction)38 b(Bo)s(dies)199 333 y Fw(Once)27 + b(a)f(data)i(structure)d(is)i(selected)h(for)e(p)s(o)s(ol)g(allo)s + (cation,)k(the)c(ro)s(ot)h(function)f(m)m(ust)h(b)s(e)e(mo)s(di\014ed)h + (to)h(allo)s(cate)199 515 y(p)s(o)s(ol)33 b(descriptors)f(represen)m + (ting)i(the)f(v)-5 b(arious)33 b(no)s(des)f(in)g(the)h(subgraph.)47 + b(W)-8 b(e)34 b(insert)f(co)s(de)g(to)h(stac)m(k-allo)s(cate)199 + 698 y(a)43 b(p)s(o)s(ol)f(descriptor,)j(initialize)f(the)f(p)s(o)s(ol)e + (descriptor)h(on)g(en)m(try)h(to)g(the)f(function,)j(and)d(destro)m(y)g + (the)h(p)s(o)s(ol)199 881 y(descriptor)33 b(\(and)g(all)h(b)s(o)s(ok-k) + m(eeping)f(information)g(asso)s(ciated)i(with)d(the)i(memory)e(p)s(o)s + (ol\))h(at)h(the)f(exit)h(no)s(des)199 1063 y(of)d(the)f(function.)340 + 1246 y(Once)f(the)g(p)s(o)s(ols)g(are)g(created,)i(the)e(b)s(o)s(dy)e + (of)j(the)f(ro)s(ot)g(function)g(\(and)f(all)i(functions)f(it)g(calls)h + (whic)m(h)f(ha)m(v)m(e)199 1429 y(access)e(to)g(the)f(data)g(structure) + f(b)s(eing)g(pro)s(cessed\))h(m)m(ust)f(b)s(e)h(transformed)e(to)j(use) + e Fr(poolalloc)e Fw(and)i Fr(poolfree)199 1612 y Fw(calls)42 + b(instead)g(of)f Fr(malloc)e Fw(and)i Fr(free)e Fw(LL)-10 + b(VM)41 b(instructions.)73 b(T)-8 b(o)41 b(do)g(this,)j(the)d(p)s(o)s + (ol)g(descriptor)g(m)m(ust)g(b)s(e)199 1794 y(passed)35 + b(in)m(to)h(called)g(functions)e(so)h(that)h(they)f(are)g(a)m(v)-5 + b(ailable)37 b(for)e(the)g(ev)m(en)m(tual)i Fr(poolalloc)32 + b Fw(and)i Fr(poolfree)199 1977 y Fw(calls.)42 b(The)30 + b(algorithm)h(is)g(sho)m(wn)f(in)g(Figure)g(4.15.)199 + 2173 y Fn(P)m(o)s(olAllo)s(cate)p Fw(\(function)i Ff(R)q(ootF)13 + b(n)p Fw(,)30 b(datastructure)g Ff(D)s(S)5 b Fw(\))295 + 2286 y Ff(W)13 b(or)s(k)s(l)r(ist)29 b Fw(=)h Fv(f)p + Ff(R)q(ootF)13 b(n)p Fv(g)295 2399 y(8)30 b Fw(function)g + Ff(F)13 b(n)30 b Fv(2)g Ff(W)13 b(or)s(k)s(l)r(ist)391 + 2512 y Fv(8)30 b Fw(instruction)g Ff(I)38 b Fv(2)30 b + Fw(Instructions\()p Ff(F)13 b(n)p Fw(\))487 2625 y(if)30 + b(UsesDataStructure\()p Ff(I)7 b Fw(,)33 b Ff(D)s(S)5 + b Fw(\))30 b(then)583 2738 y(if)g(IsMallo)s(cOrF)-8 b(ree\()p + Ff(I)7 b Fw(\))33 b(then)679 2851 y(Con)m(v)m(ertT)-8 + b(oP)m(o)s(olF)g(unction\()p Ff(I)7 b Fw(,)34 b Ff(D)s(S)5 + b Fw(\))583 2964 y(elseif)31 b(IsCall\()p Ff(I)7 b Fw(\))32 + b(then)679 3077 y(AddP)m(o)s(olArgumen)m(ts\()p Ff(I)7 + b Fw(,)31 b Ff(D)s(S)5 b Fw(\))679 3189 y Ff(W)13 b(or)s(k)s(l)r(ist)29 + b Fw(=)h Ff(W)13 b(or)s(k)s(l)r(ist)1585 3125 y Fb(S)1684 + 3189 y Fw(CalledF)-8 b(unction\()p Ff(I)7 b Fw(\))1200 + 3485 y(Figure)31 b(4.15:)42 b(F)-8 b(unction)31 b(transformation)g + (algorithm)340 3767 y(The)25 b(transformation)h(iterates)h(through)e(a) + h(w)m(ork-list)h(of)e(functions)g(to)i(pro)s(cess,)f(transforming)f + (eac)m(h)i(func-)199 3950 y(tion)34 b(un)m(til)f(the)g(w)m(ork-list)h + (is)f(empt)m(y)-8 b(.)49 b(Initially)34 b(the)f(w)m(ork-list)h(is)e + (seeded)h(with)g(the)g(ro)s(ot)g(function,)h(and)e(it)h(is)199 + 4133 y(expanded)d(whenev)m(er)g(a)h(call)h(to)g(an)e(un)m(transformed)f + (function)i(is)f(encoun)m(tered.)42 b(The)30 b(b)s(o)s(dy)f(of)i(a)g + (function)f(is)199 4315 y(transformed)g(according)h(to)g(the)g(follo)m + (wing)h(rules:)336 4598 y Fv(\017)46 b Fr(malloc)31 b + Fw(and)i Fr(free)f Fw(op)s(erations)i(referring)f(to)h(the)f(p)s(o)s + (ol)g(allo)s(cated)j(data)e(structure)e(are)i(c)m(hanged)g(in)m(to)427 + 4780 y(calls)d(to)g(the)g Fr(poolalloc)d Fw(and)h Fr(poolfree)f + Fw(library)i(functions.)336 5038 y Fv(\017)46 b Fw(F)-8 + b(unction)44 b(calls)g(whic)m(h)g(tak)m(e)h(a)f(p)s(oin)m(ter)f(in)m + (to)i(the)f(data)g(structure)f(as)h(an)f(argumen)m(t,)48 + b(or)43 b(return)g(a)427 5220 y(p)s(oin)m(ter)26 b(that)i(is)e(part)h + (of)g(the)g(data)g(structure,)g(are)g(mo)s(di\014ed)f(to)h(pass)g(the)g + (p)s(o)s(ol)f(descriptor)h(of)g(the)f(data)2104 5568 + y(42)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 15 21 bop 199 91 a Fw(are)39 b(automatically)i(freed)c(when)g(con)m + (trol)j(lea)m(v)m(es)g(the)e(function.)63 b(Heap)39 b(ob)5 + b(jects)39 b(m)m(ust)f(b)s(e)f(explicitly)j(freed)199 + 274 y(using)29 b(a)h Fr(free)e Fw(instruction.)40 b(The)29 + b(motiv)-5 b(ation)31 b(and)e(implemen)m(tation)i(of)e(these)h(op)s + (erations)f(are)h(explained)f(in)199 457 y(Section)i(3.4)h(b)s(elo)m + (w.)340 639 y(Note)j(that)e(LL)-10 b(VM)33 b(is)g(a)g(virtual)g + (instruction)g(set:)47 b(it)33 b(do)s(es)f(not)i(de\014ne)e(run)m(time) + g(and)h(op)s(erating)g(system)199 822 y(functions)d(suc)m(h)g(as)h + (I/O,)f(memory)h(managemen)m(t)g(\(in)g(particular,)g(garbage)g + (collection\),)j(signals,)d(and)f(man)m(y)199 1005 y(others.)39 + b(These)22 b(features)h(are)g(de\014ned)f(b)m(y)g(run)m(time)h + (libraries)g(and)f(APIs)g(that)i(programs)e(link)h(against.)39 + b(On)22 b(the)199 1187 y(other)32 b(hand,)f(the)g(LL)-10 + b(VM)32 b(virtual)f(instruction)h(set)g(is)f(a)h Fs(\014rst)i(class)g + (language)e Fw(whic)m(h)f(has)g(a)h(textual,)h(binary)-8 + b(,)199 1370 y(and)30 b(in-memory)g(represen)m(tation.)42 + b(The)30 b(implications)i(of)e(this)g(decision)h(are)g(discussed)f(in)g + (Section)h(3.6.)199 1749 y Fm(3.2)136 b(Three-Address)44 + b(Co)t(de)199 2022 y Fw(Three-address)c(co)s(de)h(has)f(b)s(een)g(the)g + (represen)m(tation)i(of)f(c)m(hoice)h(for)e(RISC)g(arc)m(hitectures)i + (and)d(language-)199 2204 y(indep)s(enden)m(t)27 b(compiler)h + (optimizations)i(for)e(man)m(y)g(y)m(ears.)40 b(It)28 + b(is)g(v)m(ery)g(close)h(in)f(spirit)g(to)g(mac)m(hine)h(co)s(de,)f + (with)199 2387 y(a)38 b(small)f(n)m(um)m(b)s(er)f(of)i(simple,)h + (orthogonal)f(op)s(erations.)62 b(Three-address)36 b(co)s(de)h(can)g(b) + s(e)g(easily)h(compressed,)199 2570 y(allo)m(wing)32 + b(for)e(high)g(densit)m(y)h(LL)-10 b(VM)30 b(\014les.)340 + 2752 y(Most)41 b(LL)-10 b(VM)39 b(op)s(erations,)j(including)d(all)h + (arithmetic)h(and)e(logical)j(op)s(erations,)g(are)d(in)g + (three-address)199 2935 y(form:)44 b(they)33 b(tak)m(e)g(one)g(or)f(t)m + (w)m(o)i(op)s(erands)d(and)g(pro)s(duce)g(a)i(single)g(result.)46 + b(LL)-10 b(VM)32 b(includes)g(a)g(standard)g(and)199 + 3118 y(v)m(ery)j(orthogonal)h(set)973 3085 y Fk(1)1047 + 3118 y Fw(of)f(arithmetic)g(and)f(logical)j(op)s(erations:)49 + b Fr(add)p Fw(,)35 b Fr(sub)p Fw(,)g Fr(mul)p Fw(,)f + Fr(div)p Fw(,)h Fr(rem)p Fw(,)g Fr(not)p Fw(,)g Fr(and)p + Fw(,)g Fr(or)p Fw(,)199 3300 y Fr(xor)p Fw(,)h Fr(shl)p + Fw(,)g Fr(shr)p Fw(,)g(and)e Fr(set)p Fh(cc)p Fw(.)54 + b(The)35 b(latter)h(\()p Fr(set)p Fh(cc)p Fw(\))f(is)g(actually)i(a)f + (collection)i(of)d(comparison)g(instructions)199 3483 + y(with)e(di\013eren)m(t)g(op)s(erators)h(\(e.g.,)h Fr(seteq)p + Fw(,)e Fr(setlt)p Fw(,)f(etc...\))51 b(that)33 b(pro)s(duce)f(a)h(b)s + (o)s(olean)g(result.)49 b(In)32 b(addition)h(to)199 3666 + y(simple)22 b(binary)g(instructions,)h(some)g(instructions)f(tak)m(e)i + (0,)g(3,)g(or)e(a)h(v)-5 b(ariable)23 b(n)m(um)m(b)s(er)d(of)j(op)s + (erands.)36 b(Imp)s(ortan)m(t)199 3849 y(examples)31 + b(include)f Fr(call)g Fw(instructions)g(and)f(the)i Fr(phi)f + Fw(instruction)g(used)f(to)j(represen)m(t)e(co)s(de)h(in)f(SSA)f(form.) + 340 4031 y(A)40 b(k)m(ey)h(p)s(oin)m(t)e(is)h(that)g(LL)-10 + b(VM)40 b(instructions)g(are)g(p)s(olymorphic:)58 b(a)40 + b(single)h(instruction)e(\(lik)m(e)j Fr(add)p Fw(\))d(can)199 + 4214 y(op)s(erate)26 b(on)f(sev)m(eral)h(di\013eren)m(t)f(t)m(yp)s(es)g + (of)g(op)s(erands.)38 b(This)24 b(greatly)j(reduces)d(the)h(n)m(um)m(b) + s(er)f(of)h(distinct)g(op)s(co)s(des.)199 4397 y(In)32 + b(particular,)j(w)m(e)e(do)g(not)g(require)g(di\013eren)m(t)g(op)s(co)s + (des)g(for)f(op)s(erations)i(on)f(signed)f(and)h(unsigned)f(in)m + (tegers,)199 4579 y(single-)i(or)e(double-precision)g(\015oating)i(p)s + (oin)m(t)e(v)-5 b(alues,)33 b(arithmetic)h(or)e(logical)j(shifts,)e + (etc.)47 b(The)32 b(t)m(yp)s(es)g(of)h(the)199 4762 y(op)s(erands)d + (automatically)k(de\014ne)d(the)g(seman)m(tics)i(of)e(the)h(op)s + (eration)f(and)g(the)g(t)m(yp)s(e)h(of)f(the)h(result,)f(and)g(they)199 + 4945 y(m)m(ust)g(follo)m(w)g(strict)g(t)m(yp)s(e)g(rules)f(de\014ned)f + (in)h(the)g(reference)h(man)m(ual)g([29)q(].)340 5127 + y(F)-8 b(or)37 b(example,)h(Figure)e(3.1)h(illustrates)g(some)f(simple) + g(LL)-10 b(VM)35 b(op)s(erations.)57 b(In)35 b(this)h(example,)i(the)e + (t)m(yp)s(e)p 199 5206 1560 4 v 303 5260 a Fj(1)337 5292 + y Fi(F)-6 b(or)26 b(example,)g(there)g(are)g(no)g(unary)f(op)r + (erators:)35 b Fg(not)27 b Fi(and)e Fg(neg)h Fi(are)h(implemen)n(ted)e + (in)h(terms)g(of)g Fg(xor)g Fi(and)g Fg(sub)g Fi(resp)r(ectiv)n(ely)-6 + b(.)2104 5568 y Fw(15)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (21) 22 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 16 22 bop 533 113 a Fr(\045X)48 b(=)f(div)g(int)g(4,)g(9)859 + b(;)47 b(Signed)f(integer)g(division)533 226 y(\045Y)i(=)f(div)g(uint)g + (12,)f(4)764 b(;)47 b(Unsigned)f(integer)g(division)533 + 339 y(\045cond)h(=)g(setlt)g(int)f(\045X,)h(8)573 b(;)47 + b(Produces)f(a)h(boolean)f(value)533 452 y(br)i(bool)e(\045cond,)g + (label)h(\045True,)f(label)g(\045False)438 565 y(True:)533 + 677 y(...)940 973 y Fw(Figure)31 b(3.1:)42 b(LL)-10 b(VM)30 + b(co)s(de)h(snipp)s(et)e(illustrating)j(t)m(yp)s(ed)e(op)s(erations)199 + 1248 y(information)36 b(determines)f(whether)f(to)i(p)s(erform)e(a)h + (signed)g(or)g(unsigned)f(division,)j(and)e(whether)f(the)h(com-)199 + 1431 y(parison)30 b(should)g(b)s(e)f(signed)i(or)f(unsigned.)199 + 1746 y Fl(3.2.1)113 b(Static)37 b(Single)h(Assignmen)m(t)g(F)-9 + b(orm)199 1987 y Fw(LL)f(VM)28 b(uses)g(Static)h(Single)f(Assignmen)m + (t)h(\(SSA\))e(form)h(as)g(its)g(primary)f(co)s(de)h(represen)m + (tation.)41 b(A)28 b(program)g(is)199 2170 y(said)i(to)h(b)s(e)e(in)h + (SSA)f(form)h(if)g(eac)m(h)h(of)f(its)g(v)-5 b(ariables)31 + b(is)f(de\014ned)f(exactly)j(once,)f(and)e(eac)m(h)i(use)f(of)g(a)g(v) + -5 b(ariable)31 b(is)199 2353 y(dominated)h(b)m(y)g(that)h(v)-5 + b(ariable's)33 b(de\014nition.)45 b(SSA)31 b(form)h(greatly)h + (simpli\014es)f(man)m(y)g(data\015o)m(w)g(optimizations)199 + 2535 y(b)s(ecause)k(only)f(a)h(single)g(de\014nition)f(can)h(reac)m(h)g + (a)g(particular)g(use)f(of)g(a)h(v)-5 b(alue,)38 b(and)c(\014nding)g + (that)j(de\014nition)199 2718 y(is)f(trivial.)56 b(It)36 + b(also)g(enables)g(fast)g(\015o)m(w-insensitiv)m(e)g(algorithms)h(to)f + (ac)m(hiev)m(e)h(man)m(y)f(of)f(the)h(b)s(ene\014ts)e(of)i(\015o)m(w-) + 199 2901 y(sensitiv)m(e)f(algorithms)f(without)f(exp)s(ensiv)m(e)g + (data\015o)m(w)h(analysis)g(\(sometimes)h(referred)d(to)i(as)g(the)f + (sparseness)199 3084 y(prop)s(ert)m(y\).)340 3266 y(One)39 + b(implication)h(of)f(the)h(\\single)g(de\014nition")f(prop)s(ert)m(y)f + (is)h(that)h(eac)m(h)g(instruction)f(that)h(computes)f(a)199 + 3449 y(v)-5 b(alue)43 b(\(e.g.,)j Fr(add)h(int)g(\045x,)g(\045y)p + Fw(\))42 b(implicitly)h(creates)g(a)f(new)g(virtual)g(register)h + (holding)e(that)i(v)-5 b(alue.)76 b(The)199 3632 y(v)-5 + b(alue)32 b(ma)m(y)f(b)s(e)f(giv)m(en)i(an)f(explicit)h(name)f(\(e.g.,) + i Fr(\045z)47 b(=)h(add)f(...)p Fw(\);)31 b(if)g(not,)g(a)g(unique)f + (name)h(is)g(automatically)199 3814 y(assigned)41 b(b)m(y)f(the)h(LL) + -10 b(VM)41 b(system.)71 b(This)40 b(prop)s(ert)m(y)g(enables)g + (\\uses")h(in)g(LL)-10 b(VM)40 b(to)h(refer)g(directly)g(to)g(the)199 + 3997 y(op)s(eration)31 b(that)g(computes)g(the)f(v)-5 + b(alue,)31 b(enabling)g(e\016cien)m(t)h(tra)m(v)m(ersal)g(of)f(def-use) + f(information.)340 4180 y(When)37 b(con)m(trol)h(\015o)m(w)e(is)h(tak)m + (en)h(in)m(to)f(accoun)m(t,)j(simple)d(v)-5 b(ariable)37 + b(renaming)f(is)h(not)g(enough)f(for)h(co)s(de)f(to)199 + 4362 y(b)s(e)f(in)g(v)-5 b(alid)35 b(SSA)f(form.)55 b(T)-8 + b(o)36 b(handle)e(con)m(trol)j(\015o)m(w)e(merges,)i(SSA)d(form)h + (de\014nes)f(the)i Ff(\036)f Fw(function,)h(whic)m(h)f(is)199 + 4545 y(used)e(to)i(select)g(an)f(incoming)h(v)-5 b(alue)34 + b(dep)s(ending)e(on)i(whic)m(h)g(basic)g(blo)s(c)m(k)g(con)m(trol)i + (\015o)m(w)e(came)g(from.)51 b(LL)-10 b(VM)199 4728 y(pro)m(vides)28 + b(a)g Fr(phi)e Fw(instruction)i(whic)m(h)f(corresp)s(onds)g(to)h(the)g + (SSA)e Ff(\036)p Fw(-no)s(de.)40 b(The)27 b(syn)m(tax)h(of)g(this)f + (instruction)h(is:)527 5093 y Fr()46 b(=)h(phi)g()f + ([,)g(],)f(...)94 b(,)48 b([,)d(])2104 + 5568 y Fw(16)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 41 47 bop 199 91 a Fw(tra)m(v)m(ersing)32 b(the)f(p)s(o)s(ol)f + (descriptors)g(for)g(the)g(data)h(structure.)199 407 + y Fl(4.3.2)113 b(Iden)m(tifying)38 b(Candidate)h(Data)f(Structures)199 + 648 y Fw(In)33 b(order)f(to)i(p)s(o)s(ol)f(allo)s(cate)j(a)d(data)h + (structure,)g(w)m(e)g(m)m(ust)f(detect)h(the)g(b)s(ounds)d(on)i(the)g + (lifetime)i(of)e(the)g(data)199 831 y(structure)i(\(to)h(allo)s(cate)i + (and)d(delete)i(the)e(p)s(o)s(ols)g(themselv)m(es\))i(and)d(determine)i + (whether)e(it)i(is)g Fs(safe)f Fw(to)h(p)s(o)s(ol-)199 + 1013 y(allo)s(cate)d(the)e(data)g(structure.)40 b(W)-8 + b(e)32 b(use)e(the)g(data)h(structure)f(analysis)h(graph)f(for)g(b)s + (oth)g(purp)s(oses.)340 1196 y(Using)45 b(the)f(data)g(structure)g + (graph,)j(w)m(e)d(detect)i(data)e(structures)g(whose)f(lifetimes)j(are) + e(b)s(ound)e(b)m(y)i(a)199 1379 y(function)23 b(lifetime,)i(allo)m + (wing)g(us)c(to)j(allo)s(cate)h(the)e(p)s(o)s(ol)f(on)g(en)m(try)h(to)g + (the)g(function)f(and)g(deallo)s(cate)j(it)e(when)f(the)199 + 1561 y(function)31 b(returns.)42 b(Automatic)33 b(P)m(o)s(ol)f(Allo)s + (cation)i(iden)m(ti\014es)d(these)h(candidates)g(b)m(y)f(scanning)g + (the)h(functions)199 1744 y(in)e(the)h(program,)f(insp)s(ecting)h(the)f + (Bottom-Up)i(graph)e(for)g(eac)m(h)i(function.)340 1927 + y(The)24 b(lifetime)h(of)f(a)g(data)g(structure)g(is)g(con)m(tained)h + (the)e(curren)m(t)h(function)g(if)f(the)h(data)h(structures)e(subgraph) + 199 2109 y(w)m(ould)k(b)s(e)g(unreac)m(hable)g(without)g(the)h(edges)f + (due)g(to)h(the)f(scalar)h(p)s(oin)m(ter)f(map)g(\(i.e.,)j(no)d + (globals)h(p)s(oin)m(t)f(to)h(the)199 2292 y(structure,)c(and)e(it)h + (is)f(not)h(returned)e(from)h(the)g(curren)m(t)g(function\).)39 + b(This)21 b(escap)s(e)i(analysis)g(\(whic)m(h)f(is)h(similar)f(to)199 + 2475 y(the)k(p)s(oin)m(ts-to)g(escap)s(e)g(analysis)g(of)f([45)q(]\))h + (is)f(a)h(conserv)-5 b(ativ)m(e,)29 b(but)24 b(e\013ectiv)m(e,)29 + b(heuristic)d(for)f(the)g(appro)m(ximation)199 2658 y(of)32 + b(data)g(structure)f(lifetime.)45 b(W)-8 b(e)33 b(refer)e(to)h(the)g + (function)f(whose)g(lifetime)i(b)s(ounds)c(the)j(lifetime)g(of)g(the)f + (data)199 2840 y(structure)f(as)g(the)h(\\ro)s(ot")g(function,)f(b)s + (ecause)h(it)f(is)g(the)h(ro)s(ot)f(of)h(a)f(subtree)g(of)g(the)h(call) + g(graph)f(that)h(needs)e(to)199 3023 y(b)s(e)h(mo)s(di\014ed)f(to)i + (handle)f(p)s(o)s(ol)g(allo)s(cation.)340 3206 y(It)36 + b(is)f(safe)h(to)g(con)m(v)m(ert)h(a)e(data)h(structure)f(to)h(use)f(p) + s(o)s(ol)g(allo)s(cation)i(if)f(Automatic)g(P)m(o)s(ol)h(Allo)s(cation) + g(can)199 3388 y(pro)m(v)m(e)31 b(that)f(the)g(data)h(structure)e(is)h + (used)f(in)h(a)g(t)m(yp)s(e-safe)h(w)m(a)m(y)-8 b(.)42 + b(Using)30 b(the)g(Data)i(Structure)d(Analysis)h(graph)199 + 3571 y(for)22 b(the)g(function,)i(a)e(data)g(structure)g(is)g(t)m(yp)s + (e-safe)h(if)f(none)f(of)h(its)h(no)s(des)e(are)h(collapsed,)j(and)c + (none)h(of)g(the)g(no)s(des)199 3754 y(are)36 b(incomplete)h + (\(indicating)g(that)f(the)g(no)s(de)f(ma)m(y)h(b)s(e)f(collapsed,)j + (but)d(it)h(is)g(not)g(kno)m(wn)f(in)g(this)h(con)m(text\).)199 + 3936 y(This)30 b(iden)m(ti\014cation)i(algorithm)f(is)g(sho)m(wn)e(in)h + (Figure)h(4.14.)199 4133 y Fn(P)m(o)s(olAllo)s(cateProgram)p + Fw(\(program)i Ff(P)13 b(r)s(og)s Fw(\))295 4246 y Fv(8)30 + b Fw(function)g Ff(F)13 b(n)30 b Fv(2)g Ff(P)13 b(r)s(og)391 + 4359 y Fv(8)30 b Fw(disjoin)m(tdatastructure)h Ff(D)s(S)k + Fv(2)30 b Fw(BUDSGraph\()p Ff(F)13 b(n)p Fw(\))487 4471 + y(if)30 b(CollapsedNo)s(des\()p Ff(D)s(S)5 b Fw(\))1438 + 4407 y Fb(S)1537 4471 y Fw(IncompleteNo)s(des\()p Ff(D)s(S)g + Fw(\))32 b(=)e Fv(;)g Fw(then)583 4584 y(if)g Fv(:)p + Fw(escap)s(es\()p Ff(D)s(S)5 b Fw(\))31 b(then)679 4697 + y(P)m(o)s(olAllo)s(cate\()p Ff(F)13 b(n)p Fw(,)34 b Ff(D)s(S)5 + b Fw(\))1206 4880 y(Figure)31 b(4.14:)43 b(Candidate)30 + b(iden)m(ti\014cation)i(algorithm)2104 5568 y(41)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (22) 23 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 40 46 bop 199 91 a Fl(4.3.1)113 b(Run)m(time)37 b(Supp)s(ort)h(for)g(P) + m(o)s(ol)f(Allo)s(cation)199 333 y Fw(W)-8 b(e)47 b(designed)e(a)g + (simple)g(p)s(o)s(ol)g(allo)s(cation)i(run)m(time)e(library)g(with)g + (four)f(external)i(functions)f(\()p Fr(poolinit)p Fw(,)199 + 515 y Fr(pooldestroy)p Fw(,)29 b Fr(poolalloc)p Fw(,)h + Fr(poolfree)p Fw(\),)g(and)h(one)g(data)i(t)m(yp)s(e)e(\(the)h(p)s(o)s + (ol)f(descriptor\).)45 b(W)-8 b(e)32 b(transform)f(the)199 + 698 y(program)d(to)i(pass)e(the)g(p)s(o)s(ol)h(descriptors)f(in)m(to)h + (functions)f(that)h(m)m(ust)g(allo)s(cate)i(or)d(free)h(no)s(des)e + (from)h(or)h(to)g(the)199 881 y(p)s(o)s(ol.)41 b(In)29 + b(this)i(w)m(a)m(y)-8 b(,)32 b(the)e(p)s(o)s(ol)g(descriptor)g(is)h + (alw)m(a)m(ys)h(a)m(v)-5 b(ailable)32 b(where)e(it)h(is)g(needed.)340 + 1063 y(Our)f(p)s(o)s(ol)h(allo)s(cator)i(assumes)e(that)h(a)f(memory)g + (p)s(o)s(ol)g(consists)h(of)f(uniformly)f(sized)i(ob)5 + b(jects,)32 b(but)e(it)i(can)199 1246 y(allo)s(cate)44 + b(m)m(ultiple)e(consecutiv)m(e)i(ob)5 b(jects)42 b(if)g(needed)f(\(for) + h(arra)m(ys)f(of)h(ob)5 b(jects\).)75 b(When)42 b(p)s(o)s(ol)f(allo)s + (cating)j(a)199 1429 y(complex)34 b(data)g(structure)e(\(for)h + (example,)i(the)e(main)g(data)g(structure)g(for)g(the)g + Fr(power)e Fw(b)s(enc)m(hmark)h(from)h(the)199 1612 y(Olden)j(suite,)i + (sho)m(wn)e(in)g(Figure)h(4.13\(a\)\))i(eac)m(h)f(data)f(structure)f + (no)s(de)g(in)g(the)g(graph)g(is)h(allo)s(cated)h(from)e(a)199 + 1794 y(di\013eren)m(t)30 b(p)s(o)s(ol)g(in)f(memory)-8 + b(.)41 b(This)29 b(simple)h(heuristic)f(groups)h(memory)f(ob)5 + b(jects)31 b(together)g(of)f(the)g(same)g(t)m(yp)s(e,)199 + 1977 y(whic)m(h)j(w)m(orks)f(w)m(ell)i(for)e(tree)i(no)s(des,)e(link)m + (ed)h(lists,)h(and)e(other)h(hea)m(vily)h(recursiv)m(e)f(structures.)47 + b(In)32 b(the)h Fr(power)199 2160 y Fw(b)s(enc)m(hmark)26 + b(example,)i(there)e(are)h(four)e(memory)i(p)s(o)s(ols,)f(eac)m(h)i + (corresp)s(onding)d(to)i(a)g(lev)m(el)h(of)e(a)h(heterogeneous)199 + 2342 y(\\tree")32 b(structure)e(\(eac)m(h)i(lev)m(el)g(is)f(a)f(link)m + (ed)h(list)g(of)g(no)s(des\).)1081 3748 y @beginspecial + 35 @llx 35 @lly 163 @urx 317 @ury 1440 @rhi @setspecial + %%BeginDocument: figs/power.ps + %!PS-Adobe-2.0 + %%Creator: dot version 1.8.9 (Sun Sep 22 16:57:48 CDT 2002) + %%For: (lattner) Chris Lattner + %%Title: DataStructures + %%Pages: (atend) + %%BoundingBox: 35 35 163 317 + %%EndComments + save + %%BeginProlog + /DotDict 200 dict def + DotDict begin + + /setupLatin1 { + mark + /EncodingVector 256 array def + EncodingVector 0 + + ISOLatin1Encoding 0 255 getinterval putinterval + + EncodingVector + dup 306 /AE + dup 301 /Aacute + dup 302 /Acircumflex + dup 304 /Adieresis + dup 300 /Agrave + dup 305 /Aring + dup 303 /Atilde + dup 307 /Ccedilla + dup 311 /Eacute + dup 312 /Ecircumflex + dup 313 /Edieresis + dup 310 /Egrave + dup 315 /Iacute + dup 316 /Icircumflex + dup 317 /Idieresis + dup 314 /Igrave + dup 334 /Udieresis + dup 335 /Yacute + dup 376 /thorn + dup 337 /germandbls + dup 341 /aacute + dup 342 /acircumflex + dup 344 /adieresis + dup 346 /ae + dup 340 /agrave + dup 345 /aring + dup 347 /ccedilla + dup 351 /eacute + dup 352 /ecircumflex + dup 353 /edieresis + dup 350 /egrave + dup 355 /iacute + dup 356 /icircumflex + dup 357 /idieresis + dup 354 /igrave + dup 360 /dcroat + dup 361 /ntilde + dup 363 /oacute + dup 364 /ocircumflex + dup 366 /odieresis + dup 362 /ograve + dup 365 /otilde + dup 370 /oslash + dup 372 /uacute + dup 373 /ucircumflex + dup 374 /udieresis + dup 371 /ugrave + dup 375 /yacute + dup 377 /ydieresis + + % Set up ISO Latin 1 character encoding + /starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont + } def + /Times-Roman starnetISO def + /Times-Italic starnetISO def + /Times-Bold starnetISO def + /Times-BoldItalic starnetISO def + /Helvetica starnetISO def + /Helvetica-Oblique starnetISO def + /Helvetica-Bold starnetISO def + /Helvetica-BoldOblique starnetISO def + /Courier starnetISO def + /Courier-Oblique starnetISO def + /Courier-Bold starnetISO def + /Courier-BoldOblique starnetISO def + cleartomark + } bind def + + %%BeginResource: procset + /coord-font-family /Times-Roman def + /default-font-family /Times-Roman def + /coordfont coord-font-family findfont 8 scalefont def + + /InvScaleFactor 1.0 def + /set_scale { + dup 1 exch div /InvScaleFactor exch def + dup scale + } bind def + + % styles + /solid { [] 0 setdash } bind def + /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def + /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def + /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def + /bold { 2 setlinewidth } bind def + /filled { } bind def + /unfilled { } bind def + /rounded { } bind def + /diagonals { } bind def + + % hooks for setting color + /nodecolor { sethsbcolor } bind def + /edgecolor { sethsbcolor } bind def + /graphcolor { sethsbcolor } bind def + /nopcolor {pop pop pop} bind def + + /beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if + } bind def + + /set_font { + findfont exch + scalefont setfont + } def + + % draw aligned label in bounding box aligned to current point + /alignedtext { % width adj text + /text exch def + /adj exch def + /width exch def + gsave + width 0 gt { + text stringwidth pop adj mul 0 rmoveto + } if + [] 0 setdash + text show + grestore + } def + + /boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath + } bind def + + /ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix + } bind def + + /endpage { showpage } bind def + + /layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] + def + + /setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def + } bind def + + /onlayer { curlayer ne {invis} if } def + + /onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if + } def + + /curlayer 0 def + + %%EndResource + %%EndProlog + %%BeginSetup + 14 default-font-family set_font + 1 setmiterlimit + % /arrowlength 10 def + % /arrowwidth 5 def + + % make sure pdfmark is harmless for PS-interpreters other than Distiller + /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse + % make '<<' and '>>' safe on PS Level 1 devices + /languagelevel where {pop languagelevel}{1} ifelse + 2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put + } if + + %%EndSetup + %%Page: 1 1 + %%PageBoundingBox: 36 36 163 317 + %%PageOrientation: Portrait + gsave + 35 35 128 282 boxprim clip newpath + 36 36 translate + 0 0 1 beginpage + 0 0 translate 0 rotate + 0.000 0.000 0.000 graphcolor + 14.00 /Times-Roman set_font + + % Node0x4401e8 + gsave 10 dict begin + newpath 19 232 moveto + 51 232 lineto + stroke + newpath 51 232 moveto + 56 232 63 237 63 243 curveto + stroke + newpath 63 243 moveto + 63 259 lineto + stroke + newpath 63 259 moveto + 63 265 57 272 51 272 curveto + stroke + newpath 51 272 moveto + 19 272 lineto + stroke + newpath 19 272 moveto + 14 272 8 266 8 260 curveto + stroke + newpath 8 260 moveto + 8 244 lineto + stroke + newpath 8 244 moveto + 8 238 13 232 19 232 curveto + stroke + gsave 10 dict begin + 35 257 moveto 41 -0.5 (%root) alignedtext + end grestore + newpath 8 252 moveto + 63 252 lineto + stroke + gsave 10 dict begin + 35 237 moveto 4 -0.5 ( ) alignedtext + end grestore + end grestore + + % Node0x4425b0 + gsave 10 dict begin + newpath 12 156 moveto + 57 156 lineto + stroke + newpath 57 156 moveto + 63 156 70 161 70 167 curveto + stroke + newpath 70 167 moveto + 70 183 lineto + stroke + newpath 70 183 moveto + 70 189 63 196 57 196 curveto + stroke + newpath 57 196 moveto + 12 196 lineto + stroke + newpath 12 196 moveto + 6 196 0 190 0 184 curveto + stroke + newpath 0 184 moveto + 0 168 lineto + stroke + newpath 0 168 moveto + 0 162 6 156 12 156 curveto + stroke + gsave 10 dict begin + 35 181 moveto 56 -0.5 (%lateral) alignedtext + end grestore + newpath 0 176 moveto + 70 176 lineto + stroke + gsave 10 dict begin + 17 161 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 35 156 moveto + 35 176 lineto + stroke + gsave 10 dict begin + 52 161 moveto 4 -0.5 ( ) alignedtext + end grestore + end grestore + + % Node0x4401e8 -> Node0x4425b0 + newpath 35 227 moveto + 35 221 35 213 35 206 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 35 229 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 38 206 moveto + 35 196 lineto + 33 206 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x4425b0 -> Node0x4425b0 + newpath 36 153 moveto + 52 143 74 133 88 147 curveto + 106 165 106 186 88 205 curveto + 80 212 70 209 61 202 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 34 154 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 62 200 moveto + 53 196 lineto + 60 204 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x4427a8 + gsave 10 dict begin + newpath 25 80 moveto + 77 80 lineto + stroke + newpath 77 80 moveto + 83 80 90 85 90 91 curveto + stroke + newpath 90 91 moveto + 90 107 lineto + stroke + newpath 90 107 moveto + 90 113 84 120 78 120 curveto + stroke + newpath 78 120 moveto + 26 120 lineto + stroke + newpath 26 120 moveto + 20 120 14 114 14 108 curveto + stroke + newpath 14 108 moveto + 14 92 lineto + stroke + newpath 14 92 moveto + 14 86 19 80 25 80 curveto + stroke + gsave 10 dict begin + 52 105 moveto 62 -0.5 (%branch) alignedtext + end grestore + newpath 14 100 moveto + 90 100 lineto + stroke + gsave 10 dict begin + 33 85 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 52 80 moveto + 52 100 lineto + stroke + gsave 10 dict begin + 71 85 moveto 4 -0.5 ( ) alignedtext + end grestore + end grestore + + % Node0x4425b0 -> Node0x4427a8 + newpath 52 151 moveto + 52 145 52 137 52 130 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 52 153 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 55 130 moveto + 52 120 lineto + 50 130 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x4427a8 -> Node0x4427a8 + newpath 51 77 moveto + 68 67 93 56 108 71 curveto + 126 89 126 110 108 129 curveto + 99 137 88 133 78 126 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 49 78 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 80 125 moveto + 71 120 lineto + 77 128 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x4427f8 + gsave 10 dict begin + newpath 55 8 moveto + 86 8 lineto + stroke + newpath 86 8 moveto + 91 8 98 13 98 19 curveto + stroke + newpath 98 19 moveto + 98 32 lineto + stroke + newpath 98 32 moveto + 98 38 92 44 86 44 curveto + stroke + newpath 86 44 moveto + 55 44 lineto + stroke + newpath 55 44 moveto + 50 44 44 38 44 32 curveto + stroke + newpath 44 32 moveto + 44 19 lineto + stroke + newpath 44 19 moveto + 44 13 49 8 55 8 curveto + stroke + gsave 10 dict begin + 71 21 moveto 40 -0.5 (%leaf) alignedtext + end grestore + end grestore + + % Node0x4427a8 -> Node0x4427f8 + newpath 71 75 moveto + 71 68 71 61 71 54 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 71 77 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 74 54 moveto + 71 44 lineto + 69 54 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + endpage + grestore + %%PageTrailer + %%EndPage: 1 + %%Trailer + %%Pages: 1 + end + restore + %%EOF + + %%EndDocument + @endspecial 936 3944 a Fi(\(a\))25 b(Data)h(structure)g(graph)2619 + 3748 y @beginspecial 35 @llx 35 @lly 188 @urx 317 @ury + 1440 @rhi @setspecial + %%BeginDocument: figs/power_pools.ps + %!PS-Adobe-2.0 + %%Creator: dot version 1.8.9 (Sun Sep 22 16:57:48 CDT 2002) + %%For: (lattner) Chris Lattner + %%Title: DataStructures + %%Pages: (atend) + %%BoundingBox: 35 35 188 317 + %%EndComments + save + %%BeginProlog + /DotDict 200 dict def + DotDict begin + + /setupLatin1 { + mark + /EncodingVector 256 array def + EncodingVector 0 + + ISOLatin1Encoding 0 255 getinterval putinterval + + EncodingVector + dup 306 /AE + dup 301 /Aacute + dup 302 /Acircumflex + dup 304 /Adieresis + dup 300 /Agrave + dup 305 /Aring + dup 303 /Atilde + dup 307 /Ccedilla + dup 311 /Eacute + dup 312 /Ecircumflex + dup 313 /Edieresis + dup 310 /Egrave + dup 315 /Iacute + dup 316 /Icircumflex + dup 317 /Idieresis + dup 314 /Igrave + dup 334 /Udieresis + dup 335 /Yacute + dup 376 /thorn + dup 337 /germandbls + dup 341 /aacute + dup 342 /acircumflex + dup 344 /adieresis + dup 346 /ae + dup 340 /agrave + dup 345 /aring + dup 347 /ccedilla + dup 351 /eacute + dup 352 /ecircumflex + dup 353 /edieresis + dup 350 /egrave + dup 355 /iacute + dup 356 /icircumflex + dup 357 /idieresis + dup 354 /igrave + dup 360 /dcroat + dup 361 /ntilde + dup 363 /oacute + dup 364 /ocircumflex + dup 366 /odieresis + dup 362 /ograve + dup 365 /otilde + dup 370 /oslash + dup 372 /uacute + dup 373 /ucircumflex + dup 374 /udieresis + dup 371 /ugrave + dup 375 /yacute + dup 377 /ydieresis + + % Set up ISO Latin 1 character encoding + /starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont + } def + /Times-Roman starnetISO def + /Times-Italic starnetISO def + /Times-Bold starnetISO def + /Times-BoldItalic starnetISO def + /Helvetica starnetISO def + /Helvetica-Oblique starnetISO def + /Helvetica-Bold starnetISO def + /Helvetica-BoldOblique starnetISO def + /Courier starnetISO def + /Courier-Oblique starnetISO def + /Courier-Bold starnetISO def + /Courier-BoldOblique starnetISO def + cleartomark + } bind def + + %%BeginResource: procset + /coord-font-family /Times-Roman def + /default-font-family /Times-Roman def + /coordfont coord-font-family findfont 8 scalefont def + + /InvScaleFactor 1.0 def + /set_scale { + dup 1 exch div /InvScaleFactor exch def + dup scale + } bind def + + % styles + /solid { [] 0 setdash } bind def + /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def + /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def + /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def + /bold { 2 setlinewidth } bind def + /filled { } bind def + /unfilled { } bind def + /rounded { } bind def + /diagonals { } bind def + + % hooks for setting color + /nodecolor { sethsbcolor } bind def + /edgecolor { sethsbcolor } bind def + /graphcolor { sethsbcolor } bind def + /nopcolor {pop pop pop} bind def + + /beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if + } bind def + + /set_font { + findfont exch + scalefont setfont + } def + + % draw aligned label in bounding box aligned to current point + /alignedtext { % width adj text + /text exch def + /adj exch def + /width exch def + gsave + width 0 gt { + text stringwidth pop adj mul 0 rmoveto + } if + [] 0 setdash + text show + grestore + } def + + /boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath + } bind def + + /ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix + } bind def + + /endpage { showpage } bind def + + /layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] + def + + /setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def + } bind def + + /onlayer { curlayer ne {invis} if } def + + /onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if + } def + + /curlayer 0 def + + %%EndResource + %%EndProlog + %%BeginSetup + 14 default-font-family set_font + 1 setmiterlimit + % /arrowlength 10 def + % /arrowwidth 5 def + + % make sure pdfmark is harmless for PS-interpreters other than Distiller + /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse + % make '<<' and '>>' safe on PS Level 1 devices + /languagelevel where {pop languagelevel}{1} ifelse + 2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put + } if + + %%EndSetup + %%Page: 1 1 + %%PageBoundingBox: 36 36 188 317 + %%PageOrientation: Portrait + gsave + 35 35 153 282 boxprim clip newpath + 36 36 translate + 0 0 1 beginpage + 0 0 translate 0 rotate + 0.000 0.000 0.000 graphcolor + 14.00 /Times-Roman set_font + + % root + gsave 10 dict begin + newpath 8 232 moveto + 83 232 lineto + 83 272 lineto + 8 272 lineto + closepath + stroke + gsave 10 dict begin + 45 257 moveto 61 -0.5 (root pool) alignedtext + end grestore + newpath 8 252 moveto + 83 252 lineto + stroke + gsave 10 dict begin + 45 237 moveto 4 -0.5 ( ) alignedtext + end grestore + end grestore + + % lateral + gsave 10 dict begin + newpath 0 156 moveto + 90 156 lineto + 90 196 lineto + 0 196 lineto + closepath + stroke + gsave 10 dict begin + 45 181 moveto 76 -0.5 (lateral pool) alignedtext + end grestore + newpath 0 176 moveto + 90 176 lineto + stroke + gsave 10 dict begin + 22 161 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 45 156 moveto + 45 176 lineto + stroke + gsave 10 dict begin + 67 161 moveto 4 -0.5 ( ) alignedtext + end grestore + end grestore + + % root -> lateral + newpath 45 223 moveto + 45 218 45 212 45 206 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 43 222 moveto + 45 232 lineto + 48 222 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 48 206 moveto + 45 196 lineto + 43 206 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % lateral -> lateral + newpath 44 152 moveto + 63 141 91 130 108 147 curveto + 126 165 126 186 108 205 curveto + 98 214 85 210 73 202 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 44 149 moveto + 37 156 lineto + 47 153 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 74 200 moveto + 65 196 lineto + 72 204 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % branch + gsave 10 dict begin + newpath 19 80 moveto + 115 80 lineto + 115 120 lineto + 19 120 lineto + closepath + stroke + gsave 10 dict begin + 67 105 moveto 82 -0.5 (branch pool) alignedtext + end grestore + newpath 19 100 moveto + 115 100 lineto + stroke + gsave 10 dict begin + 43 85 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 67 80 moveto + 67 100 lineto + stroke + gsave 10 dict begin + 91 85 moveto 4 -0.5 ( ) alignedtext + end grestore + end grestore + + % lateral -> branch + newpath 67 147 moveto + 67 142 67 136 67 130 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 65 146 moveto + 67 156 lineto + 70 146 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 70 130 moveto + 67 120 lineto + 65 130 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % branch -> branch + newpath 65 76 moveto + 86 65 115 53 133 71 curveto + 151 89 151 110 133 129 curveto + 123 139 109 134 96 126 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 65 73 moveto + 58 80 lineto + 68 77 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 97 124 moveto + 88 120 lineto + 95 128 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % leaf + gsave 10 dict begin + newpath 54 8 moveto + 128 8 lineto + 128 44 lineto + 54 44 lineto + closepath + stroke + gsave 10 dict begin + 91 21 moveto 60 -0.5 (leaf pool) alignedtext + end grestore + end grestore + + % branch -> leaf + newpath 91 71 moveto + 91 65 91 60 91 54 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 89 70 moveto + 91 80 lineto + 94 70 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 94 54 moveto + 91 44 lineto + 89 54 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + endpage + grestore + %%PageTrailer + %%EndPage: 1 + %%Trailer + %%Pages: 1 + end + restore + %%EOF + + %%EndDocument + @endspecial 2517 3944 a(\(b\))f(P)n(o)r(ol)i(descriptor)f(graph)1054 + 4200 y Fw(Figure)31 b(4.13:)42 b(Main)31 b(data)g(structure)f(for)g + Fr(power)f Fw(b)s(enc)m(hmark)340 4480 y(In)f(addition)h(to)h(b)s(o)s + (okk)m(eeping)f(information)g(for)f(the)h(p)s(o)s(ol)f(allo)s(cator)j + (run)m(time,)e(the)g(p)s(o)s(ol)f(descriptors)h(are)199 + 4662 y(also)35 b(augmen)m(ted)f(to)g(include)f(p)s(oin)m(ters)h(to)g + (the)g(other)f(p)s(o)s(ol)g(descriptors)h(in)f(the)g(data)i(structure,) + f(forming)f(a)199 4845 y(graph)d(isomorphic)g(to)h(the)g(data)g + (structure)f(graph)g(\(but)g(accessible)i(at)f(run)m(time)f(and)g + (including)g(bac)m(k-edges)199 5028 y(as)36 b(w)m(ell)h(as)f(forw)m + (ard)f(edges\).)57 b(F)-8 b(or)37 b(the)f Fr(power)e + Fw(b)s(enc)m(hmark,)i(this)g(graph)f(is)h(sho)m(wn)f(in)g(Figure)h + (4.13\(b\).)59 b(By)199 5210 y(using)30 b(this)g(graph,)f(the)h(run)m + (time)g(can)g(lo)s(cate)i(all)f(of)f(the)g(memory)g(blo)s(c)m(ks)g + (allo)s(cated)i(to)f(a)f(data)h(structure)e(b)m(y)2104 + 5568 y(40)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 17 23 bop 340 91 a Fr(result)22 b Fw(is)h(assigned)g(the)g(v)-5 + b(alue)24 b Fr(val0)e Fw(if)h(con)m(trol)i(reac)m(hes)f(this)f + (instruction)g(from)f(the)i(basic)f(blo)s(c)m(k)h(lab)s(elled)199 + 274 y Fr(label0)p Fw(,)30 b Fr(val1)g Fw(if)h(con)m(trol)i(reac)m(hes)f + (here)f(from)g(basic)g(blo)s(c)m(k)h Fr(label1)p Fw(,)e(and)h(so)g(on.) + 43 b(All)32 b(the)f Fr(phi)f Fw(instructions)199 457 + y(in)37 b(a)h(basic)f(blo)s(c)m(k)h(m)m(ust)f(app)s(ear)g(at)h(the)f(b) + s(eginning)g(of)g(the)h(basic)f(blo)s(c)m(k.)62 b(Figure)38 + b(3.2)g(sho)m(ws)f(an)g(example)199 639 y(function)30 + b(whic)m(h)g(requires)g Ff(\036)h Fw(no)s(des.)438 870 + y Fr(int)47 b(pow\(int)f(M,)h(unsigned)e(N\))j({)533 + 983 y(unsigned)e(i;)h(int)g(Result)f(=)i(1;)533 1095 + y(for)f(\(i)g(=)h(0;)f(i)h(!=)f(N;)g(++i\))629 1208 y(Result)f(*=)h(M;) + 533 1321 y(return)f(Result;)438 1434 y(})1315 1730 y + Fw(Figure)31 b(3.2:)42 b(C)30 b(co)s(de)g(for)g(example)h(lo)s(op)g(b)s + (o)s(dy)340 2012 y(Figure)g(3.3)h(sho)m(ws)e(the)g(LL)-10 + b(VM)31 b(co)s(de)f(represen)m(ting)h(the)g(lo)s(op)f(b)s(o)s(dy)-8 + b(.)438 2242 y Fr(Loop:)533 2355 y(\045result)94 b(=)47 + b(phi)95 b(int)47 b([)g(1,)h(\045LoopHeader)c(],)j([)h(\045result2,)d + (\045Loop)h(])533 2468 y(\045i)334 b(=)47 b(phi)g(uint)g([)g(0,)h + (\045LoopHeader)c(],)j([)h(\045i2,)285 b(\045Loop)46 + b(])533 2581 y(\045result2)g(=)h(mul)g(int)g(\045result,)f(\045M)667 + b(;)48 b(Result)e(*=)h(M)533 2694 y(\045i2)286 b(=)47 + b(add)g(uint)g(\045i,)g(1)906 b(;)48 b(i)f(=)h(i)f(+)h(1)533 + 2807 y(\045cond)190 b(=)47 b(setne)g(uint)f(\045i2,)h(\045N)715 + b(;)48 b(i)f(!=)g(N)533 2920 y(br)h(bool)e(\045cond,)g(label)h + (\045Loop,)f(label)g(\045Exit)1220 3215 y Fw(Figure)31 + b(3.3:)42 b(LL)-10 b(VM)30 b(co)s(de)h(for)f(example)h(lo)s(op)g(b)s(o) + s(dy)340 3498 y(As)26 b(noted)g(b)s(efore,)h(the)f(virtual)g(registers) + h(in)e(LL)-10 b(VM)26 b(are)g(in)g(SSA)f(form)g(while)h(v)-5 + b(alues)26 b(in)g(memory)f(are)i(not.)199 3680 y(This)j(dramatically)i + (simpli\014es)e(transformations)g(b)s(ecause)h(scalars)g(cannot)g(ha)m + (v)m(e)g(aliases.)199 4059 y Fm(3.3)136 b(High-Lev)l(el)46 + b(T)l(yp)t(e)e(Information)199 4332 y Fw(LL)-10 b(VM)44 + b(is)g(a)g(strictly)h(t)m(yp)s(ed)f(represen)m(tation,)k(where)43 + b(ev)m(ery)i(SSA)e(v)-5 b(alue)44 b(and)g(memory)f(lo)s(cation)j(has)d + (an)199 4514 y(asso)s(ciated)35 b(t)m(yp)s(e,)g(and)e(all)h(op)s + (erations)g(ob)s(ey)g(strict)g(t)m(yp)s(e)g(rules.)50 + b(This)32 b(t)m(yp)s(e)i(information)g(enables)g(a)g(broad)199 + 4697 y(class)f(of)f Fs(high-level)g Fw(transformations)g(on)g + Fs(low-level)g Fw(co)s(de.)46 b(In)31 b(addition,)i(t)m(yp)s(e)f + (mismatc)m(hes)h(can)f(b)s(e)f(used)g(to)199 4880 y(detect)h(errors)e + (in)g(optimizations)i(b)m(y)e(the)h(LL)-10 b(VM)30 b(consistency)i(c)m + (hec)m(k)m(er.)340 5063 y(The)21 b(LL)-10 b(VM)22 b(t)m(yp)s(e)f + (system)h(includes)f(source)h(language)h(indep)s(enden)m(t)d(primitiv)m + (e)i(t)m(yp)s(es)g(\(v)m(oid,)i(b)s(o)s(ol,)f(signed)199 + 5245 y(and)34 b(unsigned)g(in)m(tegers)i(from)e(8)h(to)g(64)g(bits,)h + (\015oating-p)s(oin)m(t)g(v)-5 b(alues)35 b(in)f(single)i(and)e(double) + g(precision,)i(and)2104 5568 y(17)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (23) 24 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 18 24 bop 199 91 a Fw(opaque\))46 b(and)e(constructiv)m(e)j(t)m(yp)s + (es)e(\(p)s(oin)m(ters,)k(arra)m(ys,)g(structures,)g(and)44 + b(functions\).)85 b(These)45 b(t)m(yp)s(es)g(are)199 + 274 y(language-indep)s(enden)m(t)30 b(data)f(represen)m(tations)h(that) + g(are)f(mapp)s(ed)f(from)g(higher-lev)m(el)j(language)f(t)m(yp)s(es.)40 + b(F)-8 b(or)199 457 y(example,)29 b(classes)g(in)e(C++)f(with)h + (inheritance)h(and)f(virtual)h(metho)s(ds)f(can)h(b)s(e)e(represen)m + (ted)i(using)f(structures)199 639 y(for)37 b(the)g(data)h(v)-5 + b(alues)38 b(and)e(a)i(t)m(yp)s(ed)f(function)f(table)i(with)f + (indirect)g(function)g(calls)i(for)d(inheritance.)62 + b(This)199 822 y(p)s(ermits)34 b(man)m(y)g(high-lev)m(el)i + (language-indep)s(enden)m(t)f(optimizations)h(\(e.g.,)h(virtual)e + (function)f(resolution\))h(to)199 1005 y(b)s(e)26 b(p)s(erformed)f(on)h + (the)g(LL)-10 b(VM)26 b(co)s(de.)40 b(Some)26 b(examples)h + (illustrating)g(LL)-10 b(VM)27 b(t)m(yp)s(es)f(are)h(sho)m(wn)e(in)h + (Figure)h(3.4.)295 1235 y Fr(\045arrayty)45 b(=)j([2)f(x)g([3)h(x)f([4) + g(x)h(uint]]])93 b(;)48 b(2x3x4)e(array)g(of)h(unsigned)f(integer)g + (values)295 1461 y(\045aptr)g(=)i([4)f(x)g(int]*)810 + b(;)48 b(Pointer)d(to)j(array)e(of)h(four)g(int)g(values)295 + 1687 y(\045funcptr)e(=)j(float)e(\(int,)g(int)h(*\))h(*)190 + b(;)48 b(Pointer)d(to)j(a)f(function)f(that)g(takes)h(an)g(int)1965 + 1800 y(;)h(and)f(a)g(pointer)f(to)h(int,)g(returning)e(float)295 + 2025 y(\045strty)h(=)h({)h(float,)e(\045funcptr)f(})334 + b(;)48 b(A)f(structure,)e(where)h(the)h(first)g(element)e(is)j(a)1965 + 2138 y(;)g(float)e(and)h(the)g(second)f(element)g(is)h(the)1965 + 2251 y(;)h(\045funcptr)d(pointer)h(to)h(function)f(type)g(defined)1965 + 2364 y(;)i(previously)1409 2660 y Fw(Figure)31 b(3.4:)41 + b(Examples)31 b(of)f(LL)-10 b(VM)31 b(t)m(yp)s(es)340 + 2942 y(All)c(LL)-10 b(VM)27 b(instructions)f(are)h(strictly)g(t)m(yp)s + (ed,)g(and)f(all)i(ha)m(v)m(e)f(restrictions)g(on)g(their)f(op)s + (erands)f(to)j(simplify)199 3125 y(transformations)40 + b(and)f(preserv)m(e)h(t)m(yp)s(e)g(correctness)2063 3092 + y Fk(2)2103 3125 y Fw(.)69 b(F)-8 b(or)41 b(example,)i(the)d + Fr(add)f Fw(instruction)g(requires)h(that)199 3307 y(b)s(oth)32 + b(op)s(erands)f(are)i(of)g(the)g(same)g(t)m(yp)s(e,)g(whic)m(h)f(m)m + (ust)h(b)s(e)f(an)g(arithmetic)i(\(i.e.,)h(in)m(tegral)f(or)f + (\015oating-p)s(oin)m(t\))199 3490 y(t)m(yp)s(e,)28 b(and)e(it)h(pro)s + (duces)f(a)h(v)-5 b(alue)27 b(of)g(that)g(t)m(yp)s(e.)40 + b(The)26 b Fr(load)g Fw(instruction)g(requires)h(a)g(p)s(oin)m(ter)g + (op)s(erand)e(to)j(load)199 3673 y(from.)43 b(The)30 + b Fr(store)g Fw(instruction)h(requires)g(a)h(v)-5 b(alue)31 + b(of)g(some)h(t)m(yp)s(e)f(\(sa)m(y)-8 b(,)33 b Ff(\034)10 + b Fw(\))32 b(to)g(store)f(and)g(a)h(p)s(oin)m(ter)f(to)h(store)199 + 3855 y(in)m(to,)j(whic)m(h)d(m)m(ust)h(b)s(e)f(a)h(p)s(oin)m(ter)g(to)g + (that)g(t)m(yp)s(e)g(\()p Ff(\034)10 b Fw(*\).)49 b(Some)33 + b(examples)g(of)g(malformed)f(co)s(de)h(are)g(sho)m(wn)f(in)199 + 4038 y(Figure)f(3.5.)295 4268 y Fr(uint)46 b(\045testfunc\(\))f({)390 + 4381 y(\045v)i(=)h(load)e(int)h(4)716 b(;)47 b(Must)g(load)g(through)e + (a)j(pointer)390 4494 y(store)f(int)f(42,)h(float*)f(\045fptr)190 + b(;)47 b(Cannot)g(store)f('int')g(through)g('float*')390 + 4607 y(\045Val)h(=)g(add)g(int)g(\045Val,)f(0)382 b(;)47 + b(Definition)e(does)i(not)g(dominate)e(use)390 4720 y(ret)i(int*)g + (null)810 b(;)47 b(Cannot)g(return)f('int*')g(from)g(fn)h(returning)f + ('uint')295 4833 y(})1198 5128 y Fw(Figure)31 b(3.5:)42 + b(Examples)30 b(of)h(malformed)f(LL)-10 b(VM)30 b(co)s(de)p + 199 5208 1560 4 v 303 5261 a Fj(2)337 5293 y Fi(These)d(restrictions)g + (mak)n(e)e(the)h(LL)-9 b(VM)26 b(co)r(de)g(more)g(compact,)g(as)h + (explained)e(in)h(Section)g(3.2)2104 5568 y Fw(18)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 39 45 bop 199 91 a Fw(dev)m(elop)s(ed)34 b(b)m(y)f(Lattner)g(and)g(Adv) + m(e[30)r(],)h(whic)m(h)f(use)g(the)g(LL)-10 b(VM)33 b(infrastructure,)h + (for)f(fully)f(automatic)k(p)s(o)s(ol)199 274 y(allo)s(cation)48 + b(of)d(C)f(programs.)85 b(This)44 b(algorithm)i(uses)e(the)i(Data)g + (Structure)e(Graph)h(to)h(ensure)e(safet)m(y)i(of)199 + 457 y(transformation.)d(Automatic)33 b(P)m(o)s(ol)e(Allo)s(cation)i(is) + e(an)g(example)h(of)f(a)g Fs(macr)-5 b(osc)g(opic)34 + b Fw(transformation,)d(whic)m(h)199 639 y(w)m(orks)38 + b(on)g(en)m(tire)i(data)e(structures)g(at)h(a)g(time.)64 + b(It)39 b(fundamen)m(tally)f(requires)g(the)g(strong)g(in)m(terpro)s + (cedural)199 822 y(capabilities)33 b(of)d(LL)-10 b(VM)30 + b(to)i(b)s(e)d(e\013ectiv)m(e.)295 1003 y Fr(void)46 + b(ProcessLists\(unsigned)c(N\))48 b({)390 1115 y(List)f(*L1)g(=)g + (malloc\(sizeof\(List\)\);)390 1228 y(List)g(*L2)g(=)g + (malloc\(sizeof\(List\)\);)390 1341 y(unsigned)f(i;)390 + 1454 y(for)h(\(i)g(=)h(0;)f(i)g(!=)h(N;)f(++i\))f({)286 + b(/*)48 b(populate)d(lists)h(*/)486 1567 y(addList\(L1,)e + (malloc\(sizeof\(Patient\)\)\);)486 1680 y(addList\(L2,)g + (malloc\(sizeof\(Patient\)\)\);)390 1793 y(})390 1906 + y(useLists\(L1,)h(L2\);)142 b(/*)47 b(Use)g(lists)f(*/)295 + 2019 y(})1212 2314 y Fw(Figure)30 b(4.11:)43 b(Source)30 + b(for)g Fr(ProcessLists)d Fw(function)340 2597 y(The)37 + b Fr(ProcessLists)d Fw(function)j(in)g(Figure)g(4.11)i(will)e(b)s(e)g + (used)f(to)i(illustrate)h(ho)m(w)e(the)g(p)s(o)s(ol)g(allo)s(cation)199 + 2779 y(w)m(orks.)50 b(The)32 b(most)i(imp)s(ortan)m(t)g(part)f(of)g + (the)h(example)g(is)f(that)h(it)g(creates)g(t)m(w)m(o)h(disjoin)m(t)f + (doubly)e(link)m(ed-lists)199 2962 y(of)e(ob)5 b(jects,)31 + b(using)e(a)g(common)h(creation)h(function)e(and)g(a)h(common)g(tra)m + (v)m(ersal)h(function.)40 b(Figure)30 b(4.12)h(sho)m(ws)199 + 3145 y(the)g(Bottom-Up)h(data)f(structure)f(graph)g(for)g(the)g + (example.)p 1221 3265 1857 4 v 1221 4287 4 1023 v 1249 + 4262 a @beginspecial 35 @llx 35 @lly 483 @urx 277 @ury + 2160 @rwi @setspecial + %%BeginDocument: figs/ProcessLists.ps + %!PS-Adobe-2.0 + %%Creator: dot version 1.8.9 (Sun Sep 22 16:57:48 CDT 2002) + %%For: (lattner) Chris Lattner + %%Title: DataStructures + %%Pages: (atend) + %%BoundingBox: 35 35 483 277 + %%EndComments + save + %%BeginProlog + /DotDict 200 dict def + DotDict begin + + /setupLatin1 { + mark + /EncodingVector 256 array def + EncodingVector 0 + + ISOLatin1Encoding 0 255 getinterval putinterval + + EncodingVector + dup 306 /AE + dup 301 /Aacute + dup 302 /Acircumflex + dup 304 /Adieresis + dup 300 /Agrave + dup 305 /Aring + dup 303 /Atilde + dup 307 /Ccedilla + dup 311 /Eacute + dup 312 /Ecircumflex + dup 313 /Edieresis + dup 310 /Egrave + dup 315 /Iacute + dup 316 /Icircumflex + dup 317 /Idieresis + dup 314 /Igrave + dup 334 /Udieresis + dup 335 /Yacute + dup 376 /thorn + dup 337 /germandbls + dup 341 /aacute + dup 342 /acircumflex + dup 344 /adieresis + dup 346 /ae + dup 340 /agrave + dup 345 /aring + dup 347 /ccedilla + dup 351 /eacute + dup 352 /ecircumflex + dup 353 /edieresis + dup 350 /egrave + dup 355 /iacute + dup 356 /icircumflex + dup 357 /idieresis + dup 354 /igrave + dup 360 /dcroat + dup 361 /ntilde + dup 363 /oacute + dup 364 /ocircumflex + dup 366 /odieresis + dup 362 /ograve + dup 365 /otilde + dup 370 /oslash + dup 372 /uacute + dup 373 /ucircumflex + dup 374 /udieresis + dup 371 /ugrave + dup 375 /yacute + dup 377 /ydieresis + + % Set up ISO Latin 1 character encoding + /starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont + } def + /Times-Roman starnetISO def + /Times-Italic starnetISO def + /Times-Bold starnetISO def + /Times-BoldItalic starnetISO def + /Helvetica starnetISO def + /Helvetica-Oblique starnetISO def + /Helvetica-Bold starnetISO def + /Helvetica-BoldOblique starnetISO def + /Courier starnetISO def + /Courier-Oblique starnetISO def + /Courier-Bold starnetISO def + /Courier-BoldOblique starnetISO def + cleartomark + } bind def + + %%BeginResource: procset + /coord-font-family /Times-Roman def + /default-font-family /Times-Roman def + /coordfont coord-font-family findfont 8 scalefont def + + /InvScaleFactor 1.0 def + /set_scale { + dup 1 exch div /InvScaleFactor exch def + dup scale + } bind def + + % styles + /solid { [] 0 setdash } bind def + /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def + /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def + /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def + /bold { 2 setlinewidth } bind def + /filled { } bind def + /unfilled { } bind def + /rounded { } bind def + /diagonals { } bind def + + % hooks for setting color + /nodecolor { sethsbcolor } bind def + /edgecolor { sethsbcolor } bind def + /graphcolor { sethsbcolor } bind def + /nopcolor {pop pop pop} bind def + + /beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if + } bind def + + /set_font { + findfont exch + scalefont setfont + } def + + % draw aligned label in bounding box aligned to current point + /alignedtext { % width adj text + /text exch def + /adj exch def + /width exch def + gsave + width 0 gt { + text stringwidth pop adj mul 0 rmoveto + } if + [] 0 setdash + text show + grestore + } def + + /boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath + } bind def + + /ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix + } bind def + + /endpage { showpage } bind def + + /layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] + def + + /setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def + } bind def + + /onlayer { curlayer ne {invis} if } def + + /onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if + } def + + /curlayer 0 def + + %%EndResource + %%EndProlog + %%BeginSetup + 14 default-font-family set_font + 1 setmiterlimit + % /arrowlength 10 def + % /arrowwidth 5 def + + % make sure pdfmark is harmless for PS-interpreters other than Distiller + /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse + % make '<<' and '>>' safe on PS Level 1 devices + /languagelevel where {pop languagelevel}{1} ifelse + 2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put + } if + + %%EndSetup + %%Page: 1 1 + %%PageBoundingBox: 36 36 483 277 + %%PageOrientation: Portrait + gsave + 35 35 448 242 boxprim clip newpath + 36 36 translate + 0 0 1 beginpage + 0 0 translate 0 rotate + 0.000 0.000 0.000 graphcolor + 14.00 /Times-Roman set_font + gsave 10 dict begin + 223 5 moveto 147 -0.5 (Function ProcessLists) alignedtext + end grestore + + % Node0x841cd48 + gsave 10 dict begin + newpath 11 100 moveto + 148 100 lineto + stroke + newpath 148 100 moveto + 154 100 160 105 160 111 curveto + stroke + newpath 160 111 moveto + 160 127 lineto + stroke + newpath 160 127 moveto + 160 133 154 140 148 140 curveto + stroke + newpath 148 140 moveto + 11 140 lineto + stroke + newpath 11 140 moveto + 5 140 0 134 0 128 curveto + stroke + newpath 0 128 moveto + 0 112 lineto + stroke + newpath 0 112 moveto + 0 106 5 100 11 100 curveto + stroke + gsave 10 dict begin + 80 125 moveto 73 -0.5 (List: HMR) alignedtext + end grestore + newpath 0 120 moveto + 160 120 lineto + stroke + gsave 10 dict begin + 23 105 moveto 32 -0.5 (List*) alignedtext + end grestore + newpath 46 100 moveto + 46 120 lineto + stroke + gsave 10 dict begin + 80 105 moveto 54 -0.5 (Patient*) alignedtext + end grestore + newpath 114 100 moveto + 114 120 lineto + stroke + gsave 10 dict begin + 137 105 moveto 32 -0.5 (List*) alignedtext + end grestore + end grestore + + % Node0x841cd48 -> Node0x841cd48 + newpath 46 97 moveto + 79 80 143 56 178 91 curveto + 197 109 197 130 178 149 curveto + 161 166 135 157 114 145 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 44 98 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 116 143 moveto + 106 140 lineto + 113 147 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x841cd48 -> Node0x841cd48 + newpath 155 97 moveto + 173 87 199 75 214 91 curveto + 232 109 232 130 214 149 curveto + 189 174 149 160 119 145 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 153 98 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 120 143 moveto + 110 140 lineto + 118 147 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x841cd80 + gsave 10 dict begin + newpath 38 28 moveto + 122 28 lineto + stroke + newpath 122 28 moveto + 128 28 135 33 135 39 curveto + stroke + newpath 135 39 moveto + 135 52 lineto + stroke + newpath 135 52 moveto + 135 58 128 64 122 64 curveto + stroke + newpath 122 64 moveto + 38 64 lineto + stroke + newpath 38 64 moveto + 32 64 26 58 26 52 curveto + stroke + newpath 26 52 moveto + 26 39 lineto + stroke + newpath 26 39 moveto + 26 33 32 28 38 28 curveto + stroke + gsave 10 dict begin + 80 41 moveto 95 -0.5 (Patient: HMR) alignedtext + end grestore + end grestore + + % Node0x841cd48 -> Node0x841cd80 + newpath 80 95 moveto + 80 88 80 81 80 74 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 80 97 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 83 74 moveto + 80 64 lineto + 78 74 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x841cdb8 + gsave 10 dict begin + newpath 225 100 moveto + 362 100 lineto + stroke + newpath 362 100 moveto + 368 100 374 105 374 111 curveto + stroke + newpath 374 111 moveto + 374 127 lineto + stroke + newpath 374 127 moveto + 374 133 368 140 362 140 curveto + stroke + newpath 362 140 moveto + 225 140 lineto + stroke + newpath 225 140 moveto + 219 140 214 134 214 128 curveto + stroke + newpath 214 128 moveto + 214 112 lineto + stroke + newpath 214 112 moveto + 214 106 219 100 225 100 curveto + stroke + gsave 10 dict begin + 294 125 moveto 73 -0.5 (List: HMR) alignedtext + end grestore + newpath 214 120 moveto + 374 120 lineto + stroke + gsave 10 dict begin + 237 105 moveto 32 -0.5 (List*) alignedtext + end grestore + newpath 260 100 moveto + 260 120 lineto + stroke + gsave 10 dict begin + 294 105 moveto 54 -0.5 (Patient*) alignedtext + end grestore + newpath 328 100 moveto + 328 120 lineto + stroke + gsave 10 dict begin + 351 105 moveto 32 -0.5 (List*) alignedtext + end grestore + end grestore + + % Node0x841cdb8 -> Node0x841cdb8 + newpath 259 97 moveto + 293 80 357 56 392 91 curveto + 410 109 410 130 392 149 curveto + 375 166 349 157 328 145 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 257 98 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 330 143 moveto + 320 140 lineto + 327 147 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x841cdb8 -> Node0x841cdb8 + newpath 370 97 moveto + 387 87 413 76 428 91 curveto + 446 109 446 130 428 149 curveto + 403 174 362 160 332 145 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 368 98 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 334 143 moveto + 324 140 lineto + 331 147 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x841cdf0 + gsave 10 dict begin + newpath 252 28 moveto + 336 28 lineto + stroke + newpath 336 28 moveto + 342 28 349 33 349 39 curveto + stroke + newpath 349 39 moveto + 349 52 lineto + stroke + newpath 349 52 moveto + 349 58 342 64 336 64 curveto + stroke + newpath 336 64 moveto + 252 64 lineto + stroke + newpath 252 64 moveto + 246 64 240 58 240 52 curveto + stroke + newpath 240 52 moveto + 240 39 lineto + stroke + newpath 240 39 moveto + 240 33 246 28 252 28 curveto + stroke + gsave 10 dict begin + 294 41 moveto 95 -0.5 (Patient: HMR) alignedtext + end grestore + end grestore + + % Node0x841cdb8 -> Node0x841cdf0 + newpath 294 95 moveto + 294 88 294 81 294 74 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 294 97 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 297 74 moveto + 294 64 lineto + 292 74 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x841a068 + gsave 10 dict begin + 80 194 27 18 ellipse_path + stroke + gsave 10 dict begin + 80 189 moveto 15 -0.5 (L1) alignedtext + end grestore + end grestore + + % Node0x841a068 -> Node0x841cd48 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 80 171 moveto + 80 164 80 157 80 149 curveto + stroke + gsave 10 dict begin + solid + newpath 83 171 moveto + 78 171 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 83 150 moveto + 80 140 lineto + 78 150 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x841a0f0 + gsave 10 dict begin + 294 194 27 18 ellipse_path + stroke + gsave 10 dict begin + 294 189 moveto 18 -0.5 (L2) alignedtext + end grestore + end grestore + + % Node0x841a0f0 -> Node0x841cdb8 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 294 171 moveto + 294 164 294 157 294 149 curveto + stroke + gsave 10 dict begin + solid + newpath 297 171 moveto + 292 171 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 297 150 moveto + 294 140 lineto + 292 150 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + endpage + grestore + %%PageTrailer + %%EndPage: 1 + %%Trailer + %%Pages: 1 + end + restore + %%EOF + + %%EndDocument + @endspecial 3074 4287 V 1221 4290 1857 4 v 910 4458 + a(Figure)g(4.12:)43 b(Bottom-up)31 b(DS)f(Graph)g(for)g + Fr(ProcessLists)d Fw(example)340 4741 y(Section)k(4.3.1)h(describ)s(es) + d(the)h(run)m(time)g(supp)s(ort)e(used)h(b)m(y)h(programs)f(whic)m(h)h + (ha)m(v)m(e)h(b)s(een)e(transformed)g(to)199 4923 y(use)36 + b(p)s(o)s(ol)h(allo)s(cation,)j(Section)d(4.3.2)i(describ)s(es)c(ho)m + (w)i(candidate)g(data)g(structures)f(are)h(iden)m(ti\014ed)f(for)h(p)s + (o)s(ol)199 5106 y(allo)s(cation,)d(and)d(Section)i(4.3.3)g(describ)s + (es)d(ho)m(w)i(the)f(program)h(is)f(transformed)g(to)h(use)f(p)s(o)s + (ol)g(allo)s(cated)i(data)199 5289 y(structures.)2104 + 5568 y(39)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (24) 25 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 38 44 bop 199 91 a Fw(incomplete)37 b(no)s(de)f(mark)m(er)g(do)s(es)f + (not)i(mark)e(argumen)m(t)i(no)s(des)e(as)h(b)s(eing)g(incomplete)h(if) + f(all)g(callers)i(can)e(b)s(e)199 274 y(iden)m(ti\014ed)28 + b(b)m(y)g(the)g(analysis,)h(whic)m(h)e(is)h(safe)g(once)g(all)h + (calling)g(con)m(texts)g(are)f(tak)m(en)h(in)m(to)g(consideration.)41 + b(With)199 457 y(incoming)33 b(argumen)m(ts)f(\\complete,")j(it)e(is)f + (safe)g(to)h(decide)f(that)h(t)m(w)m(o)g(incoming)f(p)s(oin)m(ters)g + (are)h(nev)m(er)f(aliased,)199 639 y(for)e(example.)199 + 955 y Fl(4.2.3)113 b(Complexit)m(y)-9 b(,)38 b(Results,)f(and)i + (Applications)199 1196 y Fw(Despite)22 b(the)g(capabilities)g(of)g + (Data)g(Structure)e(Analysis)h(for)g(iden)m(tifying)h(complex)f + (recursiv)m(e)h(data)g(structures,)199 1379 y(the)40 + b(analysis)h(time)f(complexit)m(y)i(is)e(only)g(\002\()p + Ff(s)1864 1346 y Fk(2)1903 1379 y Fw(\))h(in)e(the)h(w)m(orst)h(case)g + (\(where)e Ff(s)h Fw(is)g(the)g(size)h(of)f(the)g(largest)199 + 1561 y(SCC)34 b(in)h(the)h(program\),)g(and)f(\002\()p + Ff(n)p Fw(\))g(in)g(the)h(common)f(case)h(\(where)f Ff(n)g + Fw(is)h(the)f(n)m(um)m(b)s(er)f(of)h(functions)g(in)g(the)199 + 1744 y(program\))c([28)q(].)340 1927 y(In)39 b(addition)h(to)g(a)g(lo)m + (w)g(asymptotic)h(complexit)m(y)-8 b(,)44 b(Data)d(Structure)e + (Analysis)h(is)f(e\016cien)m(t)i(in)f(practice.)199 2109 + y(Lattner)i(and)e(Adv)m(e)i([28)q(])f(sho)m(w)h(that)f(Data)i + (Structure)d(Analysis)i(is)f(quite)h(e\016cien)m(t)g(and)f(scalable)h + (for)f(all)199 2292 y(programs)c(tested)i(\(the)f(ptr-dist,)h(Olden,)g + (and)e(some)h(SPECINT2000)g(b)s(enc)m(hmarks,)g(including)g(programs) + 199 2475 y(of)32 b(up)f(to)h(71,364)i(lines)e(of)g(C)f(co)s(de\),)i + (requiring)e(only)h(up)e(to)j(1.34)g(seconds)e(to)i(analyze)g(the)e + (largest)i(program)199 2658 y(while)24 b(building)f(lo)s(cal,)k(b)s + (ottom-up)c(and)g(top-do)m(wn)h(graphs.)38 b(The)23 b(memory)h + (requiremen)m(ts)g(of)g(Data)h(Structure)199 2840 y(Analysis)42 + b(are)f(also)h(mo)s(dest,)i(using)d(only)g(4.8MB)i(of)f(memory)f(to)h + (represen)m(t)f(the)h(results)f(for)f(the)i(largest)199 + 3023 y(program.)340 3206 y(One)37 b(of)g(the)h(k)m(ey)g(features)f(of)g + (the)h(Data)g(Structure)f(Analysis)g(algorithm)h(is)f(that)h(it)g(ma)m + (y)g(b)s(e)e(used)g(for)199 3388 y(a)44 b(v)-5 b(ariet)m(y)45 + b(of)e(di\013eren)m(t)h(applications.)81 b(The)43 b(top-do)m(wn)g + (graph)g(is)g(directly)h(useful)f(as)g(a)h(memory)f(ob)5 + b(ject)199 3571 y(disam)m(biguator)23 b(\(implemen)m(ting)f(alias)h + (analysis\).)39 b(Additionally)-8 b(,)25 b(the)c(mo)s(d/ref)g + (information)h(captures)g(b)m(y)f(the)199 3754 y(no)s(des)k(of)h(the)f + (graph)g(ma)m(y)h(b)s(e)f(used)g(as)h(the)g(basis)f(for)g(a)h(simple)g + (In)m(terpro)s(cedural)e(Mo)s(d/Ref)i(implemen)m(tation.)199 + 3936 y(This)32 b(implemen)m(tation)i(needs)f(no)f(additional)i(in)m + (terpro)s(cedural)e(analysis)h(to)g(compute)g(a)g(con)m(text-sensitiv)m + (e,)199 4119 y(\015o)m(w-insensitiv)m(e)f(result,)f(making)f(it)h(b)s + (oth)f(v)m(ery)h(simple)f(and)g(v)m(ery)g(p)s(o)m(w)m(erful.)340 + 4302 y(There)f(are)h(man)m(y)f(other)g(applications)i(of)e(data)h + (structure)e(analysis,)j(ranging)e(from)g(accurate)h(call)h(graph)199 + 4484 y(construction)d(to)f(an)g(aggressiv)m(e)i(in)m(terpro)s(cedural)e + (transformation)g(kno)m(wn)f(as)i(Automatic)g(P)m(o)s(ol)g(Allo)s + (cation.)199 4863 y Fm(4.3)136 b(Automatic)45 b(P)l(o)t(ol)h(Allo)t + (cation)199 5136 y Fw(Man)m(y)33 b(researc)m(hers)g(ha)m(v)m(e)h + (demonstrated)e(the)g(v)-5 b(alue)33 b(of)g(p)s(o)s(ol)f(allo)s(cating) + i(data)f(structures)f([14)q(,)g(20)q(,)h(43)q(],)g(but)199 + 5319 y Fs(ful)5 b(ly)42 b(automatic)h Fw(p)s(o)s(ol)d(allo)s(cation)j + (is)e(a)h(c)m(hallenging)g(problem.)72 b(Here)41 b(w)m(e)h(describ)s(e) + e(a)h(simple)g(algorithm,)2104 5568 y(38)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 19 25 bop 340 91 a Fw(T)m(yp)s(e)28 b(information)h(enables)g(high-lev) + m(el)h(information)f(to)g(b)s(e)f(easily)h(extracted)h(from)e(the)g(lo) + m(w-lev)m(el)k(co)s(de,)199 274 y(enabling)41 b(no)m(v)m(el)h + (transformations)f(at)g(link)g(time.)72 b(T)-8 b(o)41 + b(do)g(this,)i(ho)m(w)m(ev)m(er,)i(it)c(m)m(ust)f(b)s(e)g(p)s(ossible)g + (to)i(allo)m(w)199 457 y(t)m(yp)s(e-safe)36 b(access)g(to)g(\014elds)e + (of)i(data)f(in)g(memory)-8 b(.)54 b(F)-8 b(or)36 b(this)f(reason,)h(a) + g(critical)h(instruction)e(in)f(LL)-10 b(VM)35 b(\(for)199 + 639 y(main)m(taining)d(t)m(yp)s(e-safet)m(y\))g(is)f(the)f + Fr(getelementptr)d Fw(instruction.)199 955 y Fl(3.3.1)113 + b(T)m(yp)s(e-safe)39 b(P)m(oin)m(ter)e(Arithmetic)f(with)i(the)f + Fe(getelementptr)k Fl(Instruction)199 1196 y Fw(The)33 + b Fr(getelementptr)d Fw(instruction)j(is)g(used)g(to)h(calculate)i(the) + d(address)f(of)i(a)g(sub-elemen)m(t)g(of)f(an)g(aggregate)199 + 1379 y(data)43 b(structure)e(in)h(a)g(t)m(yp)s(e-safe)h(manner.)75 + b(Giv)m(en)43 b(a)f(p)s(oin)m(ter)g(to)h(a)f(structure)g(and)f(a)i + (\014eld)e(n)m(um)m(b)s(er,)j(the)199 1561 y Fr(getelementptr)d + Fw(instruction)k(yields)g(a)g(p)s(oin)m(ter)g(to)g(the)g(\014eld.)83 + b(Giv)m(en)46 b(a)f(p)s(oin)m(ter)g(to)g(an)g(arra)m(y)g(and)f(an)199 + 1744 y(elemen)m(t)35 b(n)m(um)m(b)s(er,)e(the)g(instruction)g(returns)f + (a)i(p)s(oin)m(ter)f(to)h(the)f(sp)s(eci\014ed)g(elemen)m(t.)50 + b(In)33 b(addition)g(to)h(single-)199 1927 y(lev)m(el)24 + b(indexing,)g(m)m(ultiple)f(indexes)f(can)g(b)s(e)f(sp)s(eci\014ed)h + (at)h(the)f(same)g(time)h(in)f(one)g Fr(getelementptr)d + Fw(instruction.)438 2160 y Fr(struct)46 b(RT)h({)286 + b(/*)47 b(Structure)f(with)g(complex)g(types)g(*/)533 + 2272 y(char)h(A;)533 2385 y(int)g(B[10][20];)533 2498 + y(char)g(C;)438 2611 y(};)438 2724 y(struct)f(ST)h({)533 + 2837 y(int)g(X;)533 2950 y(double)f(Y;)533 3063 y(struct)g(RT)i(Z;)142 + b(/*)47 b(ST)h(contains)d(an)i(instance)f(of)h(RT)g(embedded)f(in)h(it) + g(*/)438 3176 y(};)438 3402 y(int)g(*foo\(struct)e(ST)i(*s\))g({)533 + 3514 y(return)f(&s[1].Z.B[5][13];)438 3627 y(})1131 3923 + y Fw(Figure)31 b(3.6:)42 b(C)30 b(co)s(de)g(for)h(complex)g(memory)f + (addressing)340 4203 y(The)21 b(example)h(in)f(Figure)h(3.6)h(is)e(an)g + (example)h(of)g(complex)g(memory)f(access)i(in)e(C,)g(designed)g(to)h + (b)s(e)f(a)h(concise)199 4385 y(illustration)33 b(of)g(the)f(LL)-10 + b(VM)32 b(lexical)i(structure,)f(t)m(yp)s(e)f(system,)h(and)f(the)g + Fr(getelementptr)d Fw(instruction.)46 b(The)199 4568 + y(test-case)33 b(de\014nes)c(t)m(w)m(o)j(structure)e(t)m(yp)s(es)g(and) + g(a)h(function)f(whic)m(h)g(p)s(erforms)f(complex)i(indexing.)340 + 4751 y(The)26 b(LL)-10 b(VM)25 b(co)s(de)h(in)g(Figure)g(3.7)h(is)e(a)i + (v)m(ersion)f(of)g(the)g(co)s(de)f(generated)i(b)m(y)f(the)g(C)f(fron)m + (t-end,)i(with)e(LL)-10 b(VM)199 4933 y(commen)m(ts)32 + b(added.)43 b(In)31 b(addition)g(to)h(illustrating)h(the)e + Fr(getelementptr)d Fw(instruction,)k(this)f(co)s(de)h(sho)m(ws)f(that) + 199 5116 y(LL)-10 b(VM)29 b(iden)m(ti\014ers)f(\(t)m(yp)s(e)h(and)f(v) + -5 b(alue)29 b(names\))g(start)g(with)f(a)h Fr(\045)g + Fw(c)m(haracter)h(\(to)f(prev)m(en)m(t)g(namespace)h(collisions)199 + 5299 y(with)42 b(reserv)m(ed)g(w)m(ords\),)k(sho)m(ws)c(some)g + (examples)h(of)f(complicated)i(nested)e(t)m(yp)s(es,)k(and)41 + b(sho)m(ws)h(an)g(LL)-10 b(VM)2104 5568 y(19)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (25) 26 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 20 26 bop 438 113 a Fr(\045RT)47 b(=)g(type)g({)g(sbyte,)f([10)h(x)h + ([20)f(x)g(int]],)f(sbyte)h(})438 226 y(\045ST)g(=)g(type)g({)g(int,)g + (double,)f(\045RT)h(})438 452 y(;)g(Define)f(function)g('foo',)g + (returning)f(an)j('int*',)d(taking)h(an)i('ST*':)438 + 565 y(int*)f(\045foo\(\045ST*)e(\045s\))i({)533 677 y(;)h(Perform)e + (the)h(indexing...)533 790 y(\045tmp)g(=)g(getelementptr)e(\045ST*)h + (\045s,)h(long)g(1,)g(ubyte)f(2,)h(ubyte)g(1,)g(uint)g(5,)g(uint)f(13) + 533 903 y(ret)h(int*)g(\045tmp)428 b(;)48 b(Return)e(the)h(computed)e + (value)438 1016 y(})1036 1312 y Fw(Figure)31 b(3.7:)42 + b(LL)-10 b(VM)31 b(co)s(de)f(for)g(complex)h(memory)g(addressing)199 + 1587 y(function)i(de\014nition.)49 b(Additionally)-8 + b(,)36 b(it)d(illustrates)i(ho)m(w)e(useful)f(named)h(t)m(yp)s(es)g + (are)h(for)f(hand)f(insp)s(ection)h(of)199 1769 y(co)s(de;)38 + b(without)d(sym)m(b)s(olic)h(names)f(pro)m(vided)g(b)m(y)g(the)g(C)g + (compiler,)i(the)e(t)m(yp)s(es)g(w)m(ould)g(all)h(b)s(e)f(expanded)f + (out)199 1952 y(inline,)d(making)g(them)f(less)h(manageable.)199 + 2267 y Fl(3.3.2)113 b(Distinguishing)39 b(Safe)f(and)h(Unsafe)f(Co)s + (de:)51 b(the)37 b Fe(cast)i Fl(Instruction)199 2509 + y Fw(There)44 b(are)g(t)m(w)m(o)i(broad)d(reasons)h(wh)m(y)g(t)m(yp)s + (e)g(con)m(v)m(ersions)i(ma)m(y)e(b)s(e)g(required)f(in)h(programs:)68 + b(\(a\))45 b(explicit)199 2692 y(con)m(v)m(ersions)31 + b(of)f(a)g(v)-5 b(alue)31 b(from)e(one)h(t)m(yp)s(e)g(to)h(another,)f + (whic)m(h)f(ma)m(y)i(or)f(ma)m(y)g(require)g(manipulating)f(the)h(data) + 199 2874 y(\(e.g.,)41 b(in)m(teger)d(to)g(\015oating)g(p)s(oin)m(t)f + (or)h(signed)f(in)m(teger)h(to)g(unsigned\),)g(and)f(\(b\))g(rein)m + (terpreting)h(data)g(of)f(one)199 3057 y(t)m(yp)s(e)d(as)g(data)h(of)e + (another)h(t)m(yp)s(e)g(\(e.g.,)j(treating)e(data)f(in)g(memory)f(as)h + (a)g(linear)h(sequence)f(of)g(b)m(ytes)g(instead)199 + 3240 y(of)d(an)f(arra)m(y)h(of)f(in)m(tegers\).)340 3422 + y(In)g(LL)-10 b(VM,)31 b(t)m(yp)s(e)f(con)m(v)m(ersions)i(can)e(only)h + (happ)s(en)d(in)j(one)f(carefully)h(con)m(trolled)h(w)m(a)m(y:)42 + b(the)30 b Fr(cast)f Fw(instruc-)199 3605 y(tion.)39 + b(The)21 b Fr(cast)g Fw(instruction)h(con)m(v)m(erts)h(a)g(v)-5 + b(alue)22 b(from)f(one)i(t)m(yp)s(e)f(to)g(another.)39 + b(Some)22 b(examples)g(are)g(illustrated)199 3788 y(in)30 + b(Figure)h(3.8.)533 4018 y Fr(\045Y)48 b(=)f(cast)g(int)g(\045X)g(to)g + (double)237 b(;)47 b(requires)f(data)g(conversion)533 + 4131 y(\045J)i(=)f(cast)g(int)g(\045I)g(to)g(long)333 + b(;)47 b(may)g(require)f(data)h(conversion)533 4244 y(\045J)h(=)f(cast) + g(int)g(\045I)g(to)g(uint)333 b(;)47 b(no)h(data)e(conversion)f(needed) + 533 4357 y(\045q)j(=)f(cast)g(int)142 b(\045pd)47 b(to)g(double*)f(;)h + (no)h(data)e(conversion)f(needed;)h(may)h(be)g(unsafe)533 + 4470 y(\045r)h(=)f(cast)g(void*)f(\045pi)h(to)g(QItem*)94 + b(;)47 b(no)h(data)e(conversion)f(needed;)h(may)h(be)g(unsafe)1364 + 4765 y Fw(Figure)31 b(3.8:)42 b(Examples)30 b(of)h(casts)g(in)f(LL)-10 + b(VM)340 5047 y(The)28 b(cast)i(instruction)e(tak)m(es)i(the)f(place)h + (of)e(t)m(ypical)i(sign)f(extension)g(instructions)g(\(signed)f(and)g + (unsigned)199 5230 y(t)m(yp)s(es)34 b(are)g(distinct\))h(as)f(w)m(ell)h + (as)f(in)m(teger/\015oating)i(p)s(oin)m(t)e(con)m(v)m(ersion)h + (instructions.)51 b(The)34 b(cast)g(is)g(also)h(used)2104 + 5568 y(20)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 37 43 bop 1324 734 a @beginspecial 35 @llx 35 @lly 245 + @urx 184 @ury 1008 @rwi @setspecial + %%BeginDocument: figs/bu.addGToList-after-do_all.ps + %!PS-Adobe-2.0 + %%Creator: dot version 1.8.9 (Sun Sep 22 16:57:48 CDT 2002) + %%For: (lattner) Chris Lattner + %%Title: DataStructures + %%Pages: (atend) + %%BoundingBox: 35 35 245 184 + %%EndComments + save + %%BeginProlog + /DotDict 200 dict def + DotDict begin + + /setupLatin1 { + mark + /EncodingVector 256 array def + EncodingVector 0 + + ISOLatin1Encoding 0 255 getinterval putinterval + + EncodingVector + dup 306 /AE + dup 301 /Aacute + dup 302 /Acircumflex + dup 304 /Adieresis + dup 300 /Agrave + dup 305 /Aring + dup 303 /Atilde + dup 307 /Ccedilla + dup 311 /Eacute + dup 312 /Ecircumflex + dup 313 /Edieresis + dup 310 /Egrave + dup 315 /Iacute + dup 316 /Icircumflex + dup 317 /Idieresis + dup 314 /Igrave + dup 334 /Udieresis + dup 335 /Yacute + dup 376 /thorn + dup 337 /germandbls + dup 341 /aacute + dup 342 /acircumflex + dup 344 /adieresis + dup 346 /ae + dup 340 /agrave + dup 345 /aring + dup 347 /ccedilla + dup 351 /eacute + dup 352 /ecircumflex + dup 353 /edieresis + dup 350 /egrave + dup 355 /iacute + dup 356 /icircumflex + dup 357 /idieresis + dup 354 /igrave + dup 360 /dcroat + dup 361 /ntilde + dup 363 /oacute + dup 364 /ocircumflex + dup 366 /odieresis + dup 362 /ograve + dup 365 /otilde + dup 370 /oslash + dup 372 /uacute + dup 373 /ucircumflex + dup 374 /udieresis + dup 371 /ugrave + dup 375 /yacute + dup 377 /ydieresis + + % Set up ISO Latin 1 character encoding + /starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont + } def + /Times-Roman starnetISO def + /Times-Italic starnetISO def + /Times-Bold starnetISO def + /Times-BoldItalic starnetISO def + /Helvetica starnetISO def + /Helvetica-Oblique starnetISO def + /Helvetica-Bold starnetISO def + /Helvetica-BoldOblique starnetISO def + /Courier starnetISO def + /Courier-Oblique starnetISO def + /Courier-Bold starnetISO def + /Courier-BoldOblique starnetISO def + cleartomark + } bind def + + %%BeginResource: procset + /coord-font-family /Times-Roman def + /default-font-family /Times-Roman def + /coordfont coord-font-family findfont 8 scalefont def + + /InvScaleFactor 1.0 def + /set_scale { + dup 1 exch div /InvScaleFactor exch def + dup scale + } bind def + + % styles + /solid { [] 0 setdash } bind def + /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def + /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def + /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def + /bold { 2 setlinewidth } bind def + /filled { } bind def + /unfilled { } bind def + /rounded { } bind def + /diagonals { } bind def + + % hooks for setting color + /nodecolor { sethsbcolor } bind def + /edgecolor { sethsbcolor } bind def + /graphcolor { sethsbcolor } bind def + /nopcolor {pop pop pop} bind def + + /beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if + } bind def + + /set_font { + findfont exch + scalefont setfont + } def + + % draw aligned label in bounding box aligned to current point + /alignedtext { % width adj text + /text exch def + /adj exch def + /width exch def + gsave + width 0 gt { + text stringwidth pop adj mul 0 rmoveto + } if + [] 0 setdash + text show + grestore + } def + + /boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath + } bind def + + /ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix + } bind def + + /endpage { showpage } bind def + + /layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] + def + + /setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def + } bind def + + /onlayer { curlayer ne {invis} if } def + + /onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if + } def + + /curlayer 0 def + + %%EndResource + %%EndProlog + %%BeginSetup + 14 default-font-family set_font + 1 setmiterlimit + % /arrowlength 10 def + % /arrowwidth 5 def + + % make sure pdfmark is harmless for PS-interpreters other than Distiller + /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse + % make '<<' and '>>' safe on PS Level 1 devices + /languagelevel where {pop languagelevel}{1} ifelse + 2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put + } if + + %%EndSetup + %%Page: 1 1 + %%PageBoundingBox: 36 36 245 184 + %%PageOrientation: Portrait + gsave + 35 35 210 149 boxprim clip newpath + 36 36 translate + 0 0 1 beginpage + 0 0 translate 0 rotate + 0.000 0.000 0.000 graphcolor + 14.00 /Times-Roman set_font + + % Node0x840f090 + gsave 10 dict begin + newpath 117 25 moveto + 195 25 lineto + stroke + newpath 195 25 moveto + 201 25 208 30 208 36 curveto + stroke + newpath 208 36 moveto + 208 49 lineto + stroke + newpath 208 49 moveto + 208 55 202 61 196 61 curveto + stroke + newpath 196 61 moveto + 118 61 lineto + stroke + newpath 118 61 moveto + 112 61 106 55 106 49 curveto + stroke + newpath 106 49 moveto + 106 36 lineto + stroke + newpath 106 36 moveto + 106 30 111 25 117 25 curveto + stroke + gsave 10 dict begin + 157 46 moveto 88 -0.5 (void \(int*\): G) alignedtext + 157 30 moveto 37 -0.5 (addG) alignedtext + end grestore + end grestore + + % Node0x840f0c8 + gsave 10 dict begin + newpath 11 23 moveto + 59 23 lineto + stroke + newpath 59 23 moveto + 65 23 71 28 71 34 curveto + stroke + newpath 71 34 moveto + 71 50 lineto + stroke + newpath 71 50 moveto + 71 56 65 63 59 63 curveto + stroke + newpath 59 63 moveto + 11 63 lineto + stroke + newpath 11 63 moveto + 5 63 0 57 0 51 curveto + stroke + newpath 0 51 moveto + 0 35 lineto + stroke + newpath 0 35 moveto + 0 29 5 23 11 23 curveto + stroke + gsave 10 dict begin + 35 48 moveto 43 -0.5 (list: IR) alignedtext + end grestore + newpath 0 43 moveto + 71 43 lineto + stroke + gsave 10 dict begin + 19 28 moveto 25 -0.5 (list*) alignedtext + end grestore + newpath 39 23 moveto + 39 43 lineto + stroke + gsave 10 dict begin + 55 28 moveto 18 -0.5 (int) alignedtext + end grestore + end grestore + + % Node0x840f0c8 -> Node0x840f0c8 + newpath 38 20 moveto + 53 10 75 0 88 14 curveto + 106 32 106 53 88 72 curveto + 80 79 70 76 61 69 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 36 21 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 62 67 moveto + 53 63 lineto + 60 71 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x840a6b8 + gsave 10 dict begin + 35 119 27 18 ellipse_path + stroke + gsave 10 dict begin + 35 114 moveto 10 -0.5 (L) alignedtext + end grestore + end grestore + + % Node0x840a6b8 -> Node0x840f0c8 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 35 96 moveto + 35 89 35 81 35 73 curveto + stroke + gsave 10 dict begin + solid + newpath 38 96 moveto + 33 96 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 38 73 moveto + 35 63 lineto + 33 73 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x840dd00 + gsave 10 dict begin + newpath 105 99 moveto + 159 99 lineto + 159 139 lineto + 105 139 lineto + closepath + stroke + gsave 10 dict begin + 132 124 moveto 23 -0.5 (call) alignedtext + end grestore + newpath 105 119 moveto + 159 119 lineto + stroke + gsave 10 dict begin + 114 104 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 123 99 moveto + 123 119 lineto + stroke + gsave 10 dict begin + 132 104 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 141 99 moveto + 141 119 lineto + stroke + gsave 10 dict begin + 150 104 moveto 4 -0.5 ( ) alignedtext + end grestore + end grestore + + % Node0x840dd00 -> Node0x840f090 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 138 94 moveto + 141 87 144 78 147 70 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + 137 96 3 3 ellipse_path + fill + 0.000 0.000 0.631 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 149 71 moveto + 150 61 lineto + 144 70 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x840dd00 -> Node0x840f0c8 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 136 104 moveto + 119 96 90 82 71 63 curveto + 68 60 65 55 63 51 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + 138 105 3 3 ellipse_path + fill + 0.000 0.000 0.631 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 66 51 moveto + 59 43 lineto + 61 53 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + endpage + grestore + %%PageTrailer + %%EndPage: 1 + %%Trailer + %%Pages: 1 + end + restore + %%EOF + + %%EndDocument + @endspecial 1337 930 a Fi(\(a\))26 b(After)g(cloning)g + Fg(do)p 2009 930 24 4 v 29 w(all)2405 734 y @beginspecial + 35 @llx 35 @lly 182 @urx 180 @ury 792 @rwi @setspecial + %%BeginDocument: figs/bu.addGToList.ps + %!PS-Adobe-2.0 + %%Creator: dot version 1.8.9 (Sun Sep 22 16:57:48 CDT 2002) + %%For: (lattner) Chris Lattner + %%Title: DataStructures + %%Pages: (atend) + %%BoundingBox: 35 35 182 180 + %%EndComments + save + %%BeginProlog + /DotDict 200 dict def + DotDict begin + + /setupLatin1 { + mark + /EncodingVector 256 array def + EncodingVector 0 + + ISOLatin1Encoding 0 255 getinterval putinterval + + EncodingVector + dup 306 /AE + dup 301 /Aacute + dup 302 /Acircumflex + dup 304 /Adieresis + dup 300 /Agrave + dup 305 /Aring + dup 303 /Atilde + dup 307 /Ccedilla + dup 311 /Eacute + dup 312 /Ecircumflex + dup 313 /Edieresis + dup 310 /Egrave + dup 315 /Iacute + dup 316 /Icircumflex + dup 317 /Idieresis + dup 314 /Igrave + dup 334 /Udieresis + dup 335 /Yacute + dup 376 /thorn + dup 337 /germandbls + dup 341 /aacute + dup 342 /acircumflex + dup 344 /adieresis + dup 346 /ae + dup 340 /agrave + dup 345 /aring + dup 347 /ccedilla + dup 351 /eacute + dup 352 /ecircumflex + dup 353 /edieresis + dup 350 /egrave + dup 355 /iacute + dup 356 /icircumflex + dup 357 /idieresis + dup 354 /igrave + dup 360 /dcroat + dup 361 /ntilde + dup 363 /oacute + dup 364 /ocircumflex + dup 366 /odieresis + dup 362 /ograve + dup 365 /otilde + dup 370 /oslash + dup 372 /uacute + dup 373 /ucircumflex + dup 374 /udieresis + dup 371 /ugrave + dup 375 /yacute + dup 377 /ydieresis + + % Set up ISO Latin 1 character encoding + /starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont + } def + /Times-Roman starnetISO def + /Times-Italic starnetISO def + /Times-Bold starnetISO def + /Times-BoldItalic starnetISO def + /Helvetica starnetISO def + /Helvetica-Oblique starnetISO def + /Helvetica-Bold starnetISO def + /Helvetica-BoldOblique starnetISO def + /Courier starnetISO def + /Courier-Oblique starnetISO def + /Courier-Bold starnetISO def + /Courier-BoldOblique starnetISO def + cleartomark + } bind def + + %%BeginResource: procset + /coord-font-family /Times-Roman def + /default-font-family /Times-Roman def + /coordfont coord-font-family findfont 8 scalefont def + + /InvScaleFactor 1.0 def + /set_scale { + dup 1 exch div /InvScaleFactor exch def + dup scale + } bind def + + % styles + /solid { [] 0 setdash } bind def + /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def + /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def + /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def + /bold { 2 setlinewidth } bind def + /filled { } bind def + /unfilled { } bind def + /rounded { } bind def + /diagonals { } bind def + + % hooks for setting color + /nodecolor { sethsbcolor } bind def + /edgecolor { sethsbcolor } bind def + /graphcolor { sethsbcolor } bind def + /nopcolor {pop pop pop} bind def + + /beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if + } bind def + + /set_font { + findfont exch + scalefont setfont + } def + + % draw aligned label in bounding box aligned to current point + /alignedtext { % width adj text + /text exch def + /adj exch def + /width exch def + gsave + width 0 gt { + text stringwidth pop adj mul 0 rmoveto + } if + [] 0 setdash + text show + grestore + } def + + /boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath + } bind def + + /ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix + } bind def + + /endpage { showpage } bind def + + /layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] + def + + /setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def + } bind def + + /onlayer { curlayer ne {invis} if } def + + /onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if + } def + + /curlayer 0 def + + %%EndResource + %%EndProlog + %%BeginSetup + 14 default-font-family set_font + 1 setmiterlimit + % /arrowlength 10 def + % /arrowwidth 5 def + + % make sure pdfmark is harmless for PS-interpreters other than Distiller + /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse + % make '<<' and '>>' safe on PS Level 1 devices + /languagelevel where {pop languagelevel}{1} ifelse + 2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put + } if + + %%EndSetup + %%Page: 1 1 + %%PageBoundingBox: 36 36 182 180 + %%PageOrientation: Portrait + gsave + 35 35 147 145 boxprim clip newpath + 36 36 translate + 0 0 1 beginpage + 0 0 translate 0 rotate + 0.000 0.000 0.000 graphcolor + 14.00 /Times-Roman set_font + + % Node0x840f0c8 + gsave 10 dict begin + newpath 11 23 moveto + 61 23 lineto + stroke + newpath 61 23 moveto + 67 23 73 28 73 34 curveto + stroke + newpath 73 34 moveto + 73 50 lineto + stroke + newpath 73 50 moveto + 73 56 67 63 61 63 curveto + stroke + newpath 61 63 moveto + 11 63 lineto + stroke + newpath 11 63 moveto + 5 63 0 57 0 51 curveto + stroke + newpath 0 51 moveto + 0 35 lineto + stroke + newpath 0 35 moveto + 0 29 5 23 11 23 curveto + stroke + gsave 10 dict begin + 36 48 moveto 59 -0.5 (list: IMR) alignedtext + end grestore + newpath 0 43 moveto + 73 43 lineto + stroke + gsave 10 dict begin + 20 28 moveto 25 -0.5 (list*) alignedtext + end grestore + newpath 40 23 moveto + 40 43 lineto + stroke + gsave 10 dict begin + 56 28 moveto 18 -0.5 (int) alignedtext + end grestore + end grestore + + % Node0x840f0c8 -> Node0x840f0c8 + newpath 38 20 moveto + 54 10 77 0 90 14 curveto + 108 32 108 53 90 72 curveto + 81 80 71 76 61 69 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 36 21 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 63 68 moveto + 54 63 lineto + 60 71 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x840a6b8 + gsave 10 dict begin + 36 117 27 18 ellipse_path + stroke + gsave 10 dict begin + 36 112 moveto 10 -0.5 (L) alignedtext + end grestore + end grestore + + % Node0x840a6b8 -> Node0x840f0c8 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 36 94 moveto + 36 87 36 80 36 72 curveto + stroke + gsave 10 dict begin + solid + newpath 39 94 moveto + 34 94 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 39 73 moveto + 36 63 lineto + 34 73 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x840f090 + gsave 10 dict begin + newpath 93 99 moveto + 133 99 lineto + stroke + newpath 133 99 moveto + 139 99 145 104 145 110 curveto + stroke + newpath 145 110 moveto + 145 123 lineto + stroke + newpath 145 123 moveto + 145 129 139 135 133 135 curveto + stroke + newpath 133 135 moveto + 93 135 lineto + stroke + newpath 93 135 moveto + 87 135 81 129 81 123 curveto + stroke + newpath 81 123 moveto + 81 110 lineto + stroke + newpath 81 110 moveto + 81 104 87 99 93 99 curveto + stroke + gsave 10 dict begin + 113 120 moveto 50 -0.5 (int: GR) alignedtext + 113 104 moveto 12 -0.5 (G) alignedtext + end grestore + end grestore + endpage + grestore + %%PageTrailer + %%EndPage: 1 + %%Trailer + %%Pages: 1 + end + restore + %%EOF + + %%EndDocument + @endspecial 2528 930 a Fi(\(b\))f(Finished)1199 1185 + y Fw(Figure)31 b(4.9:)42 b Fq(Bottom-Up)27 b(DS)h(Graphs)f(for)g + Fp(addGToList)199 1460 y Fw(resolv)m(ed)37 b(while)f(pro)s(cessing)f + Fr(addGToList)p Fw(.)55 b(Note)37 b(that)f(the)g(BU)h(Graph)e(con)m + (taining)i(the)f(original)h(call)g(site)199 1643 y(\()p + Fr(do)p 336 1643 29 4 v 34 w(all)30 b Fw(in)g(the)h(example\))g(will)g + (not)f(ha)m(v)m(e)i(the)e(call)i(resolv)m(ed)f(during)e(the)i(BU)g + (pass.)p 1581 1769 1137 4 v 1581 2376 4 608 v 1609 2351 + a @beginspecial 35 @llx 35 @lly 318 @urx 181 @ury 1296 + @rwi @setspecial + %%BeginDocument: figs/bu.main.ps + %!PS-Adobe-2.0 + %%Creator: dot version 1.8.9 (Sun Sep 22 16:57:48 CDT 2002) + %%For: (lattner) Chris Lattner + %%Title: DataStructures + %%Pages: (atend) + %%BoundingBox: 35 35 318 181 + %%EndComments + save + %%BeginProlog + /DotDict 200 dict def + DotDict begin + + /setupLatin1 { + mark + /EncodingVector 256 array def + EncodingVector 0 + + ISOLatin1Encoding 0 255 getinterval putinterval + + EncodingVector + dup 306 /AE + dup 301 /Aacute + dup 302 /Acircumflex + dup 304 /Adieresis + dup 300 /Agrave + dup 305 /Aring + dup 303 /Atilde + dup 307 /Ccedilla + dup 311 /Eacute + dup 312 /Ecircumflex + dup 313 /Edieresis + dup 310 /Egrave + dup 315 /Iacute + dup 316 /Icircumflex + dup 317 /Idieresis + dup 314 /Igrave + dup 334 /Udieresis + dup 335 /Yacute + dup 376 /thorn + dup 337 /germandbls + dup 341 /aacute + dup 342 /acircumflex + dup 344 /adieresis + dup 346 /ae + dup 340 /agrave + dup 345 /aring + dup 347 /ccedilla + dup 351 /eacute + dup 352 /ecircumflex + dup 353 /edieresis + dup 350 /egrave + dup 355 /iacute + dup 356 /icircumflex + dup 357 /idieresis + dup 354 /igrave + dup 360 /dcroat + dup 361 /ntilde + dup 363 /oacute + dup 364 /ocircumflex + dup 366 /odieresis + dup 362 /ograve + dup 365 /otilde + dup 370 /oslash + dup 372 /uacute + dup 373 /ucircumflex + dup 374 /udieresis + dup 371 /ugrave + dup 375 /yacute + dup 377 /ydieresis + + % Set up ISO Latin 1 character encoding + /starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont + } def + /Times-Roman starnetISO def + /Times-Italic starnetISO def + /Times-Bold starnetISO def + /Times-BoldItalic starnetISO def + /Helvetica starnetISO def + /Helvetica-Oblique starnetISO def + /Helvetica-Bold starnetISO def + /Helvetica-BoldOblique starnetISO def + /Courier starnetISO def + /Courier-Oblique starnetISO def + /Courier-Bold starnetISO def + /Courier-BoldOblique starnetISO def + cleartomark + } bind def + + %%BeginResource: procset + /coord-font-family /Times-Roman def + /default-font-family /Times-Roman def + /coordfont coord-font-family findfont 8 scalefont def + + /InvScaleFactor 1.0 def + /set_scale { + dup 1 exch div /InvScaleFactor exch def + dup scale + } bind def + + % styles + /solid { [] 0 setdash } bind def + /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def + /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def + /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def + /bold { 2 setlinewidth } bind def + /filled { } bind def + /unfilled { } bind def + /rounded { } bind def + /diagonals { } bind def + + % hooks for setting color + /nodecolor { sethsbcolor } bind def + /edgecolor { sethsbcolor } bind def + /graphcolor { sethsbcolor } bind def + /nopcolor {pop pop pop} bind def + + /beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if + } bind def + + /set_font { + findfont exch + scalefont setfont + } def + + % draw aligned label in bounding box aligned to current point + /alignedtext { % width adj text + /text exch def + /adj exch def + /width exch def + gsave + width 0 gt { + text stringwidth pop adj mul 0 rmoveto + } if + [] 0 setdash + text show + grestore + } def + + /boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath + } bind def + + /ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix + } bind def + + /endpage { showpage } bind def + + /layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] + def + + /setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def + } bind def + + /onlayer { curlayer ne {invis} if } def + + /onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if + } def + + /curlayer 0 def + + %%EndResource + %%EndProlog + %%BeginSetup + 14 default-font-family set_font + 1 setmiterlimit + % /arrowlength 10 def + % /arrowwidth 5 def + + % make sure pdfmark is harmless for PS-interpreters other than Distiller + /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse + % make '<<' and '>>' safe on PS Level 1 devices + /languagelevel where {pop languagelevel}{1} ifelse + 2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put + } if + + %%EndSetup + %%Page: 1 1 + %%PageBoundingBox: 36 36 318 181 + %%PageOrientation: Portrait + gsave + 35 35 283 146 boxprim clip newpath + 36 36 translate + 0 0 1 beginpage + 0 0 translate 0 rotate + 0.000 0.000 0.000 graphcolor + 14.00 /Times-Roman set_font + + % Node0x840ff80 + gsave 10 dict begin + newpath 11 24 moveto + 67 24 lineto + stroke + newpath 67 24 moveto + 74 24 80 29 80 35 curveto + stroke + newpath 80 35 moveto + 80 51 lineto + stroke + newpath 80 51 moveto + 80 57 74 64 68 64 curveto + stroke + newpath 68 64 moveto + 12 64 lineto + stroke + newpath 12 64 moveto + 5 64 0 58 0 52 curveto + stroke + newpath 0 52 moveto + 0 36 lineto + stroke + newpath 0 36 moveto + 0 30 5 24 11 24 curveto + stroke + gsave 10 dict begin + 40 49 moveto 66 -0.5 (list: HMR) alignedtext + end grestore + newpath 0 44 moveto + 80 44 lineto + stroke + gsave 10 dict begin + 21 29 moveto 25 -0.5 (list*) alignedtext + end grestore + newpath 43 24 moveto + 43 44 lineto + stroke + gsave 10 dict begin + 61 29 moveto 18 -0.5 (int) alignedtext + end grestore + end grestore + + % Node0x840ff80 -> Node0x840ff80 + newpath 41 21 moveto + 58 11 83 0 98 15 curveto + 116 33 116 54 98 73 curveto + 89 82 78 78 67 70 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 39 22 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 68 68 moveto + 59 64 lineto + 66 72 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x8410028 + gsave 10 dict begin + newpath 127 24 moveto + 183 24 lineto + stroke + newpath 183 24 moveto + 190 24 196 29 196 35 curveto + stroke + newpath 196 35 moveto + 196 51 lineto + stroke + newpath 196 51 moveto + 196 57 190 64 184 64 curveto + stroke + newpath 184 64 moveto + 128 64 lineto + stroke + newpath 128 64 moveto + 121 64 116 58 116 52 curveto + stroke + newpath 116 52 moveto + 116 36 lineto + stroke + newpath 116 36 moveto + 116 30 121 24 127 24 curveto + stroke + gsave 10 dict begin + 156 49 moveto 66 -0.5 (list: HMR) alignedtext + end grestore + newpath 116 44 moveto + 196 44 lineto + stroke + gsave 10 dict begin + 137 29 moveto 25 -0.5 (list*) alignedtext + end grestore + newpath 159 24 moveto + 159 44 lineto + stroke + gsave 10 dict begin + 177 29 moveto 18 -0.5 (int) alignedtext + end grestore + end grestore + + % Node0x8410028 -> Node0x8410028 + newpath 157 21 moveto + 174 10 199 1 214 15 curveto + 232 33 232 54 214 73 curveto + 205 82 193 78 183 70 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 155 22 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 184 68 moveto + 175 64 lineto + 182 72 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x840aa50 + gsave 10 dict begin + 40 118 27 18 ellipse_path + stroke + gsave 10 dict begin + 40 113 moveto 12 -0.5 (X) alignedtext + end grestore + end grestore + + % Node0x840aa50 -> Node0x840ff80 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 40 95 moveto + 40 88 40 81 40 73 curveto + stroke + gsave 10 dict begin + solid + newpath 43 95 moveto + 38 95 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 43 74 moveto + 40 64 lineto + 38 74 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x840aa98 + gsave 10 dict begin + 156 118 27 18 ellipse_path + stroke + gsave 10 dict begin + 156 113 moveto 12 -0.5 (Y) alignedtext + end grestore + end grestore + + % Node0x840aa98 -> Node0x8410028 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 156 95 moveto + 156 88 156 81 156 73 curveto + stroke + gsave 10 dict begin + solid + newpath 159 95 moveto + 154 95 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 159 74 moveto + 156 64 lineto + 154 74 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x840f090 + gsave 10 dict begin + newpath 212 100 moveto + 268 100 lineto + stroke + newpath 268 100 moveto + 275 100 281 105 281 111 curveto + stroke + newpath 281 111 moveto + 281 124 lineto + stroke + newpath 281 124 moveto + 281 130 275 136 269 136 curveto + stroke + newpath 269 136 moveto + 213 136 lineto + stroke + newpath 213 136 moveto + 206 136 201 130 201 124 curveto + stroke + newpath 201 124 moveto + 201 111 lineto + stroke + newpath 201 111 moveto + 201 105 206 100 212 100 curveto + stroke + gsave 10 dict begin + 241 121 moveto 66 -0.5 (int: GMR) alignedtext + 241 105 moveto 12 -0.5 (G) alignedtext + end grestore + end grestore + endpage + grestore + %%PageTrailer + %%EndPage: 1 + %%Trailer + %%Pages: 1 + end + restore + %%EOF + + %%EndDocument + @endspecial 2714 2376 V 1581 2379 1137 4 v 1249 2547 + a(Figure)g(4.10:)42 b Fq(BU)28 b(DSGraph)f(for)g(the)h + Fp(main)e Fq(function)340 2824 y Fw(The)33 b(graph)f(of)h(Figure)h + (4.10)g(sho)m(ws)f(the)g(Bottom-Up)h(graph)f(calculated)i(for)d(the)h + Fr(main)f Fw(function)h(of)g(our)199 3007 y(example.)65 + b(This)37 b(graph)g(demonstrates)i(ho)m(w)f(the)g(com)m(bination)h(of)f + (con)m(text)i(sensitivit)m(y)f(with)f(cloning)h(can)199 + 3189 y(iden)m(tify)31 b(disjoin)m(t)g(data)g(structures,)f(ev)m(en)h + (when)e(complex)i(p)s(oin)m(ter)g(manipulation)f(is)h(in)m(v)m(olv)m + (ed.)199 3499 y Fn(T)-9 b(op-Do)m(wn)35 b(Analysis)h(Phase)199 + 3741 y Fw(The)c(T)-8 b(op-Do)m(wn)33 b(analysis)f(pass)g(is)g(used)f + (to)i(propagate)g(information)f(from)g(callers)h(to)f(callees.)48 + b(The)31 b(goal)j(of)199 3923 y(this)29 b(phase)f(is)h(to)h(construct)f + (a)g(graph)f(for)h(eac)m(h)h(function)e(whic)m(h)h(describ)s(es)f(all)h + (of)g(the)g(p)s(ossible)g(con)m(texts)h(the)199 4106 + y(function)g(is)h(in)m(v)m(ok)m(ed)h(in.)340 4289 y(The)i(T)-8 + b(op-Do)m(wn)34 b(construction)h(phase)e(is)h(almost)g(the)g(exact)i + (in)m(v)m(erse)e(of)g(the)g(Bottom-Up)i(construction)199 + 4471 y(phase.)57 b(W)-8 b(e)38 b(tra)m(v)m(erse)f(the)f(in)m(v)m(erse)h + (call)g(graph)f(\(the)g(call)h(graph)f(computed)g(b)m(y)g(the)g + (Bottom-Up)h(tra)m(v)m(ersal)199 4654 y(with)42 b(all)h(edges)f(in)m(v) + m(erted\),)47 b(using)41 b(the)h(T)-8 b(arjan)42 b(SCC)f(iden)m + (ti\014cation)i(algorithm)g(to)g(handle)f(SCCs)e(in)i(the)199 + 4837 y(same)36 b(w)m(a)m(y)g(as)f(the)g(Bottom-Up)h(phase.)55 + b(Instead)34 b(of)h(inlining)g(callee)i(graphs)e(in)m(to)h(the)f + (caller)h(graph)e(in)h(the)199 5019 y Fn(Pro)s(cessSCC)c + Fw(function,)g(the)f(T)-8 b(op-Do)m(wn)31 b(pass)f(inlines)h(the)f + (caller)i(graph)e(in)m(to)h(eac)m(h)h(of)e(its)h(callees.)340 + 5202 y(The)25 b(primary)g(distinction)h(b)s(et)m(w)m(een)h(the)e + (Bottom-Up)j(and)d(T)-8 b(op-Do)m(wn)26 b(construction)g(phases)f(is)h + (that)g(the)2104 5568 y(37)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (26) 27 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 36 42 bop 199 91 a Fw(is)28 b(b)s(eing)f(violated)i(\(see)f(Section)h + (3.3.2\).)42 b(When)27 b(a)h(p)s(oin)m(ter)f(con)m(v)m(erting,)j(non-t) + m(yp)s(e-safe)e(cast)h(is)e(encoun)m(tered,)199 274 y(the)43 + b(op)s(erand)e(no)s(de)h(is)h(folded.)76 b(This)42 b(folding)h(op)s + (eration)g(discards)e(\014eld)h(sensitivit)m(y)i(in)f(order)e(to)j + (retain)199 457 y(conserv)-5 b(ativ)m(e)35 b(correctness.)50 + b(The)32 b(explicit)i(exp)s(osure)f(of)g(this)g(op)s(eration)g(in)g + (the)g(LL)-10 b(VM)33 b(virtual)g(instruction)199 639 + y(set)e(mak)m(es)g(this)g(loss)f(of)h(t)m(yp)s(e)f(information)h + (explicit.)340 822 y(F)-8 b(or)27 b(other)e(instructions)h(in)m(v)m + (olving)h(a)f(p)s(oin)m(ter-compatible)h(op)s(erand)d(or)h(result,)i + (the)f(lo)s(cal)h(analysis)f(phase)199 1005 y(sets)31 + b(the)g(\\)p Fn(U)p Fw(nkno)m(wn")f(bit)h(and)f(collapse)h(the)g(no)s + (de)f(to)h(indicate)g(that)g(something)g(un)m(traceable)h(o)s(ccurred.) + 340 1187 y(The)j(\014nal)g(step)h(in)f(the)g(Lo)s(cal)h(graph)f + (construction)h(is)f(to)i(calculate)g(whic)m(h)e(data)h(structure)f(no) + s(des)g(are)199 1370 y(complete)25 b(and)d(whic)m(h)g(are)h + (incomplete.)40 b(F)-8 b(or)23 b(a)h(Lo)s(cal)f(graph,)h(an)m(y)g(no)s + (de)e(reac)m(hable)i(from)e(a)h(formal)g(argumen)m(t,)199 + 1553 y(global,)32 b(passed)e(as)h(an)f(argumen)m(t)h(to)g(a)g(call)g + (site,)h(or)e(returned)f(b)m(y)i(a)f(call)i(site)f(is)g(mark)m(ed)f(as) + h(incomplete.)199 1863 y Fn(Bottom-Up)36 b(Analysis)f(Phase)199 + 2104 y Fw(The)g(Bottom-Up)h(\(BU\))g(analysis)f(phase)g(creates)h(a)f + (graph)f(for)h(eac)m(h)h(function)e(in)h(the)g(program,)h(concisely)199 + 2287 y(summarizing)j(the)g(total)i(e\013ect)f(of)f(calling)h(that)g + (function)e(\(imp)s(osed)h(aliases)h(and)e(mo)s(d/ref)h(information\)) + 199 2469 y(without)30 b(an)m(y)g(calling)h(con)m(text)g(information.)41 + b(It)30 b(computes)f(this)h(graph)f(b)m(y)g(cloning)i(the)e(Bottom-up)i + (graphs)199 2652 y(of)26 b(all)g Fs(known)f Fw(callees)j(in)m(to)e(the) + f(caller's)h(Lo)s(cal)g(graph,)g(merging)g(no)s(des)e(p)s(oin)m(ted)h + (to)h(b)m(y)f(corresp)s(onding)f(formal)199 2835 y(and)30 + b(actual)i(argumen)m(ts.)340 3018 y(In)38 b(the)g(DS)g(graph)f + (represen)m(tation,)42 b(the)c(DSCallSite)h(list)g(main)m(tained)f(b)m + (y)g(eac)m(h)i(DS)d(graph)h(implicitly)199 3200 y(de\014nes)26 + b(the)h(kno)m(wn)g(edges)g(of)h(the)f(call)h(graph.)39 + b(The)27 b(Bottom-Up)h(analysis)g(phase)e(uses)h(T)-8 + b(arjan's)27 b(linear-time)199 3383 y(algorithm)42 b(to)f(iden)m(tify)g + (Strongly)f(Connected)h(Comp)s(onen)m(ts)e(\(SCCs\))h(in)g(the)h(call)h + (graph)e(de\014ned)f(b)m(y)h(the)199 3566 y(DSCallSite)c(list.)54 + b(T)-8 b(arjan's)35 b(algorithm)h(iden)m(ti\014es)f(SCCs)e(in)i(p)s + (ost-order,)g(directly)h(pro)m(viding)e(the)h(Bottom-)199 + 3748 y(Up)f(order)g(that)h(this)f(phase)g(requires.)52 + b(While)35 b(tra)m(v)m(ersing)g(the)g(call)g(graph)f(in)g(p)s + (ost-order,)h(the)f(Bottom-Up)199 3931 y(Analysis)39 + b(phase)e(clones)i(eac)m(h)h(called)f(graph)e(in)m(to)j(its)e(caller,)k + (resolving)c(argumen)m(ts)h(and)e(eliminating)j(call)199 + 4114 y(sites.)340 4296 y(Handling)22 b(function)f(p)s(oin)m(ters)h(and) + f(external)h(functions)g(requires)f(that)h(w)m(e)g(restrict)h(the)e(p)s + (ost-order)h(tra)m(v)m(er-)199 4479 y(sal)32 b(to)g(only)f(w)m(alk)h + (call-sites)i(whic)m(h)d(target)i(\\complete")g(no)s(des)e(\()p + Fv(x)p Fw(4.2.1\).)46 b(As)31 b(graphs)g(are)g(cloned)h(in)m(to)g + (their)199 4662 y(caller,)39 b(the)d(unresolv)m(ed)g(call)h(no)s(des)e + (will)i(b)s(e)e(copied)h(as)h(w)m(ell.)58 b(Suc)m(h)35 + b(an)h(unresolv)m(ed)g(call)h(ma)m(y)g(b)s(ecome)f(re-)199 + 4844 y(solv)m(ed)d(\(b)s(ecause)f(the)g(function)g(passed)f(to)i(a)f + (function)f(p)s(oin)m(ter)h(argumen)m(t)h(b)s(ecomes)f(kno)m(wn\).)45 + b(This)31 b(allo)m(ws)199 5027 y(the)39 b(indirect)f(call)i(to)f(b)s(e) + e(resolv)m(ed)i(b)m(y)g(inlining)f(the)g(callee's)j(BU)d(graph)g(in)m + (to)h(the)g(graph)f(of)g(the)g(function)199 5210 y(where)32 + b(the)g(call)h(site)g(b)s(ecame)g(resolv)m(ed.)46 b(F)-8 + b(or)33 b(example,)h(in)d(Figure)i(4.9,)h(the)e(indirect)g(call)i(site) + e(in)g Fr(do)p 3835 5210 29 4 v 34 w(all)f Fw(is)2104 + 5568 y(36)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 21 27 bop 199 91 a Fw(for)36 b(op)s(erations)g(that)g(do)g(not)g(alter) + h(data)f(as)g(w)m(ell,)i(suc)m(h)e(as)g(con)m(v)m(erting)h(a)f(signed)g + (in)m(teger)h(to)g(an)e(unsigned)199 274 y(in)m(teger)d(of)f(the)f + (same)h(size.)340 457 y(Because)44 b(LL)-10 b(VM)42 b(is)g(in)m(tended) + g(as)g(a)h(general-purp)s(ose)f(lo)m(w-lev)m(el)j(instruction)d(set,)k + (it)c(m)m(ust)g(represen)m(t)199 639 y(b)s(oth)k(\\t)m(yp)s(e-safe")i + (and)d(\\t)m(yp)s(e-unsafe')i(programs)f(for)f(arbitrary)h(high-lev)m + (el)i(languages.)89 b(Nev)m(ertheless,)199 822 y(distinguishing)41 + b(b)s(et)m(w)m(een)h(safe)g(and)f(unsafe)g(op)s(erations)g(is)h(imp)s + (ortan)m(t)f(b)s(ecause)h(man)m(y)f(memory-orien)m(ted)199 + 1005 y(optimizations)32 b(ma)m(y)f(only)g(b)s(e)f(legal)i(for)e(safe)h + (programs.)340 1187 y(W)-8 b(e)38 b(consider)e(an)g(LL)-10 + b(VM)36 b(program)f(to)i(b)s(e)f Fs(typ)-5 b(e-safe)37 + b Fw(if)f(no)f Fr(cast)g Fw(instruction)h(con)m(v)m(erts)i(a)e(non-p)s + (oin)m(ter)199 1370 y(t)m(yp)s(e)g(to)h(a)f(p)s(oin)m(ter)g(t)m(yp)s(e) + g(or)g(a)h(p)s(oin)m(ter)e(of)i(one)f(t)m(yp)s(e)g(to)h(a)f(p)s(oin)m + (ter)g(of)g(another)g(t)m(yp)s(e)g(\(in)g(other)g(w)m(ords,)h(no)199 + 1553 y(casts)26 b Fs(to)f Fw(a)g(p)s(oin)m(ter)g(t)m(yp)s(e)g(are)g + (allo)m(w)m(ed\).)41 b(In)24 b(the)h(example)h(ab)s(o)m(v)m(e,)h(the)e + (last)h(t)m(w)m(o)g(cast)g(instructions)e(are)h(unsafe.)199 + 1736 y(Suc)m(h)k(p)s(oin)m(ter)g(casts)h(are)f Fs(the)j(only)h(way)d + Fw(that)f(op)s(erations)h(of)f(the)h(second)f(t)m(yp)s(e)g(ab)s(o)m(v)m + (e)h(\(that)h(rein)m(tepret)e(data)199 1918 y(in)h(memory\))h(can)g(b)s + (e)e(enco)s(ded)h(in)g(LL)-10 b(VM.)340 2101 y(If)47 + b(a)g(program)g(is)g(t)m(yp)s(e-safe)h(b)m(y)f(the)g(ab)s(o)m(v)m(e)h + (de\014nition,)j(t)m(yp)s(e)c(information)h(can)f(b)s(e)f(exploited)i + (dur-)199 2284 y(ing)37 b(imp)s(ortan)m(t)h(analyses)f(suc)m(h)g(as)g + (alias)i(analysis,)g(and)e(data)g(structure)g(reorganization)i + (transformations)199 2466 y(can)i(b)s(e)g(safely)g(applied)g(to)g(it) + 1284 2433 y Fk(3)1324 2466 y Fw(.)72 b(If)41 b(a)g(program)f(is)h + (completely)i(t)m(yp)s(e-safe,)h(its)e(LL)-10 b(VM)40 + b(co)s(de)h(can)g(use)g(the)199 2649 y Fr(getelementptr)29 + b Fw(instruction)j(for)g(all)h(p)s(oin)m(ter)g(arithmetic,)h(without)e + (requiring)g(an)m(y)h(unsafe)e(casts.)48 b(F)-8 b(or)33 + b(ex-)199 2832 y(ample,)e(giv)m(en)h(a)f(language)h(with)e(p)s(oin)m + (ter)h(arithmetic,)h(naiv)m(e)f(compilation)i(can)d(cause)i(t)m(yp)s(e) + e(violations.)43 b(F)-8 b(or)199 3014 y(example,)32 b(consider)e(the)g + (C)g(co)s(de)h(in)f(Figure)h(3.9:)438 3241 y Fr(int)47 + b(*A)g(=)g(...,)g(*P)g(=)h(A;)438 3353 y(while)e(\(P)h(!=)h(A+Size\))d + ({)533 3466 y(*P)j(=)f(*P)g(+)h(1;)533 3579 y(++P;)620 + b(/*)47 b(Pointer)f(arithmetic!)e(*/)438 3692 y(})1271 + 3988 y Fw(Figure)31 b(3.9:)42 b(P)m(oin)m(ter)32 b(arithmetic)f + (example)g(in)g(C)340 4266 y(The)40 b(p)s(oin)m(ter)h(arithmetic)g(in)g + (the)f(last)h(statemen)m(t)i(could)d(b)s(e)g(compiled)h(initially)h(in) + m(to)f(the)g(snipp)s(et)e(of)199 4449 y(LL)-10 b(VM)31 + b(co)s(de)f(in)g(Figure)h(3.10.)340 4631 y(The)24 b Fr(\045P2)e + Fw(cast)j(is)f(not)g(t)m(yp)s(e-safe,)i(b)s(ecause)e(an)f(arbitrary)h + (v)-5 b(alue)24 b(is)g(b)s(eing)f(cast)i(to)f(a)g(p)s(oin)m(ter,)i(and) + d(although)p 199 4707 1560 4 v 303 4760 a Fj(3)337 4792 + y Fi(Note)k(that)g(programs)h(whic)n(h)e(ha)n(v)n(e)g(\\unde\014ned)g + (b)r(eha)n(vior",)i(e.g.,)g(b)n(y)e(accessing)i(memory)f(that)g(has)g + (b)r(een)f Fg(free)p Fi('d)i(or)f(using)199 4883 y(out-of-range)g(arra) + n(y)g(subscripts,)g(are)g(still)g(b)r(e)f(considered)h(\\t)n(yp)r + (e-safe")g(b)n(y)e(our)i(de\014nition.)36 b(This)27 b(is)g(appropriate) + g(b)r(ecause)g(suc)n(h)199 4975 y(b)r(eha)n(vior)e(do)r(es)f(not)h + (preclude)f(transformations:)35 b(the)24 b(compiler)h(can)g(legally)g + (c)n(hange)g(the)f(b)r(eha)n(vior)g(of)h(suc)n(h)f(programs,)i(without) + 199 5066 y(ha)n(ving)k(to)f(detect)h(an)n(y)f(correctness)i(violations) + g(that)e(result)h(from)g(unde\014ned)e(b)r(eha)n(vior.)47 + b(In)29 b(a)h(language)h(with)e(stricter)i(safet)n(y)199 + 5157 y(requiremen)n(ts,)i(suc)n(h)e(as)h(Ja)n(v)l(a)g(or)g(F)-6 + b(ortran)32 b(90,)i(the)d(additional)i(\\t)n(yp)r(e-safet)n(y")e(c)n + (hec)n(ks)g(required)g(b)n(y)g(the)g(language)i(should)e(b)r(e)199 + 5249 y(implemen)n(ted)j(with)h(explicit)g(LL)-9 b(VM)34 + b(co)r(de)h(\(for)g(example,)i(conditional)f(branc)n(hes)e(on)g(the)g + (b)r(ounds)g(of)h(the)f(arra)n(y\))h(and)f(then)199 5340 + y(optimized,)27 b(just)f(as)g(they)f(w)n(ould)h(b)r(e)f(in)h(the)f(lo)n + (w-lev)n(el)i(represen)n(tations)f(within)g(standard)g(static)g + (compilers.)2104 5568 y Fw(21)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (27) 28 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 22 28 bop 438 113 a Fr(\045tmp)94 b(=)48 b(cast)e(int*)h(\045P1)g(to)g + (long)190 b(;)47 b(Convert)f(pointer)g(to)h(integral)f(type)g(for)h + (add)438 226 y(\045tmp2)f(=)i(add)94 b(long)47 b(\045tmp,)f(4)382 + b(;)47 b(Add)g(offset)f(to)h(integral)f(value)438 339 + y(\045P2)142 b(=)48 b(cast)e(long)h(\045tmp2)f(to)i(int*)94 + b(;)47 b(Convert)f(result)g(back)h(to)g(pointer)f(\(unsafe!\))1154 + 634 y Fw(Figure)31 b(3.10:)42 b(P)m(oin)m(ter)32 b(arithmetic)f + (example)g(in)g(LL)-10 b(VM)199 909 y(in)26 b(this)f(case)i(the)f + (result)g(happ)s(ens)e(to)i(b)s(e)f(a)h(v)-5 b(alid)26 + b(in)m(teger)i(p)s(oin)m(ter,)e(the)g(compiler)h(cannot)f(kno)m(w)g + (that)g(without)199 1092 y(further)d(analysis.)39 b(In)24 + b(the)g(case)h(ab)s(o)m(v)m(e,)i(ho)m(w)m(ev)m(er,)g(the)e + Fr(getelementptr)20 b Fw(instruction)k(can)h(b)s(e)e(used)h(to)g + (directly)199 1275 y(na)m(vigate)33 b(the)d(arra)m(y)h(in)f(a)h(t)m(yp) + s(e-safe)1492 1242 y Fk(4)1563 1275 y Fw(manner)e(\(Figure)j(3.11\).) + 438 1510 y Fr(\045P2)47 b(=)g(getelementptr)d(int*)j(\045P1,)g(long)f + (1)143 b(;)48 b(Get)f(pointer)e(to)j(next)e(integer)612 + 1806 y Fw(Figure)31 b(3.11:)42 b(P)m(oin)m(ter)32 b(arithmetic)g + (example)f(with)f(the)g Fr(getelementptr)d Fw(instruction)340 + 2085 y(In)33 b(practice,)k(man)m(y)d(C)f(programs)g(are)i(completely)g + (or)f(mostly)g(t)m(yp)s(e-safe)h(according)g(to)f(the)g(ab)s(o)m(v)m(e) + h(def-)199 2268 y(inition,)43 b(and)c(most)i(unsafe)e(cast)i(op)s + (erations)f(can)g(b)s(e)f(eliminated)i(from)e(suc)m(h)h(programs)f + (through)g(simple)199 2451 y(transformations.)47 b(Nev)m(ertheless,)34 + b(there)e(are)h(some)g(programs)e(whic)m(h)h(in)m(trinsically)i(m)m + (ust)e(use)g(unsafe)f(op)s(er-)199 2633 y(ations)i(\(suc)m(h)e(as)h + (casting)h(a)f(sp)s(eci\014c)f(in)m(teger,)i(represen)m(ting)f(the)g + (address)f(of)g(a)h(memory-mapp)s(ed)f(hardw)m(are)199 + 2816 y(device,)36 b(to)f(a)f(p)s(oin)m(ter\),)h(whic)m(h)f(cannot)g(b)s + (e)g(con)m(v)m(erted)h(to)g(use)e(the)h Fr(getelementptr)c + Fw(instruction.)52 b(In)33 b(these)199 2999 y(cases,)48 + b(the)43 b Fr(cast)g Fw(instruction)g(in)g(LL)-10 b(VM)43 + b(giv)m(es)i(critical)g(information)f(ab)s(out)f Fs(when)h + Fw(the)f(t)m(yp)s(e)h(system)f(is)199 3181 y(b)s(eing)c(violated,)44 + b(impro)m(ving)39 b(analyses)h(and)f(allo)m(wing)i(for)e(straigh)m + (tforw)m(ard)h(determination)h(of)e(whether)g(a)199 3364 + y(transformation)31 b(is)f Fs(safe)p Fw(.)199 3743 y + Fm(3.4)136 b(Explicit)46 b(Memory)f(Allo)t(cation)g(and)g(Uni\014ed)g + (Memory)g(Mo)t(del)199 4016 y Fw(Some)d(of)g(the)g(hardest)f(programs)g + (to)i(adequately)f(optimize)h(are)g(memory)e(b)s(ound)f(programs)h + (that)h(mak)m(e)199 4198 y(extensiv)m(e)27 b(use)e(of)g(complex)g(data) + h(structures)f(on)f(the)i(heap.)38 b(T)-8 b(o)26 b(b)s(etter)f(exp)s + (ose)g(memory)g(allo)s(cation)i(patterns)199 4381 y(to)34 + b(the)g(compiler,)g(w)m(e)g(ha)m(v)m(e)g(added)f(t)m(yp)s(ed)g(memory)g + (allo)s(cation)i(instructions)e(to)h(the)g(instruction)f(set.)50 + b(The)199 4564 y Fr(malloc)26 b Fw(instruction)h(allo)s(cates)i(one)f + (or)f(more)g(elemen)m(ts)i(of)e(a)g(sp)s(eci\014c)g(t)m(yp)s(e)h(on)f + (the)g(heap,)h(returning)e(a)i(t)m(yp)s(ed)199 4746 y(p)s(oin)m(ter)43 + b(to)h(the)f(new)g(memory)-8 b(.)79 b(The)43 b Fr(free)f + Fw(instruction)h(releases)h(the)f(memory)g(allo)s(cated)j(through)c + (the)199 4929 y Fr(malloc)29 b Fw(instruction)946 4896 + y Fk(5)985 4929 y Fw(.)41 b(The)30 b Fr(alloca)f Fw(instruction)h(is)h + (similar)f(to)i Fr(malloc)c Fw(except)k(that)f(it)g(allo)s(cates)h + (memory)p 199 5008 1560 4 v 303 5062 a Fj(4)337 5094 + y Fi(This)27 b(example)f(also)h(sho)n(ws)f(an)g(instance)g(where)g(out) + g(of)g(range)g(arra)n(y)g(access)h(w)n(ould)f(not)g(and)f(could)h(not)f + (b)r(e)h(trapp)r(ed.)303 5153 y Fj(5)337 5185 y Fi(When)31 + b(nativ)n(e)g(co)r(de)h(is)f(generated)h(for)g(a)f(program,)j + Fg(malloc)f Fi(and)e Fg(free)h Fi(instructions)f(are)h(con)n(v)n(erted) + e(to)i(the)f(appropriate)199 5276 y(nativ)n(e)26 b(function)f(calls,)j + (allo)n(wing)g(custom)e(memory)f(allo)r(cators)k(to)c(b)r(e)h(used.) + 2104 5568 y Fw(22)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 35 41 bop 340 91 a Fw(Allo)s(cation)42 b(sites)f(create)h(a)e(new)g(no) + s(de)f(with)h(the)g(appropriate)g(memory)g(class)h(bit)f(set.)71 + b(Because)41 b(the)199 274 y(LL)-10 b(VM)28 b(virtual)g(instruction)f + (set)h(allo)s(cates)i(all)f(heap)e(and)g(stac)m(k)i(memory)e(through)g + (the)h Fr(malloc)e Fw(and)h Fr(alloca)199 457 y Fw(instructions,)49 + b(these)d(are)f(v)m(ery)g(easy)h(to)g(iden)m(tify)f(\(other)h(represen) + m(tations)g(do)f(not)g(distinguish)g(b)s(et)m(w)m(een)199 + 639 y(automatic)33 b(v)-5 b(ariables)31 b(that)g(ha)m(v)m(e)g(their)g + (address)e(tak)m(en)j(from)d(v)-5 b(ariables)31 b(that)g(do)g(not\).) + 340 822 y(Load)21 b(instructions)g(up)s(dates)f(mo)s(d/ref)g + (information)h(and)f(merge)i(the)f(load)g(source)g(and)f(destination)i + (p)s(oin)m(t-)199 1005 y(ers.)38 b(Return)20 b(instructions)h(are)h + (handled)f(b)m(y)g(up)s(dating)f(the)i(return)e(v)-5 + b(alue)22 b(for)f(the)g(curren)m(t)g(DS)g(Graph)g(\()p + Fv(x)p Fw(4.2.1\).)199 1187 y(Eac)m(h)i(call)h(instruction)e(is)g + (represen)m(ted)g(as)h(a)f(new)g(call)h(site)g(ob)5 b(ject)23 + b(in)f(the)h(graph,)g(whic)m(h)f(uniformly)f(represen)m(ts)199 + 1370 y(direct)31 b(and)f(indirect)g(calls)i(\(for)e(example,)i(see)f + (Figure)g(4.7\).)295 1572 y Fn(Pro)s(cessInstruction)p + Fw(\(Instruction)h Ff(I)7 b Fw(\))391 1684 y Ff(X)55 + b Fr(=)48 b(malloc)e(...)39 b Fw(or)31 b Ff(X)55 b Fr(=)47 + b(alloca)g(...)p Fw(:)487 1797 y(mergeEdges\(ScalarMap[)p + Ff(X)7 b Fw(],)34 b(new)c(No)s(de\))487 1910 y Fs(Set)j + Fn(H)f Fs(or)h Fn(S)g Fs(bit)f(in)h(no)-5 b(de)34 b(Sc)-5 + b(alarMap[X])391 2023 y Ff(X)55 b Fr(=)48 b(&)p Ff(Y)d + Fv(!)25 b Ff(Z)7 b Fw(:)1865 b Fs(\(addr)-5 b(ess)35 + b(of)e(struct)g(\014eld\))487 2136 y Fw(mergeEdges\(ScalarMap[)p + Ff(X)7 b Fw(],)34 b(addO\013set\(ScalarMap[)p Ff(Y)21 + b Fw(],)31 b Ff(Z)7 b Fw(\)\))391 2249 y Ff(X)55 b Fr(=)48 + b(&)p Ff(Y)20 b Fr([)p Ff(idx)p Fr(])p Fw(:)1849 b Fs(\(addr)-5 + b(ess)35 b(of)e(arr)-5 b(ay)35 b(element\))487 2362 y + Fw(mergeEdges\(ScalarMap[)p Ff(X)7 b Fw(],)34 b(ScalarMap[)p + Ff(Y)21 b Fw(]\))391 2475 y Ff(X)55 b Fr(=)48 b(load)e + Ff(Y)20 b Fw(:)1885 b Fs(\(in)33 b(C,)f Ff(X)40 b Fs(=)32 + b(*)p Ff(Y)21 b Fs(\))487 2588 y(Set)33 b Fn(R)g Fs(bit)f(in)h(no)-5 + b(de)33 b(Sc)-5 b(alarMap[Y])487 2701 y Fw(mergeEdges\(ScalarMap[)p + Ff(X)7 b Fw(],)34 b(getLinkA)m(t\(ScalarMap[)p Ff(Y)23 + b Fw(]\)\))391 2814 y Fr(store)47 b Ff(X)55 b Fr(into)46 + b Ff(Y)20 b Fw(:)1694 b Fs(\(in)33 b(C,)f Fv(\003)p Ff(Y)53 + b Fs(=)32 b Ff(X)7 b Fs(\))487 2926 y(Set)33 b Fn(M)g + Fs(bit)f(in)g(no)-5 b(de)34 b(Sc)-5 b(alarMap[Y])487 + 3039 y Fw(mergeEdges\(ScalarMap[)p Ff(X)7 b Fw(],)34 + b(getLinkA)m(t\(ScalarMap[)p Ff(Y)23 b Fw(]\)\))391 3152 + y Ff(X)55 b Fr(=)48 b(cast)e Ff(Y)68 b Fr(to)47 b Ff(\034)10 + b Fw(:)1644 b Fs(\(in)33 b(C,)f Ff(X)h Fw(=)25 b(\()p + Ff(\034)10 b Fw(\))p Ff(Y)21 b Fs(\))487 3265 y Fw + (mergeEdges\(ScalarMap[)p Ff(X)7 b Fw(],)34 b(ScalarMap[)p + Ff(Y)21 b Fw(]\))487 3378 y(if)30 b(\(not)h(t)m(yp)s(e-safe\))h + (collapseNo)s(de\(ScalarMap[)p Ff(Y)23 b Fw(]\))391 3491 + y Ff(X)55 b Fr(=)48 b Ff(\036)p Fw(\()p Ff(Y)759 3505 + y Fk(1)799 3491 y Ff(;)15 b(Y)892 3505 y Fk(2)931 3491 + y Ff(;)g(:::)p Fw(\):)487 3604 y Fv(8)p Ff(Y)591 3618 + y Fc(i)644 3604 y Fv(2)25 b Ff(Ar)s(g)s(s)p Fw(:)40 b + (mergeEdges\(ScalarMap[)p Ff(X)7 b Fw(],)34 b(ScalarMap[)p + Ff(Y)2613 3618 y Fc(i)2642 3604 y Fw(]\))391 3717 y Fr(return)46 + b Ff(X)7 b Fw(:)487 3830 y(mergeEdges\(ReturnEdge,)31 + b(ScalarMap[)p Ff(X)7 b Fw(]\))391 3943 y Ff(X)55 b Fr(=)48 + b(call)e Ff(Y)20 b Fr(\()p Ff(Z)1038 3957 y Fk(1)1078 + 3943 y Fr(,)47 b Ff(Z)1235 3957 y Fk(2)1275 3943 y Fr(,)g(...\))487 + 4056 y Fw(CallSite)32 b Ff(C)7 b(S)34 b Fw(=)c(new)g(CallSite)487 + 4168 y(mergeEdges\(ScalarMap[)p Ff(X)7 b Fw(],)34 b(retv)-5 + b(al\()p Ff(C)7 b(S)e Fw(\)\))487 4281 y(mergeEdges\(ScalarMap[)p + Ff(Y)22 b Fw(],)31 b(callee\()p Ff(C)7 b(S)e Fw(\)\))487 + 4394 y Fv(8)p Ff(Z)600 4408 y Fc(i)653 4394 y Fv(2)25 + b Ff(Ar)s(g)s(s)p Fw(:)41 b(mergeEdges\(ScalarMap[)p + Ff(Z)2020 4408 y Fc(i)2050 4394 y Fw(],)31 b Ff(C)7 b(S)e + Fw(.getArg\()p Ff(i)p Fw(\)\))391 4507 y(Otherwise:)487 + 4620 y(Collapse)31 b(no)s(des)f(and)g(set)h Fn(U)f Fw(bit)h(for)f(an)m + (y)h(p)s(oin)m(ter)f(args)904 4916 y(Figure)h(4.8:)41 + b Fq(Pro)r(cessInstruction)26 b(for)h(the)h(LL)-9 b(VM)27 + b(virtual)h(instruction)f(set)340 5193 y Fr(cast)g Fw(instructions)g + (are)h(used)f(to)h(comm)m(unicate)h(imp)s(ortan)m(t)f(information)g(ab) + s(out)f(when)g(the)g(t)m(yp)s(e)h(system)2104 5568 y(35)p + eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (28) 29 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 34 40 bop 199 91 a Fl(4.2.2)113 b(Construction)37 b(Algorithm)199 + 333 y Fw(Data)27 b(structure)d(graphs)h(are)g(created)h(in)f(a)g(three) + h(step)f(pro)s(cess.)38 b(First,)27 b(an)e(in)m(trapro)s(cedural)g + (phase)f(pro)s(cesses)199 515 y(eac)m(h)f(function)f(in)f(the)h + (program)g(and)f(abstracts)h(the)g(b)s(eha)m(vior)g(of)g(eac)m(h)h(in)m + (to)g(a)f(\\Lo)s(cal")i(data)e(structure)f(graph,)199 + 698 y(ignoring)35 b(the)g(e\013ect)h(of)f(callers)h(and)e(callees.)55 + b(Next,)37 b(a)e(\\Bottom-Up")i(analysis)f(clones)f(and)f(merges)h + (callee)199 881 y(graphs)29 b(in)m(to)h(their)f(callers.)41 + b(The)29 b(\014nal)f(\\T)-8 b(op-Do)m(wn")31 b(phase)e(merges)g(caller) + i(graphs)d(bac)m(k)i(in)m(to)g(their)f(callees.)340 1063 + y(W)-8 b(e)33 b(use)e(the)g(example)h(program)f(in)g(Figure)h(4.5)h(as) + e(a)h(motiv)-5 b(ating)33 b(example.)44 b(It)31 b(illustrates)i(some)f + (of)f(the)199 1246 y(high-lev)m(el)h(c)m(hallenges)h(that)e(Data)h + (Structure)d(Analysis)i(algorithm)g(can)g(handle.)199 + 1556 y Fn(Lo)s(cal)k(Analysis)h(Phase)199 1797 y Fw(The)42 + b(lo)s(cal)i(analysis)f(phase)f(captures)h(the)g(memory)f(usage)h(b)s + (eha)m(viors)g(of)f(individual)g(functions)g(without)199 + 1980 y(including)36 b(calling)i(or)f(caller)h(con)m(text.)61 + b(The)36 b(lo)s(cal)i(analysis)f(phase)f(is)h(the)f(only)h(phase)f(of)h + (Data)h(Structure)199 2163 y(Analysis)33 b(that)g(directly)g(uses)f + (the)h(LL)-10 b(VM)32 b(virtual)h(instruction)f(set,)i(so)f(w)m(e)g + (will)g(describ)s(e)e(it)i(in)f(more)h(detail)199 2346 + y(than)d(the)h(other)g(phases.)40 b(The)30 b(top)g(lev)m(el)i(approac)m + (h)f(of)g(the)f(algorithm)i(is)e(illustrated)h(in)f(Figure)h(4.6.)295 + 2542 y Fn(Lo)s(calAnalysis)p Fw(\(F)-8 b(unction)33 b + Ff(F)13 b Fw(\))391 2655 y Fs(Se)-5 b(e)g(d)34 b(sc)-5 + b(alar)34 b(map)391 2768 y Fv(8)c Fw(Instruction)g Ff(I)i + Fv(2)25 b Ff(F)487 2881 y Fw(Pro)s(cessInstruction\()p + Ff(I)7 b Fw(\))391 2994 y Fs(Mark)33 b(no)-5 b(des)34 + b(inc)-5 b(omplete)32 b Fw(Section)f(4.2.2)1450 3289 + y(Figure)g(4.6:)42 b Fq(Lo)r(cal)27 b(Analysis)g(Algorithm)340 + 3571 y Fw(The)38 b(analysis)h(starts)g(with)g(an)f(initial)i + (conditioning)f(step)g(to)g(seed)g(the)f(\\ScalarMap")j(to)e(include)f + (en-)199 3754 y(tries)33 b(for)f(an)m(y)h(non-instruction)g(v)-5 + b(alue)33 b(used)e(b)m(y)i(the)g(function)f(of)g(p)s(oin)m + (ter-compatible)j(t)m(yp)s(e.)47 b(F)-8 b(or)33 b(example,)199 + 3937 y(this)45 b(step)g(is)g(the)f(source)h(of)g(the)g(t)m(w)m(o)h + Fn(G)p Fw(lobal)g(no)s(des)e(in)h(Figure)g(4.7.)85 b(The)44 + b(next)h(phase)f(of)h(the)g(analy-)199 4119 y(sis)c(is)g(a)g(\015o)m + (w-insensitiv)m(e)i(linear)e(pass)g(o)m(v)m(er)h(the)f(program)g + (represen)m(tation.)73 b(The)41 b(LL)-10 b(VM)40 b(v)m(ersion)i(of)f + (the)199 4302 y Fr(ProcessInstruction)23 b Fw(function)k(is)g(sho)m(wn) + g(in)g(Figure)h(4.8.)41 b(W)-8 b(e)29 b(describ)s(e)d(a)i(few)f(cases)i + (in)e(more)g(detail)i(here.)p 1221 4423 1857 4 v 1221 + 5079 4 657 v 1249 5054 a @beginspecial 35 @llx 35 @lly + 421 @urx 165 @ury 2160 @rwi @setspecial + %%BeginDocument: figs/local.addGToList.ps + %!PS-Adobe-2.0 + %%Creator: dot version 1.8.9 (Sun Sep 22 16:57:48 CDT 2002) + %%For: (lattner) Chris Lattner + %%Title: DataStructures + %%Pages: (atend) + %%BoundingBox: 35 35 421 165 + %%EndComments + save + %%BeginProlog + /DotDict 200 dict def + DotDict begin + + /setupLatin1 { + mark + /EncodingVector 256 array def + EncodingVector 0 + + ISOLatin1Encoding 0 255 getinterval putinterval + + EncodingVector + dup 306 /AE + dup 301 /Aacute + dup 302 /Acircumflex + dup 304 /Adieresis + dup 300 /Agrave + dup 305 /Aring + dup 303 /Atilde + dup 307 /Ccedilla + dup 311 /Eacute + dup 312 /Ecircumflex + dup 313 /Edieresis + dup 310 /Egrave + dup 315 /Iacute + dup 316 /Icircumflex + dup 317 /Idieresis + dup 314 /Igrave + dup 334 /Udieresis + dup 335 /Yacute + dup 376 /thorn + dup 337 /germandbls + dup 341 /aacute + dup 342 /acircumflex + dup 344 /adieresis + dup 346 /ae + dup 340 /agrave + dup 345 /aring + dup 347 /ccedilla + dup 351 /eacute + dup 352 /ecircumflex + dup 353 /edieresis + dup 350 /egrave + dup 355 /iacute + dup 356 /icircumflex + dup 357 /idieresis + dup 354 /igrave + dup 360 /dcroat + dup 361 /ntilde + dup 363 /oacute + dup 364 /ocircumflex + dup 366 /odieresis + dup 362 /ograve + dup 365 /otilde + dup 370 /oslash + dup 372 /uacute + dup 373 /ucircumflex + dup 374 /udieresis + dup 371 /ugrave + dup 375 /yacute + dup 377 /ydieresis + + % Set up ISO Latin 1 character encoding + /starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont + } def + /Times-Roman starnetISO def + /Times-Italic starnetISO def + /Times-Bold starnetISO def + /Times-BoldItalic starnetISO def + /Helvetica starnetISO def + /Helvetica-Oblique starnetISO def + /Helvetica-Bold starnetISO def + /Helvetica-BoldOblique starnetISO def + /Courier starnetISO def + /Courier-Oblique starnetISO def + /Courier-Bold starnetISO def + /Courier-BoldOblique starnetISO def + cleartomark + } bind def + + %%BeginResource: procset + /coord-font-family /Times-Roman def + /default-font-family /Times-Roman def + /coordfont coord-font-family findfont 8 scalefont def + + /InvScaleFactor 1.0 def + /set_scale { + dup 1 exch div /InvScaleFactor exch def + dup scale + } bind def + + % styles + /solid { [] 0 setdash } bind def + /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def + /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def + /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def + /bold { 2 setlinewidth } bind def + /filled { } bind def + /unfilled { } bind def + /rounded { } bind def + /diagonals { } bind def + + % hooks for setting color + /nodecolor { sethsbcolor } bind def + /edgecolor { sethsbcolor } bind def + /graphcolor { sethsbcolor } bind def + /nopcolor {pop pop pop} bind def + + /beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if + } bind def + + /set_font { + findfont exch + scalefont setfont + } def + + % draw aligned label in bounding box aligned to current point + /alignedtext { % width adj text + /text exch def + /adj exch def + /width exch def + gsave + width 0 gt { + text stringwidth pop adj mul 0 rmoveto + } if + [] 0 setdash + text show + grestore + } def + + /boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath + } bind def + + /ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix + } bind def + + /endpage { showpage } bind def + + /layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] + def + + /setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def + } bind def + + /onlayer { curlayer ne {invis} if } def + + /onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if + } def + + /curlayer 0 def + + %%EndResource + %%EndProlog + %%BeginSetup + 14 default-font-family set_font + 1 setmiterlimit + % /arrowlength 10 def + % /arrowwidth 5 def + + % make sure pdfmark is harmless for PS-interpreters other than Distiller + /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse + % make '<<' and '>>' safe on PS Level 1 devices + /languagelevel where {pop languagelevel}{1} ifelse + 2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put + } if + + %%EndSetup + %%Page: 1 1 + %%PageBoundingBox: 36 36 421 165 + %%PageOrientation: Portrait + gsave + 35 35 386 130 boxprim clip newpath + 36 36 translate + 0 0 1 beginpage + 0 0 translate 0 rotate + 0.000 0.000 0.000 graphcolor + 14.00 /Times-Roman set_font + + % Node0x840b7b0 + gsave 10 dict begin + newpath 341 8 moveto + 373 8 lineto + stroke + newpath 373 8 moveto + 378 8 385 13 385 19 curveto + stroke + newpath 385 19 moveto + 385 32 lineto + stroke + newpath 385 32 moveto + 385 38 379 44 373 44 curveto + stroke + newpath 373 44 moveto + 341 44 lineto + stroke + newpath 341 44 moveto + 336 44 330 38 330 32 curveto + stroke + newpath 330 32 moveto + 330 19 lineto + stroke + newpath 330 19 moveto + 330 13 335 8 341 8 curveto + stroke + gsave 10 dict begin + 357 21 moveto 41 -0.5 (void: I) alignedtext + end grestore + end grestore + + % Node0x840a5f0 + gsave 10 dict begin + newpath 12 8 moveto + 174 8 lineto + stroke + newpath 174 8 moveto + 180 8 187 13 187 19 curveto + stroke + newpath 187 19 moveto + 187 32 lineto + stroke + newpath 187 32 moveto + 187 38 180 44 174 44 curveto + stroke + newpath 174 44 moveto + 12 44 lineto + stroke + newpath 12 44 moveto + 6 44 0 38 0 32 curveto + stroke + newpath 0 32 moveto + 0 19 lineto + stroke + newpath 0 19 moveto + 0 13 6 8 12 8 curveto + stroke + gsave 10 dict begin + 93 29 moveto 173 -0.5 (void \(list*, void \(int*\)*\): G) alignedtext + 93 13 moveto 43 -0.5 (do_all) alignedtext + end grestore + end grestore + + % Node0x840a628 + gsave 10 dict begin + newpath 215 8 moveto + 299 8 lineto + stroke + newpath 299 8 moveto + 305 8 312 13 312 19 curveto + stroke + newpath 312 19 moveto + 312 32 lineto + stroke + newpath 312 32 moveto + 312 38 306 44 300 44 curveto + stroke + newpath 300 44 moveto + 216 44 lineto + stroke + newpath 216 44 moveto + 210 44 204 38 204 32 curveto + stroke + newpath 204 32 moveto + 204 19 lineto + stroke + newpath 204 19 moveto + 204 13 209 8 215 8 curveto + stroke + gsave 10 dict begin + 258 29 moveto 94 -0.5 (void \(int*\): GI) alignedtext + 258 13 moveto 37 -0.5 (addG) alignedtext + end grestore + end grestore + + % Node0x840a778 + gsave 10 dict begin + 357 100 27 18 ellipse_path + stroke + gsave 10 dict begin + 357 95 moveto 10 -0.5 (L) alignedtext + end grestore + end grestore + + % Node0x840a778 -> Node0x840b7b0 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 357 77 moveto + 357 69 357 61 357 54 curveto + stroke + gsave 10 dict begin + solid + newpath 360 77 moveto + 355 77 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 360 54 moveto + 357 44 lineto + 355 54 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x8408280 + gsave 10 dict begin + newpath 195 80 moveto + 267 80 lineto + 267 120 lineto + 195 120 lineto + closepath + stroke + gsave 10 dict begin + 231 105 moveto 23 -0.5 (call) alignedtext + end grestore + newpath 195 100 moveto + 267 100 lineto + stroke + gsave 10 dict begin + 204 85 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 213 80 moveto + 213 100 lineto + stroke + gsave 10 dict begin + 222 85 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 231 80 moveto + 231 100 lineto + stroke + gsave 10 dict begin + 240 85 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 249 80 moveto + 249 100 lineto + stroke + gsave 10 dict begin + 258 85 moveto 4 -0.5 ( ) alignedtext + end grestore + end grestore + + % Node0x8408280 -> Node0x840b7b0 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 254 83 moveto + 270 75 297 61 322 48 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + 252 84 3 3 ellipse_path + fill + 0.000 0.000 0.631 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 322 51 moveto + 330 44 lineto + 320 46 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x8408280 -> Node0x840a5f0 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 207 82 moveto + 190 74 162 60 137 48 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + 210 84 3 3 ellipse_path + fill + 0.000 0.000 0.631 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 139 46 moveto + 129 44 lineto + 137 51 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x8408280 -> Node0x840a628 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 258 75 moveto + 258 68 258 61 258 54 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + 258 77 3 3 ellipse_path + fill + 0.000 0.000 0.631 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 261 54 moveto + 258 44 lineto + 256 54 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + endpage + grestore + %%PageTrailer + %%EndPage: 1 + %%Trailer + %%Pages: 1 + end + restore + %%EOF + + %%EndDocument + @endspecial 3074 5079 V 1221 5082 1857 4 v 1103 5250 + a(Figure)h(4.7:)42 b Fq(Lo)r(cal)27 b(DSGraph)h(for)f(the)h + Fp(addGToList)23 b Fq(function)2104 5568 y Fw(34)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 23 29 bop 199 91 a Fw(in)35 b(the)h(stac)m(k)h(frame)e(of)h(the)f + (curren)m(t)h(function)f(instead)g(of)h(the)f(heap,)i(and)e(the)h + (memory)f(is)g(automatically)199 274 y(deallo)s(cated)e(on)d(return)f + (from)h(the)h(function.)340 457 y(These)k(instructions)g(are)h(essen)m + (tial)h(for)e(preserving)g(the)g(t)m(yp)s(e-safet)m(y)i(of)e(our)g + (represen)m(tation)3689 424 y Fk(6)3730 457 y Fw(,)h(and)f(the)199 + 639 y(enable)41 b(new)f(transformations)h(suc)m(h)f(as)g(Data)j + (Structure)c(Analysis)i(\(Section)g(4.2\))h(and)e(Automatic)i(P)m(o)s + (ol)199 822 y(Allo)s(cation)h(\(Section)e(4.3\),)k(that)40 + b(w)m(ould)h(b)s(e)e(v)m(ery)i(di\016cult)f(without)g(them.)71 + b(An)40 b(imp)s(ortan)m(t)g(prop)s(ert)m(y)g(of)199 1005 + y(these)f(aggressiv)m(e)h(tec)m(hniques)f(is)f(that)h(they)g(are)f + (safe)h(ev)m(en)g(for)f(non-t)m(yp)s(e-safe)h(programming)f(languages,) + 199 1187 y(suc)m(h)30 b(as)h(C.)340 1370 y(The)24 b(LL)-10 + b(VM)25 b(virtual)g(instruction)f(set)h(is)g(also)g(unique)e(in)i(the)f + (manner)g(it)h(handles)f(memory)-8 b(.)39 b(In)24 b(LL)-10 + b(VM,)24 b(all)199 1553 y(addressable)34 b(ob)5 b(jects)35 + b(\(stac)m(k)h(allo)s(cated)h(lo)s(cals,)f(global)g(v)-5 + b(ariables,)36 b(functions,)f(and)f(dynamically)h(allo)s(cated)199 + 1736 y(memory\))e(are)h(all)f(explicitly)i(allo)s(cated,)g(giving)f(a)f + (uni\014ed)f(memory)g(mo)s(del.)48 b(Stac)m(k)34 b(allo)s(cated)h(lo)s + (cals)f(\(\\au-)199 1918 y(tomatic")41 b(v)-5 b(ariables)39 + b(and)e(source-lev)m(el)j Fr(alloca\(\))c Fw(calls\))k(are)e(all)h + (explicitly)h(allo)s(cated)g(using)e(the)g Fr(alloca)199 + 2101 y Fw(instruction.)h(Heap)26 b(allo)s(cated)i(memory)d(is)h(allo)s + (cated)h(with)e(the)h Fr(malloc)e Fw(instruction.)39 + b(F)-8 b(unctions)26 b(and)f(global)199 2284 y(v)-5 b(ariables)29 + b(\(collectiv)m(ely)k(referred)28 b(to)h(as)f(\\global)j(v)-5 + b(alues"\))29 b(declare)g(regions)g(of)g(statically)i(allo)s(cated)f + (memory)199 2466 y(that)42 b(are)g(accessed)h(though)e(the)g(address)g + (of)g(the)h(ob)5 b(ject)42 b(\(the)g(name)f(of)h(the)f(global)i(v)-5 + b(alue)42 b(refers)f(to)h(the)199 2649 y(address\).)340 + 2832 y(An)35 b(in)m(teresting)h(e\013ect)g(of)e(alw)m(a)m(ys)i + (accessing)h(memory)d(ob)5 b(jects)35 b(b)m(y)g(their)f(address)g(is)h + (that)g(LL)-10 b(VM)35 b(do)s(es)199 3014 y(not)25 b(need)f(an)g + (\\address-of)7 b(")25 b(op)s(erator)f(at)h(all.)39 b(This)24 + b(represen)m(tation)h(also)g(simpli\014es)f(memory)g(access)i(analysis) + 199 3197 y(since)h(there)f(cannot)g(b)s(e)g(implicit)g(accesses)i(to)f + (memory)-8 b(.)39 b(All)27 b(memory)f(tra\016c)g(o)s(ccurs)g(when)f + Fr(load)f Fw(and)i Fr(store)199 3380 y Fw(instructions)k(execute.)199 + 3758 y Fm(3.5)136 b(F)-11 b(unction)44 b(Calls)i(and)e(Exception)i + (Handling)199 4031 y Fw(LL)-10 b(VM)33 b(pro)m(vides)g(t)m(w)m(o)h + (function)f(call)h(instructions,)f(whic)m(h)g(abstract)h(a)m(w)m(a)m(y) + h(the)e(calling)h(con)m(v)m(en)m(tions)h(of)e(the)199 + 4214 y(underlying)g(mac)m(hine,)i(simplify)e(program)g(analysis,)j(and) + d(pro)m(vide)g(supp)s(ort)f(for)h(exception)i(handling.)50 + b(The)199 4397 y(simple)41 b Fr(call)f Fw(instruction)h(tak)m(es)h(a)f + (p)s(oin)m(ter)g(to)h(a)f(function)g(to)g(call,)k(as)d(w)m(ell)g(as)f + (the)g(argumen)m(ts)g(to)h(pass)199 4579 y(in)35 b(\(whic)m(h)g(are)g + (passed)g(b)m(y)f(v)-5 b(alue\).)56 b(Although)35 b(all)h + Fr(call)d Fw(instructions)i(tak)m(e)i(a)e(function)g(p)s(oin)m(ter)g + (to)g(in)m(v)m(ok)m(e)199 4762 y(\(and)40 b(are)h(th)m(us)f(seemingly)h + (indirect)f(calls\),)45 b(direct)c(calls)g(are)g(easily)g(iden)m + (ti\014able.)71 b(The)40 b(second)g(function)199 4945 + y(call)i(instruction)f(pro)m(vided)f(b)m(y)h(LL)-10 b(VM)41 + b(is)f(the)h Fr(invoke)e Fw(instruction,)44 b(whic)m(h)c(is)h(used)f + (for)g(languages)i(with)199 5127 y(destructors)30 b(to)i(implemen)m(t)f + (exception)g(handling.)p 199 5206 1560 4 v 303 5260 a + Fj(6)337 5292 y Fi(The)26 b(normal)h(C)f Fg(malloc\(\))h + Fi(function)f(returns)f(an)h(un)n(t)n(yp)r(ed)e(p)r(oin)n(ter)h(that)h + (m)n(ust)f(b)r(e)h(cast)g(to)g(the)f(appropriate)h(t)n(yp)r(e)2104 + 5568 y Fw(23)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (29) 30 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 24 30 bop 340 91 a Fw(LL)-10 b(VM)24 b(implemen)m(ts)g(a)g(stac)m(k)h + (un)m(winding)d(mec)m(hanism)h(for)h(\\zero)h(cost")f(exception)h + (handling)e([9)q(].)38 b(A)24 b(\\zero)199 274 y(cost")34 + b(exception-handling)g(mo)s(del)e(indicates)h(that)h(the)e(presence)h + (of)g(exception)g(handling)f(causes)h(no)f(extra)199 + 457 y(instructions)38 b(to)g(b)s(e)f(executed)h(b)m(y)g(the)f(program)h + (when)e(exceptions)j(are)f(not)f(thro)m(wn.)62 b(If)37 + b(an)g(exception)i(is)199 639 y(thro)m(wn,)28 b(the)f(stac)m(k)i(is)e + (un)m(w)m(ound,)f(stepping)h(through)g(the)g(return)f(addresses)h(of)g + (function)g(calls)h(on)f(the)g(stac)m(k.)199 822 y(The)h(LL)-10 + b(VM)28 b(run)m(time)g(k)m(eeps)g(a)h(static)g(map)f(of)g(return)f + (addresses)h(to)g(exception)i(handler)d(blo)s(c)m(ks)h(that)h(it)g + (uses)199 1005 y(to)i(in)m(v)m(ok)m(e)i(handlers)c(during)g(un)m + (winding.)340 1187 y(In)f(order)f(to)i(build)e(this)h(static)i(map)e + (of)g(handler)f(information,)j(LL)-10 b(VM)28 b(pro)m(vides)g(an)g + Fr(invoke)e Fw(instruction)199 1370 y(that)d(tak)m(es)h(an)e(exception) + h(handler)e(lab)s(el)h(in)g(addition)h(to)f(the)h(function)f(p)s(oin)m + (ter)g(and)f(argumen)m(t)i(op)s(erands)e(of)h(a)199 1553 + y(normal)k Fr(call)f Fw(instruction.)40 b(When)26 b(co)s(de)g + (generation)i(o)s(ccurs,)f(the)f(return)f(address)h(of)g(an)g(in)m(v)m + (ok)m(e)i(instruction)199 1736 y(is)36 b(asso)s(ciated)h(with)e(the)g + (exception)i(handler)e(lab)s(el)g(sp)s(eci\014ed,)i(allo)m(wing)g(the)e + (exception)i(handling/clean)m(up)199 1918 y(routine)31 + b(to)g(b)s(e)e(in)m(v)m(ok)m(ed)j(when)e(the)g(stac)m(k)i(frame)e(is)h + (un)m(w)m(ound.)340 2101 y(The)d Fr(invoke)f Fw(instruction)h(is)h + (capable)g(of)g(represen)m(ting)f(high-lev)m(el)j(exceptions)e + (directly)g(in)f(LL)-10 b(VM)29 b(using)199 2284 y(only)36 + b(lo)m(w-lev)m(el)i(concepts)e(\(return)e(address)h(to)g(handler)g + (map\).)55 b(This)35 b(also)h(mak)m(es)g(LL)-10 b(VM)35 + b(indep)s(enden)m(t)f(of)199 2466 y(the)40 b(source)f(language's)h + (exception)h(handling)d(seman)m(tics.)68 b(In)38 b(this)h(represen)m + (tation,)k(exception)d(edges)g(are)199 2649 y(directly)29 + b(sp)s(eci\014ed)e(and)g(visible)i(to)g(the)f(LL)-10 + b(VM)28 b(framew)m(ork,)g(ensuring)f(that)i(all)g(LL)-10 + b(VM)28 b(transformations)g(are)199 2832 y(correct)34 + b(in)f(the)g(face)h(of)f(exceptions.)49 b(The)33 b(example)h(in)e + (Figure)i(3.12)g(illustrates)g(a)f(case)h(where)f(the)g + Fr(invoke)199 3014 y Fw(instruction)e(w)m(ould)f(b)s(e)f(generated)j(b) + m(y)e(a)h(C++)e(fron)m(t-end.)438 3229 y Fr({)533 3342 + y(Class)47 b(Object;)236 b(//)48 b(Has)f(a)g(destructor)533 + 3455 y(func\(\);)523 b(//)48 b(Could)e(throw)533 3568 + y(...)438 3681 y(})1220 3977 y Fw(Figure)31 b(3.12:)43 + b(C++)29 b(exception)j(handling)d(example)340 4244 y(The)22 + b(k)m(ey)g(thing)g(to)g(note)g(with)g(this)f(v)m(ery)h(simple)g + (example)g(is)g(that)g(C++)f(guaran)m(tees)i(that)f(the)g(destructors) + 199 4427 y(of)32 b(stac)m(k)h(allo)s(cated)h(ob)5 b(jects)32 + b(will)g(b)s(e)f(in)m(v)m(ok)m(ed)i(when)e(the)h(blo)s(c)m(k)g(is)g + (exited.)45 b(If)32 b(an)f(exception)i(is)f(thro)m(wn)f(as)h(a)199 + 4609 y(result)h(of)f(the)h Fr(func\(\))d Fw(call,)35 + b(the)d(blo)s(c)m(k)h(will)g(b)s(e)e(exited,)j(so)f(a)g(handler)e(m)m + (ust)h(b)s(e)g(installed)h(to)g(call)h Fr(Object)p Fw('s)199 + 4792 y(destructor.)41 b(Figure)31 b(3.13)h(sho)m(ws)e(the)g(LL)-10 + b(VM)31 b(co)s(de)f(for)h(the)f(example.)340 4975 y(The)37 + b Fr(invoke)e Fw(instruction)i(asso)s(ciates)i(an)e(exception)h + (handler)e(to)h(call)i(if)e(an)f(exception)j(is)e(propagated)199 + 5157 y(through)24 b(the)g(in)m(v)m(ok)m(ed)i(function.)39 + b(In)23 b(the)i(example,)h(this)e(is)h(used)e(to)i(in)m(v)m(ok)m(e)h + (the)f(destructor)f(of)h(a)f(lo)s(cal)i(ob)5 b(ject.)199 + 5340 y(In)38 b(the)h(con)m(text)i(of)e(the)g(Ja)m(v)-5 + b(a)40 b(language)g(\(whic)m(h)f(do)s(es)f(not)h(need)g(to)g(call)i + (destructors)d(when)g(un)m(winding\),)2104 5568 y(24)p + eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 33 39 bop 199 91 a Fw(information,)41 b(the)e(DS)g(Graph)e(is)i(sound)e + (regardless)i(of)g(ho)m(w)g(m)m(uc)m(h)f(information)h(has)f(b)s(een)g + (incorp)s(orated)199 274 y(in)m(to)32 b(it.)41 b(This)29 + b(also)j(dramatically)g(simpli\014es)e(the)g(construction)h(algorithms) + h(presen)m(ted)e(in)g(Section)h(4.2.2.)340 457 y(The)25 + b(last)h(t)m(w)m(o)g(bits)f(trac)m(k)m(ed)i(b)m(y)e(a)g(DS)g(graph)g + (no)s(de,)g Fn(M)p Fw(o)s(d)g(and)g Fn(R)p Fw(ef,)h(indicate)h(whether) + d(or)h(not)g(an)m(y)h(of)f(the)199 639 y(ob)5 b(jects)22 + b(represen)m(ted)f(b)m(y)g(no)s(de)f(ha)m(v)m(e)i(b)s(een)e(mo)s + (di\014ed)g(or)h(read)f(in)h(the)g(con)m(text)i(of)e(the)g(graph.)37 + b(The)20 b(partitioning)199 822 y(of)43 b(memory)f(ob)5 + b(jects)44 b(in)e(the)h(DS)f(Graph)g(pro)m(vides)h(a)g(natural)f(w)m(a) + m(y)i(to)f(represen)m(t)g(this)f(information.)78 b(In)199 + 1005 y(Figure)31 b(4.4,)h(the)e(ref)g(bit)h(is)f(set)h(on)g(the)f(list) + h(no)s(de)f(b)s(ecause)g(the)h Fr(Next)e Fw(\014eld)h(is)g(read.)199 + 1315 y Fn(Data)35 b(Structure)f(Edges)199 1556 y Fw(In)d(a)h(DS)f + (Graph,)h(edges)g(represen)m(t)f(ma)m(y-p)s(oin)m(t-to)j(information.) + 44 b(Because)33 b(DS)e(Graphs)g(are)h(\014eld)f(sensitiv)m(e,)199 + 1739 y(edges)36 b(m)m(ust)e(con)m(tain)i(the)f(no)s(de)f(they)h(p)s + (oin)m(t)g(to)g(as)g(w)m(ell)h(as)f(an)f(o\013set)i(in)m(to)g(this)f + (no)s(de.)53 b(In)34 b(Figure)h(4.4,)i(the)199 1921 y(edges)c(from)e + Fr(FP)p Fw(,)h Fr(L1)p Fw(,)f Fr(L2)p Fw(,)h(and)g Fr(L3)f + Fw(all)i(ha)m(v)m(e)g(an)e(o\013set)i(of)f(zero,)i(but)d(the)h(edge)g + (from)g Fr(&L2->Data)d Fw(has)j(a)g(no)s(de)199 2104 + y(o\013set)g(of)e(8)h(b)m(ytes)g(\(whic)m(h)f(is)h(the)f(size)h(of)g(a) + g(p)s(oin)m(ter)f(in)g(our)g(system\).)199 2414 y Fn(Call)35 + b(Site)f(Information)h(and)g(Return)g(V)-9 b(alues)199 + 2655 y Fw(The)35 b(DS)h(graph)e(for)i(a)f(function)h(ma)m(y)g(con)m + (tain)g(\\call)i(no)s(des")d(in)g(addition)g(to)i(traditional)f(memory) + g(no)s(des.)199 2838 y(The)j(presence)g(of)g(a)h(call)g(no)s(de)f + (indicates)h(that)f(an)g(unresolv)m(ed)g(function)g(call)i(exists)e + (within)g(the)g(curren)m(t)199 3021 y(function,)31 b(whic)m(h)f(ma)m(y) + h(o)s(ccur)g(either)g(due)e(to)j(an)e(incomplete)i(program)e(or)h + (un\014nished)d(analysis.)42 b(These)30 b(call)199 3203 + y(no)s(des)g(directly)h(corresp)s(ond)e(to)i Fr(call)e + Fw(instructions)i(in)f(LL)-10 b(VM.)340 3386 y(The)41 + b(leftmost)h(\014eld)f(of)h(the)f(call)h(no)s(de)f(represen)m(ts)g(the) + g(return)g(v)-5 b(alue.)73 b(If)41 b(a)g(function)g(call)i(returns)d(a) + 199 3569 y(p)s(oin)m(ter)22 b(v)-5 b(alue,)25 b(this)d(\014eld)f(p)s + (oin)m(ts)h(to)h(the)g(returned)d(memory)i(ob)5 b(ject)23 + b(or)f(\(b)s(efore)g(in)m(terpro)s(cedural)g(analysis\))h(an)199 + 3752 y(Incomplete)28 b(no)s(de)d(that)j(can)e(later)i(b)s(e)e(merged)g + (with)h(that)g(ob)5 b(ject.)40 b(The)26 b(second)h(\014eld)f(p)s(oin)m + (ts)g(to)i(the)e(memory)199 3934 y(ob)5 b(ject)35 b(represen)m(ting)e + (the)h(callee)h(function)e(or)h(functions)f(\(an)g(indirect)h(function) + f(call)i(ma)m(y)f(p)s(oten)m(tially)h(call)199 4117 y(more)c(than)f + (one)h(function\).)42 b(Subsequen)m(t)29 b(\014elds)h(represen)m(t)h + (the)g(actual)h(argumen)m(ts)f(passed)f(at)h(the)g(call)h(site.)199 + 4300 y(Figure)41 b(4.4)h(includes)e(an)g(indirect)h(call)h(in)m(v)m + (oking)g(the)e(function)h(p)s(oin)m(ted)f(to)h(b)m(y)g(the)f(scalar)i + (FP)-8 b(,)41 b(with)f(no)199 4482 y(return)30 b(ob)5 + b(ject)31 b(\(since)g Fr(*FP)e Fw(returns)g Fr(void)p + Fw(\))h(and)g(one)g(actual)i(argumen)m(t.)340 4665 y(Finally)-8 + b(,)28 b(if)d(a)h(function)e(returns)g(a)h(p)s(oin)m(ter)h(t)m(yp)s(e,) + g(its)f(graph)g(represen)m(ts)g(the)g(returned)f(ob)5 + b(ject)26 b(as)f(a)h(sp)s(ecial)199 4848 y(scalar)32 + b(lab)s(eled)e(\\returning")h(with)f(an)g(edge)h(to)g(the)g(ob)5 + b(ject)31 b(b)s(eing)f(returned.)2104 5568 y(33)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (30) 31 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 32 38 bop 199 46 a Fd(typedef)38 b(struct)f(list)f({)g(struct)h(list)f + (*Next;)h(int)f(Data;)h(})e(list;)199 125 y(int)h(G)g(=)g(10;)199 + 204 y(void)h(do_all\(list)h(*L1,)f(void)f(\(*FP\)\(int*\)\))j({)270 + 283 y(do)d({)f(L2)h(=)g(phi\(L1,)h(L3\);)566 b(/*)36 + b(SSA)g(phi)g(node)g(*/)446 362 y(FP\(&L2->Data\);)446 + 440 y(L3)g(=)g(L2->Next;)270 519 y(})f(while\(L3\);)199 + 598 y(})199 677 y(void)i(addG\(int)g(*X\))f({)g(\(*X\))g(+=)g(G;)g(}) + 199 756 y(void)h(addGToList\(list)i(*L\))d({)g(do_all\(L,)i(addG\);)f + (})199 835 y(list)g(*makeList\(int)i(Num\))d({)270 914 + y(list)g(*New)h(=)e(malloc\(sizeof\(list\)\);)270 993 + y(New->Next)j(=)d(Num)h(?)g(makeList\(Num-1\))k(:)35 + b(0;)270 1071 y(New->Data)j(=)d(Num;)i(return)g(New;)199 + 1150 y(})199 1229 y(int)f(main\(\))h({)565 b(/*)36 b(X)g(&)f(Y)h(lists) + h(are)f(disjoint)h(*/)270 1308 y(list)f(*X)g(=)g(makeList\(10\);)270 + 1387 y(list)g(*Y)g(=)g(makeList\(100\);)270 1466 y(addGToList\(X\);)270 + 1545 y(addGToList\(Y\);)199 1624 y(})848 1919 y Fw(Figure)31 + b(4.5:)42 b Fq(C)27 b(co)r(de,)h(in)g(SSA)g(form,)f(for)g(Data)h + (Structure)f(Analysis)g(example)199 2194 y Fn(S)p Fw(tac)m(k-allo)s + (cated,)40 b Fn(G)p Fw(lobal)35 b(\(corresp)s(onding)f(to)h(the)f(3)h + (t)m(yp)s(es)f(of)g(LL)-10 b(VM)34 b(memory)h(ob)5 b(jects\),)36 + b(and)e Fn(U)p Fw(nkno)m(wn)199 2377 y(ob)5 b(jects.)71 + b(Unkno)m(wn)39 b(memory)i(ob)5 b(jects)40 b(o)s(ccur)g(when)g(a)g + (constan)m(t)i(v)-5 b(alue)40 b(is)h(cast)g(to)g(a)f(p)s(oin)m(ter)g(v) + -5 b(alue)41 b(\(for)199 2560 y(example,)32 b(to)f(access)h(a)f + (memory-mapp)s(ed)e(hardw)m(are)i(device\),)h(or)e(when)g(unanalyzable) + h(address)f(arithmetic)199 2742 y(o)s(ccurs.)41 b(These)30 + b(cases)h(o)s(ccur)f(infrequen)m(tly)h(in)f(p)s(ortable)g(programs.)340 + 2925 y(Data)44 b(Structure)d(Analysis)h(trac)m(ks)g(the)g(DS)g(No)s(de) + f(p)s(oin)m(ted)h(to)g(b)m(y)g(eac)m(h)h(scalar)f(in)g(the)g(program.) + 74 b(A)199 3108 y Fr(ScalarMap)23 b Fw(maps)i(eac)m(h)h(p)s(oin)m + (ter-compatible)h(register)f(to)h(the)e(\(single\))i(no)s(de)d(it)i(ma) + m(y)g(p)s(oin)m(t)f(to,)j(or)d(to)h(NULL.)199 3290 y(W)-8 + b(e)35 b(denote)g(scalars)f(b)m(y)g(ellipses)h(in)e(our)h(diagrams)g + (\(e.g.,)j Fr(FP,)46 b(L1,)h(L2,)g(L3,)g(&L2->Data)32 + b Fw(in)h(Figure)h(4.4\).)199 3473 y(Because)e(LL)-10 + b(VM)30 b(uses)g(SSA)g(form)g(as)g(its)h(represen)m(tation,)h(this)e + (mapping)g(is)g(v)m(ery)h(simple)f(to)h(main)m(tain.)340 + 3656 y(DS)c(Graphs)e(m)m(ust)i(correctly)g(represen)m(t)g(incomplete)g + (programs)f(where)g(some)h(functions)f(are)h(una)m(v)-5 + b(ailable)199 3838 y(for)24 b(analysis.)40 b(T)-8 b(o)24 + b(do)h(this)f(e\016cien)m(tly)-8 b(,)28 b(eac)m(h)d(no)s(de)f(in)g(the) + g(data)i(structure)d(graph)h(con)m(tains)i(a)e(bit)h(to)g(indicate)g + (if)199 4021 y(it)g(is)e(\\)p Fn(I)p Fw(ncomplete".)41 + b(If)23 b(this)h(bit)g(is)f(set)i(for)e(a)i(no)s(de,)f(there)g(ma)m(y)h + (b)s(e)e(outgoing)i(edges)g(that)f(are)g(not)g(represen)m(ted)199 + 4204 y(in)30 b(the)g(graph,)g(or)g(other)g(information)h(suc)m(h)e(as)i + (t)m(yp)s(e)f(or)g(mo)s(d/ref)f(information)i(ma)m(y)f(b)s(e)g + (missing.)40 b(If)30 b(the)g(bit)199 4386 y(is)h(clear,)g(the)g(no)s + (de)f(is)g(fully)g(represen)m(ted.)340 4569 y(F)-8 b(or)38 + b(example,)i(in)d(Figure)g(4.4)h(b)s(oth)f(memory)f(no)s(des)h(\(lab)s + (elled)h Fr(void)d Fw(and)i Fr(list)p Fw(\))f(ha)m(v)m(e)i(the)g + Fn(I)e Fw(\015ag)i(set)199 4752 y(b)s(ecause)24 b(the)f(p)s(oin)m(ters) + g(from)g(formal)h(argumen)m(ts)f Fr(L1)g Fw(and)g Fr(FP)g + Fw(imply)g(that)g(those)h(no)s(des)f(ma)m(y)h(b)s(e)e(mo)s(di\014ed)h + (out-)199 4934 y(side)j(the)g(con)m(text)h(of)f(the)g(curren)m(t)f + (function.)39 b(These)26 b Fn(I)f Fw(\015ags)h(will)g(b)s(e)f + (eliminated)i(later)f(using)f(in)m(terpro)s(cedural)199 + 5117 y(analysis.)340 5300 y(Because)46 b(Data)g(Structure)d(Analysis)h + (trac)m(ks)h(whic)m(h)f(no)s(des)f(in)h(the)g(graph)g(ma)m(y)h(con)m + (tain)g(incomplete)2104 5568 y(32)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 25 31 bop 533 11 a Fr(...)533 124 y(\045Object)46 b(=)i(alloca)e + (\045Class)284 b(;)48 b(Stack)e(allocate)g(object)533 + 237 y(;)i(...)f(call)f(constructor)f(on)i(\045Object)f(...)533 + 350 y(invoke)g(void)h(\045func\(\))f(to)h(label)f(\045OkLabel)g(except) + g(label)g(\045ExceptionLabel)342 463 y(OkLabel:)533 576 + y(;)i(...)f(execution)e(continues...)533 689 y(;)j(...)342 + 802 y(ExceptionLabel:)533 915 y(;)g(...)f(call)f(destructor)f(on)j + (\045Object)d(...)533 1028 y(call)i(void)g(\045rethrow\(\))713 + b(;)47 b(Rethrow)f(current)g(exception)1022 1436 y Fw(Figure)31 + b(3.13:)42 b(LL)-10 b(VM)31 b(co)s(de)f(for)g(exception)i(handling)e + (example)199 1711 y(the)46 b Fr(invoke)e Fw(instruction)h(is)g(used)g + (to)h(unlo)s(c)m(k)f(lo)s(c)m(ks)i(that)f(are)f(acquired)h(through)f + (sync)m(hronized)g(blo)s(c)m(ks)199 1894 y(or)d(metho)s(ds.)73 + b(In)41 b(an)m(y)h(language,)k(a)c Fr(catch)e Fw(clause)i(w)m(ould)f(b) + s(e)g(implemen)m(ted)h(in)f(terms)h(of)g(an)f(exception)199 + 2076 y(destination.)340 2259 y(Although)32 b(w)m(e)g(curren)m(tly)g(do) + f(not)h(ha)m(v)m(e)h(a)f(fron)m(t-end)f(that)h(uses)f(the)h(exception)h + (handling)e(supp)s(ort)e(built)199 2442 y(in)m(to)j(LL)-10 + b(VM,)31 b(all)g(of)g(our)f(optimizations)i(and)e(transformations)h + (are)g(a)m(w)m(are)h(of)f(the)g(exceptional)h(con)m(trol)g(\015o)m(w) + 199 2625 y(edges)f(and)e(our)h(unit)g(tests)h(w)m(ork)f(as)g(designed.) + 41 b(W)-8 b(e)31 b(also)g(plan)f(to)h(implemen)m(t)f(the)h(C)e + Fr(setjmp)g Fw(and)g Fr(longjmp)199 2807 y Fw(calls)j(using)e(this)g + (facilit)m(y)-8 b(.)199 3186 y Fm(3.6)136 b(Plain-text,)46 + b(Byteco)t(de,)g(and)e(In-memory)h(Represen)l(tations)199 + 3459 y Fw(The)26 b(LL)-10 b(VM)27 b(virtual)g(instruction)g(set)g(is)g + (the)f(glue)i(that)f(uni\014es)e(the)i(system)g(design)g(describ)s(ed)e + (in)h(Chapter)h(2.)199 3641 y(As)g(suc)m(h,)h(the)f(e\013ectiv)m(eness) + i(and)d(ease)i(of)f(use)g(of)g(the)g(system)g(dep)s(ends)e(on)i(man)m + (y)g(asp)s(ects)g(of)g(the)g(instruction)199 3824 y(set)42 + b(design.)72 b(An)40 b(imp)s(ortan)m(t)h(feature)h(of)f(the)g(LL)-10 + b(VM)41 b(virtual)g(instruction)g(set)g(is)g(that)h(it)f(is)g(a)g + (\014rst)f(class)199 4007 y(language,)27 b(complete)f(with)d(a)i + (textual)g(format)f(\(examples)h(of)f(whic)m(h)g(ha)m(v)m(e)h(b)s(een)e + (included)g(in)h(this)g(do)s(cumen)m(t\),)199 4189 y(a)31 + b(compressed)f(binary)g(format,)h(and)e(an)i(in-memory)f(format)h + (suitable)g(for)f(transformation.)340 4372 y(Being)25 + b(able)g(to)f(con)m(v)m(ert)i(LL)-10 b(VM)24 b(co)s(de)g(b)s(et)m(w)m + (een)h(these)f(represen)m(tations)h(without)f(information)g(loss)g(mak) + m(es)199 4555 y(debugging)33 b(transformations)g(m)m(uc)m(h)f(simpler,) + h(allo)m(ws)h(test-cases)h(to)e(b)s(e)f(written)h(easily)-8 + b(,)35 b(and)d(decreases)h(the)199 4738 y(amoun)m(t)e(of)g(time)g + (required)e(to)i(understand)e(the)h(in-memory)h(represen)m(tation.)2104 + 5568 y(25)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (31) 32 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 26 32 bop 484 346 a Fo(4)940 244 y Ft(Optimizations)77 + b(with)g(LL)-26 b(VM)199 842 y Fw(Lo)m(w-lev)m(el)38 + b(represen)m(tations)f(are)f(notorious)f(for)h(b)s(eing)f(p)s(o)s(or)f + (hosts)i(for)f(high-lev)m(el)i(analyses)f(and)f(transfor-)199 + 1024 y(mations.)41 b(F)-8 b(or)31 b(example,)f(the)g(SGI)f(Pro64)h + (compiler[37)r(])g(in)m(termediate)h(represen)m(tation)g(\(WHIRL\))f + (con)m(tains)199 1207 y(no)c(less)h(than)e(5)i(di\013eren)m(t)f(lev)m + (els)i(of)e(the)g(represen)m(tation)h(in)f(order)g(to)g(p)s(erform)f + (optimizations)j(on)e(the)g(highest)199 1390 y(lev)m(el)42 + b(p)s(ossible.)70 b(In)39 b(this)h(high-qualit)m(y)i(compiler,)h(all)e + (in)m(terpro)s(cedural)f(optimization)i(is)e(done)g(on)g(a)h(v)m(ery) + 199 1572 y(high-lev)m(el)32 b(represen)m(tation,)g(whic)m(h)e(is)h + (e\013ectiv)m(ely)i(a)e(language)g(neutral)g(Abstract)g(Syn)m(tax)f(T) + -8 b(ree.)340 1755 y(LL)e(VM)32 b(aims)f(to)h(enable)g(high-lev)m(el)h + (transformations)e(at)h(link)g(and)e(p)s(ost-link)i(time.)44 + b(F)-8 b(or)32 b(man)m(y)f(reasons)199 1938 y(ho)m(w)m(ev)m(er,)38 + b(it)e(is)f(adv)-5 b(an)m(tageous)37 b(to)f(represen)m(t)f(co)s(de)g + (in)g(a)g(lo)m(w-lev)m(el)j(form.)54 b(This)35 b(c)m(hapter)g(describ)s + (es)g(sev)m(eral)199 2120 y(aggressiv)m(e)e(transformations)d(and)f + (analyses)i(that)g(are)f(p)s(erformed)f(on)h(the)g(LL)-10 + b(VM)31 b(represen)m(tation,)g(sho)m(wing)199 2303 y(that)22 + b(an)g(e\016cien)m(t)h(lo)m(w-lev)m(el)h(represen)m(tation,)h(enric)m + (hed)c(with)h(t)m(yp)s(e)f(information,)j(can)e(supp)s(ort)e(this)h(w)m + (ork.)38 b(W)-8 b(e)199 2486 y(main)m(tain)32 b(that)f(a)g + Fs(low-level)i(r)-5 b(epr)g(esentation)p Fw(,)34 b(with)c + Fs(high-level)j(typ)-5 b(e)34 b(information)p Fw(,)f + Fn(can)e Fw(supp)s(ort)e(in)m(teresting)199 2668 y(high-lev)m(el)j + (transformations.)340 2851 y(Note)k(that)f(all)g(of)f(these)h(analyses) + g(and)f(optimizations)i(are)e(actually)i(implemen)m(ted)f(in)f(LL)-10 + b(VM)34 b(and)g(are)199 3034 y(robust)c(enough)g(for)g(daily)h(use.)199 + 3413 y Fm(4.1)136 b(Simple)45 b(Analyses)g(and)g(T)-11 + b(ransformations)199 3685 y Fw(Because)33 b(LL)-10 b(VM)31 + b(is)h(a)f(lo)m(w-lev)m(el)j(represen)m(tation,)f(it)f(is)f(w)m(ell)i + (suited)e(for)g(man)m(y)g(traditional)i(transformations)199 + 3868 y(and)i(analyses)g(that)h(w)m(ork)f(on)g(three-address)g(co)s(de.) + 55 b(Indeed)34 b(man)m(y)h(traditional)i(optimizations)g(ha)m(v)m(e)f + (b)s(een)199 4051 y(implemen)m(ted)e(for)e(this)h(thesis)g(and)f(are)i + (in)e(use)h(b)m(y)f(the)h(LL)-10 b(VM)33 b(compilers.)49 + b(Some)33 b(of)g(the)g(more)g(in)m(teresting)199 4233 + y(ones)e(include)f(the)g(follo)m(wing:)310 4516 y(1.)47 + b Fn(T)-9 b(raditional)34 b(SSA)h(based)g(optimizations:)427 + 4698 y Fw(Simple)28 b(Dead)i(Co)s(de)e(Elimination,)j(Aggressiv)m(e)f + (Dead)g(Co)s(de)f(Elimination,)h(Global)g(Common)f(Sub)s(ex-)427 + 4881 y(pression)21 b(Elimination,)k(Induction)d(V)-8 + b(ariable)23 b(Simpli\014cation,)i(Lo)s(op)d(In)m(v)-5 + b(arian)m(t)23 b(Co)s(de)e(Motion,)26 b(Expres-)427 5064 + y(sion)g(Reasso)s(ciation,)k(Simple)c(Constan)m(t)h(Propagation,)i + (Sparse)c(Conditional)j(Constan)m(t)f(Propagation,)427 + 5247 y(V)-8 b(alue)31 b(Num)m(b)s(ering,)f(etc...)2104 + 5568 y(26)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 31 37 bop 199 91 a Fn(Data)35 b(Structure)f(No)s(des)199 + 333 y Fw(The)27 b(DS)h(Graph)e(is)i(a)g(partitioning)g(of)g(the)f(\(p)s + (oten)m(tially)j(un)m(b)s(ounded\))25 b(memory)i(ob)5 + b(jects)28 b(created)h(during)d(the)199 515 y(dynamic)36 + b(execution)h(of)f(the)g(program.)58 b(Eac)m(h)36 b(no)s(de)f(in)h(the) + g(graph)g(represen)m(ts)f(a)i(set)f(of)g(memory)g(ob)5 + b(jects,)199 698 y(and)34 b(edges)h(represen)m(t)g Fs(may-p)-5 + b(oint-to)37 b Fw(relationships.)53 b(Data)36 b(Structure)e(Analysis)h + (uses)f(a)h(uni\014cation-based)199 881 y(approac)m(h)27 + b(to)h(heap)e(mo)s(deling)h(\(also)h(used)e(b)m(y)h(Steensgaard's)g(p)s + (oin)m(ts-to)h(analysis)f(algorithm)h([42)q(],)g(for)e(exam-)199 + 1063 y(ple\).)40 b(F)-8 b(or)28 b(this)f(reason,)h(eac)m(h)g(\014eld)e + (in)h(eac)m(h)h(no)s(de)e(of)h(a)g(graph)g(can)g(only)g(p)s(oin)m(t)g + (to)g(a)g(single)h(destination)g(no)s(de.)199 1246 y(If)35 + b(the)h(analysis)g(disco)m(v)m(ers)h(t)m(w)m(o)f(di\013eren)m(t)g(no)s + (des)f(that)h(ma)m(y)g(b)s(e)f(p)s(oin)m(ted)g(to)h(b)m(y)g(the)f(same) + h(\014eld,)h(it)f(merges)199 1429 y(the)31 b(t)m(w)m(o)h(no)s(des)d + (together.)340 1612 y(Eac)m(h)41 b(no)s(de)f(is)g(capable)h(of)g + (represen)m(ting)f(ob)5 b(jects)41 b(with)f(m)m(ultiple)h(distinct)g + (outgoing)g(edges,)j(i.e.,)g(the)199 1794 y(p)s(oin)m(ts-to)36 + b(information)e(is)h Fs(\014eld-sensitive)p Fw(.)52 b(F)-8 + b(or)35 b(example,)i(in)d(Figure)h(4.4,)h(the)f(no)s(de)e + Fr(list)h Fw(has)g(t)m(w)m(o)h(\014elds,)199 1977 y(with)h(outgoing)i + (edges)f(from)f(the)g(\014rst)g(\014eld)g(and)g(incoming)h(edges)g(b)s + (oth)e(to)i(the)g(no)s(de)f(and)f(to)j(the)e(second)199 + 2160 y(\014eld.)p 1221 2263 1857 4 v 1221 2893 4 631 + v 1249 2868 a @beginspecial 35 @llx 35 @lly 497 @urx + 184 @ury 2160 @rwi @setspecial + %%BeginDocument: figs/local.do_all.ps + %!PS-Adobe-2.0 + %%Creator: dot version 1.8.9 (Sun Sep 22 16:57:48 CDT 2002) + %%For: (lattner) Chris Lattner + %%Title: DataStructures + %%Pages: (atend) + %%BoundingBox: 35 35 497 184 + %%EndComments + save + %%BeginProlog + /DotDict 200 dict def + DotDict begin + + /setupLatin1 { + mark + /EncodingVector 256 array def + EncodingVector 0 + + ISOLatin1Encoding 0 255 getinterval putinterval + + EncodingVector + dup 306 /AE + dup 301 /Aacute + dup 302 /Acircumflex + dup 304 /Adieresis + dup 300 /Agrave + dup 305 /Aring + dup 303 /Atilde + dup 307 /Ccedilla + dup 311 /Eacute + dup 312 /Ecircumflex + dup 313 /Edieresis + dup 310 /Egrave + dup 315 /Iacute + dup 316 /Icircumflex + dup 317 /Idieresis + dup 314 /Igrave + dup 334 /Udieresis + dup 335 /Yacute + dup 376 /thorn + dup 337 /germandbls + dup 341 /aacute + dup 342 /acircumflex + dup 344 /adieresis + dup 346 /ae + dup 340 /agrave + dup 345 /aring + dup 347 /ccedilla + dup 351 /eacute + dup 352 /ecircumflex + dup 353 /edieresis + dup 350 /egrave + dup 355 /iacute + dup 356 /icircumflex + dup 357 /idieresis + dup 354 /igrave + dup 360 /dcroat + dup 361 /ntilde + dup 363 /oacute + dup 364 /ocircumflex + dup 366 /odieresis + dup 362 /ograve + dup 365 /otilde + dup 370 /oslash + dup 372 /uacute + dup 373 /ucircumflex + dup 374 /udieresis + dup 371 /ugrave + dup 375 /yacute + dup 377 /ydieresis + + % Set up ISO Latin 1 character encoding + /starnetISO { + dup dup findfont dup length dict begin + { 1 index /FID ne { def }{ pop pop } ifelse + } forall + /Encoding EncodingVector def + currentdict end definefont + } def + /Times-Roman starnetISO def + /Times-Italic starnetISO def + /Times-Bold starnetISO def + /Times-BoldItalic starnetISO def + /Helvetica starnetISO def + /Helvetica-Oblique starnetISO def + /Helvetica-Bold starnetISO def + /Helvetica-BoldOblique starnetISO def + /Courier starnetISO def + /Courier-Oblique starnetISO def + /Courier-Bold starnetISO def + /Courier-BoldOblique starnetISO def + cleartomark + } bind def + + %%BeginResource: procset + /coord-font-family /Times-Roman def + /default-font-family /Times-Roman def + /coordfont coord-font-family findfont 8 scalefont def + + /InvScaleFactor 1.0 def + /set_scale { + dup 1 exch div /InvScaleFactor exch def + dup scale + } bind def + + % styles + /solid { [] 0 setdash } bind def + /dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def + /dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def + /invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def + /bold { 2 setlinewidth } bind def + /filled { } bind def + /unfilled { } bind def + /rounded { } bind def + /diagonals { } bind def + + % hooks for setting color + /nodecolor { sethsbcolor } bind def + /edgecolor { sethsbcolor } bind def + /graphcolor { sethsbcolor } bind def + /nopcolor {pop pop pop} bind def + + /beginpage { % i j npages + /npages exch def + /j exch def + /i exch def + /str 10 string def + npages 1 gt { + gsave + coordfont setfont + 0 0 moveto + (\() show i str cvs show (,) show j str cvs show (\)) show + grestore + } if + } bind def + + /set_font { + findfont exch + scalefont setfont + } def + + % draw aligned label in bounding box aligned to current point + /alignedtext { % width adj text + /text exch def + /adj exch def + /width exch def + gsave + width 0 gt { + text stringwidth pop adj mul 0 rmoveto + } if + [] 0 setdash + text show + grestore + } def + + /boxprim { % xcorner ycorner xsize ysize + 4 2 roll + moveto + 2 copy + exch 0 rlineto + 0 exch rlineto + pop neg 0 rlineto + closepath + } bind def + + /ellipse_path { + /ry exch def + /rx exch def + /y exch def + /x exch def + matrix currentmatrix + newpath + x y translate + rx ry scale + 0 0 1 0 360 arc + setmatrix + } bind def + + /endpage { showpage } bind def + + /layercolorseq + [ % layer color sequence - darkest to lightest + [0 0 0] + [.2 .8 .8] + [.4 .8 .8] + [.6 .8 .8] + [.8 .8 .8] + ] + def + + /setlayer {/maxlayer exch def /curlayer exch def + layercolorseq curlayer get + aload pop sethsbcolor + /nodecolor {nopcolor} def + /edgecolor {nopcolor} def + /graphcolor {nopcolor} def + } bind def + + /onlayer { curlayer ne {invis} if } def + + /onlayers { + /myupper exch def + /mylower exch def + curlayer mylower lt + curlayer myupper gt + or + {invis} if + } def + + /curlayer 0 def + + %%EndResource + %%EndProlog + %%BeginSetup + 14 default-font-family set_font + 1 setmiterlimit + % /arrowlength 10 def + % /arrowwidth 5 def + + % make sure pdfmark is harmless for PS-interpreters other than Distiller + /pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse + % make '<<' and '>>' safe on PS Level 1 devices + /languagelevel where {pop languagelevel}{1} ifelse + 2 lt { + userdict (<<) cvn ([) cvn load put + userdict (>>) cvn ([) cvn load put + } if + + %%EndSetup + %%Page: 1 1 + %%PageBoundingBox: 36 36 497 184 + %%PageOrientation: Portrait + gsave + 35 35 462 149 boxprim clip newpath + 36 36 translate + 0 0 1 beginpage + 0 0 translate 0 rotate + 0.000 0.000 0.000 graphcolor + 14.00 /Times-Roman set_font + + % Node0x840b6d0 + gsave 10 dict begin + newpath 79 25 moveto + 111 25 lineto + stroke + newpath 111 25 moveto + 116 25 123 30 123 36 curveto + stroke + newpath 123 36 moveto + 123 49 lineto + stroke + newpath 123 49 moveto + 123 55 117 61 111 61 curveto + stroke + newpath 111 61 moveto + 79 61 lineto + stroke + newpath 79 61 moveto + 74 61 68 55 68 49 curveto + stroke + newpath 68 49 moveto + 68 36 lineto + stroke + newpath 68 36 moveto + 68 30 73 25 79 25 curveto + stroke + gsave 10 dict begin + 95 38 moveto 41 -0.5 (void: I) alignedtext + end grestore + end grestore + + % Node0x840b708 + gsave 10 dict begin + newpath 219 23 moveto + 267 23 lineto + stroke + newpath 267 23 moveto + 273 23 279 28 279 34 curveto + stroke + newpath 279 34 moveto + 279 50 lineto + stroke + newpath 279 50 moveto + 279 56 273 63 267 63 curveto + stroke + newpath 267 63 moveto + 219 63 lineto + stroke + newpath 219 63 moveto + 213 63 208 57 208 51 curveto + stroke + newpath 208 51 moveto + 208 35 lineto + stroke + newpath 208 35 moveto + 208 29 213 23 219 23 curveto + stroke + gsave 10 dict begin + 243 48 moveto 43 -0.5 (list: IR) alignedtext + end grestore + newpath 208 43 moveto + 279 43 lineto + stroke + gsave 10 dict begin + 227 28 moveto 25 -0.5 (list*) alignedtext + end grestore + newpath 247 23 moveto + 247 43 lineto + stroke + gsave 10 dict begin + 263 28 moveto 18 -0.5 (int) alignedtext + end grestore + end grestore + + % Node0x840b708 -> Node0x840b708 + newpath 246 20 moveto + 261 10 283 0 296 14 curveto + 314 32 314 53 296 72 curveto + 288 79 278 76 269 69 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + 244 21 3 3 ellipse_path + fill + 0.000 0.000 0.000 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.000 edgecolor + newpath 270 67 moveto + 261 63 lineto + 268 71 lineto + closepath + fill + 0.000 0.000 0.000 edgecolor + end grestore + + % Node0x840a4f0 + gsave 10 dict begin + 99 119 27 18 ellipse_path + stroke + gsave 10 dict begin + 99 114 moveto 15 -0.5 (L1) alignedtext + end grestore + end grestore + + % Node0x840a4f0 -> Node0x840b708 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 124 105 moveto + 128 103 131 101 135 99 curveto + 164 84 174 80 199 67 curveto + stroke + gsave 10 dict begin + solid + newpath 126 107 moveto + 123 103 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 200 69 moveto + 208 63 lineto + 198 65 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x840aea8 + gsave 10 dict begin + 27 119 27 18 ellipse_path + stroke + gsave 10 dict begin + 27 114 moveto 18 -0.5 (FP) alignedtext + end grestore + end grestore + + % Node0x840aea8 -> Node0x840b6d0 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 44 100 moveto + 52 90 63 79 72 68 curveto + stroke + gsave 10 dict begin + solid + newpath 46 101 moveto + 43 98 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 74 70 moveto + 79 61 lineto + 70 66 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x840b600 + gsave 10 dict begin + 171 119 27 18 ellipse_path + stroke + gsave 10 dict begin + 171 114 moveto 18 -0.5 (L2) alignedtext + end grestore + end grestore + + % Node0x840b600 -> Node0x840b708 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 189 100 moveto + 198 91 208 80 217 70 curveto + stroke + gsave 10 dict begin + solid + newpath 191 102 moveto + 187 99 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 219 72 moveto + 224 63 lineto + 215 68 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x840b7f0 + gsave 10 dict begin + 410 119 50 18 ellipse_path + stroke + gsave 10 dict begin + 410 114 moveto 79 -0.5 (&L2->Data) alignedtext + end grestore + end grestore + + % Node0x840b7f0 -> Node0x840b708 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 370 105 moveto + 337 93 293 76 279 63 curveto + 275 59 273 55 270 51 curveto + stroke + gsave 10 dict begin + solid + newpath 370 102 moveto + 369 107 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 273 51 moveto + 266 43 lineto + 268 53 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x840b8c8 + gsave 10 dict begin + 243 119 27 18 ellipse_path + stroke + gsave 10 dict begin + 243 114 moveto 17 -0.5 (L3) alignedtext + end grestore + end grestore + + % Node0x840b8c8 -> Node0x840b708 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 243 96 moveto + 243 89 243 81 243 73 curveto + stroke + gsave 10 dict begin + solid + newpath 246 96 moveto + 241 96 lineto + stroke + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 246 73 moveto + 243 63 lineto + 241 73 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x8408258 + gsave 10 dict begin + newpath 288 99 moveto + 342 99 lineto + 342 139 lineto + 288 139 lineto + closepath + stroke + gsave 10 dict begin + 315 124 moveto 23 -0.5 (call) alignedtext + end grestore + newpath 288 119 moveto + 342 119 lineto + stroke + gsave 10 dict begin + 297 104 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 306 99 moveto + 306 119 lineto + stroke + gsave 10 dict begin + 315 104 moveto 4 -0.5 ( ) alignedtext + end grestore + newpath 324 99 moveto + 324 119 lineto + stroke + gsave 10 dict begin + 333 104 moveto 4 -0.5 ( ) alignedtext + end grestore + end grestore + + % Node0x8408258 -> Node0x840b6d0 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 301 103 moveto + 297 101 292 100 288 99 curveto + 217 78 192 92 129 65 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + 303 104 3 3 ellipse_path + fill + 0.000 0.000 0.631 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 130 63 moveto + 120 61 lineto + 128 67 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + + % Node0x8408258 -> Node0x840b708 + gsave 10 dict begin + 0.000 0.000 0.631 edgecolor + newpath 320 100 moveto + 308 92 291 77 279 63 curveto + 276 60 274 55 271 51 curveto + stroke + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + 322 101 3 3 ellipse_path + fill + 0.000 0.000 0.631 edgecolor + end grestore + gsave 10 dict begin + solid + 0.000 0.000 0.631 edgecolor + newpath 274 51 moveto + 267 43 lineto + 269 53 lineto + closepath + fill + 0.000 0.000 0.631 edgecolor + end grestore + end grestore + endpage + grestore + %%PageTrailer + %%EndPage: 1 + %%Trailer + %%Pages: 1 + end + restore + %%EOF + + %%EndDocument + @endspecial 3074 2893 V 1221 2896 1857 4 v 1196 3064 + a(Figure)31 b(4.4:)42 b Fq(Lo)r(cal)26 b(DSGraph)i(for)f(the)h + Fp(do)p 2621 3064 27 4 v 31 w(all)e Fq(function)340 3364 + y Fw(Field)44 b(sensitivit)m(y)g(is)f(an)f(example)h(of)g(a)g(prop)s + (ert)m(y)f(that)h(is)g(greatly)h(enhanced)f(b)m(y)f(the)h(t)m(yp)s(ed)f + (LL)-10 b(VM)199 3547 y(represen)m(tation.)46 b(Data)33 + b(Structure)e(Analysis)h(is)f(able)h(to)h(optimistically)g(assume)f + (that)g(memory)f(ob)5 b(jects)33 b(are)199 3729 y(strongly)23 + b(t)m(yp)s(ed,)g(un)m(til)f(a)g(violation)i(is)e(noticed.)39 + b(This)21 b(assumption)g(signi\014can)m(tly)i(sp)s(eeds)e(up)g + (analysis)h(b)s(ecause)199 3912 y(the)29 b(v)-5 b(ast)29 + b(ma)5 b(jorit)m(y)29 b(of)g(data)g(structures)f(are)h(t)m(yp)s(e)f + (safe)h(in)f(practice,)i(ev)m(en)g(in)e(non-t)m(yp)s(e-safe)h + (languages)h(suc)m(h)199 4095 y(as)25 b(C.)f(If)f(a)i(non-t)m(yp)s + (e-safe)g(construct)f(is)g(found,)h(the)f(no)s(de)f(is)i(\\collapsed")h + (do)m(wn)d(to)i(a)g(single)f(\014eld,)i(th)m(us)d(losing)199 + 4277 y(\014eld)31 b(sensitivit)m(y)h(for)e(the)h(no)s(de)f(but)h + (retaining)g(conserv)-5 b(ativ)m(e)33 b(correctness.)42 + b(In)31 b(practice,)h(no)s(de)e(collapsing)i(is)199 4460 + y(infrequen)m(t,)f(ev)m(en)g(for)f(C)g(programs.)340 + 4643 y(Eac)m(h)36 b(no)s(de)e(also)i(has)f(a)h(small)f(set)h(of)f + (\015ags)g(that)h(trac)m(k)g(information)f(ab)s(out)g(the)g(no)s(de.)54 + b(F)-8 b(our)36 b(of)f(these)199 4825 y(bits)30 b(trac)m(k)i(the)e + (classes)i(of)e(memory)g(represen)m(ted)h(b)m(y)f(the)g(no)s(de.)40 + b(One)30 b(bit)h(trac)m(ks)g(whether)f(or)g(not)g(the)h(no)s(de)199 + 5008 y(is)g(\\complete",)i(and)c(t)m(w)m(o)j(bits)e(trac)m(k)i(mo)s + (d/ref)e(information)g(for)h(the)f(no)s(de.)340 5191 + y(Data)22 b(Structure)e(Analysis)h(partitions)g(memory)f(in)m(to)h + (four)f(di\013eren)m(t)h(classes)g(of)g(ob)5 b(jects:)36 + b Fn(H)p Fw(eap-allo)s(cated,)2104 5568 y(31)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (32) 33 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 0.000000 0.000000 translate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 30 36 bop 340 91 a Fw(Data)37 b(Structure)e(Analysis)g(is)h(a)f(con)m + (text-sensitiv)m(e,)41 b(\015o)m(w-insensitiv)m(e)36 + b(heap)f(analysis)h(algorithm)g(whic)m(h)199 274 y(is)d(sp)s + (eci\014cally)h(designed)e(to)i(supp)s(ort)d Fs(macr)-5 + b(osc)g(opic)38 b(data-structur)-5 b(e)37 b(analyses)f(and)g(tr)-5 + b(ansformations)p Fw(.)52 b(This)199 457 y(is)30 b(a)g(new)f(class)h + (of)g(algorithms)g(b)s(eing)f(dev)m(elop)s(ed,)i(whic)m(h)e(use)g + Fs(instanc)-5 b(es)31 b Fw(of)e(abstract)i(data)f(structure)f(as)h(the) + 199 639 y(scop)s(e)h(of)f(the)h(analysis)g(or)f(transformation.)340 + 822 y(A)40 b(k)m(ey)f(strength)g(of)g(Data)i(Structure)d(Analysis)i(is) + f(its)g(abilit)m(y)i(to)e(b)s(e)g(used)f(for)h(a)g(v)-5 + b(ariet)m(y)41 b(of)e(di\013eren)m(t)199 1005 y(analysis)34 + b(problems.)47 b(In)32 b(addition)h(to)h(macroscopic)g(data-structure)f + (transformations)g(\(suc)m(h)g(as)g(P)m(o)s(ol)h(Allo-)199 + 1187 y(cation,)e(describ)s(ed)c(in)h(Section)h(4.3\),)i(Data)f + (Structure)e(Analysis)g(ma)m(y)h(b)s(e)f(used)g(as)h(the)f(base)h(for)f + (a)h(v)-5 b(ariet)m(y)31 b(of)199 1370 y(traditional)e(analyses)f(as)f + (w)m(ell)h(\(suc)m(h)g(as)f(alias)i(analysis,)f(in)m(terpro)s(cedural)f + (Mo)s(d/Ref,)i(\\de-virtualization")h(of)199 1553 y(function)g(p)s(oin) + m(ters,)h(etc.\).)340 1736 y(Data)g(Structure)e(Analysis)g(has)g(sev)m + (eral)i(k)m(ey)f(prop)s(erties)e(that)i(are)g(required)e(to)i(enable)g + (transformations)199 1918 y(suc)m(h)39 b(as)h(those)g(men)m(tioned)g + (ab)s(o)m(v)m(e:)60 b Fs(c)-5 b(ontext-sensitivity)42 + b(with)g(cloning)p Fw(,)g Fs(\014eld-sensitivity)p Fw(,)g(and)d(the)h + (use)f(of)199 2101 y(an)c Fs(explicit)h(he)-5 b(ap)38 + b(mo)-5 b(del)p Fw(.)55 b(All)35 b(these)g(prop)s(erties,)h(esp)s + (ecially)f(the)g(\014rst,)g(are)g(widely)f(considered)h(to)g(incur)f(a) + 199 2284 y(high)39 b(analysis)h(cost)g([25)q(].)68 b(In)38 + b(order)h(to)h(o)m(v)m(ercome)h(this)e(cost,)k(Data)e(Structure)d + (Analysis)h(in)m(tro)s(duces)g(k)m(ey)199 2466 y(simpli\014cations)31 + b(whic)m(h)f(mak)m(e)i(it)f(b)s(oth)e(scalable)j(and)e(extremely)h + (fast)g(in)f(practice.)340 2649 y(This)42 b(section)h(describ)s(es)f + (the)g(Data)i(Structure)d(Analysis)i(algorithm)g(at)g(a)g(v)m(ery)f + (high)g(lev)m(el,)47 b(sho)m(wing)199 2832 y(ho)m(w)32 + b(the)g(design)f(of)h(LL)-10 b(VM)32 b(allo)m(ws)h(for)e(aggressiv)m(e) + j(in)m(terpro)s(cedural)e(analyses)g(at)g(link-time.)46 + b(Section)32 b(4.2.1)199 3014 y(describ)s(es)42 b(the)g(graph)g + (represen)m(tation)h(built)f(b)m(y)h(the)f(analysis)h(and)f(pro)m + (vided)f(to)i(clien)m(ts.)78 b(Section)43 b(4.2.2)199 + 3197 y(describ)s(es)37 b(the)h(algorithm)g(used)f(to)h(construct)g(the) + g(data)g(structure)f(graphs.)61 b(More)38 b(detailed)h(information)199 + 3380 y(can)31 b(b)s(e)f(found)f(in)h(the)g(original)i(pap)s(er)d + (describing)h(this)g(algorithm)i([28)q(].)199 3695 y + Fl(4.2.1)113 b(The)37 b(Data)h(Structure)f(Graph)199 + 3936 y Fw(Data)27 b(Structure)d(Analysis)h(concisely)h(summarizes)f(a)g + (program's)g(memory)f(connectivit)m(y)j(patterns)e(and)f(com-)199 + 4119 y(p)s(osition)34 b(b)m(y)g(building)f(a)i(Data)g(Structure)e + (Graph)g(\(DS)i(Graph\))e(for)h(eac)m(h)h(function)f(in)f(the)h + (program.)52 b(The)199 4302 y(graph)26 b(for)h(a)f(function)h(is)f + (comp)s(osed)g(of)h(three)g(pieces)g(of)g(information:)39 + b(a)27 b(set)g(of)g(no)s(des)e(with)h(outgoing)i(edges,)199 + 4484 y(a)i(mapping)f(of)h(scalars)h(in)e(the)h(function)f(to)h(no)s + (des)f(in)h(the)f(graph,)h(and)f(a)h(list)g(of)g(call)h(sites)f(in)g + (the)g(con)m(text)h(of)199 4667 y(the)g(graph.)40 b(These)30 + b(are)h(describ)s(ed)e(b)s(elo)m(w,)i(in)f(turn.)340 + 4850 y(Figure)j(4.4)h(sho)m(ws)e(a)h(DS)g(graph)f(for)g(the)h + Fr(do)p 1934 4850 29 4 v 34 w(all)f Fw(function)g(of)h(Figure)g(4.5)g + (\(computed)g(only)g(from)f(lo)s(cal)199 5033 y(information\).)42 + b(W)-8 b(e)31 b(use)f(this)h(as)f(a)h(running)e(example)i(b)s(elo)m(w.) + 2104 5568 y(30)p eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 27 33 bop 310 91 a Fw(2.)47 b Fn(Con)m(trol)34 b(Flo)m(w)h(Graph)g + (based)g(optimizations)h(and)e(analyses:)427 274 y Fw(Critical)k(Edge)g + (Elimination,)i(v)-5 b(arious)37 b(forms)g(of)h(Dominator)h + (Information,)g(In)m(terv)-5 b(al)38 b(Construction,)427 + 457 y(Natural)31 b(Lo)s(op)f(Construction,)g(Lo)s(op)g(Pre-header)h + (Insertion,)f(CF)m(G)h(Simpli\014cation,)g(etc)h(...)310 + 702 y(3.)47 b Fn(In)m(terpro)s(cedural)35 b(analyses)g(and)g + (transformations:)427 885 y Fw(Call)43 b(Graph)f(Construction,)k(v)-5 + b(arious)42 b(Alias)i(Analyses,)i(Global)e(Constan)m(t)f(Merging,)k(T)m + (yp)s(e)42 b(Safet)m(y)427 1068 y(Analysis,)30 b(Dead)i(Global)f + (Elimination)g(\(b)s(oth)f(global)i(v)-5 b(ariables)31 + b(and)f(functions\),)g(Inlining,)g(etc)i(...)340 1315 + y(In)h(addition)h(to)h(these)f(transformations,)h(LL)-10 + b(VM)34 b(con)m(tains)h(t)m(w)m(o)g(in)m(trapro)s(cedural)f(passes,)g + (descriptions)199 1497 y(of)26 b(whic)m(h)f(will)h(help)g(illustrate)h + (ho)m(w)e(the)h(LL)-10 b(VM)26 b(system)g(w)m(orks)f(together.)41 + b(These)25 b(relativ)m(ely)j(uncon)m(v)m(en)m(tional)199 + 1680 y(passes)i(are)h(the)g(Instruction)f(Com)m(bining)g(and)g(Lev)m + (el)h(Raising)g(passes.)199 1990 y Fl(4.1.1)113 b(The)37 + b(Instruction)g(Com)m(bining)i(P)m(ass)199 2231 y Fw(The)31 + b(Instruction)f(Com)m(bining)g(P)m(ass)i(is)f(a)g(simple)g(w)m + (ork-list)g(driv)m(en)g(pass)f(that)i(op)s(erates)f(on)g(the)g(SSA)f + (graph)199 2414 y(of)37 b(a)g(function,)i(p)s(erforming)c(p)s(eephole)i + (optimizations.)61 b(Because)38 b(the)f(pass)g(op)s(erates)g(on)g(the)g + (SSA)e(graph,)199 2597 y(this)30 b(simple)f(p)s(eephole)h(optimizer)g + (is)g(able)g(to)g(p)s(erform)e(p)s(o)m(w)m(erful)i Fs(glob)-5 + b(al)30 b Fw(optimizations.)43 b(The)29 b(pass)g(con)m(tains)199 + 2779 y(man)m(y)k(iden)m(tities)i(suc)m(h)d(as)i(\\)p + Fr(add)47 b(X,0)g(=)g(X)p Fw(",)34 b(\\)p Fr(sub)47 b(X,X)g(=)g(0)p + Fw(",)34 b(\\)p Fr(and)48 b(X,-1)e(=)i(X)p Fw(",)33 b(\\)p + Fr(mod)47 b(X,1)g(=)h(0)p Fw(",)34 b(\\)p Fr(xor)199 + 2962 y(X,X)47 b(=)h(0)p Fw(",)30 b(\\)p Fr(add)48 b(\(add)e(X,1\),1)g + (=)i(add)f(X,2)p Fw(",)30 b(\\)p Fr(shl)47 b(X,)h(64)f(=)g(0)p + Fw(",)31 b(\\)p Fr(phi)47 b(X,)g(X)h(=)f(X)p Fw(",)31 + b(etc...)340 3145 y(The)c(instruction)g(com)m(bining)h(pass)f(also)h + (ensures)f(that)h(instructions)f(are)g(in)g(their)h(canonical)h(form,)e + (when)199 3327 y(appropriate.)50 b(F)-8 b(or)34 b(example,)h(if)e(an)g + Fr(add)f Fw(instruction)i(has)f(a)g(constan)m(t)i(argumen)m(t,)f(the)g + (canonical)h(form)d(has)199 3510 y(the)h(constan)m(t)h(as)f(the)f + (second)h(argumen)m(t.)48 b(Because)34 b(the)e(instruction)h(com)m + (bination)h(is)e(extremely)i(fast,)g(and)199 3693 y(b)s(ecause)28 + b(is)f(can)h(dramatically)h(simplify)d(the)i(co)s(de,)g(man)m(y)g + (passes)f(can)h(safely)g(assume)f(that)h(their)f(input)g(do)s(es)199 + 3875 y(not)33 b(ha)m(v)m(e)g(trivial)g(cases)g(lik)m(e)h(these)f(to)f + (handle,)h(whic)m(h)f(simpli\014es)g(their)g(implemen)m(tation.)48 + b(The)31 b(instruction)199 4058 y(com)m(bining)41 b(pass)f(also)h(tak)m + (es)h(the)e(place)h(of)g(a)f(simple)h(v)-5 b(alue)40 + b(n)m(um)m(b)s(ering)g(pass)f(whic)m(h)h(is)h(able)g(to)f(directly)199 + 4241 y(eliminate)32 b(man)m(y)f(of)f(the)h(equiv)-5 b(alen)m(t)32 + b(expressions)e(that)h(the)f(v)-5 b(alue)31 b(n)m(um)m(b)s(ering)e + (pass)h(w)m(ould)g(iden)m(tify)-8 b(.)199 4551 y Fl(4.1.2)113 + b(The)37 b(Lev)m(el)i(Raise)f(P)m(ass)199 4792 y Fw(Most)25 + b(existing)f(compilers)g(retain)h(v)m(ery)f(little)h(t)m(yp)s(e)f + (information)g(for)f(the)h(program)f(once)i(they)e(con)m(v)m(ert)j + (from)d(a)199 4975 y(high-lev)m(el)28 b(co)s(de)e(represen)m(tation)i + (\(e.g.,)g(an)e(AST\))g(to)h(a)f(lo)m(w)m(er-lev)m(el)k(represen)m + (tation)d(used)e(for)h(optimizations.)199 5157 y(Because)44 + b(re-targeting)h(existing)f(compilers)f(is)f(an)h(imp)s(ortan)m(t)f + (part)h(of)g(the)g(o)m(v)m(erall)h(LL)-10 b(VM)43 b(strategy)-8 + b(,)48 b(w)m(e)199 5340 y(dev)m(elop)s(ed)31 b(the)g(\\lev)m(el)h + (raising")f(pass)f(to)h(cen)m(tralize)i(t)m(yp)s(e)e(information)f + (reconstruction.)2104 5568 y(27)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Page: (33) 34 + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 595.275591 788.031496 translate + 180 rotate + 1.000000 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 -0.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + /showpage{}def/copypage{}def/erasepage{}def + PStoPSxform concat + 28 34 bop 340 91 a Fw(With)28 b(the)g(lev)m(el)h(raising)f(pass,)g + (compiler)g(fron)m(t-ends)f(can)h(b)s(e)e(mo)s(di\014ed)h(to)h(simply)f + (generate)i Fs(le)-5 b(gal)28 b Fw(LL)-10 b(VM)199 274 + y(co)s(de)29 b(that)g(is)f(simple)g(but)g(lo)m(w-lev)m(el)j(and)d(\\p)s + (o)s(orly-t)m(yp)s(ed")g(\(e.g.,)j(using)d(explicit)i(b)m(yte)e + (addressing)g(for)g(struc-)199 457 y(ture)k(\014eld)f(accesses\).)46 + b(The)31 b(fron)m(t-end)g(can)h(use)f(the)g(lev)m(el)j(raising)d(pass)g + (to)i(reco)m(v)m(er)g(t)m(yp)s(e)f(information)f(\(e.g.,)199 + 639 y(direct)21 b(references)g(to)h(structure)e(\014elds,)i(using)f + (the)g Fr(getelementptr)c Fw(instruction)j(describ)s(ed)g(in)g(Section) + i(3.3.1\).)199 822 y(In)27 b(this)h(w)m(a)m(y)-8 b(,)30 + b(the)e(program)f(analysis)i(required)e(to)h(reco)m(v)m(er)i(t)m(yp)s + (e)e(information)g(can)g(b)s(e)f(shared)g(b)m(y)h(man)m(y)f(pre-)199 + 1005 y(existing)d(compiler)g(fron)m(t-ends)f(without)g(an)m(y)g(in)m + (tegration)i(problems:)37 b(it)23 b(is)g(simply)g(another)g(LL)-10 + b(VM)23 b(to)h(LL)-10 b(VM)199 1187 y(transformation.)340 + 1370 y(The)35 b(\\lev)m(el)j(raising")e(pass)f(eliminates)i + Fr(cast)d Fw(instructions)h(from)g(LL)-10 b(VM)35 b(co)s(de)h(using)f + (sev)m(eral)i(di\013eren)m(t)199 1553 y(strategies.)59 + b(It)36 b(assumes)g(that)g(the)g(t)m(yp)s(e)g(information)h(for)e + (function)h(in)m(terfaces)h(is)f(correct,)j(eliminating)e(as)199 + 1736 y(man)m(y)29 b Fr(cast)f Fw(instructions)h(p)s(ossible.)39 + b(W)-8 b(e)30 b(b)s(eliev)m(e)g(that)g(the)f(protot)m(yp)s(es)g(for)g + (functions)f(are)h(easily)h(accessible)199 1918 y(from)22 + b(the)h(debug)f(information)h(main)m(tained)h(b)m(y)e(the)h(compiler)g + (and)f(lik)m(ely)j(to)e(b)s(e)f(correct,)k(ev)m(en)d(if)g(the)g + (compiler)199 2101 y(is)31 b(p)s(erforming)e(aggressiv)m(e)k + (optimizations.)43 b(Because)32 b(optimizations)g(ma)m(y)g(arbitrarily) + e(mo)s(dify)g(the)h(b)s(o)s(dy)e(of)199 2284 y(the)h(functions,)g(ho)m + (w)m(ev)m(er,)h(debug)e(information)i(is)e(more)h(di\016cult)g(to)h + (use)e(within)g(the)h(b)s(o)s(dy)e(of)i(the)g(function.)340 + 2466 y(Figure)f(4.1)g(con)m(tains)g(C)e(co)s(de)h(whic)m(h)f(will)i(b)s + (e)e(used)g(to)h(demonstrate)h(the)f(transformations)f(made)h(b)m(y)g + (the)199 2649 y(lev)m(el)k(raising)f(pass:)438 2879 y + Fr(struct)46 b(S1)h({)1623 b(/*)47 b(pair)f(of)i(integers)d(*/)533 + 2992 y(int)i(i,)g(j;)438 3105 y(};)438 3331 y(unsigned)e(foo\(struct)g + (S1)j(*s\))f({)533 3444 y(return)f(s->i*4)h(+)g(s->j;)1049 + b(/*)47 b(access)f(the)h(two)g(fields)f(*/)438 3557 y(})1358 + 3852 y Fw(Figure)31 b(4.1:)42 b(Lev)m(el-Raise)32 b(example)f(C)f(co)s + (de)340 4134 y(F)-8 b(rom)37 b(this)f(C)g(snipp)s(et,)h(the)f(LL)-10 + b(VM)37 b(C)e(fron)m(t-end)i(outputs)e(the)i(LL)-10 b(VM)36 + b(co)s(de)g(in)g(Figure)h(4.2,)i(whic)m(h)d(is)199 4317 + y(correct,)30 b(but)e(p)s(o)s(orly-t)m(yp)s(ed.)39 b(In)27 + b(this)h(example,)i(the)e(strength)g(reduction)g(of)g(the)g(m)m + (ultiply)h(w)m(as)f(done)g(b)m(y)g(the)199 4500 y(C)i(fron)m(t-end,)h + (not)f(b)m(y)h(LL)-10 b(VM.)340 4683 y(In)24 b(this)h(case,)i(the)e + (lev)m(el)h(raise)f(pass)f(\014rst)g(notices)i(that)f + Fr(\045cast215)e Fw(casts)i(a)g(structure)f(p)s(oin)m(ter)h(to)g(a)g(p) + s(oin)m(ter)199 4865 y(to)k(the)g(t)m(yp)s(e)f(of)h(the)f(\014rst)g + (elemen)m(t)i(of)e(the)h(structure.)39 b(This)28 b Fr(cast)f + Fw(can)h(b)s(e)g(eliminated)h(b)m(y)g(simply)e(con)m(v)m(erting)199 + 5048 y(the)35 b Fr(cast)f Fw(instruction)g(in)m(to)i(a)f + Fr(getelementptr)c Fw(instruction)j(of)h(the)g(\014rst)f(\014eld.)53 + b(Similarly)-8 b(,)36 b Fr(\045s+4)e Fw(is)h(found)199 + 5231 y(equal)40 b(to)g Fr(&s->j)p Fw(,)g(so)f Fr(cast217)f + Fw(can)h(b)s(e)g(raised)g(to)h(use)f(a)g(safe)h Fr(getelementptr)35 + b Fw(instruction.)67 b(Figure)40 b(4.3)2104 5568 y(28)p + eop + PStoPSsaved restore + userdict/PStoPSsaved save put + PStoPSmatrix setmatrix + 562.235294 396.000000 translate + 90 rotate + 0.647059 dup scale + userdict/PStoPSmatrix matrix currentmatrix put + userdict/PStoPSclip{0 0 moveto + 612.000000 0 rlineto 0 792.000000 rlineto -612.000000 0 rlineto + closepath}put initclip + PStoPSxform concat + 29 35 bop 438 113 a Fr(\045S1)47 b(=)g(type)g({)g(int,)g(int)g(})1431 + b(;)48 b(typedef)e(information)438 339 y(;)h(Function)f(prototype)f + (information)g(preserved)g(from)i("debug")f(information)438 + 452 y(uint)h("foo"\(\045S1*)e(\045s\))h({)533 565 y(\045cast215)g(=)h + (cast)g(\045S1*)g(\045s)g(to)g(int*)953 b(;)48 b(cast215)e(=)h(&s->i) + 533 677 y(\045reg109)f(=)i(load)e(int*)h(\045cast215)1095 + b(;)48 b(Load)e(the)h(s->i)g(field)533 790 y(\045reg111)f(=)i(shl)f + (int)f(\045reg109,)g(ubyte)g(2)811 b(;)48 b(Multiply)d(by)j(4)533 + 903 y(\045cast214)e(=)h(cast)g(\045S1*)g(\045s)g(to)g(ulong)905 + b(;)48 b(Low-level)d(structure)533 1016 y(\045reg213)h(=)i(add)f(ulong) + f(4,)h(\045cast216)952 b(;)143 b(address)46 b(arithmetic)533 + 1129 y(\045cast217)g(=)h(cast)g(ulong)f(\045reg213)g(to)h(int*)667 + b(;)48 b(cast217)e(=)h(&s->j)533 1242 y(\045reg112)f(=)i(load)e(int*)h + (\045cast217)1095 b(;)48 b(Load)e(the)h(s->j)g(field)533 + 1355 y(\045reg108)f(=)i(add)f(int)f(\045reg111,)g(\045reg112)809 + b(;)48 b(Add)f(the)g(fields)533 1468 y(ret)g(int)g(\045reg108)1716 + b(;)48 b(Return)e(result)438 1581 y(})1176 1876 y Fw(Figure)31 + b(4.2:)42 b(Lev)m(el-Raise)32 b(example)f(ra)m(w)g(LL)-10 + b(VM)30 b(co)s(de)199 2151 y(con)m(tains)i(the)e(co)s(de)h(after)g(the) + f(lev)m(el)j(raising)d(pass)g(has)g(impro)m(v)m(ed)h(it.)438 + 2382 y Fr(\045S1)47 b(=)g(type)g({)g(int,)g(int)g(})1431 + b(;)48 b(typedef)e(information)438 2607 y(int)h("foo"\(\045S1*)e + (\045s\))i({)533 2720 y(\045cast215)f(=)h(getelementptr)e(\045S1*)h + (\045s,)h(uint)g(0,)g(ubyte)f(0)95 b(;)48 b(cast215)e(=)h(&s->i)533 + 2833 y(\045reg109)f(=)i(load)e(int*)h(\045cast215)1095 + b(;)48 b(Load)e(the)h(s->i)g(field)533 2946 y(\045reg111)f(=)i(shl)f + (int)f(\045reg109,)g(ubyte)g(2)811 b(;)48 b(Multiply)d(by)j(4)533 + 3059 y(\045cast217)e(=)h(getelementptr)e(\045S1*)h(\045s,)h(uint)g(0,)g + (ubyte)f(1)95 b(;)48 b(cast217)e(=)h(&s->j)533 3172 y(\045reg1121)f(=)h + (load)g(int*)g(\045cast217)1047 b(;)48 b(Load)e(the)h(s->j)g(field)533 + 3285 y(\045reg108)f(=)i(add)f(int)f(\045reg111,)g(\045reg1121)761 + b(;)48 b(Add)f(the)g(fields)533 3398 y(ret)g(int)g(\045reg108)1716 + b(;)48 b(Return)e(result)438 3511 y(})905 3806 y Fw(Figure)31 + b(4.3:)42 b(Lev)m(el-Raise)33 b(example)e(LL)-10 b(VM)30 + b(co)s(de)h(after)g(lev)m(el)h(raising)340 4089 y(This)k(example)h(has) + g(b)s(een)f(pro)m(v)m(en)g(to)i(b)s(e)e(t)m(yp)s(e-safe,)j(despite)e + (the)g(fact)g(that)g(the)g(input)f(program)g(ha)m(v)m(e)199 + 4271 y(v)m(ery)31 b(little)h(in)e(the)h(w)m(a)m(y)g(of)g(t)m(yp)s(e)f + (information.)199 4650 y Fm(4.2)136 b(Data)46 b(Structure)e(Analysis) + 199 4923 y Fw(Data)27 b(Structure)c(Analysis)i(w)m(as)g(the)g(\014rst)f + (completely)i(no)m(v)m(el)h(in)m(terpro)s(cedural)d(link-time)i + (analysis)f(dev)m(elop)s(ed)199 5105 y(in)h(the)h(LL)-10 + b(VM)26 b(compiler)h(infrastructure)e([28)q(].)40 b(It)26 + b(mak)m(es)h(extensiv)m(e)h(use)e(of)h(the)f(link-time)h(analysis)g + (and)f(t)m(yp)s(e)199 5288 y(information,)31 b(and)f(is)g(made)h(more)f + (precise)h(through)f(the)g(use)g(of)h(SSA)e(represen)m(tation.)2104 + 5568 y(29)p eop + PStoPSsaved restore + PStoPSsaved restore + %%Trailer + end + userdict /end-hook known{end-hook}if + %%EOF Index: llvm-www/pubs/2002-12-LattnerMSThesis.html diff -u llvm-www/pubs/2002-12-LattnerMSThesis.html:1.4 llvm-www/pubs/2002-12-LattnerMSThesis.html:1.5 --- llvm-www/pubs/2002-12-LattnerMSThesis.html:1.4 Tue Oct 21 19:26:00 2003 +++ llvm-www/pubs/2002-12-LattnerMSThesis.html Sun Nov 16 13:36:07 2003 @@ -65,6 +65,16 @@ Multi-Stage Optimization (PS)
  • LLVM: An Infrastructure for Multi-Stage Optimization (PDF)
  • +
  • LLVM: An Infrastructure for + Multi-Stage Optimization "book form" (PS)
  • +
  • LLVM: An Infrastructure for + Multi-Stage Optimization "book form" (PDF)
  • + +

    + The "book form" is useful if you plan to print this out. Print the file out + double sided, fold it in half, and staple it in the middle of the page. It + dramatically reduces the number of pages of paper used. +

    BibTeX Entry:

    From lattner at cs.uiuc.edu Sun Nov 16 13:40:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 13:40:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/McCat/18-imp/pgm.c Message-ID: <200311161939.NAA04627@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/McCat/18-imp: pgm.c updated: 1.1 -> 1.2 --- Log message: Make sure all variables are properly initialized before use --- Diffs of the changes: (+1 -1) Index: llvm/test/Programs/MultiSource/Benchmarks/McCat/18-imp/pgm.c diff -u llvm/test/Programs/MultiSource/Benchmarks/McCat/18-imp/pgm.c:1.1 llvm/test/Programs/MultiSource/Benchmarks/McCat/18-imp/pgm.c:1.2 --- llvm/test/Programs/MultiSource/Benchmarks/McCat/18-imp/pgm.c:1.1 Mon May 12 13:06:07 2003 +++ llvm/test/Programs/MultiSource/Benchmarks/McCat/18-imp/pgm.c Sun Nov 16 13:39:28 2003 @@ -179,7 +179,7 @@ { int rc; unsigned char byte; - int n, c, pixel; + int n = 0, c, pixel; /* Open the image file for processing. */ if ((rc = PGM_Open(img)) != PGM_OK) From lattner at cs.uiuc.edu Sun Nov 16 13:41:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 13:41:01 2003 Subject: [llvm-commits] CVS: poolalloc/test/TEST.poolalloc.Makefile TEST.poolalloc.report Message-ID: <200311161940.NAA04652@zion.cs.uiuc.edu> Changes in directory poolalloc/test: TEST.poolalloc.Makefile updated: 1.8 -> 1.9 TEST.poolalloc.report updated: 1.7 -> 1.8 --- Log message: Update for final version of paper --- Diffs of the changes: (+36 -2) Index: poolalloc/test/TEST.poolalloc.Makefile diff -u poolalloc/test/TEST.poolalloc.Makefile:1.8 poolalloc/test/TEST.poolalloc.Makefile:1.9 --- poolalloc/test/TEST.poolalloc.Makefile:1.8 Fri Nov 14 15:16:53 2003 +++ poolalloc/test/TEST.poolalloc.Makefile Sun Nov 16 13:40:39 2003 @@ -19,7 +19,7 @@ # Pool allocator runtime library #PA_RT := $(PROJECT_DIR)/lib/Bytecode/libpoolalloc_fl_rt.bc PA_RT_O := $(PROJECT_DIR)/lib/Release/poolalloc_rt.o - +#PA_RT_O := $(PROJECT_DIR)/lib/Release/poolalloc_fl_rt.o # Command to run opt with the pool allocator pass loaded OPT_PA := $(LOPT) -load $(PA_SO) Index: poolalloc/test/TEST.poolalloc.report diff -u poolalloc/test/TEST.poolalloc.report:1.7 poolalloc/test/TEST.poolalloc.report:1.8 --- poolalloc/test/TEST.poolalloc.report:1.7 Fri Nov 14 15:16:53 2003 +++ poolalloc/test/TEST.poolalloc.report Sun Nov 16 13:40:39 2003 @@ -17,6 +17,40 @@ } } + at LatexColumns = (2, 3, 4, 5, 6, 7); + +my $OLDEN = 'MultiSource/Benchmarks/Olden'; +my $FREEBENCH = 'MultiSource/Benchmarks/FreeBench'; +my $PTRDIST = 'MultiSource/Benchmarks/Ptrdist'; + + at LatexRowMapOrder = ( + "$OLDEN/bh/bh" => 'bh', + "$OLDEN/bisort/bisort" => 'bisort', + "$OLDEN/em3d/em3d" => 'em3d', + "$OLDEN/health/health" => 'health', + "$OLDEN/mst/mst" => 'mst', + "$OLDEN/perimeter/perimeter" => 'perimeter', + "$OLDEN/power/power" => 'power', + "$OLDEN/treeadd/treeadd" => 'treeadd', + "$OLDEN/tsp/tsp" => 'tsp', + "$OLDEN/voronoi/voronoi" => 'voronoi', + '-' => '-', + "$FREEBENCH/analyzer/analyzer" => 'analyzer', +# "$FREEBENCH/distray/distray" => 'distray', +# "$FREEBENCH/fourinarow/fourinarow" => 'fourinarow', +# "$FREEBENCH/mason/mason" => 'mason', + "$FREEBENCH/neural/neural" => 'neural', + "$FREEBENCH/pcompress2/pcompress2" => 'pcompress2', + "$FREEBENCH/pifft/pifft" => 'pifft', + '-' => '-', + "$PTRDIST/anagram/anagram" => 'anagram', + "$PTRDIST/bc/bc" => 'bc', + "$PTRDIST/ft/ft" => 'ft', + "$PTRDIST/ks/ks" => 'ks', + "$PTRDIST/yacr2/yacr2" => 'yacr2', + ); + + # These are the columns for the report. The first entry is the header for the # column, the second is the regex to use to match the value. Empty list create # seperators, and closures may be put in for custom processing. @@ -29,7 +63,7 @@ ["PoolAlloc
    ExeTime", 'CBE-RUN-TIME-POOLALLOC: real[\t ]+0m([0-9.]+)'], ["Speedup", \&Ratio], ["NumPools", '([0-9]+).*Number of pools allocated'], - ["NumCloned", '([0-9]+).*Number of functions cloned'], + ["NumTSPools", '([0-9]+).*Number of typesafe pools'], ["NumArgs", '([0-9]+).*Number of function arguments added'], ["NumPRElide", '([0-9]+).*Number of poolfree.s elided'], [] From lattner at cs.uiuc.edu Sun Nov 16 13:42:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 13:42:01 2003 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/Makefile Message-ID: <200311161941.NAA04667@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi: Makefile updated: 1.12 -> 1.13 --- Log message: adjust problem size --- Diffs of the changes: (+1 -1) Index: llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/Makefile diff -u llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/Makefile:1.12 llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/Makefile:1.13 --- llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/Makefile:1.12 Sun Oct 19 18:54:09 2003 +++ llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/Makefile Sun Nov 16 13:40:59 2003 @@ -5,7 +5,7 @@ CPPFLAGS = -DTORONTO LDFLAGS = -lm ifdef LARGE_PROBLEM_SIZE -RUN_OPTIONS = 802400 20 0 7 +RUN_OPTIONS = 1000000 20 32 7 endif include $(LEVEL)/test/Programs/MultiSource/Makefile.multisrc From lattner at cs.uiuc.edu Sun Nov 16 14:22:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 14:22:01 2003 Subject: [llvm-commits] CVS: llvm/include/llvm/ConstantHandling.h Constants.h GlobalValue.h GlobalVariable.h InstrTypes.h PassSupport.h Use.h User.h iMemory.h iOther.h iPHINode.h iTerminators.h Message-ID: <200311162021.OAA22509@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: ConstantHandling.h updated: 1.32 -> 1.33 Constants.h updated: 1.34 -> 1.35 GlobalValue.h updated: 1.13 -> 1.14 GlobalVariable.h updated: 1.25 -> 1.26 InstrTypes.h updated: 1.34 -> 1.35 PassSupport.h updated: 1.17 -> 1.18 Use.h updated: 1.4 -> 1.5 User.h updated: 1.27 -> 1.28 iMemory.h updated: 1.42 -> 1.43 iOther.h updated: 1.41 -> 1.42 iPHINode.h updated: 1.14 -> 1.15 iTerminators.h updated: 1.34 -> 1.35 --- Log message: Fixes for PR114: Thanks to Reid Spencer! --- Diffs of the changes: (+40 -33) Index: llvm/include/llvm/ConstantHandling.h diff -u llvm/include/llvm/ConstantHandling.h:1.32 llvm/include/llvm/ConstantHandling.h:1.33 --- llvm/include/llvm/ConstantHandling.h:1.32 Tue Nov 11 16:41:29 2003 +++ llvm/include/llvm/ConstantHandling.h Sun Nov 16 14:21:15 2003 @@ -113,7 +113,8 @@ case Type::LongTyID: return castToLong(V); case Type::FloatTyID: return castToFloat(V); case Type::DoubleTyID: return castToDouble(V); - case Type::PointerTyID:return castToPointer(V, (PointerType*)Ty); + case Type::PointerTyID: + return castToPointer(V, reinterpret_cast(Ty)); default: return 0; } } @@ -125,7 +126,7 @@ static inline ConstRules *get(const Constant &V1, const Constant &V2) { if (isa(V1) || isa(V2)) return getConstantExprRules(); - return (ConstRules*)V1.getType()->getOrCreateAnnotation(AID); + return static_cast(V1.getType()->getOrCreateAnnotation(AID)); } private: static ConstRules *getConstantExprRules(); Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.34 llvm/include/llvm/Constants.h:1.35 --- llvm/include/llvm/Constants.h:1.34 Tue Nov 11 16:41:29 2003 +++ llvm/include/llvm/Constants.h Sun Nov 16 14:21:15 2003 @@ -301,7 +301,7 @@ /// which reduces the amount of casting needed in parts of the compiler. /// inline const ArrayType *getType() const { - return (ArrayType*)Value::getType(); + return reinterpret_cast(Value::getType()); } /// getAsString - If the sub-element type of this array is either sbyte or @@ -354,7 +354,7 @@ /// getType() specialization - Reduce amount of casting... inline const StructType *getType() const { - return (StructType*)Value::getType(); + return reinterpret_cast(Value::getType()); } /// getValues - Return a vector of the component constants that make up this @@ -394,10 +394,11 @@ class ConstantPointer : public Constant { ConstantPointer(const ConstantPointer &); // DO NOT IMPLEMENT protected: - inline ConstantPointer(const PointerType *T) : Constant((const Type*)T) {} + inline ConstantPointer(const PointerType *T) + : Constant(reinterpret_cast(T)) { } public: inline const PointerType *getType() const { - return (PointerType*)Value::getType(); + return reinterpret_cast(Value::getType()); } /// isNullValue - Return true if this is the value that would be returned by Index: llvm/include/llvm/GlobalValue.h diff -u llvm/include/llvm/GlobalValue.h:1.13 llvm/include/llvm/GlobalValue.h:1.14 --- llvm/include/llvm/GlobalValue.h:1.13 Tue Nov 11 16:41:29 2003 +++ llvm/include/llvm/GlobalValue.h Sun Nov 16 14:21:15 2003 @@ -46,7 +46,7 @@ /// getType - Global values are always pointers. inline const PointerType *getType() const { - return (const PointerType*)User::getType(); + return reinterpret_cast(User::getType()); } bool hasExternalLinkage() const { return Linkage == ExternalLinkage; } Index: llvm/include/llvm/GlobalVariable.h diff -u llvm/include/llvm/GlobalVariable.h:1.25 llvm/include/llvm/GlobalVariable.h:1.26 --- llvm/include/llvm/GlobalVariable.h:1.25 Tue Nov 11 16:41:29 2003 +++ llvm/include/llvm/GlobalVariable.h Sun Nov 16 14:21:15 2003 @@ -70,18 +70,18 @@ /// inline Constant *getInitializer() const { assert(hasInitializer() && "GV doesn't have initializer!"); - return (Constant*)Operands[0].get(); + return reinterpret_cast(Operands[0].get()); } inline Constant *getInitializer() { assert(hasInitializer() && "GV doesn't have initializer!"); - return (Constant*)Operands[0].get(); + return reinterpret_cast(Operands[0].get()); } inline void setInitializer(Constant *CPV) { if (CPV == 0) { if (hasInitializer()) Operands.pop_back(); } else { if (!hasInitializer()) Operands.push_back(Use(0, this)); - Operands[0] = (Value*)CPV; + Operands[0] = reinterpret_cast(CPV); } } Index: llvm/include/llvm/InstrTypes.h diff -u llvm/include/llvm/InstrTypes.h:1.34 llvm/include/llvm/InstrTypes.h:1.35 --- llvm/include/llvm/InstrTypes.h:1.34 Tue Nov 11 16:41:29 2003 +++ llvm/include/llvm/InstrTypes.h Sun Nov 16 14:21:15 2003 @@ -50,7 +50,8 @@ virtual void setSuccessor(unsigned idx, BasicBlock *B) = 0; inline BasicBlock *getSuccessor(unsigned idx) { - return (BasicBlock*)((const TerminatorInst *)this)->getSuccessor(idx); + const TerminatorInst *TI = this; + return const_cast(TI->getSuccessor(idx)); } // Methods for support type inquiry through isa, cast, and dyn_cast: @@ -110,7 +111,7 @@ static Value* getNotArgument( BinaryOperator* Bop); BinaryOps getOpcode() const { - return (BinaryOps)Instruction::getOpcode(); + return static_cast(Instruction::getOpcode()); } virtual Instruction *clone() const { Index: llvm/include/llvm/PassSupport.h diff -u llvm/include/llvm/PassSupport.h:1.17 llvm/include/llvm/PassSupport.h:1.18 --- llvm/include/llvm/PassSupport.h:1.17 Tue Nov 11 16:41:30 2003 +++ llvm/include/llvm/PassSupport.h Sun Nov 16 14:21:15 2003 @@ -226,7 +226,8 @@ RegisterOpt(const char *PassArg, const char *Name, FunctionPass *(*ctor)(), bool CFGOnly = false) { registerPass(new PassInfo(Name, PassArg, typeid(PassName), - PassInfo::Optimization, (Pass*(*)())ctor)); + PassInfo::Optimization, + static_cast(ctor))); if (CFGOnly) setOnlyUsesCFG(); } @@ -246,7 +247,7 @@ bool CFGOnly = false) { registerPass(new PassInfo(Name, PassArg, typeid(PassName), PassInfo::Optimization, 0, - (Pass*(*)(TargetMachine&))targetctor)); + static_cast(targetctor))); if (CFGOnly) setOnlyUsesCFG(); } }; Index: llvm/include/llvm/Use.h diff -u llvm/include/llvm/Use.h:1.4 llvm/include/llvm/Use.h:1.5 --- llvm/include/llvm/Use.h:1.4 Fri Nov 14 00:03:05 2003 +++ llvm/include/llvm/Use.h Sun Nov 16 14:21:15 2003 @@ -83,13 +83,13 @@ template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const Use &Val) { - return (SimpleType)Val.get(); + return static_cast(Val.get()); } }; template<> struct simplify_type { typedef Value* SimpleType; static SimpleType getSimplifiedValue(const Use &Val) { - return (SimpleType)Val.get(); + return static_cast(Val.get()); } }; Index: llvm/include/llvm/User.h diff -u llvm/include/llvm/User.h:1.27 llvm/include/llvm/User.h:1.28 --- llvm/include/llvm/User.h:1.27 Tue Nov 11 16:41:30 2003 +++ llvm/include/llvm/User.h Sun Nov 16 14:21:15 2003 @@ -96,7 +96,7 @@ typedef Value* SimpleType; static SimpleType getSimplifiedValue(const User::op_iterator &Val) { - return (SimpleType)Val->get(); + return static_cast(Val->get()); } }; template<> struct simplify_type @@ -106,7 +106,7 @@ typedef Value* SimpleType; static SimpleType getSimplifiedValue(const User::const_op_iterator &Val) { - return (SimpleType)Val->get(); + return static_cast(Val->get()); } }; template<> struct simplify_type Index: llvm/include/llvm/iMemory.h diff -u llvm/include/llvm/iMemory.h:1.42 llvm/include/llvm/iMemory.h:1.43 --- llvm/include/llvm/iMemory.h:1.42 Tue Nov 11 16:41:30 2003 +++ llvm/include/llvm/iMemory.h Sun Nov 16 14:21:15 2003 @@ -47,7 +47,7 @@ // getType - Overload to return most specific pointer type... inline const PointerType *getType() const { - return (const PointerType*)Instruction::getType(); + return reinterpret_cast(Instruction::getType()); } // getAllocatedType - Return the type that is being allocated by the @@ -237,7 +237,7 @@ class GetElementPtrInst : public Instruction { GetElementPtrInst(const GetElementPtrInst &EPI) - : Instruction((Type*)EPI.getType(), GetElementPtr) { + : Instruction(reinterpret_cast(EPI.getType()), GetElementPtr) { Operands.reserve(EPI.Operands.size()); for (unsigned i = 0, E = EPI.Operands.size(); i != E; ++i) Operands.push_back(Use(EPI.Operands[i], this)); @@ -249,7 +249,7 @@ // getType - Overload to return most specific pointer type... inline const PointerType *getType() const { - return (PointerType*)Instruction::getType(); + return reinterpret_cast(Instruction::getType()); } /// getIndexedType - Returns the type of the element that would be loaded with Index: llvm/include/llvm/iOther.h diff -u llvm/include/llvm/iOther.h:1.41 llvm/include/llvm/iOther.h:1.42 --- llvm/include/llvm/iOther.h:1.41 Tue Nov 11 16:41:30 2003 +++ llvm/include/llvm/iOther.h Sun Nov 16 14:21:15 2003 @@ -113,7 +113,9 @@ Operands.push_back(Use(SA, this)); } - OtherOps getOpcode() const { return (OtherOps)Instruction::getOpcode(); } + OtherOps getOpcode() const { + return static_cast(Instruction::getOpcode()); + } virtual Instruction *clone() const { return new ShiftInst(*this); } Index: llvm/include/llvm/iPHINode.h diff -u llvm/include/llvm/iPHINode.h:1.14 llvm/include/llvm/iPHINode.h:1.15 --- llvm/include/llvm/iPHINode.h:1.14 Tue Nov 11 16:41:30 2003 +++ llvm/include/llvm/iPHINode.h Sun Nov 16 14:21:15 2003 @@ -58,11 +58,11 @@ /// getIncomingBlock - Return incoming basic block #x BasicBlock *getIncomingBlock(unsigned i) const { assert(i*2+1 < Operands.size() && "Invalid value number!"); - return (BasicBlock*)Operands[i*2+1].get(); + return reinterpret_cast(Operands[i*2+1].get()); } void setIncomingBlock(unsigned i, BasicBlock *BB) { assert(i*2+1 < Operands.size() && "Invalid value number!"); - Operands[i*2+1] = (Value*)BB; + Operands[i*2+1] = reinterpret_cast(BB); } unsigned getOperandNumForIncomingBlock(unsigned i) { return i*2+1; @@ -73,7 +73,7 @@ assert(getType() == D->getType() && "All operands to PHI node must be the same type as the PHI node!"); Operands.push_back(Use(D, this)); - Operands.push_back(Use((Value*)BB, this)); + Operands.push_back(Use(reinterpret_cast(BB), this)); } /// removeIncomingValue - Remove an incoming value. This is useful if a Index: llvm/include/llvm/iTerminators.h diff -u llvm/include/llvm/iTerminators.h:1.34 llvm/include/llvm/iTerminators.h:1.35 --- llvm/include/llvm/iTerminators.h:1.34 Tue Nov 11 16:41:30 2003 +++ llvm/include/llvm/iTerminators.h Sun Nov 16 14:21:15 2003 @@ -87,7 +87,7 @@ inline bool isConditional() const { return Operands.size() == 3; } inline Value *getCondition() const { - return isUnconditional() ? 0 : (Value*)Operands[2].get(); + return isUnconditional() ? 0 : reinterpret_cast(Operands[2].get()); } void setCondition(Value *V) { @@ -100,7 +100,7 @@ // void setUnconditionalDest(BasicBlock *Dest) { if (isConditional()) Operands.erase(Operands.begin()+1, Operands.end()); - Operands[0] = (Value*)Dest; + Operands[0] = reinterpret_cast(Dest); } virtual const BasicBlock *getSuccessor(unsigned i) const { @@ -109,12 +109,13 @@ cast(Operands[1].get()); } inline BasicBlock *getSuccessor(unsigned idx) { - return (BasicBlock*)((const BranchInst *)this)->getSuccessor(idx); + const BranchInst *BI = this; + return const_cast(BI->getSuccessor(idx)); } virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc) { assert(idx < getNumSuccessors() && "Successor # out of range for Branch!"); - Operands[idx] = (Value*)NewSucc; + Operands[idx] = reinterpret_cast(NewSucc); } virtual unsigned getNumSuccessors() const { return 1+isConditional(); } @@ -176,7 +177,7 @@ virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc) { assert(idx < getNumSuccessors() && "Successor # out of range for switch!"); - Operands[idx*2+1] = (Value*)NewSucc; + Operands[idx*2+1] = reinterpret_cast(NewSucc); } // getSuccessorValue - Return the value associated with the specified @@ -243,11 +244,11 @@ } inline void setNormalDest(BasicBlock *B){ - Operands[1] = (Value*)B; + Operands[1] = reinterpret_cast(B); } inline void setExceptionalDest(BasicBlock *B){ - Operands[2] = (Value*)B; + Operands[2] = reinterpret_cast(B); } virtual const BasicBlock *getSuccessor(unsigned i) const { @@ -261,7 +262,7 @@ virtual void setSuccessor(unsigned idx, BasicBlock *NewSucc) { assert(idx < 2 && "Successor # out of range for invoke!"); - Operands[idx+1] = (Value*)NewSucc; + Operands[idx+1] = reinterpret_cast(NewSucc); } virtual unsigned getNumSuccessors() const { return 2; } From lattner at cs.uiuc.edu Sun Nov 16 14:22:18 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 14:22:18 2003 Subject: [llvm-commits] CVS: llvm/include/Support/Casting.h CommandLine.h GraphWriter.h HashExtras.h MallocAllocator.h MathExtras.h StringExtras.h Message-ID: <200311162021.OAA22439@zion.cs.uiuc.edu> Changes in directory llvm/include/Support: Casting.h updated: 1.11 -> 1.12 CommandLine.h updated: 1.28 -> 1.29 GraphWriter.h updated: 1.17 -> 1.18 HashExtras.h updated: 1.9 -> 1.10 MallocAllocator.h updated: 1.6 -> 1.7 MathExtras.h updated: 1.9 -> 1.10 StringExtras.h updated: 1.10 -> 1.11 --- Log message: Fixes for PR114: Thanks to Reid Spencer! --- Diffs of the changes: (+31 -22) Index: llvm/include/Support/Casting.h diff -u llvm/include/Support/Casting.h:1.11 llvm/include/Support/Casting.h:1.12 --- llvm/include/Support/Casting.h:1.11 Tue Nov 11 16:41:29 2003 +++ llvm/include/Support/Casting.h Sun Nov 16 14:21:13 2003 @@ -37,7 +37,7 @@ template struct simplify_type { typedef const From SimpleType; static SimpleType &getSimplifiedValue(const From &Val) { - return simplify_type::getSimplifiedValue((From&)Val); + return simplify_type::getSimplifiedValue(static_cast(Val)); } }; @@ -178,7 +178,8 @@ template struct cast_convert_val { // This _is_ a simple type, just cast it. static typename cast_retty::ret_type doit(const FromTy &Val) { - return (typename cast_retty::ret_type)Val; + return reinterpret_cast::ret_type>( + const_cast(Val)); } }; Index: llvm/include/Support/CommandLine.h diff -u llvm/include/Support/CommandLine.h:1.28 llvm/include/Support/CommandLine.h:1.29 --- llvm/include/Support/CommandLine.h:1.28 Tue Nov 11 16:41:29 2003 +++ llvm/include/Support/CommandLine.h Sun Nov 16 14:21:13 2003 @@ -148,19 +148,23 @@ inline enum NumOccurrences getNumOccurrencesFlag() const { int NO = Flags & OccurrencesMask; - return NO ? (enum NumOccurrences)NO : getNumOccurrencesFlagDefault(); + return NO ? static_cast(NO) + : getNumOccurrencesFlagDefault(); } inline enum ValueExpected getValueExpectedFlag() const { int VE = Flags & ValueMask; - return VE ? (enum ValueExpected)VE : getValueExpectedFlagDefault(); + return VE ? static_cast(VE) + : getValueExpectedFlagDefault(); } inline enum OptionHidden getOptionHiddenFlag() const { int OH = Flags & HiddenMask; - return OH ? (enum OptionHidden)OH : getOptionHiddenFlagDefault(); + return OH ? static_cast(OH) + : getOptionHiddenFlagDefault(); } inline enum FormattingFlags getFormattingFlag() const { int OH = Flags & FormattingMask; - return OH ? (enum FormattingFlags)OH : getFormattingFlagDefault(); + return OH ? static_cast(OH) + : getFormattingFlagDefault(); } inline unsigned getMiscFlags() const { return Flags & MiscMask; @@ -307,7 +311,7 @@ // Process the varargs portion of the values... while (const char *EnumName = va_arg(ValueArgs, const char *)) { - DataType EnumVal = (DataType)va_arg(ValueArgs, int); + DataType EnumVal = static_cast(va_arg(ValueArgs, int)); const char *EnumDesc = va_arg(ValueArgs, const char *); Values.push_back(std::make_pair(EnumName, // Add value to value map std::make_pair(EnumVal, EnumDesc))); @@ -452,7 +456,8 @@ template void addLiteralOption(const char *Name, const DT &V, const char *HelpStr) { assert(findOption(Name) == Values.size() && "Option already exists!"); - Values.push_back(std::make_pair(Name, std::make_pair((DataType)V,HelpStr))); + Values.push_back(std::make_pair(Name, + std::make_pair(static_cast(V),HelpStr))); } // removeLiteralOption - Remove the specified option. Index: llvm/include/Support/GraphWriter.h diff -u llvm/include/Support/GraphWriter.h:1.17 llvm/include/Support/GraphWriter.h:1.18 --- llvm/include/Support/GraphWriter.h:1.17 Tue Nov 11 16:41:29 2003 +++ llvm/include/Support/GraphWriter.h Sun Nov 16 14:21:13 2003 @@ -100,7 +100,7 @@ void writeNode(NodeType *Node) { std::string NodeAttributes = DOTTraits::getNodeAttributes(Node); - O << "\tNode" << (void*)Node << " [shape=record,"; + O << "\tNode" << reinterpret_cast(Node) << " [shape=record,"; if (!NodeAttributes.empty()) O << NodeAttributes << ","; O << "label=\"{" << DOT::EscapeString(DOTTraits::getNodeLabel(Node, G)); @@ -137,10 +137,11 @@ // Figure out which edge this targets... unsigned Offset = std::distance(GTraits::child_begin(TargetNode), TargetIt); - DestPort = (int)Offset; + DestPort = static_cast(Offset); } - emitEdge((void *)Node, edgeidx, (void*)TargetNode, DestPort, + emitEdge(reinterpret_cast(Node), edgeidx, + reinterpret_cast(TargetNode), DestPort, DOTTraits::getEdgeAttributes(Node, EI)); } } @@ -178,7 +179,7 @@ O << "\tNode" << SrcNodeID; if (SrcNodePort >= 0) O << ":g" << SrcNodePort; - O << " -> Node" << (void*)DestNodeID; + O << " -> Node" << reinterpret_cast(DestNodeID); if (DestNodePort >= 0) O << ":g" << DestNodePort; Index: llvm/include/Support/HashExtras.h diff -u llvm/include/Support/HashExtras.h:1.9 llvm/include/Support/HashExtras.h:1.10 --- llvm/include/Support/HashExtras.h:1.9 Mon Oct 20 14:46:57 2003 +++ llvm/include/Support/HashExtras.h Sun Nov 16 14:21:13 2003 @@ -31,7 +31,9 @@ // Provide a hash function for arbitrary pointers... template struct hash { - inline size_t operator()(const T *Val) const { return (size_t)Val; } + inline size_t operator()(const T *Val) const { + return reinterpret_cast(Val); + } }; } // End namespace std Index: llvm/include/Support/MallocAllocator.h diff -u llvm/include/Support/MallocAllocator.h:1.6 llvm/include/Support/MallocAllocator.h:1.7 --- llvm/include/Support/MallocAllocator.h:1.6 Wed Nov 12 16:45:14 2003 +++ llvm/include/Support/MallocAllocator.h Sun Nov 16 14:21:13 2003 @@ -47,15 +47,15 @@ size_type max_size() const { return ~0 / sizeof(T); } static pointer allocate(size_t n, void* hint = 0) { - return (pointer)malloc(n*sizeof(T)); + return static_cast(malloc(n*sizeof(T))); } static void deallocate(pointer p, size_t n) { - free((void*)p); + free(static_cast(p)); } void construct(pointer p, const T &val) { - new((void*)p) T(val); + new(static_cast(p)) T(val); } void destroy(pointer p) { p->~T(); Index: llvm/include/Support/MathExtras.h diff -u llvm/include/Support/MathExtras.h:1.9 llvm/include/Support/MathExtras.h:1.10 --- llvm/include/Support/MathExtras.h:1.9 Tue Nov 11 16:41:29 2003 +++ llvm/include/Support/MathExtras.h Sun Nov 16 14:21:13 2003 @@ -28,7 +28,7 @@ inline bool isPowerOf2(int64_t C, unsigned &getPow) { if (C < 0) C = -C; if (C > 0 && C == (C & ~(C - 1))) { - getPow = log2((uint64_t)C); + getPow = log2(static_cast(C)); return true; } Index: llvm/include/Support/StringExtras.h diff -u llvm/include/Support/StringExtras.h:1.10 llvm/include/Support/StringExtras.h:1.11 --- llvm/include/Support/StringExtras.h:1.10 Tue Nov 11 16:41:29 2003 +++ llvm/include/Support/StringExtras.h Sun Nov 16 14:21:13 2003 @@ -57,14 +57,14 @@ static inline std::string itostr(int64_t X) { if (X < 0) - return utostr((uint64_t)-X, true); + return utostr(static_cast(-X), true); else - return utostr((uint64_t)X); + return utostr(static_cast(X)); } static inline std::string utostr(unsigned long X, bool isNeg = false) { - return utostr((unsigned long long)X, isNeg); + return utostr(static_cast(X), isNeg); } static inline std::string utostr(unsigned X, bool isNeg = false) { @@ -86,9 +86,9 @@ static inline std::string itostr(int X) { if (X < 0) - return utostr((unsigned)-X, true); + return utostr(static_cast(-X), true); else - return utostr((unsigned)X); + return utostr(static_cast(X)); } static inline std::string ftostr(double V) { From lattner at cs.uiuc.edu Sun Nov 16 14:26:00 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 14:26:00 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200311162025.OAA01843@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.31 -> 1.32 --- Log message: Bugz --- Diffs of the changes: (+6 -1) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.31 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.32 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.31 Fri Nov 14 00:42:16 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Sun Nov 16 14:25:26 2003 @@ -199,6 +199,9 @@
  • SymbolTable::getUniqueName is very inefficient
  • +

  • Bad path to the C/C++ frontend causes +build problems
  • +

  • [buildscripts] Building into objdir with .o in it fails
  • @@ -211,6 +214,8 @@

  • [bcreader] Incorrect cast causes misread forward constant references
  • +

  • LLVM header files should be -Wold-style-cast clean
  • +


    Known problems with the C front-end

      @@ -502,6 +507,6 @@ Maintained By: The LLVM Team
      -Last modified: Fri Nov 14 00:41:48 CST 2003 +Last modified: Sun Nov 16 14:24:23 CST 2003 From lattner at cs.uiuc.edu Sun Nov 16 14:26:18 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 14:26:18 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311162025.OAA01836@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.45 -> 1.46 --- Log message: Bugz --- Diffs of the changes: (+6 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.45 llvm/docs/ReleaseNotes.html:1.46 --- llvm/docs/ReleaseNotes.html:1.45 Fri Nov 14 00:42:01 2003 +++ llvm/docs/ReleaseNotes.html Sun Nov 16 14:25:24 2003 @@ -100,6 +100,11 @@
    • C front-end doesn't emit getelementptr for address of array element
    • +
    • Bad path to the C/C++ frontend causes +build problems
    • + +
    • LLVM header files should be -Wold-style-cast clean
    • +

      @@ -445,6 +450,6 @@ Maintained By: The LLVM Team
      -Last modified: Fri Nov 14 00:41:21 CST 2003 +Last modified: Sun Nov 16 14:25:00 CST 2003 From lattner at cs.uiuc.edu Sun Nov 16 14:48:02 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 14:48:02 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/CFrontend/2003-11-16-StaticArrayInit.c Message-ID: <200311162047.OAA13693@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CFrontend: 2003-11-16-StaticArrayInit.c added (r1.1) --- Log message: New testcase, for PR 115 --- Diffs of the changes: (+6 -0) Index: llvm/test/Regression/CFrontend/2003-11-16-StaticArrayInit.c diff -c /dev/null llvm/test/Regression/CFrontend/2003-11-16-StaticArrayInit.c:1.1 *** /dev/null Sun Nov 16 14:47:15 2003 --- llvm/test/Regression/CFrontend/2003-11-16-StaticArrayInit.c Sun Nov 16 14:47:05 2003 *************** *** 0 **** --- 1,6 ---- + void bar () { + static char x[10]; + static char *xend = x + 10; + } + + From lattner at cs.uiuc.edu Sun Nov 16 15:40:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 15:40:01 2003 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/ADCE.cpp Message-ID: <200311162139.PAA15114@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: ADCE.cpp updated: 1.65 -> 1.66 --- Log message: Fix PR116 --- Diffs of the changes: (+12 -0) Index: llvm/lib/Transforms/Scalar/ADCE.cpp diff -u llvm/lib/Transforms/Scalar/ADCE.cpp:1.65 llvm/lib/Transforms/Scalar/ADCE.cpp:1.66 --- llvm/lib/Transforms/Scalar/ADCE.cpp:1.65 Tue Nov 11 16:41:33 2003 +++ llvm/lib/Transforms/Scalar/ADCE.cpp Sun Nov 16 15:39:27 2003 @@ -209,6 +209,18 @@ return MadeChanges; } + // Scan the function marking blocks without post-dominance information as + // live. Blocks without post-dominance information occur when there is an + // infinite loop in the program. Because the infinite loop could contain a + // function which unwinds, exits or has side-effects, we don't want to delete + // the infinite loop or those blocks leading up to it. + for (Function::iterator I = Func->begin(), E = Func->end(); I != E; ++I) + if (DT[I] == 0) + for (pred_iterator PI = pred_begin(I), E = pred_end(I); PI != E; ++PI) + markInstructionLive((*PI)->getTerminator()); + + + DEBUG(std::cerr << "Processing work list\n"); // AliveBlocks - Set of basic blocks that we know have instructions that are From lattner at cs.uiuc.edu Sun Nov 16 15:43:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 15:43:01 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311162142.PAA15421@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.46 -> 1.47 --- Log message: add adce bug --- Diffs of the changes: (+2 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.46 llvm/docs/ReleaseNotes.html:1.47 --- llvm/docs/ReleaseNotes.html:1.46 Sun Nov 16 14:25:24 2003 +++ llvm/docs/ReleaseNotes.html Sun Nov 16 15:42:48 2003 @@ -144,6 +144,7 @@

    • gccld -Lfoo -lfoo fails to find ./foo/libfoo.a
    • [bcreader] Incorrect cast causes misread forward constant references
    • Casting a string constant to void crashes llvm-gcc
    • +
    • [adce] ADCE considers blocks without postdominators to be unreachable
    • At this time, LLVM is known to work properly with SPEC CPU 2000, the Olden @@ -450,6 +451,6 @@ Maintained By: The LLVM Team
      -Last modified: Sun Nov 16 14:25:00 CST 2003 +Last modified: Sun Nov 16 15:41:42 CST 2003 From lattner at cs.uiuc.edu Sun Nov 16 15:44:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 15:44:01 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200311162143.PAA15428@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.32 -> 1.33 --- Log message: add adce bug --- Diffs of the changes: (+3 -1) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.32 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.33 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.32 Sun Nov 16 14:25:26 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Sun Nov 16 15:42:50 2003 @@ -216,6 +216,8 @@

    • LLVM header files should be -Wold-style-cast clean
    • +

    • [adce] ADCE considers blocks without postdominators to be unreachable
    • +


    Known problems with the C front-end

      @@ -507,6 +509,6 @@ Maintained By: The LLVM Team
      -Last modified: Sun Nov 16 14:24:23 CST 2003 +Last modified: Sun Nov 16 15:42:12 CST 2003 From lattner at cs.uiuc.edu Sun Nov 16 15:48:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 15:48:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll Message-ID: <200311162147.PAA15493@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: 2003-11-16-MissingPostDominanceInfo.ll added (r1.1) --- Log message: Testcase for PR116 --- Diffs of the changes: (+17 -0) Index: llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll diff -c /dev/null llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll:1.1 *** /dev/null Sun Nov 16 15:47:11 2003 --- llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll Sun Nov 16 15:47:01 2003 *************** *** 0 **** --- 1,17 ---- + ; RUN: llvm-as < %s | opt -adce | lli + declare void %exit(int) + + int %main(int %argc) { + %C = seteq int %argc, 1 + br bool %C, label %Cond, label %Done + + Cond: + br bool %C, label %Loop, label %Done + + Loop: + call void %exit(int 0) + br label %Loop + + Done: + ret int 1 + } From lattner at cs.uiuc.edu Sun Nov 16 16:07:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 16:07:01 2003 Subject: [llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp Message-ID: <200311162206.QAA16561@zion.cs.uiuc.edu> Changes in directory llvm/lib/CWriter: Writer.cpp updated: 1.143 -> 1.144 --- Log message: ISO 9899 7.13.2.1 (3) says that "[...] the values of objects of automatic storage duration that are local to the function containing the invocation of the [...] setjmp macro that do not have volatile-qualified type and have been changed between the setjmp invocation and longjmp call are indeterminate." As such, we have to mark all variables in a function that uses 'invoke' as volatile. This fixes PR77 --- Diffs of the changes: (+39 -4) Index: llvm/lib/CWriter/Writer.cpp diff -u llvm/lib/CWriter/Writer.cpp:1.143 llvm/lib/CWriter/Writer.cpp:1.144 --- llvm/lib/CWriter/Writer.cpp:1.143 Tue Nov 11 16:41:32 2003 +++ llvm/lib/CWriter/Writer.cpp Sun Nov 16 16:06:14 2003 @@ -564,7 +564,7 @@ // generateCompilerSpecificCode - This is where we add conditional compilation // directives to cater to specific compilers as need be. // -void generateCompilerSpecificCode(std::ostream& Out) { +static void generateCompilerSpecificCode(std::ostream& Out) { // Alloca is hard to get, and we don't want to include stdlib.h here... Out << "/* get a declaration for alloca */\n" << "#ifdef sun\n" @@ -583,6 +583,29 @@ << "#endif\n"; } +// generateProcessorSpecificCode - This is where we add conditional compilation +// directives to cater to specific processors as need be. +// +static void generateProcessorSpecificCode(std::ostream& Out) { + // According to ANSI C, longjmp'ing to a setjmp could invalidate any + // non-volatile variable in the scope of the setjmp. For now, we are not + // doing analysis to determine which variables need to be marked volatile, so + // we just mark them all. + // + // HOWEVER, many targets implement setjmp by saving and restoring the register + // file, so they DON'T need variables to be marked volatile, and this is a + // HUGE pessimization for them. For this reason, on known-good processors, we + // do not emit volatile qualifiers. + Out << "#if defined(__386__) || defined(__i386__) || \\\n" + << " defined(i386) || defined(WIN32)\n" + << "/* setjmp does not require variables to be marked volatile */" + << "#define VOLATILE_FOR_SETJMP\n" + << "#else\n" + << "#define VOLATILE_FOR_SETJMP volatile\n" + << "#endif\n\n"; +} + + void CWriter::printModule(Module *M) { // Calculate which global values have names that will collide when we throw // away type information. @@ -605,10 +628,11 @@ // get declaration for alloca Out << "/* Provide Declarations */\n"; - Out << "#include \n"; - Out << "#include \n"; + Out << "#include \n"; // Varargs support + Out << "#include \n"; // Unwind support generateCompilerSpecificCode(Out); - + generateProcessorSpecificCode(Out); + // Provide a definition for `bool' if not compiling with a C++ compiler. Out << "\n" << "#ifndef __cplusplus\ntypedef unsigned char bool;\n#endif\n" @@ -924,19 +948,30 @@ printFunctionSignature(F, false); Out << " {\n"; + // Determine whether or not the function contains any invoke instructions. + bool HasInvoke = false; + for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) + if (isa(I->getTerminator())) { + HasInvoke = true; + break; + } + // print local variable information for the function for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) if (const AllocaInst *AI = isDirectAlloca(*I)) { Out << " "; + if (HasInvoke) Out << "VOLATILE_FOR_SETJMP "; printType(Out, AI->getAllocatedType(), Mang->getValueName(AI)); Out << "; /* Address exposed local */\n"; } else if ((*I)->getType() != Type::VoidTy && !isInlinableInst(**I)) { Out << " "; + if (HasInvoke) Out << "VOLATILE_FOR_SETJMP "; printType(Out, (*I)->getType(), Mang->getValueName(*I)); Out << ";\n"; if (isa(*I)) { // Print out PHI node temporaries as well... Out << " "; + if (HasInvoke) Out << "VOLATILE_FOR_SETJMP "; printType(Out, (*I)->getType(), Mang->getValueName(*I)+"__PHI_TEMPORARY"); Out << ";\n"; From lattner at cs.uiuc.edu Sun Nov 16 16:08:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 16:08:01 2003 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll Message-ID: <200311162207.QAA16616@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/ADCE: 2003-11-16-MissingPostDominanceInfo.ll updated: 1.1 -> 1.2 --- Log message: There is no need to rely on LLI working for this test --- Diffs of the changes: (+1 -1) Index: llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll diff -u llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll:1.1 llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll:1.2 --- llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll:1.1 Sun Nov 16 15:47:01 2003 +++ llvm/test/Regression/Transforms/ADCE/2003-11-16-MissingPostDominanceInfo.ll Sun Nov 16 16:07:45 2003 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -adce | lli +; RUN: llvm-as < %s | opt -adce -simplifycfg | llvm-dis | grep call declare void %exit(int) int %main(int %argc) { From lattner at cs.uiuc.edu Sun Nov 16 16:12:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 16:12:01 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200311162211.QAA16930@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.33 -> 1.34 --- Log message: Bugz fixed --- Diffs of the changes: (+4 -5) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.33 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.34 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.33 Sun Nov 16 15:42:50 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Sun Nov 16 16:11:44 2003 @@ -468,10 +468,6 @@ supported. This should not affect LLVM produced by the C or C++ frontends.

      -

    • Variables in scope of output setjmp -calls should be volatile. Note that this does not effect correctness on -many platforms.

      -

    • The code produces by the C back-end has only been tested with the Sun CC and GCC compilers. It is possible that it will have to be adjusted to support other C compilers.

      @@ -481,6 +477,9 @@

    • C backend fails on constant cast expr to ptr-to-anonymous struct
    • +

    • Variables in scope of output setjmp +calls should be volatile. Note that this does not effect correctness on +many platforms, such as X86.

    @@ -509,6 +508,6 @@ Maintained By: The LLVM Team
    -Last modified: Sun Nov 16 15:42:12 CST 2003 +Last modified: Sun Nov 16 16:10:29 CST 2003 From lattner at cs.uiuc.edu Sun Nov 16 16:12:18 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 16:12:18 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311162211.QAA16923@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.47 -> 1.48 --- Log message: Bugz fixed --- Diffs of the changes: (+4 -5) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.47 llvm/docs/ReleaseNotes.html:1.48 --- llvm/docs/ReleaseNotes.html:1.47 Sun Nov 16 15:42:48 2003 +++ llvm/docs/ReleaseNotes.html Sun Nov 16 16:11:42 2003 @@ -125,6 +125,9 @@
  • [instcombine] Resolving invoke inserts cast after terminator
  • llvm-as crashes when labels are used in phi nodes
  • [build problem] Callgraph.cpp not pulled in from libipa.a
  • +
  • Variables in scope of output setjmp +calls should be volatile. Note that this does not effect correctness on +many platforms, such as X86.
  • llvm-gcc crashes compiling global union initializer
  • C front-end crash on empty structure
  • CFrontend crashes when compiling C99 compound expressions
  • @@ -414,10 +417,6 @@ supported. This should not affect LLVM produced by the C or C++ frontends.

    -

  • Variables in scope of output setjmp -calls should be volatile. Note that this does not effect correctness on -many platforms.

    -

  • The code produces by the C back-end has only been tested with the Sun CC, GCC, and Intel compilers. It is possible that it will have to be adjusted to support other C compilers.

    @@ -451,6 +450,6 @@ Maintained By: The LLVM Team
    -Last modified: Sun Nov 16 15:41:42 CST 2003 +Last modified: Sun Nov 16 16:11:04 CST 2003 From lattner at cs.uiuc.edu Sun Nov 16 17:01:06 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 17:01:06 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200311162300.RAA25249@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.108 -> 1.109 --- Log message: Don't print 'No predecessors!' on the entry block --- Diffs of the changes: (+13 -11) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.108 llvm/lib/VMCore/AsmWriter.cpp:1.109 --- llvm/lib/VMCore/AsmWriter.cpp:1.108 Tue Nov 11 16:41:34 2003 +++ llvm/lib/VMCore/AsmWriter.cpp Sun Nov 16 16:59:57 2003 @@ -748,18 +748,20 @@ Out << ""; } - // Output predecessors for the block... - Out << "\t\t;"; - pred_const_iterator PI = pred_begin(BB), PE = pred_end(BB); - - if (PI == PE) { - Out << " No predecessors!"; - } else { - Out << " preds ="; - writeOperand(*PI, false, true); - for (++PI; PI != PE; ++PI) { - Out << ","; + if (BB != &BB->getParent()->front()) { // Not the entry block? + // Output predecessors for the block... + Out << "\t\t;"; + pred_const_iterator PI = pred_begin(BB), PE = pred_end(BB); + + if (PI == PE) { + Out << " No predecessors!"; + } else { + Out << " preds ="; writeOperand(*PI, false, true); + for (++PI; PI != PE; ++PI) { + Out << ","; + writeOperand(*PI, false, true); + } } } From gaeke at cs.uiuc.edu Sun Nov 16 17:08:02 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 17:08:02 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/Linker.cpp Message-ID: <200311162307.RAA25326@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccld: Linker.cpp updated: 1.16 -> 1.17 --- Log message: When we find a module we want, in an archive, in verbose mode, print out the module's identifier (which should now contain the name of both the archive and the module.) Wrap some lines at 80 cols. --- Diffs of the changes: (+13 -6) Index: llvm/tools/gccld/Linker.cpp diff -u llvm/tools/gccld/Linker.cpp:1.16 llvm/tools/gccld/Linker.cpp:1.17 --- llvm/tools/gccld/Linker.cpp:1.16 Tue Nov 11 16:41:34 2003 +++ llvm/tools/gccld/Linker.cpp Sun Nov 16 17:07:13 2003 @@ -205,7 +205,9 @@ E = UndefinedSymbols.end(); I != E; ++I) if (DefSymbols.count(*I)) { if (Verbose) - std::cerr << " Found object providing symbol '" << *I << "'...\n"; + std::cerr << " Found object '" + << Objects[i]->getModuleIdentifier () + << "' providing symbol '" << *I << "'...\n"; ObjectRequired = true; break; } @@ -377,7 +379,8 @@ // we're doing a native link and give an error if we're doing a bytecode // link. if (!Native) { - PrintAndReturn(progname, "Cannot find library -l" + Libraries[i] + "\n"); + PrintAndReturn(progname, "Cannot find library -l" + Libraries[i] + + "\n"); return true; } } @@ -386,20 +389,24 @@ // is not installed as a library. Detect that and link the library. if (IsArchive(Pathname)) { if (Verbose) - std::cerr << "Trying to link archive '" << Pathname << "' (-l" << Libraries[i] << ")\n"; + std::cerr << "Trying to link archive '" << Pathname << "' (-l" + << Libraries[i] << ")\n"; if (LinkInArchive(HeadModule, Pathname, ErrorMessage, Verbose)) { PrintAndReturn(progname, ErrorMessage, - ": Error linking in archive '" + Pathname + "' (-l" + Libraries[i] + ")"); + ": Error linking in archive '" + Pathname + + "' (-l" + Libraries[i] + ")"); return true; } } else if (IsBytecode(Pathname)) { if (Verbose) - std::cerr << "Trying to link bytecode file '" << Pathname << "' (-l" << Libraries[i] << ")\n"; + std::cerr << "Trying to link bytecode file '" << Pathname + << "' (-l" << Libraries[i] << ")\n"; if (LinkInFile(HeadModule, Pathname, ErrorMessage, Verbose)) { PrintAndReturn(progname, ErrorMessage, - ": error linking in bytecode file '" + Pathname + "' (-l" + Libraries[i] + ")"); + ": error linking in bytecode file '" + Pathname + + "' (-l" + Libraries[i] + ")"); return true; } } From gaeke at cs.uiuc.edu Sun Nov 16 17:08:22 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 17:08:22 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200311162307.RAA25321@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.68 -> 1.69 --- Log message: When failing a Verifier assertion, use WriteAsOperand to print out the offending types and/or values. --- Diffs of the changes: (+7 -5) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.68 llvm/lib/VMCore/Verifier.cpp:1.69 --- llvm/lib/VMCore/Verifier.cpp:1.68 Thu Nov 13 13:47:29 2003 +++ llvm/lib/VMCore/Verifier.cpp Sun Nov 16 17:07:42 2003 @@ -40,6 +40,7 @@ //===----------------------------------------------------------------------===// #include "llvm/Analysis/Verifier.h" +#include "llvm/Assembly/Writer.h" #include "llvm/Pass.h" #include "llvm/Module.h" #include "llvm/DerivedTypes.h" @@ -65,7 +66,7 @@ bool Broken; // Is this module found to be broken? bool RealPass; // Are we not being run by a PassManager? bool AbortBroken; // If broken, should it or should it not abort? - + Module *Mod; // Module we are verifying right now DominatorSet *DS; // Dominator set, caution can be null! Verifier() : Broken(false), RealPass(true), AbortBroken(true), DS(0) {} @@ -75,6 +76,7 @@ bool doInitialization(Module &M) { + Mod = &M; verifySymbolTable(M.getSymbolTable()); // If this is a real pass, in a pass manager, we must abort before @@ -161,10 +163,10 @@ const Value *V1 = 0, const Value *V2 = 0, const Value *V3 = 0, const Value *V4 = 0) { std::cerr << Message << "\n"; - if (V1) std::cerr << *V1 << "\n"; - if (V2) std::cerr << *V2 << "\n"; - if (V3) std::cerr << *V3 << "\n"; - if (V4) std::cerr << *V4 << "\n"; + if (V1) { WriteAsOperand (std::cerr, V1, true, true, Mod); std::cerr << "\n"; } + if (V2) { WriteAsOperand (std::cerr, V2, true, true, Mod); std::cerr << "\n"; } + if (V3) { WriteAsOperand (std::cerr, V3, true, true, Mod); std::cerr << "\n"; } + if (V4) { WriteAsOperand (std::cerr, V4, true, true, Mod); std::cerr << "\n"; } Broken = true; } }; From gaeke at cs.uiuc.edu Sun Nov 16 17:08:40 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 17:08:40 2003 Subject: [llvm-commits] CVS: llvm/tools/gccld/GenerateCode.cpp Message-ID: <200311162307.RAA25310@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccld: GenerateCode.cpp updated: 1.13 -> 1.14 --- Log message: Add a -verify option to verify the results of gccld passes. Add a -disable-opt option to turn off gccld optimization passes. --- Diffs of the changes: (+68 -48) Index: llvm/tools/gccld/GenerateCode.cpp diff -u llvm/tools/gccld/GenerateCode.cpp:1.13 llvm/tools/gccld/GenerateCode.cpp:1.14 --- llvm/tools/gccld/GenerateCode.cpp:1.13 Tue Nov 11 16:41:34 2003 +++ llvm/tools/gccld/GenerateCode.cpp Sun Nov 16 17:07:28 2003 @@ -17,6 +17,7 @@ #include "llvm/Module.h" #include "llvm/PassManager.h" #include "llvm/Analysis/LoadValueNumbering.h" +#include "llvm/Analysis/Verifier.h" #include "llvm/Bytecode/WriteBytecodePass.h" #include "llvm/Target/TargetData.h" #include "llvm/Transforms/IPO.h" @@ -30,10 +31,25 @@ namespace { cl::opt DisableInline("disable-inlining", cl::desc("Do not run the inliner pass")); + + cl::opt + Verify("verify", cl::desc("Verify intermediate results of all passes")); + + cl::opt + DisableOptimizations("disable-opt", + cl::desc("Do not run any optimization passes")); } namespace llvm { +static inline void addPass(PassManager &PM, Pass *P) { + // Add the pass to the pass manager... + PM.add(P); + + // If we are verifying all of the intermediate steps, add the verifier... + if (Verify) PM.add(createVerifierPass()); +} + /// GenerateBytecode - generates a bytecode file from the specified module. /// /// Inputs: @@ -53,60 +69,64 @@ // a little bit. Do this now. PassManager Passes; - // Add an appropriate TargetData instance for this module... - Passes.add(new TargetData("gccld", M)); + if (Verify) Passes.add(createVerifierPass()); - // Linking modules together can lead to duplicated global constants, only keep - // one copy of each constant... - Passes.add(createConstantMergePass()); - - // If the -s command line option was specified, strip the symbols out of the - // resulting program to make it smaller. -s is a GCC option that we are - // supporting. - if (Strip) - Passes.add(createSymbolStrippingPass()); - - // Often if the programmer does not specify proper prototypes for the - // functions they are calling, they end up calling a vararg version of the - // function that does not get a body filled in (the real function has typed - // arguments). This pass merges the two functions. - Passes.add(createFunctionResolvingPass()); - - if (Internalize) { - // Now that composite has been compiled, scan through the module, looking - // for a main function. If main is defined, mark all other functions - // internal. - Passes.add(createInternalizePass()); - } - - // Propagate constants at call sites into the functions they call. - Passes.add(createIPConstantPropagationPass()); - - // Remove unused arguments from functions... - Passes.add(createDeadArgEliminationPass()); - - if (!DisableInline) - Passes.add(createFunctionInliningPass()); // Inline small functions - - // Run a few AA driven optimizations here and now, to cleanup the code. - // Eventually we should put an IP AA in place here. - - Passes.add(createLICMPass()); // Hoist loop invariants - Passes.add(createLoadValueNumberingPass()); // GVN for load instructions - Passes.add(createGCSEPass()); // Remove common subexprs + // Add an appropriate TargetData instance for this module... + addPass (Passes, new TargetData("gccld", M)); - // The FuncResolve pass may leave cruft around if functions were prototyped - // differently than they were defined. Remove this cruft. - Passes.add(createInstructionCombiningPass()); + if (!DisableOptimizations) { + // Linking modules together can lead to duplicated global constants, only + // keep one copy of each constant... + addPass (Passes, createConstantMergePass()); + + // If the -s command line option was specified, strip the symbols out of the + // resulting program to make it smaller. -s is a GCC option that we are + // supporting. + if (Strip) + addPass (Passes, createSymbolStrippingPass()); + + // Often if the programmer does not specify proper prototypes for the + // functions they are calling, they end up calling a vararg version of the + // function that does not get a body filled in (the real function has typed + // arguments). This pass merges the two functions. + addPass (Passes, createFunctionResolvingPass()); + + if (Internalize) { + // Now that composite has been compiled, scan through the module, looking + // for a main function. If main is defined, mark all other functions + // internal. + addPass (Passes, createInternalizePass()); + } + + // Propagate constants at call sites into the functions they call. + addPass (Passes, createIPConstantPropagationPass()); + + // Remove unused arguments from functions... + addPass (Passes, createDeadArgEliminationPass()); + + if (!DisableInline) + addPass (Passes, createFunctionInliningPass()); // Inline small functions + + // Run a few AA driven optimizations here and now, to cleanup the code. + // Eventually we should put an IP AA in place here. + + addPass (Passes, createLICMPass()); // Hoist loop invariants + addPass (Passes, createLoadValueNumberingPass()); // GVN for load instrs + addPass (Passes, createGCSEPass()); // Remove common subexprs + + // The FuncResolve pass may leave cruft around if functions were prototyped + // differently than they were defined. Remove this cruft. + addPass (Passes, createInstructionCombiningPass()); - // Delete basic blocks, which optimization passes may have killed... - Passes.add(createCFGSimplificationPass()); + // Delete basic blocks, which optimization passes may have killed... + addPass (Passes, createCFGSimplificationPass()); - // Now that we have optimized the program, discard unreachable functions... - Passes.add(createGlobalDCEPass()); + // Now that we have optimized the program, discard unreachable functions... + addPass (Passes, createGlobalDCEPass()); + } // Add the pass that writes bytecode to the output file... - Passes.add(new WriteBytecodePass(Out)); + addPass (Passes, new WriteBytecodePass(Out)); // Run our queue of passes all at once now, efficiently. Passes.run(*M); From gaeke at cs.uiuc.edu Sun Nov 16 17:09:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 17:09:01 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200311162308.RAA25344@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.109 -> 1.110 --- Log message: When you hand WriteAsOperand a type, it now prints out its symbolic name. --- Diffs of the changes: (+3 -0) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.109 llvm/lib/VMCore/AsmWriter.cpp:1.110 --- llvm/lib/VMCore/AsmWriter.cpp:1.109 Sun Nov 16 16:59:57 2003 +++ llvm/lib/VMCore/AsmWriter.cpp Sun Nov 16 17:08:27 2003 @@ -458,6 +458,9 @@ if (PrintType) printTypeInt(Out, V->getType(), TypeNames); + if (const Type *Ty = dyn_cast (V)) + printTypeInt(Out, Ty, TypeNames); + WriteAsOperandInternal(Out, V, PrintName, TypeNames, 0); return Out; } From gaeke at cs.uiuc.edu Sun Nov 16 17:09:18 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 17:09:18 2003 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Reader/ArchiveReader.cpp Message-ID: <200311162308.RAA25359@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Reader: ArchiveReader.cpp updated: 1.8 -> 1.9 --- Log message: Implement skeletal support for __.SYMDEF (ranlib) sections in archives. Correctly parse the Long Filename section of the archive. When reading in archive members, set their ModuleIDs to "ARCHIVENAME(MEMBERNAME)", as is traditional. --- Diffs of the changes: (+35 -10) Index: llvm/lib/Bytecode/Reader/ArchiveReader.cpp diff -u llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.8 llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.9 --- llvm/lib/Bytecode/Reader/ArchiveReader.cpp:1.8 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Bytecode/Reader/ArchiveReader.cpp Sun Nov 16 17:08:48 2003 @@ -21,6 +21,7 @@ #include "Config/sys/stat.h" #include "Config/sys/mman.h" #include "Config/fcntl.h" +#include namespace llvm { @@ -39,6 +40,7 @@ UserObject, // A user .o/.bc file Unknown, // Unknown file, just ignore it SVR4LongFilename, // a "//" section used for long file names + ArchiveSymbolTable, // Symbol table produced by ranlib. }; } @@ -47,6 +49,8 @@ // purposes. static enum ObjectType getObjectType(ar_hdr *H, unsigned Size) { // Check for sections with special names... + if (!memcmp(H->name, "__.SYMDEF ", 16)) + return ArchiveSymbolTable; if (!memcmp(H->name, "// ", 16)) return SVR4LongFilename; @@ -89,8 +93,13 @@ return false; } +static bool ParseSymbolTableSection(unsigned char *Buffer, unsigned Size, + std::string *S) { + // Currently not supported (succeeds without doing anything) + return false; +} -static bool ReadArchiveBuffer(const std::string &Filename, +static bool ReadArchiveBuffer(const std::string &ArchiveName, unsigned char *Buffer, unsigned Length, std::vector &Objects, std::string *ErrorStr) { @@ -98,7 +107,7 @@ return Error(ErrorStr, "signature incorrect for an archive file!"); Buffer += 8; Length -= 8; // Skip the magic string. - std::vector LongFilenames; + std::vector LongFilenames; while (Length >= sizeof(ar_hdr)) { ar_hdr *Hdr = (ar_hdr*)Buffer; @@ -106,25 +115,41 @@ if (Size+sizeof(ar_hdr) > Length) return Error(ErrorStr, "invalid record length in archive file!"); + // Get name of archive member. + char *startp = Hdr->name; + char *endp = strchr (startp, '/'); + if (startp == endp && isdigit (Hdr->name[1])) { + // Long filenames are abbreviated as "/I", where I is a decimal + // index into the LongFilenames vector. + unsigned Index = atoi (&Hdr->name[1]); + assert (LongFilenames.size () > Index + && "Long filename for archive member not found"); + startp = &LongFilenames[Index]; + endp = strchr (startp, '/'); + } + std::string MemberName (startp, endp); + std::string FullMemberName = ArchiveName + "(" + MemberName + ")"; + switch (getObjectType(Hdr, Size)) { case SVR4LongFilename: // If this is a long filename section, read all of the file names into the // LongFilenames vector. - // - if (ParseLongFilenameSection(Buffer+sizeof(ar_hdr), Size, - LongFilenames, ErrorStr)) - return true; + LongFilenames.assign (Buffer+sizeof(ar_hdr), Buffer+sizeof(ar_hdr)+Size); break; case UserObject: { Module *M = ParseBytecodeBuffer(Buffer+sizeof(ar_hdr), Size, - Filename+":somefile", ErrorStr); + FullMemberName, ErrorStr); if (!M) return true; Objects.push_back(M); break; } - case Unknown: - std::cerr << "ReadArchiveBuffer: WARNING: Skipping unknown file: "; - std::cerr << std::string(Hdr->name, Hdr->name+sizeof(Hdr->name+1)) <<"\n"; + case ArchiveSymbolTable: + if (ParseSymbolTableSection(Buffer+sizeof(ar_hdr), Size, ErrorStr)) + return true; + break; + default: + std::cerr << "ReadArchiveBuffer: WARNING: Skipping unknown file: " + << FullMemberName << "\n"; break; // Just ignore unknown files. } From gaeke at cs.uiuc.edu Sun Nov 16 17:35:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 17:35:01 2003 Subject: [llvm-commits] CVS: llvm/tools/llvm-nm/llvm-nm.cpp Message-ID: <200311162334.RAA00624@gally.cs.uiuc.edu> Changes in directory llvm/tools/llvm-nm: llvm-nm.cpp updated: 1.7 -> 1.8 --- Log message: Include Support/FileUtilities.h. Print module identifier in DumpSymbolNamesFromModule(). In DumpSymbolNamesFromFile(), check whether it is an archive or a bytecode file, and call the corresponding reader function (ParseBytecodeFile or ReadArchiveFile). Unconditionally set MultipleFiles for archives. Fixes PR117. --- Diffs of the changes: (+24 -13) Index: llvm/tools/llvm-nm/llvm-nm.cpp diff -u llvm/tools/llvm-nm/llvm-nm.cpp:1.7 llvm/tools/llvm-nm/llvm-nm.cpp:1.8 --- llvm/tools/llvm-nm/llvm-nm.cpp:1.7 Tue Nov 11 16:41:34 2003 +++ llvm/tools/llvm-nm/llvm-nm.cpp Sun Nov 16 17:34:13 2003 @@ -19,6 +19,7 @@ #include "llvm/Module.h" #include "llvm/Bytecode/Reader.h" #include "Support/CommandLine.h" +#include "Support/FileUtilities.h" #include using namespace llvm; @@ -96,26 +97,36 @@ } void DumpSymbolNamesFromModule (Module *M) { + const std::string &Filename = M->getModuleIdentifier (); + if (OutputFormat == posix && MultipleFiles) { + std::cout << Filename << ":\n"; + } else if (OutputFormat == bsd && MultipleFiles) { + std::cout << "\n" << Filename << ":\n"; + } else if (OutputFormat == sysv) { + std::cout << "\n\nSymbols from " << Filename << ":\n\n" + << "Name Value Class Type" + << " Size Line Section\n"; + } std::for_each (M->begin (), M->end (), DumpSymbolNameForGlobalValue); std::for_each (M->gbegin (), M->gend (), DumpSymbolNameForGlobalValue); } void DumpSymbolNamesFromFile (std::string &Filename) { std::string ErrorMessage; - Module *Result = ParseBytecodeFile(Filename, &ErrorMessage); - if (Result) { - if (OutputFormat == posix && MultipleFiles) { - std::cout << Filename << ":\n"; - } else if (OutputFormat == bsd && MultipleFiles) { - std::cout << "\n" << Filename << ":\n"; - } else if (OutputFormat == sysv) { - std::cout << "\n\nSymbols from " << Filename << ":\n\n" - << "Name Value Class Type" - << " Size Line Section\n"; + if (IsBytecode (Filename)) { + Module *Result = ParseBytecodeFile(Filename, &ErrorMessage); + if (Result) { + DumpSymbolNamesFromModule (Result); + } else { + std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n"; } - DumpSymbolNamesFromModule (Result); - } else { - std::cerr << ToolName << ": " << Filename << ": " << ErrorMessage << "\n"; + } else if (IsArchive (Filename)) { + std::vector Modules; + if (ReadArchiveFile (Filename, Modules, &ErrorMessage)) + std::cerr << ToolName << ": " << Filename << ": " + << ErrorMessage << "\n"; + MultipleFiles = true; + std::for_each (Modules.begin (), Modules.end (), DumpSymbolNamesFromModule); } } From gaeke at cs.uiuc.edu Sun Nov 16 17:40:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 17:40:01 2003 Subject: [llvm-commits] CVS: llvm/docs/CommandGuide/gccld.html Message-ID: <200311162339.RAA00668@gally.cs.uiuc.edu> Changes in directory llvm/docs/CommandGuide: gccld.html updated: 1.7 -> 1.8 --- Log message: Document -disable-opt option that I added. --- Diffs of the changes: (+5 -0) Index: llvm/docs/CommandGuide/gccld.html diff -u llvm/docs/CommandGuide/gccld.html:1.7 llvm/docs/CommandGuide/gccld.html:1.8 --- llvm/docs/CommandGuide/gccld.html:1.7 Tue Oct 7 15:12:04 2003 +++ llvm/docs/CommandGuide/gccld.html Sun Nov 16 17:39:11 2003 @@ -101,6 +101,11 @@ Verify each pass result.

    +

  • -disable-opt +
    + Disable all link-time optimization passes. +

    +

  • -L=<directory>
    Add directory to the list of directories to search when looking for From gaeke at cs.uiuc.edu Sun Nov 16 17:50:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 17:50:01 2003 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200311162349.RAA00831@gally.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.48 -> 1.49 --- Log message: add PR117 --- Diffs of the changes: (+4 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.48 llvm/docs/ReleaseNotes.html:1.49 --- llvm/docs/ReleaseNotes.html:1.48 Sun Nov 16 16:11:42 2003 +++ llvm/docs/ReleaseNotes.html Sun Nov 16 17:49:26 2003 @@ -88,6 +88,9 @@
  • Interpreter does not support the vaarg instruction
  • +

  • llvm-nm cannot read archive +files
  • +

    In this release, the following Quality of Implementation issues were fixed:

    @@ -450,6 +453,6 @@ Maintained By: The LLVM Team
    -Last modified: Sun Nov 16 16:11:04 CST 2003 +Last modified: Sun Nov 16 17:46:25 CST 2003 From gaeke at cs.uiuc.edu Sun Nov 16 17:54:00 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 17:54:00 2003 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200311162353.RAA00896@gally.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.34 -> 1.35 --- Log message: add PR117 --- Diffs of the changes: (+3 -1) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.34 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.35 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.34 Sun Nov 16 16:11:44 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Sun Nov 16 17:53:01 2003 @@ -172,6 +172,8 @@

  • Interpreter does not support the vaarg instruction
  • +

  • llvm-nm cannot read archive +files
  • Bugs in 1.0 fixed in 1.1:

      @@ -508,6 +510,6 @@ Maintained By: The LLVM Team
      -Last modified: Sun Nov 16 16:10:29 CST 2003 +Last modified: Sun Nov 16 17:51:47 CST 2003 From gaeke at cs.uiuc.edu Sun Nov 16 18:31:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 18:31:01 2003 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200311170030.SAA12409@gally.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.54 -> 1.55 --- Log message: Edit some comments slightly. Set OS (build OS) and ARCH (target arch) based on the proper elements (SYSTEM, and CPU, respectively) of the CPU-COMPANY-SYSTEM tuples. Add OS and ARCH settings for PowerPC/Darwin (Mac OS X). --- Diffs of the changes: (+17 -13) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.54 llvm/autoconf/configure.ac:1.55 --- llvm/autoconf/configure.ac:1.54 Sun Nov 16 12:37:46 2003 +++ llvm/autoconf/configure.ac Sun Nov 16 18:30:48 2003 @@ -245,48 +245,52 @@ dnl compiler will be used for compiling SSA into object code. AC_CANONICAL_TARGET -dnl -dnl Now, for some of our own magic: +dnl Set the "OS" Makefile variable based on the system we are building on. dnl We will use the build machine information to set some variables. -dnl case $build in - *i*86*) AC_SUBST(OS,[Linux]) + *-*-linux*) + AC_SUBST(OS,[Linux]) if test -d /home/vadve/lattner/local/x86/llvm-gcc then AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/x86/llvm-gcc/]) fi ;; - *sparc*) AC_SUBST(OS,[SunOS]) + *-*-solaris*) + AC_SUBST(OS,[SunOS]) if test -d /home/vadve/lattner/local/sparc/llvm-gcc then AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/sparc/llvm-gcc/]) fi ;; + *-*-darwin*) + AC_SUBST(OS,[Darwin]) + ;; + *) AC_SUBST(OS,[Unknown]) ;; esac -dnl dnl If we are targetting a Sparc machine running Solaris, pretend that it is dnl V9, since that is all that we support at the moment, and autoconf will only dnl tell us we're a sparc. -dnl case $target in - *sparc*solaris*) AC_SUBST(target,[[sparcv9-sun-solaris2.8]]) - ;; + sparc*-*-solaris*) AC_SUBST(target,[[sparcv9-sun-solaris2.8]]) + ;; esac -dnl dnl Determine what our target architecture is and configure accordingly. dnl This will allow Makefiles to make a distinction between the hardware and dnl the OS. -dnl case $target in - *i*86*) AC_SUBST(ARCH,[x86]) + i*86-*) AC_SUBST(ARCH,[x86]) + ;; + sparc*-*) AC_SUBST(ARCH,[Sparc]) + ;; + powerpc*-*) AC_SUBST(ARCH,[PowerPC]) ;; - *sparc*solaris*) AC_SUBST(ARCH,[Sparc]) + *) AC_SUBST(ARCH,[Unknown]) ;; esac From gaeke at cs.uiuc.edu Sun Nov 16 18:32:01 2003 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Nov 16 18:32:01 2003 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200311170031.SAA12483@gally.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.53 -> 1.54 --- Log message: Regenerated using autoconf-2.57. --- Diffs of the changes: (+47 -34) Index: llvm/configure diff -u llvm/configure:1.53 llvm/configure:1.54 --- llvm/configure:1.53 Sun Nov 16 12:38:14 2003 +++ llvm/configure Sun Nov 16 18:31:43 2003 @@ -2269,7 +2269,8 @@ program_prefix=${target_alias}- case $build in - *i*86*) OS=Linux + *-*-linux*) + OS=Linux if test -d /home/vadve/lattner/local/x86/llvm-gcc then @@ -2278,7 +2279,8 @@ fi ;; - *sparc*) OS=SunOS + *-*-solaris*) + OS=SunOS if test -d /home/vadve/lattner/local/sparc/llvm-gcc then @@ -2287,22 +2289,33 @@ fi ;; + *-*-darwin*) + OS=Darwin + + ;; + *) OS=Unknown ;; esac case $target in - *sparc*solaris*) target=sparcv9-sun-solaris2.8 + sparc*-*-solaris*) target=sparcv9-sun-solaris2.8 - ;; + ;; esac case $target in - *i*86*) ARCH=x86 + i*86-*) ARCH=x86 + + ;; + sparc*-*) ARCH=Sparc + + ;; + powerpc*-*) ARCH=PowerPC ;; - *sparc*solaris*) ARCH=Sparc + *) ARCH=Unknown ;; esac @@ -4458,7 +4471,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4461 "configure"' > conftest.$ac_ext + echo '#line 4474 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5299,7 +5312,7 @@ # Provide some information about the compiler. -echo "$as_me:5302:" \ +echo "$as_me:5315:" \ "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 @@ -6308,11 +6321,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6311: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6324: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6315: \$? = $ac_status" >&5 + echo "$as_me:6328: \$? = $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 @@ -6540,11 +6553,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6543: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6556: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6547: \$? = $ac_status" >&5 + echo "$as_me:6560: \$? = $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 @@ -6607,11 +6620,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6610: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6623: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6614: \$? = $ac_status" >&5 + echo "$as_me:6627: \$? = $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 @@ -8619,7 +8632,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:10869: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10860: \$? = $ac_status" >&5 + echo "$as_me:10873: \$? = $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 @@ -10920,11 +10933,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10923: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10936: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10927: \$? = $ac_status" >&5 + echo "$as_me:10940: \$? = $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 @@ -12163,7 +12176,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:13099: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13090: \$? = $ac_status" >&5 + echo "$as_me:13103: \$? = $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 @@ -13150,11 +13163,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13153: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13166: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13157: \$? = $ac_status" >&5 + echo "$as_me:13170: \$? = $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 @@ -15094,11 +15107,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15097: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15110: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15101: \$? = $ac_status" >&5 + echo "$as_me:15114: \$? = $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 @@ -15326,11 +15339,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15329: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15342: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15333: \$? = $ac_status" >&5 + echo "$as_me:15346: \$? = $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 @@ -15393,11 +15406,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15396: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15409: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15400: \$? = $ac_status" >&5 + echo "$as_me:15413: \$? = $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 @@ -17405,7 +17418,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/include/Support: ilist updated: 1.15 -> 1.16 --- Log message: Fix copy-and-pasteo --- Diffs of the changes: (+1 -1) Index: llvm/include/Support/ilist diff -u llvm/include/Support/ilist:1.15 llvm/include/Support/ilist:1.16 --- llvm/include/Support/ilist:1.15 Tue Nov 11 16:41:29 2003 +++ llvm/include/Support/ilist Sun Nov 16 19:07:58 2003 @@ -280,7 +280,7 @@ Head = NextNode; setPrev(NextNode, PrevNode); IT = NextNode; - removeNodeFromList(Node); // Notify traits that we added a node... + removeNodeFromList(Node); // Notify traits that we removed a node... return Node; } From lattner at cs.uiuc.edu Sun Nov 16 19:18:01 2003 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Nov 16 19:18:01 2003 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200311170117.TAA13916@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.110 -> 1.111 --- Log message: Be a bit more tolerant of broken code --- Diffs of the changes: (+3 -3) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.110 llvm/lib/VMCore/AsmWriter.cpp:1.111 --- llvm/lib/VMCore/AsmWriter.cpp:1.110 Sun Nov 16 17:08:27 2003 +++ llvm/lib/VMCore/AsmWriter.cpp Sun Nov 16 19:17:04 2003 @@ -912,15 +912,15 @@ writeOperand(AI->getArraySize(), true); } } else if (isa(I)) { - writeOperand(Operand, true); + if (Operand) writeOperand(Operand, true); // Work with broken code Out << " to "; printType(I.getType()); } else if (isa(I)) { - writeOperand(Operand, true); + if (Operand) writeOperand(Operand, true); // Work with broken code Out << ", "; printType(I.getType()); } else if (const VANextInst *VAN = dyn_cast(&I)) { - writeOperand(Operand, true); + if (Operand) writeOperand(Operand, true); // Work with broken code Out << ", "; printType(VAN->getArgType()); } else if (Operand) { // Print the normal way...