[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveInterval.h LiveIntervalAnalysis.h
Changes in directory llvm/include/llvm/CodeGen: LiveInterval.h updated: 1.21 -> 1.22 LiveIntervalAnalysis.h updated: 1.54 -> 1.55 --- Log message: Teach the coallescer to coallesce live intervals joined by an arbitrary number of copies, potentially defining live ranges that appear to have differing value numbers that become identical when coallsced. Among other things, this fixes CodeGen/X86/shift-coalesce.ll and PR687: http://llvm.org/PR687 . --- Diffs of the changes: (+19 -18) LiveInterval.h | 28 +++- LiveIntervalAnalysis.h |9 - 2 files changed, 19 insertions(+), 18 deletions(-) Index: llvm/include/llvm/CodeGen/LiveInterval.h diff -u llvm/include/llvm/CodeGen/LiveInterval.h:1.21 llvm/include/llvm/CodeGen/LiveInterval.h:1.22 --- llvm/include/llvm/CodeGen/LiveInterval.h:1.21 Fri Aug 25 18:41:24 2006 +++ llvm/include/llvm/CodeGen/LiveInterval.hTue Aug 29 18:17:59 2006 @@ -78,8 +78,6 @@ float weight;// weight of this interval Ranges ranges; // the ranges in which this register is live private: -unsigned NumValues; // the number of distinct values in this interval. - /// InstDefiningValue - This tracks the def index of the instruction that /// defines a particular value number in the interval. This may be ~0, /// which is treated as unknown, or ~1, which is a deleted value number. @@ -87,7 +85,7 @@ public: LiveInterval(unsigned Reg, float Weight) - : reg(Reg), weight(Weight), NumValues(0) { + : reg(Reg), weight(Weight) { } typedef Ranges::iterator iterator; @@ -115,24 +113,24 @@ std::swap(reg, other.reg); std::swap(weight, other.weight); std::swap(ranges, other.ranges); - std::swap(NumValues, other.NumValues); std::swap(InstDefiningValue, other.InstDefiningValue); } -bool containsOneValue() const { return NumValues == 1; } +bool containsOneValue() const { return InstDefiningValue.size() == 1; } -unsigned getNumValNums() const { return NumValues; } +unsigned getNumValNums() const { return InstDefiningValue.size(); } /// getNextValue - Create a new value number and return it. MIIdx specifies /// the instruction that defines the value number. unsigned getNextValue(unsigned MIIdx) { InstDefiningValue.push_back(MIIdx); - return NumValues++; + return InstDefiningValue.size()-1; } /// getInstForValNum - Return the machine instruction index that defines the /// specified value number. unsigned getInstForValNum(unsigned ValNo) const { + assert(ValNo < InstDefiningValue.size()); return InstDefiningValue[ValNo]; } @@ -189,11 +187,6 @@ /// contains the specified index, or end() if there is none. iterator FindLiveRangeContaining(unsigned Idx); -/// joinable - Two intervals are joinable if the either don't overlap at all -/// or if the destination of the copy is a single assignment value, and it -/// only overlaps with one value in the source interval. -bool joinable(const LiveInterval& other, unsigned CopyIdx) const; - /// getOverlapingRanges - Given another live interval which is defined as a /// copy from this one, return a list of all of the live ranges where the /// two overlap and have different value numbers. @@ -218,11 +211,12 @@ addRangeFrom(LR, ranges.begin()); } -/// join - Join two live intervals (this, and other) together. This -/// operation is the result of a copy instruction in the source program, -/// that occurs at index 'CopyIdx' that copies from 'other' to 'this'. This -/// destroys 'other'. -void join(LiveInterval& other, unsigned CopyIdx); +/// join - Join two live intervals (this, and other) together. This applies +/// mappings to the value numbers in the LHS/RHS intervals as specified. If +/// the intervals are not joinable, this aborts. +void join(LiveInterval &Other, int *ValNoAssignments, + int *RHSValNoAssignments, + SmallVector &NewInstDefiningValue); /// removeRange - Remove the specified range from this interval. Note that Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.54 llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.55 --- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.54 Thu Aug 24 17:43:55 2006 +++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hTue Aug 29 18:17:59 2006 @@ -174,6 +174,13 @@ /// it may be possible if other things get coallesced. bool JoinCopy(MachineInstr *CopyMI, unsigned SrcReg, unsigned DstReg); +/// JoinIntervals - Attempt to join these two intervals. On failure, this +/// returns false. Otherwise, if one of the intervals being joined is a +/// physreg, this method always canonicalizes DestInt to be it. The outpu
[llvm-commits] CVS: llvm/include/llvm/Analysis/LoopInfo.h
Changes in directory llvm/include/llvm/Analysis: LoopInfo.h updated: 1.57 -> 1.58 --- Log message: Do not rely on std::sort and std::erase to get list of unique exit blocks. The output is dependent on addresses of basic block. Add and use Loop::getUniqueExitBlocks. --- Diffs of the changes: (+6 -0) LoopInfo.h |6 ++ 1 files changed, 6 insertions(+) Index: llvm/include/llvm/Analysis/LoopInfo.h diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.57 llvm/include/llvm/Analysis/LoopInfo.h:1.58 --- llvm/include/llvm/Analysis/LoopInfo.h:1.57 Sun Jun 11 14:22:28 2006 +++ llvm/include/llvm/Analysis/LoopInfo.h Tue Aug 29 17:29:16 2006 @@ -112,6 +112,12 @@ /// void getExitBlocks(std::vector &Blocks) const; + /// getUniqueExitBlocks - Return all unique successor blocks of this loop. + /// These are the blocks _outside of the current loop_ which are branched to. + /// This assumes that loop is in canonical form. + /// + void getUniqueExitBlocks(std::vector &ExitBlocks) const; + /// getLoopPreheader - If there is a preheader for this loop, return it. A /// loop has a preheader if there is only one edge to the header of the loop /// from outside of the loop. If this is the case, the block branching to the ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.46 -> 1.47 --- Log message: Do not rely on std::sort and std::erase to get list of unique exit blocks. The output is dependent on addresses of basic block. Add and use Loop::getUniqueExitBlocks. --- Diffs of the changes: (+4 -10) LoopUnswitch.cpp | 14 -- 1 files changed, 4 insertions(+), 10 deletions(-) Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.46 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.47 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.46Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Tue Aug 29 17:29:16 2006 @@ -570,11 +570,8 @@ LoopBlocks.insert(LoopBlocks.end(), L->block_begin(), L->block_end()); std::vector ExitBlocks; - L->getExitBlocks(ExitBlocks); - std::sort(ExitBlocks.begin(), ExitBlocks.end()); - ExitBlocks.erase(std::unique(ExitBlocks.begin(), ExitBlocks.end()), - ExitBlocks.end()); - + L->getUniqueExitBlocks(ExitBlocks); + // Split all of the edges from inside the loop to their exit blocks. Update // the appropriate Phi nodes as we do so. unsigned NumBlocks = L->getBlocks().size(); @@ -626,11 +623,8 @@ // The exit blocks may have been changed due to edge splitting, recompute. ExitBlocks.clear(); - L->getExitBlocks(ExitBlocks); - std::sort(ExitBlocks.begin(), ExitBlocks.end()); - ExitBlocks.erase(std::unique(ExitBlocks.begin(), ExitBlocks.end()), - ExitBlocks.end()); - + L->getUniqueExitBlocks(ExitBlocks); + // Add exit blocks to the loop blocks. LoopBlocks.insert(LoopBlocks.end(), ExitBlocks.begin(), ExitBlocks.end()); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveInterval.cpp updated: 1.32 -> 1.33 LiveIntervalAnalysis.cpp updated: 1.171 -> 1.172 --- Log message: Teach the coallescer to coallesce live intervals joined by an arbitrary number of copies, potentially defining live ranges that appear to have differing value numbers that become identical when coallsced. Among other things, this fixes CodeGen/X86/shift-coalesce.ll and PR687: http://llvm.org/PR687 . --- Diffs of the changes: (+249 -155) LiveInterval.cpp | 189 - LiveIntervalAnalysis.cpp | 215 +-- 2 files changed, 249 insertions(+), 155 deletions(-) Index: llvm/lib/CodeGen/LiveInterval.cpp diff -u llvm/lib/CodeGen/LiveInterval.cpp:1.32 llvm/lib/CodeGen/LiveInterval.cpp:1.33 --- llvm/lib/CodeGen/LiveInterval.cpp:1.32 Fri Aug 25 20:28:16 2006 +++ llvm/lib/CodeGen/LiveInterval.cpp Tue Aug 29 18:18:15 2006 @@ -101,101 +101,6 @@ return false; } -/// NontrivialOverlap - Check to see if the two live ranges specified by i and j -/// overlap. If so, check to see if they have value numbers that are not -/// iIdx/jIdx respectively. If both conditions are true, return true. -static inline bool NontrivialOverlap(const LiveRange &I, const LiveRange &J, - unsigned iIdx, unsigned jIdx) { - if (I.start == J.start) { -// If this is not the allowed value merge, we cannot join. -if (I.ValId != iIdx || J.ValId != jIdx) - return true; - } else if (I.start < J.start) { -if (I.end > J.start && (I.ValId != iIdx || J.ValId != jIdx)) { - return true; -} - } else { -if (J.end > I.start && (I.ValId != iIdx || J.ValId != jIdx)) - return true; - } - - return false; -} - -/// joinable - Two intervals are joinable if the either don't overlap at all -/// or if the destination of the copy is a single assignment value, and it -/// only overlaps with one value in the source interval. -bool LiveInterval::joinable(const LiveInterval &other, unsigned CopyIdx) const { - const LiveRange *SourceLR = other.getLiveRangeContaining(CopyIdx-1); - const LiveRange *DestLR = getLiveRangeContaining(CopyIdx); - assert(SourceLR && DestLR && "Not joining due to a copy?"); - unsigned OtherValIdx = SourceLR->ValId; - unsigned ThisValIdx = DestLR->ValId; - - Ranges::const_iterator i = ranges.begin(); - Ranges::const_iterator ie = ranges.end(); - Ranges::const_iterator j = other.ranges.begin(); - Ranges::const_iterator je = other.ranges.end(); - - if (i->start < j->start) { -i = std::upper_bound(i, ie, j->start); -if (i != ranges.begin()) --i; - } else if (j->start < i->start) { -j = std::upper_bound(j, je, i->start); -if (j != other.ranges.begin()) --j; - } - - while (i != ie && j != je) { -if (NontrivialOverlap(*i, *j, ThisValIdx, OtherValIdx)) - return false; - -if (i->end < j->end) - ++i; -else - ++j; - } - - return true; -} - -/// getOverlapingRanges - Given another live interval which is defined as a -/// copy from this one, return a list of all of the live ranges where the -/// two overlap and have different value numbers. -void LiveInterval::getOverlapingRanges(const LiveInterval &other, - unsigned CopyIdx, - std::vector &Ranges) { - const LiveRange *SourceLR = getLiveRangeContaining(CopyIdx-1); - const LiveRange *DestLR = other.getLiveRangeContaining(CopyIdx); - assert(SourceLR && DestLR && "Not joining due to a copy?"); - unsigned OtherValIdx = SourceLR->ValId; - unsigned ThisValIdx = DestLR->ValId; - - Ranges::iterator i = ranges.begin(); - Ranges::iterator ie = ranges.end(); - Ranges::const_iterator j = other.ranges.begin(); - Ranges::const_iterator je = other.ranges.end(); - - if (i->start < j->start) { -i = std::upper_bound(i, ie, j->start); -if (i != ranges.begin()) --i; - } else if (j->start < i->start) { -j = std::upper_bound(j, je, i->start); -if (j != other.ranges.begin()) --j; - } - - while (i != ie && j != je) { -if (NontrivialOverlap(*i, *j, ThisValIdx, OtherValIdx)) - Ranges.push_back(&*i); - -if (i->end < j->end) - ++i; -else - ++j; - } -} - - - /// extendIntervalEndTo - This method is used when we want to extend the range /// specified by I to end at the specified endpoint. To do this, we should /// merge and eliminate all ranges that this will overlap with. The iterator is @@ -361,7 +266,7 @@ LiveInterval::iterator LiveInterval::FindLiveRangeContaining(unsigned Idx) { iterator It = std::upper_bound(begin(), end(), Idx); - if (It != ranges.begin()) { + if (It != begin()) { --It; if (It->contains(Idx)) return It; @@ -370,10 +275,13 @@ return end(); } -/// join - Join two live intervals (this, and other) together. This operation -/// is the result of a copy i
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.102 -> 1.103 --- Log message: Remove dead code. --- Diffs of the changes: (+0 -4) X86ISelDAGToDAG.cpp |4 1 files changed, 4 deletions(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.102 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.103 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.102 Tue Aug 29 13:37:37 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Tue Aug 29 16:42:58 2006 @@ -39,10 +39,6 @@ #include using namespace llvm; -#include "llvm/Support/CommandLine.h" -static cl::opt X86ISelPreproc("enable-x86-isel-preprocessing", cl::Hidden, - cl::desc("Enable isel preprocessing on X86")); - //===--===// // Pattern Matcher Implementation //===--===// ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/shift-coalesce.ll
Changes in directory llvm/test/Regression/CodeGen/X86: shift-coalesce.ll added (r1.1) --- Log message: new testcase for pr687: http://llvm.org/PR687 --- Diffs of the changes: (+11 -0) shift-coalesce.ll | 11 +++ 1 files changed, 11 insertions(+) Index: llvm/test/Regression/CodeGen/X86/shift-coalesce.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/shift-coalesce.ll:1.1 *** /dev/null Tue Aug 29 18:10:09 2006 --- llvm/test/Regression/CodeGen/X86/shift-coalesce.ll Tue Aug 29 18:09:59 2006 *** *** 0 --- 1,11 + ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'shld.*CL' && + ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | not grep 'mov CL, BL' + + ; PR687 + + ulong %foo(ulong %x, long* %X) { + %tmp.1 = load long* %X ; [#uses=1] + %tmp.3 = cast long %tmp.1 to ubyte ; [#uses=1] + %tmp.4 = shl ulong %x, ubyte %tmp.3 ; [#uses=1] + ret ulong %tmp.4 + } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/Makefile.programs
Changes in directory llvm-test: Makefile.programs updated: 1.222 -> 1.223 --- Log message: Check x86 llcbeta back to -enable-x86-fastcc --- Diffs of the changes: (+1 -1) Makefile.programs |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.222 llvm-test/Makefile.programs:1.223 --- llvm-test/Makefile.programs:1.222 Mon Aug 28 15:12:39 2006 +++ llvm-test/Makefile.programs Tue Aug 29 15:55:09 2006 @@ -203,7 +203,7 @@ LLCBETAOPTION := -sched=simple endif ifeq ($(ARCH),x86) -LLCBETAOPTION := -enable-x86-isel-preprocessing +LLCBETAOPTION := -enable-x86-fastcc endif ifeq ($(ARCH),Sparc) LLCBETAOPTION := -enable-sparc-v9-insts ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp
Changes in directory llvm/lib/Target/X86: X86ATTAsmPrinter.cpp updated: 1.57 -> 1.58 --- Log message: Minor asm fix. --- Diffs of the changes: (+3 -1) X86ATTAsmPrinter.cpp |4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ATTAsmPrinter.cpp diff -u llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.57 llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.58 --- llvm/lib/Target/X86/X86ATTAsmPrinter.cpp:1.57 Mon Aug 28 17:14:16 2006 +++ llvm/lib/Target/X86/X86ATTAsmPrinter.cppTue Aug 29 17:13:10 2006 @@ -252,7 +252,9 @@ return; } - if (DispSpec.isGlobalAddress() || DispSpec.isConstantPoolIndex()) { + if (DispSpec.isGlobalAddress() || + DispSpec.isConstantPoolIndex() || + DispSpec.isJumpTableIndex()) { printOperand(MI, Op+3, "mem"); } else { int DispVal = DispSpec.getImmedValue(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86AsmPrinter.h
Changes in directory llvm/lib/Target/X86: X86AsmPrinter.h updated: 1.26 -> 1.27 --- Log message: Minor asm fix. --- Diffs of the changes: (+2 -1) X86AsmPrinter.h |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86AsmPrinter.h diff -u llvm/lib/Target/X86/X86AsmPrinter.h:1.26 llvm/lib/Target/X86/X86AsmPrinter.h:1.27 --- llvm/lib/Target/X86/X86AsmPrinter.h:1.26Thu Aug 3 12:27:09 2006 +++ llvm/lib/Target/X86/X86AsmPrinter.h Tue Aug 29 17:14:48 2006 @@ -90,7 +90,8 @@ MI->getOperand(Op+2).isRegister() && (MI->getOperand(Op+3).isImmediate() || MI->getOperand(Op+3).isGlobalAddress() || - MI->getOperand(Op+3).isConstantPoolIndex()); + MI->getOperand(Op+3).isConstantPoolIndex() || + MI->getOperand(Op+3).isJumpTableIndex()); } }; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/bugpoint/ExtractFunction.cpp
Changes in directory llvm/tools/bugpoint: ExtractFunction.cpp updated: 1.51 -> 1.52 --- Log message: Code cleanups, no functionality change. --- Diffs of the changes: (+30 -36) ExtractFunction.cpp | 66 +++- 1 files changed, 30 insertions(+), 36 deletions(-) Index: llvm/tools/bugpoint/ExtractFunction.cpp diff -u llvm/tools/bugpoint/ExtractFunction.cpp:1.51 llvm/tools/bugpoint/ExtractFunction.cpp:1.52 --- llvm/tools/bugpoint/ExtractFunction.cpp:1.51Sun Aug 27 17:42:52 2006 +++ llvm/tools/bugpoint/ExtractFunction.cpp Tue Aug 29 18:38:20 2006 @@ -248,11 +248,11 @@ } } - RewriteUsesInNewModule - takes a Module and a reference to a globalvalue - (OrigVal) in that module and changes the reference to a different - globalvalue (NewVal) in a seperate module. +/// RewriteUsesInNewModule - Given a constant 'OrigVal' and a module 'OrigMod', +/// find all uses of the constant. If they are not in the specified module, +/// replace them with uses of another constant 'NewVal'. static void RewriteUsesInNewModule(Constant *OrigVal, Constant *NewVal, - Module *TargetMod) { + Module *OrigMod) { assert(OrigVal->getType() == NewVal->getType() && "Can't replace something with a different type"); for (Value::use_iterator UI = OrigVal->use_begin(), E = OrigVal->use_end(); @@ -260,20 +260,17 @@ Value::use_iterator TmpUI = UI++; User *U = *TmpUI; if (Instruction *Inst = dyn_cast(U)) { - Module *InstM = Inst->getParent()->getParent()->getParent(); - if (InstM != TargetMod) { - TmpUI.getUse() = NewVal; - } + if (Inst->getParent()->getParent()->getParent() != OrigMod) +TmpUI.getUse() = NewVal; } else if (GlobalVariable *GV = dyn_cast(U)) { - if (GV->getParent() != TargetMod) { + if (GV->getParent() != OrigMod) TmpUI.getUse() = NewVal; - } } else if (ConstantExpr *CE = dyn_cast(U)) { // If nothing uses this, don't bother making a copy. if (CE->use_empty()) continue; Constant *NewCE = CE->getWithOperandReplaced(TmpUI.getOperandNo(), NewVal); - RewriteUsesInNewModule(CE, NewCE, TargetMod); + RewriteUsesInNewModule(CE, NewCE, OrigMod); } else if (ConstantStruct *CS = dyn_cast(U)) { // If nothing uses this, don't bother making a copy. if (CS->use_empty()) continue; @@ -282,7 +279,7 @@ for (unsigned i = 0, e = CS->getNumOperands(); i != e; ++i) Ops.push_back(i == OpNo ? NewVal : CS->getOperand(i)); Constant *NewStruct = ConstantStruct::get(Ops); - RewriteUsesInNewModule(CS, NewStruct, TargetMod); + RewriteUsesInNewModule(CS, NewStruct, OrigMod); } else if (ConstantPacked *CP = dyn_cast(U)) { // If nothing uses this, don't bother making a copy. if (CP->use_empty()) continue; @@ -291,7 +288,7 @@ for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i) Ops.push_back(i == OpNo ? NewVal : CP->getOperand(i)); Constant *NewPacked = ConstantPacked::get(Ops); - RewriteUsesInNewModule(CP, NewPacked, TargetMod); + RewriteUsesInNewModule(CP, NewPacked, OrigMod); } else if (ConstantArray *CA = dyn_cast(U)) { // If nothing uses this, don't bother making a copy. if (CA->use_empty()) continue; @@ -301,7 +298,7 @@ Ops.push_back(i == OpNo ? NewVal : CA->getOperand(i)); } Constant *NewArray = ConstantArray::get(CA->getType(), Ops); - RewriteUsesInNewModule(CA, NewArray, TargetMod); + RewriteUsesInNewModule(CA, NewArray, OrigMod); } else { assert(0 && "Unexpected user"); } @@ -345,42 +342,38 @@ // Adding specified functions to new module... for (Module::iterator I = M->begin(), E = M->end(); I != E;) { OrigGlobals.push_back(I); -if(TestFunctions.count(std::make_pair(I->getName(), I->getType( { +if (TestFunctions.count(std::make_pair(I->getName(), I->getType( { Module::iterator tempI = I; I++; - Function * func = new Function(tempI->getFunctionType(), + Function *Func = new Function(tempI->getFunctionType(), GlobalValue::ExternalLinkage); - M->getFunctionList().insert(tempI, func); + M->getFunctionList().insert(tempI, Func); New->getFunctionList().splice(New->end(), M->getFunctionList(), tempI); - func->setName(tempI->getName()); - func->setCallingConv(tempI->getCallingConv()); - GlobalToPrototypeMap[tempI] = func; - // NEW TO OLD + Func->setName(tempI->getName()); + Func->setCallingConv(tempI->getCallingConv()); + GlobalToPrototypeMap[tempI] = Func; } else { - Function * func = new Function(I->getFunctionType(), +
[llvm-commits] CVS: llvm/lib/Support/Statistic.cpp
Changes in directory llvm/lib/Support: Statistic.cpp updated: 1.17 -> 1.18 --- Log message: Instantiate Statistic<> in one place, not in every .o file that uses it. --- Diffs of the changes: (+2 -0) Statistic.cpp |2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/Support/Statistic.cpp diff -u llvm/lib/Support/Statistic.cpp:1.17 llvm/lib/Support/Statistic.cpp:1.18 --- llvm/lib/Support/Statistic.cpp:1.17 Wed Jun 21 11:53:47 2006 +++ llvm/lib/Support/Statistic.cpp Tue Aug 29 23:17:00 2006 @@ -33,6 +33,8 @@ unsigned StatisticBase::NumStats = 0; +TEMPLATE_INSTANTIATION(class Statistic); + // -stats - Command line option to cause transformations to emit stats about // what they did. // ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/NightlyTester.php
Changes in directory nightlytest-serverside: NightlyTester.php updated: 1.18 -> 1.19 --- Log message: Fix typo --- Diffs of the changes: (+1 -1) NightlyTester.php |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: nightlytest-serverside/NightlyTester.php diff -u nightlytest-serverside/NightlyTester.php:1.18 nightlytest-serverside/NightlyTester.php:1.19 --- nightlytest-serverside/NightlyTester.php:1.18 Mon Aug 21 15:21:55 2006 +++ nightlytest-serverside/NightlyTester.phpTue Aug 29 15:48:07 2006 @@ -10,7 +10,7 @@ 'dejagnutime_cpu' => 'Dejagnu CPU Time', 'teststats_exppass' => 'Expected Test Passes', 'teststats_unexpfail' => 'Unexpected Test Failures', -'teststats_expfail' => 'Expected Test Failurs'); +'teststats_expfail' => 'Expected Test Failures'); /* * ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/llvmc/ll
Changes in directory llvm/tools/llvmc: ll updated: 1.7 -> 1.8 --- Log message: Delete a no-longer-supported configuration item. --- Diffs of the changes: (+0 -1) ll |1 - 1 files changed, 1 deletion(-) Index: llvm/tools/llvmc/ll diff -u llvm/tools/llvmc/ll:1.7 llvm/tools/llvmc/ll:1.8 --- llvm/tools/llvmc/ll:1.7 Wed May 18 19:52:29 2005 +++ llvm/tools/llvmc/ll Tue Aug 29 15:52:44 2006 @@ -4,7 +4,6 @@ preprocessor.command= preprocessor.required=false translator.command=%bindir%/llvm-as %in% -o %out% - translator.optimizes=no translator.preprocesses=true translator.required=TRUE optimizer.command=%bindir%/opt %in% -o %out% %opt% %args% ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/fabs.ll
Changes in directory llvm/test/Regression/CodeGen/X86: fabs.ll updated: 1.8 -> 1.9 --- Log message: This is also a 32-bit only test. x86-64 would pass fp parameters through XMM registers. --- Diffs of the changes: (+3 -0) fabs.ll |3 +++ 1 files changed, 3 insertions(+) Index: llvm/test/Regression/CodeGen/X86/fabs.ll diff -u llvm/test/Regression/CodeGen/X86/fabs.ll:1.8 llvm/test/Regression/CodeGen/X86/fabs.ll:1.9 --- llvm/test/Regression/CodeGen/X86/fabs.ll:1.8Tue May 23 19:49:32 2006 +++ llvm/test/Regression/CodeGen/X86/fabs.llTue Aug 29 17:01:39 2006 @@ -2,6 +2,9 @@ ; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse2,-sse3 | grep 'fabs$' | wc -l | grep 1 && ; RUN: llvm-as < %s | llc -march=x86 -mattr=-sse2,-sse3 -enable-unsafe-fp-math | grep 'fabs$' | wc -l | grep 2 +target endian = little +target pointersize = 32 + declare float %fabsf(float) float %fabsftest(float %X) { ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
Changes in directory llvm/lib/Transforms/Scalar: PredicateSimplifier.cpp updated: 1.1 -> 1.2 --- Log message: Move to using the EquivalenceClass ADT. Removes SynSets. If a branch's condition has become a ConstantBool, simplify it immediately. Removing the edge saves work and exposes up more optimization opportunities in the pass. Add support for SelectInst. --- Diffs of the changes: (+92 -165) PredicateSimplifier.cpp | 257 +--- 1 files changed, 92 insertions(+), 165 deletions(-) Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.1 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.2 --- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.1 Mon Aug 28 17:44:55 2006 +++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Tue Aug 29 21:46:48 2006 @@ -23,26 +23,20 @@ //===--===// // // This optimization works by substituting %q for %p when protected by a -// conditional that assures us of that fact. Equivalent variables are -// called SynSets; sets of synonyms. We maintain a mapping from Value * -// to the SynSet, and the SynSet maintains the best canonical form of the -// Value. -// -// Properties are stored as relationships between two SynSets. +// conditional that assures us of that fact. Properties are stored as +// relationships between two values. // //===--===// // TODO: -// * Handle SelectInst -// * Switch to EquivalenceClasses ADT // * Check handling of NAN in floating point types -// * Don't descend into false side of branches with ConstantBool condition. #define DEBUG_TYPE "predsimplify" #include "llvm/Transforms/Scalar.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Pass.h" +#include "llvm/ADT/EquivalenceClasses.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Analysis/Dominators.h" @@ -55,9 +49,11 @@ Statistic<> NumVarsReplaced("predsimplify", "Number of argument substitutions"); Statistic<> - NumResolved("predsimplify", "Number of instruction substitutions"); + NumInstruction("predsimplify", "Number of instructions removed"); Statistic<> NumSwitchCases("predsimplify", "Number of switch cases removed"); + Statistic<> + NumBranches("predsimplify", "Number of branches made unconditional"); /// Used for choosing the canonical Value in a synonym set. /// Leaves the better one in V1. Returns whether a swap took place. @@ -89,10 +85,8 @@ /// and fast lookup. Also stores the set of inequality relationships. class PropertySet { struct Property; +class EquivalenceClasses union_find; public: -typedef unsigned SynSet; -typedef std::map::iterator SynonymIterator; -typedef std::map::const_iterator ConstSynonymIterator; typedef std::vector::iterator PropertyIterator; typedef std::vector::const_iterator ConstPropertyIterator; @@ -107,133 +101,44 @@ } Value *lookup(Value *V) const { - ConstSynonymIterator SI = SynonymMap.find(V); - if (SI == SynonymMap.end()) return NULL; - - return Synonyms[SI->second]; -} - -Value *lookup(SynSet SS) const { - assert(SS < Synonyms.size()); - return Synonyms[SS]; -} - -// Find a SynSet for a given Value. -// -// Given the Value *V sets SS to a valid SynSet. Returns true if it -// found it. -bool findSynSet(Value *V, SynSet &SS) const { - ConstSynonymIterator SI = SynonymMap.find(V); - if (SI != SynonymMap.end()) { -SS = SI->second; -return true; - } - - std::vector::const_iterator I = - std::find(Synonyms.begin(), Synonyms.end(), V); - if (I != Synonyms.end()) { -SS = I-Synonyms.begin(); -return true; - } - - return false; + EquivalenceClasses::member_iterator SI = + union_find.findLeader(V); + if (SI == union_find.member_end()) return NULL; + return *SI; } bool empty() const { - return Synonyms.empty(); + return union_find.empty(); } void addEqual(Value *V1, Value *V2) { order(V1, V2); if (isa(V2)) return; // refuse to set false == true. - V1 = canonicalize(V1); - V2 = canonicalize(V2); - - if (V1 == V2) return; // already equivalent. - - SynSet I1, I2; - bool F1 = findSynSet(V1, I1), - F2 = findSynSet(V2, I2); - - DEBUG(std::cerr << "V1: " << *V1 << " I1: " << I1 - << " F1: " << F1 << "\n"); - DEBUG(std::cerr << "V2: " << *V2 << " I2: " << I2 - << " F2: " << F2 << "\n"); - - if (!F1 && !F2) { -SynSet SS = addSynSet(V1); -SynonymMap[V1] = SS; -SynonymMap[V2] = SS; - } - - else if (!F1 && F2) { -SynonymMap[V1] = I2;
[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll
Changes in directory llvm/test/Regression/CodeGen/X86: store_op_load_fold2.ll updated: 1.3 -> 1.4 --- Log message: Fix test case so it passes on x86-64. --- Diffs of the changes: (+3 -0) store_op_load_fold2.ll |3 +++ 1 files changed, 3 insertions(+) Index: llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll diff -u llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll:1.3 llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll:1.4 --- llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll:1.3 Tue Aug 29 13:49:41 2006 +++ llvm/test/Regression/CodeGen/X86/store_op_load_fold2.ll Tue Aug 29 16:49:58 2006 @@ -1,5 +1,8 @@ ; RUN: llvm-as < %s | llc -march=x86 -x86-asm-syntax=intel | grep 'and DWORD PTR' | wc -l | grep 2 +target endian = little +target pointersize = 32 + %struct.Macroblock = type { int, int, int, int, int, [8 x int], %struct.Macroblock*, %struct.Macroblock*, int, [2 x [4 x [4 x [2 x int, [16 x sbyte], [16 x sbyte], int, long, [4 x int], [4 x int], long, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, short, double, int, int, int, int, int, int, int, int, int } implementation ; Functions: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Analysis/LoopInfo.cpp
Changes in directory llvm/lib/Analysis: LoopInfo.cpp updated: 1.77 -> 1.78 --- Log message: Do not rely on std::sort and std::erase to get list of unique exit blocks. The output is dependent on addresses of basic block. Add and use Loop::getUniqueExitBlocks. --- Diffs of the changes: (+53 -0) LoopInfo.cpp | 53 + 1 files changed, 53 insertions(+) Index: llvm/lib/Analysis/LoopInfo.cpp diff -u llvm/lib/Analysis/LoopInfo.cpp:1.77 llvm/lib/Analysis/LoopInfo.cpp:1.78 --- llvm/lib/Analysis/LoopInfo.cpp:1.77 Sun Aug 27 17:30:17 2006 +++ llvm/lib/Analysis/LoopInfo.cpp Tue Aug 29 17:29:16 2006 @@ -349,6 +349,59 @@ ExitBlocks.push_back(*I); } +/// getUniqueExitBlocks - Return all unique successor blocks of this loop. These +/// are the blocks _outside of the current loop_ which are branched to. This +/// assumes that loop is in canonical form. +// +void Loop::getUniqueExitBlocks(std::vector &ExitBlocks) const { + // Sort the blocks vector so that we can use binary search to do quick + // lookups. + std::vector LoopBBs(block_begin(), block_end()); + std::sort(LoopBBs.begin(), LoopBBs.end()); + + std::vector switchExitBlocks; + + for (std::vector::const_iterator BI = Blocks.begin(), +BE = Blocks.end(); BI != BE; ++BI) { + +BasicBlock *current = *BI; +switchExitBlocks.clear(); + +for (succ_iterator I = succ_begin(*BI), E = succ_end(*BI); I != E; ++I) { + if (std::binary_search(LoopBBs.begin(), LoopBBs.end(), *I)) +// If block is inside the loop then it is not a exit block. +continue; + + pred_iterator PI = pred_begin(*I); + BasicBlock *firstPred = *PI; + + // If current basic block is this exit block's first predecessor + // then only insert exit block in to the output ExitBlocks vector. + // This ensures that same exit block is not inserted twice into + // ExitBlocks vector. + if (current != firstPred) +continue; + + // If a terminator has more then two successors, for example SwitchInst, + // then it is possible that there are multiple edges from current block + // to one exit block. + if (current->getTerminator()->getNumSuccessors() <= 2) { +ExitBlocks.push_back(*I); +continue; + } + + // In case of multiple edges from current block to exit block, collect + // only one edge in ExitBlocks. Use switchExitBlocks to keep track of + // duplicate edges. + if (std::find(switchExitBlocks.begin(), switchExitBlocks.end(), *I) + == switchExitBlocks.end()) { +switchExitBlocks.push_back(*I); +ExitBlocks.push_back(*I); + } +} + } +} + /// getLoopPreheader - If there is a preheader for this loop, return it. A /// loop has a preheader if there is only one edge to the header of the loop ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/ADT/Statistic.h
Changes in directory llvm/include/llvm/ADT: Statistic.h updated: 1.16 -> 1.17 --- Log message: Instantiate Statistic<> in one place, not in every .o file that uses it. --- Diffs of the changes: (+4 -1) Statistic.h |5 - 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/include/llvm/ADT/Statistic.h diff -u llvm/include/llvm/ADT/Statistic.h:1.16 llvm/include/llvm/ADT/Statistic.h:1.17 --- llvm/include/llvm/ADT/Statistic.h:1.16 Wed Jun 21 11:53:47 2006 +++ llvm/include/llvm/ADT/Statistic.h Tue Aug 29 23:17:00 2006 @@ -24,7 +24,8 @@ #ifndef LLVM_ADT_STATISTIC_H #define LLVM_ADT_STATISTIC_H -#include +#include +#include "llvm/Support/Compiler.h" namespace llvm { @@ -85,6 +86,8 @@ const Statistic &operator/=(const DataType &V) { Value /= V; return *this; } }; +EXTERN_TEMPLATE_INSTANTIATION(class Statistic); + } // End llvm namespace #endif ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h
Changes in directory llvm/include/llvm/CodeGen: SelectionDAG.h updated: 1.128 -> 1.129 --- Log message: fix 80 column issue --- Diffs of the changes: (+1 -1) SelectionDAG.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/SelectionDAG.h diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.128 llvm/include/llvm/CodeGen/SelectionDAG.h:1.129 --- llvm/include/llvm/CodeGen/SelectionDAG.h:1.128 Tue Aug 29 01:42:10 2006 +++ llvm/include/llvm/CodeGen/SelectionDAG.hWed Aug 30 00:56:52 2006 @@ -135,7 +135,7 @@ } - //===--===// + //======// // Node creation methods. // SDOperand getString(const std::string &Val); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.9 -> 1.10 --- Log message: Debugging newly pass fail report. --- Diffs of the changes: (+27 -23) ProgramResults.php | 50 +++--- 1 files changed, 27 insertions(+), 23 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.9 nightlytest-serverside/ProgramResults.php:1.10 --- nightlytest-serverside/ProgramResults.php:1.9 Tue Aug 22 12:26:12 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 13:47:30 2006 @@ -435,7 +435,7 @@ * Get New Tests * * This is somewhat of a hack because from night 684 forward we now store the test - * in their own table as oppoesd in the night table. + * in their own table as opposed in the night table. */ function getNewTests($cur_id, $prev_id, $mysql_link){ if(strcmp($prev_id, "")===0 || strcmp($cur_id, "")===0){ @@ -463,8 +463,9 @@ $query = "SELECT * FROM tests WHERE night=$cur_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if( !isset($test_hash["{$row['measure']} - {$row['program']}"])){ - $result .= "{$row['measure']} - {$row['program']}\n"; + $test_key = "{$row['measure']} - {$row['program']}"; + if(!isset($test_hash[$test_key])){ +$result .= $test_key . "\n"; } } mysql_free_result($program_query); @@ -476,7 +477,7 @@ * Get Removed Tests * * This is somewhat of a hack because from night 684 forward we now store the test - * in their own table as oppoesd in the night table. + * in their own table as opposed in the night table. */ function getRemovedTests($cur_id, $prev_id, $mysql_link){ if(strcmp($prev_id, "")===0 || strcmp($cur_id, "")===0){ @@ -494,18 +495,19 @@ } else{ $test_hash=array(); -$query = "SELECT * FROM tests WHERE night=$cur_id"; +$query = "SELECT * FROM tests WHERE night=$prev_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_hash["{$row['measure']} - {$row['program']}"]=1; } mysql_free_result($program_query); -$query = "SELECT * FROM tests WHERE night=$prev_id"; +$query = "SELECT * FROM tests WHERE night=$cur_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if( !isset($test_hash["{$row['measure']} - {$row['program']}"])){ - $result .= "{$row['measure']} - {$row['program']}\n"; + $test_key = "{$row['measure']} - {$row['program']}"; + if(!isset($test_hash[$test_key])){ +$result .= $test_key . "\n"; } } mysql_free_result($program_query); @@ -517,7 +519,7 @@ * Get Fixed Tests * * This is somewhat of a hack because from night 684 forward we now store the test - * in their own table as oppoesd in the night table. + * in their own table as opposed in the night table. */ function getFixedTests($cur_id, $prev_id, $mysql_link){ if(strcmp($prev_id, "")===0 || strcmp($cur_id, "")===0){ @@ -535,21 +537,22 @@ } else{ $test_hash=array(); -$query = "SELECT * FROM tests WHERE night=$cur_id"; +$query = "SELECT * FROM tests WHERE night=$prev_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if(strcmp("{$row['result']}", "PASS")===0){ + if(strcmp("{$row['result']}", "PASS")!==0){ $test_hash["{$row['measure']} - {$row['program']}"]=$row['result']; } } mysql_free_result($program_query); -$query = "SELECT * FROM tests WHERE night=$prev_id"; +$query = "SELECT * FROM tests WHERE night=$cur_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if( isset($test_hash["{$row['measure']} - {$row['program']}"]) && - strcmp($test_hash["{$row['measure']} - {$row['program']}"], $row['result'])!==0){ - $result .= "{$row['measure']} - {$row['program']}\n"; + $test_key = "{$row['measure']} - {$row['program']}"; + if(isset($test_hash[$test_key]) && + strcmp($test_hash[$test_key], $row['result'])!==0){ +$result .= $test_key . "\n"; } } mysql_free_result($program_query); @@ -579,21 +582,22 @@ } else{ $test_hash=array(); -$query = "SELECT * FROM tests WHERE night=$prev_id"; +$query = "SELECT * FROM tests WHERE night=$cur_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if(strcmp("{$row['result']}", "PASS")===0){ + if(strcmp("{$row['result']}", "PASS")!==0){ $test_hash["{$row['measure']} - {$row['program']}"]=$row['result']; - } + } } mysql_free_result($program_quer
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.10 -> 1.11 --- Log message: Debugging newly pass fail report attempt #2. --- Diffs of the changes: (+2 -2) ProgramResults.php |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.10 nightlytest-serverside/ProgramResults.php:1.11 --- nightlytest-serverside/ProgramResults.php:1.10 Wed Aug 30 13:47:30 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 13:51:55 2006 @@ -495,14 +495,14 @@ } else{ $test_hash=array(); -$query = "SELECT * FROM tests WHERE night=$prev_id"; +$query = "SELECT * FROM tests WHERE night=$cur_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_hash["{$row['measure']} - {$row['program']}"]=1; } mysql_free_result($program_query); -$query = "SELECT * FROM tests WHERE night=$cur_id"; +$query = "SELECT * FROM tests WHERE night=$prev_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['measure']} - {$row['program']}"; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.11 -> 1.12 --- Log message: Debugging newly pass fail report attempt #3. --- Diffs of the changes: (+4 -2) ProgramResults.php |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.11 nightlytest-serverside/ProgramResults.php:1.12 --- nightlytest-serverside/ProgramResults.php:1.11 Wed Aug 30 13:51:55 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 14:39:51 2006 @@ -552,8 +552,9 @@ $test_key = "{$row['measure']} - {$row['program']}"; if(isset($test_hash[$test_key]) && strcmp($test_hash[$test_key], $row['result'])!==0){ -$result .= $test_key . "\n"; +//$result .= $test_key . "\n"; } + $result .= $test_key . "\n"; } mysql_free_result($program_query); } @@ -597,8 +598,9 @@ $test_key = "{$row['measure']} - {$row['program']}"; if(isset($test_hash[$test_key]) && strcmp($test_hash[$test_key], $row['result'])!==0){ -$result .= $test_key . "\n"; +//$result .= $test_key . "\n"; } + $result .= $test_key . "\n"; } mysql_free_result($program_query); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.12 -> 1.13 --- Log message: Debugging newly pass fail report attempt #4. --- Diffs of the changes: (+2 -4) ProgramResults.php |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.12 nightlytest-serverside/ProgramResults.php:1.13 --- nightlytest-serverside/ProgramResults.php:1.12 Wed Aug 30 14:39:51 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 14:41:33 2006 @@ -552,9 +552,8 @@ $test_key = "{$row['measure']} - {$row['program']}"; if(isset($test_hash[$test_key]) && strcmp($test_hash[$test_key], $row['result'])!==0){ -//$result .= $test_key . "\n"; +$result .= $test_key . "\n"; } - $result .= $test_key . "\n"; } mysql_free_result($program_query); } @@ -598,9 +597,8 @@ $test_key = "{$row['measure']} - {$row['program']}"; if(isset($test_hash[$test_key]) && strcmp($test_hash[$test_key], $row['result'])!==0){ -//$result .= $test_key . "\n"; +$result .= $test_key . "\n"; } - $result .= $test_key . "\n"; } mysql_free_result($program_query); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/System/DynamicLibrary.cpp
Changes in directory llvm/lib/System: DynamicLibrary.cpp updated: 1.17 -> 1.18 --- Log message: Guess what happens when asserts are disabled. :( Also, the assert could never fire due to || instead of &&. --- Diffs of the changes: (+2 -1) DynamicLibrary.cpp |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/System/DynamicLibrary.cpp diff -u llvm/lib/System/DynamicLibrary.cpp:1.17 llvm/lib/System/DynamicLibrary.cpp:1.18 --- llvm/lib/System/DynamicLibrary.cpp:1.17 Fri Aug 25 14:54:53 2006 +++ llvm/lib/System/DynamicLibrary.cpp Wed Aug 30 15:37:06 2006 @@ -48,7 +48,8 @@ static inline void check_ltdl_initialization() { static bool did_initialize_ltdl = false; if (!did_initialize_ltdl) { -assert(0 == lt_dlinit() || "Can't init the ltdl library"); +int Err = lt_dlinit(); +assert(0 == Err && "Can't init the ltdl library"); did_initialize_ltdl = true; } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Bytecode/Reader.h
Changes in directory llvm/include/llvm/Bytecode: Reader.h updated: 1.26 -> 1.27 --- Log message: Restore source-level compatibility with clients of these functions. --- Diffs of the changes: (+6 -6) Reader.h | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/include/llvm/Bytecode/Reader.h diff -u llvm/include/llvm/Bytecode/Reader.h:1.26 llvm/include/llvm/Bytecode/Reader.h:1.27 --- llvm/include/llvm/Bytecode/Reader.h:1.26Fri Aug 25 12:43:11 2006 +++ llvm/include/llvm/Bytecode/Reader.h Wed Aug 30 15:47:48 2006 @@ -36,7 +36,7 @@ /// @brief Get a ModuleProvide for a bytecode file. ModuleProvider *getBytecodeModuleProvider( const std::string &Filename, ///< Name of file to be read - std::string* ErrMsg, ///< Optional error message holder + std::string* ErrMsg = 0, ///< Optional error message holder BytecodeHandler* H = 0///< Optional handler for reader events ); @@ -49,8 +49,8 @@ const unsigned char *Buffer,///< Start of buffer to parse unsigned BufferSize,///< Size of the buffer const std::string &ModuleID,///< Name to give the module - std::string* ErrMsg,///< Optional place to return an error message - BytecodeHandler* H ///< Optional handler for reader events + std::string* ErrMsg = 0,///< Optional place to return an error message + BytecodeHandler* H = 0 ///< Optional handler for reader events ); /// This is the main interface to bytecode parsing. It opens the file specified @@ -84,7 +84,7 @@ bool GetBytecodeDependentLibraries( const std::string &fileName, ///< File name to read bytecode from Module::LibraryListType& deplibs, ///< List of dependent libraries extracted - std::string* ErrMsg///< Optional error message holder + std::string* ErrMsg = 0///< Optional error message holder ); /// This function will read only the necessary parts of a bytecode file in order @@ -96,7 +96,7 @@ bool GetBytecodeSymbols( const sys::Path& fileName, ///< Filename to read bytecode from std::vector& syms, ///< Vector to return symbols in - std::string* ErrMsg ///< Optional error message holder + std::string* ErrMsg = 0 ///< Optional error message holder ); /// This function will read only the necessary parts of a bytecode buffer in @@ -111,7 +111,7 @@ unsigned Length, ///< The length of \p Buffer const std::string& ModuleID, ///< An identifier for the module std::vector& symbols, ///< The symbols defined in the module - std::string* ErrMsg///< Optional error message holder + std::string* ErrMsg = 0///< Optional error message holder ); } // End llvm namespace ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] CVS: llvm/lib/System/DynamicLibrary.cpp
Oops! On Wed, 2006-08-30 at 15:37 -0500, Chris Lattner wrote: > > Changes in directory llvm/lib/System: > > DynamicLibrary.cpp updated: 1.17 -> 1.18 > --- > Log message: > > Guess what happens when asserts are disabled. :( > > Also, the assert could never fire due to || instead of &&. > > > --- > Diffs of the changes: (+2 -1) > > DynamicLibrary.cpp |3 ++- > 1 files changed, 2 insertions(+), 1 deletion(-) > > > Index: llvm/lib/System/DynamicLibrary.cpp > diff -u llvm/lib/System/DynamicLibrary.cpp:1.17 > llvm/lib/System/DynamicLibrary.cpp:1.18 > --- llvm/lib/System/DynamicLibrary.cpp:1.17 Fri Aug 25 14:54:53 2006 > +++ llvm/lib/System/DynamicLibrary.cppWed Aug 30 15:37:06 2006 > @@ -48,7 +48,8 @@ > static inline void check_ltdl_initialization() { >static bool did_initialize_ltdl = false; >if (!did_initialize_ltdl) { > -assert(0 == lt_dlinit() || "Can't init the ltdl library"); > +int Err = lt_dlinit(); > +assert(0 == Err && "Can't init the ltdl library"); > did_initialize_ltdl = true; >} > } > > > > ___ > llvm-commits mailing list > llvm-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Reader.h
Personally, I consider this "compatibility" to be wrong since it allows callers to avoid the error message. We should report errors that occur. Reid. On Wed, 2006-08-30 at 15:48 -0500, Chris Lattner wrote: > > Changes in directory llvm/include/llvm/Bytecode: > > Reader.h updated: 1.26 -> 1.27 > --- > Log message: > > Restore source-level compatibility with clients of these functions. > > > --- > Diffs of the changes: (+6 -6) > > Reader.h | 12 ++-- > 1 files changed, 6 insertions(+), 6 deletions(-) > > > Index: llvm/include/llvm/Bytecode/Reader.h > diff -u llvm/include/llvm/Bytecode/Reader.h:1.26 > llvm/include/llvm/Bytecode/Reader.h:1.27 > --- llvm/include/llvm/Bytecode/Reader.h:1.26 Fri Aug 25 12:43:11 2006 > +++ llvm/include/llvm/Bytecode/Reader.h Wed Aug 30 15:47:48 2006 > @@ -36,7 +36,7 @@ > /// @brief Get a ModuleProvide for a bytecode file. > ModuleProvider *getBytecodeModuleProvider( >const std::string &Filename, ///< Name of file to be read > - std::string* ErrMsg, ///< Optional error message holder > + std::string* ErrMsg = 0, ///< Optional error message holder >BytecodeHandler* H = 0///< Optional handler for reader events > ); > > @@ -49,8 +49,8 @@ >const unsigned char *Buffer,///< Start of buffer to parse >unsigned BufferSize,///< Size of the buffer >const std::string &ModuleID,///< Name to give the module > - std::string* ErrMsg,///< Optional place to return an error > message > - BytecodeHandler* H ///< Optional handler for reader events > + std::string* ErrMsg = 0,///< Optional place to return an error > message > + BytecodeHandler* H = 0 ///< Optional handler for reader events > ); > > /// This is the main interface to bytecode parsing. It opens the file > specified > @@ -84,7 +84,7 @@ > bool GetBytecodeDependentLibraries( >const std::string &fileName, ///< File name to read bytecode from >Module::LibraryListType& deplibs, ///< List of dependent libraries > extracted > - std::string* ErrMsg///< Optional error message holder > + std::string* ErrMsg = 0///< Optional error message holder > ); > > /// This function will read only the necessary parts of a bytecode file in > order > @@ -96,7 +96,7 @@ > bool GetBytecodeSymbols( >const sys::Path& fileName, ///< Filename to read bytecode from >std::vector& syms, ///< Vector to return symbols in > - std::string* ErrMsg ///< Optional error message holder > + std::string* ErrMsg = 0 ///< Optional error message holder > ); > > /// This function will read only the necessary parts of a bytecode buffer in > @@ -111,7 +111,7 @@ >unsigned Length, ///< The length of \p Buffer >const std::string& ModuleID, ///< An identifier for the module >std::vector& symbols, ///< The symbols defined in the module > - std::string* ErrMsg///< Optional error message holder > + std::string* ErrMsg = 0///< Optional error message holder > ); > > } // End llvm namespace > > > > ___ > llvm-commits mailing list > llvm-commits@cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.13 -> 1.14 --- Log message: Debugging newly pass fail report attempt #5. --- Diffs of the changes: (+42 -0) ProgramResults.php | 42 ++ 1 files changed, 42 insertions(+) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.13 nightlytest-serverside/ProgramResults.php:1.14 --- nightlytest-serverside/ProgramResults.php:1.13 Wed Aug 30 14:41:33 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 15:56:51 2006 @@ -556,6 +556,27 @@ } } mysql_free_result($program_query); + +$test_hash=array(); +$query = "SELECT * FROM program WHERE night=$prev_id"; +$program_query = mysql_query($query) or die (mysql_error()); +while($row = mysql_fetch_array($program_query)){ + if(strcmp("{$row['result']}", "PASS")!==0){ +$test_hash["{$row['measure']} - {$row['program']}"]=$row['result']; + } +} +mysql_free_result($program_query); + +$query = "SELECT * FROM program WHERE night=$cur_id"; +$program_query = mysql_query($query) or die (mysql_error()); +while($row = mysql_fetch_array($program_query)){ + $test_key = "{$row['measure']} - {$row['program']}"; + if(isset($test_hash[$test_key]) && + strcmp($test_hash[$test_key], $row['result'])!==0){ +$result .= $test_key . "\n"; + } +} +mysql_free_result($program_query); } return $result; } @@ -601,6 +622,27 @@ } } mysql_free_result($program_query); + +$test_hash=array(); +$query = "SELECT * FROM program WHERE night=$cur_id"; +$program_query = mysql_query($query) or die (mysql_error()); +while($row = mysql_fetch_array($program_query)){ + if(strcmp("{$row['result']}", "PASS")!==0){ +$test_hash["{$row['measure']} - {$row['program']}"]=$row['result']; + } +} +mysql_free_result($program_query); + +$query = "SELECT * FROM program WHERE night=$prev_id"; +$program_query = mysql_query($query) or die (mysql_error()); +while($row = mysql_fetch_array($program_query)){ + $test_key = "{$row['measure']} - {$row['program']}"; + if(isset($test_hash[$test_key]) && + strcmp($test_hash[$test_key], $row['result'])!==0){ +$result .= $test_key . "\n"; + } +} +mysql_free_result($program_query); } return $result; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Reader.h
On Wed, 30 Aug 2006, Reid Spencer wrote: Personally, I consider this "compatibility" to be wrong since it allows callers to avoid the error message. We should report errors that occur. Depends on the client. In this case, it was a gratuitous source-level incompatibility... -Chris On Wed, 2006-08-30 at 15:48 -0500, Chris Lattner wrote: Changes in directory llvm/include/llvm/Bytecode: Reader.h updated: 1.26 -> 1.27 --- Log message: Restore source-level compatibility with clients of these functions. --- Diffs of the changes: (+6 -6) Reader.h | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/include/llvm/Bytecode/Reader.h diff -u llvm/include/llvm/Bytecode/Reader.h:1.26 llvm/include/llvm/Bytecode/Reader.h:1.27 --- llvm/include/llvm/Bytecode/Reader.h:1.26Fri Aug 25 12:43:11 2006 +++ llvm/include/llvm/Bytecode/Reader.h Wed Aug 30 15:47:48 2006 @@ -36,7 +36,7 @@ /// @brief Get a ModuleProvide for a bytecode file. ModuleProvider *getBytecodeModuleProvider( const std::string &Filename, ///< Name of file to be read - std::string* ErrMsg, ///< Optional error message holder + std::string* ErrMsg = 0, ///< Optional error message holder BytecodeHandler* H = 0///< Optional handler for reader events ); @@ -49,8 +49,8 @@ const unsigned char *Buffer,///< Start of buffer to parse unsigned BufferSize,///< Size of the buffer const std::string &ModuleID,///< Name to give the module - std::string* ErrMsg,///< Optional place to return an error message - BytecodeHandler* H ///< Optional handler for reader events + std::string* ErrMsg = 0,///< Optional place to return an error message + BytecodeHandler* H = 0 ///< Optional handler for reader events ); /// This is the main interface to bytecode parsing. It opens the file specified @@ -84,7 +84,7 @@ bool GetBytecodeDependentLibraries( const std::string &fileName, ///< File name to read bytecode from Module::LibraryListType& deplibs, ///< List of dependent libraries extracted - std::string* ErrMsg///< Optional error message holder + std::string* ErrMsg = 0///< Optional error message holder ); /// This function will read only the necessary parts of a bytecode file in order @@ -96,7 +96,7 @@ bool GetBytecodeSymbols( const sys::Path& fileName, ///< Filename to read bytecode from std::vector& syms, ///< Vector to return symbols in - std::string* ErrMsg ///< Optional error message holder + std::string* ErrMsg = 0 ///< Optional error message holder ); /// This function will read only the necessary parts of a bytecode buffer in @@ -111,7 +111,7 @@ unsigned Length, ///< The length of \p Buffer const std::string& ModuleID, ///< An identifier for the module std::vector& symbols, ///< The symbols defined in the module - std::string* ErrMsg///< Optional error message holder + std::string* ErrMsg = 0///< Optional error message holder ); } // End llvm namespace ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits -Chris -- http://nondot.org/sabre/ http://llvm.org/ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.14 -> 1.15 --- Log message: Debugging newly pass fail report attempt #6. --- Diffs of the changes: (+6 -6) ProgramResults.php | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.14 nightlytest-serverside/ProgramResults.php:1.15 --- nightlytest-serverside/ProgramResults.php:1.14 Wed Aug 30 15:56:51 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 16:00:05 2006 @@ -546,7 +546,7 @@ } mysql_free_result($program_query); -$query = "SELECT * FROM tests WHERE night=$cur_id"; +$query = "SELECT * FROM tests WHERE night=$cur_id ORDER BY program ASC" ; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['measure']} - {$row['program']}"; @@ -567,7 +567,7 @@ } mysql_free_result($program_query); -$query = "SELECT * FROM program WHERE night=$cur_id"; +$query = "SELECT * FROM program WHERE night=$cur_id ORDER BY program ASC"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['measure']} - {$row['program']}"; @@ -612,7 +612,7 @@ } mysql_free_result($program_query); -$query = "SELECT * FROM tests WHERE night=$prev_id"; +$query = "SELECT * FROM tests WHERE night=$prev_id ORDER BY program ASC"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['measure']} - {$row['program']}"; @@ -628,15 +628,15 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ if(strcmp("{$row['result']}", "PASS")!==0){ -$test_hash["{$row['measure']} - {$row['program']}"]=$row['result']; +$test_hash["{$row['program']}"]=$row['result']; } } mysql_free_result($program_query); -$query = "SELECT * FROM program WHERE night=$prev_id"; +$query = "SELECT * FROM program WHERE night=$prev_id ORDER BY program ASC"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - $test_key = "{$row['measure']} - {$row['program']}"; + $test_key = "{$row['program']}"; if(isset($test_hash[$test_key]) && strcmp($test_hash[$test_key], $row['result'])!==0){ $result .= $test_key . "\n"; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.15 -> 1.16 --- Log message: Debugging newly pass fail report attempt #7. --- Diffs of the changes: (+8 -6) ProgramResults.php | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.15 nightlytest-serverside/ProgramResults.php:1.16 --- nightlytest-serverside/ProgramResults.php:1.15 Wed Aug 30 16:00:05 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 16:08:06 2006 @@ -460,7 +460,7 @@ } mysql_free_result($program_query); -$query = "SELECT * FROM tests WHERE night=$cur_id"; +$query = "SELECT * FROM tests WHERE night=$cur_id ORDER BY program ASC"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['measure']} - {$row['program']}"; @@ -502,7 +502,7 @@ } mysql_free_result($program_query); -$query = "SELECT * FROM tests WHERE night=$prev_id"; +$query = "SELECT * FROM tests WHERE night=$prev_id ORDER BY program ASC"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['measure']} - {$row['program']}"; @@ -562,7 +562,7 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ if(strcmp("{$row['result']}", "PASS")!==0){ -$test_hash["{$row['measure']} - {$row['program']}"]=$row['result']; +$test_hash["{$row['program']}"]=$row['result']; } } mysql_free_result($program_query); @@ -570,10 +570,11 @@ $query = "SELECT * FROM program WHERE night=$cur_id ORDER BY program ASC"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - $test_key = "{$row['measure']} - {$row['program']}"; + $test_key = "{$row['program']}"; if(isset($test_hash[$test_key]) && strcmp($test_hash[$test_key], $row['result'])!==0){ -$result .= $test_key . "\n"; +// $result .= $test_key . "\n"; +$result .= $row['result'] . ":" . $test_key . "\n"; } } mysql_free_result($program_query); @@ -639,7 +640,8 @@ $test_key = "{$row['program']}"; if(isset($test_hash[$test_key]) && strcmp($test_hash[$test_key], $row['result'])!==0){ -$result .= $test_key . "\n"; +// $result .= $test_key . "\n"; +$result .= $row['result'] . ":" . $test_key . "\n"; } } mysql_free_result($program_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.16 -> 1.17 --- Log message: Debugging newly pass fail report attempt #8. --- Diffs of the changes: (+7 -11) ProgramResults.php | 18 +++--- 1 files changed, 7 insertions(+), 11 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.16 nightlytest-serverside/ProgramResults.php:1.17 --- nightlytest-serverside/ProgramResults.php:1.16 Wed Aug 30 16:08:06 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 16:20:01 2006 @@ -561,7 +561,7 @@ $query = "SELECT * FROM program WHERE night=$prev_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if(strcmp("{$row['result']}", "PASS")!==0){ + if("{$row['result']}" !~ \\*\){ $test_hash["{$row['program']}"]=$row['result']; } } @@ -571,10 +571,8 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['program']}"; - if(isset($test_hash[$test_key]) && - strcmp($test_hash[$test_key], $row['result'])!==0){ -// $result .= $test_key . "\n"; -$result .= $row['result'] . ":" . $test_key . "\n"; + if(isset($test_hash[$test_key]) && "{$row['result']}" =~ \\*\){ +$result .= $test_key . "\n"; } } mysql_free_result($program_query); @@ -628,8 +626,8 @@ $query = "SELECT * FROM program WHERE night=$cur_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if(strcmp("{$row['result']}", "PASS")!==0){ -$test_hash["{$row['program']}"]=$row['result']; + if("{$row['result']}" =~ \\*\){ +$test_hash["{$row['program']}"]=1; } } mysql_free_result($program_query); @@ -638,10 +636,8 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['program']}"; - if(isset($test_hash[$test_key]) && - strcmp($test_hash[$test_key], $row['result'])!==0){ -// $result .= $test_key . "\n"; -$result .= $row['result'] . ":" . $test_key . "\n"; + if(isset($test_hash[$test_key]) && "{$row['result']}" !~ \\*\){ +$result .= $test_key . "\n"; } } mysql_free_result($program_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.17 -> 1.18 --- Log message: Debugging newly pass fail report attempt #9. --- Diffs of the changes: (+4 -4) ProgramResults.php |8 1 files changed, 4 insertions(+), 4 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.17 nightlytest-serverside/ProgramResults.php:1.18 --- nightlytest-serverside/ProgramResults.php:1.17 Wed Aug 30 16:20:01 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 16:29:31 2006 @@ -561,7 +561,7 @@ $query = "SELECT * FROM program WHERE night=$prev_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if("{$row['result']}" !~ \\*\){ + if(strpos("{$row['result']}", "*") !== false) { $test_hash["{$row['program']}"]=$row['result']; } } @@ -571,7 +571,7 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['program']}"; - if(isset($test_hash[$test_key]) && "{$row['result']}" =~ \\*\){ + if(isset($test_hash[$test_key]) && strpos("{$row['result']}", "*") === false){ $result .= $test_key . "\n"; } } @@ -626,7 +626,7 @@ $query = "SELECT * FROM program WHERE night=$cur_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if("{$row['result']}" =~ \\*\){ + if(strpos("{$row['result']}", "*") === false) { $test_hash["{$row['program']}"]=1; } } @@ -636,7 +636,7 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['program']}"; - if(isset($test_hash[$test_key]) && "{$row['result']}" !~ \\*\){ + if(isset($test_hash[$test_key]) && strpos("{$row['result']}", "*") !== false){ $result .= $test_key . "\n"; } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.18 -> 1.19 --- Log message: Debugging newly pass fail report attempt #10. --- Diffs of the changes: (+2 -2) ProgramResults.php |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.18 nightlytest-serverside/ProgramResults.php:1.19 --- nightlytest-serverside/ProgramResults.php:1.18 Wed Aug 30 16:29:31 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 16:36:23 2006 @@ -561,7 +561,7 @@ $query = "SELECT * FROM program WHERE night=$prev_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if(strpos("{$row['result']}", "*") !== false) { + if(!(strpos("{$row['result']}", "*") === false)) { $test_hash["{$row['program']}"]=$row['result']; } } @@ -636,7 +636,7 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['program']}"; - if(isset($test_hash[$test_key]) && strpos("{$row['result']}", "*") !== false){ + if(isset($test_hash[$test_key]) && !(strpos("{$row['result']}", "*") === false)){ $result .= $test_key . "\n"; } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.19 -> 1.20 --- Log message: Debugging newly pass fail report attempt #11. --- Diffs of the changes: (+2 -2) ProgramResults.php |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.19 nightlytest-serverside/ProgramResults.php:1.20 --- nightlytest-serverside/ProgramResults.php:1.19 Wed Aug 30 16:36:23 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 16:38:51 2006 @@ -507,7 +507,7 @@ while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['measure']} - {$row['program']}"; if(!isset($test_hash[$test_key])){ -$result .= $test_key . "\n"; +$result .= "{$row['result']}" . ":" . $test_key . "\n"; } } mysql_free_result($program_query); @@ -572,7 +572,7 @@ while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['program']}"; if(isset($test_hash[$test_key]) && strpos("{$row['result']}", "*") === false){ -$result .= $test_key . "\n"; +$result .= "{$row['result']}" . ":" . $test_key . "\n"; } } mysql_free_result($program_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.20 -> 1.21 --- Log message: Debugging newly pass fail report attempt #12. --- Diffs of the changes: (+11 -11) ProgramResults.php | 22 +++--- 1 files changed, 11 insertions(+), 11 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.20 nightlytest-serverside/ProgramResults.php:1.21 --- nightlytest-serverside/ProgramResults.php:1.20 Wed Aug 30 16:38:51 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 16:50:06 2006 @@ -507,7 +507,7 @@ while($row = mysql_fetch_array($program_query)){ $test_key = "{$row['measure']} - {$row['program']}"; if(!isset($test_hash[$test_key])){ -$result .= "{$row['result']}" . ":" . $test_key . "\n"; +$result .= $test_key . "\n"; } } mysql_free_result($program_query); @@ -561,8 +561,8 @@ $query = "SELECT * FROM program WHERE night=$prev_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if(!(strpos("{$row['result']}", "*") === false)) { -$test_hash["{$row['program']}"]=$row['result']; + if(!(strpos($row['result'], "*") === false)) { +$test_hash[$row['program']]=$row['result']; } } mysql_free_result($program_query); @@ -570,9 +570,9 @@ $query = "SELECT * FROM program WHERE night=$cur_id ORDER BY program ASC"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - $test_key = "{$row['program']}"; - if(isset($test_hash[$test_key]) && strpos("{$row['result']}", "*") === false){ -$result .= "{$row['result']}" . ":" . $test_key . "\n"; + $test_key = $row['program']; + if(isset($test_hash[$test_key]) && strpos($row['result'], "*") === false){ +$result .= $row['result'] . ":" . $test_key . "\n"; } } mysql_free_result($program_query); @@ -626,8 +626,8 @@ $query = "SELECT * FROM program WHERE night=$cur_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if(strpos("{$row['result']}", "*") === false) { -$test_hash["{$row['program']}"]=1; + if(strpos($row['result'], "*") === false) { +$test_hash[$row['program']]=1; } } mysql_free_result($program_query); @@ -635,9 +635,9 @@ $query = "SELECT * FROM program WHERE night=$prev_id ORDER BY program ASC"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - $test_key = "{$row['program']}"; - if(isset($test_hash[$test_key]) && !(strpos("{$row['result']}", "*") === false)){ -$result .= $test_key . "\n"; + $test_key = $row['program']; + if(isset($test_hash[$test_key]) && !(strpos($row['result'], "*") === false)){ +$result .= $row['result'] . ":" . $test_key . "\n"; } } mysql_free_result($program_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.21 -> 1.22 --- Log message: Debugging newly pass fail report attempt #13. --- Diffs of the changes: (+4 -4) ProgramResults.php |8 1 files changed, 4 insertions(+), 4 deletions(-) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.21 nightlytest-serverside/ProgramResults.php:1.22 --- nightlytest-serverside/ProgramResults.php:1.21 Wed Aug 30 16:50:06 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 16:54:55 2006 @@ -572,7 +572,7 @@ while($row = mysql_fetch_array($program_query)){ $test_key = $row['program']; if(isset($test_hash[$test_key]) && strpos($row['result'], "*") === false){ -$result .= $row['result'] . ":" . $test_key . "\n"; +$result .= $test_key . "\n"; } } mysql_free_result($program_query); @@ -626,7 +626,7 @@ $query = "SELECT * FROM program WHERE night=$cur_id"; $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ - if(strpos($row['result'], "*") === false) { + if(!(strpos($row['result'], "*") === false)) { $test_hash[$row['program']]=1; } } @@ -636,8 +636,8 @@ $program_query = mysql_query($query) or die (mysql_error()); while($row = mysql_fetch_array($program_query)){ $test_key = $row['program']; - if(isset($test_hash[$test_key]) && !(strpos($row['result'], "*") === false)){ -$result .= $row['result'] . ":" . $test_key . "\n"; + if(isset($test_hash[$test_key]) && strpos($row['result'], "*") === false){ +$result .= $test_key . "\n"; } } mysql_free_result($program_query); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: nightlytest-serverside/ProgramResults.php
Changes in directory nightlytest-serverside: ProgramResults.php updated: 1.22 -> 1.23 --- Log message: New/Dropped/Pass/Fail working for llvm-test. --- Diffs of the changes: (+36 -0) ProgramResults.php | 36 1 files changed, 36 insertions(+) Index: nightlytest-serverside/ProgramResults.php diff -u nightlytest-serverside/ProgramResults.php:1.22 nightlytest-serverside/ProgramResults.php:1.23 --- nightlytest-serverside/ProgramResults.php:1.22 Wed Aug 30 16:54:55 2006 +++ nightlytest-serverside/ProgramResults.php Wed Aug 30 17:08:42 2006 @@ -469,6 +469,24 @@ } } mysql_free_result($program_query); + +$test_hash=array(); +$query = "SELECT * FROM program WHERE night=$prev_id"; +$program_query = mysql_query($query) or die (mysql_error()); +while($row = mysql_fetch_array($program_query)){ + $test_hash[$row['program']]=1; +} +mysql_free_result($program_query); + +$query = "SELECT * FROM program WHERE night=$cur_id ORDER BY program ASC"; +$program_query = mysql_query($query) or die (mysql_error()); +while($row = mysql_fetch_array($program_query)){ + $test_key = $row['program']; + if(!isset($test_hash[$test_key])){ +$result .= $test_key . "\n"; + } +} +mysql_free_result($program_query); } return $result; } @@ -511,6 +529,24 @@ } } mysql_free_result($program_query); + +$test_hash=array(); +$query = "SELECT * FROM program WHERE night=$cur_id"; +$program_query = mysql_query($query) or die (mysql_error()); +while($row = mysql_fetch_array($program_query)){ + $test_hash[$row['program']]=1; +} +mysql_free_result($program_query); + +$query = "SELECT * FROM program WHERE night=$prev_id ORDER BY program ASC"; +$program_query = mysql_query($query) or die (mysql_error()); +while($row = mysql_fetch_array($program_query)){ + $test_key = $row['program']; + if(!isset($test_hash[$test_key])){ +$result .= $test_key . "\n"; + } +} +mysql_free_result($program_query); } return $result; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.172 -> 1.173 --- Log message: Fix a compiler crash bootstrapping llvm-gcc. --- Diffs of the changes: (+6 -2) LiveIntervalAnalysis.cpp |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.172 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.173 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.172 Tue Aug 29 18:18:15 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Aug 30 18:02:29 2006 @@ -570,7 +570,7 @@ else if (allocatableRegs_[reg]) { handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(reg)); for (const unsigned* AS = mri_->getAliasSet(reg); *AS; ++AS) - handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(*AS)); + handlePhysicalRegisterDef(MBB, MI, getOrCreateInterval(*AS), true); } } @@ -684,7 +684,11 @@ if (ValLR+1 != BLR) return false; DEBUG(std::cerr << "\nExtending: "; IntB.print(std::cerr, mri_)); - + + // We are about to delete CopyMI, so need to remove it as the 'instruction + // that defines this value #'. + IntB.setInstDefiningValNum(BValNo, ~0U); + // Okay, we can merge them. We need to insert a new liverange: // [ValLR.end, BLR.begin) of either value number, then we merge the // two value numbers. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/2006-08-30-CoallescerCrash.ll
Changes in directory llvm/test/Regression/CodeGen/Generic: 2006-08-30-CoallescerCrash.ll added (r1.1) --- Log message: Bugfix for recent coallescer crash --- Diffs of the changes: (+115 -0) 2006-08-30-CoallescerCrash.ll | 115 ++ 1 files changed, 115 insertions(+) Index: llvm/test/Regression/CodeGen/Generic/2006-08-30-CoallescerCrash.ll diff -c /dev/null llvm/test/Regression/CodeGen/Generic/2006-08-30-CoallescerCrash.ll:1.1 *** /dev/null Wed Aug 30 18:03:45 2006 --- llvm/test/Regression/CodeGen/Generic/2006-08-30-CoallescerCrash.ll Wed Aug 30 18:03:35 2006 *** *** 0 --- 1,115 + ; RUN: llvm-as < %s | llc + + %struct.CUMULATIVE_ARGS = type { int, int, int, int, int, int, int, int, int, int, int, int, int, int } + %struct.VEC_edge = type { uint, uint, [1 x %struct.edge_def*] } + %struct._obstack_chunk = type { sbyte*, %struct._obstack_chunk*, [4 x sbyte] } + %struct.basic_block_def = type { %struct.rtx_def*, %struct.rtx_def*, %struct.tree_node*, %struct.VEC_edge*, %struct.VEC_edge*, %struct.bitmap_head_def*, %struct.bitmap_head_def*, sbyte*, %struct.loop*, [2 x %struct.et_node*], %struct.basic_block_def*, %struct.basic_block_def*, %struct.reorder_block_def*, %struct.bb_ann_d*, long, int, int, int, int } + %struct.bb_ann_d = type { %struct.tree_node*, ubyte, %struct.edge_prediction* } + %struct.bitmap_element_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, uint, [4 x uint] } + %struct.bitmap_head_def = type { %struct.bitmap_element_def*, %struct.bitmap_element_def*, uint, %struct.bitmap_obstack* } + %struct.bitmap_obstack = type { %struct.bitmap_element_def*, %struct.bitmap_head_def*, %struct.obstack } + %struct.cost_pair = type { %struct.iv_cand*, uint, %struct.bitmap_head_def* } + %struct.dataflow_d = type { %struct.varray_head_tag*, [2 x %struct.tree_node*] } + %struct.def_operand_ptr = type { %struct.tree_node** } + %struct.def_optype_d = type { uint, [1 x %struct.def_operand_ptr] } + %struct.edge_def = type { %struct.basic_block_def*, %struct.basic_block_def*, %struct.edge_def_insns, sbyte*, %struct.location_t*, int, int, long, uint } + %struct.edge_def_insns = type { %struct.rtx_def* } + %struct.edge_prediction = type { %struct.edge_prediction*, %struct.edge_def*, uint, int } + %struct.eh_status = type opaque + %struct.emit_status = type { int, int, %struct.rtx_def*, %struct.rtx_def*, %struct.sequence_stack*, int, %struct.location_t, int, ubyte*, %struct.rtx_def** } + %struct.et_node = type opaque + %struct.expr_status = type { int, int, int, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def* } + %struct.function = type { %struct.eh_status*, %struct.expr_status*, %struct.emit_status*, %struct.varasm_status*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.function*, int, int, int, int, %struct.rtx_def*, %struct.CUMULATIVE_ARGS, %struct.rtx_def*, %struct.rtx_def*, %struct.initial_value_struct*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, %struct.rtx_def*, ubyte, int, long, %struct.tree_node*, %struct.tree_node*, %struct.rtx_def*, %struct.varray_head_tag*, %struct.temp_slot*, int, %struct.var_refs_queue*, int, int, %struct.rtvec_def*, %struct.tree_node*, int, int, int, %struct.machine_function*, uint, uint, bool, bool, %struct.language_function*, %struct.rtx_def*, uint, int, int, int, %struct.location_t, %struct.varray_head_tag*, %struct.tree_node*, ubyte, ubyte, ubyte } + %struct.htab = type { uint (sbyte*)*, int (sbyte*, sbyte*)*, void (sbyte*)*, sbyte**, uint, uint, uint, uint, uint, sbyte* (uint, uint)*, void (sbyte*)*, sbyte*, sbyte* (sbyte*, uint, uint)*, void (sbyte*, sbyte*)*, uint } + %struct.initial_value_struct = type opaque + %struct.iv = type { %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, bool, bool, uint } + %struct.iv_cand = type { uint, bool, uint, %struct.tree_node*, %struct.tree_node*, %struct.tree_node*, %struct.iv*, uint } + %struct.iv_use = type { uint, uint, %struct.iv*, %struct.tree_node*, %struct.tree_node**, %struct.bitmap_head_def*, uint, %struct.cost_pair*, %struct.iv_cand* } + %struct.ivopts_data = type { %struct.loop*, %struct.htab*, uint, %struct.version_info*, %struct.bitmap_head_def*, uint, %struct.varray_head_tag*, %struct.varray_head_tag*, %struct.bitmap_head_def*, bool } + %struct.lang_decl = type opaque + %struct.language_function = type opaque + %struct.location_t = type { sbyte*, int } + %struct.loop = type { int, %struct.basic_block_def*, %struct.basic_block_def*, %struct.basic_block_def*, %struct.lpt_decision, uint, uint, %struct.edge_def**, int, %struct.basic_block_def*, %struct.basic_block_def*, uint, %struct.edge_def**, int
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
Changes in directory llvm/lib/Transforms/Scalar: PredicateSimplifier.cpp updated: 1.2 -> 1.3 --- Log message: Properties where both Values weren't in the union (as being equal to another Value) weren't being found by findProperties. This fixes predsimplify.ll test6, a missed optimization opportunity. --- Diffs of the changes: (+18 -24) PredicateSimplifier.cpp | 42 ++ 1 files changed, 18 insertions(+), 24 deletions(-) Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.2 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.3 --- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.2 Tue Aug 29 21:46:48 2006 +++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Wed Aug 30 19:39:16 2006 @@ -121,21 +121,8 @@ void addNotEqual(Value *V1, Value *V2) { DEBUG(std::cerr << "not equal: " << *V1 << " and " << *V2 << "\n"); - V1 = canonicalize(V1); - V2 = canonicalize(V2); - - // Does the property already exist? - for (PropertyIterator I = Properties.begin(), E = Properties.end(); - I != E; ++I) { -if (I->Opcode != NE) continue; - -I->V1 = canonicalize(I->V1); -I->V2 = canonicalize(I->V2); -if ((I->V1 == V1 && I->V2 == V2) || -(I->V1 == V2 && I->V2 == V1)) { - return; // Found. -} - } + if (findProperty(NE, V1, V2) != Properties.end()) +return; // found. // Add the property. Properties.push_back(Property(NE, V1, V2)); @@ -146,9 +133,8 @@ assert(Opcode != EQ && "Can't findProperty on EQ." "Use the lookup method instead."); - V1 = lookup(V1); - V2 = lookup(V2); - if (!V1 || !V2) return Properties.end(); + V1 = canonicalize(V1); + V2 = canonicalize(V2); // Does the property already exist? for (PropertyIterator I = Properties.begin(), E = Properties.end(); @@ -170,18 +156,16 @@ assert(Opcode != EQ && "Can't findProperty on EQ." "Use the lookup method instead."); - V1 = lookup(V1); - V2 = lookup(V2); - if (!V1 || !V2) return Properties.end(); + V1 = canonicalize(V1); + V2 = canonicalize(V2); // Does the property already exist? for (ConstPropertyIterator I = Properties.begin(), E = Properties.end(); I != E; ++I) { if (I->Opcode != Opcode) continue; -Value *v1 = lookup(I->V1), - *v2 = lookup(I->V2); -if (!v1 || !v2) continue; +Value *v1 = canonicalize(I->V1), + *v2 = canonicalize(I->V2); if ((v1 == V1 && v2 == V2) || (v1 == V2 && v2 == V1)) { return I; // Found. @@ -291,6 +275,14 @@ public: void debug(std::ostream &os) const { + for (EquivalenceClasses::iterator I = union_find.begin(), + E = union_find.end(); I != E; ++I) { +if (!I->isLeader()) continue; +for (EquivalenceClasses::member_iterator MI = + union_find.member_begin(I); MI != union_find.member_end(); ++MI) + std::cerr << **MI << " "; +std::cerr << "\n--\n"; + } } std::vector Properties; @@ -571,8 +563,10 @@ PropertySet TrueProperties(KP), FalseProperties(KP); DEBUG(std::cerr << "true set:\n"); TrueProperties.addEqual(ConstantBool::True, Condition); + DEBUG(TrueProperties.debug(std::cerr)); DEBUG(std::cerr << "false set:\n"); FalseProperties.addEqual(ConstantBool::False, Condition); + DEBUG(FalseProperties.debug(std::cerr)); PropertySet KPcopy(KP); proceedToSuccessor(KP, TrueProperties, Node, DT->getNode(TrueDest)); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/
Changes in directory llvm-test/External/SPEC/CINT2006: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006 added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/429.mcf/
Changes in directory llvm-test/External/SPEC/CINT2006/429.mcf: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/429.mcf added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/473.astar/
Changes in directory llvm-test/External/SPEC/CINT2006/473.astar: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/473.astar added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/401.bzip2/
Changes in directory llvm-test/External/SPEC/CINT2006/401.bzip2: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/401.bzip2 added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/403.gcc/
Changes in directory llvm-test/External/SPEC/CINT2006/403.gcc: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/403.gcc added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/462.libquantum/
Changes in directory llvm-test/External/SPEC/CINT2006/462.libquantum: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/462.libquantum added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/445.gobmk/
Changes in directory llvm-test/External/SPEC/CINT2006/445.gobmk: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/445.gobmk added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/456.hmmer/
Changes in directory llvm-test/External/SPEC/CINT2006/456.hmmer: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/456.hmmer added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/464.h264ref/
Changes in directory llvm-test/External/SPEC/CINT2006/464.h264ref: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/464.h264ref added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/
Changes in directory llvm-test/External/SPEC/CFP2006: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006 added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/483.xalancbmk/
Changes in directory llvm-test/External/SPEC/CINT2006/483.xalancbmk: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/483.xalancbmk added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/471.omnetpp/
Changes in directory llvm-test/External/SPEC/CINT2006/471.omnetpp: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/471.omnetpp added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/400.perlbench/
Changes in directory llvm-test/External/SPEC/CINT2006/400.perlbench: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/400.perlbench added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CINT2006/458.sjeng/
Changes in directory llvm-test/External/SPEC/CINT2006/458.sjeng: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CINT2006/458.sjeng added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/433.milc/
Changes in directory llvm-test/External/SPEC/CFP2006/433.milc: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/433.milc added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/444.namd/
Changes in directory llvm-test/External/SPEC/CFP2006/444.namd: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/444.namd added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/435.gromacs/
Changes in directory llvm-test/External/SPEC/CFP2006/435.gromacs: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/435.gromacs added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/450.soplex/
Changes in directory llvm-test/External/SPEC/CFP2006/450.soplex: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/450.soplex added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/465.tonto/
Changes in directory llvm-test/External/SPEC/CFP2006/465.tonto: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/465.tonto added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/453.povray/
Changes in directory llvm-test/External/SPEC/CFP2006/453.povray: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/453.povray added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/482.sphinx3/
Changes in directory llvm-test/External/SPEC/CFP2006/482.sphinx3: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/482.sphinx3 added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/459.GemsFDTD/
Changes in directory llvm-test/External/SPEC/CFP2006/459.GemsFDTD: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/459.GemsFDTD added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/481.wrf/
Changes in directory llvm-test/External/SPEC/CFP2006/481.wrf: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/481.wrf added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/434.zeusmp/
Changes in directory llvm-test/External/SPEC/CFP2006/434.zeusmp: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/434.zeusmp added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/410.bwaves/
Changes in directory llvm-test/External/SPEC/CFP2006/410.bwaves: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/410.bwaves added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/454.calculix/
Changes in directory llvm-test/External/SPEC/CFP2006/454.calculix: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/454.calculix added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/447.dealII/
Changes in directory llvm-test/External/SPEC/CFP2006/447.dealII: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/447.dealII added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/470.lbm/
Changes in directory llvm-test/External/SPEC/CFP2006/470.lbm: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/470.lbm added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/437.leslie3d/
Changes in directory llvm-test/External/SPEC/CFP2006/437.leslie3d: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/437.leslie3d added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/436.cactusADM/
Changes in directory llvm-test/External/SPEC/CFP2006/436.cactusADM: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/436.cactusADM added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/External/SPEC/CFP2006/416.gamess/
Changes in directory llvm-test/External/SPEC/CFP2006/416.gamess: --- Log message: Directory /var/cvs/llvm/llvm-test/External/SPEC/CFP2006/416.gamess added to the repository --- Diffs of the changes: (+0 -0) 0 files changed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/PredicateSimplifier/predsimplify.reg4.ll
Changes in directory llvm/test/Regression/Transforms/PredicateSimplifier: predsimplify.reg4.ll added (r1.1) --- Log message: This program crashes the PredicateSimplifier. Not marked XFAIL because the PredicateSimplifier is skipped in make check anyways. --- Diffs of the changes: (+36 -0) predsimplify.reg4.ll | 36 1 files changed, 36 insertions(+) Index: llvm/test/Regression/Transforms/PredicateSimplifier/predsimplify.reg4.ll diff -c /dev/null llvm/test/Regression/Transforms/PredicateSimplifier/predsimplify.reg4.ll:1.1 *** /dev/null Wed Aug 30 22:13:15 2006 --- llvm/test/Regression/Transforms/PredicateSimplifier/predsimplify.reg4.ll Wed Aug 30 22:13:05 2006 *** *** 0 --- 1,36 + ; RUN: llvm-as < %s | opt -predsimplify -disable-output + + ; ModuleID = '' + target endian = little + target pointersize = 32 + target triple = "i686-pc-linux-gnu" + + implementation ; Functions: + + void %f(int %x, int %y) { + entry: + %tmp = seteq int %x, 10 ; [#uses=1] + %tmp.not = xor bool %tmp, true ; [#uses=1] + %tmp3 = seteq int %x, %y; [#uses=1] + %bothcond = and bool %tmp.not, %tmp3; [#uses=1] + br bool %bothcond, label %cond_true4, label %return + + cond_true4: ; preds = %entry + switch int %y, label %return [ +int 9, label %bb +int 10, label %bb6 + ] + + bb: ; preds = %cond_true4 + call void %g( int 9 ) + ret void + + bb6: ; preds = %cond_true4 + call void %g( int 10 ) + ret void + + return: ; preds = %cond_true4, %entry + ret void + } + + declare void %g(int) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/FAQ.html
Changes in directory llvm/docs: FAQ.html updated: 1.39 -> 1.40 --- Log message: Add a note about C++ -> C with libstdc++ --- Diffs of the changes: (+12 -3) FAQ.html | 15 --- 1 files changed, 12 insertions(+), 3 deletions(-) Index: llvm/docs/FAQ.html diff -u llvm/docs/FAQ.html:1.39 llvm/docs/FAQ.html:1.40 --- llvm/docs/FAQ.html:1.39 Mon Aug 14 19:43:35 2006 +++ llvm/docs/FAQ.html Wed Aug 30 23:26:31 2006 @@ -541,8 +541,8 @@ or: - llvm-g++ a.cpp -c - llvm-g++ b.cpp -c + llvm-g++ a.cpp -c + llvm-g++ b.cpp -c llvm-g++ a.o b.o -o program @@ -566,6 +566,15 @@ use setjmp/longjmp to implement exception support that is correct but relatively slow. + +Also note: this specific sequence of commands won't work if you use a +function defined in the C++ runtime library (or any other C++ library). To +access an external C++ library, you must manually +compile libstdc++ to LLVM bytecode, statically link it into your program, then +use the commands above to convert the whole result into C code. Alternatively, +you can compile the libraries and your application into two different chunks +of C code and link them. + @@ -683,7 +692,7 @@ src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01!"> http://llvm.org";>LLVM Compiler Infrastructure - Last modified: $Date: 2006/08/15 00:43:35 $ + Last modified: $Date: 2006/08/31 04:26:31 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/LiveInterval.h LiveIntervalAnalysis.h
Changes in directory llvm/include/llvm/CodeGen: LiveInterval.h updated: 1.22 -> 1.23 LiveIntervalAnalysis.h updated: 1.55 -> 1.56 --- Log message: avoid calling the virtual isMoveInstr method endlessly by caching its results. --- Diffs of the changes: (+34 -19) LiveInterval.h | 49 - LiveIntervalAnalysis.h |4 ++-- 2 files changed, 34 insertions(+), 19 deletions(-) Index: llvm/include/llvm/CodeGen/LiveInterval.h diff -u llvm/include/llvm/CodeGen/LiveInterval.h:1.22 llvm/include/llvm/CodeGen/LiveInterval.h:1.23 --- llvm/include/llvm/CodeGen/LiveInterval.h:1.22 Tue Aug 29 18:17:59 2006 +++ llvm/include/llvm/CodeGen/LiveInterval.hThu Aug 31 00:54:43 2006 @@ -78,10 +78,12 @@ float weight;// weight of this interval Ranges ranges; // the ranges in which this register is live private: -/// InstDefiningValue - This tracks the def index of the instruction that -/// defines a particular value number in the interval. This may be ~0, -/// which is treated as unknown, or ~1, which is a deleted value number. -SmallVector InstDefiningValue; +/// ValueNumberInfo - If this value number is not defined by a copy, this +/// holds ~0,x. If the value number is not in use, it contains ~1,x to +/// indicate that the value # is not used. If the val# is defined by a +/// copy, the first entry is the instruction # of the copy, and the second +/// is the register number copied from. +SmallVector, 4> ValueNumberInfo; public: LiveInterval(unsigned Reg, float Weight) @@ -113,31 +115,44 @@ std::swap(reg, other.reg); std::swap(weight, other.weight); std::swap(ranges, other.ranges); - std::swap(InstDefiningValue, other.InstDefiningValue); + std::swap(ValueNumberInfo, other.ValueNumberInfo); } -bool containsOneValue() const { return InstDefiningValue.size() == 1; } +bool containsOneValue() const { return ValueNumberInfo.size() == 1; } -unsigned getNumValNums() const { return InstDefiningValue.size(); } +unsigned getNumValNums() const { return ValueNumberInfo.size(); } /// getNextValue - Create a new value number and return it. MIIdx specifies /// the instruction that defines the value number. -unsigned getNextValue(unsigned MIIdx) { - InstDefiningValue.push_back(MIIdx); - return InstDefiningValue.size()-1; +unsigned getNextValue(unsigned MIIdx, unsigned SrcReg) { + ValueNumberInfo.push_back(std::make_pair(MIIdx, SrcReg)); + return ValueNumberInfo.size()-1; } /// getInstForValNum - Return the machine instruction index that defines the /// specified value number. unsigned getInstForValNum(unsigned ValNo) const { - assert(ValNo < InstDefiningValue.size()); - return InstDefiningValue[ValNo]; + assert(ValNo < ValueNumberInfo.size()); + return ValueNumberInfo[ValNo].first; } -/// setInstDefiningValNum - Change the instruction defining the specified -/// value number to the specified instruction. -void setInstDefiningValNum(unsigned ValNo, unsigned MIIdx) { - InstDefiningValue[ValNo] = MIIdx; +unsigned getSrcRegForValNum(unsigned ValNo) const { + assert(ValNo < ValueNumberInfo.size()); + if (ValueNumberInfo[ValNo].first < ~2U) +return ValueNumberInfo[ValNo].second; + return 0; +} + +std::pair getValNumInfo(unsigned ValNo) const { + assert(ValNo < ValueNumberInfo.size()); + return ValueNumberInfo[ValNo]; +} + +/// setValueNumberInfo - Change the value number info for the specified +/// value number. +void setValueNumberInfo(unsigned ValNo, +const std::pair &I){ + ValueNumberInfo[ValNo] = I; } /// MergeValueNumberInto - This method is called when two value nubmers @@ -216,7 +231,7 @@ /// the intervals are not joinable, this aborts. void join(LiveInterval &Other, int *ValNoAssignments, int *RHSValNoAssignments, - SmallVector &NewInstDefiningValue); + SmallVector,16> &NewValueNumberInfo); /// removeRange - Remove the specified range from this interval. Note that Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.55 llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.56 --- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.55 Tue Aug 29 18:17:59 2006 +++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hThu Aug 31 00:54:43 2006 @@ -198,8 +198,8 @@ /// def. void handlePhysicalRegisterDef(MachineBasicBlock* mbb, MachineBasicBlock::iterator mi, - LiveInterval& interval, - bool isLiveIn = false); + LiveInterval &interval, +
[llvm-commits] CVS: llvm/lib/CodeGen/LiveInterval.cpp LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveInterval.cpp updated: 1.33 -> 1.34 LiveIntervalAnalysis.cpp updated: 1.173 -> 1.174 --- Log message: avoid calling the virtual isMoveInstr method endlessly by caching its results. --- Diffs of the changes: (+73 -75) LiveInterval.cpp | 24 - LiveIntervalAnalysis.cpp | 124 +++ 2 files changed, 73 insertions(+), 75 deletions(-) Index: llvm/lib/CodeGen/LiveInterval.cpp diff -u llvm/lib/CodeGen/LiveInterval.cpp:1.33 llvm/lib/CodeGen/LiveInterval.cpp:1.34 --- llvm/lib/CodeGen/LiveInterval.cpp:1.33 Tue Aug 29 18:18:15 2006 +++ llvm/lib/CodeGen/LiveInterval.cpp Thu Aug 31 00:54:43 2006 @@ -280,7 +280,8 @@ /// the intervals are not joinable, this aborts. void LiveInterval::join(LiveInterval &Other, int *LHSValNoAssignments, int *RHSValNoAssignments, -SmallVector &NewInstDefiningValue) { +SmallVector, 16> &NewValueNumberInfo) { // Try to do the least amount of work possible. In particular, if there are // more liverange chunks in the other set than there are in the 'this' set, @@ -300,7 +301,7 @@ // we want to avoid the interval scan if not. bool MustMapCurValNos = false; for (unsigned i = 0, e = getNumValNums(); i != e; ++i) { -if (InstDefiningValue[i] == ~2U) continue; // tombstone value # +if (ValueNumberInfo[i].first == ~2U) continue; // tombstone value # if (i != (unsigned)LHSValNoAssignments[i]) { MustMapCurValNos = true; break; @@ -345,9 +346,8 @@ InsertPos = addRangeFrom(*I, InsertPos); } - InstDefiningValue.clear(); - InstDefiningValue.append(NewInstDefiningValue.begin(), - NewInstDefiningValue.end()); + ValueNumberInfo.clear(); + ValueNumberInfo.append(NewValueNumberInfo.begin(), NewValueNumberInfo.end()); weight += Other.weight; } @@ -360,7 +360,7 @@ // Find a value # to use for the clobber ranges. If there is already a value# // for unknown values, use it. // FIXME: Use a single sentinal number for these! - unsigned ClobberValNo = getNextValue(~0U); + unsigned ClobberValNo = getNextValue(~0U, 0); iterator IP = begin(); for (const_iterator I = Clobbers.begin(), E = Clobbers.end(); I != E; ++I) { @@ -399,7 +399,7 @@ // Make sure V2 is smaller than V1. if (V1 < V2) { -setInstDefiningValNum(V1, getInstForValNum(V2)); +setValueNumberInfo(V1, getValNumInfo(V2)); std::swap(V1, V2); } @@ -443,10 +443,10 @@ // ~1U so it can be nuked later. if (V1 == getNumValNums()-1) { do { - InstDefiningValue.pop_back(); -} while (InstDefiningValue.back() == ~1U); + ValueNumberInfo.pop_back(); +} while (ValueNumberInfo.back().first == ~1U); } else { -InstDefiningValue[V1] = ~1U; +ValueNumberInfo[V1].first = ~1U; } } @@ -482,10 +482,10 @@ for (unsigned i = 0; i != getNumValNums(); ++i) { if (i) OS << " "; OS << i << "@"; - if (InstDefiningValue[i] == ~0U) { + if (ValueNumberInfo[i].first == ~0U) { OS << "?"; } else { -OS << InstDefiningValue[i]; +OS << ValueNumberInfo[i].first; } } } Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.173 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.174 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.173 Wed Aug 30 18:02:29 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Aug 31 00:54:43 2006 @@ -138,10 +138,10 @@ for (MachineFunction::livein_iterator I = fn.livein_begin(), E = fn.livein_end(); I != E; ++I) { handlePhysicalRegisterDef(Entry, Entry->begin(), -getOrCreateInterval(I->first), true); +getOrCreateInterval(I->first), 0); for (const unsigned* AS = mri_->getAliasSet(I->first); *AS; ++AS) handlePhysicalRegisterDef(Entry, Entry->begin(), - getOrCreateInterval(*AS), true); + getOrCreateInterval(*AS), 0); } } @@ -321,7 +321,7 @@ // the spill weight is now infinity as it // cannot be spilled again nI.weight = float(HUGE_VAL); -LiveRange LR(start, end, nI.getNextValue(~0U)); +LiveRange LR(start, end, nI.getNextValue(~0U, 0)); DEBUG(std::cerr << " +" << LR); nI.addRange(LR); added.push_back(&nI); @@ -366,7 +366,13 @@ // Get the Idx of the defining instructions. unsigned defIndex = getDefIndex(getInstructionIndex(mi)); -unsigned ValNum = interval.getNextValue(defIndex); +unsigned ValNum; +unsigned SrcReg, DstReg; +if (!tii_->isMoveInstr(*mi, SrcReg, DstReg)) + ValNum = interval.getNextValue(~0U, 0); +else + ValNum = interval.getNextValue(defIndex, SrcReg)
[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.174 -> 1.175 --- Log message: Delete copies as they are coallesced instead of waiting until the end. --- Diffs of the changes: (+4 -0) LiveIntervalAnalysis.cpp |4 1 files changed, 4 insertions(+) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.174 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.175 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.174 Thu Aug 31 00:54:43 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Aug 31 00:58:59 2006 @@ -823,6 +823,10 @@ r2iMap_.erase(SrcReg); r2rMap_[SrcReg] = DstReg; + // Finally, delete the copy instruction. + RemoveMachineInstrFromMaps(CopyMI); + CopyMI->eraseFromParent(); + ++numPeep; ++numJoins; return true; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Changes in directory llvm/lib/CodeGen: LiveIntervalAnalysis.cpp updated: 1.175 -> 1.176 --- Log message: Add a special case that speeds up coallescing a bit, but not enough. --- Diffs of the changes: (+107 -51) LiveIntervalAnalysis.cpp | 158 +++ 1 files changed, 107 insertions(+), 51 deletions(-) Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.175 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.176 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.175 Thu Aug 31 00:58:59 2006 +++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Thu Aug 31 01:48:26 2006 @@ -886,46 +886,8 @@ /// "RHS" will not have been modified, so we can use this information /// below to update aliases. bool LiveIntervals::JoinIntervals(LiveInterval &LHS, LiveInterval &RHS) { - // Loop over the value numbers of the LHS, seeing if any are defined from the - // RHS. - SmallVector LHSValsDefinedFromRHS; - LHSValsDefinedFromRHS.resize(LHS.getNumValNums(), -1); - for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { -unsigned ValSrcReg = LHS.getSrcRegForValNum(VN); -if (ValSrcReg == 0) // Src not defined by a copy? - continue; - -// DstReg is known to be a register in the LHS interval. If the src is from -// the RHS interval, we can use its value #. -if (rep(ValSrcReg) != RHS.reg) - continue; - -// Figure out the value # from the RHS. -unsigned ValInst = LHS.getInstForValNum(VN); -LHSValsDefinedFromRHS[VN] = RHS.getLiveRangeContaining(ValInst-1)->ValId; - } - - // Loop over the value numbers of the RHS, seeing if any are defined from the - // LHS. - SmallVector RHSValsDefinedFromLHS; - RHSValsDefinedFromLHS.resize(RHS.getNumValNums(), -1); - for (unsigned VN = 0, e = RHS.getNumValNums(); VN != e; ++VN) { -unsigned ValSrcReg = RHS.getSrcRegForValNum(VN); -if (ValSrcReg == 0) // Src not defined by a copy? - continue; - -// DstReg is known to be a register in the RHS interval. If the src is from -// the LHS interval, we can use its value #. -if (rep(ValSrcReg) != LHS.reg) - continue; - -// Figure out the value # from the LHS. -unsigned ValInst = RHS.getInstForValNum(VN); -RHSValsDefinedFromLHS[VN] = LHS.getLiveRangeContaining(ValInst-1)->ValId; - } - - // Now that we know the value mapping, compute the final value assignment, - // assuming that the live ranges can be coallesced. + // Compute the final value assignment, assuming that the live ranges can be + // coallesced. SmallVector LHSValNoAssignments; SmallVector RHSValNoAssignments; SmallVector, 16> ValueNumberInfo; @@ -933,17 +895,111 @@ RHSValNoAssignments.resize(RHS.getNumValNums(), -1); // Compute ultimate value numbers for the LHS and RHS values. - for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { -if (LHS.getInstForValNum(VN) == ~2U) continue; -ComputeUltimateVN(VN, ValueNumberInfo, - LHSValsDefinedFromRHS, RHSValsDefinedFromLHS, - LHSValNoAssignments, RHSValNoAssignments, LHS, RHS); - } - for (unsigned VN = 0, e = RHS.getNumValNums(); VN != e; ++VN) { -if (RHS.getInstForValNum(VN) == ~2U) continue; -ComputeUltimateVN(VN, ValueNumberInfo, - RHSValsDefinedFromLHS, LHSValsDefinedFromRHS, - RHSValNoAssignments, LHSValNoAssignments, RHS, LHS); + if (RHS.containsOneValue()) { +// Copies from a liveinterval with a single value are simple to handle and +// very common, handle the special case here. This is important, because +// often RHS is small and LHS is large (e.g. a physreg). + +// Find out if the RHS is defined as a copy from some value in the LHS. +int RHSValID = -1; +std::pair RHSValNoInfo; +if (unsigned RHSSrcReg = RHS.getSrcRegForValNum(0)) { + if (rep(RHSSrcReg) != LHS.reg) { +RHSValNoInfo = RHS.getValNumInfo(0); + } else { +// It was defined as a copy from the LHS, find out what value # it is. +unsigned ValInst = RHS.getInstForValNum(0); +RHSValID = LHS.getLiveRangeContaining(ValInst-1)->ValId; +RHSValNoInfo = LHS.getValNumInfo(RHSValID); + } +} else { + RHSValNoInfo = RHS.getValNumInfo(0); +} + +ValueNumberInfo.resize(LHS.getNumValNums()); + +// Okay, *all* of the values in LHS that are defined as a copy from RHS +// should now get updated. +for (unsigned VN = 0, e = LHS.getNumValNums(); VN != e; ++VN) { + if (unsigned LHSSrcReg = LHS.getSrcRegForValNum(VN)) { +if (rep(LHSSrcReg) != RHS.reg) { + // If this is not a copy from the RHS, its value number will be + // unmodified by the coallescing. + ValueNumberInfo[VN] = LHS.getValNumInfo(VN); + LHSValNoAssignments[VN] = VN; +} else if (RHSValID == -1) { + // Otherwise, it is a copy