[llvm-commits] [llvm] r40837 - in /llvm/trunk: include/llvm/ADT/DenseMap.h include/llvm/ADT/SmallPtrSet.h lib/Support/SmallPtrSet.cpp
Author: lattner Date: Sun Aug 5 02:32:14 2007 New Revision: 40837 URL: http://llvm.org/viewvc/llvm-project?rev=40837&view=rev Log: When clearing a SmallPtrSet, if the set had a huge capacity, but the contents of the set were small, deallocate and shrink the set. This avoids having us to memset as much data, significantly speeding up some pathological cases. For example, this speeds up the verifier from 0.3899s to 0.0763 (5.1x) on the testcase from PR1432 in a release build. Modified: llvm/trunk/include/llvm/ADT/DenseMap.h llvm/trunk/include/llvm/ADT/SmallPtrSet.h llvm/trunk/lib/Support/SmallPtrSet.cpp Modified: llvm/trunk/include/llvm/ADT/DenseMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=40837&r1=40836&r2=40837&view=diff == --- llvm/trunk/include/llvm/ADT/DenseMap.h (original) +++ llvm/trunk/include/llvm/ADT/DenseMap.h Sun Aug 5 02:32:14 2007 @@ -91,6 +91,8 @@ unsigned size() const { return NumEntries; } void clear() { +// If the capacity of the array is huge, and the # elements used is small, +// shrink the array. if (NumEntries * 4 < NumBuckets && NumBuckets > 64) { shrink_and_clear(); return; Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=40837&r1=40836&r2=40837&view=diff == --- llvm/trunk/include/llvm/ADT/SmallPtrSet.h (original) +++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h Sun Aug 5 02:32:14 2007 @@ -80,6 +80,11 @@ } void clear() { +// If the capacity of the array is huge, and the # elements used is small, +// shrink the array. +if (!isSmall() && NumElements*4 < CurArraySize && CurArraySize > 32) + return shrink_and_clear(); + // Fill the array with empty markers. memset(CurArray, -1, CurArraySize*sizeof(void*)); NumElements = 0; @@ -103,8 +108,8 @@ bool count(void * const Ptr) const { if (isSmall()) { // Linear search for the item. - for (const void *const *APtr = SmallArray, *const *E = SmallArray+NumElements; - APtr != E; ++APtr) + for (const void *const *APtr = SmallArray, + *const *E = SmallArray+NumElements; APtr != E; ++APtr) if (*APtr == Ptr) return true; return false; @@ -121,6 +126,7 @@ return ((uintptr_t)Ptr >> 4) & (CurArraySize-1); } const void * const *FindBucketFor(const void *Ptr) const; + void shrink_and_clear(); /// Grow - Allocate a larger backing store for the buckets and move it over. void Grow(); Modified: llvm/trunk/lib/Support/SmallPtrSet.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/SmallPtrSet.cpp?rev=40837&r1=40836&r2=40837&view=diff == --- llvm/trunk/lib/Support/SmallPtrSet.cpp (original) +++ llvm/trunk/lib/Support/SmallPtrSet.cpp Sun Aug 5 02:32:14 2007 @@ -18,6 +18,24 @@ using namespace llvm; +void SmallPtrSetImpl::shrink_and_clear() { + assert(!isSmall() && "Can't shrink a small set!"); + free(CurArray); + + // Reduce the number of buckets. + CurArraySize = NumElements > 16 ? 1 << (Log2_32_Ceil(NumElements) + 1) : 32; + NumElements = NumTombstones = 0; + + // Install the new array. Clear all the buckets to empty. + CurArray = (const void**)malloc(sizeof(void*) * (CurArraySize+1)); + assert(CurArray && "Failed to allocate memory?"); + memset(CurArray, -1, CurArraySize*sizeof(void*)); + + // The end pointer, always valid, is set to a valid element to help the + // iterator. + CurArray[CurArraySize] = 0; +} + bool SmallPtrSetImpl::insert(const void * Ptr) { if (isSmall()) { // Check to see if it is already in the set. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40838 - /llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Author: lattner Date: Sun Aug 5 02:50:06 2007 New Revision: 40838 URL: http://llvm.org/viewvc/llvm-project?rev=40838&view=rev Log: Upgrade BasicAliasAnalysis::getModRefBehavior to not call Value::getName, which dynamically allocates the string result. This speeds up dse on the testcase from PR1432 from 0.3781s to 0.1804s (2.1x). Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=40838&r1=40837&r2=40838&view=diff == --- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original) +++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Sun Aug 5 02:50:06 2007 @@ -24,6 +24,7 @@ #include "llvm/Pass.h" #include "llvm/Target/TargetData.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/ADT/StringMap.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/GetElementPtrTypeIterator.h" #include "llvm/Support/ManagedStatic.h" @@ -900,17 +901,26 @@ StringCompare()); Initialized = true; } + + ValueName *Name = F->getValueName(); + unsigned NameLen = Name->getKeyLength(); + const char *NamePtr = Name->getKeyData(); + + // If there is an embedded nul character in the function name, we can never + // match it. + if (strlen(NamePtr) != NameLen) +return UnknownModRefBehavior; std::vector::iterator Ptr = std::lower_bound(NoMemoryTable->begin(), NoMemoryTable->end(), - F->getName().c_str(), StringCompare()); - if (Ptr != NoMemoryTable->end() && *Ptr == F->getName()) + NamePtr, StringCompare()); + if (Ptr != NoMemoryTable->end() && strcmp(*Ptr, NamePtr) == 0) return DoesNotAccessMemory; Ptr = std::lower_bound(OnlyReadsMemoryTable->begin(), OnlyReadsMemoryTable->end(), - F->getName().c_str(), StringCompare()); - if (Ptr != OnlyReadsMemoryTable->end() && *Ptr == F->getName()) + NamePtr, StringCompare()); + if (Ptr != OnlyReadsMemoryTable->end() && strcmp(*Ptr, NamePtr) == 0) return OnlyReadsMemory; return UnknownModRefBehavior; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40839 - /llvm/trunk/include/llvm/ADT/DenseMap.h
Author: lattner Date: Sun Aug 5 03:43:36 2007 New Revision: 40839 URL: http://llvm.org/viewvc/llvm-project?rev=40839&view=rev Log: Fix a bug in DenseMap::clear, where we never reset a tombstone to EmptyKey. Modified: llvm/trunk/include/llvm/ADT/DenseMap.h Modified: llvm/trunk/include/llvm/ADT/DenseMap.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=40839&r1=40838&r2=40839&view=diff == --- llvm/trunk/include/llvm/ADT/DenseMap.h (original) +++ llvm/trunk/include/llvm/ADT/DenseMap.h Sun Aug 5 03:43:36 2007 @@ -100,10 +100,12 @@ const KeyT EmptyKey = getEmptyKey(), TombstoneKey = getTombstoneKey(); for (BucketT *P = Buckets, *E = Buckets+NumBuckets; P != E; ++P) { - if (P->first != EmptyKey && P->first != TombstoneKey) { + if (P->first != EmptyKey) { +if (P->first != TombstoneKey) { + P->second.~ValueT(); + --NumEntries; +} P->first = EmptyKey; -P->second.~ValueT(); ---NumEntries; } } assert(NumEntries == 0 && "Node count imbalance!"); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40840 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Author: lattner Date: Sun Aug 5 03:47:58 2007 New Revision: 40840 URL: http://llvm.org/viewvc/llvm-project?rev=40840&view=rev Log: at the end of instcombine, explicitly clear WorklistMap. This shrinks it down to something small. On the testcase from PR1432, this speeds up instcombine from 0.7959s to 0.5000s, (59%) Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=40840&r1=40839&r2=40840&view=diff == --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Sun Aug 5 03:47:58 2007 @@ -870,11 +870,10 @@ // could have the specified known zero and known one bits, returning them in // min/max. static void ComputeUnsignedMinMaxValuesFromKnownBits(const Type *Ty, - const APInt& KnownZero, - const APInt& KnownOne, - APInt& Min, - APInt& Max) { - uint32_t BitWidth = cast(Ty)->getBitWidth(); + const APInt &KnownZero, + const APInt &KnownOne, + APInt &Min, APInt &Max) { + uint32_t BitWidth = cast(Ty)->getBitWidth(); BitWidth = BitWidth; assert(KnownZero.getBitWidth() == BitWidth && KnownOne.getBitWidth() == BitWidth && Min.getBitWidth() == BitWidth && Max.getBitWidth() && @@ -1885,7 +1884,7 @@ if (I.getNumOperands() == 2) { Constant *C = cast(I.getOperand(1)); for (unsigned i = 0; i != NumPHIValues; ++i) { - Value *InV; + Value *InV = 0; if (Constant *InC = dyn_cast(PN->getIncomingValue(i))) { if (CmpInst *CI = dyn_cast(&I)) InV = ConstantExpr::getCompare(CI->getPredicate(), InC, C); @@ -4095,7 +4094,7 @@ // xor X, X = 0, even if X is nested in a sequence of Xor's. if (Instruction *Result = AssociativeOpt(I, XorSelf(Op1))) { -assert(Result == &I && "AssociativeOpt didn't work?"); +assert(Result == &I && "AssociativeOpt didn't work?"); Result=Result; return ReplaceInstUsesWith(I, Constant::getNullValue(I.getType())); } @@ -10051,6 +10050,9 @@ } assert(WorklistMap.empty() && "Worklist empty, but map not?"); + + // Do an explicit clear, this shrinks the map if needed. + WorklistMap.clear(); return Changed; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [test-suite] r40841 - in /test-suite/trunk: docs/ docs/index.html website/ website/index.html
Author: reid Date: Sun Aug 5 12:11:57 2007 New Revision: 40841 URL: http://llvm.org/viewvc/llvm-project?rev=40841&view=rev Log: Add placeholders for website and documentation for testing. Added: test-suite/trunk/docs/ test-suite/trunk/docs/index.html test-suite/trunk/website/ test-suite/trunk/website/index.html Added: test-suite/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/docs/index.html?rev=40841&view=auto == --- test-suite/trunk/docs/index.html (added) +++ test-suite/trunk/docs/index.html Sun Aug 5 12:11:57 2007 @@ -0,0 +1,6 @@ + + +LLVM TEST SUITE DOCUMENTATION +This is just a placeholder + + Added: test-suite/trunk/website/index.html URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/website/index.html?rev=40841&view=auto == --- test-suite/trunk/website/index.html (added) +++ test-suite/trunk/website/index.html Sun Aug 5 12:11:57 2007 @@ -0,0 +1,6 @@ + + +LLVM TEST SUITE WEB SITE +This is just a placeholder + + ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [support] r40842 - in /support/trunk: docs/ docs/index.html website/ website/index.html
Author: reid Date: Sun Aug 5 12:13:15 2007 New Revision: 40842 URL: http://llvm.org/viewvc/llvm-project?rev=40842&view=rev Log: Add placeholders for support module's documentation and website. Added: support/trunk/docs/ support/trunk/docs/index.html support/trunk/website/ support/trunk/website/index.html Added: support/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/support/trunk/docs/index.html?rev=40842&view=auto == --- support/trunk/docs/index.html (added) +++ support/trunk/docs/index.html Sun Aug 5 12:13:15 2007 @@ -0,0 +1,6 @@ + + +LLVM SUPPORT DOCUMENTATION +This is just a placeholder + + Added: support/trunk/website/index.html URL: http://llvm.org/viewvc/llvm-project/support/trunk/website/index.html?rev=40842&view=auto == --- support/trunk/website/index.html (added) +++ support/trunk/website/index.html Sun Aug 5 12:13:15 2007 @@ -0,0 +1,6 @@ + + +LLVM SUPPORT WEB SITE +This is just a placeholder + + ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40843 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Author: lattner Date: Sun Aug 5 13:45:33 2007 New Revision: 40843 URL: http://llvm.org/viewvc/llvm-project?rev=40843&view=rev Log: shorten this name Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=40843&r1=40842&r2=40843&view=diff == --- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original) +++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Sun Aug 5 13:45:33 2007 @@ -47,8 +47,7 @@ cl::init(true)); RegisterPass - X("simple-register-coalescing", -"Simple register coalescing to eliminate all possible register copies"); + X("simple-register-coalescing", "Simple Register Coalescing"); } const PassInfo *llvm::SimpleRegisterCoalescingID = X.getPassInfo(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [poolalloc] r40844 - /poolalloc/branches/SVA/lib/DSA/Local.cpp
Author: criswell Date: Sun Aug 5 13:46:18 2007 New Revision: 40844 URL: http://llvm.org/viewvc/llvm-project?rev=40844&view=rev Log: Don't consider kmalloc/kfree as regular allocators. Modified: poolalloc/branches/SVA/lib/DSA/Local.cpp Modified: poolalloc/branches/SVA/lib/DSA/Local.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Local.cpp?rev=40844&r1=40843&r2=40844&view=diff == --- poolalloc/branches/SVA/lib/DSA/Local.cpp (original) +++ poolalloc/branches/SVA/lib/DSA/Local.cpp Sun Aug 5 13:46:18 2007 @@ -1747,13 +1747,17 @@ bool LocalDataStructures::runOnModule(Module &M) { #ifdef LLVA_KERNEL +#if 0 AllocList.push_back("kmalloc"); +#endif AllocList.push_back("__vmalloc"); AllocList.push_back("kmem_cache_alloc"); AllocList.push_back("__alloc_bootmem"); AllocList.push_back(" __get_free_pages"); +#if 0 FreeList.push_back("kfree"); +#endif FreeList.push_back("vfree"); FreeList.push_back("free_pages"); FreeList.push_back("kmem_cache_free"); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [poolalloc] r40845 - /poolalloc/branches/SVA/lib/DSA/Devirt.cpp
Author: criswell Date: Sun Aug 5 13:47:30 2007 New Revision: 40845 URL: http://llvm.org/viewvc/llvm-project?rev=40845&view=rev Log: Modified code so that the indirect call is performed even if there is no matching target. This allows the kernel to print an error message and continue operating when a function check fails. Modified: poolalloc/branches/SVA/lib/DSA/Devirt.cpp Modified: poolalloc/branches/SVA/lib/DSA/Devirt.cpp URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/SVA/lib/DSA/Devirt.cpp?rev=40845&r1=40844&r2=40845&view=diff == --- poolalloc/branches/SVA/lib/DSA/Devirt.cpp (original) +++ poolalloc/branches/SVA/lib/DSA/Devirt.cpp Sun Aug 5 13:47:30 2007 @@ -6,6 +6,7 @@ // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===--===// +#include "llvm/Constants.h" #include "llvm/Transforms/IPO.h" #include "dsa/CallTargets.h" #include "llvm/Pass.h" @@ -23,6 +24,32 @@ using namespace llvm; +// +// Function: castTo() +// +// Description: // Given an LLVM value, insert a cast instruction to make it a given type. +// +static inline Value * +castTo (Value * V, const Type * Ty, Instruction * InsertPt) { // + // Don't bother creating a cast if it's already the correct type. + // + if (V->getType() == Ty) +return V; + + // + // If it's a constant, just create a constant expression. + // + if (Constant * C = dyn_cast(V)) { +Constant * CE = ConstantExpr::getCast (C, Ty); +return CE; + } + + // + // Otherwise, insert a cast instruction. + // + return new CastInst(V, Ty, "cast", InsertPt); +} + namespace { static cl::opt @@ -35,10 +62,23 @@ class Devirtualize : public ModulePass { +Function * IndirectFuncFail; + std::map >, Function*> cache; int fnum; -Function* buildBounce(CallSite cs, std::vector& Targets, Module& M) { +// +// Method: buildBounds() +// +// Description: +// Replaces the given call site with a call to a bound function. The +// bounce function compares the function pointer to one of the given +// target functions and calls the function directly if the pointer +// matches. +Function* buildBounce (CallSite cs, + std::vector& Targets, + Module& M) { + Value* ptr = cs.getCalledValue(); const FunctionType* OrigType = cast(cast(ptr->getType())->getElementType());; @@ -74,17 +114,39 @@ new ReturnInst(call, BL); } - //hookup the test chain + // Create a set of tests that search for the correct function target + // and call it directly. If none of the target functions match, + // call pchk_ind_fail() to note the failure. + + // + // Create the failure basic block. Then, add the following: + // o the terminating instruction + // o the indirect call to the original function + // o a call to phck_ind_fail() + // BasicBlock* tail = new BasicBlock("fail", F, &F->getEntryBlock()); - new CallInst(M.getOrInsertFunction("pchk_ind_fail", Type::VoidTy, NULL), - "", tail); - new UnreachableInst(tail); + Instruction * InsertPt; +#if 0 + InsertPt = new UnreachableInst(tail); +#else + Value* p = F->arg_begin(); + Instruction * realCall = new CallInst (p, fargs, "", tail); + if (OrigType->getReturnType() == Type::VoidTy) +InsertPt = new ReturnInst(0, tail); + else +InsertPt = new ReturnInst(realCall, tail); +#endif + Value * FuncVoidPtr = castTo (p, +PointerType::get(Type::SByteTy), +realCall); + new CallInst (IndirectFuncFail, FuncVoidPtr, "", realCall); + + // Create basic blocks for valid target functions for (std::vector::iterator i = Targets.begin(), e = Targets.end(); i != e; ++i) { BasicBlock* TB = targets[*i]; BasicBlock* newB = new BasicBlock("test." + (*i)->getName(), F, &F->getEntryBlock()); -Value* p = F->arg_begin(); SetCondInst* setcc = new SetCondInst(Instruction::SetEQ, *i, p, "sc", newB); new BranchInst(TB, tail, setcc, newB); tail = newB; @@ -96,7 +158,15 @@ virtual bool runOnModule(Module &M) { CallTargetFinder* CTF = &getAnalysis(); - Function* ams = M.getNamedFunction("llva_assert_match_sig"); + // Get references to functions that are needed in the module + Function* ams = M.getNamedFunction ("llva_assert_match_sig"); + if (!ams) +return false; + + IndirectFuncFail = M.getOrInsertFunction ("pchk_ind_fail", +Type::VoidTy, + PointerType::get(Type::SByteTy), +
[llvm-commits] [llvm] r40846 - /llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll
Author: lattner Date: Sun Aug 5 13:48:18 2007 New Revision: 40846 URL: http://llvm.org/viewvc/llvm-project?rev=40846&view=rev Log: allow this to pass on ppc hosts. Modified: llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll Modified: llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll?rev=40846&r1=40845&r2=40846&view=diff == --- llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll (original) +++ llvm/trunk/test/CodeGen/X86/fsxor-alignment.ll Sun Aug 5 13:48:18 2007 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse -enable-unsafe-fp-math | \ +; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 -enable-unsafe-fp-math | \ ; RUN: grep -v sp | grep xorps | wc -l | grep 2 ; Don't fold the incoming stack arguments into the xorps instructions used ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40847 - in /llvm/trunk/lib/Target: TargetSelectionDAG.td X86/X86ATTAsmPrinter.h X86/X86FloatingPoint.cpp X86/X86ISelLowering.cpp X86/X86InstrFPStack.td X86/X86InstrInfo.td X86/X
Author: johannes Date: Sun Aug 5 13:49:15 2007 New Revision: 40847 URL: http://llvm.org/viewvc/llvm-project?rev=40847&view=rev Log: Long double patch 4 of N: initial x87 implementation. Lots of problems yet but some simple things work. Modified: llvm/trunk/lib/Target/TargetSelectionDAG.td llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.h llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp llvm/trunk/lib/Target/X86/X86ISelLowering.cpp llvm/trunk/lib/Target/X86/X86InstrFPStack.td llvm/trunk/lib/Target/X86/X86InstrInfo.td llvm/trunk/lib/Target/X86/X86IntelAsmPrinter.h llvm/trunk/lib/Target/X86/X86RegisterInfo.td Modified: llvm/trunk/lib/Target/TargetSelectionDAG.td URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetSelectionDAG.td?rev=40847&r1=40846&r2=40847&view=diff == --- llvm/trunk/lib/Target/TargetSelectionDAG.td (original) +++ llvm/trunk/lib/Target/TargetSelectionDAG.td Sun Aug 5 13:49:15 2007 @@ -457,6 +457,13 @@ LD->getLoadedVT() == MVT::f32; return false; }]>; +def extloadf64 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ + if (LoadSDNode *LD = dyn_cast(N)) +return LD->getExtensionType() == ISD::EXTLOAD && + LD->getAddressingMode() == ISD::UNINDEXED && + LD->getLoadedVT() == MVT::f64; + return false; +}]>; def sextloadi1 : PatFrag<(ops node:$ptr), (ld node:$ptr), [{ if (LoadSDNode *LD = dyn_cast(N)) @@ -561,6 +568,13 @@ ST->getAddressingMode() == ISD::UNINDEXED; return false; }]>; +def truncstoref64 : PatFrag<(ops node:$val, node:$ptr), +(st node:$val, node:$ptr), [{ + if (StoreSDNode *ST = dyn_cast(N)) +return ST->isTruncatingStore() && ST->getStoredVT() == MVT::f64 && + ST->getAddressingMode() == ISD::UNINDEXED; + return false; +}]>; // indexed store fragments. def pre_store : PatFrag<(ops node:$val, node:$base, node:$offset), Modified: llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.h?rev=40847&r1=40846&r2=40847&view=diff == --- llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.h (original) +++ llvm/trunk/lib/Target/X86/X86ATTAsmPrinter.h Sun Aug 5 13:49:15 2007 @@ -57,6 +57,9 @@ void printf64mem(const MachineInstr *MI, unsigned OpNo) { printMemReference(MI, OpNo); } + void printf80mem(const MachineInstr *MI, unsigned OpNo) { +printMemReference(MI, OpNo); + } void printf128mem(const MachineInstr *MI, unsigned OpNo) { printMemReference(MI, OpNo); } Modified: llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp?rev=40847&r1=40846&r2=40847&view=diff == --- llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp (original) +++ llvm/trunk/lib/Target/X86/X86FloatingPoint.cpp Sun Aug 5 13:49:15 2007 @@ -326,53 +326,79 @@ static const TableEntry OpcodeTable[] = { { X86::ABS_Fp32 , X86::ABS_F }, { X86::ABS_Fp64 , X86::ABS_F }, + { X86::ABS_Fp80 , X86::ABS_F }, { X86::ADD_Fp32m, X86::ADD_F32m }, { X86::ADD_Fp64m, X86::ADD_F64m }, { X86::ADD_Fp64m32 , X86::ADD_F32m }, + { X86::ADD_Fp80m32 , X86::ADD_F32m }, + { X86::ADD_Fp80m64 , X86::ADD_F64m }, { X86::ADD_FpI16m32 , X86::ADD_FI16m }, { X86::ADD_FpI16m64 , X86::ADD_FI16m }, + { X86::ADD_FpI16m80 , X86::ADD_FI16m }, { X86::ADD_FpI32m32 , X86::ADD_FI32m }, { X86::ADD_FpI32m64 , X86::ADD_FI32m }, + { X86::ADD_FpI32m80 , X86::ADD_FI32m }, { X86::CHS_Fp32 , X86::CHS_F }, { X86::CHS_Fp64 , X86::CHS_F }, + { X86::CHS_Fp80 , X86::CHS_F }, { X86::CMOVBE_Fp32 , X86::CMOVBE_F }, { X86::CMOVBE_Fp64 , X86::CMOVBE_F }, + { X86::CMOVBE_Fp80 , X86::CMOVBE_F }, { X86::CMOVB_Fp32 , X86::CMOVB_F }, { X86::CMOVB_Fp64 , X86::CMOVB_F }, + { X86::CMOVB_Fp80 , X86::CMOVB_F }, { X86::CMOVE_Fp32 , X86::CMOVE_F }, { X86::CMOVE_Fp64 , X86::CMOVE_F }, + { X86::CMOVE_Fp80 , X86::CMOVE_F }, { X86::CMOVNBE_Fp32 , X86::CMOVNBE_F }, { X86::CMOVNBE_Fp64 , X86::CMOVNBE_F }, + { X86::CMOVNBE_Fp80 , X86::CMOVNBE_F }, { X86::CMOVNB_Fp32 , X86::CMOVNB_F }, { X86::CMOVNB_Fp64 , X86::CMOVNB_F }, + { X86::CMOVNB_Fp80 , X86::CMOVNB_F }, { X86::CMOVNE_Fp32 , X86::CMOVNE_F }, { X86::CMOVNE_Fp64 , X86::CMOVNE_F }, + { X86::CMOVNE_Fp80 , X86::CMOVNE_F }, { X86::CMOVNP_Fp32 , X86::CMOVNP_F }, { X86::CMOVNP_Fp64 , X86::CMOVNP_F }, + { X86::CMOVNP_Fp80 , X86::CMOVNP_F }, { X86::CMOVP_Fp32 , X86::CMOVP_F }, { X86::CMOVP_Fp64 , X86::CMOVP_F }, + { X86::CMOVP_Fp80 , X86::CMOVP_F }, { X86::COS_Fp32 , X86::COS_F }, { X86::COS_
[llvm-commits] [test-suite] r40848 - in /test-suite/trunk/LLVMSource: 2002-02-12-setuw-setsw.ll 2003-08-03-ReservedWordGlobal.ll Hello.ll InvokeUnwind.ll
Author: asl Date: Sun Aug 5 14:11:02 2007 New Revision: 40848 URL: http://llvm.org/viewvc/llvm-project?rev=40848&view=rev Log: Update these to 2.x syntax Modified: test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll test-suite/trunk/LLVMSource/Hello.ll test-suite/trunk/LLVMSource/InvokeUnwind.ll Modified: test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll?rev=40848&r1=40847&r2=40848&view=diff == --- test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll (original) +++ test-suite/trunk/LLVMSource/2002-02-12-setuw-setsw.ll Sun Aug 5 14:11:02 2007 @@ -1,15 +1,14 @@ -; The sparc back-end is generating set-unsigned (setuw) for -2, when it -; should be using setsw. +; ModuleID = '2002-02-12-setuw-setsw.ll' -implementation +define i32 @main(i32 %argc, i8** %argv) { + %T1 = bitcast i32 2 to i32 ; [#uses=1] + %tmp = add i32 %T1, -2 ; [#uses=1] + %cond = icmp eq i32 %tmp, 0 ; [#uses=1] + br i1 %cond, label %Ok, label %Fail -int %main(int %argc, sbyte * * %argv) { - %T1 = cast int 2 to uint - %tmp = add uint %T1, 4294967294 ; == -2 - %cond = seteq uint %tmp, 0 - br bool %cond, label %Ok, label %Fail -Ok: - ret int 0 -Fail: - ret int 1 +Ok:; preds = %0 + ret i32 0 + +Fail: ; preds = %0 + ret i32 1 } Modified: test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll?rev=40848&r1=40847&r2=40848&view=diff == --- test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll (original) +++ test-suite/trunk/LLVMSource/2003-08-03-ReservedWordGlobal.ll Sun Aug 5 14:11:02 2007 @@ -1,8 +1,7 @@ -%Sp = linkonce global int 0; [#uses=1] +; ModuleID = '2003-08-03-ReservedWordGlobal.ll' [EMAIL PROTECTED] = linkonce global i32 0 ; [#uses=1] -implementation ; Functions: - -int %main() { - store int 123, int* %Sp - ret int 0 +define i32 @main() { + store i32 123, i32* @Sp + ret i32 0 } Modified: test-suite/trunk/LLVMSource/Hello.ll URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LLVMSource/Hello.ll?rev=40848&r1=40847&r2=40848&view=diff == --- test-suite/trunk/LLVMSource/Hello.ll (original) +++ test-suite/trunk/LLVMSource/Hello.ll Sun Aug 5 14:11:02 2007 @@ -1,11 +1,9 @@ -%.str_1 = internal constant [32 x sbyte] c"Hello world with %d arguments!\0A\00" +; ModuleID = 'Hello.ll' [EMAIL PROTECTED] = internal constant [32 x i8] c"Hello world with %d arguments!\0A\00" ; <[32 x i8]*> [#uses=1] -implementation +declare i32 @printf(i8*, ...) -declare int %printf(sbyte*, ...) - -int %main(int %argc, sbyte** %argv) { -%tmp.0 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([32 x sbyte]* %.str_1, long 0, long 0), int %argc ) -ret int 0 +define i32 @main(i32 %argc, i8** %argv) { + %tmp.0 = call i32 (i8*, ...)* @printf( i8* getelementptr ([32 x i8]* @.str_1, i64 0, i64 0), i32 %argc ); [#uses=0] + ret i32 0 } - Modified: test-suite/trunk/LLVMSource/InvokeUnwind.ll URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/LLVMSource/InvokeUnwind.ll?rev=40848&r1=40847&r2=40848&view=diff == --- test-suite/trunk/LLVMSource/InvokeUnwind.ll (original) +++ test-suite/trunk/LLVMSource/InvokeUnwind.ll Sun Aug 5 14:11:02 2007 @@ -1,24 +1,29 @@ -; Test to make sure the invoke instruction and unwind are working... +; ModuleID = 'InvokeUnwind.ll' -implementation +declare void @abort() -declare void %abort() +define internal void @throw(i1 %ShouldThrow) { + br i1 %ShouldThrow, label %Throw, label %NoThrow -internal void %throw(bool %ShouldThrow) { - br bool %ShouldThrow, label %Throw, label %NoThrow -Throw: +Throw: ; preds = %0 unwind -NoThrow: + +NoThrow: ; preds = %0 ret void } -int %main() { - invoke void %throw(bool false) to label %Cont except label %Abort -Cont: - invoke void %throw(bool true) to label %Abort except label %Exc -Abort: - call void %abort() - ret int 1 -Exc: - ret int 0 +define i32 @main() { + invoke void @throw( i1 false ) + to label %Cont unwind label %Abort + +Cont: ; preds = %0 + invoke void @throw( i1 true ) + to label %Abort unwind label %Exc + +Abort: ; preds = %Cont, %0 + call void @abort( ) + ret i32
[llvm-commits] http://testing.llvm.org/
All, We now have an auto-update capability for http://testing.llvm.org/ This site will present the content of the "website" module. We need to get this into shape so that it can be hosted at http://llvm.org/ instead of the current (ancient) site. Patches welcome. Reid. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40849 - /llvm/trunk/lib/VMCore/ConstantFold.cpp
Author: reid Date: Sun Aug 5 14:27:01 2007 New Revision: 40849 URL: http://llvm.org/viewvc/llvm-project?rev=40849&view=rev Log: Fix a doxygen directive. Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=40849&r1=40848&r2=40849&view=diff == --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original) +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Sun Aug 5 14:27:01 2007 @@ -114,7 +114,7 @@ /// This function determines which opcode to use to fold two constant cast /// expressions together. It uses CastInst::isEliminableCastPair to determine /// the opcode. Consequently its just a wrapper around that function. -/// @Determine if it is valid to fold a cast of a cast +/// @brief Determine if it is valid to fold a cast of a cast static unsigned foldConstantCastPair( unsigned opc, ///< opcode of the second cast constant expression ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40850 - /llvm/trunk/lib/Support/StringExtras.cpp
Author: reid Date: Sun Aug 5 14:33:11 2007 New Revision: 40850 URL: http://llvm.org/viewvc/llvm-project?rev=40850&view=rev Log: Escape some escapes that confuse doxygen. Modified: llvm/trunk/lib/Support/StringExtras.cpp Modified: llvm/trunk/lib/Support/StringExtras.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StringExtras.cpp?rev=40850&r1=40849&r2=40850&view=diff == --- llvm/trunk/lib/Support/StringExtras.cpp (original) +++ llvm/trunk/lib/Support/StringExtras.cpp Sun Aug 5 14:33:11 2007 @@ -59,8 +59,10 @@ /// UnescapeString - Modify the argument string, turning two character sequences -/// like '\\' 'n' into '\n'. This handles: \e \a \b \f \n \r \t \v \' \\ and +/// @verbatim +/// like '\\' 'n' into '\n'. This handles: \e \a \b \f \n \r \t \v \' \ and /// \num (where num is a 1-3 byte octal value). +/// @endverbatim void llvm::UnescapeString(std::string &Str) { for (unsigned i = 0; i != Str.size(); ++i) { if (Str[i] == '\\' && i != Str.size()-1) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40851 - /llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp
Author: reid Date: Sun Aug 5 14:35:22 2007 New Revision: 40851 URL: http://llvm.org/viewvc/llvm-project?rev=40851&view=rev Log: Silence some warnings from doxygen about @param argument name not matching the actual argument name of the documented function. Modified: llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp Modified: llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp?rev=40851&r1=40850&r2=40851&view=diff == --- llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp (original) +++ llvm/trunk/lib/Transforms/Scalar/LowerPacked.cpp Sun Aug 5 14:35:22 2007 @@ -60,7 +60,7 @@ void visitBinaryOperator(BinaryOperator& BO); /// @brief Lowers packed icmp operations. - /// @param CI the icmp operator to convert + /// @param IC the icmp operator to convert void visitICmpInst(ICmpInst& IC); /// @brief Lowers packed select instructions. @@ -68,11 +68,11 @@ void visitSelectInst(SelectInst& SELI); /// @brief Lowers packed extractelement instructions. - /// @param EI the extractelement operator to convert + /// @param EE the extractelement operator to convert void visitExtractElementInst(ExtractElementInst& EE); /// @brief Lowers packed insertelement instructions. - /// @param EI the insertelement operator to convert + /// @param IE the insertelement operator to convert void visitInsertElementInst(InsertElementInst& IE); /// This function asserts if the instruction is a VectorType but ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40852 - /llvm/trunk/include/llvm/ADT/APInt.h
Author: reid Date: Sun Aug 5 14:36:39 2007 New Revision: 40852 URL: http://llvm.org/viewvc/llvm-project?rev=40852&view=rev Log: Document a missing parameter. Modified: llvm/trunk/include/llvm/ADT/APInt.h Modified: llvm/trunk/include/llvm/ADT/APInt.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APInt.h?rev=40852&r1=40851&r2=40852&view=diff == --- llvm/trunk/include/llvm/ADT/APInt.h (original) +++ llvm/trunk/include/llvm/ADT/APInt.h Sun Aug 5 14:36:39 2007 @@ -189,6 +189,7 @@ /// @param numBits the bit width of the constructed APInt /// @param strStart the start of the string to be interpreted /// @param slen the maximum number of characters to interpret + /// @param radix the radix to use for the conversion /// @brief Construct an APInt from a string representation. APInt(uint32_t numBits, const char strStart[], uint32_t slen, uint8_t radix); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40853 - /llvm/trunk/docs/doxygen.cfg.in
Author: reid Date: Sun Aug 5 14:51:03 2007 New Revision: 40853 URL: http://llvm.org/viewvc/llvm-project?rev=40853&view=rev Log: Comment out configuration tags not supported by doxygen 1.3.9 Modified: llvm/trunk/docs/doxygen.cfg.in Modified: llvm/trunk/docs/doxygen.cfg.in URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/doxygen.cfg.in?rev=40853&r1=40852&r2=40853&view=diff == --- llvm/trunk/docs/doxygen.cfg.in (original) +++ llvm/trunk/docs/doxygen.cfg.in Sun Aug 5 14:51:03 2007 @@ -172,7 +172,7 @@ # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. -SEPARATE_MEMBER_PAGES = NO +#SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. @@ -388,7 +388,7 @@ # provided by doxygen. Whatever the progam writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER= +#FILE_VERSION_FILTER= #--- # configuration options related to warning and progress messages @@ -424,7 +424,7 @@ # wrong or incomplete parameter documentation, but not about the absence of # documentation. -WARN_NO_PARAMDOC = NO +#WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text @@ -580,7 +580,7 @@ # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. -USE_HTAGS = NO +#USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for @@ -1101,7 +1101,7 @@ # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies -GROUP_GRAPHS = YES +#GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling @@ -1146,7 +1146,7 @@ # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. -DIRECTORY_GRAPH= YES +#DIRECTORY_GRAPH= YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif @@ -1199,14 +1199,14 @@ # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). -DOT_TRANSPARENT= NO +#DOT_TRANSPARENT= NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. -DOT_MULTI_TARGETS = NO +#DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40854 - in /llvm/trunk: include/llvm/Bitcode/Archive.h include/llvm/CodeGen/AsmPrinter.h include/llvm/Constants.h include/llvm/Linker.h include/llvm/Support/LLVMBuilder.h includ
Author: reid Date: Sun Aug 5 15:06:04 2007 New Revision: 40854 URL: http://llvm.org/viewvc/llvm-project?rev=40854&view=rev Log: Fix minor doxygen nits. Modified: llvm/trunk/include/llvm/Bitcode/Archive.h llvm/trunk/include/llvm/CodeGen/AsmPrinter.h llvm/trunk/include/llvm/Constants.h llvm/trunk/include/llvm/Linker.h llvm/trunk/include/llvm/Support/LLVMBuilder.h llvm/trunk/include/llvm/Support/Mangler.h llvm/trunk/include/llvm/Support/MemoryBuffer.h llvm/trunk/include/llvm/Support/Streams.h llvm/trunk/include/llvm/System/Path.h llvm/trunk/include/llvm/Target/TargetAsmInfo.h llvm/trunk/lib/CodeGen/DwarfWriter.cpp llvm/trunk/lib/Target/TargetData.cpp llvm/trunk/lib/VMCore/Verifier.cpp Modified: llvm/trunk/include/llvm/Bitcode/Archive.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/Archive.h?rev=40854&r1=40853&r2=40854&view=diff == --- llvm/trunk/include/llvm/Bitcode/Archive.h (original) +++ llvm/trunk/include/llvm/Bitcode/Archive.h Sun Aug 5 15:06:04 2007 @@ -463,6 +463,8 @@ /// into memory. Archive(const sys::Path& filename); +/// @param data The symbol table data to be parsed +/// @param len The length of the symbol table data /// @param error Set to address of a std::string to get error messages /// @returns false on error /// @brief Parse the symbol table at \p data. @@ -476,17 +478,17 @@ std::string* error ///< Optional error message catcher ); -/// @param error Set to address of a std::string to get error messages +/// @param ErrMessage Set to address of a std::string to get error messages /// @returns false on error /// @brief Check that the archive signature is correct bool checkSignature(std::string* ErrMessage); -/// @param error Set to address of a std::string to get error messages +/// @param ErrMessage Set to address of a std::string to get error messages /// @returns false on error /// @brief Load the entire archive. bool loadArchive(std::string* ErrMessage); -/// @param error Set to address of a std::string to get error messages +/// @param ErrMessage Set to address of a std::string to get error messages /// @returns false on error /// @brief Load just the symbol table. bool loadSymbolTable(std::string* ErrMessage); Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=40854&r1=40853&r2=40854&view=diff == --- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original) +++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Sun Aug 5 15:06:04 2007 @@ -240,7 +240,7 @@ /// EmitString - Emit a string with quotes and a null terminator. /// Special characters are emitted properly. -/// \literal (Eg. '\t') \endliteral +/// @verbatim (Eg. '\t') @endverbatim void EmitString(const std::string &String) const; //===--===// Modified: llvm/trunk/include/llvm/Constants.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Constants.h?rev=40854&r1=40853&r2=40854&view=diff == --- llvm/trunk/include/llvm/Constants.h (original) +++ llvm/trunk/include/llvm/Constants.h Sun Aug 5 15:06:04 2007 @@ -311,7 +311,9 @@ bool isString() const; /// isCString - This method returns true if the array is a string (see + /// @verbatim /// isString) and it ends in a null byte \0 and does not contains any other + /// @endverbatim /// null bytes except its terminator. bool isCString() const; Modified: llvm/trunk/include/llvm/Linker.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Linker.h?rev=40854&r1=40853&r2=40854&view=diff == --- llvm/trunk/include/llvm/Linker.h (original) +++ llvm/trunk/include/llvm/Linker.h Sun Aug 5 15:06:04 2007 @@ -204,7 +204,7 @@ /// found in one library, based on the unresolved symbols in the composite /// module.The \p Library should be the base name of a library, as if given /// with the -l option of a linker tool. The Linker's LibPaths are searched -/// for the \P Library and if found, it will be linked in with via the +/// for the \p Library and if found, it will be linked in with via the /// LinkInArchive method. If an error occurs, the Linker's error string is /// set. /// @see LinkInArchive Modified: llvm/trunk/include/llvm/Support/LLVMBuilder.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/LLVMBuilder.h?rev=40854&r1=40853&r2=40854&view=diff
[llvm-commits] [llvm] r40855 - in /llvm/trunk/docs: CommandGuide/index.html index.html
Author: reid Date: Sun Aug 5 18:43:44 2007 New Revision: 40855 URL: http://llvm.org/viewvc/llvm-project?rev=40855&view=rev Log: Update links to the command guide generated documentation. Modified: llvm/trunk/docs/CommandGuide/index.html llvm/trunk/docs/index.html Modified: llvm/trunk/docs/CommandGuide/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CommandGuide/index.html?rev=40855&r1=40854&r2=40855&view=diff == --- llvm/trunk/docs/CommandGuide/index.html (original) +++ llvm/trunk/docs/CommandGuide/index.html Sun Aug 5 18:43:44 2007 @@ -32,50 +32,50 @@ -llvm-as - +llvm-as - assemble a human-readable .ll file into bytecode -llvm-dis - +llvm-dis - disassemble a bytecode file into a human-readable .ll file -llvm-upgrade - +llvm-upgrade - upgrade LLVM assembly from previous version -opt - +opt - run a series of LLVM-to-LLVM optimizations on a bytecode file -llc - +llc - generate native machine code for a bytecode file -lli - +lli - directly run a program compiled to bytecode using a JIT compiler or interpreter -llvm-link - +llvm-link - link several bytecode files into one -llvm-ar - +llvm-ar - archive bytecode files -llvm-ranlib - +llvm-ranlib - create an index for archives made with llvm-ar -llvm-nm - +llvm-nm - print out the names and types of symbols in a bytecode file -llvm-prof - +llvm-prof - format raw `llvmprof.out' data into a human-readable report -llvmc - +llvmc - generic and configurable compiler driver -llvm-ld - +llvm-ld - general purpose linker with loadable runtime optimization support -llvm-config - +llvm-config - print out LLVM compilation options, libraries, etc. as configured. - llvm2cpp - convert LLVM assembly + llvm2cpp - convert LLVM assembly into the corresponding LLVM C++ API calls to produce it @@ -90,13 +90,13 @@ -llvmgcc - +llvmgcc - GCC-based C front-end for LLVM -llvmg++ - +llvmg++ - GCC-based C++ front-end for LLVM -stkrc - +stkrc - front-end compiler for the Stacker language @@ -115,13 +115,13 @@ -bugpoint - +bugpoint - automatic test-case reducer -llvm-extract - +llvm-extract - extract a function from an LLVM bytecode file -llvm-bcanalyzer - +llvm-bcanalyzer - bytecode analyzer (analyzes the binary encoding itself, not the program it represents) @@ -137,7 +137,7 @@ -tblgen - +tblgen - target description reader and generator Modified: llvm/trunk/docs/index.html URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/index.html?rev=40855&r1=40854&r2=40855&view=diff == --- llvm/trunk/docs/index.html (original) +++ llvm/trunk/docs/index.html Sun Aug 5 18:43:44 2007 @@ -67,27 +67,27 @@ Developer Policy - The LLVM project's policy towards developers and their contributions. -LLVM Command Guide - A reference +LLVM Command Guide - A reference manual for the LLVM command line utilities ("man" pages for LLVM tools). Current tools: - llvm-ar, - llvm-as, - llvm-dis, - llvm-extract, - llvm-ld, - llvm-link, - llvm-nm, - llvm-prof, - llvm-ranlib, - opt, - llc, - lli, - llvmc - llvm-gcc, - llvm-g++, - stkrc, - bugpoint, - llvm-bcanalyzer, + llvm-ar, + llvm-as, + llvm-dis, + llvm-extract, + llvm-ld, + llvm-link, + llvm-nm, + llvm-prof, + llvm-ranlib, + opt, + llc, + lli, + llvmc + llvm-gcc, + llvm-g++, + stkrc, + bugpoint, + llvm-bcanalyzer, Frequently Asked Questions - A list of common ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40856 - /llvm/trunk/include/llvm/Analysis/Dominators.h
Author: lattner Date: Mon Aug 6 01:15:43 2007 New Revision: 40856 URL: http://llvm.org/viewvc/llvm-project?rev=40856&view=rev Log: Various random cleanups, add two accessors to DomTreeNode: getDFSNumIn/getDFSNumOut Modified: llvm/trunk/include/llvm/Analysis/Dominators.h Modified: llvm/trunk/include/llvm/Analysis/Dominators.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/Dominators.h?rev=40856&r1=40855&r2=40856&view=diff == --- llvm/trunk/include/llvm/Analysis/Dominators.h (original) +++ llvm/trunk/include/llvm/Analysis/Dominators.h Mon Aug 6 01:15:43 2007 @@ -76,17 +76,23 @@ const_iterator begin() const { return Children.begin(); } const_iterator end() const { return Children.end(); } - inline BasicBlock *getBlock() const { return TheBB; } - inline DomTreeNode *getIDom() const { return IDom; } - inline const std::vector &getChildren() const { return Children; } + BasicBlock *getBlock() const { return TheBB; } + DomTreeNode *getIDom() const { return IDom; } + const std::vector &getChildren() const { return Children; } - inline DomTreeNode(BasicBlock *BB, DomTreeNode *iDom) + DomTreeNode(BasicBlock *BB, DomTreeNode *iDom) : TheBB(BB), IDom(iDom), DFSNumIn(-1), DFSNumOut(-1) { } - inline DomTreeNode *addChild(DomTreeNode *C) { Children.push_back(C); return C; } + DomTreeNode *addChild(DomTreeNode *C) { Children.push_back(C); return C; } void setIDom(DomTreeNode *NewIDom); + + /// getDFSNumIn/getDFSNumOut - These are an internal implementation detail, do + /// not call them. + unsigned getDFSNumIn() const { return DFSNumIn; } + unsigned getDFSNumOut() const { return DFSNumOut; } private: - // Return true if this node is dominated by other. Use this only if DFS info is valid. + // Return true if this node is dominated by other. Use this only if DFS info + // is valid. bool DominatedBy(const DomTreeNode *other) const { return this->DFSNumIn >= other->DFSNumIn && this->DFSNumOut <= other->DFSNumOut; @@ -118,7 +124,7 @@ std::vector Bucket; -InfoRec() : Semi(0), Size(0), Label(0), Parent(0), Child(0), Ancestor(0){} +InfoRec() : Semi(0), Size(0), Label(0), Parent(0), Child(0), Ancestor(0) {} }; DenseMap IDoms; @@ -416,9 +422,8 @@ AU.addRequired(); } - /// splitBlock - /// BB is split and now it has one successor. Update dominace frontier to - /// reflect this change. + /// splitBlock - BB is split and now it has one successor. Update dominance + /// frontier to reflect this change. void splitBlock(BasicBlock *BB); private: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40857 - /llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll
Author: lattner Date: Mon Aug 6 01:17:08 2007 New Revision: 40857 URL: http://llvm.org/viewvc/llvm-project?rev=40857&view=rev Log: update for new domtree dump format Modified: llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll Modified: llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll?rev=40857&r1=40856&r2=40857&view=diff == --- llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll (original) +++ llvm/trunk/test/Analysis/Dominators/2006-10-02-BreakCritEdges.ll Mon Aug 6 01:17:08 2007 @@ -1,5 +1,5 @@ ; RUN: llvm-upgrade < %s | llvm-as | opt -domtree -break-crit-edges -analyze \ -; RUN: -domtree | grep {3.*%brtrue$} +; RUN: -domtree | grep {3.*%brtrue } ; PR932 implementation ; Functions: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] [llvm] r40858 - /llvm/trunk/lib/VMCore/Dominators.cpp
Author: lattner Date: Mon Aug 6 01:19:47 2007 New Revision: 40858 URL: http://llvm.org/viewvc/llvm-project?rev=40858&view=rev Log: 1. Random tidiness cleanups 2. Make domtree printing print dfin/dfout #'s 3. Fix the Transforms/LoopSimplify/2004-04-13-LoopSimplifyUpdateDomFrontier.ll failure from last night (in DominanceFrontier::splitBlock). w.r.t. #3, my patches last night happened to expose the bug, but this has been broken since Owen's r35839 patch to LoopSimplify. The code was subsequently moved over from LoopSimplify into Dominators, carrying the latent bug. Fun stuff. Modified: llvm/trunk/lib/VMCore/Dominators.cpp Modified: llvm/trunk/lib/VMCore/Dominators.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Dominators.cpp?rev=40858&r1=40857&r2=40858&view=diff == --- llvm/trunk/lib/VMCore/Dominators.cpp (original) +++ llvm/trunk/lib/VMCore/Dominators.cpp Mon Aug 6 01:19:47 2007 @@ -66,7 +66,6 @@ // NewBB is split and now it has one successor. Update dominator tree to // reflect this change. void DominatorTree::splitBlock(BasicBlock *NewBB) { - assert(NewBB->getTerminator()->getNumSuccessors() == 1 && "NewBB should have a single successor!"); BasicBlock *NewBBSucc = NewBB->getTerminator()->getSuccessor(0); @@ -92,7 +91,7 @@ } for (; i != e; ++i) - if (PredBlocks[i] != OnePred && isReachableFromEntry(OnePred)){ + if (PredBlocks[i] != OnePred && isReachableFromEntry(OnePred)) { NewBBDominatesNewBBSucc = false; break; } @@ -119,7 +118,6 @@ } } - // Find NewBB's immediate dominator and create new dominator tree node for // NewBB. BasicBlock *NewBBIDom = 0; @@ -390,9 +388,7 @@ for (unsigned i = 0, e = Roots.size(); i != e; ++i) for (df_iterator I = df_begin(Roots[i]), E = df_end(Roots[i]); I != E; ++I) { - BasicBlock *BB = *I; - DomTreeNode *BBNode = getNode(BB); - if (BBNode) { + if (DomTreeNode *BBNode = getNode(*I)) { if (!BBNode->getIDom()) BBNode->assignDFSNumber(dfsnum); } @@ -462,11 +458,11 @@ return &Entry; // If B dominates A then B is nearest common dominator. - if (dominates(B,A)) + if (dominates(B, A)) return B; // If A dominates B then A is nearest common dominator. - if (dominates(A,B)) + if (dominates(A, B)) return A; DomTreeNode *NodeA = getNode(A); @@ -476,7 +472,7 @@ SmallPtrSet NodeADoms; NodeADoms.insert(NodeA); DomTreeNode *IDomA = NodeA->getIDom(); - while(IDomA) { + while (IDomA) { NodeADoms.insert(IDomA); IDomA = IDomA->getIDom(); } @@ -542,8 +538,8 @@ } DomTreeNode *DominatorTree::getNodeForBlock(BasicBlock *BB) { - DomTreeNode *&BBNode = DomTreeNodes[BB]; - if (BBNode) return BBNode; + if (DomTreeNode *BBNode = DomTreeNodes[BB]) +return BBNode; // Haven't calculated this node yet? Get or calculate the node for the // immediate dominator. @@ -556,12 +552,14 @@ return DomTreeNodes[BB] = IDomNode->addChild(C); } -static std::ostream &operator<<(std::ostream &o, -const DomTreeNode *Node) { +static std::ostream &operator<<(std::ostream &o, const DomTreeNode *Node) { if (Node->getBlock()) WriteAsOperand(o, Node->getBlock(), false); else o << " <>"; + + o << " {" << Node->getDFSNumIn() << "," << Node->getDFSNumOut() << "}"; + return o << "\n"; } @@ -574,13 +572,17 @@ } void DominatorTreeBase::print(std::ostream &o, const Module* ) const { - o << "=\n" -<< "Inorder Dominator Tree:\n"; + o << "=\n"; + o << "Inorder Dominator Tree: "; + if (DFSInfoValid) +o << "DFSNumbers invalid: " << SlowQueries << " slow queries."; + o << "\n"; + PrintDomTree(getRootNode(), o, 1); } void DominatorTreeBase::dump() { - print (llvm::cerr); + print(llvm::cerr); } bool DominatorTree::runOnFunction(Function &F) { @@ -601,7 +603,6 @@ // NewBB is split and now it has one successor. Update dominace frontier to // reflect this change. void DominanceFrontier::splitBlock(BasicBlock *NewBB) { - assert(NewBB->getTerminator()->getNumSuccessors() == 1 && "NewBB should have a single successor!"); BasicBlock *NewBBSucc = NewBB->getTerminator()->getSuccessor(0); @@ -617,12 +618,7 @@ // other blocks. return; - DominatorTree &DT = getAnalysis(); - bool NewBBDominatesNewBBSucc = true; - if (!DT.dominates(NewBB, NewBBSucc)) -NewBBDominatesNewBBSucc = false; - - // NewBBSucc inherites original NewBB frontier. + // NewBBSucc inherits original NewBB frontier. DominanceFrontier::iterator NewBBI = find(NewBB); if (NewBBI != end()) { DominanceFrontier::DomSetType NewBBSet = NewBBI->second; @@ -634,7 +630,8 @@ // If NewBB dominates
[llvm-commits] [llvm] r40859 - /llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
Author: lattner Date: Mon Aug 6 01:21:06 2007 New Revision: 40859 URL: http://llvm.org/viewvc/llvm-project?rev=40859&view=rev Log: remove some dead lines Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Modified: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp?rev=40859&r1=40858&r2=40859&view=diff == --- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp (original) +++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp Mon Aug 6 01:21:06 2007 @@ -698,5 +698,3 @@ if (DominanceFrontier *DF = getAnalysisToUpdate()) DF->splitBlock(BEBlock); } - - ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits