From lattner at cs.uiuc.edu Mon Jun 21 01:25:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 01:25:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/Local.cpp Message-ID: <200406210617.BAA10370@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: Local.cpp updated: 1.31 -> 1.32 --- Log message: Comment out the isnan stuff until we get a proper autoconf test for it breaking the build on sparc is not acceptable. --- Diffs of the changes: (+7 -1) Index: llvm/lib/Transforms/Utils/Local.cpp diff -u llvm/lib/Transforms/Utils/Local.cpp:1.31 llvm/lib/Transforms/Utils/Local.cpp:1.32 --- llvm/lib/Transforms/Utils/Local.cpp:1.31 Thu Jun 17 17:27:04 2004 +++ llvm/lib/Transforms/Utils/Local.cpp Mon Jun 21 01:17:21 2004 @@ -20,6 +20,7 @@ #include using namespace llvm; +#if 0 #if defined(__POWERPC__) && defined(__APPLE_CC__) // FIXME: Currently it seems that isnan didn't make its way into the Apple // C++ headers, although it IS in the C headers (which confuses autoconf @@ -29,6 +30,8 @@ namespace std { int isnan (double d) { return ::isnan (d); } } #endif +#endif + //===----------------------------------------------------------------------===// // Local constant propagation... // @@ -300,9 +303,12 @@ if (ConstantFP *Op2 = dyn_cast(Operands[1])) { double Op1V = Op1->getValue(), Op2V = Op2->getValue(); +#if 0 if (Name == "llvm.isunordered") return ConstantBool::get(std::isnan(Op1V) | std::isnan(Op2V)); - else if (Name == "pow") { + else +#endif + if (Name == "pow") { errno = 0; double V = pow(Op1V, Op2V); if (errno == 0) From llvm at cs.uiuc.edu Mon Jun 21 01:45:02 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Mon Jun 21 01:45:02 2004 Subject: [llvm-commits] CVS: llvm/test/QMTest/llvm.py Message-ID: <200406210637.BAA10432@zion.cs.uiuc.edu> Changes in directory llvm/test/QMTest: llvm.py updated: 1.28 -> 1.29 --- Log message: Back out the WNOHANG option to waitpid in ExecProgram. This seems to have made things worse. --- Diffs of the changes: (+1 -1) Index: llvm/test/QMTest/llvm.py diff -u llvm/test/QMTest/llvm.py:1.28 llvm/test/QMTest/llvm.py:1.29 --- llvm/test/QMTest/llvm.py:1.28 Sat Jun 19 14:38:38 2004 +++ llvm/test/QMTest/llvm.py Mon Jun 21 01:37:11 2004 @@ -81,7 +81,7 @@ # # Wait for the child process to exit. # - (pid, status) = os.waitpid (child, os.WNOHANG ) + (pid, status) = os.waitpid (child, 0 ) # # Close our pipes to the child. From lattner at cs.uiuc.edu Mon Jun 21 02:27:00 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 02:27:00 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/SimplifyCFG.cpp Message-ID: <200406210719.CAA13521@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: SimplifyCFG.cpp updated: 1.43 -> 1.44 --- Log message: *FINALLY* Fix a really nasty nondeterministic bug that has been haunting us since May 1st. In this code, the pred iterator was being invalidated sometimes causing the wrong entries to be added to PHI nodes. The fix for this is to defererence and safe the *PI value before we hack on branch instructions, which changes use/def chains, which SOMETIMES invalidates the iterator. --- Diffs of the changes: (+7 -6) Index: llvm/lib/Transforms/Utils/SimplifyCFG.cpp diff -u llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.43 llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.44 --- llvm/lib/Transforms/Utils/SimplifyCFG.cpp:1.43 Sat Jun 19 20:13:18 2004 +++ llvm/lib/Transforms/Utils/SimplifyCFG.cpp Mon Jun 21 02:19:01 2004 @@ -332,7 +332,7 @@ if (SI1 == SI2) return false; // Can't merge with self! // It is not safe to merge these two switch instructions if they have a common - // successor, and if that successor has a PHI node, and if that PHI node has + // successor, and if that successor has a PHI node, and if *that* PHI node has // conflicting incoming values from the two switch blocks. BasicBlock *SI1BB = SI1->getParent(); BasicBlock *SI2BB = SI2->getParent(); @@ -352,7 +352,7 @@ /// AddPredecessorToBlock - Update PHI nodes in Succ to indicate that there will /// now be entries in it from the 'NewPred' block. The values that will be /// flowing into the PHI nodes will be the same as those coming in from -/// ExistPred, and existing predecessor of Succ. +/// ExistPred, an existing predecessor of Succ. static void AddPredecessorToBlock(BasicBlock *Succ, BasicBlock *NewPred, BasicBlock *ExistPred) { assert(std::find(succ_begin(ExistPred), succ_end(ExistPred), Succ) != @@ -823,6 +823,7 @@ for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI!=E; ++PI) if (BranchInst *PBI = dyn_cast((*PI)->getTerminator())) if (PBI->isConditional() && SafeToMergeTerminators(BI, PBI)) { + BasicBlock *PredBlock = *PI; if (PBI->getSuccessor(0) == FalseDest || PBI->getSuccessor(1) == TrueDest) { // Invert the predecessors condition test (xor it with true), @@ -839,12 +840,12 @@ if (PBI->getSuccessor(0) == TrueDest || PBI->getSuccessor(1) == FalseDest) { - // Clone Cond into the predecessor basic block, and and the + // Clone Cond into the predecessor basic block, and or/and the // two conditions together. Instruction *New = Cond->clone(); New->setName(Cond->getName()); Cond->setName(Cond->getName()+".old"); - (*PI)->getInstList().insert(PBI, New); + PredBlock->getInstList().insert(PBI, New); Instruction::BinaryOps Opcode = PBI->getSuccessor(0) == TrueDest ? Instruction::Or : Instruction::And; @@ -853,11 +854,11 @@ New, "bothcond", PBI); PBI->setCondition(NewCond); if (PBI->getSuccessor(0) == BB) { - AddPredecessorToBlock(TrueDest, *PI, BB); + AddPredecessorToBlock(TrueDest, PredBlock, BB); PBI->setSuccessor(0, TrueDest); } if (PBI->getSuccessor(1) == BB) { - AddPredecessorToBlock(FalseDest, *PI, BB); + AddPredecessorToBlock(FalseDest, PredBlock, BB); PBI->setSuccessor(1, FalseDest); } return SimplifyCFG(BB) | 1; From llvm at cs.uiuc.edu Mon Jun 21 03:19:01 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Mon Jun 21 03:19:01 2004 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll Message-ID: <200406210811.DAA05481@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/CorrelatedExprs: branchtest.ll updated: 1.3 -> 1.4 --- Log message: Nullify this test as it causes infinite loop in optimized nightly test. --- Diffs of the changes: (+1 -1) Index: llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll diff -u llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll:1.3 llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll:1.4 --- llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll:1.3 Tue Sep 16 10:29:23 2003 +++ llvm/test/Regression/Transforms/CorrelatedExprs/branchtest.ll Mon Jun 21 03:11:32 2004 @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | opt -cee -simplifycfg | llvm-dis | not grep 'REMOVE' +; RUN: echo %s implementation From lattner at cs.uiuc.edu Mon Jun 21 07:19:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 07:19:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Constants.h Message-ID: <200406211211.HAA22116@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: Constants.h updated: 1.47 -> 1.48 --- Log message: Make ConstantBool act like a 1 bit ConstantInt, in order to simplify client code. Patch contributed by Vladimir Prus. --- Diffs of the changes: (+11 -12) Index: llvm/include/llvm/Constants.h diff -u llvm/include/llvm/Constants.h:1.47 llvm/include/llvm/Constants.h:1.48 --- llvm/include/llvm/Constants.h:1.47 Tue May 25 00:32:13 2004 +++ llvm/include/llvm/Constants.h Mon Jun 21 07:11:01 2004 @@ -37,9 +37,18 @@ /// class ConstantIntegral : public Constant { protected: - ConstantIntegral(const Type *Ty) : Constant(Ty) {} + union { + int64_t Signed; + uint64_t Unsigned; + } Val; + ConstantIntegral(const Type *Ty, uint64_t V); public: + /// getRawValue - return the underlying value of this constant as a 64-bit + /// unsigned integer value. + /// + inline uint64_t getRawValue() const { return Val.Unsigned; } + /// isNullValue - Return true if this is the value that would be returned by /// getNullValue. /// @@ -79,7 +88,6 @@ /// ConstantBool - Boolean Values /// class ConstantBool : public ConstantIntegral { - bool Val; ConstantBool(bool V); public: static ConstantBool *True, *False; // The True & False values @@ -93,7 +101,7 @@ /// getValue - return the boolean value of this constant. /// - inline bool getValue() const { return Val; } + inline bool getValue() const { return static_cast(getRawValue()); } /// isNullValue - Return true if this is the value that would be returned by /// getNullValue. @@ -120,10 +128,6 @@ /// class ConstantInt : public ConstantIntegral { protected: - union { - int64_t Signed; - uint64_t Unsigned; - } Val; ConstantInt(const ConstantInt &); // DO NOT IMPLEMENT ConstantInt(const Type *Ty, uint64_t V); public: @@ -143,11 +147,6 @@ /// static ConstantInt *get(const Type *Ty, unsigned char V); - /// getRawValue - return the underlying value of this constant as a 64-bit - /// unsigned integer value. - /// - inline uint64_t getRawValue() const { return Val.Unsigned; } - /// isNullValue - Return true if this is the value that would be returned by /// getNullValue. virtual bool isNullValue() const { return Val.Unsigned == 0; } From lattner at cs.uiuc.edu Mon Jun 21 07:20:02 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 07:20:02 2004 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp Message-ID: <200406211212.HAA22165@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Constants.cpp updated: 1.91 -> 1.92 --- Log message: Make ConstantBool act like a 1 bit ConstantInt, in order to simplify client code. Patch contributed by Vladimir Prus. --- Diffs of the changes: (+7 -4) Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.91 llvm/lib/VMCore/Constants.cpp:1.92 --- llvm/lib/VMCore/Constants.cpp:1.91 Thu Jun 17 13:18:53 2004 +++ llvm/lib/VMCore/Constants.cpp Mon Jun 21 07:12:12 2004 @@ -212,12 +212,15 @@ //===----------------------------------------------------------------------===// // Normal Constructors -ConstantBool::ConstantBool(bool V) : ConstantIntegral(Type::BoolTy) { - Val = V; +ConstantIntegral::ConstantIntegral(const Type *Ty, uint64_t V) + : Constant(Ty) { + Val.Unsigned = V; +} + +ConstantBool::ConstantBool(bool V) : ConstantIntegral(Type::BoolTy, V) { } -ConstantInt::ConstantInt(const Type *Ty, uint64_t V) : ConstantIntegral(Ty) { - Val.Unsigned = V; +ConstantInt::ConstantInt(const Type *Ty, uint64_t V) : ConstantIntegral(Ty, V) { } ConstantSInt::ConstantSInt(const Type *Ty, int64_t V) : ConstantInt(Ty, V) { From lattner at cs.uiuc.edu Mon Jun 21 08:19:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 08:19:01 2004 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervals.cpp LiveIntervals.h RegAllocLinearScan.cpp Message-ID: <200406211311.IAA30011@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveIntervals.cpp updated: 1.77 -> 1.78 LiveIntervals.h updated: 1.26 -> 1.27 RegAllocLinearScan.cpp updated: 1.74 -> 1.75 --- Log message: Rename Interval class to LiveInterval to avoid conflicting with the already existing llvm::Interval class. Patch contributed by Vladimir Prus! http://mail.cs.uiuc.edu/pipermail/llvmbugs/2004-June/000710.html --- Diffs of the changes: (+54 -50) Index: llvm/lib/CodeGen/LiveIntervals.cpp diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.77 llvm/lib/CodeGen/LiveIntervals.cpp:1.78 --- llvm/lib/CodeGen/LiveIntervals.cpp:1.77 Wed Jun 2 00:57:12 2004 +++ llvm/lib/CodeGen/LiveIntervals.cpp Mon Jun 21 08:10:56 2004 @@ -136,7 +136,7 @@ if (tii.isMoveInstr(*mii, srcReg, dstReg) && rep(srcReg) == rep(dstReg)) { // remove from def list - Interval& interval = getOrCreateInterval(rep(dstReg)); + LiveInterval& interval = getOrCreateInterval(rep(dstReg)); // remove index -> MachineInstr and // MachineInstr -> index mappings Mi2IndexMap::iterator mi2i = mi2iMap_.find(mii); @@ -170,7 +170,7 @@ intervals_.sort(); DEBUG(std::cerr << "********** INTERVALS **********\n"); DEBUG(std::copy(intervals_.begin(), intervals_.end(), - std::ostream_iterator(std::cerr, "\n"))); + std::ostream_iterator(std::cerr, "\n"))); DEBUG(std::cerr << "********** MACHINEINSTRS **********\n"); DEBUG( for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end(); @@ -186,11 +186,12 @@ return true; } -std::vector LiveIntervals::addIntervalsForSpills(const Interval& li, - VirtRegMap& vrm, - int slot) +std::vector LiveIntervals::addIntervalsForSpills( + const LiveInterval& li, + VirtRegMap& vrm, + int slot) { - std::vector added; + std::vector added; assert(li.weight != HUGE_VAL && "attempt to spill already spilled interval!"); @@ -200,7 +201,7 @@ const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(li.reg); - for (Interval::Ranges::const_iterator + for (LiveInterval::Ranges::const_iterator i = li.ranges.begin(), e = li.ranges.end(); i != e; ++i) { unsigned index = getBaseIndex(i->first); unsigned end = getBaseIndex(i->second-1) + InstrSlots::NUM; @@ -250,7 +251,7 @@ mi->SetMachineOperandReg(i, nReg); vrm.grow(); vrm.assignVirt2StackSlot(nReg, slot); - Interval& nI = getOrCreateInterval(nReg); + LiveInterval& nI = getOrCreateInterval(nReg); assert(nI.empty()); // the spill weight is now infinity as it // cannot be spilled again @@ -280,7 +281,7 @@ void LiveIntervals::handleVirtualRegisterDef(MachineBasicBlock* mbb, MachineBasicBlock::iterator mi, - Interval& interval) + LiveInterval& interval) { DEBUG(std::cerr << "\t\tregister: "; printRegName(interval.reg)); LiveVariables::VarInfo& vi = lv_->getVarInfo(interval.reg); @@ -334,7 +335,7 @@ void LiveIntervals::handlePhysicalRegisterDef(MachineBasicBlock* mbb, MachineBasicBlock::iterator mi, - Interval& interval) + LiveInterval& interval) { DEBUG(std::cerr << "\t\tregister: "; printRegName(interval.reg)); typedef LiveVariables::killed_iterator KillIter; @@ -536,8 +537,8 @@ } } -bool LiveIntervals::overlapsAliases(const Interval& lhs, - const Interval& rhs) const +bool LiveIntervals::overlapsAliases(const LiveInterval& lhs, + const LiveInterval& rhs) const { assert(MRegisterInfo::isPhysicalRegister(lhs.reg) && "first interval must describe a physical register"); @@ -552,24 +553,24 @@ return false; } -Interval& LiveIntervals::getOrCreateInterval(unsigned reg) +LiveInterval& LiveIntervals::getOrCreateInterval(unsigned reg) { Reg2IntervalMap::iterator r2iit = r2iMap_.lower_bound(reg); if (r2iit == r2iMap_.end() || r2iit->first != reg) { - intervals_.push_back(Interval(reg)); + intervals_.push_back(LiveInterval(reg)); r2iit = r2iMap_.insert(r2iit, std::make_pair(reg, --intervals_.end())); } return *r2iit->second; } -Interval::Interval(unsigned r) +LiveInterval::LiveInterval(unsigned r) : reg(r), weight((MRegisterInfo::isPhysicalRegister(r) ? HUGE_VAL : 0.0F)) { } -bool Interval::spilled() const +bool LiveInterval::spilled() const { return (weight == HUGE_VAL && MRegisterInfo::isVirtualRegister(reg)); @@ -582,7 +583,7 @@ // definition of the variable it represents. This is because slot 1 is // used (def slot) and spans up to slot 3 (store slot). // -bool Interval::liveAt(unsigned index) const +bool LiveInterval::liveAt(unsigned index) const { Range dummy(index, index+1); Ranges::const_iterator r = std::upper_bound(ranges.begin(), @@ -609,7 +610,7 @@ // // A->overlaps(C) should return false since we want to be able to join // A and C. -bool Interval::overlaps(const Interval& other) const +bool LiveInterval::overlaps(const LiveInterval& other) const { Ranges::const_iterator i = ranges.begin(); Ranges::const_iterator ie = ranges.end(); @@ -647,7 +648,7 @@ return false; } -void Interval::addRange(unsigned start, unsigned end) +void LiveInterval::addRange(unsigned start, unsigned end) { assert(start < end && "Invalid range to add!"); DEBUG(std::cerr << " +[" << start << ',' << end << ")"); @@ -661,7 +662,7 @@ it = mergeRangesBackward(it); } -void Interval::join(const Interval& other) +void LiveInterval::join(const LiveInterval& other) { DEBUG(std::cerr << "\t\tjoining " << *this << " with " << other << '\n'); Ranges::iterator cur = ranges.begin(); @@ -676,7 +677,8 @@ ++numJoins; } -Interval::Ranges::iterator Interval::mergeRangesForward(Ranges::iterator it) +LiveInterval::Ranges::iterator LiveInterval:: +mergeRangesForward(Ranges::iterator it) { Ranges::iterator n; while ((n = next(it)) != ranges.end()) { @@ -688,7 +690,8 @@ return it; } -Interval::Ranges::iterator Interval::mergeRangesBackward(Ranges::iterator it) +LiveInterval::Ranges::iterator LiveInterval:: +mergeRangesBackward(Ranges::iterator it) { while (it != ranges.begin()) { Ranges::iterator p = prior(it); @@ -703,14 +706,14 @@ return it; } -std::ostream& llvm::operator<<(std::ostream& os, const Interval& li) +std::ostream& llvm::operator<<(std::ostream& os, const LiveInterval& li) { os << "%reg" << li.reg << ',' << li.weight; if (li.empty()) return os << "EMPTY"; os << " = "; - for (Interval::Ranges::const_iterator + for (LiveInterval::Ranges::const_iterator i = li.ranges.begin(), e = li.ranges.end(); i != e; ++i) { os << "[" << i->first << "," << i->second << ")"; } Index: llvm/lib/CodeGen/LiveIntervals.h diff -u llvm/lib/CodeGen/LiveIntervals.h:1.26 llvm/lib/CodeGen/LiveIntervals.h:1.27 --- llvm/lib/CodeGen/LiveIntervals.h:1.26 Sun May 30 02:46:27 2004 +++ llvm/lib/CodeGen/LiveIntervals.h Mon Jun 21 08:10:56 2004 @@ -30,7 +30,7 @@ class MRegisterInfo; class VirtRegMap; - struct Interval { + struct LiveInterval { typedef std::pair Range; typedef std::vector Ranges; unsigned reg; // the register of this interval @@ -38,7 +38,7 @@ // (number of uses *10^loopDepth) Ranges ranges; // the ranges in which this register is live - explicit Interval(unsigned r); + explicit LiveInterval(unsigned r); bool empty() const { return ranges.empty(); } @@ -60,17 +60,17 @@ bool liveAt(unsigned index) const; - bool overlaps(const Interval& other) const; + bool overlaps(const LiveInterval& other) const; void addRange(unsigned start, unsigned end); - void join(const Interval& other); + void join(const LiveInterval& other); - bool operator<(const Interval& other) const { + bool operator<(const LiveInterval& other) const { return start() < other.start(); } - bool operator==(const Interval& other) const { + bool operator==(const LiveInterval& other) const { return reg == other.reg; } @@ -79,12 +79,12 @@ Ranges::iterator mergeRangesBackward(Ranges::iterator it); }; - std::ostream& operator<<(std::ostream& os, const Interval& li); + std::ostream& operator<<(std::ostream& os, const LiveInterval& li); class LiveIntervals : public MachineFunctionPass { public: - typedef std::list Intervals; + typedef std::list Intervals; private: MachineFunction* mf_; @@ -148,7 +148,7 @@ /// runOnMachineFunction - pass entry point virtual bool runOnMachineFunction(MachineFunction&); - Interval& getInterval(unsigned reg) { + LiveInterval& getInterval(unsigned reg) { assert(r2iMap_.count(reg)&& "Interval does not exist for register"); return *r2iMap_.find(reg)->second; } @@ -162,9 +162,9 @@ Intervals& getIntervals() { return intervals_; } - std::vector addIntervalsForSpills(const Interval& i, - VirtRegMap& vrm, - int slot); + std::vector addIntervalsForSpills(const LiveInterval& i, + VirtRegMap& vrm, + int slot); private: /// computeIntervals - compute live intervals @@ -184,18 +184,19 @@ /// register def void handleVirtualRegisterDef(MachineBasicBlock* mbb, MachineBasicBlock::iterator mi, - Interval& interval); + LiveInterval& interval); /// handlePhysicalRegisterDef - update intervals for a /// physical register def void handlePhysicalRegisterDef(MachineBasicBlock* mbb, MachineBasicBlock::iterator mi, - Interval& interval); + LiveInterval& interval); - bool overlapsAliases(const Interval& lhs, const Interval& rhs) const; + bool overlapsAliases(const LiveInterval& lhs, + const LiveInterval& rhs) const; - Interval& getOrCreateInterval(unsigned reg); + LiveInterval& getOrCreateInterval(unsigned reg); /// rep - returns the representative of this register unsigned rep(unsigned reg); Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.74 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.75 --- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.74 Sun May 30 02:46:27 2004 +++ llvm/lib/CodeGen/RegAllocLinearScan.cpp Mon Jun 21 08:10:56 2004 @@ -39,7 +39,7 @@ const TargetMachine* tm_; const MRegisterInfo* mri_; LiveIntervals* li_; - typedef std::list IntervalPtrs; + typedef std::list IntervalPtrs; IntervalPtrs unhandled_, fixed_, active_, inactive_, handled_; std::auto_ptr prt_; @@ -374,12 +374,12 @@ if (cur->weight <= minWeight) { DEBUG(std::cerr << "\t\t\tspilling(c): " << *cur << '\n';); int slot = vrm_->assignVirt2StackSlot(cur->reg); - std::vector added = + std::vector added = li_->addIntervalsForSpills(*cur, *vrm_, slot); // merge added with unhandled - std::vector::iterator addedIt = added.begin(); - std::vector::iterator addedItEnd = added.end(); + std::vector::iterator addedIt = added.begin(); + std::vector::iterator addedItEnd = added.end(); for (IntervalPtrs::iterator i = unhandled_.begin(), e = unhandled_.end(); i != e && addedIt != addedItEnd; ++i) { if ((*i)->start() > (*addedIt)->start()) @@ -399,7 +399,7 @@ // otherwise we spill all intervals aliasing the register with // minimum weight, rollback to the interval with the earliest // start point and let the linear scan algorithm run again - std::vector added; + std::vector added; assert(MRegisterInfo::isPhysicalRegister(minReg) && "did not choose a register to spill?"); std::vector toSpill(mri_->getNumRegs(), false); @@ -418,7 +418,7 @@ DEBUG(std::cerr << "\t\t\tspilling(a): " << **i << '\n'); earliestStart = std::min(earliestStart, (*i)->start()); int slot = vrm_->assignVirt2StackSlot((*i)->reg); - std::vector newIs = + std::vector newIs = li_->addIntervalsForSpills(**i, *vrm_, slot); std::copy(newIs.begin(), newIs.end(), std::back_inserter(added)); spilled.insert(reg); @@ -433,7 +433,7 @@ DEBUG(std::cerr << "\t\t\tspilling(i): " << **i << '\n'); earliestStart = std::min(earliestStart, (*i)->start()); int slot = vrm_->assignVirt2StackSlot((*i)->reg); - std::vector newIs = + std::vector newIs = li_->addIntervalsForSpills(**i, *vrm_, slot); std::copy(newIs.begin(), newIs.end(), std::back_inserter(added)); spilled.insert(reg); @@ -496,10 +496,10 @@ } } - std::sort(added.begin(), added.end(), less_ptr()); + std::sort(added.begin(), added.end(), less_ptr()); // merge added with unhandled - std::vector::iterator addedIt = added.begin(); - std::vector::iterator addedItEnd = added.end(); + std::vector::iterator addedIt = added.begin(); + std::vector::iterator addedItEnd = added.end(); for (IntervalPtrs::iterator i = unhandled_.begin(), e = unhandled_.end(); i != e && addedIt != addedItEnd; ++i) { if ((*i)->start() > (*addedIt)->start()) From brukman at cs.uiuc.edu Mon Jun 21 09:08:02 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 09:08:02 2004 Subject: [llvm-commits] CVS: llvm/docs/CFEBuildInstrs.html Message-ID: <200406211400.JAA01797@zion.cs.uiuc.edu> Changes in directory llvm/docs: CFEBuildInstrs.html updated: 1.19 -> 1.20 --- Log message: Mention the requirement of dlcompat for MacOS X. --- Diffs of the changes: (+3 -3) Index: llvm/docs/CFEBuildInstrs.html diff -u llvm/docs/CFEBuildInstrs.html:1.19 llvm/docs/CFEBuildInstrs.html:1.20 --- llvm/docs/CFEBuildInstrs.html:1.19 Fri Jun 18 10:54:54 2004 +++ llvm/docs/CFEBuildInstrs.html Mon Jun 21 09:00:44 2004 @@ -108,8 +108,8 @@
  • Configure, build, and install the C front-end:

    -Linux/x86:
    -MacOS X/PowerPC:
    +Linux/x86:
    +MacOS X/PowerPC (requires dlcompat library):

    @@ -302,7 +302,7 @@
     
       Brian Gaeke
    LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/06/18 15:54:54 $ + Last modified: $Date: 2004/06/21 14:00:44 $ From criswell at cs.uiuc.edu Mon Jun 21 10:07:03 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Mon Jun 21 10:07:03 2004 Subject: [llvm-commits] CVS: llvm/test/QMTest/expectations.darwin.qmr expectations.linux.qmr expectations.sunos.qmr expectations.unknown.qmr Message-ID: <200406211506.KAA24121@choi.cs.uiuc.edu> Changes in directory llvm/test/QMTest: expectations.darwin.qmr updated: 1.2 -> 1.3 expectations.linux.qmr updated: 1.9 -> 1.10 expectations.sunos.qmr updated: 1.9 -> 1.10 expectations.unknown.qmr updated: 1.4 -> 1.5 --- Log message: Regression.CodeGen.Generic.2004-04-09-SameValueCoalescing : XFAIL Regression.C++Frontend.2003-09-30-ForIncrementExprBug2: http://llvm.cs.uiuc.edu/PR2 : PASS --- Diffs of the changes: (+4 -4) Index: llvm/test/QMTest/expectations.darwin.qmr diff -u llvm/test/QMTest/expectations.darwin.qmr:1.2 llvm/test/QMTest/expectations.darwin.qmr:1.3 --- llvm/test/QMTest/expectations.darwin.qmr:1.2 Mon Mar 29 14:23:14 2004 +++ llvm/test/QMTest/expectations.darwin.qmr Mon Jun 21 10:05:48 2004 @@ -3,13 +3,13 @@ qoq}q(U _Result__kindqUtestqU_Result__outcomeqUPASSqU_Result__annotationsq}U _Result__idq U0Regression.Assembler.2002-08-16-ConstExprInlinedq U_Result__contextq (cqm.test.context Context -q o}q (U_Context__propertiesq}U_Context__temporariesq}ubub.(hoq}q(hhhhh}h U(Regression.Transforms.PruneEH.simpletestqh (h o}q(h}h}ubub.(hoq}q(hhhhh}h U/Regression.CBackend.2002-08-19-HardConstantExprqh (h o}q(h}h}ubub.(hoq}q(hhhhh}h URegression.Jello.test-shiftqh (h o}q(h}h}ubub.(hoq}q(hhhhh}h U9Regression.Transforms.Mem2Reg.2003-10-05-DeadPHIInsertionqh (h o}q(h}h}ubub.(hoq }q!(hhhUFAILq"h}h U.Regression.Transforms.CorrelatedExprs.looptestq#h (h o}q$(h}h}ubub.(hoq%}q&(hhhhh}h U-Regression.Linker.2003-08-23-GlobalVarLinkingq'h (h o}q((h}h}ubub.(hoq)}q*(hhhhh}h U?Regression.Transforms.Inline.2003-09-22-PHINodesInExceptionDestq+h (h o}q,(h}h}ubub.(hoq-}q.(hhhh"h}h U,Regression.CFrontend.2003-02-12-NonlocalGotoq/h (h o}q0(h}h}ubub.(hoq1}q2(hhhhh}h U2Regression.Transforms.FunctionResolve.retmismatch1q3h (h o}q4(h}h}ubub.(hoq5}q6(hhhhh}h U8Regression.Transforms.ADCE.2003-01-22-Prede! cessorProblemq7h (h o}q8(h}h}ubub.(hoq9}q:(hhhhh}h U=Regression.Transforms.LevelRaise.2002-10-08-VarArgCallInfLoopq;h (h o}q<(h}h}ubub.(hoq=}q>(hhhhh}h U Regression.Reoptimizer.ticm.ticmq?h (h o}q@(h}h}ubub.(hoqA}qB(hhhhh}h U8Regression.C++Frontend.2003-09-29-ArgumentNumberMismatchqCh (h o}qD(h}h}ubub.(hoqE}qF(hhhhh}h U+Regression.CFrontend.2002-09-19-StarInLabelqGh (h o}qH(h}h}ubub.(hoqI}qJ(hhhhh}h U.Regression.CFrontend.2003-08-23-LocalUnionTestqKh (h o}qL(h}h}ubub.(hoqM}qN(hhhhh}h U/Regression.Linker.2003-04-26-NullPtrLinkProblemqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhhh}h U)Regression.Transforms.Reassociate.subtestqSh (h o}qT(h}h}ubub.(hoqU}qV(hhhhh}h U)Regression.Linker.2002-08-20-ConstantExprqWh (h o}qX(h}h}ubub.(hoqY}qZ(hhhhh}h U=Regression.Transforms.Reassociate.2002-05-15-AgressiveSubMoveq[h (h o}q\(h}h}ubub.(hoq]}q^(hhhhh}h UARegression.Transforms.CorrelatedExprs.2002-10-07-DominatorProblemq_! h (h o}q`(h}h}ubub.(hoqa}qb(hhhhh}h U3Regression.Transforms.Pi NodeInserter.substitutetestqch (h o}qd(h}h}ubub.(hoqe}qf(hhhhh}h U4Regression.Transforms.SCCP.2003-08-26-InvokeHandlingqgh (h o}qh(h}h}ubub.(hoqi}qj(hhhhh}h U-Regression.CFrontend.2002-02-18-64bitConstantqkh (h o}ql(h}h}ubub.(hoqm}qn(hhhhh}h U1Regression.Assembler.2002-04-04-PureVirtMethCall2qoh (h o}qp(h}h}ubub.(hoqq}qr(hhhhh}h U(Regression.Reoptimizer.BinInterface.testqsh (h o}qt(h}h}ubub.(hoqu}qv(hhhhh}h URegression.Transforms.CorrelatedExprs.2002-10-08-DominatorTestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h URegression.Linker.testlink2q?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U(Regression.Transforms.GCSE.RLE-Eliminateq?h (h o}q?(h}h}ubu! b.(hoq?}q?(hhhhh}h U4Regression.C++Frontend.2003-09-30-NestedFunctionDeclq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U=Regression.Transforms.CorrelatedExprs.2002-09-23-PHIUpdateBugq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U7Regression.Transforms.LowerSwitch.2003-05-01-PHIProblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U2Regression.Transforms.ADCE.2003-09-15-InfLoopCrashq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U*Regression.Transforms.DSAnalysis.recursionq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U)Regression.Jello.2003-01-15-AlignmentTestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h UFeature.mc.simplecalltestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U*Regression.CFrontend.2002-04-07-SwitchStmtq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U!Regression.Jello.2003-01-10-FUCOMq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U(Regression.CFrontend.2003-08-21-StmtExprq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUPASSq?h}h U*Regression.Transforms.Scalar! Repl.basictestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhh"h}h U6Regressi on.Transforms.LevelRaise.2002-02-11-ArrayShapeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U1Regression.Assembler.2003-03-03-DuplicateConstantq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U.Regression.Transforms.ModuloSched.arith-simpleq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U%Regression.Transforms.InstCombine.andq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U)Regression.Other.2002-08-02-DomSetProblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U6Regression.Assembler.2002-07-25-ParserAssertionFailureq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U6Regression.Transforms.LevelRaise.2002-03-20-BadCodegenq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U6Regression.Transforms.ADCE.2002-07-17-AssertionFailureq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h UFeature.mc.recursivetypeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U$Regression.Transforms.InstCombine.orq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U Regression.Verifier.AmbiguousPhiq?h (h o}q?(h}h}ubub.(hoq?}! q?(hhhhh}h U'Regression.Analysis.DSGraph.constantizeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U6Regression.Transforms.GlobalDCE.2002-08-17-FunctionDGEq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U4Regression.Transforms.SimplifyCFG.2002-06-24-PHINodeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U(Regression.Linker.2003-05-15-TypeProblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U#Regression.Transforms.SCCP.sccptestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U2Regression.Transforms.FunctionResolve.retmismatch3q?h (h o}q?(h}h}ubub.(hor--------- \ No newline at end of file +q o}q (U_Context__propertiesq}U_Context__temporariesq}ubub.(hoq}q(hhhhh}h U(Regression.Transforms.PruneEH.simpletestqh (h o}q(h}h}ubub.(hoq}q(hhhhh}h U/Regression.CBackend.2002-08-19-HardConstantExprqh (h o}q(h}h}ubub.(hoq}q(hhhhh}h URegression.Jello.test-shiftqh (h o}q(h}h}ubub.(hoq}q(hhhUFAILqh}h U.Regression.Transforms.CorrelatedExprs.looptestqh (h o}q (h}h}ubub.(hoq!}q"(hhhhh}h U-Regression.Linker.2003-08-23-GlobalVarLinkingq#h (h o}q$(h}h}ubub.(hoq%}q&(hhhhh}h U?Regression.Transforms.Inline.2003-09-22-PHINodesInExceptionDestq'h (h o}q((h}h}ubub.(hoq)}q*(hhhhh}h U,Regression.CFrontend.2003-02-12-NonlocalGotoq+h (h o}q,(h}h}ubub.(hoq-}q.(hhhhh}h U2Regression.Transforms.FunctionResolve.retmismatch1q/h (h o}q0(h}h}ubub.(hoq1}q2(hhhhh}h U>Regression.Transforms.LevelRaise.2002-05-02-BadCastEliminationq3h (h o}q4(h}h}ubub.(hoq5}q6(hhhhh}h U8Regression.Transforms.ADCE.2003-01-22-! PredecessorProblemq7h (h o}q8(h}h}ubub.(hoq9}q:(hhhhh}h U=Regression.Transforms.LevelRaise.2002-10-08-VarArgCallInfLoopq;h (h o}q<(h}h}ubub.(hoq=}q>(hhhhh}h U5Regression.CFrontend.2003-07-22-ArrayAccessTypeSafetyq?h (h o}q@(h}h}ubub.(hoqA}qB(hhhhh}h U8Regression.C++Frontend.2003-09-29-ArgumentNumberMismatchqCh (h o}qD(h}h}ubub.(hoqE}qF(hhhhh}h U+Regression.CFrontend.2002-09-19-StarInLabelqGh (h o}qH(h}h}ubub.(hoqI}qJ(hhhhh}h U.Regression.CFrontend.2003-08-23-LocalUnionTestqKh (h o}qL(h}h}ubub.(hoqM}qN(hhhhh}h U"Regression.Jello.2003-06-05-PHIBugqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhUPASSqSh}h U$Regression.BugPoint.misopt-basictestqTh (h o}qU(h}h}ubub.(hoqV}qW(hhhhh}h U/Regression.Linker.2003-04-26-NullPtrLinkProblemqXh (h o}qY(h}h}ubub.(hoqZ}q[(hhhhh}h U)Regression.Transforms.Reassociate.subtestq\h (h o}q](h}h}ubub.(hoq^}q_(hhhhh}h U)Regression.Linker.2002-08-20-ConstantExprq`h (h o}qa(h}h}ubub.(h! oqb}qc(hhhhh}h U=Regression.Transforms.Reassociate.2002-05-15-Agr essiveSubMoveqdh (h o}qe(h}h}ubub.(hoqf}qg(hhhhh}h UARegression.Transforms.CorrelatedExprs.2002-10-07-DominatorProblemqhh (h o}qi(h}h}ubub.(hoqj}qk(hhhhh}h U3Regression.Transforms.PiNodeInserter.substitutetestqlh (h o}qm(h}h}ubub.(hoqn}qo(hhhhh}h U4Regression.Transforms.SCCP.2003-08-26-InvokeHandlingqph (h o}qq(h}h}ubub.(hoqr}qs(hhhhh}h U$Regression.Jello.2003-01-04-LoopTestqth (h o}qu(h}h}ubub.(hoqv}qw(hhhhh}h U1Regression.Assembler.2002-04-04-PureVirtMethCall2qxh (h o}qy(h}h}ubub.(hoqz}q{(hhhhh}h U)Regression.CFrontend.2002-07-14-MiscTestsq|h (h o}q}(h}h}ubub.(hoq~}q(hhhhh}h U(hhhhh}h U Regression.Reoptimizer.ticm.ticmq?h (h o}q@(h}h}ubub.(hoqA}qB(hhhhh}h U8Regression.C++Frontend.2003-09-29-ArgumentNumberMismatchqCh (h o}qD(h}h}ubub.(hoqE}qF(hhhhh}h U+Regression.CFrontend.2002-09-19-StarInLabelqGh (h o}qH(h}h}ubub.(hoqI}qJ(hhhhh}h U.Regression.CFrontend.2003-08-23-LocalUnionTestqKh (h o}qL(h}h}ubub.(hoqM}qN(hhhhh}h U-Regression.C++Frontend.2003-08-28-SaveExprBugqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhhh}h U"Regression.Jello.2003-06-05-PHIBugqSh (h o}qT(h}h}ubub.(hoqU}qV(hhhhh}h U/Regression.Linker.2003-04-26-NullPtrLinkProblemqWh (h o}qX(h}h}ubub.(hoqY}qZ(hhhhh}h U)Regression.Transforms.Reassociate.subtestq[h (h o}q\(h}h}ubub.(hoq]}q^(hhhhh}h U)Regression.Linker.2002-08-20-ConstantExprq_h (h o}q`(h}h}ubub.(hoqa}qb(hhhhh}h U=Regressi! on.Transforms.Reassociate.2002-05-15-AgressiveSubMoveqch (h o}qd(h}h }ubub.(hoqe}qf(hhhhh}h UARegression.Transforms.CorrelatedExprs.2002-10-07-DominatorProblemqgh (h o}qh(h}h}ubub.(hoqi}qj(hhhhh}h U3Regression.Transforms.PiNodeInserter.substitutetestqkh (h o}ql(h}h}ubub.(hoqm}qn(hhhhh}h U4Regression.Transforms.SCCP.2003-08-26-InvokeHandlingqoh (h o}qp(h}h}ubub.(hoqq}qr(hhhhh}h U$Regression.Jello.2003-01-04-LoopTestqsh (h o}qt(h}h}ubub.(hoqu}qv(hhhhh}h U1Regression.Assembler.2002-04-04-PureVirtMethCall2qwh (h o}qx(h}h}ubub.(hoqy}qz(hhhhh}h U)Regression.CFrontend.2002-07-14-MiscTestsq{h (h o}q|(h}h}ubub.(hoq}}q~(hhhhh}h U(hhhhh}h U Regression.Reoptimizer.ticm.ticmq?h (h o}q@(h}h}ubub.(hoqA}qB(hhhhh}h U8Regression.C++Frontend.2003-09-29-ArgumentNumberMismatchqCh (h o}qD(h}h}ubub.(hoqE}qF(hhhhh}h U+Regression.CFrontend.2002-09-19-StarInLabelqGh (h o}qH(h}h}ubub.(hoqI}qJ(hhhhh}h U.Regression.CFrontend.2003-08-23-LocalUnionTestqKh (h o}qL(h}h}ubub.(hoqM}qN(hhhhh}h U/Regression.Linker.2003-04-26-NullPtrLinkProblemqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhhh}h U)Regression.Transforms.Reassociate.subtestqSh (h o}qT(h}h}ubub.(hoqU}qV(hhhhh}h U)Regression.Linker.2002-08-20-ConstantExprqWh (h o}qX(h}h}ubub.(hoqY}qZ(hhhhh}h U=Regression.Transforms.Reassociate.2002-05-15-AgressiveSubMoveq[h (h o}q\(h}h}ubub.(hoq]}q^(hhhhh}h UARegression.Transforms.CorrelatedExprs.2002-10-07-DominatorProblemq_! h (h o}q`(h}h}ubub.(hoqa}qb(hhhhh}h U3Regression.Transforms.Pi NodeInserter.substitutetestqch (h o}qd(h}h}ubub.(hoqe}qf(hhhhh}h U4Regression.Transforms.SCCP.2003-08-26-InvokeHandlingqgh (h o}qh(h}h}ubub.(hoqi}qj(hhhhh}h U-Regression.CFrontend.2002-02-18-64bitConstantqkh (h o}ql(h}h}ubub.(hoqm}qn(hhhhh}h U1Regression.Assembler.2002-04-04-PureVirtMethCall2qoh (h o}qp(h}h}ubub.(hoqq}qr(hhhhh}h U(Regression.Reoptimizer.BinInterface.testqsh (h o}qt(h}h}ubub.(hoqu}qv(hhhhh}h U(hhhhh}h U=Regression.Transforms.LevelRaise.2002-10-08-VarArgCallInfLoopq?h (h o}q@(h}h}ubub.(hoqA}qB(hhhhh}h U Regression.Reoptimizer.ticm.ticmqCh (h o}qD(h}h}ubub.(hoqE}qF(hhhhh}h U8Regression.C++Frontend.2003-09-29-ArgumentNumberMismatchqGh (h o}qH(h}h}ubub.(hoqI}qJ(hhhhh}h U+Regression.CFrontend.2002-09-19-StarInLabelqKh (h o}qL(h}h}ubub.(hoqM}qN(hhhhh}h U.Regression.CFrontend.2003-08-23-LocalUnionTestqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhhh}h U/Regression.Linker.2003-04-26-NullPtrLinkProblemqSh (h o}qT(h}h}ubub.(hoqU}qV(hhhhh}h U)Regression.Transforms.Reassociate.subtestqWh (h o}qX(h}h}ubub.(hoqY}qZ(hhhhh}h U)Regression.Linker.2002-08-20-ConstantExprq[h (h o}q\(h}h}ubub.(hoq]}q^(hhhhh}h U=Regression.Transforms.Reassociate.2002-05-15-AgressiveSubMoveq_h (h o}q`(h}h! }ubub.(hoqa}qb(hhhhh}h UARegression.Transforms.CorrelatedExprs.2 002-10-07-DominatorProblemqch (h o}qd(h}h}ubub.(hoqe}qf(hhhhh}h U3Regression.Transforms.PiNodeInserter.substitutetestqgh (h o}qh(h}h}ubub.(hoqi}qj(hhhhh}h U4Regression.Transforms.SCCP.2003-08-26-InvokeHandlingqkh (h o}ql(h}h}ubub.(hoqm}qn(hhhhh}h U-Regression.CFrontend.2002-02-18-64bitConstantqoh (h o}qp(h}h}ubub.(hoqq}qr(hhhhh}h U1Regression.Assembler.2002-04-04-PureVirtMethCall2qsh (h o}qt(h}h}ubub.(hoqu}qv(hhhhh}h U(Regression.Reoptimizer.BinInterface.testqwh (h o}qx(h}h}ubub.(hoqy}qz(hhhhh}h U(hhhhh}h U8Regression.C++Frontend.2003-09-29-ArgumentNumberMismatchq?h (h o}q@(h}h}ubub.(hoqA}qB(hhhhh}h U+Regression.CFrontend.2002-09-19-StarInLabelqCh (h o}qD(h}h}ubub.(hoqE}qF(hhhhh}h U.Regression.CFrontend.2003-08-23-LocalUnionTestqGh (h o}qH(h}h}ubub.(hoqI}qJ(hhhhh}h U-Regression.C++Frontend.2003-08-28-SaveExprBugqKh (h o}qL(h}h}ubub.(hoqM}qN(hhhhh}h U"Regression.Jello.2003-06-05-PHIBugqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhhh}h U/Regression.Linker.2003-04-26-NullPtrLinkProblemqSh (h o}qT(h}h}ubub.(hoqU}qV(hhhhh}h U)Regression.Transforms.Reassociate.subtestqWh (h o}qX(h}h}ubub.(hoqY}qZ(hhhhh}h U)Regression.Linker.2002-08-20-ConstantExprq[h (h o}q\(h}h}ubub.(hoq]}q^(hhhhh}h U=Regression.Transforms.Reassociate.2002-05-15-AgressiveSubMoveq_h (h o}q`(h}h}ubub.(! hoqa}qb(hhhhh}h UARegression.Transforms.CorrelatedExprs.2002-10- 07-DominatorProblemqch (h o}qd(h}h}ubub.(hoqe}qf(hhhhh}h U>Regression.Transforms.InstCombine.2003-06-22-ConstantExprCrashqgh (h o}qh(h}h}ubub.(hoqi}qj(hhhhh}h U3Regression.Transforms.PiNodeInserter.substitutetestqkh (h o}ql(h}h}ubub.(hoqm}qn(hhhhh}h U4Regression.Transforms.SCCP.2003-08-26-InvokeHandlingqoh (h o}qp(h}h}ubub.(hoqq}qr(hhhhh}h U$Regression.Jello.2003-01-04-LoopTestqsh (h o}qt(h}h}ubub.(hoqu}qv(hhhhh}h U1Regression.Assembler.2002-04-04-PureVirtMethCall2qwh (h o}qx(h}h}ubub.(hoqy}qz(hhhhh}h U)Regression.CFrontend.2002-07-14-MiscTestsq{h (h o}q|(h}h}ubub.(hoq}}q~(hhhhh}h URegression.Transforms.LevelRaise.2002-05-02-BadCastEliminationq3h (h o}q4(h}h}ubub.(hoq5}q6(hhhhh}h U8Regression.Transforms.ADCE.2003-01-22-! PredecessorProblemq7h (h o}q8(h}h}ubub.(hoq9}q:(hhhhh}h U=Regression.Transforms.LevelRaise.2002-10-08-VarArgCallInfLoopq;h (h o}q<(h}h}ubub.(hoq=}q>(hhhhh}h U Regression.Reoptimizer.ticm.ticmq?h (h o}q@(h}h}ubub.(hoqA}qB(hhhhh}h U8Regression.C++Frontend.2003-09-29-ArgumentNumberMismatchqCh (h o}qD(h}h}ubub.(hoqE}qF(hhhhh}h U1Regression.CFrontend.2002-03-12-StructInitializerqGh (h o}qH(h}h}ubub.(hoqI}qJ(hhhhh}h U+Regression.CFrontend.2002-09-19-StarInLabelqKh (h o}qL(h}h}ubub.(hoqM}qN(hhhhh}h U.Regression.CFrontend.2003-08-23-LocalUnionTestqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhhh}h U-Regression.C++Frontend.2003-08-28-SaveExprBugqSh (h o}qT(h}h}ubub.(hoqU}qV(hhhhh}h U"Regression.Jello.2003-06-05-PHIBugqWh (h o}qX(h}h}ubub.(hoqY}qZ(hhhhh}h U/Regression.Linker.2003-04-26-NullPtrLinkProblemq[h (h o}q\(h}h}ubub.(hoq]}q^(hhhhh}h U)Regression.Transforms.Reassociate.subtestq_h (h o}q`(h}h}ubub.(hoqa}qb(hh! hhh}h U)Regression.Linker.2002-08-20-ConstantExprqch (h o}qd(h}h }ubub.(hoqe}qf(hhhhh}h U=Regression.Transforms.Reassociate.2002-05-15-AgressiveSubMoveqgh (h o}qh(h}h}ubub.(hoqi}qj(hhhhh}h UARegression.Transforms.CorrelatedExprs.2002-10-07-DominatorProblemqkh (h o}ql(h}h}ubub.(hoqm}qn(hhhhh}h U3Regression.Transforms.PiNodeInserter.substitutetestqoh (h o}qp(h}h}ubub.(hoqq}qr(hhhhh}h U4Regression.Transforms.SCCP.2003-08-26-InvokeHandlingqsh (h o}qt(h}h}ubub.(hoqu}qv(hhhhh}h U$Regression.Jello.2003-01-04-LoopTestqwh (h o}qx(h}h}ubub.(hoqy}qz(hhhhh}h U1Regression.Assembler.2002-04-04-PureVirtMethCall2q{h (h o}q|(h}h}ubub.(hoq}}q~(hhhhh}h U)Regression.CFrontend.2002-07-14-MiscTestsqh (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U(hhhhh}h U Regression.Reoptimizer.ticm.ticmq?h (h o}q@(h}h}ubub.(hoqA}qB(hhhhh}h U8Regression.C++Frontend.2003-09-29-ArgumentNumberMismatchqCh (h o}qD(h}h}ubub.(hoqE}qF(hhhhh}h U+Regression.CFrontend.2002-09-19-StarInLabelqGh (h o}qH(h}h}ubub.(hoqI}qJ(hhhhh}h U.Regression.CFrontend.2003-08-23-LocalUnionTestqKh (h o}qL(h}h}ubub.(hoqM}qN(hhhhh}h U/Regression.Linker.2003-04-26-NullPtrLinkProblemqOh (h o}qP(h}h}ubub.(hoqQ}qR(hhhhh}h U)Regression.Transforms.Reassociate.subtestqSh (h o}qT(h}h}ubub.(hoqU}qV(hhhhh}h U)Regression.Linker.2002-08-20-ConstantExprqWh (h o}qX(h}h}ubub.(hoqY}qZ(hhhhh}h U=Regression.Transforms.Reassociate.2002-05-15-AgressiveSubMoveq[h (h o}q\(h}h}ubub.(hoq]}q^(hhhhh}h UARegression.Transforms.CorrelatedExprs.2002-10-07-DominatorProblemq_! h (h o}q`(h}h}ubub.(hoqa}qb(hhhhh}h U3Regression.Transforms.Pi NodeInserter.substitutetestqch (h o}qd(h}h}ubub.(hoqe}qf(hhhhh}h U4Regression.Transforms.SCCP.2003-08-26-InvokeHandlingqgh (h o}qh(h}h}ubub.(hoqi}qj(hhhhh}h U-Regression.CFrontend.2002-02-18-64bitConstantqkh (h o}ql(h}h}ubub.(hoqm}qn(hhhhh}h U1Regression.Assembler.2002-04-04-PureVirtMethCall2qoh (h o}qp(h}h}ubub.(hoqq}qr(hhhhh}h U(Regression.Reoptimizer.BinInterface.testqsh (h o}qt(h}h}ubub.(hoqu}qv(hhhhh}h URegression.Transforms.CorrelatedExprs.2002-10-08-DominatorTestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h URegression.Linker.testlink2q?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U(Regression.Transforms.GCSE.RLE-Eliminateq?h (h o}q?(h}h}ubu! b.(hoq?}q?(hhhhh}h U4Regression.C++Frontend.2003-09-30-NestedFunctionDeclq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U=Regression.Transforms.CorrelatedExprs.2002-09-23-PHIUpdateBugq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U7Regression.Transforms.LowerSwitch.2003-05-01-PHIProblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U2Regression.Transforms.ADCE.2003-09-15-InfLoopCrashq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U*Regression.Transforms.DSAnalysis.recursionq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U)Regression.Jello.2003-01-15-AlignmentTestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h UFeature.mc.simplecalltestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U*Regression.CFrontend.2002-04-07-SwitchStmtq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U!Regression.Jello.2003-01-10-FUCOMq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U(Regression.CFrontend.2003-08-21-StmtExprq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUPASSq?h}h U*Regression.Transforms.Scalar! Repl.basictestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhh"h}h U6Regressi on.Transforms.LevelRaise.2002-02-11-ArrayShapeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U1Regression.Assembler.2003-03-03-DuplicateConstantq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U.Regression.Transforms.ModuloSched.arith-simpleq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U%Regression.Transforms.InstCombine.andq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U)Regression.Other.2002-08-02-DomSetProblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U6Regression.Assembler.2002-07-25-ParserAssertionFailureq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U6Regression.Transforms.LevelRaise.2002-03-20-BadCodegenq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U6Regression.Transforms.ADCE.2002-07-17-AssertionFailureq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhUFAILq?h}h UFeature.mc.recursivetypeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U$Regression.Transforms.InstCombine.orq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U Regression.Verifier.AmbiguousPhiq?h (h o}q?(h}h}ubub.(hoq?}! q?(hhhhh}h U'Regression.Analysis.DSGraph.constantizeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U6Regression.Transforms.GlobalDCE.2002-08-17-FunctionDGEq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U4Regression.Transforms.SimplifyCFG.2002-06-24-PHINodeq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U(Regression.Linker.2003-05-15-TypeProblemq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U#Regression.Transforms.SCCP.sccptestq?h (h o}q?(h}h}ubub.(hoq?}q?(hhhhh}h U2Regression.Transforms.FunctionResolve.retmismatch3q?h (h o}q?(h}h}ubub.(hor+++++++++ \ No newline at end of file From brukman at cs.uiuc.edu Mon Jun 21 10:45:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 10:45:01 2004 Subject: [llvm-commits] CVS: CVSROOT/loginfo Message-ID: <200406211537.KAA03408@zion.cs.uiuc.edu> Changes in directory CVSROOT: loginfo updated: 1.4 -> 1.5 --- Log message: Use the most up-to-date commit-diffs script. --- Diffs of the changes: (+4 -4) Index: CVSROOT/loginfo diff -u CVSROOT/loginfo:1.4 CVSROOT/loginfo:1.5 --- CVSROOT/loginfo:1.4 Wed Nov 19 23:07:10 2003 +++ CVSROOT/loginfo Mon Jun 21 10:37:18 2004 @@ -26,7 +26,7 @@ #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog # Automatically update the webpages -^llvm-www (/home/vadve/shared/InternalCVS/CVSROOT/update-www.sh &); /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu -^reopt /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu -^llva-emu /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-emu at nondot.org -^CVSROOT /home/vadve/vadve/Research/DynOpt/CVSRepository/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu +^llvm-www (/home/vadve/shared/InternalCVS/CVSROOT/update-www.sh &); /home/vadve/vadve/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu +^reopt /home/vadve/vadve/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu +^llva-emu /home/vadve/vadve/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-emu at nondot.org +^CVSROOT /home/vadve/vadve/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu From brukman at cs.uiuc.edu Mon Jun 21 13:09:02 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 13:09:02 2004 Subject: [llvm-commits] CVS: llvm/utils/TableGen/Record.cpp Message-ID: <200406211801.NAA20484@zion.cs.uiuc.edu> Changes in directory llvm/utils/TableGen: Record.cpp updated: 1.31 -> 1.32 --- Log message: Handle shifts >= 32 bits. --- Diffs of the changes: (+2 -2) Index: llvm/utils/TableGen/Record.cpp diff -u llvm/utils/TableGen/Record.cpp:1.31 llvm/utils/TableGen/Record.cpp:1.32 --- llvm/utils/TableGen/Record.cpp:1.31 Sat Feb 28 10:31:53 2004 +++ llvm/utils/TableGen/Record.cpp Mon Jun 21 13:01:47 2004 @@ -61,10 +61,10 @@ // appropriate bits... // Init *BitsRecTy::convertValue(IntInit *II) { - int Value = II->getValue(); + int64_t Value = II->getValue(); // Make sure this bitfield is large enough to hold the integer value... if (Value >= 0) { - if (Value & ~((1 << Size)-1)) + if (Value & ~((1LL << Size)-1)) return 0; } else { if ((Value >> Size) != -1 || ((Value & (1 << Size-1)) == 0)) From lattner at cs.uiuc.edu Mon Jun 21 13:22:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 13:22:03 2004 Subject: [llvm-commits] CVS: CVSROOT/loginfo Message-ID: <200406211814.NAA25690@zion.cs.uiuc.edu> Changes in directory CVSROOT: loginfo updated: 1.6 -> 1.7 --- Log message: Fix incorrect path --- Diffs of the changes: (+1 -1) Index: CVSROOT/loginfo diff -u CVSROOT/loginfo:1.6 CVSROOT/loginfo:1.7 --- CVSROOT/loginfo:1.6 Mon Jun 21 10:37:59 2004 +++ CVSROOT/loginfo Mon Jun 21 13:14:18 2004 @@ -26,7 +26,7 @@ #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog # Automatically update the webpages -^llvm-www (/home/vadve/shared/InternalCVS/CVSROOT/update-www.sh &); /home/vadve/vadve/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu +^llvm-www (/home/vadve/shared/InternalCVS/CVSROOT/update-www.sh &); /home/vadve/PublicCVS/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu ^reopt /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu ^llva-emu /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-emu at nondot.org ^CVSROOT /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu From lattner at cs.uiuc.edu Mon Jun 21 13:24:02 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 13:24:02 2004 Subject: [llvm-commits] CVS: llvm-www/Documentation.html Message-ID: <200406211816.NAA26430@zion.cs.uiuc.edu> Changes in directory llvm-www: Documentation.html updated: 1.11 -> 1.12 --- Log message: Test checkin --- Diffs of the changes: (+1 -1) Index: llvm-www/Documentation.html diff -u llvm-www/Documentation.html:1.11 llvm-www/Documentation.html:1.12 --- llvm-www/Documentation.html:1.11 Mon Jun 21 13:03:22 2004 +++ llvm-www/Documentation.html Mon Jun 21 13:16:32 2004 @@ -119,7 +119,7 @@ for the proper way to submit information about a bug you ran into in the LLVM system.
  • -
  • You can probably find help on the unofficial LLVM IRC channel. We often are +
  • You can probably find help on the unofficial LLVM IRC channel. We often are on irc.oftc.net in the #llvm channel.
  • LLVM Mailing Lists: From lattner at cs.uiuc.edu Mon Jun 21 13:24:05 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 13:24:05 2004 Subject: [llvm-commits] CVS: CVSROOT/loginfo Message-ID: <200406211816.NAA25752@zion.cs.uiuc.edu> Changes in directory CVSROOT: loginfo updated: 1.7 -> 1.8 --- Log message: hopefully a real fix --- Diffs of the changes: (+1 -1) Index: CVSROOT/loginfo diff -u CVSROOT/loginfo:1.7 CVSROOT/loginfo:1.8 --- CVSROOT/loginfo:1.7 Mon Jun 21 13:14:18 2004 +++ CVSROOT/loginfo Mon Jun 21 13:16:18 2004 @@ -26,7 +26,7 @@ #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog # Automatically update the webpages -^llvm-www (/home/vadve/shared/InternalCVS/CVSROOT/update-www.sh &); /home/vadve/PublicCVS/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu +^llvm-www (/home/vadve/shared/InternalCVS/CVSROOT/update-www.sh &); /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu ^reopt /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu ^llva-emu /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-emu at nondot.org ^CVSROOT /home/vadve/shared/PublicCVS/CVSROOT/commit-diffs.pl %{sVv} llvm-commits at cs.uiuc.edu From brukman at cs.uiuc.edu Mon Jun 21 13:52:13 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 13:52:13 2004 Subject: [llvm-commits] CVS: llvm/include/Config/pagesize.h Message-ID: <200406211843.NAA27504@zion.cs.uiuc.edu> Changes in directory llvm/include/Config: pagesize.h updated: 1.1 -> 1.2 --- Log message: Let's be consistent: listing format `os/arch'. --- Diffs of the changes: (+1 -1) Index: llvm/include/Config/pagesize.h diff -u llvm/include/Config/pagesize.h:1.1 llvm/include/Config/pagesize.h:1.2 --- llvm/include/Config/pagesize.h:1.1 Fri Jun 18 10:30:25 2004 +++ llvm/include/Config/pagesize.h Mon Jun 21 13:43:23 2004 @@ -19,7 +19,7 @@ /* Compatibility chart: * - * x86/Linux: _SC_PAGESIZE, _SC_PAGE_SIZE + * Linux/x86: _SC_PAGESIZE, _SC_PAGE_SIZE * MacOS X/PowerPC: v. 10.2: NBPG, * v. 10.3: _SC_PAGESIZE * Solaris/Sparc: _SC_PAGESIZE, _SC_PAGE_SIZE From brukman at cs.uiuc.edu Mon Jun 21 16:16:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 16:16:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp Message-ID: <200406212108.QAA28246@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetMachine.cpp updated: 1.26 -> 1.27 --- Log message: Implement `NoFPElim' in a target-agnostic fashion so it can be shared. --- Diffs of the changes: (+8 -1) Index: llvm/lib/Target/TargetMachine.cpp diff -u llvm/lib/Target/TargetMachine.cpp:1.26 llvm/lib/Target/TargetMachine.cpp:1.27 --- llvm/lib/Target/TargetMachine.cpp:1.26 Sun Jun 20 02:47:20 2004 +++ llvm/lib/Target/TargetMachine.cpp Mon Jun 21 16:08:45 2004 @@ -11,9 +11,9 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Target/TargetMachine.h" #include "llvm/Type.h" #include "llvm/CodeGen/IntrinsicLowering.h" +#include "llvm/Target/TargetMachine.h" #include "Support/CommandLine.h" using namespace llvm; @@ -23,11 +23,18 @@ namespace llvm { bool PrintMachineCode; + bool NoFPElim; }; + namespace { cl::opt PrintCode("print-machineinstrs", cl::desc("Print generated machine code"), cl::location(PrintMachineCode), cl::init(false)); + + cl::opt + DisableFPElim("disable-fp-elim", + cl::desc("Disable frame pointer elimination optimization"), + cl::location(NoFPElim), cl::init(false)); }; //--------------------------------------------------------------------------- From brukman at cs.uiuc.edu Mon Jun 21 16:16:04 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 16:16:04 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetMachineImpls.h Message-ID: <200406212108.QAA28213@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetMachineImpls.h updated: 1.14 -> 1.15 --- Log message: Make a single `NoFPElim' switch available to all targets. --- Diffs of the changes: (+1 -0) Index: llvm/include/llvm/Target/TargetMachineImpls.h diff -u llvm/include/llvm/Target/TargetMachineImpls.h:1.14 llvm/include/llvm/Target/TargetMachineImpls.h:1.15 --- llvm/include/llvm/Target/TargetMachineImpls.h:1.14 Tue Jun 15 19:26:45 2004 +++ llvm/include/llvm/Target/TargetMachineImpls.h Mon Jun 21 16:07:51 2004 @@ -20,6 +20,7 @@ /// these should go in their own header eventually. /// extern bool PrintMachineCode; + extern bool NoFPElim; class TargetMachine; class Module; From brukman at cs.uiuc.edu Mon Jun 21 16:18:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 16:18:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp Message-ID: <200406212110.QAA28278@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86RegisterInfo.cpp updated: 1.83 -> 1.84 --- Log message: Use the common `NoFPElim' setting instead of our own. --- Diffs of the changes: (+2 -4) Index: llvm/lib/Target/X86/X86RegisterInfo.cpp diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.83 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.84 --- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.83 Thu Jun 17 13:17:25 2004 +++ llvm/lib/Target/X86/X86RegisterInfo.cpp Mon Jun 21 16:10:00 2004 @@ -21,16 +21,14 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFrameInfo.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetFrameInfo.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetMachineImpls.h" #include "Support/CommandLine.h" #include "Support/STLExtras.h" using namespace llvm; namespace { - cl::opt - NoFPElim("disable-fp-elim", - cl::desc("Disable frame pointer elimination optimization")); cl::opt NoFusing("disable-spill-fusing", cl::desc("Disable fusing of spill code into instructions")); From brukman at cs.uiuc.edu Mon Jun 21 16:24:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 16:24:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Target/TargetMachineImpls.h Message-ID: <200406212116.QAA28463@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Target: TargetMachineImpls.h updated: 1.15 -> 1.16 --- Log message: Spell out `NoFramePointerElim' for readability. --- Diffs of the changes: (+1 -1) Index: llvm/include/llvm/Target/TargetMachineImpls.h diff -u llvm/include/llvm/Target/TargetMachineImpls.h:1.15 llvm/include/llvm/Target/TargetMachineImpls.h:1.16 --- llvm/include/llvm/Target/TargetMachineImpls.h:1.15 Mon Jun 21 16:07:51 2004 +++ llvm/include/llvm/Target/TargetMachineImpls.h Mon Jun 21 16:16:22 2004 @@ -20,7 +20,7 @@ /// these should go in their own header eventually. /// extern bool PrintMachineCode; - extern bool NoFPElim; + extern bool NoFramePointerElim; class TargetMachine; class Module; From brukman at cs.uiuc.edu Mon Jun 21 16:25:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 16:25:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp Message-ID: <200406212117.QAA28514@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: X86RegisterInfo.cpp updated: 1.84 -> 1.85 --- Log message: Spell out `NoFramePointerElim' for readability. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/X86/X86RegisterInfo.cpp diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.84 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.85 --- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.84 Mon Jun 21 16:10:00 2004 +++ llvm/lib/Target/X86/X86RegisterInfo.cpp Mon Jun 21 16:17:44 2004 @@ -333,7 +333,7 @@ // if frame pointer elimination is disabled. // static bool hasFP(MachineFunction &MF) { - return NoFPElim || MF.getFrameInfo()->hasVarSizedObjects(); + return NoFramePointerElim || MF.getFrameInfo()->hasVarSizedObjects(); } void X86RegisterInfo:: From brukman at cs.uiuc.edu Mon Jun 21 16:25:03 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 16:25:03 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp Message-ID: <200406212117.QAA28497@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetMachine.cpp updated: 1.27 -> 1.28 --- Log message: Spell out `NoFramePointerElim' for readability. --- Diffs of the changes: (+3 -2) Index: llvm/lib/Target/TargetMachine.cpp diff -u llvm/lib/Target/TargetMachine.cpp:1.27 llvm/lib/Target/TargetMachine.cpp:1.28 --- llvm/lib/Target/TargetMachine.cpp:1.27 Mon Jun 21 16:08:45 2004 +++ llvm/lib/Target/TargetMachine.cpp Mon Jun 21 16:16:58 2004 @@ -23,7 +23,7 @@ namespace llvm { bool PrintMachineCode; - bool NoFPElim; + bool NoFramePointerElim; }; namespace { @@ -34,7 +34,8 @@ cl::opt DisableFPElim("disable-fp-elim", cl::desc("Disable frame pointer elimination optimization"), - cl::location(NoFPElim), cl::init(false)); + cl::location(NoFramePointerElim), + cl::init(false)); }; //--------------------------------------------------------------------------- From brukman at cs.uiuc.edu Mon Jun 21 16:28:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 16:28:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp Message-ID: <200406212120.QAA28558@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetMachine.cpp updated: 1.28 -> 1.29 --- Log message: Move implemented interface header up to the top. --- Diffs of the changes: (+1 -1) Index: llvm/lib/Target/TargetMachine.cpp diff -u llvm/lib/Target/TargetMachine.cpp:1.28 llvm/lib/Target/TargetMachine.cpp:1.29 --- llvm/lib/Target/TargetMachine.cpp:1.28 Mon Jun 21 16:16:58 2004 +++ llvm/lib/Target/TargetMachine.cpp Mon Jun 21 16:20:23 2004 @@ -11,9 +11,9 @@ // //===----------------------------------------------------------------------===// +#include "llvm/Target/TargetMachine.h" #include "llvm/Type.h" #include "llvm/CodeGen/IntrinsicLowering.h" -#include "llvm/Target/TargetMachine.h" #include "Support/CommandLine.h" using namespace llvm; From brukman at cs.uiuc.edu Mon Jun 21 16:30:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 16:30:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp Message-ID: <200406212121.QAA28582@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetMachine.cpp updated: 1.29 -> 1.30 --- Log message: Specify variables' namespace directly instead of using an enclosing namespace. --- Diffs of the changes: (+2 -4) Index: llvm/lib/Target/TargetMachine.cpp diff -u llvm/lib/Target/TargetMachine.cpp:1.29 llvm/lib/Target/TargetMachine.cpp:1.30 --- llvm/lib/Target/TargetMachine.cpp:1.29 Mon Jun 21 16:20:23 2004 +++ llvm/lib/Target/TargetMachine.cpp Mon Jun 21 16:21:49 2004 @@ -21,10 +21,8 @@ // Command-line options that tend to be useful on more than one back-end. // -namespace llvm { - bool PrintMachineCode; - bool NoFramePointerElim; -}; +bool llvm::PrintMachineCode; +bool llvm::NoFramePointerElim; namespace { cl::opt PrintCode("print-machineinstrs", From brukman at cs.uiuc.edu Mon Jun 21 16:52:00 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 16:52:00 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/TargetMachine.cpp Message-ID: <200406212144.QAA27210@zion.cs.uiuc.edu> Changes in directory llvm/lib/Target: TargetMachine.cpp updated: 1.30 -> 1.31 --- Log message: Direct declaration of namespace-ified globals does not work, must enclose them with a namespace declaration. --- Diffs of the changes: (+4 -3) Index: llvm/lib/Target/TargetMachine.cpp diff -u llvm/lib/Target/TargetMachine.cpp:1.30 llvm/lib/Target/TargetMachine.cpp:1.31 --- llvm/lib/Target/TargetMachine.cpp:1.30 Mon Jun 21 16:21:49 2004 +++ llvm/lib/Target/TargetMachine.cpp Mon Jun 21 16:44:12 2004 @@ -21,9 +21,10 @@ // Command-line options that tend to be useful on more than one back-end. // -bool llvm::PrintMachineCode; -bool llvm::NoFramePointerElim; - +namespace llvm { + bool PrintMachineCode; + bool NoFramePointerElim; +}; namespace { cl::opt PrintCode("print-machineinstrs", cl::desc("Print generated machine code"), From brukman at cs.uiuc.edu Mon Jun 21 17:02:02 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Mon Jun 21 17:02:02 2004 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200406212154.QAA01894@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.142 -> 1.143 --- Log message: Use a reference instead of a pointer for the ostream. The pointer was only there to assist in the development of llvm-tv, and it no longer has a need to modify the AsmWriter output stream. --- Diffs of the changes: (+102 -103) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.142 llvm/lib/VMCore/AsmWriter.cpp:1.143 --- llvm/lib/VMCore/AsmWriter.cpp:1.142 Thu Jun 17 23:07:20 2004 +++ llvm/lib/VMCore/AsmWriter.cpp Mon Jun 21 16:53:56 2004 @@ -566,7 +566,7 @@ namespace llvm { class AssemblyWriter { - std::ostream *Out; + std::ostream &Out; SlotMachine &Machine; const Module *TheModule; std::map TypeNames; @@ -574,7 +574,7 @@ public: inline AssemblyWriter(std::ostream &o, SlotMachine &Mac, const Module *M, AssemblyAnnotationWriter *AAW) - : Out(&o), Machine(Mac), TheModule(M), AnnotationWriter(AAW) { + : Out(o), Machine(Mac), TheModule(M), AnnotationWriter(AAW) { // If the module has a symbol table, take all global types and stuff their // names into the TypeNames map. @@ -593,7 +593,6 @@ void writeOperand(const Value *Op, bool PrintType, bool PrintName = true); const Module* getModule() { return TheModule; } - void setStream(std::ostream &os) { Out = &os; } private : void printModule(const Module *M); @@ -609,7 +608,7 @@ // symbolic version of a type name. // std::ostream &printType(const Type *Ty) { - return printTypeInt(*Out, Ty, TypeNames); + return printTypeInt(Out, Ty, TypeNames); } // printTypeAtLeastOneLevel - Print out one level of the possibly complex type @@ -632,55 +631,55 @@ for (FunctionType::param_iterator I = FTy->param_begin(), E = FTy->param_end(); I != E; ++I) { if (I != FTy->param_begin()) - *Out << ", "; + Out << ", "; printType(*I); } if (FTy->isVarArg()) { - if (FTy->getNumParams()) *Out << ", "; - *Out << "..."; + if (FTy->getNumParams()) Out << ", "; + Out << "..."; } - *Out << ')'; + Out << ')'; } else if (const StructType *STy = dyn_cast(Ty)) { - *Out << "{ "; + Out << "{ "; for (StructType::element_iterator I = STy->element_begin(), E = STy->element_end(); I != E; ++I) { if (I != STy->element_begin()) - *Out << ", "; + Out << ", "; printType(*I); } - *Out << " }"; + Out << " }"; } else if (const PointerType *PTy = dyn_cast(Ty)) { printType(PTy->getElementType()) << '*'; } else if (const ArrayType *ATy = dyn_cast(Ty)) { - *Out << '[' << ATy->getNumElements() << " x "; + Out << '[' << ATy->getNumElements() << " x "; printType(ATy->getElementType()) << ']'; } else if (const OpaqueType *OTy = dyn_cast(Ty)) { - *Out << "opaque"; + Out << "opaque"; } else { if (!Ty->isPrimitiveType()) - *Out << ""; + Out << ""; printType(Ty); } - return *Out; + return Out; } void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType, bool PrintName) { - if (PrintType) { *Out << ' '; printType(Operand->getType()); } - WriteAsOperandInternal(*Out, Operand, PrintName, TypeNames, &Machine); + if (PrintType) { Out << ' '; printType(Operand->getType()); } + WriteAsOperandInternal(Out, Operand, PrintName, TypeNames, &Machine); } void AssemblyWriter::printModule(const Module *M) { switch (M->getEndianness()) { - case Module::LittleEndian: *Out << "target endian = little\n"; break; - case Module::BigEndian: *Out << "target endian = big\n"; break; + case Module::LittleEndian: Out << "target endian = little\n"; break; + case Module::BigEndian: Out << "target endian = big\n"; break; case Module::AnyEndianness: break; } switch (M->getPointerSize()) { - case Module::Pointer32: *Out << "target pointersize = 32\n"; break; - case Module::Pointer64: *Out << "target pointersize = 64\n"; break; + case Module::Pointer32: Out << "target pointersize = 32\n"; break; + case Module::Pointer64: Out << "target pointersize = 64\n"; break; case Module::AnyPointerSize: break; } @@ -690,7 +689,7 @@ for (Module::const_giterator I = M->gbegin(), E = M->gend(); I != E; ++I) printGlobal(I); - *Out << "\nimplementation ; Functions:\n"; + Out << "\nimplementation ; Functions:\n"; // Output all of the functions... for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) @@ -698,27 +697,27 @@ } void AssemblyWriter::printGlobal(const GlobalVariable *GV) { - if (GV->hasName()) *Out << getLLVMName(GV->getName()) << " = "; + if (GV->hasName()) Out << getLLVMName(GV->getName()) << " = "; if (!GV->hasInitializer()) - *Out << "external "; + Out << "external "; else switch (GV->getLinkage()) { - case GlobalValue::InternalLinkage: *Out << "internal "; break; - case GlobalValue::LinkOnceLinkage: *Out << "linkonce "; break; - case GlobalValue::WeakLinkage: *Out << "weak "; break; - case GlobalValue::AppendingLinkage: *Out << "appending "; break; + case GlobalValue::InternalLinkage: Out << "internal "; break; + case GlobalValue::LinkOnceLinkage: Out << "linkonce "; break; + case GlobalValue::WeakLinkage: Out << "weak "; break; + case GlobalValue::AppendingLinkage: Out << "appending "; break; case GlobalValue::ExternalLinkage: break; } - *Out << (GV->isConstant() ? "constant " : "global "); + Out << (GV->isConstant() ? "constant " : "global "); printType(GV->getType()->getElementType()); if (GV->hasInitializer()) writeOperand(GV->getInitializer(), false, false); printInfoComment(*GV); - *Out << "\n"; + Out << "\n"; } @@ -729,7 +728,7 @@ // Print the types. for (SymbolTable::type_const_iterator TI = ST.type_begin(); TI != ST.type_end(); ++TI ) { - *Out << "\t" << getLLVMName(TI->first) << " = type "; + Out << "\t" << getLLVMName(TI->first) << " = type "; // Make sure we print out at least one level of the type structure, so // that we do not get %FILE = type %FILE @@ -760,40 +759,40 @@ if (!CPV->hasName()) return; // Print out name... - *Out << "\t" << getLLVMName(CPV->getName()) << " ="; + Out << "\t" << getLLVMName(CPV->getName()) << " ="; // Write the value out now... writeOperand(CPV, true, false); printInfoComment(*CPV); - *Out << "\n"; + Out << "\n"; } /// printFunction - Print all aspects of a function. /// void AssemblyWriter::printFunction(const Function *F) { // Print out the return type and name... - *Out << "\n"; + Out << "\n"; - if (AnnotationWriter) AnnotationWriter->emitFunctionAnnot(F, *Out); + if (AnnotationWriter) AnnotationWriter->emitFunctionAnnot(F, Out); if (F->isExternal()) - *Out << "declare "; + Out << "declare "; else switch (F->getLinkage()) { - case GlobalValue::InternalLinkage: *Out << "internal "; break; - case GlobalValue::LinkOnceLinkage: *Out << "linkonce "; break; - case GlobalValue::WeakLinkage: *Out << "weak "; break; - case GlobalValue::AppendingLinkage: *Out << "appending "; break; + case GlobalValue::InternalLinkage: Out << "internal "; break; + case GlobalValue::LinkOnceLinkage: Out << "linkonce "; break; + case GlobalValue::WeakLinkage: Out << "weak "; break; + case GlobalValue::AppendingLinkage: Out << "appending "; break; case GlobalValue::ExternalLinkage: break; } printType(F->getReturnType()) << ' '; if (!F->getName().empty()) - *Out << getLLVMName(F->getName()); + Out << getLLVMName(F->getName()); else - *Out << "\"\""; - *Out << '('; + Out << "\"\""; + Out << '('; Machine.incorporateFunction(F); // Loop over the arguments, printing them... @@ -804,21 +803,21 @@ // Finish printing arguments... if (FT->isVarArg()) { - if (FT->getNumParams()) *Out << ", "; - *Out << "..."; // Output varargs portion of signature! + if (FT->getNumParams()) Out << ", "; + Out << "..."; // Output varargs portion of signature! } - *Out << ')'; + Out << ')'; if (F->isExternal()) { - *Out << "\n"; + Out << "\n"; } else { - *Out << " {"; + Out << " {"; // Output all of its basic blocks... for the function for (Function::const_iterator I = F->begin(), E = F->end(); I != E; ++I) printBasicBlock(I); - *Out << "}\n"; + Out << "}\n"; } Machine.purgeFunction(); @@ -829,60 +828,60 @@ /// void AssemblyWriter::printArgument(const Argument *Arg) { // Insert commas as we go... the first arg doesn't get a comma - if (Arg != &Arg->getParent()->afront()) *Out << ", "; + if (Arg != &Arg->getParent()->afront()) Out << ", "; // Output type... printType(Arg->getType()); // Output name, if available... if (Arg->hasName()) - *Out << ' ' << getLLVMName(Arg->getName()); + Out << ' ' << getLLVMName(Arg->getName()); } /// printBasicBlock - This member is called for each basic block in a method. /// void AssemblyWriter::printBasicBlock(const BasicBlock *BB) { if (BB->hasName()) { // Print out the label if it exists... - *Out << "\n" << BB->getName() << ':'; + Out << "\n" << BB->getName() << ':'; } else if (!BB->use_empty()) { // Don't print block # of no uses... - *Out << "\n;
  • Functions: One function block is written for each function in the module.
  • -
  • Symbol Table: The module level symbol table that +
  • Symbol Table: The module level symbol table that provides names for the various other entries in the file is the final block written.
  • @@ -551,7 +551,7 @@ Reid Spencer and Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/06/08 07:41:41 $ + Last modified: $Date: 2004/06/21 23:29:40 $ From root at zion.cs.uiuc.edu Mon Jun 21 18:40:04 2004 From: root at zion.cs.uiuc.edu (root) Date: Mon Jun 21 18:40:04 2004 Subject: [llvm-commits] CVS: llvm/docs/CommandGuide/llvm-db.html Message-ID: <200406212328.SAA03506@zion.cs.uiuc.edu> Changes in directory llvm/docs/CommandGuide: llvm-db.html added (r1.1) --- Log message: Just a stub command guide for llvm-db for now. Will be filled in later. This is not linked off the main command guide web page, but should be once its completed. --- Diffs of the changes: (+26 -0) Index: llvm/docs/CommandGuide/llvm-db.html diff -c /dev/null llvm/docs/CommandGuide/llvm-db.html:1.1 *** /dev/null Mon Jun 21 18:28:07 2004 --- llvm/docs/CommandGuide/llvm-db.html Mon Jun 21 18:27:57 2004 *************** *** 0 **** --- 1,26 ---- + + LLVM: llvm-db tool + + + +

    LLVM: llvm-db tool

    +
    + +

    NAME

    + llvm-db + +

    SYNOPSIS

    + Details coming soon. Please see our Source Level Debugging document in the meantime. + +

    DESCRIPTION

    + + +

    OPTIONS

    + + +

    EXIT STATUS

    + +
    + Maintained by the LLVM Team. + + From tbrethou at cs.uiuc.edu Mon Jun 21 18:44:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 18:44:01 2004 Subject: [llvm-commits] CVS: llvm/docs/CommandGuide/llvm-db.html Message-ID: <200406212336.SAA03655@zion.cs.uiuc.edu> Changes in directory llvm/docs/CommandGuide: llvm-db.html updated: 1.1 -> 1.2 --- Log message: Changing absolute link. Remembering to logout as root ;) --- Diffs of the changes: (+1 -1) Index: llvm/docs/CommandGuide/llvm-db.html diff -u llvm/docs/CommandGuide/llvm-db.html:1.1 llvm/docs/CommandGuide/llvm-db.html:1.2 --- llvm/docs/CommandGuide/llvm-db.html:1.1 Mon Jun 21 18:27:57 2004 +++ llvm/docs/CommandGuide/llvm-db.html Mon Jun 21 18:36:39 2004 @@ -10,7 +10,7 @@ llvm-db

    SYNOPSIS

    -Details coming soon. Please see our Source Level Debugging document in the meantime. +Details coming soon. Please see our Source Level Debugging document in the meantime.

    DESCRIPTION

    From tbrethou at cs.uiuc.edu Mon Jun 21 18:47:02 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 18:47:02 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.2/docs/GettingStarted.html Message-ID: <200406212339.SAA03688@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.2/docs: GettingStarted.html updated: 1.2 -> 1.3 --- Log message: Fixed typo in link to starting section. (added #) --- Diffs of the changes: (+2 -2) Index: llvm-www/releases/1.2/docs/GettingStarted.html diff -u llvm-www/releases/1.2/docs/GettingStarted.html:1.2 llvm-www/releases/1.2/docs/GettingStarted.html:1.3 --- llvm-www/releases/1.2/docs/GettingStarted.html:1.2 Fri Mar 19 16:04:17 2004 +++ llvm-www/releases/1.2/docs/GettingStarted.html Mon Jun 21 18:39:02 2004 @@ -147,7 +147,7 @@ -

    Consult the Getting Started with LLVM section for +

    Consult the Getting Started with LLVM section for detailed information on configuring and compiling LLVM. See Setting Up Your Environment for tips that simplify working with the GCC front end and LLVM tools. Go to Program @@ -1183,7 +1183,7 @@ Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/03/19 22:04:17 $ + Last modified: $Date: 2004/06/21 23:39:02 $ From tbrethou at cs.uiuc.edu Mon Jun 21 18:49:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 18:49:01 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.2/docs/CommandGuide/llvm-db.html Message-ID: <200406212340.SAA03718@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.2/docs/CommandGuide: llvm-db.html added (r1.1) --- Log message: Adding stub llvm-db command guide doc just to fix broken link. This will be written for future versions of llvm. --- Diffs of the changes: (+26 -0) Index: llvm-www/releases/1.2/docs/CommandGuide/llvm-db.html diff -c /dev/null llvm-www/releases/1.2/docs/CommandGuide/llvm-db.html:1.1 *** /dev/null Mon Jun 21 18:40:57 2004 --- llvm-www/releases/1.2/docs/CommandGuide/llvm-db.html Mon Jun 21 18:40:47 2004 *************** *** 0 **** --- 1,26 ---- + + LLVM: llvm-db tool + + + +

    LLVM: llvm-db tool

    +
    + +

    NAME

    + llvm-db + +

    SYNOPSIS

    + Details coming soon. Please see our Source Level Debugging document in the meantime. + +

    DESCRIPTION

    + + +

    OPTIONS

    + + +

    EXIT STATUS

    + +
    + Maintained by the LLVM Team. + + From tbrethou at cs.uiuc.edu Mon Jun 21 18:52:03 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 18:52:03 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.2/docs/SourceLevelDebugging.html Message-ID: <200406212344.SAA03756@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.2/docs: SourceLevelDebugging.html updated: 1.2 -> 1.3 --- Log message: Fixed broken links to set_args option. --- Diffs of the changes: (+4 -4) Index: llvm-www/releases/1.2/docs/SourceLevelDebugging.html diff -u llvm-www/releases/1.2/docs/SourceLevelDebugging.html:1.2 llvm-www/releases/1.2/docs/SourceLevelDebugging.html:1.3 --- llvm-www/releases/1.2/docs/SourceLevelDebugging.html:1.2 Fri Mar 19 16:04:17 2004 +++ llvm-www/releases/1.2/docs/SourceLevelDebugging.html Mon Jun 21 18:44:09 2004 @@ -369,13 +369,13 @@

    When run with no options, just llvm-db, the debugger starts up without a program loaded at all. You must use the file command to load a program, and the set args or run +href="#c_set_args">set args or run commands to specify the arguments for the program.

    If you start the debugger with one argument, as llvm-db <program>, the debugger will start up and load in the specified program. You can then optionally specify arguments to the program with the set args or run +href="#c_set_args">set args or run commands.

    The third way to start the program is with the --args option. This @@ -440,7 +440,7 @@

  • show language
  • set language
  • show args
  • -
  • set args [args]
  • +
  • set args [args]
  • TODO:

    @@ -1162,7 +1162,7 @@
    Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/03/19 22:04:17 $ + Last modified: $Date: 2004/06/21 23:44:09 $ From lattner at cs.uiuc.edu Mon Jun 21 21:34:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 21:34:01 2004 Subject: [llvm-commits] CVS: llvm/test/Makefile.tests Message-ID: <200406220226.VAA05039@zion.cs.uiuc.edu> Changes in directory llvm/test: Makefile.tests updated: 1.88 -> 1.89 --- Log message: test/Libraries have been long gone for a long time now. Since noone noticed tehse were broken, just nuke them. --- Diffs of the changes: (+0 -13) Index: llvm/test/Makefile.tests diff -u llvm/test/Makefile.tests:1.88 llvm/test/Makefile.tests:1.89 --- llvm/test/Makefile.tests:1.88 Tue Jun 1 14:06:43 2004 +++ llvm/test/Makefile.tests Mon Jun 21 21:26:33 2004 @@ -57,19 +57,6 @@ PATH=$(LLVMTOOLCURRENT):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH) \ $(LLVM_SRC_ROOT)/test/TestRunner.sh -## If TRACE or TRACEM is "yes", set the appropriate llc flag (-trace or -tracem) -## mark that tracing on, and set the TRACELIBS variable. -TRACEFLAGS = -ifeq ($(TRACE), yes) - TRACEFLAGS = -trace - TRACELIBS := -L$(LEVEL)/test/Libraries/Output -linstr.$(ARCH) -endif - -ifeq ($(TRACEM), yes) - TRACEFLAGS = -tracem - TRACELIBS := -L$(LEVEL)/test/Libraries/Output -linstr.$(ARCH) -endif - LLCLIBS := $(LLCLIBS) -lm clean:: From lattner at cs.uiuc.edu Mon Jun 21 21:36:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 21:36:01 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/Makefile.tests Makefile.programs Message-ID: <200406220228.VAA05061@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs: Makefile.tests added (r1.1) Makefile.programs updated: 1.130 -> 1.131 --- Log message: First baby step to getting test/Programs out of the main CVS tarball. --- Diffs of the changes: (+97 -1) Index: llvm/test/Programs/Makefile.tests diff -c /dev/null llvm/test/Programs/Makefile.tests:1.1 *** /dev/null Mon Jun 21 21:28:15 2004 --- llvm/test/Programs/Makefile.tests Mon Jun 21 21:28:05 2004 *************** *** 0 **** --- 1,96 ---- + ##----------------------------------------------------------*- Makefile -*-===## + ## + ## Common rules for generating, linking, and compiling via LLVM. This is + ## used to implement a robust testing framework for LLVM + ## + ##-------------------------------------------------------------------------===## + + # If the user specified a TEST= option on the command line, we do not want to do + # the default testing type. Instead, we change the default target to be the + # test:: target. + # + ifdef TEST + test:: + endif + + # We do not want to make .d files for tests! + DISABLE_AUTO_DEPENDENCIES=1 + + include ${LEVEL}/Makefile.common + + # Specify ENABLE_STATS on the command line to enable -stats and -time-passes + # output from gccas and gccld. + ifdef ENABLE_STATS + STATS = -stats -time-passes + endif + + .PHONY: clean default + + # These files, which might be intermediate results, should not be deleted by + # make + .PRECIOUS: Output/%.bc Output/%.ll + .PRECIOUS: Output/%.tbc Output/%.tll + .PRECIOUS: Output/.dir + .PRECIOUS: Output/%.llvm.bc + .PRECIOUS: Output/%.llvm + + # Find the location of the platform specific LLVM GCC libraries + LLVMGCCLIBDIR=$(dir $(shell $(LLVMGCC) -print-file-name=libgcc.a)) + + # LLVM Tool Definitions (LLVMGCC, LLVMGXX, LLVMAS are provided by Makefile.rules) + LLI = $(LLVMTOOLCURRENT)/lli$(EXEEXT) + LLC = $(LLVMTOOLCURRENT)/llc$(EXEEXT) + LGCCAS = $(LLVMTOOLCURRENT)/gccas$(EXEEXT) + LGCCLD = $(LGCCLDPROG) -L$(LLVMGCCLIBDIR) -L$(LLVMGCCDIR)/lib + LDIS = $(LLVMTOOLCURRENT)/llvm-dis$(EXEEXT) + LOPT = $(LLVMTOOLCURRENT)/opt$(EXEEXT) + LLINK = $(LLVMTOOLCURRENT)/llvm-link$(EXEEXT) + LPROF = $(LLVMTOOLCURRENT)/llvm-prof$(EXEEXT) + LANALYZE = $(LLVMTOOLCURRENT)/analyze$(EXEEXT) + LBUGPOINT= $(LLVMTOOLCURRENT)/bugpoint$(EXEEXT) + + LCCFLAGS += -O2 -Wall + LCXXFLAGS += -O2 -Wall + LLCFLAGS = + FAILURE = $(LLVM_SRC_ROOT)/test/Failure.sh + TESTRUNR = @echo Running test: $<; \ + PATH=$(LLVMTOOLCURRENT):$(LLVM_SRC_ROOT)/test/Scripts:$(PATH) \ + $(LLVM_SRC_ROOT)/test/TestRunner.sh + + LLCLIBS := $(LLCLIBS) -lm + + clean:: + $(RM) -f a.out core + $(RM) -rf Output/ + + # Compile from X.c to Output/X.ll + Output/%.ll: %.c $(LCC1) Output/.dir $(INCLUDES) + -$(LLVMGCC) $(CPPFLAGS) $(LCCFLAGS) -S $< -o $@ + + # Compile from X.cpp to Output/X.ll + Output/%.ll: %.cpp $(LCC1XX) Output/.dir $(INCLUDES) + -$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ + + # Compile from X.cc to Output/X.ll + Output/%.ll: %.cc $(LCC1XX) Output/.dir $(INCLUDES) + -$(LLVMGXX) $(CPPFLAGS) $(LCXXFLAGS) -S $< -o $@ + + # LLVM Assemble from Output/X.ll to Output/X.bc. Output/X.ll must have come + # from GCC output, so use GCCAS. + # + Output/%.bc: Output/%.ll $(LGCCAS) + -$(LGCCAS) $(STATS) $< -o $@ + + # LLVM Assemble from X.ll to Output/X.bc. Because we are coming directly from + # LLVM source, use the non-transforming assembler. + # + Output/%.bc: %.ll $(LLVMAS) Output/.dir + -$(LLVMAS) -f $< -o $@ + + ## Cancel built-in implicit rules that override above rules + %: %.s + + %: %.c + + %.o: %.c + Index: llvm/test/Programs/Makefile.programs diff -u llvm/test/Programs/Makefile.programs:1.130 llvm/test/Programs/Makefile.programs:1.131 --- llvm/test/Programs/Makefile.programs:1.130 Thu May 6 17:06:43 2004 +++ llvm/test/Programs/Makefile.programs Mon Jun 21 21:28:05 2004 @@ -40,7 +40,7 @@ # we do not automatically compute dependencies INCLUDES := $(ExtraHeaders) $(wildcard $(SourceDir)/*.h) -include $(LEVEL)/test/Makefile.tests +include $(LEVEL)/test/Programs/Makefile.tests .PRECIOUS: Output/%.llvm Output/%.native Output/%.llc Output/%.llc.s .PRECIOUS: Output/%.cbe Output/%.cbe.c Output/%.llvm.bc From tbrethou at cs.uiuc.edu Mon Jun 21 22:05:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:05:01 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.2/docs/SourceLevelDebugging.html Message-ID: <200406220257.VAA05188@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.2/docs: SourceLevelDebugging.html updated: 1.3 -> 1.4 --- Log message: Fixed broken link to format_common_anchors --- Diffs of the changes: (+2 -2) Index: llvm-www/releases/1.2/docs/SourceLevelDebugging.html diff -u llvm-www/releases/1.2/docs/SourceLevelDebugging.html:1.3 llvm-www/releases/1.2/docs/SourceLevelDebugging.html:1.4 --- llvm-www/releases/1.2/docs/SourceLevelDebugging.html:1.3 Mon Jun 21 18:44:09 2004 +++ llvm-www/releases/1.2/docs/SourceLevelDebugging.html Mon Jun 21 21:57:01 2004 @@ -1009,7 +1009,7 @@ information in addition to the fields required by the LLVM debugger. See the section on the C/C++ front-end for more information. Also remember that global objects (functions, selectors, global -variables, etc) must contain an anchor to +variables, etc) must contain an anchor to the llvm.dbg.globals variable.

    @@ -1162,7 +1162,7 @@
    Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/06/21 23:44:09 $ + Last modified: $Date: 2004/06/22 02:57:01 $ From tbrethou at cs.uiuc.edu Mon Jun 21 22:06:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:06:01 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.2/docs/TableGenFundamentals.html Message-ID: <200406220258.VAA05217@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.2/docs: TableGenFundamentals.html updated: 1.2 -> 1.3 --- Log message: Fixed broken link to templateargs --- Diffs of the changes: (+2 -2) Index: llvm-www/releases/1.2/docs/TableGenFundamentals.html diff -u llvm-www/releases/1.2/docs/TableGenFundamentals.html:1.2 llvm-www/releases/1.2/docs/TableGenFundamentals.html:1.3 --- llvm-www/releases/1.2/docs/TableGenFundamentals.html:1.2 Fri Mar 19 16:04:17 2004 +++ llvm-www/releases/1.2/docs/TableGenFundamentals.html Mon Jun 21 21:58:29 2004 @@ -384,7 +384,7 @@ (collectively known as 'records') in TableGen are the main high-level unit of information that TableGen collects. Records are defined with a def or class keyword, the record name, and an optional list of "template arguments". If the record has superclasses, +href="#templateargs">template arguments". If the record has superclasses, they are specified as a comma seperated list that starts with a colon character (":"). If value definitions or let expressions are needed for the class, they are enclosed in curly braces @@ -646,7 +646,7 @@
    Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2004/03/19 22:04:17 $ + Last modified: $Date: 2004/06/22 02:58:29 $ From tbrethou at cs.uiuc.edu Mon Jun 21 22:14:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:14:01 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.1/docs/Stacker.html Message-ID: <200406220306.WAA05913@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.1/docs: Stacker.html updated: 1.2 -> 1.3 --- Log message: Fixing broken link to standardstyle --- Diffs of the changes: (+8 -2) Index: llvm-www/releases/1.1/docs/Stacker.html diff -u llvm-www/releases/1.1/docs/Stacker.html:1.2 llvm-www/releases/1.1/docs/Stacker.html:1.3 --- llvm-www/releases/1.1/docs/Stacker.html:1.2 Wed Dec 17 16:47:16 2003 +++ llvm-www/releases/1.1/docs/Stacker.html Mon Jun 21 22:05:51 2004 @@ -28,7 +28,7 @@
  • Comments
  • Literals
  • Words -
  • Standard Style +
  • Standard Style
  • Built-Ins
  • @@ -459,6 +459,12 @@ linking.

    +
    Standard Style
    +
    +TODO

    +

    + +
    Built In Words

    The built-in words of the Stacker language are put in several groups @@ -1346,6 +1352,6 @@

    +
    Last modified: $Date: 2004/06/22 03:05:51 $
    From tbrethou at cs.uiuc.edu Mon Jun 21 22:30:02 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:30:02 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.2/docs/CodingStandards.html Message-ID: <200406220322.WAA07939@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.2/docs: CodingStandards.html updated: 1.2 -> 1.3 --- Log message: Fixing broken link to hl_dontinclude --- Diffs of the changes: (+2 -2) Index: llvm-www/releases/1.2/docs/CodingStandards.html diff -u llvm-www/releases/1.2/docs/CodingStandards.html:1.2 llvm-www/releases/1.2/docs/CodingStandards.html:1.3 --- llvm-www/releases/1.2/docs/CodingStandards.html:1.2 Fri Mar 19 16:04:17 2004 +++ llvm-www/releases/1.2/docs/CodingStandards.html Mon Jun 21 22:22:28 2004 @@ -204,7 +204,7 @@

    Immediately after the header file comment (and include guards if working on a header file), the minimal list of #includes required by the file should +href="#hl_dontinclude">minimal list of #includes required by the file should be listed. We prefer these #includes to be listed in this order:

      @@ -952,7 +952,7 @@
      Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2004/03/19 22:04:17 $ + Last modified: $Date: 2004/06/22 03:22:28 $ From tbrethou at cs.uiuc.edu Mon Jun 21 22:32:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:32:01 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.1/docs/GettingStarted.html Message-ID: <200406220323.WAA07983@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.1/docs: GettingStarted.html updated: 1.2 -> 1.3 --- Log message: Fixing link to getting started section. --- Diffs of the changes: (+2 -2) Index: llvm-www/releases/1.1/docs/GettingStarted.html diff -u llvm-www/releases/1.1/docs/GettingStarted.html:1.2 llvm-www/releases/1.1/docs/GettingStarted.html:1.3 --- llvm-www/releases/1.1/docs/GettingStarted.html:1.2 Wed Dec 17 16:47:16 2003 +++ llvm-www/releases/1.1/docs/GettingStarted.html Mon Jun 21 22:23:46 2004 @@ -147,7 +147,7 @@
    -

    Consult the Getting Started with LLVM section for +

    Consult the Getting Started with LLVM section for detailed information on configuring and compiling LLVM. See Setting Up Your Environment for tips that simplify working with the GCC front end and LLVM tools. Go to Program @@ -1146,7 +1146,7 @@

    Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2003/12/17 22:47:16 $ + Last modified: $Date: 2004/06/22 03:23:46 $
    From tbrethou at cs.uiuc.edu Mon Jun 21 22:37:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:37:01 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.1/docs/CodingStandards.html LangRef.html Message-ID: <200406220329.WAA08034@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.1/docs: CodingStandards.html updated: 1.2 -> 1.3 LangRef.html updated: 1.2 -> 1.3 --- Log message: Fixing more broken links. --- Diffs of the changes: (+9 -9) Index: llvm-www/releases/1.1/docs/CodingStandards.html diff -u llvm-www/releases/1.1/docs/CodingStandards.html:1.2 llvm-www/releases/1.1/docs/CodingStandards.html:1.3 --- llvm-www/releases/1.1/docs/CodingStandards.html:1.2 Wed Dec 17 16:47:16 2003 +++ llvm-www/releases/1.1/docs/CodingStandards.html Mon Jun 21 22:29:14 2004 @@ -204,7 +204,7 @@

    Immediately after the header file comment (and include guards if working on a header file), the minimal list of #includes required by the file should +href="#hl_dontinclude">minimal list of #includes required by the file should be listed. We prefer these #includes to be listed in this order:

      @@ -952,7 +952,7 @@
      Chris Lattner
      The LLVM Compiler Infrastructure
      - Last modified: $Date: 2003/12/17 22:47:16 $ + Last modified: $Date: 2004/06/22 03:29:14 $ Index: llvm-www/releases/1.1/docs/LangRef.html diff -u llvm-www/releases/1.1/docs/LangRef.html:1.2 llvm-www/releases/1.1/docs/LangRef.html:1.3 --- llvm-www/releases/1.1/docs/LangRef.html:1.2 Wed Dec 17 16:47:16 2003 +++ llvm-www/releases/1.1/docs/LangRef.html Mon Jun 21 22:29:14 2004 @@ -471,7 +471,7 @@ { float, int (int) * } : A pair, where the first element is a float and the second element is a pointer to a function that takes an int, returning + href="#t_function">function that takes an int, returning an int. @@ -498,7 +498,7 @@ int (int *) * : A pointer to a function that takes an int, returning + href="#t_function">function that takes an int, returning an int. @@ -1330,7 +1330,7 @@
      Arguments:

      The argument to the 'load' instruction specifies the memory address to load from. The pointer must point to a first class type. If the load is + href="#t_firstclass">first class type. If the load is marked as volatile then the optimizer is not allowed to modify the number or order of execution of this load with other volatile load and store @@ -1393,8 +1393,8 @@

      Semantics:

      The index types specified for the 'getelementptr' instruction depend on the pointer type that is being index into. Pointer and array types -require 'long' values, and structure + href="#t_pointer">Pointer and array types +require 'long' values, and structure types require 'ubyte' constants.

      In the example above, the first index is indexing into the '%ST*' type, which is a pointer, yielding a '%ST' = '{ int, @@ -1684,7 +1684,7 @@

      The 'llvm.va_copy' intrinsic works just like the va_copy macro available in C. In a target-dependent way, it copies the source va_list element into the returned list. This intrinsic is necessary because the llvm.va_start intrinsic may be arbitrarily + href="#i_va_start">llvm.va_start intrinsic may be arbitrarily complex and require memory allocation, for example.

      @@ -1692,6 +1692,6 @@ +Last modified: $Date: 2004/06/22 03:29:14 $ From tbrethou at cs.uiuc.edu Mon Jun 21 22:43:00 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:43:00 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/CodingStandards.html GettingStarted.html LangRef.html Message-ID: <200406220334.WAA08098@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: CodingStandards.html updated: 1.1 -> 1.2 GettingStarted.html updated: 1.2 -> 1.3 LangRef.html updated: 1.1 -> 1.2 --- Log message: Fixing broken links. --- Diffs of the changes: (+9 -9) Index: llvm-www/releases/1.0/docs/CodingStandards.html diff -u llvm-www/releases/1.0/docs/CodingStandards.html:1.1 llvm-www/releases/1.0/docs/CodingStandards.html:1.2 --- llvm-www/releases/1.0/docs/CodingStandards.html:1.1 Fri Oct 24 15:51:39 2003 +++ llvm-www/releases/1.0/docs/CodingStandards.html Mon Jun 21 22:34:48 2004 @@ -168,7 +168,7 @@ Immediately after the header file comment (and include guards if working on a header file), the minimal list of #includes required by the file should +href="#hl_dontinclude">minimal list of #includes required by the file should be listed. We prefer these #includes to be listed in this order:

        Index: llvm-www/releases/1.0/docs/GettingStarted.html diff -u llvm-www/releases/1.0/docs/GettingStarted.html:1.2 llvm-www/releases/1.0/docs/GettingStarted.html:1.3 --- llvm-www/releases/1.0/docs/GettingStarted.html:1.2 Thu Nov 6 14:52:02 2003 +++ llvm-www/releases/1.0/docs/GettingStarted.html Mon Jun 21 22:34:48 2004 @@ -156,7 +156,7 @@

      - Consult the Getting Started with LLVM section for + Consult the Getting Started with LLVM section for detailed information on configuring and compiling LLVM. See Setting Up Your Environment for tips that simplify working with the GCC front end and LLVM tools. Go to Index: llvm-www/releases/1.0/docs/LangRef.html diff -u llvm-www/releases/1.0/docs/LangRef.html:1.1 llvm-www/releases/1.0/docs/LangRef.html:1.2 --- llvm-www/releases/1.0/docs/LangRef.html:1.1 Fri Oct 24 15:51:39 2003 +++ llvm-www/releases/1.0/docs/LangRef.html Mon Jun 21 22:34:48 2004 @@ -432,7 +432,7 @@ { float, int (int) * }: A pair, where the first element is a float and the second element is a pointer to a function that takes +href="#t_pointer">pointer to a function that takes an int, returning an int. @@ -459,7 +459,7 @@ href="#t_array">array of four int values int (int *) *: A pointer to a -function that takes an int, returning an +function that takes an int, returning an int. @@ -1423,7 +1423,7 @@

      Arguments:
      The argument to the 'load' instruction specifies the memory address to -load from. The pointer must point to a first class +load from. The pointer must point to a first class type. If the load is marked as volatile then the optimizer is not allowed to modify the number or order of execution of this load with other volatile load and store @@ -1535,9 +1535,9 @@
      Semantics:
      The index types specified for the 'getelementptr' instruction depend on -the pointer type that is being index into. Pointer and -array types require 'long' values, and structure types require 'ubyte' +the pointer type that is being index into. Pointer and +array types require 'long' values, and structure types require 'ubyte' constants.

      In the example above, the first index is indexing into the '%ST*' type, @@ -1935,7 +1935,7 @@ The 'llvm.va_copy' intrinsic works just like the va_copy macro available in C. In a target-dependent way, it copies the source va_list element into the returned list. This intrinsic is necessary -because the llvm.va_start intrinsic may be +because the llvm.va_start intrinsic may be arbitrarily complex and require memory allocation, for example.

      From tbrethou at cs.uiuc.edu Mon Jun 21 22:53:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:53:01 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ReleaseNotes.html Message-ID: <200406220345.WAA08271@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ReleaseNotes.html updated: 1.49 -> 1.50 --- Log message: Fixing broken links to gcc manual --- Diffs of the changes: (+1 -1) Index: llvm-www/releases/1.0/docs/ReleaseNotes.html diff -u llvm-www/releases/1.0/docs/ReleaseNotes.html:1.49 llvm-www/releases/1.0/docs/ReleaseNotes.html:1.50 --- llvm-www/releases/1.0/docs/ReleaseNotes.html:1.49 Mon Dec 8 00:33:29 2003 +++ llvm-www/releases/1.0/docs/ReleaseNotes.html Mon Jun 21 22:44:38 2004 @@ -362,7 +362,7 @@

      1. Statement Exprs: Putting statements and declarations inside expressions.
      2. Typeof: typeof: referring to the type of an expression. -
      3. Lvalues: Using ?:, "," and casts in lvalues. +
      4. Lvalues: Using ?:, "," and casts in lvalues.
      5. Conditionals: Omitting the middle operand of a ?: expression.
      6. Long Long: Double-word integers.
      7. Complex: Data types for complex numbers. From tbrethou at cs.uiuc.edu Mon Jun 21 22:53:04 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:53:04 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.1/docs/ReleaseNotes.html Message-ID: <200406220345.WAA08231@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.1/docs: ReleaseNotes.html updated: 1.39 -> 1.40 --- Log message: Fixing broken links to gcc manual --- Diffs of the changes: (+2 -2) Index: llvm-www/releases/1.1/docs/ReleaseNotes.html diff -u llvm-www/releases/1.1/docs/ReleaseNotes.html:1.39 llvm-www/releases/1.1/docs/ReleaseNotes.html:1.40 --- llvm-www/releases/1.1/docs/ReleaseNotes.html:1.39 Tue Mar 16 15:55:42 2004 +++ llvm-www/releases/1.1/docs/ReleaseNotes.html Mon Jun 21 22:45:20 2004 @@ -562,7 +562,7 @@
        1. Statement Exprs: Putting statements and declarations inside expressions.
        2. Typeof: typeof: referring to the type of an expression.
        3. -
        4. Lvalues: Using ?:, "," and casts in lvalues.
        5. +
        6. Lvalues: Using ?:, "," and casts in lvalues.
        7. Conditionals: Omitting the middle operand of a ?: expression.
        8. Long Long: Double-word integers.
        9. Complex: Data types for complex numbers.
        10. @@ -767,7 +767,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
          - Last modified: $Date: 2004/03/16 21:55:42 $ + Last modified: $Date: 2004/06/22 03:45:20 $ From tbrethou at cs.uiuc.edu Mon Jun 21 22:53:07 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:53:07 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.2/docs/ReleaseNotes.html Message-ID: <200406220345.WAA08238@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.2/docs: ReleaseNotes.html updated: 1.22 -> 1.23 --- Log message: Fixing broken links to gcc manual --- Diffs of the changes: (+2 -2) Index: llvm-www/releases/1.2/docs/ReleaseNotes.html diff -u llvm-www/releases/1.2/docs/ReleaseNotes.html:1.22 llvm-www/releases/1.2/docs/ReleaseNotes.html:1.23 --- llvm-www/releases/1.2/docs/ReleaseNotes.html:1.22 Sun Jun 20 14:09:20 2004 +++ llvm-www/releases/1.2/docs/ReleaseNotes.html Mon Jun 21 22:45:20 2004 @@ -501,7 +501,7 @@
        11. Labels as Values: Getting pointers to labels and computed gotos.
        12. Statement Exprs: Putting statements and declarations inside expressions.
        13. Typeof: typeof: referring to the type of an expression.
        14. -
        15. Lvalues: Using ?:, "," and casts in lvalues.
        16. +
        17. Lvalues: Using ?:, "," and casts in lvalues.
        18. Conditionals: Omitting the middle operand of a ?: expression.
        19. Long Long: Double-word integers.
        20. Complex: Data types for complex numbers.
        21. @@ -689,7 +689,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
          - Last modified: $Date: 2004/06/20 19:09:20 $ + Last modified: $Date: 2004/06/22 03:45:20 $ From tbrethou at cs.uiuc.edu Mon Jun 21 22:56:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 22:56:01 2004 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200406220348.WAA08395@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.205 -> 1.206 --- Log message: Fixing broken link to gcc manual --- Diffs of the changes: (+2 -2) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.205 llvm/docs/ReleaseNotes.html:1.206 --- llvm/docs/ReleaseNotes.html:1.205 Sun Jun 20 14:08:50 2004 +++ llvm/docs/ReleaseNotes.html Mon Jun 21 22:48:17 2004 @@ -545,7 +545,7 @@
        22. Labels as Values: Getting pointers to labels and computed gotos.
        23. Statement Exprs: Putting statements and declarations inside expressions.
        24. Typeof: typeof: referring to the type of an expression.
        25. -
        26. Lvalues: Using ?:, "," and casts in lvalues.
        27. +
        28. Lvalues: Using ?:, "," and casts in lvalues.
        29. Conditionals: Omitting the middle operand of a ?: expression.
        30. Long Long: Double-word integers.
        31. Complex: Data types for complex numbers.
        32. @@ -733,7 +733,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
          - Last modified: $Date: 2004/06/20 19:08:50 $ + Last modified: $Date: 2004/06/22 03:48:17 $ From tbrethou at cs.uiuc.edu Mon Jun 21 23:33:00 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 23:33:00 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.1/docs/CodingStandards.html OpenProjects.html ProgrammersManual.html Message-ID: <200406220425.XAA08787@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.1/docs: CodingStandards.html updated: 1.3 -> 1.4 OpenProjects.html updated: 1.2 -> 1.3 ProgrammersManual.html updated: 1.1 -> 1.2 --- Log message: Fixed broken links. --- Diffs of the changes: (+6 -6) Index: llvm-www/releases/1.1/docs/CodingStandards.html diff -u llvm-www/releases/1.1/docs/CodingStandards.html:1.3 llvm-www/releases/1.1/docs/CodingStandards.html:1.4 --- llvm-www/releases/1.1/docs/CodingStandards.html:1.3 Mon Jun 21 22:29:14 2004 +++ llvm-www/releases/1.1/docs/CodingStandards.html Mon Jun 21 23:25:36 2004 @@ -929,7 +929,7 @@
            -
          1. Effective +
          2. Effective C++ by Scott Meyers. There is an online version of the book (only some chapters though) available as well.
          3. @@ -952,7 +952,7 @@
            Chris Lattner
            The LLVM Compiler Infrastructure
            - Last modified: $Date: 2004/06/22 03:29:14 $ + Last modified: $Date: 2004/06/22 04:25:36 $ Index: llvm-www/releases/1.1/docs/OpenProjects.html diff -u llvm-www/releases/1.1/docs/OpenProjects.html:1.2 llvm-www/releases/1.1/docs/OpenProjects.html:1.3 --- llvm-www/releases/1.1/docs/OpenProjects.html:1.2 Wed Dec 17 16:47:16 2003 +++ llvm-www/releases/1.1/docs/OpenProjects.html Mon Jun 21 23:25:36 2004 @@ -80,8 +80,8 @@

            It would be very useful to port glibc to LLVM. This would allow a +href="http://www.gnu.org/software/libc/manual/html_node/Porting.html">port glibc to LLVM. This would allow a variety of interprocedural algorithms to be much more effective in the face of library calls. The most important pieces to port are things like the string library and the stdio related functions... low-level system calls like @@ -313,7 +313,7 @@

            Chris Lattner
            The LLVM Compiler Infrastructure
            - Last modified: $Date: 2003/12/17 22:47:16 $ + Last modified: $Date: 2004/06/22 04:25:36 $
            Index: llvm-www/releases/1.1/docs/ProgrammersManual.html diff -u llvm-www/releases/1.1/docs/ProgrammersManual.html:1.1 llvm-www/releases/1.1/docs/ProgrammersManual.html:1.2 --- llvm-www/releases/1.1/docs/ProgrammersManual.html:1.1 Sat Dec 13 16:03:42 2003 +++ llvm-www/releases/1.1/docs/ProgrammersManual.html Mon Jun 21 23:25:36 2004 @@ -207,7 +207,7 @@ parts of the standard C++ library.
          4. C++ In a Nutshell - This is an O'Reilly book in the making. It has a decent Standard Library + href="http://www.tempest-sw.com/cpp/">Standard Library Reference that rivals Dinkumware's, and is actually free until the book is published.
          5. C++ Frequently From tbrethou at cs.uiuc.edu Mon Jun 21 23:33:04 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 23:33:04 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/CodingStandards.html OpenProjects.html ProgrammersManual.html Message-ID: <200406220425.XAA08739@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: CodingStandards.html updated: 1.2 -> 1.3 OpenProjects.html updated: 1.1 -> 1.2 ProgrammersManual.html updated: 1.1 -> 1.2 --- Log message: Fixed broken links. --- Diffs of the changes: (+4 -4) Index: llvm-www/releases/1.0/docs/CodingStandards.html diff -u llvm-www/releases/1.0/docs/CodingStandards.html:1.2 llvm-www/releases/1.0/docs/CodingStandards.html:1.3 --- llvm-www/releases/1.0/docs/CodingStandards.html:1.2 Mon Jun 21 22:34:48 2004 +++ llvm-www/releases/1.0/docs/CodingStandards.html Mon Jun 21 23:25:28 2004 @@ -816,7 +816,7 @@ Two particularly important books for our work are:

              -
            1. Effective C++ by Scott Meyers. There is an online version of the book (only some chapters though) available as well. +
            2. Effective C++ by Scott Meyers. There is an online version of the book (only some chapters though) available as well.
            3. Large-Scale C++ Software Design by John Lakos

            Index: llvm-www/releases/1.0/docs/OpenProjects.html diff -u llvm-www/releases/1.0/docs/OpenProjects.html:1.1 llvm-www/releases/1.0/docs/OpenProjects.html:1.2 --- llvm-www/releases/1.0/docs/OpenProjects.html:1.1 Fri Oct 24 15:51:39 2003 +++ llvm-www/releases/1.0/docs/OpenProjects.html Mon Jun 21 23:25:28 2004 @@ -67,8 +67,8 @@

              It would be very useful to port glibc to LLVM. This would allow a +href="http://www.gnu.org/software/libc/manual/html_node/Porting.html">port glibc to LLVM. This would allow a variety of interprocedural algorithms to be much more effective in the face of library calls. The most important pieces to port are things like the string library and the stdio related functions... low-level system calls like Index: llvm-www/releases/1.0/docs/ProgrammersManual.html diff -u llvm-www/releases/1.0/docs/ProgrammersManual.html:1.1 llvm-www/releases/1.0/docs/ProgrammersManual.html:1.2 --- llvm-www/releases/1.0/docs/ProgrammersManual.html:1.1 Fri Oct 24 15:51:39 2003 +++ llvm-www/releases/1.0/docs/ProgrammersManual.html Mon Jun 21 23:25:28 2004 @@ -171,7 +171,7 @@
            • C++ In a Nutshell - This is an O'Reilly book in the making. It has a decent Standard Library +href="http://www.tempest-sw.com/cpp/">Standard Library Reference that rivals Dinkumware's, and is actually free until the book is published. From tbrethou at cs.uiuc.edu Mon Jun 21 23:33:07 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 23:33:07 2004 Subject: [llvm-commits] CVS: llvm/docs/CodingStandards.html OpenProjects.html ProgrammersManual.html Message-ID: <200406220425.XAA08667@zion.cs.uiuc.edu> Changes in directory llvm/docs: CodingStandards.html updated: 1.17 -> 1.18 OpenProjects.html updated: 1.30 -> 1.31 ProgrammersManual.html updated: 1.62 -> 1.63 --- Log message: Fixed broken links. --- Diffs of the changes: (+9 -9) Index: llvm/docs/CodingStandards.html diff -u llvm/docs/CodingStandards.html:1.17 llvm/docs/CodingStandards.html:1.18 --- llvm/docs/CodingStandards.html:1.17 Thu Jun 3 18:40:19 2004 +++ llvm/docs/CodingStandards.html Mon Jun 21 23:24:55 2004 @@ -577,7 +577,7 @@
                -
              1. Effective +
              2. Effective C++ by Scott Meyers. There is an online version of the book (only some chapters though) available as well. Also @@ -605,7 +605,7 @@ Chris Lattner
                LLVM Compiler Infrastructure
                - Last modified: $Date: 2004/06/03 23:40:19 $ + Last modified: $Date: 2004/06/22 04:24:55 $ Index: llvm/docs/OpenProjects.html diff -u llvm/docs/OpenProjects.html:1.30 llvm/docs/OpenProjects.html:1.31 --- llvm/docs/OpenProjects.html:1.30 Fri May 28 15:41:37 2004 +++ llvm/docs/OpenProjects.html Mon Jun 21 23:24:55 2004 @@ -105,8 +105,8 @@

                It would be very useful to port glibc to LLVM. This would allow a +href="http://www.gnu.org/software/libc/manual/html_node/Porting.html">port glibc to LLVM. This would allow a variety of interprocedural algorithms to be much more effective in the face of library calls. The most important pieces to port are things like the string library and the stdio related functions... low-level system calls like @@ -344,7 +344,7 @@ Chris Lattner
                LLVM Compiler Infrastructure
                - Last modified: $Date: 2004/05/28 20:41:37 $ + Last modified: $Date: 2004/06/22 04:24:55 $ Index: llvm/docs/ProgrammersManual.html diff -u llvm/docs/ProgrammersManual.html:1.62 llvm/docs/ProgrammersManual.html:1.63 --- llvm/docs/ProgrammersManual.html:1.62 Fri Jun 18 13:39:00 2004 +++ llvm/docs/ProgrammersManual.html Mon Jun 21 23:24:55 2004 @@ -187,9 +187,9 @@ standard C++ library.

              3. C++ In a Nutshell - This is an -O'Reilly book in the making. It has a decent Standard Library -Reference that rivals Dinkumware's, and is actually free until the book is +O'Reilly book in the making. It has a decent +Standard Library +Reference that rivals Dinkumware's, and is unfortunately no longer free since the book has been published.
              4. C++ Frequently Asked @@ -2046,7 +2046,7 @@ Dinakar Dhurjati and Chris Lattner
                The LLVM Compiler Infrastructure
                - Last modified: $Date: 2004/06/18 18:39:00 $ + Last modified: $Date: 2004/06/22 04:24:55 $ From tbrethou at cs.uiuc.edu Mon Jun 21 23:34:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Mon Jun 21 23:34:01 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.2/docs/CodingStandards.html OpenProjects.html ProgrammersManual.html Message-ID: <200406220425.XAA08797@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.2/docs: CodingStandards.html updated: 1.3 -> 1.4 OpenProjects.html updated: 1.2 -> 1.3 ProgrammersManual.html updated: 1.2 -> 1.3 --- Log message: Fixed broken links. --- Diffs of the changes: (+7 -7) Index: llvm-www/releases/1.2/docs/CodingStandards.html diff -u llvm-www/releases/1.2/docs/CodingStandards.html:1.3 llvm-www/releases/1.2/docs/CodingStandards.html:1.4 --- llvm-www/releases/1.2/docs/CodingStandards.html:1.3 Mon Jun 21 22:22:28 2004 +++ llvm-www/releases/1.2/docs/CodingStandards.html Mon Jun 21 23:25:36 2004 @@ -929,7 +929,7 @@
                  -
                1. Effective +
                2. Effective C++ by Scott Meyers. There is an online version of the book (only some chapters though) available as well.
                3. @@ -952,7 +952,7 @@
                  Chris Lattner
                  The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/06/22 03:22:28 $ + Last modified: $Date: 2004/06/22 04:25:36 $ Index: llvm-www/releases/1.2/docs/OpenProjects.html diff -u llvm-www/releases/1.2/docs/OpenProjects.html:1.2 llvm-www/releases/1.2/docs/OpenProjects.html:1.3 --- llvm-www/releases/1.2/docs/OpenProjects.html:1.2 Fri Mar 19 16:04:17 2004 +++ llvm-www/releases/1.2/docs/OpenProjects.html Mon Jun 21 23:25:36 2004 @@ -87,8 +87,8 @@

                  It would be very useful to port glibc to LLVM. This would allow a +href="http://www.gnu.org/software/libc/manual/html_node/Porting.html">port glibc to LLVM. This would allow a variety of interprocedural algorithms to be much more effective in the face of library calls. The most important pieces to port are things like the string library and the stdio related functions... low-level system calls like @@ -327,7 +327,7 @@

                  Chris Lattner
                  The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/03/19 22:04:17 $ + Last modified: $Date: 2004/06/22 04:25:36 $
                  Index: llvm-www/releases/1.2/docs/ProgrammersManual.html diff -u llvm-www/releases/1.2/docs/ProgrammersManual.html:1.2 llvm-www/releases/1.2/docs/ProgrammersManual.html:1.3 --- llvm-www/releases/1.2/docs/ProgrammersManual.html:1.2 Fri Mar 19 16:04:17 2004 +++ llvm-www/releases/1.2/docs/ProgrammersManual.html Mon Jun 21 23:25:36 2004 @@ -197,7 +197,7 @@
                4. C++ In a Nutshell - This is an O'Reilly book in the making. It has a decent Standard Library +href="http://www.tempest-sw.com/cpp/">Standard Library Reference that rivals Dinkumware's, and is actually free until the book is published.
                5. @@ -1829,7 +1829,7 @@ Dinakar Dhurjati and Chris Lattner
                  The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/03/19 22:04:17 $ + Last modified: $Date: 2004/06/22 04:25:36 $ From lattner at cs.uiuc.edu Mon Jun 21 23:55:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Mon Jun 21 23:55:01 2004 Subject: [llvm-commits] CVS: llvm/utils/NightlyTestTemplate.html Message-ID: <200406220447.XAA09300@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTestTemplate.html updated: 1.27 -> 1.28 --- Log message: Elimiante ^M's --- Diffs of the changes: (+254 -254) Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.27 llvm/utils/NightlyTestTemplate.html:1.28 --- llvm/utils/NightlyTestTemplate.html:1.27 Wed Jun 9 13:29:15 2004 +++ llvm/utils/NightlyTestTemplate.html Mon Jun 21 23:47:34 2004 @@ -1,254 +1,254 @@ - - -LLVM Test Results for $DateString - - -
                  LLVM Test Results for $DateString
                  -
                  - - -
                  - -
                  -
                  -Sections:
                  -
                  -Overview
                  -Changes
                  -Trends
                  -Programs
                  -Feature
                  -Regression
                  -
                  - -

                  -
                  -
                  Previous:
                  -
                  - $PrevDaysList -
                  -

                  - -Back to:
                  -Test Results
                  -LLVM Page

                  - -

                  - -
                  -
                  -
                  Today's Test Results Overview -

                  - - - - - -
                  - -
                  Lines Of Code over Time
                  -Click for larger view -
                  - -

                  CVS Tree Overview:

                  -
                    -
                  • CVS Checkout Log -
                      - $NumDirsInCVS dirs, $NumFilesInCVS files, $LOC - lines of code, checked out in $CVSCheckoutTime seconds
                    -
                  • Compilation Log - - - - - - -
                    ItemCPU TimeWall Clock
                    Configure CVS Tree$ConfigTime$ConfigWallTime
                    Build CVS Tree$BuildTime$BuildWallTime
                    Run Feature Tests$FeatureTime$FeatureWallTime
                    Run Regression Tests$RegressionTime$RegressionWallTime
                  • -
                  • Number of object files compiled: $NumObjects
                  • -
                  • Number of libraries linked: $NumLibraries
                  • -
                  • Number of executables linked: $NumExecutables
                  • -
                  • Build Error: $BuildError
                  • -
                  - -

                  Warnings during the build:

                  -
                    $WarningsList -

                  - -

                  -
                  -
                  Changes from Yesterday -

                  - -

                  Changes to CVS:

                  -
                    -
                  • Users who committed to CVS: $UserCommitList -
                  • Users who updated from CVS: $UserUpdateList -
                  • Added Files: $AddedFilesList -
                  • Modified Files: $ModifiedFilesList -
                  • Removed Files: $RemovedFilesList -

                  - -

                  Changes to Warnings:

                  -
                    -
                  • Warnings Added: $WarningsAdded -
                  • Warnings Removed: $WarningsRemoved -

                  - -

                  Changes in the test suite:

                  -
                    -
                  • New Tests: $TestsAdded -
                  • Removed Tests: $TestsRemoved -
                  • Newly passing tests: $TestsFixed -
                  • Newly failing tests: $TestsBroken -
                  -
                  -

                  -
                  -
                  Changes Over Time -

                  - - -Here are some charts showing how the LLVM optimizer and code generators are -changing over time. For now we use the Olden benchmark suite to measure this, -but eventually we will switch to using SPEC CPU2000. All programs are run with -"LARGE_PROBLEM_SIZE" enabled. Click on any of the charts to get a larger -version.

                  - -

                  Compilation Measurements:

                  - - - - - - - - -
                  -
                  -Size of LLVM bytecode files -
                  -
                  -Size of native machine code for each program (generated by the JIT) -
                  -
                  -Time to run the LLVM optimizer on each program -
                  - -

                  Program Execution Measurements:

                  - - - - - - - - - -
                  -
                  -Execution time for CBE generated executable -
                  -
                  -Execution time for the LLC generated executable -
                  -
                  -Execution time for program in the JIT -
                  - - - - -

                  -
                  -
                  Program Tests -

                  - -This section tests LLVM on a variety of programs in the test suite. This -includes benchmark suites like the Olden, McCat, Ptrdist, and SPEC benchmarks as -well as a few random programs with test inputs. This section is meant to track -how stable LLVM is as a whole. A failure in the execution of any test is marked -with an asterisk: `*'. The columns of the tables are:

                  - -

                    -
                  1. Program - The name of the program for that row.
                  2. -
                  3. GCCAS - Time to run LLVM optimizers on the program.
                  4. -
                  5. Bytecode - The size of the bytecode for the - program
                  6. -
                  7. Instrs - The number of LLVM instructions in the - compiled bytecode
                  8. -
                  9. LLC compile - The time taken compile with - LLC (the static backend)
                  10. -
                  11. JIT codegen - The amount of time spent in the - JIT itself, instead of executing the program.
                  12. -
                  13. Machine code - The number of bytes of machine - code generated by the JIT.
                  14. -
                  15. GCC - The time taken to execute the program when compiled - with GCC -O2.
                  16. -
                  17. CBE - The time taken to execute the program after - compilation through the C backend, compiled with -O2.
                  18. -
                  19. LLC - How long does the program generated by the static - backend LLC take to execute
                  20. -
                  21. JIT - The amount of time spent running the - program with the JIT; this includes the code generation phase (listed above) - and actually running the program.
                  22. -
                  23. GCC/LLC - The speed-up of the LLC output vs the native - GCC output: greater than 1 is a speedup, less than 1 is a slowdown.
                  24. -
                  25. GCC/CBE - The speed-up of the CBE output vs the native - GCC output: greater than 1 is a speedup, less than 1 is a slowdown.
                  26. -
                  27. LLC-LS - How long does the program generated by the static - backend LLC take to execute the program, when compiled with the linear scan - register allocator. This is temporary, for tuning.
                  28. -

                  - -A complete log of testing -SingleSource, -MultiSource, and -External programs are -available for further analysis. - -

                  Programs/External

                  - -
                  -
                  -$ExternalProgramsTable -
                  - -

                  Programs/MultiSource

                  - -
                  -
                  -$MultiSourceProgramsTable -
                  - -

                  Programs/SingleSource

                  - -
                  -
                  -$SingleSourceProgramsTable -
                  - - - -

                  -
                  -
                  Feature Test Results -
                  -
                  -$FeatureTestResults - -

                  -
                  -
                  Regression Test Results -
                  -
                  -$RegressionTestResults - - + + +LLVM Test Results for $DateString + + +
                  LLVM Test Results for $DateString
                  +
                  + + +
                  + +
                  +
                  +Sections:
                  +
                  +Overview
                  +Changes
                  +Trends
                  +Programs
                  +Feature
                  +Regression
                  +
                  + +

                  +
                  +
                  Previous:
                  +
                  + $PrevDaysList +
                  +

                  + +Back to:
                  +Test Results
                  +LLVM Page

                  + +

                  + +
                  +
                  +
                  Today's Test Results Overview +

                  + + + + + +
                  + +
                  Lines Of Code over Time
                  +Click for larger view +
                  + +

                  CVS Tree Overview:

                  +
                    +
                  • CVS Checkout Log +
                      + $NumDirsInCVS dirs, $NumFilesInCVS files, $LOC + lines of code, checked out in $CVSCheckoutTime seconds
                    +
                  • Compilation Log + + + + + + +
                    ItemCPU TimeWall Clock
                    Configure CVS Tree$ConfigTime$ConfigWallTime
                    Build CVS Tree$BuildTime$BuildWallTime
                    Run Feature Tests$FeatureTime$FeatureWallTime
                    Run Regression Tests$RegressionTime$RegressionWallTime
                  • +
                  • Number of object files compiled: $NumObjects
                  • +
                  • Number of libraries linked: $NumLibraries
                  • +
                  • Number of executables linked: $NumExecutables
                  • +
                  • Build Error: $BuildError
                  • +
                  + +

                  Warnings during the build:

                  +
                    $WarningsList +

                  + +

                  +
                  +
                  Changes from Yesterday +

                  + +

                  Changes to CVS:

                  +
                    +
                  • Users who committed to CVS: $UserCommitList +
                  • Users who updated from CVS: $UserUpdateList +
                  • Added Files: $AddedFilesList +
                  • Modified Files: $ModifiedFilesList +
                  • Removed Files: $RemovedFilesList +

                  + +

                  Changes to Warnings:

                  +
                    +
                  • Warnings Added: $WarningsAdded +
                  • Warnings Removed: $WarningsRemoved +

                  + +

                  Changes in the test suite:

                  +
                    +
                  • New Tests: $TestsAdded +
                  • Removed Tests: $TestsRemoved +
                  • Newly passing tests: $TestsFixed +
                  • Newly failing tests: $TestsBroken +
                  +
                  +

                  +
                  +
                  Changes Over Time +

                  + + +Here are some charts showing how the LLVM optimizer and code generators are +changing over time. For now we use the Olden benchmark suite to measure this, +but eventually we will switch to using SPEC CPU2000. All programs are run with +"LARGE_PROBLEM_SIZE" enabled. Click on any of the charts to get a larger +version.

                  + +

                  Compilation Measurements:

                  + + + + + + + + +
                  +
                  +Size of LLVM bytecode files +
                  +
                  +Size of native machine code for each program (generated by the JIT) +
                  +
                  +Time to run the LLVM optimizer on each program +
                  + +

                  Program Execution Measurements:

                  + + + + + + + + + +
                  +
                  +Execution time for CBE generated executable +
                  +
                  +Execution time for the LLC generated executable +
                  +
                  +Execution time for program in the JIT +
                  + + + + +

                  +
                  +
                  Program Tests +

                  + +This section tests LLVM on a variety of programs in the test suite. This +includes benchmark suites like the Olden, McCat, Ptrdist, and SPEC benchmarks as +well as a few random programs with test inputs. This section is meant to track +how stable LLVM is as a whole. A failure in the execution of any test is marked +with an asterisk: `*'. The columns of the tables are:

                  + +

                    +
                  1. Program - The name of the program for that row.
                  2. +
                  3. GCCAS - Time to run LLVM optimizers on the program.
                  4. +
                  5. Bytecode - The size of the bytecode for the + program
                  6. +
                  7. Instrs - The number of LLVM instructions in the + compiled bytecode
                  8. +
                  9. LLC compile - The time taken compile with + LLC (the static backend)
                  10. +
                  11. JIT codegen - The amount of time spent in the + JIT itself, instead of executing the program.
                  12. +
                  13. Machine code - The number of bytes of machine + code generated by the JIT.
                  14. +
                  15. GCC - The time taken to execute the program when compiled + with GCC -O2.
                  16. +
                  17. CBE - The time taken to execute the program after + compilation through the C backend, compiled with -O2.
                  18. +
                  19. LLC - How long does the program generated by the static + backend LLC take to execute
                  20. +
                  21. JIT - The amount of time spent running the + program with the JIT; this includes the code generation phase (listed above) + and actually running the program.
                  22. +
                  23. GCC/LLC - The speed-up of the LLC output vs the native + GCC output: greater than 1 is a speedup, less than 1 is a slowdown.
                  24. +
                  25. GCC/CBE - The speed-up of the CBE output vs the native + GCC output: greater than 1 is a speedup, less than 1 is a slowdown.
                  26. +
                  27. LLC-LS - How long does the program generated by the static + backend LLC take to execute the program, when compiled with the linear scan + register allocator. This is temporary, for tuning.
                  28. +

                  + +A complete log of testing +SingleSource, +MultiSource, and +External programs are +available for further analysis. + +

                  Programs/External

                  + +
                  +
                  +$ExternalProgramsTable +
                  + +

                  Programs/MultiSource

                  + +
                  +
                  +$MultiSourceProgramsTable +
                  + +

                  Programs/SingleSource

                  + +
                  +
                  +$SingleSourceProgramsTable +
                  + + + +

                  +
                  +
                  Feature Test Results +
                  +
                  +$FeatureTestResults + +

                  +
                  +
                  Regression Test Results +
                  +
                  +$RegressionTestResults + + From tbrethou at cs.uiuc.edu Tue Jun 22 00:53:04 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Tue Jun 22 00:53:04 2004 Subject: [llvm-commits] CVS: llvm/utils/NightlyTestTemplate.html Message-ID: <200406220544.AAA10364@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTestTemplate.html updated: 1.28 -> 1.29 --- Log message: Removed extra href close tag --- Diffs of the changes: (+1 -1) Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.28 llvm/utils/NightlyTestTemplate.html:1.29 --- llvm/utils/NightlyTestTemplate.html:1.28 Mon Jun 21 23:47:34 2004 +++ llvm/utils/NightlyTestTemplate.html Tue Jun 22 00:44:31 2004 @@ -210,7 +210,7 @@ SingleSource, MultiSource, and External programs are -available for further analysis. +available for further analysis.

                  Programs/External

                  From lattner at cs.uiuc.edu Tue Jun 22 02:21:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 22 02:21:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Printer.cpp Message-ID: <200406220713.CAA14101@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: Printer.cpp updated: 1.68 -> 1.69 --- Log message: If an edge points to a field of another memory object, actually reflect this in the DOT visualization of the DSGraphs. --- Diffs of the changes: (+18 -0) Index: llvm/lib/Analysis/DataStructure/Printer.cpp diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.68 llvm/lib/Analysis/DataStructure/Printer.cpp:1.69 --- llvm/lib/Analysis/DataStructure/Printer.cpp:1.68 Wed May 5 01:10:06 2004 +++ llvm/lib/Analysis/DataStructure/Printer.cpp Tue Jun 22 02:13:10 2004 @@ -100,6 +100,24 @@ static std::string getNodeAttributes(const DSNode *N) { return "shape=Mrecord"; } + + static bool edgeTargetsEdgeSource(const void *Node, + DSNode::const_iterator I) { + unsigned O = I.getNode()->getLink(I.getOffset()).getOffset(); + return (O >> DS::PointerShift) != 0; + } + + static DSNode::const_iterator getEdgeTarget(const DSNode *Node, + DSNode::const_iterator I) { + unsigned O = I.getNode()->getLink(I.getOffset()).getOffset(); + unsigned LinkNo = O >> DS::PointerShift; + const DSNode *N = *I; + DSNode::const_iterator R = N->begin(); + for (; LinkNo; --LinkNo) + ++R; + return R; + } + /// addCustomGraphFeatures - Use this graph writing hook to emit call nodes /// and the return node. From tbrethou at cs.uiuc.edu Tue Jun 22 03:10:01 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Tue Jun 22 03:10:01 2004 Subject: [llvm-commits] CVS: llvm/docs/ProgrammersManual.html WritingAnLLVMPass.html Message-ID: <200406220802.DAA14524@zion.cs.uiuc.edu> Changes in directory llvm/docs: ProgrammersManual.html updated: 1.63 -> 1.64 WritingAnLLVMPass.html updated: 1.28 -> 1.29 --- Log message: Fixing broken links --- Diffs of the changes: (+5 -5) Index: llvm/docs/ProgrammersManual.html diff -u llvm/docs/ProgrammersManual.html:1.63 llvm/docs/ProgrammersManual.html:1.64 --- llvm/docs/ProgrammersManual.html:1.63 Mon Jun 21 23:24:55 2004 +++ llvm/docs/ProgrammersManual.html Tue Jun 22 03:02:25 2004 @@ -1449,7 +1449,7 @@

                  #include "llvm/GlobalVariable.h"
                  -doxygen info: GlobalVariable +doxygen info: GlobalVariable Class
                  Superclasses: GlobalValue, User, Value

                  @@ -1518,7 +1518,7 @@

                  #include "llvm/Module.h"
                  doxygen info: -Module Class

                  +Module Class

                  The Module class represents the top level structure present in LLVM programs. An LLVM module is effectively either a translation unit of the @@ -2046,7 +2046,7 @@ Dinakar Dhurjati and Chris Lattner
                  The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/06/22 04:24:55 $ + Last modified: $Date: 2004/06/22 08:02:25 $ Index: llvm/docs/WritingAnLLVMPass.html diff -u llvm/docs/WritingAnLLVMPass.html:1.28 llvm/docs/WritingAnLLVMPass.html:1.29 --- llvm/docs/WritingAnLLVMPass.html:1.28 Thu Jun 3 18:39:36 2004 +++ llvm/docs/WritingAnLLVMPass.html Tue Jun 22 03:02:25 2004 @@ -1420,7 +1420,7 @@

                  Currently, the PassManager's run method takes a Module +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Module.html">Module as input, and runs all of the passes on this module. The problem with this approach is that none of the PassManager features can be used for timing and debugging the actual loading of the module from disk or @@ -1471,7 +1471,7 @@ Chris Lattner
                  The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/06/03 23:39:36 $ + Last modified: $Date: 2004/06/22 08:02:25 $ From tbrethou at cs.uiuc.edu Tue Jun 22 03:10:06 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Tue Jun 22 03:10:06 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.2/docs/AliasAnalysis.html ProgrammersManual.html WritingAnLLVMPass.html Message-ID: <200406220801.DAA14370@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.2/docs: AliasAnalysis.html updated: 1.2 -> 1.3 ProgrammersManual.html updated: 1.3 -> 1.4 WritingAnLLVMPass.html updated: 1.2 -> 1.3 --- Log message: Fixing broken links --- Diffs of the changes: (+21 -21) Index: llvm-www/releases/1.2/docs/AliasAnalysis.html diff -u llvm-www/releases/1.2/docs/AliasAnalysis.html:1.2 llvm-www/releases/1.2/docs/AliasAnalysis.html:1.3 --- llvm-www/releases/1.2/docs/AliasAnalysis.html:1.2 Fri Mar 19 16:04:17 2004 +++ llvm-www/releases/1.2/docs/AliasAnalysis.html Tue Jun 22 03:01:42 2004 @@ -199,7 +199,7 @@ straight-forward. There are already several implementations that you can use for examples, and the following information should help fill in any details. For a minimal example, take a look at the no-aa implementation.

                  +href="/doxygen/structNoAA.html">no-aa implementation.

                  @@ -513,7 +513,7 @@ Chris Lattner
                  The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/03/19 22:04:17 $ + Last modified: $Date: 2004/06/22 08:01:42 $ Index: llvm-www/releases/1.2/docs/ProgrammersManual.html diff -u llvm-www/releases/1.2/docs/ProgrammersManual.html:1.3 llvm-www/releases/1.2/docs/ProgrammersManual.html:1.4 --- llvm-www/releases/1.2/docs/ProgrammersManual.html:1.3 Mon Jun 21 23:25:36 2004 +++ llvm-www/releases/1.2/docs/ProgrammersManual.html Tue Jun 22 03:01:42 2004 @@ -694,7 +694,7 @@ most-specific common base class is Instruction, which includes lots of less closely-related things. For these cases, LLVM provides a handy wrapper class called CallSite +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1CallSite.html">CallSite . It is essentially a wrapper around an Instruction pointer, with some methods that provide functionality common to CallInsts and InvokeInsts.

                  @@ -716,7 +716,7 @@

                  Frequently, we might have an instance of the Value Class and we want to determine which +href="/doxygen/structllvm_1_1Value.html">Value Class and we want to determine which Users use the Value. The list of all Users of a particular Value is called a def-use chain. For example, let's say we have a Function* named F to a particular function @@ -726,7 +726,7 @@

                  Function* F = ...;

                  for (Value::use_iterator i = F->use_begin(), e = F->use_end(); i != e; ++i) {
                  if (Instruction *Inst = dyn_cast<Instruction>(*i)) {
                  cerr << "F is used in instruction:\n";
                  cerr << *Inst << "\n";
                  }
                  }

                  Alternately, it's common to have an instance of the User Class and need to know what +href="/doxygen/classllvm_1_1User.html">User Class and need to know what Values are used by it. The list of all Values used by a User is known as a use-def chain. Instances of class Instruction are common Users, so we might want to iterate over @@ -778,7 +778,7 @@ one integer in the current stack frame, at runtime. Each Instruction subclass is likely to have varying default parameters which change the semantics of the instruction, so refer to the doxygen documentation for the subclass of +href="/doxygen/classllvm_1_1Instruction.html">doxygen documentation for the subclass of Instruction that you're interested in instantiating.

                  Naming values

                  @@ -902,8 +902,8 @@

                  You can use Value::replaceAllUsesWith and User::replaceUsesOfWith to change more than one use at a time. See the -doxygen documentation for the Value Class -and User Class, respectively, for more +doxygen documentation for the Value Class +and llvm/Value.h"
                  -doxygen info: Value Class

                  +doxygen info: Value Class

                  The Value class is the most important class in the LLVM Source base. It represents a typed value that may be used (among other things) as an @@ -1036,7 +1036,7 @@

                  #include "llvm/User.h"
                  -doxygen info: User Class
                  +doxygen info: User Class
                  Superclass: Value

                  The User class is the common base class of all LLVM nodes that may @@ -1090,7 +1090,7 @@

                  #include "llvm/Instruction.h"
                  -doxygen info: Instruction Class
                  +doxygen info: Instruction Class
                  Superclasses: User, Value

                  @@ -1115,7 +1115,7 @@ example BinaryOperator and SetCondInst). Unfortunately, the use of macros in this file confuses doxygen, so these enum values don't show up correctly in the -doxygen output.

                  +doxygen output.

                  @@ -1153,7 +1153,7 @@

                  #include "llvm/BasicBlock.h"
                  -doxygen info: BasicBlock Class
                  +doxygen info: BasicBlock Class
                  Superclass: Value

                  This class represents a single entry multiple exit section of the code, @@ -1233,7 +1233,7 @@

                  #include "llvm/GlobalValue.h"
                  -doxygen info: GlobalValue Class
                  +doxygen info: GlobalValue Class
                  Superclasses: User, Value

                  @@ -1301,7 +1301,7 @@

                  #include "llvm/Function.h"
                  doxygen -info: Function Class
                  Superclasses: +info: Function Class
                  Superclasses: GlobalValue, User, Value

                  @@ -1435,7 +1435,7 @@

                  #include "llvm/GlobalVariable.h"
                  -doxygen info: GlobalVariable +doxygen info: GlobalVariable Class
                  Superclasses: GlobalValue, User, Value

                  @@ -1504,7 +1504,7 @@

                  #include "llvm/Module.h"
                  doxygen info: -Module Class

                  +Module Class

                  The Module class represents the top level structure present in LLVM programs. An LLVM module is effectively either a translation unit of the @@ -1829,7 +1829,7 @@ Dinakar Dhurjati and Chris Lattner
                  The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/06/22 04:25:36 $ + Last modified: $Date: 2004/06/22 08:01:42 $ Index: llvm-www/releases/1.2/docs/WritingAnLLVMPass.html diff -u llvm-www/releases/1.2/docs/WritingAnLLVMPass.html:1.2 llvm-www/releases/1.2/docs/WritingAnLLVMPass.html:1.3 --- llvm-www/releases/1.2/docs/WritingAnLLVMPass.html:1.2 Fri Mar 19 16:04:17 2004 +++ llvm-www/releases/1.2/docs/WritingAnLLVMPass.html Tue Jun 22 03:01:42 2004 @@ -1006,7 +1006,7 @@ Passes that use the AliasAnalysis interface (for example the gcse pass), do +href="http://llvm.cs.uiuc.edu/doxygen/structGCSE.html">gcse pass), do not care which implementation of alias analysis is actually provided, they just use the designated interface.

                  @@ -1420,7 +1420,7 @@

                  Currently, the PassManager's run method takes a Module +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Module.html">Module as input, and runs all of the passes on this module. The problem with this approach is that none of the PassManager features can be used for timing and debugging the actual loading of the module from disk or @@ -1471,7 +1471,7 @@ Chris Lattner
                  The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/03/19 22:04:17 $ + Last modified: $Date: 2004/06/22 08:01:42 $ From tbrethou at cs.uiuc.edu Tue Jun 22 03:10:10 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Tue Jun 22 03:10:10 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.1/docs/ProgrammersManual.html WritingAnLLVMPass.html Message-ID: <200406220801.DAA14359@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.1/docs: ProgrammersManual.html updated: 1.2 -> 1.3 WritingAnLLVMPass.html updated: 1.1 -> 1.2 --- Log message: Fixing broken links --- Diffs of the changes: (+39 -39) Index: llvm-www/releases/1.1/docs/ProgrammersManual.html diff -u llvm-www/releases/1.1/docs/ProgrammersManual.html:1.2 llvm-www/releases/1.1/docs/ProgrammersManual.html:1.3 --- llvm-www/releases/1.1/docs/ProgrammersManual.html:1.2 Mon Jun 21 23:25:36 2004 +++ llvm-www/releases/1.1/docs/ProgrammersManual.html Tue Jun 22 03:01:42 2004 @@ -653,7 +653,7 @@ the same way, even though their most-specific common base class is Instruction, which includes lots of less closely-related things. For these cases, LLVM provides a handy wrapper class called CallSite . + href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1CallSite.html">CallSite . It is essentially a wrapper around an Instruction pointer, with some methods that provide functionality common to CallInsts and InvokeInsts.

                  @@ -670,7 +670,7 @@ use-def chains
                    Frequently, we might have an instance of the Value Class and we want to + href="/doxygen/structllvm_1_1Value.html">Value Class and we want to determine which Users use the Value. The list of all Users of a particular Value is called a def-use chain. For example, let's say we have a Function* named F @@ -679,7 +679,7 @@ chain of F:
                    Function* F = ...;

                    for (Value::use_iterator i = F->use_begin(), e = F->use_end(); i != e; ++i) {
                    if (Instruction *Inst = dyn_cast<Instruction>(*i)) {
                    cerr << "F is used in instruction:\n";
                    cerr << *Inst << "\n";
                    }
                    }
                    Alternately, it's common to have an instance of the User Class and need to know what Values + href="/doxygen/classllvm_1_1User.html">User Class and need to know what Values are used by it. The list of all Values used by a User is known as a use-def chain. Instances of class Instruction are common Users, so we might want to iterate over all of the @@ -722,7 +722,7 @@ allocation of one integer in the current stack frame, at runtime. Each Instruction subclass is likely to have varying default parameters which change the semantics of the instruction, so refer to the doxygen documentation for the + href="/doxygen/classllvm_1_1Instruction.html>doxygen documentation for the subclass of Instruction that you're interested in instantiating.

                    Naming values

                    It is very useful to name the values of instructions when you're @@ -819,8 +819,8 @@

                    Replacing multiple uses of Users and Values

                    You can use Value::replaceAllUsesWith and User::replaceUsesOfWith to change more than one use at a time. See the doxygen documentation -for the Value Class and User Class, respectively, for more +for the Value Class and User Class, respectively, for more information.

                  @@ -1065,7 +1065,7 @@
                    #include "llvm/BasicBlock.h"
                    -doxygen info: BasicBlock Class
                    +doxygen info: BasicBlock Class
                    Superclass: Value

                    This class represents a single entry multiple exit section of the code, commonly known as a basic block by the compiler community. The BasicBlock @@ -1145,7 +1145,7 @@

                      #include "llvm/GlobalValue.h"
                      -doxygen info: GlobalValue +doxygen info: GlobalValue Class
                      Superclasses: User, Value

                      Global values (GlobalVariables @@ -1215,7 +1215,7 @@

                        #include "llvm/Function.h"
                        -doxygen info: Function Class
                        +doxygen info: Function Class
                        Superclasses: GlobalValue, User, Value

                        The Function class represents a single procedure in LLVM. @@ -1338,7 +1338,7 @@

                          #include "llvm/GlobalVariable.h"
                          -doxygen info: GlobalVariable +doxygen info: GlobalVariable Class
                          Superclasses: GlobalValue, User, Value @@ -1402,7 +1402,7 @@
                            #include "llvm/Module.h"
                            -doxygen info: Module Class +doxygen info: Module Class

                            The Module class represents the top level structure present in LLVM programs. An LLVM module is effectively either a translation unit of the original program or a combination of several Index: llvm-www/releases/1.1/docs/WritingAnLLVMPass.html diff -u llvm-www/releases/1.1/docs/WritingAnLLVMPass.html:1.1 llvm-www/releases/1.1/docs/WritingAnLLVMPass.html:1.2 --- llvm-www/releases/1.1/docs/WritingAnLLVMPass.html:1.1 Sat Dec 13 16:03:43 2003 +++ llvm-www/releases/1.1/docs/WritingAnLLVMPass.html Tue Jun 22 03:01:42 2004 @@ -96,13 +96,13 @@ all, a structuring technique for compiler code.

                            All LLVM passes are subclasses of the Pass class, which +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Pass.html">Pass class, which implement functionality by overriding virtual methods inherited from Pass. Depending on how your pass works, you may be able to inherit from the FunctionPass +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1FunctionPass.html">FunctionPass or BasicBlockPass, +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1BasicBlockPass.html">BasicBlockPass, which gives the system more information about what your pass does, and how it can be combined with other passes. One of the main features of the LLVM Pass Framework is that it schedules passes to run in an efficient way based on the @@ -181,9 +181,9 @@ Which are needed because we are writing a Pass, and we are +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Pass.html">Pass, and we are operating on Function's.

                            +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Function.html">Function's.

                            Next we have:

                            @@ -204,7 +204,7 @@

                            This declares a "Hello" class that is a subclass of FunctionPass. +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1FunctionPass.html">FunctionPass. The different builtin pass subclasses are described in detail later, but for now, know that FunctionPass's operate a function at a time.

                            @@ -380,7 +380,7 @@

                              The most plain and boring type of pass is the "ImmutablePass" +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1ImmutablePass.html">ImmutablePass" class. This pass type is used for passes that do not have to be run, do not change state, and never need to be updated. This is not a normal type of transformation or analysis, but can provide information about the current @@ -401,7 +401,7 @@ The Pass class
                                -The "Pass" +The "Pass" class is the most general of all superclasses that you can use. Deriving from Pass indicates that your pass uses the entire program as a unit, refering to function bodies in no predictable order, or adding and removing @@ -433,7 +433,7 @@
                                  In contrast to direct Pass subclasses, direct FunctionPass +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Pass.html">FunctionPass subclasses do have a predictable, local behavior that can be expected by the system. All FunctionPass execute on each function in the program independent of all of the other functions in the program. @@ -730,9 +730,9 @@ By implementing the getAnalysisUsage method, the required and invalidated sets may be specified for your transformation. The implementation should fill in the AnalysisUsage +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AnalysisUsage.html">AnalysisUsage object with information about which passes are required and not invalidated. To do this, the following set methods are provided by the AnalysisUsage class:

                                  +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AnalysisUsage.html">AnalysisUsage class:

                                     // addRequires - Add the specified pass to the required set for your pass.
                                  @@ -762,9 +762,9 @@
                                   
                                     // This is an example implementation from an analysis, which does not modify
                                     // the program at all, yet has a prerequisite.
                                  -  void PostDominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
                                  +  void PostDominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
                                       AU.setPreservesAll();
                                  -    AU.addRequired<PostDominatorTree>();
                                  +    AU.addRequired<PostDominatorTree>();
                                     }
                                   

                                  @@ -774,7 +774,7 @@ // This example modifies the program, but does not modify the CFG void LICM::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); - AU.addRequired<LoopInfo>(); + AU.addRequired<LoopInfo>(); }

                                  @@ -848,16 +848,16 @@ href="#registerag">RegisterAnalysisGroup.

                                  As a concrete example of an Analysis Group in action, consider the AliasAnalysis +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AliasAnalysis.html">AliasAnalysis analysis group. The default implementation of the alias analysis interface (the basicaa pass) just does a few simple checks that don't require significant analysis to compute (such as: two different globals can never alias each other, etc). Passes that use the AliasAnalysis +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AliasAnalysis.html">AliasAnalysis interface (for example the gcse pass), do not care which implementation +href="http://llvm.cs.uiuc.edu/doxygen/structGCSE.html">gcse pass), do not care which implementation of alias analysis is actually provided, they just use the designated interface.

                                  @@ -879,7 +879,7 @@ for the Analysis Group Interface itself, because it is "abstract":

                                  -  static RegisterAnalysisGroup<AliasAnalysis> A("Alias Analysis");
                                  +  static RegisterAnalysisGroup<AliasAnalysis> A("Alias Analysis");
                                   

                                  Once the analysis is registered, passes can declare that they are valid @@ -892,13 +892,13 @@ B("somefancyaa", "A more complex alias analysis implementation"); // Declare that we implement the AliasAnalysis interface - RegisterAnalysisGroup<AliasAnalysis, FancyAA> C; + RegisterAnalysisGroup<AliasAnalysis, FancyAA> C; }

                                  This just shows a class FancyAA that is registered normally, then uses the RegisterAnalysisGroup template to "join" the AliasAnalysis +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AliasAnalysis.html">AliasAnalysis analysis group. Every implementation of an analysis group should join using this template. A single pass may join multiple different analysis groups with no problem.

                                  @@ -910,7 +910,7 @@ D("basicaa", "Basic Alias Analysis (default AA impl)"); // Declare that we implement the AliasAnalysis interface - RegisterAnalysisGroup<AliasAnalysis, BasicAliasAnalysis, true> E; + RegisterAnalysisGroup<AliasAnalysis, BasicAliasAnalysis, true> E; }

                                  @@ -931,7 +931,7 @@ The PassManager -class takes +class takes a list of passes, ensures their prerequisites are set up correctly, and then schedules passes to run efficiently. All of the LLVM tools that run passes use the PassManager for execution of these @@ -962,7 +962,7 @@ the LLVM program representation for a single function at a time, instead of traversing the entire program. It reduces the memory consumption of compiler, because, for example, only one DominatorSet +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1DominatorSet.html">DominatorSet needs to be calculated at a time. This also makes it possible some interesting enhancements in the future.

                                  @@ -1232,7 +1232,7 @@


                                A new ModuleSource interface

                                  Currently, the PassManager's run method takes a Module as +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Module.html">Module as input, and runs all of the passes on this module. The problem with this approach is that none of the PassManager features can be used for timing and debugging the actual loading of the module from disk or From tbrethou at cs.uiuc.edu Tue Jun 22 03:10:13 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Tue Jun 22 03:10:13 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/ProgrammersManual.html WritingAnLLVMPass.html Message-ID: <200406220801.DAA14256@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: ProgrammersManual.html updated: 1.2 -> 1.3 WritingAnLLVMPass.html updated: 1.1 -> 1.2 --- Log message: Fixing broken links --- Diffs of the changes: (+28 -28) Index: llvm-www/releases/1.0/docs/ProgrammersManual.html diff -u llvm-www/releases/1.0/docs/ProgrammersManual.html:1.2 llvm-www/releases/1.0/docs/ProgrammersManual.html:1.3 --- llvm-www/releases/1.0/docs/ProgrammersManual.html:1.2 Mon Jun 21 23:25:28 2004 +++ llvm-www/releases/1.0/docs/ProgrammersManual.html Tue Jun 22 03:01:35 2004 @@ -747,7 +747,7 @@ use-def chains
                                    Frequently, we might have an instance of the Value Class and we want to +href="/doxygen/structllvm_1_1Value.html">Value Class and we want to determine which Users use the Value. The list of all Users of a particular Value is called a def-use chain. For example, let's say we have a @@ -964,7 +964,7 @@ You can use Value::replaceAllUsesWith and User::replaceUsesOfWith to change more than one use at a time. See the doxygen documentation for the Value Class and Value Class and User Class, respectively, for more information. @@ -994,7 +994,7 @@
                                      #include "llvm/Value.h"
                                      -doxygen info: Value Class

                                      +doxygen info: Value Class

                                      The Value class is the most important class in LLVM Source base. It @@ -1501,7 +1501,7 @@ #include "llvm/GlobalVariable.h"
                                      -doxygen info: GlobalVariable Class
                                      +doxygen info: GlobalVariable Class
                                      Superclasses: GlobalValue, User, Value

                                      Index: llvm-www/releases/1.0/docs/WritingAnLLVMPass.html diff -u llvm-www/releases/1.0/docs/WritingAnLLVMPass.html:1.1 llvm-www/releases/1.0/docs/WritingAnLLVMPass.html:1.2 --- llvm-www/releases/1.0/docs/WritingAnLLVMPass.html:1.1 Fri Oct 24 15:51:39 2003 +++ llvm-www/releases/1.0/docs/WritingAnLLVMPass.html Tue Jun 22 03:01:35 2004 @@ -96,13 +96,13 @@ all, a structuring technique for compiler code.

                                      All LLVM passes are subclasses of the Pass class, which +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Pass.html">Pass class, which implement functionality by overriding virtual methods inherited from Pass. Depending on how your pass works, you may be able to inherit from the FunctionPass +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1FunctionPass.html">FunctionPass or BasicBlockPass, +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1BasicBlockPass.html">BasicBlockPass, which gives the system more information about what your pass does, and how it can be combined with other passes. One of the main features of the LLVM Pass Framework is that it schedules passes to run in an efficient way based on the @@ -181,9 +181,9 @@ Which are needed because we are writing a Pass, and we are +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Pass.html">Pass, and we are operating on Function's.

                                      +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Function.html">Function's.

                                      Next we have:

                                      @@ -204,7 +204,7 @@

                                      This declares a "Hello" class that is a subclass of FunctionPass. +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1FunctionPass.html">FunctionPass. The different builtin pass subclasses are described in detail later, but for now, know that FunctionPass's operate a function at a time.

                                      @@ -380,7 +380,7 @@

                                        The most plain and boring type of pass is the "ImmutablePass" +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1ImmutablePass.html">ImmutablePass" class. This pass type is used for passes that do not have to be run, do not change state, and never need to be updated. This is not a normal type of transformation or analysis, but can provide information about the current @@ -401,7 +401,7 @@ The Pass class
                                          -The "Pass" +The "Pass" class is the most general of all superclasses that you can use. Deriving from Pass indicates that your pass uses the entire program as a unit, refering to function bodies in no predictable order, or adding and removing @@ -433,7 +433,7 @@
                                            In contrast to direct Pass subclasses, direct FunctionPass +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Pass.html">FunctionPass subclasses do have a predictable, local behavior that can be expected by the system. All FunctionPass execute on each function in the program independent of all of the other functions in the program. @@ -730,9 +730,9 @@ By implementing the getAnalysisUsage method, the required and invalidated sets may be specified for your transformation. The implementation should fill in the AnalysisUsage +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AnalysisUsage.html">AnalysisUsage object with information about which passes are required and not invalidated. To do this, the following set methods are provided by the AnalysisUsage class:

                                            +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AnalysisUsage.html">AnalysisUsage class:

                                               // addRequires - Add the specified pass to the required set for your pass.
                                            @@ -762,9 +762,9 @@
                                             
                                               // This is an example implementation from an analysis, which does not modify
                                               // the program at all, yet has a prerequisite.
                                            -  void PostDominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
                                            +  void PostDominanceFrontier::getAnalysisUsage(AnalysisUsage &AU) const {
                                                 AU.setPreservesAll();
                                            -    AU.addRequired<PostDominatorTree>();
                                            +    AU.addRequired<PostDominatorTree>();
                                               }
                                             

                                            @@ -774,7 +774,7 @@ // This example modifies the program, but does not modify the CFG void LICM::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); - AU.addRequired<LoopInfo>(); + AU.addRequired<LoopInfo>(); }

                                            @@ -848,16 +848,16 @@ href="#registerag">RegisterAnalysisGroup.

                                            As a concrete example of an Analysis Group in action, consider the AliasAnalysis +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AliasAnalysis.html">AliasAnalysis analysis group. The default implementation of the alias analysis interface (the basicaa pass) just does a few simple checks that don't require significant analysis to compute (such as: two different globals can never alias each other, etc). Passes that use the AliasAnalysis +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AliasAnalysis.html">AliasAnalysis interface (for example the gcse pass), do not care which implementation +href="http://llvm.cs.uiuc.edu/doxygen/structGCSE.html">gcse pass), do not care which implementation of alias analysis is actually provided, they just use the designated interface.

                                            @@ -879,7 +879,7 @@ for the Analysis Group Interface itself, because it is "abstract":

                                            -  static RegisterAnalysisGroup<AliasAnalysis> A("Alias Analysis");
                                            +  static RegisterAnalysisGroup<AliasAnalysis> A("Alias Analysis");
                                             

                                            Once the analysis is registered, passes can declare that they are valid @@ -892,13 +892,13 @@ B("somefancyaa", "A more complex alias analysis implementation"); // Declare that we implement the AliasAnalysis interface - RegisterAnalysisGroup<AliasAnalysis, FancyAA> C; + RegisterAnalysisGroup<AliasAnalysis, FancyAA> C; }

                                            This just shows a class FancyAA that is registered normally, then uses the RegisterAnalysisGroup template to "join" the AliasAnalysis +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1AliasAnalysis.html">AliasAnalysis analysis group. Every implementation of an analysis group should join using this template. A single pass may join multiple different analysis groups with no problem.

                                            @@ -910,7 +910,7 @@ D("basicaa", "Basic Alias Analysis (default AA impl)"); // Declare that we implement the AliasAnalysis interface - RegisterAnalysisGroup<AliasAnalysis, BasicAliasAnalysis, true> E; + RegisterAnalysisGroup<AliasAnalysis, BasicAliasAnalysis, true> E; }

                                            @@ -931,7 +931,7 @@ The PassManager -class takes +class takes a list of passes, ensures their prerequisites are set up correctly, and then schedules passes to run efficiently. All of the LLVM tools that run passes use the PassManager for execution of these @@ -962,7 +962,7 @@ the LLVM program representation for a single function at a time, instead of traversing the entire program. It reduces the memory consumption of compiler, because, for example, only one DominatorSet +href="http://llvm.cs.uiuc.edu/doxygen/structllvm_1_1DominatorSet.html">DominatorSet needs to be calculated at a time. This also makes it possible some interesting enhancements in the future.

                                            @@ -1233,7 +1233,7 @@


                                          A new ModuleSource interface

                                            Currently, the PassManager's run method takes a Module as +href="http://llvm.cs.uiuc.edu/doxygen/classllvm_1_1Module.html">Module as input, and runs all of the passes on this module. The problem with this approach is that none of the PassManager features can be used for timing and debugging the actual loading of the module from disk or From gaeke at cs.uiuc.edu Tue Jun 22 03:44:00 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 03:44:00 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/Initialization.cpp Message-ID: <200406220843.DAA18750@kain.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: Initialization.cpp updated: 1.17 -> 1.18 --- Log message: Add skipTrace command-line option. --- Diffs of the changes: (+6 -0) Index: reopt/lib/LightWtProfiling/Initialization.cpp diff -u reopt/lib/LightWtProfiling/Initialization.cpp:1.17 reopt/lib/LightWtProfiling/Initialization.cpp:1.18 --- reopt/lib/LightWtProfiling/Initialization.cpp:1.17 Sun May 16 00:23:57 2004 +++ reopt/lib/LightWtProfiling/Initialization.cpp Tue Jun 22 03:43:05 2004 @@ -21,6 +21,7 @@ #include "reopt/TraceCache.h" #include "reopt/VirtualMem.h" #include +#include namespace llvm { @@ -38,6 +39,7 @@ bool enable_trace_optimizer; bool enable_phase_detect; ModuleProvider *MP; +std::set skipTrace; // Command line options. Use these to set the global variables. For // now the reoptimizer code references the global variables @@ -66,6 +68,8 @@ EnableTraceOpt("enable-trace-opt", cl::location(enable_trace_optimizer)); cl::opt EnablePhaseDetect("enable-phase-detect", cl::location(enable_phase_detect)); +cl::opt +SkipTraceOpt("skip-trace", cl::init(-1)); /// reoptimizerInitialize - Initialization method for the /// reoptimizer. A call to this function from main() is inserted by @@ -87,6 +91,8 @@ if (enable_phase_detect) initialize_timer(); + if (SkipTraceOpt != -1) { skipTrace.insert((int)SkipTraceOpt); } + return argc; } From gaeke at cs.uiuc.edu Tue Jun 22 03:44:04 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 03:44:04 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Message-ID: <200406220843.DAA18751@kain.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: RuntimeOptimizations.cpp updated: 1.42 -> 1.43 --- Log message: Add support for skipTrace command-line option. --- Diffs of the changes: (+11 -3) Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.42 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.43 --- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.42 Fri May 28 15:46:36 2004 +++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Tue Jun 22 03:43:06 2004 @@ -37,11 +37,13 @@ extern bool SaveStateToModule; extern bool SaveRegAllocState; +static int TraceCount = 0; +extern std::set skipTrace; extern "C" void TraceOptimizerDone (uint64_t a, uint64_t traceStartAddr, uint64_t traceEndAddr) { - DEBUG (std::cerr << "\n*** About to return from optimizeTrace(). GDB" - << " commands:\n" << std::hex + DEBUG (std::cerr << "\n*** About to return from optimizeTrace() for trace #" + << TraceCount << ". GDB commands:\n" << std::hex << "display/i $pc\n" << "b *0x" << a << "\n" << "b *0x" << traceStartAddr << "\n" @@ -61,7 +63,13 @@ return; else alreadyDone.insert (a); - + + DEBUG(++TraceCount; + if (skipTrace.find (TraceCount) != skipTrace.end ()) { + std::cerr << "optimizeTrace: skipping trace " << TraceCount << "\n"; + return; + }); + // Initialization stuff: ensure module has been read in, and allocate a // target machine, if there isn't one already. static TraceJIT *TJIT = 0; From tbrethou at cs.uiuc.edu Tue Jun 22 03:49:04 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Tue Jun 22 03:49:04 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.1/docs/AliasAnalysis.html Message-ID: <200406220840.DAA14387@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.1/docs: AliasAnalysis.html updated: 1.2 -> 1.3 --- Log message: Fixed broken links. --- Diffs of the changes: (+5 -5) Index: llvm-www/releases/1.1/docs/AliasAnalysis.html diff -u llvm-www/releases/1.1/docs/AliasAnalysis.html:1.2 llvm-www/releases/1.1/docs/AliasAnalysis.html:1.3 --- llvm-www/releases/1.1/docs/AliasAnalysis.html:1.2 Wed Dec 17 16:47:16 2003 +++ llvm-www/releases/1.1/docs/AliasAnalysis.html Tue Jun 22 03:40:49 2004 @@ -65,7 +65,7 @@ pointers do point to the same object, might point to the same object, or are known not to point to the same object.

                                            -

                                            The AliasAnalysis class is the +

                                            The AliasAnalysis class is the centerpiece of the LLVM Alias Analysis related infrastructure. This class is the common interface between clients of alias analysis information and the implementations providing it. In addition to simple alias analysis information, @@ -89,7 +89,7 @@

                                            -

                                            The AliasAnalysis class +

                                            The AliasAnalysis class defines the interface that Alias Analysis implementations should support. This class exports two important enums: AliasResult and ModRefResult which represent the result of an alias query or a mod/ref @@ -277,7 +277,7 @@

                                            -

                                            All of the AliasAnalysis +

                                            All of the AliasAnalysis virtual methods default to providing conservatively correct information (returning "May" Alias and "Mod/Ref" for alias and mod/ref queries respectively). Depending on the capabilities of the analysis you are @@ -355,7 +355,7 @@

                                            Many transformations need information about alias sets that are active in some scope, rather than information about pairwise aliasing. The AliasSetTracker class is used +href="/doxygen/classllvm_1_1AliasSetTracker.html">AliasSetTracker class is used to efficiently build these Alias Sets from the pairwise alias analysis information provided by the AliasAnalysis interface.

                                            @@ -486,7 +486,7 @@ Chris Lattner
                                            The LLVM Compiler Infrastructure
                                            - Last modified: $Date: 2003/12/17 22:47:16 $ + Last modified: $Date: 2004/06/22 08:40:49 $ From tbrethou at cs.uiuc.edu Tue Jun 22 03:49:11 2004 From: tbrethou at cs.uiuc.edu (Tanya Brethour) Date: Tue Jun 22 03:49:11 2004 Subject: [llvm-commits] CVS: llvm-www/releases/1.0/docs/AliasAnalysis.html ProgrammersManual.html Message-ID: <200406220840.DAA14279@zion.cs.uiuc.edu> Changes in directory llvm-www/releases/1.0/docs: AliasAnalysis.html updated: 1.1 -> 1.2 ProgrammersManual.html updated: 1.3 -> 1.4 --- Log message: Fixed broken links. --- Diffs of the changes: (+15 -15) Index: llvm-www/releases/1.0/docs/AliasAnalysis.html diff -u llvm-www/releases/1.0/docs/AliasAnalysis.html:1.1 llvm-www/releases/1.0/docs/AliasAnalysis.html:1.2 --- llvm-www/releases/1.0/docs/AliasAnalysis.html:1.1 Fri Oct 24 15:51:39 2003 +++ llvm-www/releases/1.0/docs/AliasAnalysis.html Tue Jun 22 03:40:42 2004 @@ -66,7 +66,7 @@ known not to point to the same object.

                                            -The AliasAnalysis class is the +The AliasAnalysis class is the centerpiece of the LLVM Alias Analysis related infrastructure. This class is the common interface between clients of alias analysis information and the implementations providing it. In addition to simple alias analysis information, @@ -91,7 +91,7 @@

                                            -The AliasAnalysis class defines +The AliasAnalysis class defines the interface that Alias Analysis implementations should support. This class exports two important enums: AliasResult and ModRefResult which represent the result of an alias query or a mod/ref query, @@ -290,7 +290,7 @@

                                            -All of the AliasAnalysis virtual +All of the AliasAnalysis virtual methods default to providing conservatively correct information (returning "May" Alias and "Mod/Ref" for alias and mod/ref queries respectively). Depending on the capabilities of the analysis you are implementing, you just override the @@ -368,7 +368,7 @@

                                            Many transformations need information about alias sets that are active in some scope, rather than information about pairwise aliasing. The AliasSetTracker class is used +href="/doxygen/classllvm_1_1AliasSetTracker.html">AliasSetTracker class is used to efficiently build these Alias Sets from the pairwise alias analysis information provided by the AliasAnalysis interface.

                                            @@ -499,7 +499,7 @@
                                            Chris Lattner
                                            The LLVM Compiler Infrastructure
                                            -Last modified: $Date: 2003/10/24 20:51:39 $ +Last modified: $Date: 2004/06/22 08:40:42 $ Index: llvm-www/releases/1.0/docs/ProgrammersManual.html diff -u llvm-www/releases/1.0/docs/ProgrammersManual.html:1.3 llvm-www/releases/1.0/docs/ProgrammersManual.html:1.4 --- llvm-www/releases/1.0/docs/ProgrammersManual.html:1.3 Tue Jun 22 03:01:35 2004 +++ llvm-www/releases/1.0/docs/ProgrammersManual.html Tue Jun 22 03:40:42 2004 @@ -768,7 +768,7 @@ Alternately, it's common to have an instance of the User Class and need to know what +href="/doxygen/classllvm_1_1User.html">User Class and need to know what Values are used by it. The list of all Values used by a User is known as a use-def chain. Instances of class Instruction are common Users, so we might want @@ -820,7 +820,7 @@ allocation of one integer in the current stack frame, at runtime. Each Instruction subclass is likely to have varying default parameters which change the semantics of the instruction, so refer to -the doxygen documentation for +the doxygen documentation for the subclass of Instruction that you're interested in instantiating.

                                            @@ -965,7 +965,7 @@ User::replaceUsesOfWith to change more than one use at a time. See the doxygen documentation for the Value Class and User Class, respectively, for more +href="/doxygen/classllvm_1_1User.html">User Class, respectively, for more information. @@ -1253,7 +1253,7 @@ #include "llvm/BasicBlock.h"
                                            -doxygen info: BasicBlock Class
                                            +doxygen info: BasicBlock Class
                                            Superclass: Value

                                            @@ -1332,7 +1332,7 @@ #include "llvm/GlobalValue.h"
                                            -doxygen info: GlobalValue Class
                                            +doxygen info: GlobalValue Class
                                            Superclasses: User, Value

                                            @@ -1384,7 +1384,7 @@ #include "llvm/Function.h"
                                            -doxygen info: Function Class
                                            +doxygen info: Function Class
                                            Superclasses: GlobalValue, User, Value

                                            @@ -1555,7 +1555,7 @@ #include "llvm/Module.h"
                                            -doxygen info: Module Class

                                            +doxygen info: Module Class

                                            The Module class represents the top level structure present in LLVM programs. An LLVM module is effectively either a translation unit of the From brukman at cs.uiuc.edu Tue Jun 22 10:40:04 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Jun 22 10:40:04 2004 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200406221532.KAA18462@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.90 -> 1.91 --- Log message: Add AIX to the list of recognized operating systems. --- Diffs of the changes: (+3 -3) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.90 llvm/autoconf/configure.ac:1.91 --- llvm/autoconf/configure.ac:1.90 Mon Jun 7 09:26:23 2004 +++ llvm/autoconf/configure.ac Tue Jun 22 10:32:08 2004 @@ -95,7 +95,6 @@ AC_SUBST(LLVMGCCDIR,[/home/vadve/lattner/local/x86/llvm-gcc/]) fi ;; - *-*-solaris*) AC_SUBST(OS,[SunOS]) if test -d /home/vadve/lattner/local/sparc/llvm-gcc @@ -106,11 +105,12 @@ *-*-cygwin*) AC_SUBST(OS,[Cygwin]) ;; - *-*-darwin*) AC_SUBST(OS,[Darwin]) ;; - + *-*-aix*) + AC_SUBST(OS,[AIX]) + ;; *) AC_SUBST(OS,[Unknown]) ;; esac From llvm at cs.uiuc.edu Tue Jun 22 10:40:11 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Tue Jun 22 10:40:11 2004 Subject: [llvm-commits] CVS: llvm/utils/NightlyTestTemplate.html Message-ID: <200406221532.KAA18455@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTestTemplate.html updated: 1.29 -> 1.30 --- Log message: Added start time, finish time, and platform (uname -a output) information to the top of the template for identification purposes. --- Diffs of the changes: (+6 -1) Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.29 llvm/utils/NightlyTestTemplate.html:1.30 --- llvm/utils/NightlyTestTemplate.html:1.29 Tue Jun 22 00:44:31 2004 +++ llvm/utils/NightlyTestTemplate.html Tue Jun 22 10:32:02 2004 @@ -1,4 +1,3 @@ - LLVM Test Results for $DateString @@ -53,6 +52,12 @@ +

                                            Nightly Test Overview:

                                            +
                                              +
                                            • Start: $TestStartTime GMT
                                            • +
                                            • Finish: $TestFinishTime GMT
                                            • +
                                            • Platform: $TestPlatform
                                            • +

                                            CVS Tree Overview:

                                            • CVS Checkout Log From brukman at cs.uiuc.edu Tue Jun 22 10:43:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Jun 22 10:43:01 2004 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200406221535.KAA18748@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.92 -> 1.93 --- Log message: Regenerated with autoconf-2.57 for AIX detection support. --- Diffs of the changes: (+31 -30) Index: llvm/configure diff -u llvm/configure:1.92 llvm/configure:1.93 --- llvm/configure:1.92 Mon Jun 7 09:26:11 2004 +++ llvm/configure Tue Jun 22 10:35:32 2004 @@ -1854,7 +1854,6 @@ fi ;; - *-*-solaris*) OS=SunOS @@ -1868,12 +1867,14 @@ OS=Cygwin ;; - *-*-darwin*) OS=Darwin ;; + *-*-aix*) + OS=AIX + ;; *) OS=Unknown ;; @@ -4048,7 +4049,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4051 "configure"' > conftest.$ac_ext + echo '#line 4052 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4889,7 +4890,7 @@ # Provide some information about the compiler. -echo "$as_me:4892:" \ +echo "$as_me:4893:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -5894,11 +5895,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:5897: $lt_compile\"" >&5) + (eval echo "\"\$as_me:5898: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:5901: \$? = $ac_status" >&5 + echo "$as_me:5902: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6126,11 +6127,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6129: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6130: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6133: \$? = $ac_status" >&5 + echo "$as_me:6134: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6193,11 +6194,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6196: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6197: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6200: \$? = $ac_status" >&5 + echo "$as_me:6201: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8205,7 +8206,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10439: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10442: \$? = $ac_status" >&5 + echo "$as_me:10443: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10502,11 +10503,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10505: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10506: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10509: \$? = $ac_status" >&5 + echo "$as_me:10510: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11745,7 +11746,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:12669: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12672: \$? = $ac_status" >&5 + echo "$as_me:12673: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -12732,11 +12733,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12735: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12736: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12739: \$? = $ac_status" >&5 + echo "$as_me:12740: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14672,11 +14673,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14675: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14676: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14679: \$? = $ac_status" >&5 + echo "$as_me:14680: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -14904,11 +14905,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14907: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14908: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14911: \$? = $ac_status" >&5 + echo "$as_me:14912: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -14971,11 +14972,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14974: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14975: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14978: \$? = $ac_status" >&5 + echo "$as_me:14979: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16983,7 +16984,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext < Changes in directory llvm/utils: NightlyTest.pl updated: 1.55 -> 1.56 --- Log message: - Added the -nice option for nicing the build processes. - Added the -gnuplotscript option to specify the GnuPlot script to use. - Added the -templatefile option to specify the HTML template to use. - Moved subroutines to top of file. - Used variables for file names in case we want to change to directories. - Made program track its directory changes in $VERBOSE mode (for debugging) - Added variables to support tracking start time, finish time, and platform details about each nightly test. --- Diffs of the changes: (+201 -152) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.55 llvm/utils/NightlyTest.pl:1.56 --- llvm/utils/NightlyTest.pl:1.55 Fri Jun 11 14:55:30 2004 +++ llvm/utils/NightlyTest.pl Tue Jun 22 10:38:37 2004 @@ -26,6 +26,10 @@ # -disable-codegen Disable LLC and JIT tests in the nightly tester. # -verbose Turn on some debug output # -debug Print information useful only to maintainers of this script. +# -nice Checkout/Configure/Build with "nice" to reduce impact +# on busy servers. +# -gnuplotscript Next argument specifies gnuplot script to use +# -templatefile Next argument specifies template file to use # # CVSROOT is the CVS repository from which the tree will be checked out, # specified either in the full :method:user at host:/dir syntax, or @@ -37,6 +41,8 @@ # WEBDIR is the directory into which the test results web page will be written, # AND in which the "index.html" is assumed to be a symlink to the most recent # copy of the results. This directory MUST exist before the script is run. +# LLVMGCCDIR is the directory in which the LLVM GCC Front End is installed +# to. This is the same as you would have for a normal LLVM build. # use POSIX qw(strftime); @@ -55,12 +61,28 @@ @TIME = localtime; my $DATE = sprintf "%4d-%02d-%02d", $TIME[5]+1900, $TIME[4]+1, $TIME[3]; my $DateString = strftime "%B %d, %Y", localtime; +my $TestStartTime = gmtime; + +# Command line argument settings... +my $NOCHECKOUT = 0; +my $NOREMOVE = 0; +my $NOFEATURES = 0; +my $NOREGRESSIONS = 0; +my $NOTEST = 0; +my $NORUNNINGTESTS = 0; +my $MAKEOPTS = ""; +my $PROGTESTOPTS = ""; +my $VERBOSE = 0; +my $DEBUG = 0; +my $CONFIGUREARGS = "--enable-jit"; +my $NICE = ""; sub ReadFile { - undef $/; if (open (FILE, $_[0])) { + undef $/; my $Ret = ; close FILE; + $/ = '\n'; return $Ret; } else { print "Could not open file '$_[0]' for reading!"; @@ -82,11 +104,30 @@ return "?"; } +sub AddRecord { + my ($Val, $Filename) = @_; + my @Records; + if (open FILE, "$WebDir/$Filename") { + @Records = grep !/$DATE/, split "\n", ; + close FILE; + } + push @Records, "$DATE: $Val"; + WriteFile "$WebDir/$Filename", (join "\n", @Records) . "\n"; + return @Records; +} + sub AddPreTag { # Add pre tags around nonempty list, or convert to "none" $_ = shift; if (length) { return "
                                                $_
                                              "; } else { "none
                                              "; } } +sub ChangeDir { # directory, logical name + my ($dir,$name) = @_; + chomp($dir); + if ( $VERBOSE ) { print "Changing To: $name ($dir)\n"; } + chdir($dir) || die "Cannot change directory to: $name ($dir) "; +} + sub GetDir { my $Suffix = shift; opendir DH, $WebDir; @@ -123,19 +164,80 @@ return $Time; } +sub GetRegexNum { + my ($Regex, $Num, $Regex2, $File) = @_; + my @Items = split "\n", `grep '$Regex' $File`; + return GetRegex $Regex2, $Items[$Num]; +} -# Command line argument settings... -my $NOCHECKOUT = 0; -my $NOREMOVE = 0; -my $NOFEATURES = 0; -my $NOREGRESSIONS = 0; -my $NOTEST = 0; -my $NORUNNINGTESTS = 0; -my $MAKEOPTS = ""; -my $PROGTESTOPTS = ""; -my $VERBOSE = 0; -my $DEBUG = 0; -my $CONFIGUREARGS = "--enable-jit"; +sub GetQMTestResults { # (filename) + my ($filename) = @_; + my @lines; + my $firstline; + $/ = "\n"; #Make sure we're going line at a time. + if (open SRCHFILE, $filename) { + # Skip stuff before ---TEST RESULTS + while ( ) { + if ( m/^--- TEST RESULTS/ ) { last; } + } + # Process test results + push(@lines,"

                                              TEST RESULTS

                                              1. \n"); + my $first_list = 1; + my $should_break = 1; + my $nocopy = 0; + while ( ) { + if ( length($_) > 1 ) { + chomp($_); + if ( ! m/: PASS[ ]*$/ && + ! m/^ qmtest.target:/ && + ! m/^ local/ && + ! m/^gmake:/ ) { + if ( m/: XFAIL/ ) { + $nocopy = 1; + } elsif ( m/: XPASS/ || m/: FAIL/ ) { + $nocopy = 0; + if ( $first_list ) { + $first_list = 0; + $should_break = 1; + push(@lines,"$_
                                                \n"); + } else { + push(@lines,"
                                              2. $_
                                                \n"); + } + } elsif ( m/^--- STATISTICS/ ) { + if ( $first_list ) { push(@lines,"PERFECT!"); } + push(@lines,"

                                              STATISTICS

                                              \n");
                                              +            $should_break = 0;
                                              +            $nocopy = 0;
                                              +          } elsif ( m/^--- TESTS WITH/ ) {
                                              +            $should_break = 1;
                                              +            $first_list = 1;
                                              +            $nocopy = 0;
                                              +            push(@lines,"

                                              TESTS WITH UNEXPECTED RESULTS

                                              1. \n"); + } elsif ( m/^real / ) { + last; + } elsif (!$nocopy) { + if ( $should_break ) { + push(@lines,"$_
                                                \n"); + } else { + push(@lines,"$_\n"); + } + } + } + } + } + close SRCHFILE; + } + my $content = join("", at lines); + return "$content
                                              \n"; +} + + +##################################################################### +## MAIN PROGRAM +##################################################################### + +my $Template = ""; +my $PlotScriptFilename = ""; # Parse arguments... while (scalar(@ARGV) and ($_ = $ARGV[0], /^[-+]/)) { @@ -152,7 +254,7 @@ if (/^-parallel$/) { $MAKEOPTS = "$MAKEOPTS -j2 -l3.0"; next; } if (/^-release$/) { $MAKEOPTS = "$MAKEOPTS ENABLE_OPTIMIZED=1"; next; } if (/^-pedantic$/) { - $MAKEOPTS = "$MAKEOPTS CompileOptimizeOpts='-O3 -DNDEBUG -finline-functions -Wpointer-arith -Wcast-align -Wno-deprecated -Wold-style-cast -Wabi -Woverloaded-virtual -Weffc++ -ffor-scope'"; + $MAKEOPTS = "$MAKEOPTS CompileOptimizeOpts='-O3 -DNDEBUG -finline-functions -Wpointer-arith -Wcast-align -Wno-deprecated -Wold-style-cast -Wabi -Woverloaded-virtual -ffor-scope'"; next; } if (/^-enable-linscan$/) { $PROGTESTOPTS .= " ENABLE_LINEARSCAN=1"; next; } @@ -161,6 +263,9 @@ next; } if (/^-verbose$/) { $VERBOSE = 1; next; } if (/^-debug$/) { $DEBUG = 1; next; } + if (/^-nice$/) { $NICE = "nice "; next; } + if (/^-gnuplotscript$/) { $PlotScriptFilename = $ARGV[0]; shift; next; } + if (/^-templatefile$/) { $Template = $ARGV[0]; shift;; next; } print "Unknown option: $_ : ignoring!\n"; } @@ -177,16 +282,36 @@ $WebDir = $ARGV[2]; } +if ( $Template eq "" ) { + $Template = "$BuildDir/llvm/utils/NightlyTestTemplate.html"; +} +die "Template file $Template is not readable" if ( ! -r "$Template" ); + +if ( $PlotScriptFilename eq "" ) { + $PlotScriptFilename = "$BuildDir/llvm/utils/NightlyTest.gnuplot"; +} +die "GNUPlot Script $PlotScriptFilename is not readable" if ( ! -r "$PlotScriptFilename" ); -my $Template = "$BuildDir/llvm/utils/NightlyTestTemplate.html"; my $Prefix = "$WebDir/$DATE"; +#define the file names we'll use +my $BuildLog = "$Prefix-Build-Log.txt"; +my $CVSLog = "$Prefix-CVS-Log.txt"; +my $FeatureTestsLog = "$Prefix-FeatureTests-Log.txt"; +my $RegressionTestsLog = "$Prefix-RegressionTests-Log.txt"; +my $OldenTestsLog = "$Prefix-Olden-tests.txt"; +my $SingleSourceLog = "$Prefix-SingleSource-ProgramTest.txt.gz"; +my $MultiSourceLog = "$Prefix-MultiSource-ProgramTest.txt.gz"; +my $ExternalLog = "$Prefix-External-ProgramTest.txt.gz"; + if ($VERBOSE) { print "INITIALIZED\n"; print "CVS Root = $CVSRootDir\n"; print "BuildDir = $BuildDir\n"; print "WebDir = $WebDir\n"; print "Prefix = $Prefix\n"; + print "CVSLog = $CVSLog\n"; + print "BuildLog = $BuildLog\n"; } @@ -203,7 +328,8 @@ } mkdir $BuildDir or die "Could not create CVS checkout directory $BuildDir!"; } -chdir $BuildDir or die "Could not change to CVS checkout directory $BuildDir!"; + +ChangeDir( $BuildDir, "CVS checkout directory" ); # @@ -213,26 +339,26 @@ $CVSOPT = "-z3" if $CVSRootDir =~ /^:ext:/; # Use compression if going over ssh. if (!$NOCHECKOUT) { if ( $VERBOSE ) { print "CHECKOUT STAGE\n"; } - system "(time -p cvs $CVSOPT -d $CVSRootDir co llvm) > $Prefix-CVS-Log.txt 2>&1"; + system "(time -p $NICE cvs $CVSOPT -d $CVSRootDir co llvm) > $CVSLog 2>&1"; } -chdir "llvm" or die "Could not change into llvm directory!"; +ChangeDir( "llvm" , "llvm source directory") ; if (!$NOCHECKOUT) { if ( $VERBOSE ) { print "UPDATE STAGE\n"; } - system "cvs update -P -d > /dev/null 2>&1" ; + system "$NICE cvs update -P -d >> $CVSLog 2>&1" ; } # Read in the HTML template file... +if ( $VERBOSE ) { print "READING TEMPLATE\n"; } my $TemplateContents = ReadFile $Template; - # # Get some static statistics about the current state of CVS # -my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $Prefix-CVS-Log.txt`; -my $NumFilesInCVS = `egrep '^U' $Prefix-CVS-Log.txt | wc -l` + 0; -my $NumDirsInCVS = `egrep '^cvs (checkout|server|update):' $Prefix-CVS-Log.txt | wc -l` + 0; +my $CVSCheckoutTime = GetRegex "([0-9.]+)", `grep '^real' $CVSLog`; +my $NumFilesInCVS = `egrep '^U' $CVSLog | wc -l` + 0; +my $NumDirsInCVS = `egrep '^cvs (checkout|server|update):' $CVSLog | wc -l` + 0; $LOC = GetRegex "([0-9]+) +total", `wc -l \`utils/getsrcs.sh\` | grep total`; # @@ -240,117 +366,50 @@ # if (!$NOCHECKOUT) { if ( $VERBOSE ) { print "CONFIGURE STAGE\n"; } - system "(time -p ./configure $CONFIGUREARGS --enable-spec --with-objroot=.) > $Prefix-Build-Log.txt 2>&1"; + system "(time -p $NICE ./configure $CONFIGUREARGS --enable-spec --with-objroot=.) > $BuildLog 2>&1"; if ( $VERBOSE ) { print "BUILD STAGE\n"; } - # Build the entire tree, capturing the output into $Prefix-Build-Log.txt - system "(time -p gmake $MAKEOPTS) >> $Prefix-Build-Log.txt 2>&1"; + # Build the entire tree, capturing the output into $BuildLog + system "(time -p $NICE gmake $MAKEOPTS) >> $BuildLog 2>&1"; } -sub GetRegexNum { - my ($Regex, $Num, $Regex2, $File) = @_; - my @Items = split "\n", `grep '$Regex' $File`; - return GetRegex $Regex2, $Items[$Num]; -} - # # Get some statistics about the build... # -my @Linked = split '\n', `grep Linking $Prefix-Build-Log.txt`; +my @Linked = split '\n', `grep Linking $BuildLog`; my $NumExecutables = scalar(grep(/executable/, @Linked)); my $NumLibraries = scalar(grep(!/executable/, @Linked)); -my $NumObjects = `grep '^Compiling' $Prefix-Build-Log.txt | wc -l` + 0; +my $NumObjects = `grep '^Compiling' $BuildLog | wc -l` + 0; -my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$Prefix-Build-Log.txt"; -my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$Prefix-Build-Log.txt"; +my $ConfigTimeU = GetRegexNum "^user", 0, "([0-9.]+)", "$BuildLog"; +my $ConfigTimeS = GetRegexNum "^sys", 0, "([0-9.]+)", "$BuildLog"; my $ConfigTime = $ConfigTimeU+$ConfigTimeS; # ConfigTime = User+System -my $ConfigWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$Prefix-Build-Log.txt"; +my $ConfigWallTime = GetRegexNum "^real", 0,"([0-9.]+)","$BuildLog"; -my $BuildTimeU = GetRegexNum "^user", 1, "([0-9.]+)", "$Prefix-Build-Log.txt"; -my $BuildTimeS = GetRegexNum "^sys", 1, "([0-9.]+)", "$Prefix-Build-Log.txt"; +my $BuildTimeU = GetRegexNum "^user", 1, "([0-9.]+)", "$BuildLog"; +my $BuildTimeS = GetRegexNum "^sys", 1, "([0-9.]+)", "$BuildLog"; my $BuildTime = $BuildTimeU+$BuildTimeS; # BuildTime = User+System -my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$Prefix-Build-Log.txt"; +my $BuildWallTime = GetRegexNum "^real", 1, "([0-9.]+)","$BuildLog"; my $BuildError = ""; -if (`grep '^gmake[^:]*: .*Error' $Prefix-Build-Log.txt | wc -l` + 0 || - `grep '^gmake: \*\*\*.*Stop.' $Prefix-Build-Log.txt | wc -l`+0) { +if (`grep '^gmake[^:]*: .*Error' $BuildLog | wc -l` + 0 || + `grep '^gmake: \*\*\*.*Stop.' $BuildLog | wc -l`+0) { $BuildError = "

                                              Build error: compilation " . "aborted

                                              "; - print "BUILD ERROR\n"; + if ($VERBOSE) { print "BUILD ERROR\n"; } } -sub GetQMTestResults { # (filename) - my ($filename) = @_; - my @lines; - my $firstline; - $/ = "\n"; #Make sure we're going line at a time. - if (open SRCHFILE, $filename) { - # Skip stuff before ---TEST RESULTS - while ( ) { - if ( m/^--- TEST RESULTS/ ) { last; } - } - # Process test results - push(@lines,"

                                              TEST RESULTS

                                              1. \n"); - my $first_list = 1; - my $should_break = 1; - my $nocopy = 0; - while ( ) { - if ( length($_) > 1 ) { - chomp($_); - if ( ! m/: PASS[ ]*$/ && - ! m/^ qmtest.target:/ && - ! m/^ local/ && - ! m/^gmake:/ ) { - if ( m/: XFAIL/ ) { - $nocopy = 1; - } elsif ( m/: XPASS/ || m/: FAIL/ ) { - $nocopy = 0; - if ( $first_list ) { - $first_list = 0; - $should_break = 1; - push(@lines,"$_
                                                \n"); - } else { - push(@lines,"
                                              2. $_
                                                \n"); - } - } elsif ( m/^--- STATISTICS/ ) { - if ( $first_list ) { push(@lines,"PERFECT!"); } - push(@lines,"

                                              STATISTICS

                                              \n");
                                              -	    $should_break = 0;
                                              -	    $nocopy = 0;
                                              -	  } elsif ( m/^--- TESTS WITH/ ) {
                                              -	    $should_break = 1;
                                              -	    $first_list = 1;
                                              -	    $nocopy = 0;
                                              -	    push(@lines,"

                                              TESTS WITH UNEXPECTED RESULTS

                                              1. \n"); - } elsif ( m/^real / ) { - last; - } elsif (!$nocopy) { - if ( $should_break ) { - push(@lines,"$_
                                                \n"); - } else { - push(@lines,"$_\n"); - } - } - } - } - } - close SRCHFILE; - } - my $content = join("", at lines); - return "$content
                                              \n"; -} - # Get results of feature tests. my $FeatureTestResults; # String containing the results of the feature tests my $FeatureTime; # System+CPU Time for feature tests my $FeatureWallTime; # Wall Clock Time for feature tests if (!$NOFEATURES) { if ( $VERBOSE ) { print "FEATURE TEST STAGE\n"; } - my $feature_output = "$Prefix-FeatureTests-Log.txt"; + my $feature_output = "$FeatureTestsLog"; # Run the feature tests so we can summarize the results - system "(time -p gmake -C test Feature.t) > $feature_output 2>&1"; + system "(time -p gmake $MAKEOPTS -C test Feature.t) > $feature_output 2>&1"; # Extract test results $FeatureTestResults = GetQMTestResults("$feature_output"); @@ -369,10 +428,10 @@ if (!$NOREGRESSIONS) { if ( $VERBOSE ) { print "REGRESSION TEST STAGE\n"; } - my $regression_output = "$Prefix-RegressionTests-Log.txt"; + my $regression_output = "$RegressionTestsLog"; # Run the regression tests so we can summarize the results - system "(time -p gmake -C test Regression.t) > $regression_output 2>&1"; + system "(time -p gmake $MAKEOPTS -C test Regression.t) > $regression_output 2>&1"; # Extract test results $RegressionTestResults = GetQMTestResults("$regression_output"); @@ -397,7 +456,7 @@ # # Get warnings from the build # -my @Warn = split "\n", `egrep 'warning:|Entering dir' $Prefix-Build-Log.txt`; +my @Warn = split "\n", `egrep 'warning:|Entering dir' $BuildLog`; my @Warnings; my $CurDir = ""; @@ -477,31 +536,32 @@ my $RemovedFilesList = AddPreTag join "\n", sort keys %RemovedFiles; my $TestError = 1; -my $SingleSourceProgramsTable; -my $MultiSourceProgramsTable; -my $ExternalProgramsTable; +my $SingleSourceProgramsTable = "!"; +my $MultiSourceProgramsTable = "!"; +my $ExternalProgramsTable = "!"; sub TestDirectory { my $SubDir = shift; - chdir "test/Programs/$SubDir" or - die "Could not change into test/Programs/$SubDir testdir!"; + ChangeDir( "test/Programs/$SubDir", "Programs Test Subdirectory" ); + + my $ProgramTestLog = "$Prefix-$SubDir-ProgramTest.txt"; # Run the programs tests... creating a report.nightly.html file if (!$NOTEST) { system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.html " - . "TEST=nightly > $Prefix-$SubDir-ProgramTest.txt 2>&1"; + . "TEST=nightly > $ProgramTestLog 2>&1"; } else { - system "gunzip $Prefix-$SubDir-ProgramTest.txt.gz"; + system "gunzip ${ProgramTestLog}.gz"; } my $ProgramsTable; - if (`grep '^gmake[^:]: .*Error' $Prefix-$SubDir-ProgramTest.txt | wc -l` + 0){ + if (`grep '^gmake[^:]: .*Error' $ProgramTestLog | wc -l` + 0){ $TestError = 1; $ProgramsTable = "

                                              Error running tests!

                                              "; print "ERROR TESTING\n"; - } elsif (`grep '^gmake[^:]: .*No rule to make target' $Prefix-$SubDir-ProgramTest.txt | wc -l` + 0) { + } elsif (`grep '^gmake[^:]: .*No rule to make target' $ProgramTestLog | wc -l` + 0) { $TestError = 1; $ProgramsTable = "

                                              Makefile error running tests!

                                              "; @@ -513,17 +573,17 @@ # # Create a list of the tests which were run... # - system "egrep 'TEST-(PASS|FAIL)' < $Prefix-$SubDir-ProgramTest.txt " + system "egrep 'TEST-(PASS|FAIL)' < $ProgramTestLog " . "| sort > $Prefix-$SubDir-Tests.txt"; } # Compress the test output - system "gzip -f $Prefix-$SubDir-ProgramTest.txt"; - chdir "../../.." or die "Cannot return to parent directory!"; + system "gzip -f $ProgramTestLog"; + ChangeDir( "../../..", "Programs Test Parent Directory" ); return $ProgramsTable; } -# If we build the tree successfully, run the nightly programs tests... +# If we built the tree successfully, run the nightly programs tests... if ($BuildError eq "") { if ( $VERBOSE ) { print "SingleSource TEST STAGE\n"; @@ -541,9 +601,7 @@ " $Prefix-External-Tests.txt | sort > $Prefix-Tests.txt"; } -if ( $VERBOSE ) { - print "TEST INFORMATION COLLECTION STAGE\n"; -} +if ( $VERBOSE ) { print "TEST INFORMATION COLLECTION STAGE\n"; } my ($TestsAdded, $TestsRemoved, $TestsFixed, $TestsBroken) = ("","","",""); if ($TestError) { @@ -592,25 +650,27 @@ # If we built the tree successfully, runs of the Olden suite with # LARGE_PROBLEM_SIZE on so that we can get some "running" statistics. if ($BuildError eq "") { + if ( $VERBOSE ) { print "OLDEN TEST SUITE STAGE\n"; } my ($NATTime, $CBETime, $LLCTime, $JITTime, $OptTime, $BytecodeSize, $MachCodeSize) = ("","","","","","",""); if (!$NORUNNINGTESTS) { - chdir "test/Programs/MultiSource/Benchmarks/Olden" or die "Olden tests moved?"; + ChangeDir( "$BuildDir/llvm/test/Programs/MultiSource/Benchmarks/Olden", + "Olden Test Directory"); # Clean out previous results... - system "gmake $MAKEOPTS clean > /dev/null 2>&1"; + system "$NICE gmake $MAKEOPTS clean > /dev/null 2>&1"; # Run the nightly test in this directory, with LARGE_PROBLEM_SIZE enabled! system "gmake -k $MAKEOPTS $PROGTESTOPTS report.nightly.raw.out TEST=nightly " . " LARGE_PROBLEM_SIZE=1 > /dev/null 2>&1"; - system "cp report.nightly.raw.out $Prefix-Olden-tests.txt"; + system "cp report.nightly.raw.out $OldenTestsLog"; } else { - system "gunzip $Prefix-Olden-tests.txt.gz"; + system "gunzip ${OldenTestsLog}.gz"; } - # Now we know we have $Prefix-Olden-tests.txt as the raw output file. Split + # Now we know we have $OldenTestsLog as the raw output file. Split # it up into records and read the useful information. - my @Records = split />>> ========= /, ReadFile "$Prefix-Olden-tests.txt"; + my @Records = split />>> ========= /, ReadFile "$OldenTestsLog"; shift @Records; # Delete the first (garbage) record # Loop over all of the records, summarizing them into rows for the running @@ -644,12 +704,10 @@ AddRecord($BytecodeSize, "running_Olden_bytecode.txt"); AddRecord($MachCodeSize, "running_Olden_machcode.txt"); - system "gzip -f $Prefix-Olden-tests.txt"; + system "gzip -f $OldenTestsLog"; } - - # # Get a list of the previous days that we can link to... # @@ -659,13 +717,13 @@ splice @PrevDays, 20; # Trim down list to something reasonable... } -my $PrevDaysList = # Format list for sidebar - join "\n ", map { "$_
                                              " } @PrevDays; +# Format list for sidebar +my $PrevDaysList = join "\n ", map { "$_
                                              " } @PrevDays; # # Start outputing files into the web directory # -chdir $WebDir or die "Could not change into web directory!"; +ChangeDir( $WebDir, "Web Directory" ); # Add information to the files which accumulate information for graphs... AddRecord($LOC, "running_loc.txt"); @@ -679,13 +737,12 @@ # $GNUPLOT = "/usr/dcs/software/supported/bin/gnuplot"; $GNUPLOT = "gnuplot" if ! -x $GNUPLOT; -$PlotScriptFilename = "$BuildDir/llvm/utils/NightlyTest.gnuplot"; -system ($GNUPLOT, $PlotScriptFilename); +system ("$GNUPLOT", $PlotScriptFilename); # # Remove the cvs tree... # -system "rm -rf $BuildDir" if (!$NOCHECKOUT and !$NOREMOVE); +system ( "$NICE rm -rf $BuildDir") if (!$NOCHECKOUT and !$NOREMOVE); # # Print out information... @@ -719,20 +776,12 @@ } # Main HTML file... my $Output; +my $TestFinishTime = gmtime; +my $TestPlatform = `uname -a`; eval "\$Output = <; - close FILE; - } - push @Records, "$DATE: $Val"; - WriteFile "$WebDir/$Filename", (join "\n", @Records) . "\n"; - return @Records; -} +# vim: sw=2 ai From lattner at cs.uiuc.edu Tue Jun 22 11:22:02 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 22 11:22:02 2004 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/isnan.llx Message-ID: <200406221614.LAA19073@zion.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/X86: isnan.llx updated: 1.1 -> 1.2 --- Log message: Isnan became unordered --- Diffs of the changes: (+2 -2) Index: llvm/test/Regression/CodeGen/X86/isnan.llx diff -u llvm/test/Regression/CodeGen/X86/isnan.llx:1.1 llvm/test/Regression/CodeGen/X86/isnan.llx:1.2 --- llvm/test/Regression/CodeGen/X86/isnan.llx:1.1 Thu Jun 10 21:54:54 2004 +++ llvm/test/Regression/CodeGen/X86/isnan.llx Tue Jun 22 11:13:57 2004 @@ -1,7 +1,7 @@ ; RUN: llvm-as < %s | llc -march=x86 | not grep call -declare bool %llvm.isnan(double) +declare bool %llvm.isunordered(double) bool %test_isnan(double %X) { - %R = call bool %llvm.isnan(double %X) + %R = call bool %llvm.isunordered(double %X, double %X) ret bool %R } From brukman at cs.uiuc.edu Tue Jun 22 12:37:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Jun 22 12:37:01 2004 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/Makefile Message-ID: <200406221728.MAA02295@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: Makefile updated: 1.19 -> 1.20 --- Log message: Provide archive version of CodeGen library (for those tools that only need IntrinsicLowering, for instance). --- Diffs of the changes: (+1 -0) Index: llvm/lib/CodeGen/Makefile diff -u llvm/lib/CodeGen/Makefile:1.19 llvm/lib/CodeGen/Makefile:1.20 --- llvm/lib/CodeGen/Makefile:1.19 Wed Jun 2 01:06:45 2004 +++ llvm/lib/CodeGen/Makefile Tue Jun 22 12:28:43 2004 @@ -10,5 +10,6 @@ LEVEL = ../.. PARALLEL_DIRS = InstrSched SelectionDAG LIBRARYNAME = codegen +BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From brukman at cs.uiuc.edu Tue Jun 22 13:00:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Jun 22 13:00:01 2004 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/Makefile Message-ID: <200406221752.MAA12021@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: Makefile updated: 1.20 -> 1.21 --- Log message: Making an archive version of the CodeGen library is unnecessary if we just move InstructionLowering itself. --- Diffs of the changes: (+0 -1) Index: llvm/lib/CodeGen/Makefile diff -u llvm/lib/CodeGen/Makefile:1.20 llvm/lib/CodeGen/Makefile:1.21 --- llvm/lib/CodeGen/Makefile:1.20 Tue Jun 22 12:28:43 2004 +++ llvm/lib/CodeGen/Makefile Tue Jun 22 12:52:30 2004 @@ -10,6 +10,5 @@ LEVEL = ../.. PARALLEL_DIRS = InstrSched SelectionDAG LIBRARYNAME = codegen -BUILD_ARCHIVE = 1 include $(LEVEL)/Makefile.common From brukman at cs.uiuc.edu Tue Jun 22 13:20:04 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Jun 22 13:20:04 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/Parallelize.cpp Message-ID: <200406221811.NAA14707@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: Parallelize.cpp (r1.14) removed --- Log message: File depends on DSA, moved to lib/Analysis/DataStructure --- Diffs of the changes: (+0 -0) From brukman at cs.uiuc.edu Tue Jun 22 13:21:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Jun 22 13:21:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/MemoryDepAnalysis.cpp IPModRef.cpp Message-ID: <200406221813.NAA14736@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: MemoryDepAnalysis.cpp (r1.13) removed IPModRef.cpp (r1.21) removed --- Log message: Files depend on DSA, moved to lib/Analysis/DataStructure --- Diffs of the changes: (+0 -0) From brukman at cs.uiuc.edu Tue Jun 22 13:37:03 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Jun 22 13:37:03 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/PgmDependenceGraph.cpp Message-ID: <200406221828.NAA17151@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: PgmDependenceGraph.cpp (r1.4) removed --- Log message: File depends on MemoryDepAnalysis (DSA); moved to lib/Analysis/DataStructure --- Diffs of the changes: (+0 -0) From brukman at cs.uiuc.edu Tue Jun 22 13:57:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Jun 22 13:57:01 2004 Subject: [llvm-commits] CVS: llvm/docs/GettingStarted.html Message-ID: <200406221849.NAA23656@zion.cs.uiuc.edu> Changes in directory llvm/docs: GettingStarted.html updated: 1.60 -> 1.61 --- Log message: Mention a note about having gccas and gccld in the path when running llvm-gcc. --- Diffs of the changes: (+4 -1) Index: llvm/docs/GettingStarted.html diff -u llvm/docs/GettingStarted.html:1.60 llvm/docs/GettingStarted.html:1.61 --- llvm/docs/GettingStarted.html:1.60 Mon Jun 21 17:52:48 2004 +++ llvm/docs/GettingStarted.html Tue Jun 22 13:48:58 2004 @@ -1136,6 +1136,9 @@
                                            • Next, compile the C file into a LLVM bytecode file:

                                              % llvmgcc hello.c -o hello

                                              +

                                              Note that you should have already built the tools and they have to be + in your path, at least gccas and gccld.

                                              +

                                              This will create two result files: hello and hello.bc. The hello.bc is the LLVM bytecode that corresponds the the compiled program and the library facilities that it @@ -1224,7 +1227,7 @@ Chris Lattner
                                              The LLVM Compiler Infrastructure
                                              - Last modified: $Date: 2004/06/21 22:52:48 $ + Last modified: $Date: 2004/06/22 18:48:58 $ From lattner at cs.uiuc.edu Tue Jun 22 14:09:02 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Tue Jun 22 14:09:02 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Benchmarks/Misc/mandel.c Message-ID: <200406221901.OAA03663@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/Benchmarks/Misc: mandel.c updated: 1.7 -> 1.8 --- Log message: Attempt to get this test working on freebsd. Patch contributed by Vladimir Merzliakov --- Diffs of the changes: (+5 -0) Index: llvm/test/Programs/SingleSource/Benchmarks/Misc/mandel.c diff -u llvm/test/Programs/SingleSource/Benchmarks/Misc/mandel.c:1.7 llvm/test/Programs/SingleSource/Benchmarks/Misc/mandel.c:1.8 --- llvm/test/Programs/SingleSource/Benchmarks/Misc/mandel.c:1.7 Sun Feb 29 21:44:58 2004 +++ llvm/test/Programs/SingleSource/Benchmarks/Misc/mandel.c Tue Jun 22 14:00:55 2004 @@ -14,7 +14,12 @@ #define I 1.0iF +#if defined(__FreeBSD__) +#include +#include +#else #include +#endif volatile double __complex__ accum; void emit(double __complex__ X) { From brukman at cs.uiuc.edu Tue Jun 22 14:13:03 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Tue Jun 22 14:13:03 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/PrintSCC.cpp Message-ID: <200406221905.OAA11633@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: PrintSCC.cpp (r1.9) removed --- Log message: File requires IPA, moved to lib/Analysis/IPA --- Diffs of the changes: (+0 -0) From gaeke at cs.uiuc.edu Tue Jun 22 14:15:03 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 14:15:03 2004 Subject: [llvm-commits] CVS: llvm/docs/TestingGuide.html Message-ID: <200406221906.OAA14806@zion.cs.uiuc.edu> Changes in directory llvm/docs: TestingGuide.html updated: 1.9 -> 1.10 --- Log message: link to qmtest-2.0.3 tar file --- Diffs of the changes: (+3 -2) Index: llvm/docs/TestingGuide.html diff -u llvm/docs/TestingGuide.html:1.9 llvm/docs/TestingGuide.html:1.10 --- llvm/docs/TestingGuide.html:1.9 Sun Jun 20 14:21:11 2004 +++ llvm/docs/TestingGuide.html Tue Jun 22 14:06:49 2004 @@ -54,7 +54,8 @@

                                              QMTest
                                              The LLVM test suite uses QMTest to organize and run tests. Note: - you will need QMTest 2.0.3 to be successful. The tests do not run with + you will need QMTest + 2.0.3 (source tar.gz file) to be successful. The tests do not run with any other version.
                                              Python
                                              @@ -381,7 +382,7 @@ John T. Criswell
                                              The LLVM Compiler Infrastructure
                                              - Last modified: $Date: 2004/06/20 19:21:11 $ + Last modified: $Date: 2004/06/22 19:06:49 $ From criswell at cs.uiuc.edu Tue Jun 22 16:36:01 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Jun 22 16:36:01 2004 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200406222135.QAA02742@choi.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.91 -> 1.92 --- Log message: Added the llvm/test/Programs/Makefile.test Makefile. Added a check for isnan() while I was at it. --- Diffs of the changes: (+2 -1) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.91 llvm/autoconf/configure.ac:1.92 --- llvm/autoconf/configure.ac:1.91 Tue Jun 22 10:32:08 2004 +++ llvm/autoconf/configure.ac Tue Jun 22 16:35:10 2004 @@ -38,6 +38,7 @@ AC_CONFIG_MAKEFILE(test/QMTest/llvmdb.py) AC_CONFIG_MAKEFILE(test/Programs/Makefile) AC_CONFIG_MAKEFILE(test/Programs/Makefile.programs) +AC_CONFIG_MAKEFILE(test/Programs/Makefile.tests) AC_CONFIG_MAKEFILE(test/Programs/TEST.aa.Makefile) AC_CONFIG_MAKEFILE(test/Programs/TEST.dsgraph.report) AC_CONFIG_MAKEFILE(test/Programs/TEST.aa.report) @@ -285,7 +286,7 @@ fi AC_HEADER_MMAP_ANONYMOUS AC_TYPE_SIGNAL -AC_CHECK_FUNCS(getcwd gettimeofday strdup strtoq strtoll backtrace isatty mkstemp getrusage) +AC_CHECK_FUNCS(getcwd gettimeofday strdup strtoq strtoll backtrace isatty mkstemp getrusage isnan) AC_CHECK_FUNC(mprotect,,AC_MSG_ERROR([Function mprotect() required but not found])) dnl Determine if the linker supports the -R option. From criswell at cs.uiuc.edu Tue Jun 22 16:36:07 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Jun 22 16:36:07 2004 Subject: [llvm-commits] CVS: llvm/include/Config/config.h.in Message-ID: <200406222135.QAA02749@choi.cs.uiuc.edu> Changes in directory llvm/include/Config: config.h.in updated: 1.18 -> 1.19 --- Log message: Added the llvm/test/Programs/Makefile.test Makefile. Added a check for isnan() while I was at it. --- Diffs of the changes: (+3 -0) Index: llvm/include/Config/config.h.in diff -u llvm/include/Config/config.h.in:1.18 llvm/include/Config/config.h.in:1.19 --- llvm/include/Config/config.h.in:1.18 Mon Jun 7 09:26:24 2004 +++ llvm/include/Config/config.h.in Tue Jun 22 16:35:10 2004 @@ -140,6 +140,9 @@ /* Define to have the header file. */ #undef HAVE_WINDOWS_H +/* Define to 1 if you have the isnan() function */ +#undef HAVE_ISNAN + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT From criswell at cs.uiuc.edu Tue Jun 22 16:36:11 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Tue Jun 22 16:36:11 2004 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200406222135.QAA02735@choi.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.93 -> 1.94 --- Log message: Added the llvm/test/Programs/Makefile.test Makefile. Added a check for isnan() while I was at it. --- Diffs of the changes: (+36 -29) Index: llvm/configure diff -u llvm/configure:1.93 llvm/configure:1.94 --- llvm/configure:1.93 Tue Jun 22 10:35:32 2004 +++ llvm/configure Tue Jun 22 16:35:06 2004 @@ -1565,6 +1565,9 @@ ac_config_commands="$ac_config_commands test/Programs/Makefile.programs" + ac_config_commands="$ac_config_commands test/Programs/Makefile.tests" + + ac_config_commands="$ac_config_commands test/Programs/TEST.aa.Makefile" @@ -4049,7 +4052,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4052 "configure"' > conftest.$ac_ext + echo '#line 4055 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -4890,7 +4893,7 @@ # Provide some information about the compiler. -echo "$as_me:4893:" \ +echo "$as_me:4896:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 @@ -5895,11 +5898,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:5898: $lt_compile\"" >&5) + (eval echo "\"\$as_me:5901: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:5902: \$? = $ac_status" >&5 + echo "$as_me:5905: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6127,11 +6130,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6130: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6133: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6134: \$? = $ac_status" >&5 + echo "$as_me:6137: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6194,11 +6197,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6197: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6200: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:6201: \$? = $ac_status" >&5 + echo "$as_me:6204: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8206,7 +8209,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:10442: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10443: \$? = $ac_status" >&5 + echo "$as_me:10446: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -10503,11 +10506,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10506: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10509: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10510: \$? = $ac_status" >&5 + echo "$as_me:10513: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11746,7 +11749,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:12672: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12673: \$? = $ac_status" >&5 + echo "$as_me:12676: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -12733,11 +12736,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12736: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12739: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12740: \$? = $ac_status" >&5 + echo "$as_me:12743: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14673,11 +14676,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14676: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14679: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14680: \$? = $ac_status" >&5 + echo "$as_me:14683: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -14905,11 +14908,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14908: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14911: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14912: \$? = $ac_status" >&5 + echo "$as_me:14915: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -14972,11 +14975,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14975: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14978: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14979: \$? = $ac_status" >&5 + echo "$as_me:14982: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16984,7 +16987,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 @@ -22660,6 +22664,7 @@ ${srcdir}/autoconf/mkinstalldirs `dirname test/QMTest/llvmdb.py` ${srcdir}/autoconf/mkinstalldirs `dirname test/Programs/Makefile` ${srcdir}/autoconf/mkinstalldirs `dirname test/Programs/Makefile.programs` +${srcdir}/autoconf/mkinstalldirs `dirname test/Programs/Makefile.tests` ${srcdir}/autoconf/mkinstalldirs `dirname test/Programs/TEST.aa.Makefile` ${srcdir}/autoconf/mkinstalldirs `dirname test/Programs/TEST.dsgraph.report` ${srcdir}/autoconf/mkinstalldirs `dirname test/Programs/TEST.aa.report` @@ -22725,6 +22730,7 @@ "test/QMTest/llvmdb.py" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/QMTest/llvmdb.py" ;; "test/Programs/Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/Programs/Makefile" ;; "test/Programs/Makefile.programs" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/Programs/Makefile.programs" ;; + "test/Programs/Makefile.tests" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/Programs/Makefile.tests" ;; "test/Programs/TEST.aa.Makefile" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/Programs/TEST.aa.Makefile" ;; "test/Programs/TEST.dsgraph.report" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/Programs/TEST.dsgraph.report" ;; "test/Programs/TEST.aa.report" ) CONFIG_COMMANDS="$CONFIG_COMMANDS test/Programs/TEST.aa.report" ;; @@ -23430,6 +23436,7 @@ test/QMTest/llvmdb.py ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/QMTest/llvmdb.py test/QMTest/llvmdb.py ;; test/Programs/Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/Programs/Makefile test/Programs/Makefile ;; test/Programs/Makefile.programs ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/Programs/Makefile.programs test/Programs/Makefile.programs ;; + test/Programs/Makefile.tests ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/Programs/Makefile.tests test/Programs/Makefile.tests ;; test/Programs/TEST.aa.Makefile ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/Programs/TEST.aa.Makefile test/Programs/TEST.aa.Makefile ;; test/Programs/TEST.dsgraph.report ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/Programs/TEST.dsgraph.report test/Programs/TEST.dsgraph.report ;; test/Programs/TEST.aa.report ) ${SHELL} ${srcdir}/autoconf/install-sh -c ${srcdir}/test/Programs/TEST.aa.report test/Programs/TEST.aa.report ;; From gaeke at cs.uiuc.edu Tue Jun 22 18:51:01 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 18:51:01 2004 Subject: [llvm-commits] CVS: llvm/autoconf/configure.ac Message-ID: <200406222343.SAA17130@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: configure.ac updated: 1.92 -> 1.93 --- Log message: Call custom check (AC_FUNC_ISNAN) instead of using the generic function check. --- Diffs of the changes: (+3 -1) Index: llvm/autoconf/configure.ac diff -u llvm/autoconf/configure.ac:1.92 llvm/autoconf/configure.ac:1.93 --- llvm/autoconf/configure.ac:1.92 Tue Jun 22 16:35:10 2004 +++ llvm/autoconf/configure.ac Tue Jun 22 18:43:04 2004 @@ -272,6 +272,8 @@ AC_CXX_HAVE_BI_ITERATOR AC_CXX_HAVE_FWD_ITERATOR +AC_FUNC_ISNAN + dnl Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_MMAP @@ -286,7 +288,7 @@ fi AC_HEADER_MMAP_ANONYMOUS AC_TYPE_SIGNAL -AC_CHECK_FUNCS(getcwd gettimeofday strdup strtoq strtoll backtrace isatty mkstemp getrusage isnan) +AC_CHECK_FUNCS(getcwd gettimeofday strdup strtoq strtoll backtrace isatty mkstemp getrusage) AC_CHECK_FUNC(mprotect,,AC_MSG_ERROR([Function mprotect() required but not found])) dnl Determine if the linker supports the -R option. From gaeke at cs.uiuc.edu Tue Jun 22 18:51:07 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 18:51:07 2004 Subject: [llvm-commits] CVS: llvm/autoconf/acinclude.m4 Message-ID: <200406222343.SAA17085@zion.cs.uiuc.edu> Changes in directory llvm/autoconf: acinclude.m4 updated: 1.5 -> 1.6 --- Log message: Implement isnan check (AC_FUNC_ISNAN) in terms of three calls to a fairly generic macro AC_SINGLE_CXX_CHECK. --- Diffs of the changes: (+31 -0) Index: llvm/autoconf/acinclude.m4 diff -u llvm/autoconf/acinclude.m4:1.5 llvm/autoconf/acinclude.m4:1.6 --- llvm/autoconf/acinclude.m4:1.5 Mon Feb 23 15:12:44 2004 +++ llvm/autoconf/acinclude.m4 Tue Jun 22 18:42:49 2004 @@ -6251,3 +6251,34 @@ AC_DEFINE([HAVE_LINK_R],[1],[Define if you can use -Wl,-R. to pass -R. to the linker, in order to add the current directory to the dynamic linker search path.]) fi ]) + + +dnl AC_SINGLE_CXX_CHECK(DEFINEVAR, CACHEVAR, FUNCTION, HEADER, PROGRAM) +dnl $1, $2, $3, $4, $5 +dnl +AC_DEFUN([AC_SINGLE_CXX_CHECK], +[AC_CACHE_CHECK([for $3 in $4], [$2], + [AC_LANG_PUSH(C++) + AC_COMPILE_IFELSE(AC_LANG_SOURCE([$5]),[$2=yes],[$2=no]) + AC_LANG_POP(C++)]) + if test "$$2" = "yes" + then + AC_DEFINE($1, 1, [Define to 1 if your compiler defines $3 in the $4 + header file.]) + fi]) + +AC_DEFUN([AC_FUNC_ISNAN],[ +AC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_MATH_H], [ac_cv_func_isnan_in_math_h], + [isnan], [], + [#include + int foo(float f) {return isnan(f);}]) +AC_SINGLE_CXX_CHECK([HAVE_ISNAN_IN_CMATH], [ac_cv_func_isnan_in_cmath], + [isnan], [], + [#include + int foo(float f) {return isnan(f);}]) +AC_SINGLE_CXX_CHECK([HAVE_STD_ISNAN_IN_CMATH], [ac_cv_func_std_isnan_in_cmath], + [std::isnan], [], + [#include + using std::isnan; int foo(float f) {return isnan(f);}]) +]) + From gaeke at cs.uiuc.edu Tue Jun 22 18:55:01 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 18:55:01 2004 Subject: [llvm-commits] CVS: llvm/include/Config/config.h.in Message-ID: <200406222347.SAA17281@zion.cs.uiuc.edu> Changes in directory llvm/include/Config: config.h.in updated: 1.19 -> 1.20 --- Log message: Regenerated. It looks to me like people haven't been running AutoRegen.sh. Grumble grumble. --- Diffs of the changes: (+17 -7) Index: llvm/include/Config/config.h.in diff -u llvm/include/Config/config.h.in:1.19 llvm/include/Config/config.h.in:1.20 --- llvm/include/Config/config.h.in:1.19 Tue Jun 22 16:35:10 2004 +++ llvm/include/Config/config.h.in Tue Jun 22 18:47:23 2004 @@ -36,6 +36,9 @@ /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE +/* Define to 1 if you have the `getrusage' function. */ +#undef HAVE_GETRUSAGE + /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY @@ -48,6 +51,12 @@ /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY +/* Define to 1 if your compiler defines isnan in the header file. */ +#undef HAVE_ISNAN_IN_CMATH + +/* Define to 1 if your compiler defines isnan in the header file. */ +#undef HAVE_ISNAN_IN_MATH_H + /* Define to 1 if you have the `elf' library (-lelf). */ #undef HAVE_LIBELF @@ -70,6 +79,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `mkstemp' function. */ +#undef HAVE_MKSTEMP + /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP @@ -92,6 +104,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H +/* Define to 1 if your compiler defines std::isnan in the header file. + */ +#undef HAVE_STD_ISNAN_IN_CMATH + /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP @@ -107,12 +123,6 @@ /* Define to 1 if you have the `strtoq' function. */ #undef HAVE_STRTOQ -/* Define to 1 if you have the mkstemp function */ -#undef HAVE_MKSTEMP - -/* Define to 1 if you have the getrusage function */ -#undef HAVE_GETRUSAGE - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H @@ -137,7 +147,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to have the header file. */ +/* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H /* Define to 1 if you have the isnan() function */ From gaeke at cs.uiuc.edu Tue Jun 22 18:55:06 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 18:55:06 2004 Subject: [llvm-commits] CVS: llvm/configure Message-ID: <200406222347.SAA17241@zion.cs.uiuc.edu> Changes in directory llvm: configure updated: 1.94 -> 1.95 --- Log message: Regenerated. --- Diffs of the changes: (+177 -0) Index: llvm/configure diff -u llvm/configure:1.94 llvm/configure:1.95 --- llvm/configure:1.94 Tue Jun 22 16:35:06 2004 +++ llvm/configure Tue Jun 22 18:47:13 2004 @@ -20649,6 +20649,183 @@ fi + +echo "$as_me:$LINENO: checking for isnan in " >&5 +echo $ECHO_N "checking for isnan in ... $ECHO_C" >&6 +if test "${ac_cv_func_isnan_in_math_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + int foo(float f) {return isnan(f);} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_isnan_in_math_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_isnan_in_math_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_math_h" >&5 +echo "${ECHO_T}$ac_cv_func_isnan_in_math_h" >&6 + if test "$ac_cv_func_isnan_in_math_h" = "yes" + then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN_IN_MATH_H 1 +_ACEOF + + fi +echo "$as_me:$LINENO: checking for isnan in " >&5 +echo $ECHO_N "checking for isnan in ... $ECHO_C" >&6 +if test "${ac_cv_func_isnan_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + int foo(float f) {return isnan(f);} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_isnan_in_cmath=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_isnan_in_cmath=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_func_isnan_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_isnan_in_cmath" >&6 + if test "$ac_cv_func_isnan_in_cmath" = "yes" + then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ISNAN_IN_CMATH 1 +_ACEOF + + fi +echo "$as_me:$LINENO: checking for std::isnan in " >&5 +echo $ECHO_N "checking for std::isnan in ... $ECHO_C" >&6 +if test "${ac_cv_func_std_isnan_in_cmath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + using std::isnan; int foo(float f) {return isnan(f);} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_std_isnan_in_cmath=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_std_isnan_in_cmath=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_func_std_isnan_in_cmath" >&5 +echo "${ECHO_T}$ac_cv_func_std_isnan_in_cmath" >&6 + if test "$ac_cv_func_std_isnan_in_cmath" = "yes" + then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STD_ISNAN_IN_CMATH 1 +_ACEOF + + fi + + # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo "$as_me:$LINENO: checking for working alloca.h" >&5 From gaeke at cs.uiuc.edu Tue Jun 22 19:03:01 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 19:03:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Support/IsNAN.cpp Message-ID: <200406222354.SAA17377@zion.cs.uiuc.edu> Changes in directory llvm/lib/Support: IsNAN.cpp added (r1.1) --- Log message: Wrapper for c99 isnan() --- Diffs of the changes: (+31 -0) Index: llvm/lib/Support/IsNAN.cpp diff -c /dev/null llvm/lib/Support/IsNAN.cpp:1.1 *** /dev/null Tue Jun 22 18:54:48 2004 --- llvm/lib/Support/IsNAN.cpp Tue Jun 22 18:54:38 2004 *************** *** 0 **** --- 1,31 ---- + //===-- IsNAN.cpp ---------------------------------------------------------===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // Platform-independent wrapper around C99 isnan(). + // + //===----------------------------------------------------------------------===// + + #include "Config/config.h" + #if HAVE_ISNAN_IN_MATH_H + # include + #elif HAVE_ISNAN_IN_CMATH + # include + #elif HAVE_STD_ISNAN_IN_CMATH + # include + using std::isnan; + #else + # error "Don't know how to get isnan()" + #endif + + namespace llvm { + + int IsNAN (float f) { return isnan (f); } + int IsNAN (double d) { return isnan (d); } + + }; // end namespace llvm; From gaeke at cs.uiuc.edu Tue Jun 22 19:33:02 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 19:33:02 2004 Subject: [llvm-commits] CVS: llvm/include/Support/MathExtras.h Message-ID: <200406230025.TAA17527@zion.cs.uiuc.edu> Changes in directory llvm/include/Support: MathExtras.h updated: 1.11 -> 1.12 --- Log message: Provide prototypes for IsNAN() wrapper. --- Diffs of the changes: (+4 -0) Index: llvm/include/Support/MathExtras.h diff -u llvm/include/Support/MathExtras.h:1.11 llvm/include/Support/MathExtras.h:1.12 --- llvm/include/Support/MathExtras.h:1.11 Tue Feb 24 19:53:45 2004 +++ llvm/include/Support/MathExtras.h Tue Jun 22 19:25:24 2004 @@ -39,6 +39,10 @@ return false; } +// Platform-independent wrappers for the C99 isnan() function. +int IsNAN (float f); +int IsNAN (double d); + } // End llvm namespace #endif From gaeke at cs.uiuc.edu Tue Jun 22 19:34:01 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Tue Jun 22 19:34:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/Local.cpp Message-ID: <200406230025.TAA17569@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: Local.cpp updated: 1.32 -> 1.33 --- Log message: Use new IsNAN() wrapper. --- Diffs of the changes: (+2 -15) Index: llvm/lib/Transforms/Utils/Local.cpp diff -u llvm/lib/Transforms/Utils/Local.cpp:1.32 llvm/lib/Transforms/Utils/Local.cpp:1.33 --- llvm/lib/Transforms/Utils/Local.cpp:1.32 Mon Jun 21 01:17:21 2004 +++ llvm/lib/Transforms/Utils/Local.cpp Tue Jun 22 19:25:35 2004 @@ -12,6 +12,7 @@ // //===----------------------------------------------------------------------===// +#include "Support/MathExtras.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" @@ -20,18 +21,6 @@ #include using namespace llvm; -#if 0 -#if defined(__POWERPC__) && defined(__APPLE_CC__) -// FIXME: Currently it seems that isnan didn't make its way into the Apple -// C++ headers, although it IS in the C headers (which confuses autoconf -// in a big way). This is a quick fix to get things compiling, until one of -// us has time to write a more complicated autoconf test. -extern "C" int isnan (double d); -namespace std { int isnan (double d) { return ::isnan (d); } } -#endif - -#endif - //===----------------------------------------------------------------------===// // Local constant propagation... // @@ -303,11 +292,9 @@ if (ConstantFP *Op2 = dyn_cast(Operands[1])) { double Op1V = Op1->getValue(), Op2V = Op2->getValue(); -#if 0 if (Name == "llvm.isunordered") - return ConstantBool::get(std::isnan(Op1V) | std::isnan(Op2V)); + return ConstantBool::get(IsNAN(Op1V) || IsNAN(Op2V)); else -#endif if (Name == "pow") { errno = 0; double V = pow(Op1V, Op2V); From lattner at cs.uiuc.edu Wed Jun 23 00:18:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 23 00:18:01 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/SingleSource/Regression/C/2003-10-13-PointerIncrementTest.c Message-ID: <200406230509.AAA18529@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/SingleSource/Regression/C: 2003-10-13-PointerIncrementTest.c (r1.3) removed --- Log message: casts are not lvalues in recent GCC releases --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Wed Jun 23 01:38:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Wed Jun 23 01:38:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp Message-ID: <200406230630.BAA20132@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DataStructure.cpp updated: 1.174 -> 1.175 --- Log message: Fix merging of nodes whose incoming offset is not zero. This unbreaks DSA on several mallocbench programs, including perl. --- Diffs of the changes: (+1 -2) Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.174 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.175 --- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.174 Thu Jun 17 13:18:26 2004 +++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Jun 23 01:29:59 2004 @@ -825,8 +825,7 @@ unsigned MergeOffset = 0; DSNode *CN = NH.getNode(); if (CN->getSize() != 1) - MergeOffset = ((i << DS::PointerShift)+NH.getOffset() - - SrcNH.getOffset()) %CN->getSize(); + MergeOffset = ((i << DS::PointerShift)+NH.getOffset()) % CN->getSize(); CN->addEdgeTo(MergeOffset, DestEdge); } } From llvm at cs.uiuc.edu Wed Jun 23 01:41:01 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Wed Jun 23 01:41:01 2004 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200406230633.BAA20267@zion.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.206 -> 1.207 --- Log message: Added a note about the new llvmgrep utility. --- Diffs of the changes: (+7 -1) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.206 llvm/docs/ReleaseNotes.html:1.207 --- llvm/docs/ReleaseNotes.html:1.206 Mon Jun 21 22:48:17 2004 +++ llvm/docs/ReleaseNotes.html Wed Jun 23 01:33:15 2004 @@ -130,6 +130,12 @@ for efficient implementation of unordered floating point comparisons.
                                            • The llvmgcc front-end now supports the GCC builtins for ISO C99 floating point comparison macros (e.g., __builtin_islessequal).
                                            • +
                                            • Now that there are more source files than can fit on a 32Kbyte command +line (Linux's limit), there's a new utility for searching the sources. The +llvmgrep tool in the utils directory combines an egrep and a find without +passing filenames through the command line. This improves performance +slightly. Simply run llvmgrep like you might egrep but leave off the file +names.
                @@ -733,7 +739,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
                - Last modified: $Date: 2004/06/22 03:48:17 $ + Last modified: $Date: 2004/06/23 06:33:15 $ From llvm at cs.uiuc.edu Wed Jun 23 01:45:01 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Wed Jun 23 01:45:01 2004 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200406230636.BAA20382@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.56 -> 1.57 --- Log message: Make sure GetRegEx returns something gnuplot can deal with (a number, not a ?) so that graphs don't bail if something fails in a test. --- Diffs of the changes: (+1 -1) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.56 llvm/utils/NightlyTest.pl:1.57 --- llvm/utils/NightlyTest.pl:1.56 Tue Jun 22 10:38:37 2004 +++ llvm/utils/NightlyTest.pl Wed Jun 23 01:36:34 2004 @@ -101,7 +101,7 @@ if (defined($1)) { return $1; } - return "?"; + return "0"; } sub AddRecord { From llvm at cs.uiuc.edu Wed Jun 23 02:54:01 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Wed Jun 23 02:54:01 2004 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200406230745.CAA22433@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.57 -> 1.58 --- Log message: Added a -noexternals options to avoid performing the externals tests on test environments that don't have Povray or SPEC. --- Diffs of the changes: (+17 -5) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.57 llvm/utils/NightlyTest.pl:1.58 --- llvm/utils/NightlyTest.pl:1.57 Wed Jun 23 01:36:34 2004 +++ llvm/utils/NightlyTest.pl Wed Jun 23 02:45:46 2004 @@ -19,6 +19,8 @@ # -norunningtests. # -norunningtests Do not run the Olden benchmark suite with # LARGE_PROBLEM_SIZE enabled. +# -noexternals Do not run the external tests (for cases where povray +# or SPEC are not installed) # -parallel Run two parallel jobs with GNU Make. # -release Build an LLVM Release version # -pedantic Enable additional GCC warnings to detect possible errors. @@ -70,6 +72,7 @@ my $NOREGRESSIONS = 0; my $NOTEST = 0; my $NORUNNINGTESTS = 0; +my $NOEXTERNALS = 0; my $MAKEOPTS = ""; my $PROGTESTOPTS = ""; my $VERBOSE = 0; @@ -266,6 +269,7 @@ if (/^-nice$/) { $NICE = "nice "; next; } if (/^-gnuplotscript$/) { $PlotScriptFilename = $ARGV[0]; shift; next; } if (/^-templatefile$/) { $Template = $ARGV[0]; shift;; next; } + if (/^-noexternals$/) { $NOEXTERNALS = 1; next; } print "Unknown option: $_ : ignoring!\n"; } @@ -593,12 +597,20 @@ print "MultiSource TEST STAGE\n"; } $MultiSourceProgramsTable = TestDirectory("MultiSource"); - if ( $VERBOSE ) { - print "External TEST STAGE\n"; - } - $ExternalProgramsTable = TestDirectory("External"); - system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ". + if ( ! $NOEXTERNALS ) { + if ( $VERBOSE ) { + print "External TEST STAGE\n"; + } + $ExternalProgramsTable = TestDirectory("External"); + system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ". " $Prefix-External-Tests.txt | sort > $Prefix-Tests.txt"; + } else { + if ( $VERBOSE ) { + print "External TEST STAGE SKIPPED\n"; + } + system "cat $Prefix-SingleSource-Tests.txt $Prefix-MultiSource-Tests.txt ". + " | sort > $Prefix-Tests.txt"; + } } if ( $VERBOSE ) { print "TEST INFORMATION COLLECTION STAGE\n"; } From llvm at cs.uiuc.edu Wed Jun 23 09:15:02 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Wed Jun 23 09:15:02 2004 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200406231407.JAA05491@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.58 -> 1.59 --- Log message: Move the tests for readability of the template and gnuplot files so they occur AFTER the source is checked out. This ensures that if either of the -gnuplotscript or -templatefile options are not given, that they get picked up from the checkout directory and don't abort the test unnecessarily. --- Diffs of the changes: (+11 -11) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.58 llvm/utils/NightlyTest.pl:1.59 --- llvm/utils/NightlyTest.pl:1.58 Wed Jun 23 02:45:46 2004 +++ llvm/utils/NightlyTest.pl Wed Jun 23 09:07:12 2004 @@ -268,7 +268,7 @@ if (/^-debug$/) { $DEBUG = 1; next; } if (/^-nice$/) { $NICE = "nice "; next; } if (/^-gnuplotscript$/) { $PlotScriptFilename = $ARGV[0]; shift; next; } - if (/^-templatefile$/) { $Template = $ARGV[0]; shift;; next; } + if (/^-templatefile$/) { $Template = $ARGV[0]; shift; next; } if (/^-noexternals$/) { $NOEXTERNALS = 1; next; } print "Unknown option: $_ : ignoring!\n"; @@ -286,16 +286,6 @@ $WebDir = $ARGV[2]; } -if ( $Template eq "" ) { - $Template = "$BuildDir/llvm/utils/NightlyTestTemplate.html"; -} -die "Template file $Template is not readable" if ( ! -r "$Template" ); - -if ( $PlotScriptFilename eq "" ) { - $PlotScriptFilename = "$BuildDir/llvm/utils/NightlyTest.gnuplot"; -} -die "GNUPlot Script $PlotScriptFilename is not readable" if ( ! -r "$PlotScriptFilename" ); - my $Prefix = "$WebDir/$DATE"; #define the file names we'll use @@ -352,6 +342,16 @@ if ( $VERBOSE ) { print "UPDATE STAGE\n"; } system "$NICE cvs update -P -d >> $CVSLog 2>&1" ; } + +if ( $Template eq "" ) { + $Template = "$BuildDir/llvm/utils/NightlyTestTemplate.html"; +} +die "Template file $Template is not readable" if ( ! -r "$Template" ); + +if ( $PlotScriptFilename eq "" ) { + $PlotScriptFilename = "$BuildDir/llvm/utils/NightlyTest.gnuplot"; +} +die "GNUPlot Script $PlotScriptFilename is not readable" if ( ! -r "$PlotScriptFilename" ); # Read in the HTML template file... if ( $VERBOSE ) { print "READING TEMPLATE\n"; } From llvm at cs.uiuc.edu Wed Jun 23 09:32:02 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Wed Jun 23 09:32:02 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h Message-ID: <200406231423.JAA06037@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr: bintree.h updated: 1.1 -> 1.2 --- Log message: Fixes for FreeBSD to avoid #include Patch provided by Vladimir Merzliakov. Thanks, Vladimir! --- Diffs of the changes: (+6 -1) Index: llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h diff -u llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h:1.1 llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h:1.2 --- llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h:1.1 Mon May 12 13:34:21 2003 +++ llvm/test/Programs/MultiSource/Benchmarks/McCat/17-bintr/bintree.h Wed Jun 23 09:23:34 2004 @@ -12,7 +12,12 @@ #define _bintree #include "general.h" -#include + +#if defined(__FreeBSD__) +# include +#else +# include +#endif struct binaryTree { From llvm at cs.uiuc.edu Wed Jun 23 09:32:11 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Wed Jun 23 09:32:11 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/gs/malloc_.h Message-ID: <200406231423.JAA06032@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/MallocBench/gs: malloc_.h updated: 1.1 -> 1.2 --- Log message: Fixes for FreeBSD to avoid #include Patch provided by Vladimir Merzliakov. Thanks, Vladimir! --- Diffs of the changes: (+5 -1) Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/gs/malloc_.h diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/gs/malloc_.h:1.1 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/gs/malloc_.h:1.2 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/gs/malloc_.h:1.1 Wed Feb 18 13:58:33 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/gs/malloc_.h Wed Jun 23 09:23:34 2004 @@ -30,7 +30,11 @@ # ifdef BSD4_2 extern char *malloc(); # else -# include +# if defined(__FreeBSD__) +# include +# else +# include +# endif # endif # endif #endif From llvm at cs.uiuc.edu Wed Jun 23 09:32:16 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Wed Jun 23 09:32:16 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Applications/obsequi/utils.h Message-ID: <200406231423.JAA06027@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Applications/obsequi: utils.h updated: 1.2 -> 1.3 --- Log message: Fixes for FreeBSD to avoid #include Patch provided by Vladimir Merzliakov. Thanks, Vladimir! --- Diffs of the changes: (+3 -1) Index: llvm/test/Programs/MultiSource/Applications/obsequi/utils.h diff -u llvm/test/Programs/MultiSource/Applications/obsequi/utils.h:1.2 llvm/test/Programs/MultiSource/Applications/obsequi/utils.h:1.3 --- llvm/test/Programs/MultiSource/Applications/obsequi/utils.h:1.2 Tue May 11 14:45:39 2004 +++ llvm/test/Programs/MultiSource/Applications/obsequi/utils.h Wed Jun 23 09:23:34 2004 @@ -11,7 +11,9 @@ #include #include -#include +#if !defined(__FreeBSD__) +# include +#endif #include From brukman at cs.uiuc.edu Wed Jun 23 12:29:00 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jun 23 12:29:00 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Utils/Linker.cpp Message-ID: <200406231721.MAA22707@zion.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Utils: Linker.cpp (r1.71) removed --- Log message: Moved to lib/VMCore --- Diffs of the changes: (+0 -0) From brukman at cs.uiuc.edu Wed Jun 23 12:33:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jun 23 12:33:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/Utils/Linker.h Message-ID: <200406231725.MAA22777@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms/Utils: Linker.h (r1.8) removed --- Log message: Moved to include/llvm/Support --- Diffs of the changes: (+0 -0) From brukman at cs.uiuc.edu Wed Jun 23 12:33:11 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jun 23 12:33:11 2004 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Linker.cpp Message-ID: <200406231724.MAA22760@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Linker.cpp updated: 1.71 -> 1.72 --- Log message: Linker.h moved to include/llvm/Support --- Diffs of the changes: (+1 -1) Index: llvm/lib/VMCore/Linker.cpp diff -u llvm/lib/VMCore/Linker.cpp:1.71 llvm/lib/VMCore/Linker.cpp:1.72 --- llvm/lib/VMCore/Linker.cpp:1.71 Thu Jun 17 13:16:22 2004 +++ llvm/lib/VMCore/Linker.cpp Wed Jun 23 12:24:31 2004 @@ -16,7 +16,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Transforms/Utils/Linker.h" +#include "llvm/Support/Linker.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" From brukman at cs.uiuc.edu Wed Jun 23 12:39:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jun 23 12:39:01 2004 Subject: [llvm-commits] CVS: llvm/tools/bugpoint/BugDriver.cpp Miscompilation.cpp Message-ID: <200406231731.MAA24654@zion.cs.uiuc.edu> Changes in directory llvm/tools/bugpoint: BugDriver.cpp updated: 1.32 -> 1.33 Miscompilation.cpp updated: 1.48 -> 1.49 --- Log message: Linker.h moved to include/llvm/Support --- Diffs of the changes: (+2 -2) Index: llvm/tools/bugpoint/BugDriver.cpp diff -u llvm/tools/bugpoint/BugDriver.cpp:1.32 llvm/tools/bugpoint/BugDriver.cpp:1.33 --- llvm/tools/bugpoint/BugDriver.cpp:1.32 Tue Apr 6 12:04:30 2004 +++ llvm/tools/bugpoint/BugDriver.cpp Wed Jun 23 12:31:12 2004 @@ -18,7 +18,7 @@ #include "llvm/Pass.h" #include "llvm/Assembly/Parser.h" #include "llvm/Bytecode/Reader.h" -#include "llvm/Transforms/Utils/Linker.h" +#include "llvm/Support/Linker.h" #include "llvm/Support/ToolRunner.h" #include "Support/CommandLine.h" #include "Support/FileUtilities.h" Index: llvm/tools/bugpoint/Miscompilation.cpp diff -u llvm/tools/bugpoint/Miscompilation.cpp:1.48 llvm/tools/bugpoint/Miscompilation.cpp:1.49 --- llvm/tools/bugpoint/Miscompilation.cpp:1.48 Wed May 12 14:02:44 2004 +++ llvm/tools/bugpoint/Miscompilation.cpp Wed Jun 23 12:31:13 2004 @@ -22,7 +22,7 @@ #include "llvm/Analysis/Verifier.h" #include "llvm/Support/Mangler.h" #include "llvm/Transforms/Utils/Cloning.h" -#include "llvm/Transforms/Utils/Linker.h" +#include "llvm/Support/Linker.h" #include "Support/CommandLine.h" #include "Support/FileUtilities.h" using namespace llvm; From brukman at cs.uiuc.edu Wed Jun 23 12:40:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jun 23 12:40:01 2004 Subject: [llvm-commits] CVS: llvm/tools/gccld/GenerateCode.cpp Linker.cpp gccld.cpp Message-ID: <200406231732.MAA24674@zion.cs.uiuc.edu> Changes in directory llvm/tools/gccld: GenerateCode.cpp updated: 1.28 -> 1.29 Linker.cpp updated: 1.26 -> 1.27 gccld.cpp updated: 1.75 -> 1.76 --- Log message: Linker.h moved to include/llvm/Support --- Diffs of the changes: (+3 -3) Index: llvm/tools/gccld/GenerateCode.cpp diff -u llvm/tools/gccld/GenerateCode.cpp:1.28 llvm/tools/gccld/GenerateCode.cpp:1.29 --- llvm/tools/gccld/GenerateCode.cpp:1.28 Tue Jun 1 19:22:24 2004 +++ llvm/tools/gccld/GenerateCode.cpp Wed Jun 23 12:32:09 2004 @@ -22,7 +22,7 @@ #include "llvm/Target/TargetData.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" -#include "llvm/Transforms/Utils/Linker.h" +#include "llvm/Support/Linker.h" #include "Support/SystemUtils.h" #include "Support/CommandLine.h" using namespace llvm; Index: llvm/tools/gccld/Linker.cpp diff -u llvm/tools/gccld/Linker.cpp:1.26 llvm/tools/gccld/Linker.cpp:1.27 --- llvm/tools/gccld/Linker.cpp:1.26 Tue Jun 1 19:22:24 2004 +++ llvm/tools/gccld/Linker.cpp Wed Jun 23 12:32:09 2004 @@ -20,7 +20,7 @@ #include "llvm/Target/TargetData.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" -#include "llvm/Transforms/Utils/Linker.h" +#include "llvm/Support/Linker.h" #include "Config/config.h" #include "Support/CommandLine.h" #include "Support/FileUtilities.h" Index: llvm/tools/gccld/gccld.cpp diff -u llvm/tools/gccld/gccld.cpp:1.75 llvm/tools/gccld/gccld.cpp:1.76 --- llvm/tools/gccld/gccld.cpp:1.75 Tue Jun 1 19:53:57 2004 +++ llvm/tools/gccld/gccld.cpp Wed Jun 23 12:32:09 2004 @@ -28,7 +28,7 @@ #include "llvm/Target/TargetData.h" #include "llvm/Transforms/IPO.h" #include "llvm/Transforms/Scalar.h" -#include "llvm/Transforms/Utils/Linker.h" +#include "llvm/Support/Linker.h" #include "Support/CommandLine.h" #include "Support/FileUtilities.h" #include "llvm/System/Signals.h" From brukman at cs.uiuc.edu Wed Jun 23 12:41:02 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jun 23 12:41:02 2004 Subject: [llvm-commits] CVS: llvm/tools/llvm-link/llvm-link.cpp Message-ID: <200406231733.MAA24710@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-link: llvm-link.cpp updated: 1.36 -> 1.37 --- Log message: Linker.h moved to include/llvm/Support --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-link/llvm-link.cpp diff -u llvm/tools/llvm-link/llvm-link.cpp:1.36 llvm/tools/llvm-link/llvm-link.cpp:1.37 --- llvm/tools/llvm-link/llvm-link.cpp:1.36 Thu May 27 00:38:45 2004 +++ llvm/tools/llvm-link/llvm-link.cpp Wed Jun 23 12:33:09 2004 @@ -16,7 +16,7 @@ #include "llvm/Analysis/Verifier.h" #include "llvm/Bytecode/Reader.h" #include "llvm/Bytecode/Writer.h" -#include "llvm/Transforms/Utils/Linker.h" +#include "llvm/Support/Linker.h" #include "Support/CommandLine.h" #include "Support/FileUtilities.h" #include "llvm/System/Signals.h" From brukman at cs.uiuc.edu Wed Jun 23 12:44:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jun 23 12:44:01 2004 Subject: [llvm-commits] CVS: llvm/tools/llvm-link/Makefile Message-ID: <200406231736.MAA27092@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-link: Makefile updated: 1.7 -> 1.8 --- Log message: TransformUtils library is no longer needed since Linker.cpp is in VMCore --- Diffs of the changes: (+1 -1) Index: llvm/tools/llvm-link/Makefile diff -u llvm/tools/llvm-link/Makefile:1.7 llvm/tools/llvm-link/Makefile:1.8 --- llvm/tools/llvm-link/Makefile:1.7 Mon Oct 20 17:27:27 2003 +++ llvm/tools/llvm-link/Makefile Wed Jun 23 12:36:17 2004 @@ -9,6 +9,6 @@ LEVEL = ../.. TOOLNAME = llvm-link -USEDLIBS = bcreader bcwriter transformutils.a vmcore support.a +USEDLIBS = bcreader bcwriter vmcore support.a include $(LEVEL)/Makefile.common From gaeke at cs.uiuc.edu Wed Jun 23 15:07:02 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Jun 23 15:07:02 2004 Subject: [llvm-commits] CVS: reopt/include/reopt/UnpackTraceFunction.h Message-ID: <200406232006.PAA04197@kain.cs.uiuc.edu> Changes in directory reopt/include/reopt: UnpackTraceFunction.h updated: 1.8 -> 1.9 --- Log message: Add new prototype for addLiveOutCopy method. --- Diffs of the changes: (+4 -1) Index: reopt/include/reopt/UnpackTraceFunction.h diff -u reopt/include/reopt/UnpackTraceFunction.h:1.8 reopt/include/reopt/UnpackTraceFunction.h:1.9 --- reopt/include/reopt/UnpackTraceFunction.h:1.8 Fri Jun 11 15:54:40 2004 +++ reopt/include/reopt/UnpackTraceFunction.h Wed Jun 23 15:06:33 2004 @@ -60,8 +60,11 @@ void copyConstantToRegister (MachineFunction &MF, Constant *C, unsigned Reg, std::vector &mvec); + void addLiveOutCopy (MachineFunction &MF, MachineBasicBlock &MBB, + const AllocInfo &Source, const AllocInfo &Target, + Value *liveOutValue, Value *liveOutTraceValue); void rewriteEpilog (MachineFunction &MF, MachineBasicBlock &MBB); - + public: UnpackTraceFunction (TargetMachine *TM_) : TM (TM_), TF (0) { } void setTraceFunction (TraceFunction *TF_) { TF = TF_; } From gaeke at cs.uiuc.edu Wed Jun 23 15:08:12 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Jun 23 15:08:12 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Message-ID: <200406232006.PAA04204@kain.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: UnpackTraceFunction.cpp updated: 1.85 -> 1.86 --- Log message: Include llvm/Support/CFG.h and llvm/iPHINode.h. Refactor live-out copying code into addLiveOutCopy. In rewriteEpilog, add new loop to perform phi elimination at trace exit edges, using addLiveOutCopy. --- Diffs of the changes: (+98 -45) Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.85 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.86 --- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.85 Thu Jun 17 13:13:19 2004 +++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Wed Jun 23 15:06:34 2004 @@ -19,7 +19,9 @@ #include "llvm/CodeGen/InstrSelection.h" // for TmpInstruction #include "llvm/CodeGen/MachineFunctionInfo.h" // for getStaticStackSize() #include "llvm/CodeGen/MachineCodeForInstruction.h" +#include "llvm/Support/CFG.h" #include "llvm/Module.h" +#include "llvm/iPHINode.h" #include "llvm/Assembly/Writer.h" #include "Support/StringExtras.h" // for utostr() #include "Support/Debug.h" @@ -282,6 +284,45 @@ std::cerr << "copyConstantToRegister Output: " << **i << "\n"); } +void UnpackTraceFunction::addLiveOutCopy (MachineFunction &MF, MachineBasicBlock &MBB, + const AllocInfo &Source, const AllocInfo &Target, + Value *liveOutValue, Value *liveOutTraceValue) { + const SparcV9RegInfo &TRI = *TM->getRegInfo (); + std::vector mvec; + static const unsigned sp = SparcV9::o6, g1 = SparcV9::g1, g2 = SparcV9::g2; + + assert (Target.AllocState == AllocInfo::Allocated + && "Live-out values must be in regs in the matrixFn"); + mvec.clear (); + if (RegsToSave.find (Target.Placement) == RegsToSave.end ()) { + DEBUG (std::cerr << "addLiveOutCopy: Adding live-out's matrixFn " + << RegStr (Target.Placement) << " to RegsToSave set\n"); + RegsToSave.insert (Target.Placement); + } + if (Source.AllocState == AllocInfo::NotAllocated) { + assert (liveOutValue); + assert (isa (liveOutTraceValue) + && "Can't handle non-constant, non-allocated live-out value in traceFn"); + copyConstantToRegister (MF, cast (liveOutTraceValue), g1, mvec); + unsigned R = g1; + unsigned RegType = TRI.getRegType (R); + DEBUG (std::cerr << "addLiveOutCopy: " << liveOutValue->getName() + << " is a constant in TraceFn\n"); + TRI.cpReg2MemMI (mvec, R, sp, stackOffsetForReg (Target.Placement), + RegType, g2); + } else { + assert (Source.AllocState == AllocInfo::Allocated + && "Can't handle live-out value spilled in traceFn"); + unsigned R = Source.Placement; + unsigned RegType = TRI.getRegType (R); + TRI.cpReg2MemMI (mvec, R, sp, stackOffsetForReg (Target.Placement), + RegType, g2); + } + for (std::vector::iterator vi = mvec.begin (), + ve = mvec.end (); vi != ve; ++vi) + MBB.push_back (*vi); +} + void UnpackTraceFunction::rewriteEpilog (MachineFunction &MF, MachineBasicBlock &MBB) { const SparcV9RegInfo &TRI = *TM->getRegInfo (); @@ -292,7 +333,55 @@ // (FIXME: may not work once we start doing optimizations!!! We will probably // have to use a separate MBB) MBB.clear (); - + + // Find the BasicBlock in MatrixFn that this block's return instr. + // would have returned to, by consulting our mapping information. + // FIXME: Currently we key our mapping info on TraceFn basic blocks. + // This is fragile - we should use ReturnInsts instead, I think. + const BasicBlock *RBB = TF->ReturnBlockForTraceExit[MBB.getBasicBlock ()]; + assert (RBB && "Can't find matrix fn BB address to return to from trace"); + DEBUG (std::cerr << "rewriteEpilog: Return block for trace exit path is:\n" + << *RBB << "\n"); + + // Perform Phi elimination along trace exit edges. + for (BasicBlock::const_iterator Inst = RBB->begin (); + const PHINode *PN = dyn_cast (Inst); ++Inst) + for (unsigned i = 0, e = PN->getNumIncomingValues (); i != e; ++i) { + // If PN has a source S from the source of the trace exit (MBB's predecessor), + // then we have to copy S's incoming value into its PhiCp register. + const BasicBlock *Src = PN->getIncomingBlock (i); + if (TF->T.contains (Src)) { + BasicBlock *SrcTTF = cast (TF->getCorrespondingValue (Src)); + DEBUG (std::cerr << "rewriteEpilog: considering Phi node " << PN->getName () + << ", found on-trace source #" << i << " (" << Src->getName () + << ", corresponding to " << SrcTTF->getName () << " on trace)\n" + << *PN << "\n"); + const BasicBlock *TraceExitingBB = *pred_begin(MBB.getBasicBlock ()); + DEBUG (std::cerr << "rewriteEpilog: trace exiting BB for this block is " + << TraceExitingBB->getName () << "\n"); + if (TraceExitingBB == SrcTTF) { + Value *V = PN->getIncomingValue (i); + DEBUG (std::cerr << "rewriteEpilog: found match: trace exiting BB is " + << "phi source; phi's incoming value from " << Src->getName () + << " is " << V->getName () << "\n"); + std::pair outgoingValueAI = GetValueAllocState (TF, V, false); + std::pair phiCpAI = + GetValueAllocState (TF, const_cast (PN), true); // we want the PhiCp node + DEBUG (std::cerr << "rewriteEpilog: Outgoing value is in "; + PrintAI (outgoingValueAI.second); + std::cerr << " in TraceFn, and " << PN->getName() << "'s PhiCp node is in "; + PrintAI (phiCpAI.first); + std::cerr << " in MatrixFn\n"); + + AllocInfo &Target = phiCpAI.first, &Source = outgoingValueAI.second; + DEBUG (std::cerr << "rewriteEpilog: copying live-out phi value: "; + PrintValueAIs(V->getName(), Target, Source)); + addLiveOutCopy (MF, MBB, Source, Target, V, TF->getCorrespondingValue (V, false)); + } + } + DEBUG (std::cerr << "\n"); + } + // Insert stores from each live-out variable's reg. in the trace // to its stack slot in the trace function, from which it will be // reloaded below into a register. @@ -304,38 +393,9 @@ std::pair ai = GetValueAllocState (TF, V, false); // Source is traceFn's register, Target is matrixFn's register AllocInfo &Target = ai.first, &Source = ai.second; - assert (Target.AllocState == AllocInfo::Allocated - && "Live-out values must be in regs in the matrixFn"); - mvec.clear (); - if (RegsToSave.find (Target.Placement) == RegsToSave.end ()) { - DEBUG (std::cerr << "rewriteProlog: Adding live-out's matrixFn " - << RegStr (Target.Placement) << " to RegsToSave set\n"); - RegsToSave.insert (Target.Placement); - } DEBUG (std::cerr << "rewriteEpilog: copying live-out value: "; PrintValueAIs(V->getName(), Target, Source)); - if (Source.AllocState == AllocInfo::NotAllocated) { - assert (isa (TF->getCorrespondingValue (V, false)) - && "Can't handle non-constant, non-allocated live-out value in traceFn"); - copyConstantToRegister (MF, cast (TF->getCorrespondingValue (V, false)), - g1, mvec); - unsigned R = g1; - unsigned RegType = TRI.getRegType (R); - DEBUG (std::cerr << "rewriteEpilog: " << V->getName() - << " is a constant in TraceFn\n"); - TRI.cpReg2MemMI (mvec, R, sp, stackOffsetForReg (Target.Placement), - RegType, g2); - } else { - assert (Source.AllocState == AllocInfo::Allocated - && "Can't handle live-out value spilled in traceFn"); - unsigned R = Source.Placement; - unsigned RegType = TRI.getRegType (R); - TRI.cpReg2MemMI (mvec, R, sp, stackOffsetForReg (Target.Placement), - RegType, g2); - } - for (std::vector::iterator vi = mvec.begin (), - ve = mvec.end (); vi != ve; ++vi) - MBB.push_back (*vi); + addLiveOutCopy (MF, MBB, Source, Target, V, TF->getCorrespondingValue (V, false)); } // Restore old FP. @@ -364,22 +424,15 @@ // Restore stack pointer. BuildMI (&MBB, V9::ADDi, 3).addMReg (sp).addSImm (TotalStackSize) .addMReg (sp, MachineOperand::Def); - + // Let ReturnAddress be the address in memory of the compiled - // code for the MachineBasicBlock in MatrixF that RI would have - // returned to. Find it by using mapping info. - const BasicBlock *RBB = MBB.getBasicBlock (); - assert ((TF->ReturnBlockForTraceExit.find (RBB) != - TF->ReturnBlockForTraceExit.end ()) - && "Can't find matrix fn BB address to return to from trace"); - std::pair BlockAddrs = - getBasicBlockInfo(TF->ReturnBlockForTraceExit[RBB]); + // code for RBB. We find this by consulting our mapping information. + std::pair BlockAddrs = getBasicBlockInfo(const_cast (RBB)); uint64_t ReturnAddress = BlockAddrs.first; - DEBUG (std::cerr << "rewriteEpilog: Return block for trace exit path is:\n" - << *TF->ReturnBlockForTraceExit[RBB] << "\n" - << "rewriteEpilog: Mapping info says addresses are: return address =" - << " 0x" << std::hex << BlockAddrs.first << ", end of block = 0x" - << BlockAddrs.second << std::dec << "\n"); + DEBUG(std::cerr + << "rewriteEpilog: Mapping info says addresses are: return address =" + << " 0x" << std::hex << BlockAddrs.first << ", end of block = 0x" + << BlockAddrs.second << std::dec << "\n"); // Insert a branch back to the return BasicBlock of the matrix fn. BuildMI (&MBB, V9::BA, 1) .addPCDisp (ConstantUInt::get (Type::ULongTy, ReturnAddress)); From gaeke at cs.uiuc.edu Wed Jun 23 15:08:24 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Jun 23 15:08:24 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/ValueAllocState.cpp Message-ID: <200406232006.PAA04211@kain.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: ValueAllocState.cpp updated: 1.3 -> 1.4 --- Log message: If getSavedStateIndexOfInstruction can't find the instruction, just return -1, don't abort. In getValueAllocStateKeys, look for the PhiCp node if it's in any trace boundary (enter-from or return-to) block, not just the entry block. Add new static method findTraceBoundaryBlocks to compute the set of trace boundary blocks for each TraceFunction. --- Diffs of the changes: (+22 -10) Index: reopt/lib/LightWtProfiling/ValueAllocState.cpp diff -u reopt/lib/LightWtProfiling/ValueAllocState.cpp:1.3 reopt/lib/LightWtProfiling/ValueAllocState.cpp:1.4 --- reopt/lib/LightWtProfiling/ValueAllocState.cpp:1.3 Tue Jun 8 13:53:57 2004 +++ reopt/lib/LightWtProfiling/ValueAllocState.cpp Wed Jun 23 15:06:35 2004 @@ -56,7 +56,7 @@ /// Returns the index of the given Instruction in the given Function. /// -static unsigned getSavedStateIndexOfInstruction (const Function *F, +static int getSavedStateIndexOfInstruction (const Function *F, const Instruction *I) { unsigned Key = 0; for (const_inst_iterator II=inst_begin (F), IE=inst_end (F); II!=IE; ++II) { @@ -64,12 +64,10 @@ return Key; ++Key; } - // By this time we had better have found it, otherwise we are about to do bad - // things. - std::cerr << "ERROR: UnpackTraceFunction: Cannot find index of Value " - << F->getName() << "() in its parent Function using inst_iterator, " - << "in getSavedStateIndexOfInstruction()\n"; - abort (); + DEBUG (std::cerr << "getSavedStateIndexOfInstruction: Warning: Cannot find " + << "index of value " << I->getName() << " in its parent function " + << F->getName () << "()\n"); + return -1; } /// Returns the index of the given Argument in the given Function's @@ -86,7 +84,17 @@ abort (); } -static BasicBlock *TraceEntryBB = 0; +static std::set TraceBoundaryBlocks; +static TraceFunction *lastTraceFunction; + +static void findTraceBoundaryBlocks (TraceFunction *TF) { + TraceBoundaryBlocks.clear (); + TraceBoundaryBlocks.insert (TF->T.getEntryBasicBlock ()); + for (BasicBlockMap::iterator i = TF->ReturnBlockForTraceExit.begin (), + e = TF->ReturnBlockForTraceExit.end (); i != e; ++i) { + TraceBoundaryBlocks.insert (i->second); + } +} /// getValueAllocStateKeys - Fill in InstructionKey and OperandKey with the /// indices used to look up saved register allocation state for V in F. @@ -99,7 +107,8 @@ } else if (Instruction *Inst = dyn_cast (V)) { InstructionKey = getSavedStateIndexOfInstruction (F, Inst); if (isa (Inst) && preferLiveIn - && Inst->getParent() == TraceEntryBB) + && TraceBoundaryBlocks.find (Inst->getParent ()) + != TraceBoundaryBlocks.end ()) OperandKey = -2; // look for PhiCpRes instead. } else { DEBUG (std::cerr << "getValueAllocStateKeys: keys not known for " @@ -179,7 +188,10 @@ /// std::pair GetValueAllocState (TraceFunction *TF, Value *V, bool preferLiveIn) { - TraceEntryBB = TF->T.getEntryBasicBlock(); + if (lastTraceFunction != TF) { + findTraceBoundaryBlocks (TF); + lastTraceFunction = TF; + } return std::make_pair (getValueAllocStateFromModule (TF->MatrixFn, V, preferLiveIn), getValueAllocStateFromGlobal (TF->TraceFn, From brukman at cs.uiuc.edu Wed Jun 23 15:26:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Wed Jun 23 15:26:01 2004 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200406232025.PAA03006@zion.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.6 -> 1.7 --- Log message: * Mention that zion tests are debug mode * Add Reid's optimized nightly tester --- Diffs of the changes: (+5 -2) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.6 llvm-www/testresults/index.html:1.7 --- llvm-www/testresults/index.html:1.6 Wed Jun 9 15:29:56 2004 +++ llvm-www/testresults/index.html Wed Jun 23 15:25:18 2004 @@ -23,7 +23,10 @@
                  -
                1. Linux on X86 (Dual P4 Xeon @ 3.06GHz)
                2. +
                3. Linux on X86 (Dual P4 Xeon @ 3.06GHz) -- debug build
                4. + +
                5. Linux on X86 (Celeron @ +1.7GHz) -- release build
                6. Solaris on Sparc V9 (Sun Fire V240, dual 1Ghz CPU)
                7. @@ -37,7 +40,7 @@
                  Chris Lattner
                  The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/06/09 20:29:56 $ + Last modified: $Date: 2004/06/23 20:25:18 $ From gaeke at cs.uiuc.edu Wed Jun 23 16:42:02 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Jun 23 16:42:02 2004 Subject: [llvm-commits] CVS: reopt/include/reopt/TraceToFunction.h Message-ID: <200406232141.QAA06577@kain.cs.uiuc.edu> Changes in directory reopt/include/reopt: TraceToFunction.h updated: 1.14 -> 1.15 --- Log message: The corresponding value of a constant is... itself. --- Diffs of the changes: (+1 -0) Index: reopt/include/reopt/TraceToFunction.h diff -u reopt/include/reopt/TraceToFunction.h:1.14 reopt/include/reopt/TraceToFunction.h:1.15 --- reopt/include/reopt/TraceToFunction.h:1.14 Mon May 24 03:54:45 2004 +++ reopt/include/reopt/TraceToFunction.h Wed Jun 23 16:41:33 2004 @@ -79,6 +79,7 @@ ValueToIntMap LiveInToParameterMap; Value *getCorrespondingValue (const Value *V, bool preferLiveIn = true) { + if (isa(V)) return const_cast (V); if (preferLiveIn) { ValueToIntMap::iterator It = LiveInToParameterMap.find (V); if (It != LiveInToParameterMap.end ()) From gaeke at cs.uiuc.edu Wed Jun 23 16:42:08 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Jun 23 16:42:08 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp Message-ID: <200406232141.QAA06570@kain.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9: SparcV9PreSelection.cpp updated: 1.34 -> 1.35 --- Log message: Make the most commonly preselected instructions add to the names of the instructions they augment, instead of replacing them. It's good for debugging, and it's OK for the sparcv9 backend. --- Diffs of the changes: (+2 -2) Index: llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp diff -u llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp:1.34 llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp:1.35 --- llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp:1.34 Wed Jun 2 00:54:43 2004 +++ llvm/lib/Target/SparcV9/SparcV9PreSelection.cpp Wed Jun 23 16:41:32 2004 @@ -91,7 +91,7 @@ return (isa(ptr)) ? new GetElementPtrInst(ptr, std::vector(1, ConstantSInt::get(Type::LongTy, 0U)), - "addrOfGlobal", &insertBefore) + "addrOfGlobal:" + ptr->getName(), &insertBefore) : NULL; } @@ -123,7 +123,7 @@ getArg1 = gep; return new GetElementPtrInst(getArg1, std::vector(CE->op_begin()+1, CE->op_end()), - "constantGEP", &insertBefore); + "constantGEP:" + getArg1->getName(), &insertBefore); case Instruction::Select: { Value *C, *S1, *S2; From gaeke at cs.uiuc.edu Wed Jun 23 16:43:01 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Jun 23 16:43:01 2004 Subject: [llvm-commits] CVS: reopt/lib/TraceToFunction/TraceToFunction.cpp Message-ID: <200406232141.QAA06584@kain.cs.uiuc.edu> Changes in directory reopt/lib/TraceToFunction: TraceToFunction.cpp updated: 1.67 -> 1.68 --- Log message: Don't produce duplicate [ %liveIn, %entryfixup ] entries in trace entry block phi nodes. --- Diffs of the changes: (+43 -28) Index: reopt/lib/TraceToFunction/TraceToFunction.cpp diff -u reopt/lib/TraceToFunction/TraceToFunction.cpp:1.67 reopt/lib/TraceToFunction/TraceToFunction.cpp:1.68 --- reopt/lib/TraceToFunction/TraceToFunction.cpp:1.67 Tue Jun 15 04:46:02 2004 +++ reopt/lib/TraceToFunction/TraceToFunction.cpp Wed Jun 23 16:41:34 2004 @@ -64,6 +64,7 @@ TypeVector createFunctionArgTypeVector (PointerType *ST, const LiveVariableSet &S); void fillInFunctionBody (Trace &T, Function *F, LiveVariableSet &So); + int findOffTracePhiSource (const PHINode *newPN); void fixupFunctionBodyBB (Trace &T, Function *F, BasicBlock *srcB, BasicBlock *dstB, ValueMap &O2CMap, LiveVariableSet &So); @@ -596,6 +597,22 @@ return i->second.second; } +int TraceFunctionBuilder::findOffTracePhiSource (const PHINode *newPN) { + for (unsigned i = 0; i < newPN->getNumIncomingValues (); ++i) { + BasicBlock *phiSource = newPN->getIncomingBlock (i); + ValueMap::iterator MapIt = TF->O2CMap.find (phiSource); + if (MapIt != TF->O2CMap.end ()) { phiSource = cast (MapIt->second); } + if (newPN->getParent ()->getParent () != phiSource->getParent ()) { + DEBUG (std::cerr << "findOffTracePhiSource: " << newPN->getName () + << "'s source #" << i << " looks like an off-trace source: [ %" + << newPN->getIncomingValue (i)->getName () << ", %" + << newPN->getIncomingBlock (i)->getName () << " ]\n"); + return i; + } + } + return -1; +} + /// fixupFunctionBodyBB - Given srcB in T and its clone dstB in F, and /// the map O2CMap detailing the correspondences between values in T /// and values in F, fix up dstB so that its contents are internally @@ -609,7 +626,7 @@ LiveVariableSet &So) { assert (T.contains (srcB) && "Source BB is not on the trace"); assert (dstB->getParent () == F && "Clone is not in the function"); - + // Additional special handling for trace's entry basic block: // The old entry BB's clone will start with a phi, one of whose args // comes from off-trace (that's the trace entry point.) We can't @@ -625,38 +642,36 @@ // their value from the argument which carries the live-in value. for (BasicBlock::iterator BI = srcB->begin (); PHINode *oldPN = dyn_cast (BI); ++BI) { - DEBUG (std::cerr << "fixupFunctionBodyBB: Changing name of trace" - << " entry block Phi node:\n" << O2CMap[oldPN] << " to " - << O2CMap[oldPN]->getName() << ".phifixup\n"; - O2CMap[oldPN]->setName (O2CMap[oldPN]->getName () + ".phifixup")); assert (TF->LiveInSet.find (oldPN) != TF->LiveInSet.end () && "Phi nodes in trace entry BB must be live-in"); - unsigned argNum = TF->LiveInToParameterMap [oldPN]; - Argument *phiLiveIn = getFunctionArg (F, argNum); - for (unsigned i = 0; i < oldPN->getNumIncomingValues (); ++i) { - // Fold Phi sources which come from FLI blocks - BasicBlock *phiSource = oldPN->getIncomingBlock (i); - if (BasicBlock *realSource = getFLIEdgeSource (phiSource)) - phiSource = realSource; - if (!T.contains (phiSource)) { - Value *V = O2CMap[oldPN]; - assert (V && isa (V) - && "Clone of PHINode from trace entry BB missing or mangled"); - PHINode *newPN = cast (V); - DEBUG (std::cerr << "fixupFunctionBodyBB: Changing incoming block " - << i << " of trace entry block Phi node:\n" << *newPN << " from " - << newPN->getIncomingBlock (i)->getName () << " to entry-fixup " - << "block, and incoming value to argument " << argNum << " ("; - WriteAsOperand (std::cerr, phiLiveIn, true, true, - TF->TraceFn->getParent ()); - std::cerr << ")\n"); - newPN->setIncomingBlock (i, EntryFixup); - newPN->setIncomingValue (i, phiLiveIn); - } + Argument *phiLiveIn = getFunctionArg (F, + TF->LiveInToParameterMap [oldPN]); + + Value *V = O2CMap[oldPN]; + assert (V && isa (V) + && "Clone of PHINode from trace entry BB missing or mangled"); + PHINode *newPN = cast (V); + + DEBUG (std::cerr << "fixupFunctionBodyBB: Changing name of trace" + << " entry block Phi node:\n" << newPN << " to " + << newPN->getName() << ".phifixup\n"; + newPN->setName (newPN->getName () + ".phifixup")); + + // Remove all the off-trace sources; then, if we found an off-trace + // source, add an entryfixup source. + bool foundOffTracePhiSource = false; + for (int i = findOffTracePhiSource (newPN); i != -1; + i = findOffTracePhiSource (newPN)) { + foundOffTracePhiSource = true; + DEBUG (std::cerr << "fixupFunctionBodyBB: deleting " << newPN->getName () + << "'s off-trace source #" << i << "\n"); + newPN->removeIncomingValue (i); } + if (foundOffTracePhiSource) + newPN->addIncoming (phiLiveIn, EntryFixup); } } - + // If srcB contains a trace-exiting branch B, fix up B's clone in // dstB to point to a new basic block in F that contains a return // statement. Each return statement in F corresponds to a unique From llvm at cs.uiuc.edu Wed Jun 23 18:18:01 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Wed Jun 23 18:18:01 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/newvor.c Message-ID: <200406232317.SAA10446@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi: newvor.c updated: 1.5 -> 1.6 --- Log message: Fix use of memalign on FreeBSD. Patch contributed by Vladimir Merzliakov. Thanks! --- Diffs of the changes: (+1 -1) Index: llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/newvor.c diff -u llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/newvor.c:1.5 llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/newvor.c:1.6 --- llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/newvor.c:1.5 Tue Jun 15 13:41:12 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/Olden/voronoi/newvor.c Wed Jun 23 18:16:53 2004 @@ -160,7 +160,7 @@ void delete_all_edges() { next_edge= 0; avail_edge = NYL;} -#if defined(__POWERPC__) +#if defined(__POWERPC__) || defined(__FreeBSD__) #define MEMALIGN_IS_NOT_AVAILABLE #endif From gaeke at cs.uiuc.edu Wed Jun 23 22:21:01 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Wed Jun 23 22:21:01 2004 Subject: [llvm-commits] CVS: reopt/test/run-tests Message-ID: <200406240320.WAA20170@kain.cs.uiuc.edu> Changes in directory reopt/test: run-tests updated: 1.6 -> 1.7 --- Log message: Add olden. --- Diffs of the changes: (+1 -0) Index: reopt/test/run-tests diff -u reopt/test/run-tests:1.6 reopt/test/run-tests:1.7 --- reopt/test/run-tests:1.6 Thu Jun 17 13:13:20 2004 +++ reopt/test/run-tests Wed Jun 23 22:20:15 2004 @@ -43,6 +43,7 @@ siod) SUBDIR=MultiSource/Applications/siod ;; shootout) SUBDIR=SingleSource/Benchmarks/Shootout ;; + olden) SUBDIR=MultiSource/Benchmarks/Olden ;; ary3) SUBDIR=SingleSource/Reoptimizer/Ary3 ;; sieve) SUBDIR=SingleSource/Reoptimizer/Sieve ;; From llvm at cs.uiuc.edu Thu Jun 24 01:48:01 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Thu Jun 24 01:48:01 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/cfrac/cfrac.c Message-ID: <200406240647.BAA14592@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/MallocBench/cfrac: cfrac.c updated: 1.1 -> 1.2 --- Log message: Rename the logf() function so it doesn't conflict with logf(3) on FreeBSD. Patch submitted by Vladimir Merzilakov. Thanks, Vladimir! --- Diffs of the changes: (+2 -2) Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/cfrac/cfrac.c diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/cfrac/cfrac.c:1.1 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/cfrac/cfrac.c:1.2 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/cfrac/cfrac.c:1.1 Thu Feb 19 15:46:32 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/cfrac/cfrac.c Thu Jun 24 01:47:29 2004 @@ -79,7 +79,7 @@ return res; } -float logf(p, n, k) +float logf_(p, n, k) precision n; unsigned p, k; { @@ -138,7 +138,7 @@ sum = 0.0; primePtr = primes; while (*primePtr <= maxpm) { - sum += logf((unsigned) *primePtr++, n, k); + sum += logf_((unsigned) *primePtr++, n, k); } sum -= log((double) k) * 0.5; if (verbose > 2) fprintf(stdout, "%u: %5.2f", k, sum); From lattner at cs.uiuc.edu Thu Jun 24 01:50:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 01:50:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Message-ID: <200406240649.BAA19568@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: IndVarSimplify.cpp updated: 1.66 -> 1.67 --- Log message: Two fixes. First, stop using the ugly shouldSubstituteIndVar method. Second, disable substitution of quadratic addrec expressions to avoid putting multiplies in loops! --- Diffs of the changes: (+7 -1) Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.66 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.67 --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.66 Sun Jun 20 00:04:01 2004 +++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Thu Jun 24 01:49:18 2004 @@ -602,7 +602,13 @@ if (PN->getType()->isInteger()) { // FIXME: when we have fast-math, enable! SCEVHandle SCEV = SE->getSCEV(PN); if (SCEV->hasComputableLoopEvolution(L)) - if (SE->shouldSubstituteIndVar(SCEV)) // HACK! + // FIXME: Without a strength reduction pass, it is an extremely bad idea + // to indvar substitute anything more complex than a linear induction + // variable. Doing so will put expensive multiply instructions inside + // of the loop. For now just disable indvar subst on anything more + // complex than a linear addrec. + if (!isa(SCEV) || + cast(SCEV)->getNumOperands() < 3) IndVars.push_back(std::make_pair(PN, SCEV)); } From lattner at cs.uiuc.edu Thu Jun 24 01:52:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 01:52:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp Message-ID: <200406240651.BAA20925@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: ScalarEvolution.cpp updated: 1.21 -> 1.22 --- Log message: Remove distasteful method which is really part of the indvars pass --- Diffs of the changes: (+0 -13) Index: llvm/lib/Analysis/ScalarEvolution.cpp diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.21 llvm/lib/Analysis/ScalarEvolution.cpp:1.22 --- llvm/lib/Analysis/ScalarEvolution.cpp:1.21 Sun Jun 20 15:32:16 2004 +++ llvm/lib/Analysis/ScalarEvolution.cpp Thu Jun 24 01:51:27 2004 @@ -2177,19 +2177,6 @@ return ((ScalarEvolutionsImpl*)Impl)->deleteInstructionFromRecords(I); } - -/// shouldSubstituteIndVar - Return true if we should perform induction variable -/// substitution for this variable. This is a hack because we don't have a -/// strength reduction pass yet. When we do we will promote all vars, because -/// we can strength reduce them later as desired. -bool ScalarEvolution::shouldSubstituteIndVar(const SCEV *S) const { - // Don't substitute high degree polynomials. - if (const SCEVAddRecExpr *AddRec = dyn_cast(S)) - if (AddRec->getNumOperands() > 3) return false; - return true; -} - - static void PrintLoopInfo(std::ostream &OS, const ScalarEvolution *SE, const Loop *L) { // Print all inner loops first From lattner at cs.uiuc.edu Thu Jun 24 01:53:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 01:53:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/ScalarEvolution.h Message-ID: <200406240652.BAA21573@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: ScalarEvolution.h updated: 1.5 -> 1.6 --- Log message: Remove distasteful method which is really part of the indvars pass --- Diffs of the changes: (+0 -6) Index: llvm/include/llvm/Analysis/ScalarEvolution.h diff -u llvm/include/llvm/Analysis/ScalarEvolution.h:1.5 llvm/include/llvm/Analysis/ScalarEvolution.h:1.6 --- llvm/include/llvm/Analysis/ScalarEvolution.h:1.5 Fri Apr 23 16:28:25 2004 +++ llvm/include/llvm/Analysis/ScalarEvolution.h Thu Jun 24 01:52:20 2004 @@ -199,12 +199,6 @@ /// that no dangling references are left around. void deleteInstructionFromRecords(Instruction *I) const; - /// shouldSubstituteIndVar - Return true if we should perform induction - /// variable substitution for this variable. This is a hack because we - /// don't have a strength reduction pass yet. When we do we will promote - /// all vars, because we can strength reduce them later as desired. - bool shouldSubstituteIndVar(const SCEV *S) const; - virtual bool runOnFunction(Function &F); virtual void releaseMemory(); virtual void getAnalysisUsage(AnalysisUsage &AU) const; From lattner at cs.uiuc.edu Thu Jun 24 13:21:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 13:21:01 2004 Subject: [llvm-commits] CVS: llvm/Makefile Message-ID: <200406241819.NAA09106@zion.cs.uiuc.edu> Changes in directory llvm: Makefile updated: 1.26 -> 1.27 --- Log message: etags isn't portable at all. Make it not run by default. If you still want it, just type 'make tags' --- Diffs of the changes: (+1 -1) Index: llvm/Makefile diff -u llvm/Makefile:1.26 llvm/Makefile:1.27 --- llvm/Makefile:1.26 Thu Jun 10 22:10:27 2004 +++ llvm/Makefile Thu Jun 24 13:19:42 2004 @@ -45,7 +45,7 @@ TAGS: tags -all:: tags +all:: tags: find $(wildcard $(SourceDir)/include $(SourceDir)/lib $(SourceDir)/tools) -name '*.cpp' -o -name '*.h' | $(ETAGS) $(ETAGSFLAGS) - From vadve at cs.uiuc.edu Thu Jun 24 15:17:01 2004 From: vadve at cs.uiuc.edu (Vikram Adve) Date: Thu Jun 24 15:17:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp Message-ID: <200406242016.PAA18709@psmith.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Instrumentation: TraceBasicBlocks.cpp (r1.2) removed --- Log message: This file is unused, and duplicates functionality in TraceValues.cpp. --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Thu Jun 24 15:54:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 15:54:01 2004 Subject: [llvm-commits] CVS: llvm/docs/TestingGuide.html Message-ID: <200406242053.PAA11876@zion.cs.uiuc.edu> Changes in directory llvm/docs: TestingGuide.html updated: 1.10 -> 1.11 --- Log message: Add a section about running the nightly tester proper. --- Diffs of the changes: (+33 -1) Index: llvm/docs/TestingGuide.html diff -u llvm/docs/TestingGuide.html:1.10 llvm/docs/TestingGuide.html:1.11 --- llvm/docs/TestingGuide.html:1.10 Tue Jun 22 14:06:49 2004 +++ llvm/docs/TestingGuide.html Thu Jun 24 15:53:09 2004 @@ -24,6 +24,7 @@
                8. QMTest Structure
                9. Programs Structure
                10. Running the LLVM Tests
                11. +
                12. Running the nightly tester
                @@ -368,6 +369,37 @@ only warnings and other miscellaneous output will be generated. If a test fails, a large <program> FAILED message will be displayed. This will help you separate benign warnings from actual test failures.

                + +
                + + + + + +
                + +

                +The LLVM Nightly Testers +automatically check out an LLVM tree, build it, run the "nightly" +program test (described above) and all of the regression tests, then +delete the checked out tree. This tester is designed to ensure that +programs don't break as well as keep track of LLVM's progress over time.

                + +

                +If you'd like to set up an instance of the nightly tester to run on your +machine, take a look at the comments at the top of the utils/NightlyTester.pl +file. We usually run it from a crontab entry that looks ilke this: +

                + +
                +5 3 * * *       LLVM_LIB_SEARCH_PATH=.../llvm-gcc/bytecode-libs $HOME/llvm/utils/NightlyTest.pl -parallel -enable-linscan ...CVSREPOSTRING... $HOME/buildtest-X86 $HOME/cvs/testresults-X86
                +
                + +

                +Take a look at the NightlyTest.pl file to see what all of the flags and +strings do. If you start running the nightly tests, please let us know and +we'll link your page to the global tester page. Thanks! +

                @@ -382,7 +414,7 @@ John T. Criswell
                The LLVM Compiler Infrastructure
                - Last modified: $Date: 2004/06/22 19:06:49 $ + Last modified: $Date: 2004/06/24 20:53:09 $ From brukman at cs.uiuc.edu Thu Jun 24 16:32:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Jun 24 16:32:01 2004 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp Message-ID: <200406242131.QAA12179@zion.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: LiveVariables.cpp updated: 1.32 -> 1.33 --- Log message: Convert tabs to spaces. --- Diffs of the changes: (+44 -45) Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.32 llvm/lib/CodeGen/LiveVariables.cpp:1.33 --- llvm/lib/CodeGen/LiveVariables.cpp:1.32 Wed Jun 2 00:57:12 2004 +++ llvm/lib/CodeGen/LiveVariables.cpp Thu Jun 24 16:31:16 2004 @@ -69,7 +69,7 @@ void LiveVariables::MarkVirtRegAliveInBlock(VarInfo &VRInfo, - MachineBasicBlock *MBB) { + MachineBasicBlock *MBB) { unsigned BBNum = getMachineBasicBlockIndex(MBB); // Check to see if this basic block is one of the killing blocks. If so, @@ -97,7 +97,7 @@ } void LiveVariables::HandleVirtRegUse(VarInfo &VRInfo, MachineBasicBlock *MBB, - MachineInstr *MI) { + MachineInstr *MI) { // Check to see if this basic block is already a kill block... if (!VRInfo.Kills.empty() && VRInfo.Kills.back().first == MBB) { // Yes, this register is killed in this basic block already. Increase the @@ -151,7 +151,7 @@ if (PhysRegUsed[Alias]) RegistersKilled.insert(std::make_pair(LastUse, Alias)); else - RegistersDead.insert(std::make_pair(LastUse, Alias)); + RegistersDead.insert(std::make_pair(LastUse, Alias)); } PhysRegInfo[Alias] = MI; PhysRegUsed[Alias] = false; @@ -208,7 +208,7 @@ // Loop over all of the instructions, processing them. for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end(); - I != E; ++I) { + I != E; ++I) { MachineInstr *MI = I; const TargetInstrDescriptor &MID = TII.get(MI->getOpcode()); @@ -218,24 +218,24 @@ // Unless it is a PHI node. In this case, ONLY process the DEF, not any // of the uses. They will be handled in other basic blocks. if (MI->getOpcode() == TargetInstrInfo::PHI) - NumOperandsToProcess = 1; + NumOperandsToProcess = 1; // Loop over implicit uses, using them. for (const unsigned *ImplicitUses = MID.ImplicitUses; *ImplicitUses; ++ImplicitUses) - HandlePhysRegUse(*ImplicitUses, MI); + HandlePhysRegUse(*ImplicitUses, MI); // Process all explicit uses... for (unsigned i = 0; i != NumOperandsToProcess; ++i) { - MachineOperand &MO = MI->getOperand(i); - if (MO.isUse() && MO.isRegister() && MO.getReg()) { - if (MRegisterInfo::isVirtualRegister(MO.getReg())){ - HandleVirtRegUse(getVarInfo(MO.getReg()), MBB, MI); - } else if (MRegisterInfo::isPhysicalRegister(MO.getReg()) && + MachineOperand &MO = MI->getOperand(i); + if (MO.isUse() && MO.isRegister() && MO.getReg()) { + if (MRegisterInfo::isVirtualRegister(MO.getReg())){ + HandleVirtRegUse(getVarInfo(MO.getReg()), MBB, MI); + } else if (MRegisterInfo::isPhysicalRegister(MO.getReg()) && AllocatablePhysicalRegisters[MO.getReg()]) { - HandlePhysRegUse(MO.getReg(), MI); - } - } + HandlePhysRegUse(MO.getReg(), MI); + } + } } // Loop over implicit defs, defining them. @@ -245,20 +245,20 @@ // Process all explicit defs... for (unsigned i = 0; i != NumOperandsToProcess; ++i) { - MachineOperand &MO = MI->getOperand(i); - if (MO.isDef() && MO.isRegister() && MO.getReg()) { - if (MRegisterInfo::isVirtualRegister(MO.getReg())) { - VarInfo &VRInfo = getVarInfo(MO.getReg()); - - assert(VRInfo.DefBlock == 0 && "Variable multiply defined!"); - VRInfo.DefBlock = MBB; // Created here... - VRInfo.DefInst = MI; - VRInfo.Kills.push_back(std::make_pair(MBB, MI)); // Defaults to dead - } else if (MRegisterInfo::isPhysicalRegister(MO.getReg()) && + MachineOperand &MO = MI->getOperand(i); + if (MO.isDef() && MO.isRegister() && MO.getReg()) { + if (MRegisterInfo::isVirtualRegister(MO.getReg())) { + VarInfo &VRInfo = getVarInfo(MO.getReg()); + + assert(VRInfo.DefBlock == 0 && "Variable multiply defined!"); + VRInfo.DefBlock = MBB; // Created here... + VRInfo.DefInst = MI; + VRInfo.Kills.push_back(std::make_pair(MBB, MI)); // Defaults to dead + } else if (MRegisterInfo::isPhysicalRegister(MO.getReg()) && AllocatablePhysicalRegisters[MO.getReg()]) { - HandlePhysRegDef(MO.getReg(), MI); - } - } + HandlePhysRegDef(MO.getReg(), MI); + } + } } } @@ -272,20 +272,20 @@ // PHI nodes are guaranteed to be at the top of the block... for (MachineBasicBlock::iterator MI = Succ->begin(), ME = Succ->end(); - MI != ME && MI->getOpcode() == TargetInstrInfo::PHI; ++MI) { - for (unsigned i = 1; ; i += 2) { + MI != ME && MI->getOpcode() == TargetInstrInfo::PHI; ++MI) { + for (unsigned i = 1; ; i += 2) { assert(MI->getNumOperands() > i+1 && "Didn't find an entry for our predecessor??"); - if (MI->getOperand(i+1).getMachineBasicBlock() == MBB) { - MachineOperand &MO = MI->getOperand(i); - if (!MO.getVRegValueOrNull()) { - VarInfo &VRInfo = getVarInfo(MO.getReg()); - - // Only mark it alive only in the block we are representing... - MarkVirtRegAliveInBlock(VRInfo, MBB); - break; // Found the PHI entry for this block... - } - } + if (MI->getOperand(i+1).getMachineBasicBlock() == MBB) { + MachineOperand &MO = MI->getOperand(i); + if (!MO.getVRegValueOrNull()) { + VarInfo &VRInfo = getVarInfo(MO.getReg()); + + // Only mark it alive only in the block we are representing... + MarkVirtRegAliveInBlock(VRInfo, MBB); + break; // Found the PHI entry for this block... + } + } } } } @@ -294,7 +294,7 @@ // end of the basic block. This also resets the PhysRegInfo map. for (unsigned i = 0, e = RegInfo->getNumRegs(); i != e; ++i) if (PhysRegInfo[i]) - HandlePhysRegDef(i, 0); + HandlePhysRegDef(i, 0); } // Convert the information we have gathered into VirtRegInfo and transform it @@ -303,12 +303,12 @@ for (unsigned i = 0, e = VirtRegInfo.size(); i != e; ++i) for (unsigned j = 0, e = VirtRegInfo[i].Kills.size(); j != e; ++j) { if (VirtRegInfo[i].Kills[j].second == VirtRegInfo[i].DefInst) - RegistersDead.insert(std::make_pair(VirtRegInfo[i].Kills[j].second, - i + MRegisterInfo::FirstVirtualRegister)); + RegistersDead.insert(std::make_pair(VirtRegInfo[i].Kills[j].second, + i + MRegisterInfo::FirstVirtualRegister)); else - RegistersKilled.insert(std::make_pair(VirtRegInfo[i].Kills[j].second, - i + MRegisterInfo::FirstVirtualRegister)); + RegistersKilled.insert(std::make_pair(VirtRegInfo[i].Kills[j].second, + i + MRegisterInfo::FirstVirtualRegister)); } return false; @@ -345,7 +345,6 @@ RegistersKilled.insert(std::make_pair(NewMI, Regs[i])); Regs.clear(); - // Move the dead information over... tie(I, E) = dead_range(OldMI); for (killed_iterator A = I; A != E; ++A) From brukman at cs.uiuc.edu Thu Jun 24 16:49:04 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Jun 24 16:49:04 2004 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp Message-ID: <200406242147.QAA12334@zion.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Verifier.cpp updated: 1.112 -> 1.113 --- Log message: * Capitalize `Java' * Sprinkle hypens liberally * Fix some grammar in comments --- Diffs of the changes: (+7 -7) Index: llvm/lib/VMCore/Verifier.cpp diff -u llvm/lib/VMCore/Verifier.cpp:1.112 llvm/lib/VMCore/Verifier.cpp:1.113 --- llvm/lib/VMCore/Verifier.cpp:1.112 Thu Jun 17 12:56:54 2004 +++ llvm/lib/VMCore/Verifier.cpp Thu Jun 24 16:47:35 2004 @@ -10,16 +10,16 @@ // This file defines the function verifier interface, that can be used for some // sanity checking of input to the system. // -// Note that this does not provide full 'java style' security and verifications, -// instead it just tries to ensure that code is well formed. +// Note that this does not provide full `Java style' security and verifications, +// instead it just tries to ensure that code is well-formed. // -// * Both of a binary operator's parameters are the same type +// * Both of a binary operator's parameters are of the same type // * Verify that the indices of mem access instructions match other operands -// * Verify that arithmetic and other things are only performed on first class +// * Verify that arithmetic and other things are only performed on first-class // types. Verify that shifts & logicals only happen on integrals f.e. -// . All of the constants in a switch statement are of the correct type +// * All of the constants in a switch statement are of the correct type // * The code is in valid SSA form -// . It should be illegal to put a label into any other type (like a structure) +// * It should be illegal to put a label into any other type (like a structure) // or to return one. [except constant arrays!] // * Only phi nodes can be self referential: 'add int %0, %0 ; :0' is bad // * PHI nodes must have an entry for each predecessor, with no extras. @@ -28,7 +28,7 @@ // * All basic blocks should only end with terminator insts, not contain them // * The entry node to a function must not have predecessors // * All Instructions must be embedded into a basic block -// . Function's cannot take a void typed parameter +// * Functions cannot take a void-typed parameter // * Verify that a function's argument list agrees with it's declared type. // * It is illegal to specify a name for a void value. // * It is illegal to have a internal global value with no initializer From lattner at cs.uiuc.edu Thu Jun 24 17:36:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 17:36:01 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/External/SPEC/CINT2000/176.gcc/Makefile Message-ID: <200406242234.RAA12746@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs/External/SPEC/CINT2000/176.gcc: Makefile updated: 1.8 -> 1.9 --- Log message: Make 176.gcc bugpoitn compatible --- Diffs of the changes: (+4 -3) Index: llvm/test/Programs/External/SPEC/CINT2000/176.gcc/Makefile diff -u llvm/test/Programs/External/SPEC/CINT2000/176.gcc/Makefile:1.8 llvm/test/Programs/External/SPEC/CINT2000/176.gcc/Makefile:1.9 --- llvm/test/Programs/External/SPEC/CINT2000/176.gcc/Makefile:1.8 Fri Apr 23 19:28:07 2004 +++ llvm/test/Programs/External/SPEC/CINT2000/176.gcc/Makefile Thu Jun 24 17:34:49 2004 @@ -1,11 +1,12 @@ LEVEL = ../../../../../.. ifeq ($(RUN_TYPE),test) -RUN_OPTIONS = cccp.i -o cccp.s +RUN_OPTIONS = cccp.i -o - -quiet +STDOUT_FILENAME = cccp.s else -RUN_OPTIONS = cp-decl.i -o cp-decl.s +RUN_OPTIONS = cp-decl.i -o - -quiet +STDOUT_FILENAME = cp-decl.s endif -STDOUT_FILENAME = cccp.out include ../../Makefile.spec2000 From llvm at cs.uiuc.edu Thu Jun 24 18:06:01 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Thu Jun 24 18:06:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Handler.h Message-ID: <200406242305.SAA12901@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bytecode: Handler.h added (r1.1) --- Log message: Definition of the Bytecode Handler interface. Subclasses can override just the methods they are interested in to perform out-of-band tasks while the BytecodeReader is constructing a module. Handlers should *not* modify any of the LLVM IR objects during this process. --- Diffs of the changes: (+291 -0) Index: llvm/include/llvm/Bytecode/Handler.h diff -c /dev/null llvm/include/llvm/Bytecode/Handler.h:1.1 *** /dev/null Thu Jun 24 18:05:17 2004 --- llvm/include/llvm/Bytecode/Handler.h Thu Jun 24 18:05:07 2004 *************** *** 0 **** --- 1,291 ---- + //===-- Handler.h - Handle Bytecode Parsing Events --------------*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This header file defines the interface to the Bytecode Handler. The handler + // is caleld by the Bytecode Reader to obtain out-of-band parsing events for + // tasks other then LLVM IR construction. + // + //===----------------------------------------------------------------------===// + + #ifndef BYTECODE_HANDLER_H + #define BYTECODE_HANDLER_H + + #include + + namespace llvm { + + class ArrayType; + class StructType; + class PointerType; + class ConstantArray; + + /// This class provides the interface for handling bytecode events during + /// reading of bytecode. The methods on this interface are invoked by the + /// BytecodeReader as it discovers the content of a bytecode stream. + /// This class provides a a clear separation of concerns between recognizing + /// the semantic units of a bytecode file (the Reader) and deciding what to do + /// with them (the Handler). + /// The BytecodeReader recognizes the content of the bytecode file and + /// calls the BytecodeHandler methods to let it perform additional tasks. This + /// arrangement allows Bytecode files to be read and handled for a number of + /// purposes simply by creating a subclass of BytecodeHandler. None of the + /// parsing details need to be understood, only the meaning of the calls + /// made on this interface. + /// + /// @see BytecodeHandler + /// @brief Handle Bytecode Parsing Events + class BytecodeHandler { + + /// @name Constructors And Operators + /// @{ + public: + /// @brief Default constructor (empty) + BytecodeHandler() {} + /// @brief Virtual destructor (empty) + virtual ~BytecodeHandler() {} + + private: + BytecodeHandler(const BytecodeHandler &); // DO NOT IMPLEMENT + void operator=(const BytecodeHandler &); // DO NOT IMPLEMENT + + /// @} + /// @name Handler Methods + /// @{ + public: + + /// This method is called whenever the parser detects an error in the + /// bytecode formatting. Returning true will cause the parser to keep + /// going, however this is inadvisable in most cases. Returning false will + /// cause the parser to throw the message as a std::string. + /// @brief Handle parsing errors. + virtual void handleError(const std::string& str ); + + /// This method is called at the beginning of a parse before anything is + /// read in order to give the handler a chance to initialize. + /// @brief Handle the start of a bytecode parse + virtual void handleStart(); + + /// This method is called at the end of a parse after everything has been + /// read in order to give the handler a chance to terminate. + /// @brief Handle the end of a bytecode parse + virtual void handleFinish(); + + /// This method is called at the start of a module to indicate that a + /// module is being parsed. + /// @brief Handle the start of a module. + virtual void handleModuleBegin(const std::string& id); + + /// This method is called at the end of a module to indicate that the module + /// previously being parsed has concluded. + /// @brief Handle the end of a module. + virtual void handleModuleEnd( + const std::string& moduleId ///< An identifier for the module + ); + + /// This method is called once the version information has been parsed. It + /// provides the information about the version of the bytecode file being + /// read. + /// @brief Handle the bytecode prolog + virtual void handleVersionInfo( + unsigned char RevisionNum, ///< Byte code revision number + Module::Endianness Endianness, ///< Endianness indicator + Module::PointerSize PointerSize ///< PointerSize indicator + ); + + /// This method is called at the start of a module globals block which + /// contains the global variables and the function placeholders + virtual void handleModuleGlobalsBegin(); + + /// This method is called when a non-initialized global variable is + /// recognized. Its type, constness, and linkage type are provided. + /// @brief Handle a non-initialized global variable + virtual void handleGlobalVariable( + const Type* ElemType, ///< The type of the global variable + bool isConstant, ///< Whether the GV is constant or not + GlobalValue::LinkageTypes,///< The linkage type of the GV + unsigned SlotNum, ///< Slot number of GV + unsigned initSlot ///< Slot number of GV's initializer (0 if none) + ); + + /// This method is called when a new type is recognized. The type is + /// converted from the bytecode and passed to this method. + /// @brief Handle a type + virtual void handleType( + const Type* Ty ///< The type that was just recognized + ); + + /// This method is called when the function prototype for a function is + /// encountered in the module globals block. + virtual void handleFunctionDeclaration( + Function* Func, ///< The function being declared + const FunctionType* FuncType ///< The type of the function + ); + + /// This method is called at the end of the module globals block. + /// @brief Handle end of module globals block. + virtual void handleModuleGlobalsEnd(); + + /// This method is called at the beginning of a compaction table. + /// @brief Handle start of compaction table. + virtual void handleCompactionTableBegin(); + + /// @brief Handle start of a compaction table plane + virtual void handleCompactionTablePlane( + unsigned Ty, ///< The type of the plane (slot number) + unsigned NumEntries ///< The number of entries in the plane + ); + + /// @brief Handle a type entry in the compaction table + virtual void handleCompactionTableType( + unsigned i, ///< Index in the plane of this type + unsigned TypSlot, ///< Slot number for this type + const Type* ///< The type referenced by this slot + ); + + /// @brief Handle a value entry in the compaction table + virtual void handleCompactionTableValue( + unsigned i, ///< Index in the compaction table's type plane + unsigned TypSlot, ///< The slot (plane) of the type of this value + unsigned ValSlot, ///< The global value slot of the value + const Type* ///< The resolved type of the value. + ); + + /// @brief Handle end of a compaction table + virtual void handleCompactionTableEnd(); + + /// @brief Handle start of a symbol table + virtual void handleSymbolTableBegin( + Function* Func, ///< The function to which the ST belongs + SymbolTable* ST ///< The symbol table being filled + ); + + /// @brief Handle start of a symbol table plane + virtual void handleSymbolTablePlane( + unsigned Ty, ///< The slotnum of the type plane + unsigned NumEntries, ///< Number of entries in the plane + const Type* Ty ///< The type of this type plane + ); + + /// @brief Handle a named type in the symbol table + virtual void handleSymbolTableType( + unsigned i, ///< The index of the type in this plane + unsigned slot, ///< Slot number of the named type + const std::string& name ///< Name of the type + ); + + /// @brief Handle a named value in the symbol table + virtual void handleSymbolTableValue( + unsigned i, ///< The index of the value in this plane + unsigned slot, ///< Slot number of the named value + const std::string& name ///< Name of the value. + ); + + /// @brief Handle the end of a symbol table + virtual void handleSymbolTableEnd(); + + /// @brief Handle the beginning of a function body + virtual void handleFunctionBegin( + Function* Func, ///< The function being defined + unsigned Size ///< The size (in bytes) of the function's bytecode + ); + + /// @brief Handle the end of a function body + virtual void handleFunctionEnd( + Function* Func ///< The function whose definition has just finished. + ); + + /// @brief Handle the beginning of a basic block + virtual void handleBasicBlockBegin( + unsigned blocknum ///< The block number of the block + ); + + /// This method is called for each instruction that is parsed. + /// @returns true if the instruction is a block terminating instruction + /// @brief Handle an instruction + virtual bool handleInstruction( + unsigned Opcode, ///< Opcode of the instruction + const Type* iType, ///< Instruction type + std::vector& Operands, ///< Vector of slot # operands + unsigned Length ///< Length of instruction in bc bytes + ); + + /// @brief Handle the end of a basic block + virtual void handleBasicBlockEnd( + unsigned blocknum ///< The block number of the block just finished + ); + + /// @brief Handle start of global constants block. + virtual void handleGlobalConstantsBegin(); + + /// @brief Handle a constant expression + virtual void handleConstantExpression( + unsigned Opcode, ///< Opcode of primary expression operator + const Type* Typ, ///< Type of the expression + std::vector > ArgVec ///< expression args + ); + + /// @brief Handle a constant array + virtual void handleConstantArray( + const ArrayType* AT, ///< Type of the array + std::vector& ElementSlots ///< Slot nums for array values + ); + + /// @brief Handle a constant structure + virtual void handleConstantStruct( + const StructType* ST, ///< Type of the struct + std::vector& ElementSlots ///< Slot nums for struct values + ); + + /// @brief Handle a constant pointer + virtual void handleConstantPointer( + const PointerType* PT, ///< Type of the pointer + unsigned Slot ///< Slot num of initializer value + ); + + /// @brief Handle a constant strings (array special case) + virtual void handleConstantString( + const ConstantArray* CA ///< Type of the string array + ); + + /// @brief Handle a primitive constant value + virtual void handleConstantValue( + Constant * c ///< The constant just defined + ); + + /// @brief Handle the end of the global constants + virtual void handleGlobalConstantsEnd(); + + /// @brief Handle an alignment event + virtual void handleAlignment( + unsigned numBytes ///< The number of bytes added for alignment + ); + + /// @brief Handle a bytecode block + virtual void handleBlock( + unsigned BType, ///< The type of block + const unsigned char* StartPtr, ///< The start of the block + unsigned Size ///< The size of the block + ); + + /// @brief Handle a variable bit rate 32 bit unsigned + virtual void handleVBR32( + unsigned Size ///< Number of bytes the vbr_uint took up + ); + + /// @brief Handle a variable bit rate 64 bit unsigned + virtual void handleVBR64( + unsigned Size ///< Number of byte sthe vbr_uint64 took up + ); + /// @} + + }; + + } + // vim: sw=2 ai + #endif From brukman at cs.uiuc.edu Thu Jun 24 18:40:02 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Thu Jun 24 18:40:02 2004 Subject: [llvm-commits] CVS: llvm/include/Support/StringExtras.h Message-ID: <200406242339.SAA13209@zion.cs.uiuc.edu> Changes in directory llvm/include/Support: StringExtras.h updated: 1.14 -> 1.15 --- Log message: Add a LowercaseString() utility function, courtesy of brg. --- Diffs of the changes: (+7 -0) Index: llvm/include/Support/StringExtras.h diff -u llvm/include/Support/StringExtras.h:1.14 llvm/include/Support/StringExtras.h:1.15 --- llvm/include/Support/StringExtras.h:1.14 Fri Jun 4 15:21:53 2004 +++ llvm/include/Support/StringExtras.h Thu Jun 24 18:38:52 2004 @@ -97,6 +97,13 @@ return Buffer; } +std::string LowercaseString (const std::string &S) { + std::string result (S); + for (unsigned i = 0; i < S.length(); ++i) + if (isupper (result[i])) + result[i] = tolower(result[i]); + return result; +} /// getToken - This function extracts one token from source, ignoring any /// leading characters that appear in the Delimiters string, and ending the From lattner at cs.uiuc.edu Thu Jun 24 19:12:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 19:12:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/WriterPrimitives.h Message-ID: <200406250011.TAA13589@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: WriterPrimitives.h updated: 1.4 -> 1.5 --- Log message: fix warnings --- Diffs of the changes: (+2 -2) Index: llvm/lib/Bytecode/Writer/WriterPrimitives.h diff -u llvm/lib/Bytecode/Writer/WriterPrimitives.h:1.4 llvm/lib/Bytecode/Writer/WriterPrimitives.h:1.5 --- llvm/lib/Bytecode/Writer/WriterPrimitives.h:1.4 Thu Jan 15 00:11:30 2004 +++ llvm/lib/Bytecode/Writer/WriterPrimitives.h Thu Jun 24 19:11:25 2004 @@ -62,7 +62,7 @@ // Nope, we are bigger than a character, output the next 7 bits and set the // high bit to say that there is more coming... - out.push_back(0x80 | (i & 0x7F)); + out.push_back(0x80 | ((unsigned char)i & 0x7F)); i >>= 7; // Shift out 7 bits now... } } @@ -76,7 +76,7 @@ // Nope, we are bigger than a character, output the next 7 bits and set the // high bit to say that there is more coming... - out.push_back(0x80 | (i & 0x7F)); + out.push_back(0x80 | ((unsigned char)i & 0x7F)); i >>= 7; // Shift out 7 bits now... } } From tbrethou at niobe.cs.uiuc.edu Thu Jun 24 19:14:01 2004 From: tbrethou at niobe.cs.uiuc.edu (Tanya Brethour) Date: Thu Jun 24 19:14:01 2004 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineInstr.cpp MachineBasicBlock.cpp LiveIntervals.cpp VirtRegMap.cpp TwoAddressInstructionPass.cpp RegAllocSimple.cpp Message-ID: <200406250013.i5P0DNn17128@niobe.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineInstr.cpp updated: 1.101 -> 1.102 MachineBasicBlock.cpp updated: 1.15 -> 1.16 LiveIntervals.cpp updated: 1.78 -> 1.79 VirtRegMap.cpp updated: 1.13 -> 1.14 TwoAddressInstructionPass.cpp updated: 1.19 -> 1.20 RegAllocSimple.cpp updated: 1.56 -> 1.57 --- Log message: Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function. --- Diffs of the changes: (+32 -19) Index: llvm/lib/CodeGen/MachineInstr.cpp diff -u llvm/lib/CodeGen/MachineInstr.cpp:1.101 llvm/lib/CodeGen/MachineInstr.cpp:1.102 --- llvm/lib/CodeGen/MachineInstr.cpp:1.101 Thu Jun 17 17:26:53 2004 +++ llvm/lib/CodeGen/MachineInstr.cpp Thu Jun 24 19:13:11 2004 @@ -235,8 +235,14 @@ } static void print(const MachineOperand &MO, std::ostream &OS, - const TargetMachine &TM) { - const MRegisterInfo *MRI = TM.getRegisterInfo(); + const TargetMachine *TM) { + + const MRegisterInfo *MRI = 0; + + if(TM) + MRI = TM->getRegisterInfo(); + + bool CloseParen = true; if (MO.isHiBits32()) OS << "%lm("; @@ -313,7 +319,7 @@ OS << ")"; } -void MachineInstr::print(std::ostream &OS, const TargetMachine &TM) const { +void MachineInstr::print(std::ostream &OS, const TargetMachine *TM) const { unsigned StartOp = 0; // Specialize printing if op#0 is definition @@ -322,7 +328,11 @@ OS << " = "; ++StartOp; // Don't print this operand again! } - OS << TM.getInstrInfo()->getName(getOpcode()); + + //Must check if Target machine is not null because machine BB could not + //be attached to a Machine function yet + if(TM) + OS << TM->getInstrInfo()->getName(getOpcode()); for (unsigned i = StartOp, e = getNumOperands(); i != e; ++i) { const MachineOperand& mop = getOperand(i); @@ -361,7 +371,10 @@ // info for the instruction. if (const MachineBasicBlock *MBB = MI.getParent()) { const MachineFunction *MF = MBB->getParent(); - MI.print(os, MF->getTarget()); + if(MF) + MI.print(os, &MF->getTarget()); + else + MI.print(os, 0); return os; } Index: llvm/lib/CodeGen/MachineBasicBlock.cpp diff -u llvm/lib/CodeGen/MachineBasicBlock.cpp:1.15 llvm/lib/CodeGen/MachineBasicBlock.cpp:1.16 --- llvm/lib/CodeGen/MachineBasicBlock.cpp:1.15 Thu Jun 17 17:26:53 2004 +++ llvm/lib/CodeGen/MachineBasicBlock.cpp Thu Jun 24 19:13:11 2004 @@ -105,6 +105,6 @@ << ", LLVM BB @" << (const void*) LBB << "):\n"; for (const_iterator I = begin(); I != end(); ++I) { OS << "\t"; - I->print(OS, getParent()->getTarget()); + I->print(OS, &getParent()->getTarget()); } } Index: llvm/lib/CodeGen/LiveIntervals.cpp diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.78 llvm/lib/CodeGen/LiveIntervals.cpp:1.79 --- llvm/lib/CodeGen/LiveIntervals.cpp:1.78 Mon Jun 21 08:10:56 2004 +++ llvm/lib/CodeGen/LiveIntervals.cpp Thu Jun 24 19:13:11 2004 @@ -179,7 +179,7 @@ for (MachineBasicBlock::iterator mii = mbbi->begin(), mie = mbbi->end(); mii != mie; ++mii) { std::cerr << getInstructionIndex(mii) << '\t'; - mii->print(std::cerr, *tm_); + mii->print(std::cerr, tm_); } }); @@ -427,7 +427,7 @@ const TargetInstrDescriptor& tid = tm_->getInstrInfo()->get(mi->getOpcode()); DEBUG(std::cerr << getInstructionIndex(mi) << "\t"; - mi->print(std::cerr, *tm_)); + mi->print(std::cerr, tm_)); // handle implicit defs for (const unsigned* id = tid.ImplicitDefs; *id; ++id) @@ -467,7 +467,7 @@ mi != mie; ++mi) { const TargetInstrDescriptor& tid = tii.get(mi->getOpcode()); DEBUG(std::cerr << getInstructionIndex(mi) << '\t'; - mi->print(std::cerr, *tm_);); + mi->print(std::cerr, tm_);); // we only join virtual registers with allocatable // physical registers since we do not have liveness information Index: llvm/lib/CodeGen/VirtRegMap.cpp diff -u llvm/lib/CodeGen/VirtRegMap.cpp:1.13 llvm/lib/CodeGen/VirtRegMap.cpp:1.14 --- llvm/lib/CodeGen/VirtRegMap.cpp:1.13 Wed Jun 2 00:57:12 2004 +++ llvm/lib/CodeGen/VirtRegMap.cpp Thu Jun 24 19:13:11 2004 @@ -149,7 +149,7 @@ mf.getSSARegMap()->getRegClass(virtReg)); loaded[virtReg] = true; DEBUG(std::cerr << '\t'; - prior(mii)->print(std::cerr, tm)); + prior(mii)->print(std::cerr, &tm)); ++numLoads; } if (mop.isDef() && @@ -165,7 +165,7 @@ mii->SetMachineOperandReg(i, physReg); } } - DEBUG(std::cerr << '\t'; mii->print(std::cerr, tm)); + DEBUG(std::cerr << '\t'; mii->print(std::cerr, &tm)); loaded.clear(); } } @@ -231,9 +231,9 @@ mri_->getRegClass(physReg)); ++numStores; DEBUG(std::cerr << "added: "; - prior(nextLastRef)->print(std::cerr, *tm_); + prior(nextLastRef)->print(std::cerr, tm_); std::cerr << "after: "; - lastDef->print(std::cerr, *tm_)); + lastDef->print(std::cerr, tm_)); lastDef_[virtReg] = 0; } p2vMap_[physReg] = 0; @@ -263,7 +263,7 @@ mri_->getRegClass(physReg)); ++numLoads; DEBUG(std::cerr << "added: "; - prior(mii)->print(std::cerr, *tm_)); + prior(mii)->print(std::cerr, tm_)); lastDef_[virtReg] = mii; } } @@ -339,7 +339,7 @@ } } - DEBUG(std::cerr << '\t'; mii->print(std::cerr, *tm_)); + DEBUG(std::cerr << '\t'; mii->print(std::cerr, tm_)); } for (unsigned i = 1, e = p2vMap_.size(); i != e; ++i) Index: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp diff -u llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.19 llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.20 --- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.19 Wed Jun 2 00:57:12 2004 +++ llvm/lib/CodeGen/TwoAddressInstructionPass.cpp Thu Jun 24 19:13:11 2004 @@ -98,7 +98,7 @@ ++numTwoAddressInstrs; - DEBUG(std::cerr << '\t'; mi->print(std::cerr, TM)); + DEBUG(std::cerr << '\t'; mi->print(std::cerr, &TM)); assert(mi->getOperand(1).isRegister() && mi->getOperand(1).getReg() && @@ -140,7 +140,7 @@ MachineBasicBlock::iterator prevMi = prior(mi); DEBUG(std::cerr << "\t\tprepend:\t"; - prevMi->print(std::cerr, TM)); + prevMi->print(std::cerr, &TM)); if (LV) { // update live variables for regA @@ -170,7 +170,7 @@ mi->RemoveOperand(1); DEBUG(std::cerr << "\t\trewrite to:\t"; - mi->print(std::cerr, TM)); + mi->print(std::cerr, &TM)); } } Index: llvm/lib/CodeGen/RegAllocSimple.cpp diff -u llvm/lib/CodeGen/RegAllocSimple.cpp:1.56 llvm/lib/CodeGen/RegAllocSimple.cpp:1.57 --- llvm/lib/CodeGen/RegAllocSimple.cpp:1.56 Wed Jun 2 00:57:12 2004 +++ llvm/lib/CodeGen/RegAllocSimple.cpp Thu Jun 24 19:13:11 2004 @@ -177,7 +177,7 @@ unsigned virtualReg = (unsigned) op.getReg(); DEBUG(std::cerr << "op: " << op << "\n"); DEBUG(std::cerr << "\t inst[" << i << "]: "; - MI->print(std::cerr, *TM)); + MI->print(std::cerr, TM)); // make sure the same virtual register maps to the same physical // register in any given instruction From tbrethou at niobe.cs.uiuc.edu Thu Jun 24 19:14:06 2004 From: tbrethou at niobe.cs.uiuc.edu (Tanya Brethour) Date: Thu Jun 24 19:14:06 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/X86/FloatingPoint.cpp Printer.cpp Message-ID: <200406250013.i5P0DNs17115@niobe.cs.uiuc.edu> Changes in directory llvm/lib/Target/X86: FloatingPoint.cpp updated: 1.37 -> 1.38 Printer.cpp updated: 1.100 -> 1.101 --- Log message: Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function. --- Diffs of the changes: (+3 -3) Index: llvm/lib/Target/X86/FloatingPoint.cpp diff -u llvm/lib/Target/X86/FloatingPoint.cpp:1.37 llvm/lib/Target/X86/FloatingPoint.cpp:1.38 --- llvm/lib/Target/X86/FloatingPoint.cpp:1.37 Fri Jun 11 00:22:44 2004 +++ llvm/lib/Target/X86/FloatingPoint.cpp Thu Jun 24 19:13:11 2004 @@ -194,7 +194,7 @@ ++NumFP; // Keep track of # of pseudo instrs DEBUG(std::cerr << "\nFPInst:\t"; - MI->print(std::cerr, MF.getTarget())); + MI->print(std::cerr, &(MF.getTarget()))); // Get dead variables list now because the MI pointer may be deleted as part // of processing! @@ -242,7 +242,7 @@ // Rewind to first instruction newly inserted. while (Start != BB.begin() && prior(Start) != PrevI) --Start; std::cerr << "Inserted instructions:\n\t"; - Start->print(std::cerr, MF.getTarget()); + Start->print(std::cerr, &MF.getTarget()); while (++Start != next(I)); } dumpStack(); Index: llvm/lib/Target/X86/Printer.cpp diff -u llvm/lib/Target/X86/Printer.cpp:1.100 llvm/lib/Target/X86/Printer.cpp:1.101 --- llvm/lib/Target/X86/Printer.cpp:1.100 Thu Jun 17 13:17:24 2004 +++ llvm/lib/Target/X86/Printer.cpp Thu Jun 24 19:13:11 2004 @@ -936,7 +936,7 @@ return; } default: - O << "\tUNKNOWN FORM:\t\t-"; MI->print(O, TM); break; + O << "\tUNKNOWN FORM:\t\t-"; MI->print(O, &TM); break; } } From tbrethou at niobe.cs.uiuc.edu Thu Jun 24 19:14:12 2004 From: tbrethou at niobe.cs.uiuc.edu (Tanya Brethour) Date: Thu Jun 24 19:14:12 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineInstr.h Message-ID: <200406250013.i5P0DHV17098@niobe.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineInstr.h updated: 1.149 -> 1.150 --- Log message: Made a fix so that you can print out MachineInstrs that belong to a MachineBasicBlock that is not yet attached to a MachineFunction. This change includes changing the third operand (TargetMachine) to a pointer for the MachineInstr::print function. --- Diffs of the changes: (+8 -2) Index: llvm/include/llvm/CodeGen/MachineInstr.h diff -u llvm/include/llvm/CodeGen/MachineInstr.h:1.149 llvm/include/llvm/CodeGen/MachineInstr.h:1.150 --- llvm/include/llvm/CodeGen/MachineInstr.h:1.149 Sun May 23 22:14:18 2004 +++ llvm/include/llvm/CodeGen/MachineInstr.h Thu Jun 24 19:13:06 2004 @@ -308,7 +308,13 @@ // code.' It's not clear where the duplication is. assert(hasAllocatedReg() && "This operand cannot have a register number!"); regNum = Reg; - } + } + + void setValueReg(Value *val) { + assert(getVRegValueOrNull() != 0 && "Original operand must of type Value*"); + contents.value = val; + } + void setImmedValue(int immVal) { assert(isImmediate() && "Wrong MachineOperand mutator"); contents.immedVal = immVal; @@ -465,7 +471,7 @@ // // Debugging support // - void print(std::ostream &OS, const TargetMachine &TM) const; + void print(std::ostream &OS, const TargetMachine *TM) const; void dump() const; friend std::ostream& operator<<(std::ostream& os, const MachineInstr& minstr); From lattner at cs.uiuc.edu Thu Jun 24 19:19:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 19:19:01 2004 Subject: [llvm-commits] CVS: llvm/include/Support/StringExtras.h Message-ID: <200406250018.TAA14714@zion.cs.uiuc.edu> Changes in directory llvm/include/Support: StringExtras.h updated: 1.15 -> 1.16 --- Log message: Unbreak the build. tsk tsk --- Diffs of the changes: (+1 -1) Index: llvm/include/Support/StringExtras.h diff -u llvm/include/Support/StringExtras.h:1.15 llvm/include/Support/StringExtras.h:1.16 --- llvm/include/Support/StringExtras.h:1.15 Thu Jun 24 18:38:52 2004 +++ llvm/include/Support/StringExtras.h Thu Jun 24 19:18:02 2004 @@ -97,7 +97,7 @@ return Buffer; } -std::string LowercaseString (const std::string &S) { +static inline std::string LowercaseString (const std::string &S) { std::string result (S); for (unsigned i = 0; i < S.length(); ++i) if (isupper (result[i])) From lattner at cs.uiuc.edu Thu Jun 24 19:37:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 19:37:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/SlotCalculator.cpp Writer.cpp Message-ID: <200406250036.TAA30407@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: SlotCalculator.cpp updated: 1.56 -> 1.57 Writer.cpp updated: 1.65 -> 1.66 --- Log message: Fix more warnings building with VC++ --- Diffs of the changes: (+3 -4) Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.56 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.57 --- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.56 Thu Jun 17 13:17:59 2004 +++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp Thu Jun 24 19:35:55 2004 @@ -717,7 +717,8 @@ // If we haven't seen this sub type before, add it to our type table! if (getSlot(SubTy) == -1) { SC_DEBUG(" Inserting subtype: " << SubTy->getDescription() << "\n"); - int Slot = doInsertValue(SubTy); + SC_DEBUG(int Slot = ); + doInsertValue(SubTy); SC_DEBUG(" Inserted subtype: " << SubTy->getDescription() << " slot=" << Slot << "\n"); } Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.65 llvm/lib/Bytecode/Writer/Writer.cpp:1.66 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.65 Thu May 27 15:18:51 2004 +++ llvm/lib/Bytecode/Writer/Writer.cpp Thu Jun 24 19:35:55 2004 @@ -340,8 +340,6 @@ for (; I != End; ++I) { // Symtab entry: [def slot #][name] - const Value *V = I->second; - Slot = Table.getSlot(I->second); assert(Slot != -1 && "Value in symtab but has no slot number!!"); output_vbr((unsigned)Slot, Out); @@ -380,7 +378,7 @@ } // Write out the chunk... - Out.write((char*)ChunkPtr, LastPtr-ChunkPtr); + Out.write((char*)ChunkPtr, unsigned(LastPtr-ChunkPtr)); } Out.flush(); From lattner at cs.uiuc.edu Thu Jun 24 19:43:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 19:43:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Bytecode/Writer.h Message-ID: <200406250042.TAA30445@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bytecode: Writer.h updated: 1.5 -> 1.6 --- Log message: Okay, Module have not been known as 'C' for a LONG time now --- Diffs of the changes: (+2 -4) Index: llvm/include/llvm/Bytecode/Writer.h diff -u llvm/include/llvm/Bytecode/Writer.h:1.5 llvm/include/llvm/Bytecode/Writer.h:1.6 --- llvm/include/llvm/Bytecode/Writer.h:1.5 Tue Nov 11 16:41:31 2003 +++ llvm/include/llvm/Bytecode/Writer.h Thu Jun 24 19:42:23 2004 @@ -27,10 +27,8 @@ #include namespace llvm { - -class Module; -void WriteBytecodeToFile(const Module *C, std::ostream &Out); - + class Module; + void WriteBytecodeToFile(const Module *M, std::ostream &Out); } // End llvm namespace #endif From llvm at cs.uiuc.edu Thu Jun 24 21:34:03 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Thu Jun 24 21:34:03 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Bytecode/BytecodeHandler.h Handler.h Message-ID: <200406250232.VAA30916@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/Bytecode: BytecodeHandler.h added (r1.1) Handler.h (r1.1) removed --- Log message: - Changed Handler.h -> BytecodeHandler.h - Fixed some small coding standard compliance issues in BytecodeHandler.h --- Diffs of the changes: (+291 -0) Index: llvm/include/llvm/Bytecode/BytecodeHandler.h diff -c /dev/null llvm/include/llvm/Bytecode/BytecodeHandler.h:1.1 *** /dev/null Thu Jun 24 21:32:37 2004 --- llvm/include/llvm/Bytecode/BytecodeHandler.h Thu Jun 24 21:32:27 2004 *************** *** 0 **** --- 1,291 ---- + //===-- BytecodeHandler.h - Handle Bytecode Parsing Events ------*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by Reid Spencer and is distributed under the + // University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This header file defines the interface to the Bytecode Handler. The handler + // is called by the Bytecode Reader to obtain out-of-band parsing events for + // tasks other then LLVM IR construction. + // + //===----------------------------------------------------------------------===// + + #ifndef BYTECODE_BYTECODEHANDLER_H + #define BYTECODE_BYTECODEHANDLER_H + + #include "llvm/Module.h" + + namespace llvm { + + class ArrayType; + class StructType; + class PointerType; + class ConstantArray; + + /// This class provides the interface for handling bytecode events during + /// reading of bytecode. The methods on this interface are invoked by the + /// BytecodeReader as it discovers the content of a bytecode stream. + /// This class provides a a clear separation of concerns between recognizing + /// the semantic units of a bytecode file (the Reader) and deciding what to do + /// with them (the Handler). + /// + /// The BytecodeReader recognizes the content of the bytecode file and + /// calls the BytecodeHandler methods to let it perform additional tasks. This + /// arrangement allows Bytecode files to be read and handled for a number of + /// purposes simply by creating a subclass of BytecodeHandler. None of the + /// parsing details need to be understood, only the meaning of the calls + /// made on this interface. + /// + /// @see BytecodeHandler + /// @brief Handle Bytecode Parsing Events + class BytecodeHandler { + + /// @name Constructors And Operators + /// @{ + public: + /// @brief Default constructor (empty) + BytecodeHandler() {} + /// @brief Virtual destructor (empty) + virtual ~BytecodeHandler(); + + private: + BytecodeHandler(const BytecodeHandler &); // DO NOT IMPLEMENT + void operator=(const BytecodeHandler &); // DO NOT IMPLEMENT + + /// @} + /// @name Handler Methods + /// @{ + public: + + /// This method is called whenever the parser detects an error in the + /// bytecode formatting. It gives the handler a chance to do something + /// with the error message before the parser throws an exception to + /// terminate the parsing. + /// @brief Handle parsing errors. + virtual void handleError(const std::string& str ); + + /// This method is called at the beginning of a parse before anything is + /// read in order to give the handler a chance to initialize. + /// @brief Handle the start of a bytecode parse + virtual void handleStart( unsigned byteSize ); + + /// This method is called at the end of a parse after everything has been + /// read in order to give the handler a chance to terminate. + /// @brief Handle the end of a bytecode parse + virtual void handleFinish(); + + /// This method is called at the start of a module to indicate that a + /// module is being parsed. + /// @brief Handle the start of a module. + virtual void handleModuleBegin(const std::string& moduleId); + + /// This method is called at the end of a module to indicate that the module + /// previously being parsed has concluded. + /// @brief Handle the end of a module. + virtual void handleModuleEnd( + const std::string& moduleId ///< An identifier for the module + ); + + /// This method is called once the version information has been parsed. It + /// provides the information about the version of the bytecode file being + /// read. + /// @brief Handle the bytecode prolog + virtual void handleVersionInfo( + unsigned char RevisionNum, ///< Byte code revision number + Module::Endianness Endianness, ///< Endianness indicator + Module::PointerSize PointerSize ///< PointerSize indicator + ); + + /// This method is called at the start of a module globals block which + /// contains the global variables and the function placeholders + virtual void handleModuleGlobalsBegin(); + + /// This method is called when a non-initialized global variable is + /// recognized. Its type, constness, and linkage type are provided. + /// @brief Handle a non-initialized global variable + virtual void handleGlobalVariable( + const Type* ElemType, ///< The type of the global variable + bool isConstant, ///< Whether the GV is constant or not + GlobalValue::LinkageTypes,///< The linkage type of the GV + unsigned SlotNum, ///< Slot number of GV + unsigned initSlot ///< Slot number of GV's initializer (0 if none) + ); + + /// This method is called when a new type is recognized. The type is + /// converted from the bytecode and passed to this method. + /// @brief Handle a type + virtual void handleType( + const Type* Ty ///< The type that was just recognized + ); + + /// This method is called when the function prototype for a function is + /// encountered in the module globals block. + virtual void handleFunctionDeclaration( + Function* Func ///< The function being declared + ); + + /// This method is called at the end of the module globals block. + /// @brief Handle end of module globals block. + virtual void handleModuleGlobalsEnd(); + + /// This method is called at the beginning of a compaction table. + /// @brief Handle start of compaction table. + virtual void handleCompactionTableBegin(); + + /// @brief Handle start of a compaction table plane + virtual void handleCompactionTablePlane( + unsigned Ty, ///< The type of the plane (slot number) + unsigned NumEntries ///< The number of entries in the plane + ); + + /// @brief Handle a type entry in the compaction table + virtual void handleCompactionTableType( + unsigned i, ///< Index in the plane of this type + unsigned TypSlot, ///< Slot number for this type + const Type* ///< The type referenced by this slot + ); + + /// @brief Handle a value entry in the compaction table + virtual void handleCompactionTableValue( + unsigned i, ///< Index in the compaction table's type plane + unsigned TypSlot, ///< The slot (plane) of the type of this value + unsigned ValSlot, ///< The global value slot of the value + const Type* ///< The resolved type of the value. + ); + + /// @brief Handle end of a compaction table + virtual void handleCompactionTableEnd(); + + /// @brief Handle start of a symbol table + virtual void handleSymbolTableBegin( + Function* Func, ///< The function to which the ST belongs + SymbolTable* ST ///< The symbol table being filled + ); + + /// @brief Handle start of a symbol table plane + virtual void handleSymbolTablePlane( + unsigned Ty, ///< The slotnum of the type plane + unsigned NumEntries, ///< Number of entries in the plane + const Type* Ty ///< The type of this type plane + ); + + /// @brief Handle a named type in the symbol table + virtual void handleSymbolTableType( + unsigned i, ///< The index of the type in this plane + unsigned slot, ///< Slot number of the named type + const std::string& name ///< Name of the type + ); + + /// @brief Handle a named value in the symbol table + virtual void handleSymbolTableValue( + unsigned i, ///< The index of the value in this plane + unsigned slot, ///< Slot number of the named value + const std::string& name ///< Name of the value. + ); + + /// @brief Handle the end of a symbol table + virtual void handleSymbolTableEnd(); + + /// @brief Handle the beginning of a function body + virtual void handleFunctionBegin( + Function* Func, ///< The function being defined + unsigned Size ///< The size (in bytes) of the function's bytecode + ); + + /// @brief Handle the end of a function body + virtual void handleFunctionEnd( + Function* Func ///< The function whose definition has just finished. + ); + + /// @brief Handle the beginning of a basic block + virtual void handleBasicBlockBegin( + unsigned blocknum ///< The block number of the block + ); + + /// This method is called for each instruction that is parsed. + /// @returns true if the instruction is a block terminating instruction + /// @brief Handle an instruction + virtual bool handleInstruction( + unsigned Opcode, ///< Opcode of the instruction + const Type* iType, ///< Instruction type + std::vector& Operands, ///< Vector of slot # operands + unsigned Length ///< Length of instruction in bc bytes + ); + + /// @brief Handle the end of a basic block + virtual void handleBasicBlockEnd( + unsigned blocknum ///< The block number of the block just finished + ); + + /// @brief Handle start of global constants block. + virtual void handleGlobalConstantsBegin(); + + /// @brief Handle a constant expression + virtual void handleConstantExpression( + unsigned Opcode, ///< Opcode of primary expression operator + const Type* Typ, ///< Type of the expression + std::vector > ArgVec ///< expression args + ); + + /// @brief Handle a constant array + virtual void handleConstantArray( + const ArrayType* AT, ///< Type of the array + std::vector& ElementSlots ///< Slot nums for array values + ); + + /// @brief Handle a constant structure + virtual void handleConstantStruct( + const StructType* ST, ///< Type of the struct + std::vector& ElementSlots ///< Slot nums for struct values + ); + + /// @brief Handle a constant pointer + virtual void handleConstantPointer( + const PointerType* PT, ///< Type of the pointer + unsigned Slot ///< Slot num of initializer value + ); + + /// @brief Handle a constant strings (array special case) + virtual void handleConstantString( + const ConstantArray* CA ///< Type of the string array + ); + + /// @brief Handle a primitive constant value + virtual void handleConstantValue( + Constant * c ///< The constant just defined + ); + + /// @brief Handle the end of the global constants + virtual void handleGlobalConstantsEnd(); + + /// @brief Handle an alignment event + virtual void handleAlignment( + unsigned numBytes ///< The number of bytes added for alignment + ); + + /// @brief Handle a bytecode block + virtual void handleBlock( + unsigned BType, ///< The type of block + const unsigned char* StartPtr, ///< The start of the block + unsigned Size ///< The size of the block + ); + + /// @brief Handle a variable bit rate 32 bit unsigned + virtual void handleVBR32( + unsigned Size ///< Number of bytes the vbr_uint took up + ); + + /// @brief Handle a variable bit rate 64 bit unsigned + virtual void handleVBR64( + unsigned Size ///< Number of byte sthe vbr_uint64 took up + ); + /// @} + + }; + + } + // vim: sw=2 ai + #endif From lattner at cs.uiuc.edu Thu Jun 24 23:25:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Thu Jun 24 23:25:03 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/Andersens.cpp Message-ID: <200406250424.XAA11599@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: Andersens.cpp updated: 1.3 -> 1.4 --- Log message: Fix header --- Diffs of the changes: (+1 -1) Index: llvm/lib/Analysis/IPA/Andersens.cpp diff -u llvm/lib/Analysis/IPA/Andersens.cpp:1.3 llvm/lib/Analysis/IPA/Andersens.cpp:1.4 --- llvm/lib/Analysis/IPA/Andersens.cpp:1.3 Sat Jun 5 15:12:36 2004 +++ llvm/lib/Analysis/IPA/Andersens.cpp Thu Jun 24 23:24:22 2004 @@ -1,4 +1,4 @@ -//===- Andersens.cpp - Andersen's Interprocedural Alias Analysis -----------==// +//===- Andersens.cpp - Andersen's Interprocedural Alias Analysis ----------===// // // The LLVM Compiler Infrastructure // From gaeke at cs.uiuc.edu Fri Jun 25 00:17:03 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 00:17:03 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Message-ID: <200406250515.AAA01398@zion.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: RuntimeOptimizations.cpp updated: 1.43 -> 1.44 --- Log message: This header moved. --- Diffs of the changes: (+1 -1) Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.43 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.44 --- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.43 Tue Jun 22 03:43:06 2004 +++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Fri Jun 25 00:15:27 2004 @@ -25,7 +25,7 @@ #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/Passes.h" #include "llvm/CodeGen/MachineCodeEmitter.h" -#include "llvm/IntrinsicLowering.h" +#include "llvm/CodeGen/IntrinsicLowering.h" #include "llvm/ModuleProvider.h" #include "llvm/PassManager.h" #include "llvm/Target/TargetJITInfo.h" From lattner at cs.uiuc.edu Fri Jun 25 00:20:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 00:20:01 2004 Subject: [llvm-commits] CVS: llvm/tools/opt/Makefile Message-ID: <200406250519.AAA13912@apoc.cs.uiuc.edu> Changes in directory llvm/tools/opt: Makefile updated: 1.44 -> 1.45 --- Log message: Make sure to link all IPA's into opt, so that it has access to stuff like anders-aa --- Diffs of the changes: (+1 -1) Index: llvm/tools/opt/Makefile diff -u llvm/tools/opt/Makefile:1.44 llvm/tools/opt/Makefile:1.45 --- llvm/tools/opt/Makefile:1.44 Mon Oct 20 17:27:27 2003 +++ llvm/tools/opt/Makefile Fri Jun 25 00:19:17 2004 @@ -11,7 +11,7 @@ USEDLIBS = bcreader bcwriter \ instrument profpaths scalaropts \ - ipo ipa.a datastructure transforms target.a analysis \ + ipo ipa datastructure transforms target.a analysis \ transformutils vmcore support TOOLLINKOPTS = $(PLATFORMLIBDL) From gaeke at cs.uiuc.edu Fri Jun 25 01:09:01 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 01:09:01 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/Makefile Message-ID: <200406250608.BAA01757@zion.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: Makefile updated: 1.10 -> 1.11 --- Log message: Don't skip anything in this directory anymore -- with enough preprocessor magic, anything is portable (as long as you don't have to actually run it.) --- Diffs of the changes: (+0 -1) Index: reopt/lib/LightWtProfiling/Makefile diff -u reopt/lib/LightWtProfiling/Makefile:1.10 reopt/lib/LightWtProfiling/Makefile:1.11 --- reopt/lib/LightWtProfiling/Makefile:1.10 Thu Jun 3 13:46:12 2004 +++ reopt/lib/LightWtProfiling/Makefile Fri Jun 25 01:08:02 2004 @@ -5,7 +5,6 @@ include $(LEVEL)/Makefile.config ifneq ($(ARCH),Sparc) -Source := FirstTrigger.cpp Initialization.cpp RuntimeOptimizations.cpp SLI.cpp TraceWriter.cpp UnpackTraceFunction.cpp ValueAllocState.cpp all :: @echo "This code assumes an LP64 machine- please ignore ptr cast warnings!" endif From gaeke at cs.uiuc.edu Fri Jun 25 01:09:08 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 01:09:08 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/scheduler.cpp Message-ID: <200406250608.BAA01717@zion.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: scheduler.cpp updated: 1.8 -> 1.9 --- Log message: If we don't have itimers on this platform, provide the prototypes for them inline. A configure check should probably be provided for this someday. --- Diffs of the changes: (+11 -0) Index: reopt/lib/LightWtProfiling/scheduler.cpp diff -u reopt/lib/LightWtProfiling/scheduler.cpp:1.8 reopt/lib/LightWtProfiling/scheduler.cpp:1.9 --- reopt/lib/LightWtProfiling/scheduler.cpp:1.8 Wed Jan 14 17:02:22 2004 +++ reopt/lib/LightWtProfiling/scheduler.cpp Fri Jun 25 01:07:51 2004 @@ -19,6 +19,17 @@ #include #include +#if !(defined(__svr4__) && defined(__sparc__)) +// We'll just pop enough stuff in here so that scheduler.cpp compiles. +struct itimerspec { struct timespec it_value; struct timespec it_interval; }; +enum { CLOCK_REALTIME }; +typedef int timer_t; +int timer_create(int clock_id, struct sigevent *evp, timer_t *timerid); +int timer_settime(timer_t timerid, int flags, const struct itimerspec *value, + struct itimerspec *ovalue); +int timer_gettime(timer_t timerid, struct itimerspec *value); +#endif + namespace llvm { // A qentry (queue entry) is a (cycle, addr) tuple. From gaeke at cs.uiuc.edu Fri Jun 25 01:09:14 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 01:09:14 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Message-ID: <200406250607.BAA01676@zion.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: UnpackTraceFunction.cpp updated: 1.86 -> 1.87 --- Log message: Make copyConstantToRegister smarter enough so that it can do double constants. (This is a first, untested draft.) --- Diffs of the changes: (+59 -12) Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.86 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.87 --- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.86 Wed Jun 23 15:06:34 2004 +++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Fri Jun 25 01:07:40 2004 @@ -260,28 +260,75 @@ } } +static void regAllocConstORi (std::vector &mvec, unsigned DestReg, unsigned SpareReg) { + MachineInstr &theInst = *mvec.back(); + assert (theInst.getOpcode () == V9::ORi + && theInst.getNumOperands () == 3 + && theInst.getOperand (2).isDef () + && theInst.getOperand (2).getType () == MachineOperand::MO_VirtualRegister + && "wrong machineInstr passed to regAllocConstORi"); + theInst.SetRegForOperand (2, DestReg); +} + +// sethi %hh(), %A +// or %A, %hm(), %A +// sllx %A, 32, %A +// sethi %lm(), %B +// or %B, %A, %B +// or %B, %lo(), %B +// ldd %B, 0, %C +static void regAllocConstLDDFi (std::vector &mvec, unsigned DestReg, unsigned SpareReg) { + std::vector::iterator first = mvec.begin (), + last = mvec.end (); + Value *TopHalfVReg = (*first)->getOperand(1).getVRegValue (), + *BottomHalfVReg = (*last)->getOperand (0).getVRegValue (), + *DestVReg = (*last)->getOperand (2).getVRegValue (); + + for (std::vector::iterator i = first; i != last; ++i) { + MachineInstr &MInst = **i; + for (unsigned opNum=0, last=MInst.getNumOperands (); opNum != last; + ++opNum) { + MachineOperand &Op = MInst.getOperand (opNum); + if (Op.getType() == MachineOperand::MO_VirtualRegister) { + const Value *const Val = Op.getVRegValue(); + + if (Val == DestVReg || Val == BottomHalfVReg) + MInst.SetRegForOperand (opNum, DestReg); + else if (Val == TopHalfVReg) + MInst.SetRegForOperand (opNum, SpareReg); + else + assert (0 && "Unknown virtual register found in regAllocConstLDDFi"); + } + } + } +} + void UnpackTraceFunction::copyConstantToRegister (MachineFunction &MF, Constant *C, unsigned Reg, + unsigned SpareReg, std::vector &mvec) { const TargetInstrInfo &TII = *TM->getInstrInfo (); TmpInstruction *tmp = new TmpInstruction (C); TII.CreateCodeToLoadConst (*TM, const_cast (MF.getFunction ()), C, tmp, mvec, MachineCodeForInstruction::get (tmp)); + DEBUG (for (std::vector::iterator i = mvec.begin (), e = mvec.end (); - i != e; ++i) - std::cerr << "copyConstantToRegister Input: " << **i << "\n"); - assert (mvec.size() == 1); - MachineInstr &theInst = *mvec.back(); + i != e; ++i) + std::cerr << "copyConstantToRegister Input: " << **i << "\n"); + // note: this is pretty seriously hardwired for now. the problem is that in full // generality, this is a little tiny episode of register allocation - assert (theInst.getOpcode () == V9::ORi - && theInst.getNumOperands () == 3 - && theInst.getOperand (2).isDef () - && theInst.getOperand (2).getType () == MachineOperand::MO_VirtualRegister); - theInst.SetRegForOperand (2, Reg); + if (mvec.size() == 1 && mvec.back()->getOpcode() == V9::ORi) { + regAllocConstORi (mvec,Reg,SpareReg); + } else if (mvec.size() == 7 && mvec.back()->getOpcode() == V9::LDDFi) { + regAllocConstLDDFi (mvec,Reg,SpareReg); + } else { + assert (0 && "unknown sequence coming out of CreateCodeToLoadConst"); + } + DEBUG (for (std::vector::iterator i = mvec.begin (), e = mvec.end (); - i != e; ++i) - std::cerr << "copyConstantToRegister Output: " << **i << "\n"); + i != e; ++i) + std::cerr << "copyConstantToRegister Output: " << **i << "\n"); } void UnpackTraceFunction::addLiveOutCopy (MachineFunction &MF, MachineBasicBlock &MBB, @@ -303,7 +350,7 @@ assert (liveOutValue); assert (isa (liveOutTraceValue) && "Can't handle non-constant, non-allocated live-out value in traceFn"); - copyConstantToRegister (MF, cast (liveOutTraceValue), g1, mvec); + copyConstantToRegister (MF, cast (liveOutTraceValue), g1, g2, mvec); unsigned R = g1; unsigned RegType = TRI.getRegType (R); DEBUG (std::cerr << "addLiveOutCopy: " << liveOutValue->getName() From gaeke at cs.uiuc.edu Fri Jun 25 01:09:20 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 01:09:20 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/SecondTrigger.cpp Message-ID: <200406250607.BAA01634@zion.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: SecondTrigger.cpp updated: 1.29 -> 1.30 --- Log message: If we don't have libcpc.h, provide the prototype inline. This could reasonably be handled by the reopt/configure script, maybe, someday. --- Diffs of the changes: (+6 -1) Index: reopt/lib/LightWtProfiling/SecondTrigger.cpp diff -u reopt/lib/LightWtProfiling/SecondTrigger.cpp:1.29 reopt/lib/LightWtProfiling/SecondTrigger.cpp:1.30 --- reopt/lib/LightWtProfiling/SecondTrigger.cpp:1.29 Tue Apr 27 13:34:45 2004 +++ reopt/lib/LightWtProfiling/SecondTrigger.cpp Fri Jun 25 01:07:26 2004 @@ -27,7 +27,12 @@ #include "reopt/TraceCache.h" #include "reopt/VirtualMem.h" #include -#include +#if defined(__svr4__) && defined(__sparc__) +# include +#else +// Just to make it compile... +extern "C" int cpc_count_usr_events(int); +#endif namespace llvm { From gaeke at cs.uiuc.edu Fri Jun 25 01:27:01 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 01:27:01 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/scheduler.cpp Message-ID: <200406250625.BAA02936@zion.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: scheduler.cpp updated: 1.9 -> 1.10 --- Log message: Tweak tweak tweak, nothing to see here --- Diffs of the changes: (+1 -1) Index: reopt/lib/LightWtProfiling/scheduler.cpp diff -u reopt/lib/LightWtProfiling/scheduler.cpp:1.9 reopt/lib/LightWtProfiling/scheduler.cpp:1.10 --- reopt/lib/LightWtProfiling/scheduler.cpp:1.9 Fri Jun 25 01:07:51 2004 +++ reopt/lib/LightWtProfiling/scheduler.cpp Fri Jun 25 01:25:35 2004 @@ -19,7 +19,7 @@ #include #include -#if !(defined(__svr4__) && defined(__sparc__)) +#if !(defined(__linux__) || (defined(__svr4__) && defined(__sparc__))) // We'll just pop enough stuff in here so that scheduler.cpp compiles. struct itimerspec { struct timespec it_value; struct timespec it_interval; }; enum { CLOCK_REALTIME }; From gaeke at cs.uiuc.edu Fri Jun 25 01:27:09 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 01:27:09 2004 Subject: [llvm-commits] CVS: reopt/include/reopt/UnpackTraceFunction.h Message-ID: <200406250624.BAA02306@zion.cs.uiuc.edu> Changes in directory reopt/include/reopt: UnpackTraceFunction.h updated: 1.9 -> 1.10 --- Log message: copyConstantToRegister now takes a SpareReg. --- Diffs of the changes: (+1 -0) Index: reopt/include/reopt/UnpackTraceFunction.h diff -u reopt/include/reopt/UnpackTraceFunction.h:1.9 reopt/include/reopt/UnpackTraceFunction.h:1.10 --- reopt/include/reopt/UnpackTraceFunction.h:1.9 Wed Jun 23 15:06:33 2004 +++ reopt/include/reopt/UnpackTraceFunction.h Fri Jun 25 01:23:53 2004 @@ -59,6 +59,7 @@ void rewriteProlog (MachineFunction &MF, MachineBasicBlock &MBB); void copyConstantToRegister (MachineFunction &MF, Constant *C, unsigned Reg, + unsigned SpareReg, std::vector &mvec); void addLiveOutCopy (MachineFunction &MF, MachineBasicBlock &MBB, const AllocInfo &Source, const AllocInfo &Target, From gaeke at cs.uiuc.edu Fri Jun 25 02:24:02 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 02:24:02 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Message-ID: <200406250722.CAA03433@zion.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: UnpackTraceFunction.cpp updated: 1.87 -> 1.88 --- Log message: Don't unwittingly dereference mvec.end() --- Diffs of the changes: (+9 -8) Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.87 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.88 --- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.87 Fri Jun 25 01:07:40 2004 +++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Fri Jun 25 02:22:23 2004 @@ -277,16 +277,17 @@ // or %B, %A, %B // or %B, %lo(), %B // ldd %B, 0, %C -static void regAllocConstLDDFi (std::vector &mvec, unsigned DestReg, unsigned SpareReg) { - std::vector::iterator first = mvec.begin (), - last = mvec.end (); - Value *TopHalfVReg = (*first)->getOperand(1).getVRegValue (), - *BottomHalfVReg = (*last)->getOperand (0).getVRegValue (), - *DestVReg = (*last)->getOperand (2).getVRegValue (); +static void regAllocConstLDDFi (std::vector &mvec, + unsigned DestReg, unsigned SpareReg) { + MachineInstr *&first = mvec.front (), *&last = mvec.back (); + Value *TopHalfVReg = first->getOperand (1).getVRegValue (), + *BottomHalfVReg = last->getOperand (0).getVRegValue (), + *DestVReg = last->getOperand (2).getVRegValue (); - for (std::vector::iterator i = first; i != last; ++i) { + for (std::vector::iterator i = mvec.begin (), + e = mvec.end(); i != e; ++i) { MachineInstr &MInst = **i; - for (unsigned opNum=0, last=MInst.getNumOperands (); opNum != last; + for (unsigned opNum=0, nOps=MInst.getNumOperands (); opNum != nOps; ++opNum) { MachineOperand &Op = MInst.getOperand (opNum); if (Op.getType() == MachineOperand::MO_VirtualRegister) { From gaeke at cs.uiuc.edu Fri Jun 25 02:27:04 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 02:27:04 2004 Subject: [llvm-commits] CVS: llvm/utils/NightlyTest.pl Message-ID: <200406250725.CAA03516@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTest.pl updated: 1.59 -> 1.60 --- Log message: Don't try to run qmtests if we fail to build the tree. The qmtests (at least, on macosx) will spiral out of control instead of failing gracefully. --- Diffs of the changes: (+2 -0) Index: llvm/utils/NightlyTest.pl diff -u llvm/utils/NightlyTest.pl:1.59 llvm/utils/NightlyTest.pl:1.60 --- llvm/utils/NightlyTest.pl:1.59 Wed Jun 23 09:07:12 2004 +++ llvm/utils/NightlyTest.pl Fri Jun 25 02:25:28 2004 @@ -404,6 +404,8 @@ if ($VERBOSE) { print "BUILD ERROR\n"; } } +if ($BuildError) { $NOFEATURES = 1; $NOREGRESSIONS = 1; } + # Get results of feature tests. my $FeatureTestResults; # String containing the results of the feature tests my $FeatureTime; # System+CPU Time for feature tests From lattner at cs.uiuc.edu Fri Jun 25 02:42:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 02:42:03 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/Scalar.h Message-ID: <200406250741.CAA20111@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms: Scalar.h updated: 1.40 -> 1.41 --- Log message: Prototype for new ConstantExpr lowering pass, contributed by Vladimir Prus! --- Diffs of the changes: (+5 -0) Index: llvm/include/llvm/Transforms/Scalar.h diff -u llvm/include/llvm/Transforms/Scalar.h:1.40 llvm/include/llvm/Transforms/Scalar.h:1.41 --- llvm/include/llvm/Transforms/Scalar.h:1.40 Sun May 23 16:16:13 2004 +++ llvm/include/llvm/Transforms/Scalar.h Fri Jun 25 02:41:06 2004 @@ -292,6 +292,11 @@ /// pass, which lowers garbage collection intrinsics to normal LLVM code. /// FunctionPass *createLowerGCPass(); + +//===----------------------------------------------------------------------===// +// Returns a pass which converts all instances of ConstantExpression +// into regular LLVM instructions. +FunctionPass* createLowerConstantExpressionsPass(); //===----------------------------------------------------------------------===// From lattner at cs.uiuc.edu Fri Jun 25 02:48:02 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 02:48:02 2004 Subject: [llvm-commits] CVS: llvm/test/Regression/CodeGen/Generic/ConstantExprLowering.llx Message-ID: <200406250747.CAA23655@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/CodeGen/Generic: ConstantExprLowering.llx added (r1.1) --- Log message: New testcase for constant expression lowering pass, contributed by Vladimir Prus! --- Diffs of the changes: (+26 -0) Index: llvm/test/Regression/CodeGen/Generic/ConstantExprLowering.llx diff -c /dev/null llvm/test/Regression/CodeGen/Generic/ConstantExprLowering.llx:1.1 *** /dev/null Fri Jun 25 02:47:23 2004 --- llvm/test/Regression/CodeGen/Generic/ConstantExprLowering.llx Fri Jun 25 02:47:13 2004 *************** *** 0 **** --- 1,26 ---- + ; RUN: llvm-as < %s | opt -lowerconstantexprs -disable-output + + %.str_1 = internal constant [16 x sbyte] c"%d %d %d %d %d\0A\00" + + %XA = external global int + %XB = external global int + + implementation ; Functions: + + declare int %printf(sbyte*, ...) + + void %test(int %A, int %B, int %C, int %D) { + entry: + %t1 = setlt int %A, 0 + br bool %t1, label %less, label %not_less + less: + br label %not_less + not_less: + %t2 = phi int [ sub ( int cast (int* %XA to int), + int cast (int* %XB to int) ), %less], + [ sub ( int cast (int* %XA to int), + int cast (int* %XB to int) ), %entry] + %tmp.39 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([16 x sbyte]* %.str_1, long 0, long 0) ) ; [#uses=0] + ret void + } + From lattner at cs.uiuc.edu Fri Jun 25 02:49:03 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 02:49:03 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/LowerConstantExprs.cpp Message-ID: <200406250748.CAA23666@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: LowerConstantExprs.cpp added (r1.1) --- Log message: New constant expression lowering pass to simplify your instruction selection needs. Contributed by Vladimir Prus! --- Diffs of the changes: (+171 -0) Index: llvm/lib/Transforms/Scalar/LowerConstantExprs.cpp diff -c /dev/null llvm/lib/Transforms/Scalar/LowerConstantExprs.cpp:1.1 *** /dev/null Fri Jun 25 02:48:19 2004 --- llvm/lib/Transforms/Scalar/LowerConstantExprs.cpp Fri Jun 25 02:48:09 2004 *************** *** 0 **** --- 1,171 ---- + //===-- lib/Transforms/Scalar/LowerConstantExprs.cpp ------------*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was written by Vladimir Prus and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file defines the LowerConstantExpression pass, which converts all + // constant expressions into instructions. This is primarily usefull for + // code generators which don't yet want or don't have a need to handle + // constant expressions themself. + // + //===----------------------------------------------------------------------===// + + #include "llvm/Pass.h" + #include "llvm/Function.h" + #include "llvm/Constants.h" + #include "llvm/iMemory.h" + #include "llvm/iPHINode.h" + #include "llvm/iOther.h" + #include "llvm/Support/InstIterator.h" + #include + + using namespace llvm; + using namespace std; + + namespace { + + class ConstantExpressionsLower : public FunctionPass { + private: // FunctionPass overrides + + bool runOnFunction(Function& f); + + private: // internal methods + + /// For all operands of 'insn' which are constant expressions, generates + /// an appropriate instruction and replaces the use of constant + /// expression with the use of the generated instruction. + bool runOnInstruction(Instruction& insn); + + /// Given an constant expression 'c' which occures in 'instruction', + /// at position 'pos', + /// generates instruction to compute 'c' and replaces the use of 'c' + /// with the use of that instruction. This handles only top-level + /// expression in 'c', any subexpressions are not handled. + Instruction* convert(const ConstantExpr& c, Instruction* where); + }; + + RegisterOpt X( + "lowerconstantexprs", "Lower constant expressions"); + } + + bool ConstantExpressionsLower::runOnFunction(Function& f) + { + bool modified = false; + for (inst_iterator i = inst_begin(f), e = inst_end(f); i != e; ++i) + { + modified |= runOnInstruction(*i); + } + return modified; + } + + bool ConstantExpressionsLower::runOnInstruction(Instruction& instruction) + { + bool modified = false; + for (unsigned pos = 0; pos < instruction.getNumOperands(); ++pos) + { + if (ConstantExpr* ce + = dyn_cast(instruction.getOperand(pos))) { + + // Decide where to insert the new instruction + Instruction* where = &instruction; + + // For PHI nodes we can't insert new instruction before phi, + // since phi should always come at the beginning of the + // basic block. + // So, we need to insert it in the predecessor, right before + // the terminating instruction. + if (PHINode* p = dyn_cast(&instruction)) { + BasicBlock* predecessor = 0; + for(unsigned i = 0; i < p->getNumIncomingValues(); ++i) + if (p->getIncomingValue(i) == ce) { + predecessor = p->getIncomingBlock(i); + break; + } + assert(predecessor && "could not find predecessor"); + where = predecessor->getTerminator(); + } + Instruction* n = convert(*ce, where); + + // Note: we can't call replaceAllUsesWith, since + // that might replace uses in another functions, + // where the instruction(s) we've generated are not + // available. + + // Moreover, we can't replace all the users in the same + // function, because we can't be sure the definition + // made in this block will be available in other + // places where the constant is used. + instruction.setOperand(pos, n); + + // The new instruction might have constant expressions in + // it. Extract them too. + runOnInstruction(*n); + modified = true; + } + } + return modified; + } + + Instruction* + ConstantExpressionsLower::convert(const ConstantExpr& c, Instruction* where) + { + Instruction* result = 0; + + if (c.getOpcode() >= Instruction::BinaryOpsBegin && + c.getOpcode() < Instruction::BinaryOpsEnd) + { + result = BinaryOperator::create( + static_cast(c.getOpcode()), + c.getOperand(0), c.getOperand(1), "", where); + } + else + { + switch(c.getOpcode()) { + case Instruction::GetElementPtr: + { + vector idx; + for (unsigned i = 1; i < c.getNumOperands(); ++i) + idx.push_back(c.getOperand(i)); + result = new GetElementPtrInst(c.getOperand(0), + idx, "", where); + break; + } + + case Instruction::Cast: + result = new CastInst(c.getOperand(0), c.getType(), "", + where); + break; + + + case Instruction::Shl: + case Instruction::Shr: + result = new ShiftInst( + static_cast(c.getOpcode()), + c.getOperand(0), c.getOperand(1), "", where); + break; + + case Instruction::Select: + result = new SelectInst(c.getOperand(0), c.getOperand(1), + c.getOperand(2), "", where); + break; + + default: + std::cerr << "Offending expr: " << c << "\n"; + assert(0 && "Constant expression not yet handled!\n"); + } + } + return result; + } + + + + namespace llvm { + FunctionPass* createLowerConstantExpressionsPass() + { + return new ConstantExpressionsLower; + } + } From lattner at cs.uiuc.edu Fri Jun 25 03:04:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 03:04:01 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/arscan.c job.c make.h misc.c read.c Message-ID: <200406250803.DAA23811@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make: arscan.c updated: 1.2 -> 1.3 job.c updated: 1.2 -> 1.3 make.h updated: 1.2 -> 1.3 misc.c updated: 1.2 -> 1.3 read.c updated: 1.2 -> 1.3 --- Log message: Patches to make this benchmakr work better with FreeBSD, contributed by Vladimir Merzliakov --- Diffs of the changes: (+14 -9) Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/arscan.c diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/arscan.c:1.2 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/arscan.c:1.3 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/arscan.c:1.2 Wed Jun 2 17:35:39 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/arscan.c Fri Jun 25 03:03:11 2004 @@ -38,7 +38,7 @@ #endif #if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) \ - || defined (POSIX)) + || defined (POSIX)) || defined (__FreeBSD__) #include #include #define ANSI_STRING @@ -77,7 +77,7 @@ #define bcmp(s1, s2, n) memcmp ((s1), (s2), (n)) #define bzero(s, n) memset ((s), 0, (n)) #define bcopy(s, d, n) memcpy ((d), (s), (n)) -#endif ANSI_STRING +#endif /*ANSI_STRING*/ #undef ANSI_STRING @@ -93,7 +93,8 @@ #define AR_NAMELEN 255 #endif -#if defined(__GNU_LIBRARY__) || defined(POSIX) || defined(_IBMR2) +#if defined(__GNU_LIBRARY__) || defined(POSIX) || defined(_IBMR2) || \ + defined(__FreeBSD__) #include #else extern int read (), open (), close (), write (), fstat (); Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/job.c diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/job.c:1.2 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/job.c:1.3 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/job.c:1.2 Wed Jun 2 17:35:39 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/job.c Fri Jun 25 03:03:11 2004 @@ -30,7 +30,7 @@ /* Default shell to use. */ char default_shell[] = "/bin/sh"; -#if defined(POSIX) || defined(__GNU_LIBRARY__) +#if defined(POSIX) || defined(__GNU_LIBRARY__) || defined(__FreeBSD__) #include #include #define GET_NGROUPS_MAX sysconf (_SC_NGROUPS_MAX) @@ -100,7 +100,7 @@ #endif /* WTERMSIG defined or USG and don't have . */ -#if defined(__GNU_LIBRARY__) || defined(POSIX) || defined(__CYGWIN__) +#if defined(__GNU_LIBRARY__) || defined(POSIX) || defined(__CYGWIN__) || defined(__FreeBSD__) #include #define GID_T gid_t Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/make.h diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/make.h:1.2 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/make.h:1.3 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/make.h:1.2 Wed Jun 2 17:35:39 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/make.h Fri Jun 25 03:03:11 2004 @@ -15,7 +15,10 @@ along with GNU Make; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +#if !defined(_GNU_SOURCE) #define _GNU_SOURCE +#endif + #include #include #include @@ -80,7 +83,7 @@ #if (defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) \ - || defined (POSIX)) + || defined (POSIX) || defined(__FreeBSD__)) #include #include #define ANSI_STRING @@ -212,7 +215,8 @@ #define VFORK_NAME "vfork" #endif /* USG and don't have vfork. */ -#if defined(__GNU_LIBRARY__) || defined(POSIX) || defined(__CYGWIN__) +#if defined(__GNU_LIBRARY__) || defined(POSIX) || defined(__CYGWIN__) || \ + defined(__FreeBSD__) #include #include Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/misc.c diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/misc.c:1.2 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/misc.c:1.3 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/misc.c:1.2 Wed Jun 2 17:35:39 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/misc.c Fri Jun 25 03:03:11 2004 @@ -476,7 +476,7 @@ } #endif -#if !defined(POSIX) && !defined(__GNU_LIBRARY__) && !defined(__CYGWIN__) +#if !defined(POSIX) && !defined(__GNU_LIBRARY__) && !defined(__CYGWIN__) && !defined(__FreeBSD__) extern int getuid (), getgid (), geteuid (), getegid (); #ifdef USG extern int setuid (), setgid (); Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/read.c diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/read.c:1.2 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/read.c:1.3 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/read.c:1.2 Wed Jun 2 17:35:39 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/make/read.c Fri Jun 25 03:03:11 2004 @@ -22,7 +22,7 @@ #include "variable.h" /* This is POSIX.2, but most systems using -DPOSIX probably don't have it. */ -#if defined(__GNU_LIBRARY__) || defined(__CYGWIN__) +#if defined(__GNU_LIBRARY__) || defined(__CYGWIN__) || defined(__FreeBSD__) #include #else #include "glob/glob.h" From gaeke at cs.uiuc.edu Fri Jun 25 03:05:02 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 03:05:02 2004 Subject: [llvm-commits] CVS: reopt/test/run-tests Message-ID: <200406250804.DAA16049@kain.cs.uiuc.edu> Changes in directory reopt/test: run-tests updated: 1.7 -> 1.8 --- Log message: Add gzip, bzip2, and support multi-subdir tests better in do_clean(). Set LARGE_PROBLEM_SIZE for olden, and SPECTEST=1 for spec. --- Diffs of the changes: (+11 -2) Index: reopt/test/run-tests diff -u reopt/test/run-tests:1.7 reopt/test/run-tests:1.8 --- reopt/test/run-tests:1.7 Wed Jun 23 22:20:15 2004 +++ reopt/test/run-tests Fri Jun 25 03:04:04 2004 @@ -56,6 +56,8 @@ mcf) SUBDIR=External/SPEC/CINT2000/181.mcf; spectest=1 ;; art) SUBDIR=External/SPEC/CFP2000/179.art; spectest=1;; equake) SUBDIR=External/SPEC/CFP2000/183.equake; spectest=1 ;; + gzip) SUBDIR=External/SPEC/CFP2000/164.gzip; spectest=1 ;; + bzip2) SUBDIR=External/SPEC/CFP2000/256.bzip2; spectest=1 ;; *) die "Error: Unknown benchmark $arg" ;; esac @@ -83,14 +85,21 @@ do_clean () { echo "cleaning in $fullsubdirpath" - rm $fullsubdirpath/Output/*.out-* + find $fullsubdirpath -name "*.out-llc" -print |xargs rm + find $fullsubdirpath -name "*.out-reopt-llc" -print |xargs rm if [ $outputonly -eq 0 ]; then find $fullsubdirpath -name "*reopt*" -print |xargs rm fi } do_test () { - exec gmake SUBDIR=$SUBDIR + if [ "$benchmk" = "olden" ]; then + exec gmake SUBDIR=$SUBDIR LARGE_PROBLEM_SIZE=1 + elif [ $spectest -eq 1 ]; then + exec gmake SUBDIR=$SUBDIR SPECTEST=1 + else + exec gmake SUBDIR=$SUBDIR + fi } case $action in From gaeke at cs.uiuc.edu Fri Jun 25 03:05:08 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 03:05:08 2004 Subject: [llvm-commits] CVS: reopt/test/TEST.reopt.Makefile Message-ID: <200406250804.DAA16042@kain.cs.uiuc.edu> Changes in directory reopt/test: TEST.reopt.Makefile updated: 1.17 -> 1.18 --- Log message: Move libsupport after libtransformutils. Add special support for spec tests, with the llc-train dir. --- Diffs of the changes: (+10 -5) Index: reopt/test/TEST.reopt.Makefile diff -u reopt/test/TEST.reopt.Makefile:1.17 reopt/test/TEST.reopt.Makefile:1.18 --- reopt/test/TEST.reopt.Makefile:1.17 Wed Jun 9 15:26:16 2004 +++ reopt/test/TEST.reopt.Makefile Fri Jun 25 03:04:03 2004 @@ -40,9 +40,9 @@ # Library archive files that contain common LLVM code the Reoptimizer depends on REOPTIMIZER_LLVMLIBS = $(DESTLIBCURRENT)/libsparcv9regalloc.a \ - $(DESTLIBCURRENT)/libsupport.a $(DESTLIBCURRENT)/libtarget.a \ + $(DESTLIBCURRENT)/libtarget.a \ $(DESTLIBCURRENT)/libscalaropts.a $(DESTLIBCURRENT)/libtransformutils.a \ - $(DESTLIBCURRENT)/libanalysis.a + $(DESTLIBCURRENT)/libanalysis.a $(DESTLIBCURRENT)/libsupport.a # Solaris libraries that the Reoptimizer depends on REOPTIMIZER_SOLARISLIBS = -lcpc -lm -lrt -lmalloc -ldl @@ -86,13 +86,18 @@ $(CXX) $(CFLAGS) $< -o $@ $(REOPTIMIZER_LDADD) # 3. Run the reoptimized version. +ifdef SPECTEST +$(PROGRAMS_TO_TEST:%=Output/%.out-reopt-llc): \ +Output/%.out-reopt-llc: Output/%.reopt-llc + @echo "===== Running Reoptimizer version of $(TESTNAME) =====" + -cd Output/llc-train && ../../$< $(RUN_OPTIONS) < $(STDIN_FILENAME) \ + > ../../$@ +else $(PROGRAMS_TO_TEST:%=Output/%.out-reopt-llc): \ Output/%.out-reopt-llc: Output/%.reopt-llc @echo "===== Running Reoptimizer version of $(TESTNAME) =====" -# -$(RUNSAFELY) $(STDIN_FILENAME) $@ $< $(RUN_OPTIONS) -# Reoptimizer currently runs so slowly in debug mode with -# --enable-trace-opt that you can't effectively use time limits. -$< $(RUN_OPTIONS) < $(STDIN_FILENAME) > $@ +endif # 4. Diff it against the plain old llc version $(PROGRAMS_TO_TEST:%=Output/%.diff-reopt-llc): \ From gaeke at cs.uiuc.edu Fri Jun 25 03:05:14 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 03:05:14 2004 Subject: [llvm-commits] CVS: reopt/test/Makefile Message-ID: <200406250804.DAA16035@kain.cs.uiuc.edu> Changes in directory reopt/test: Makefile updated: 1.5 -> 1.6 --- Log message: Try to propagate the LARGE_PROBLEM_SIZE variable to sub-makes. --- Diffs of the changes: (+2 -0) Index: reopt/test/Makefile diff -u reopt/test/Makefile:1.5 reopt/test/Makefile:1.6 --- reopt/test/Makefile:1.5 Tue Sep 30 15:50:40 2003 +++ reopt/test/Makefile Fri Jun 25 03:04:02 2004 @@ -11,6 +11,8 @@ LEVEL = .. include $(LEVEL)/Makefile.common +export LARGE_PROBLEM_SIZE + # test target - Descend into test/Programs and run the TEST.reopt.Makefile # tests... test:: From lattner at cs.uiuc.edu Fri Jun 25 03:08:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 03:08:01 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/perl/doio.c Message-ID: <200406250807.DAA23832@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/MallocBench/perl: doio.c updated: 1.1 -> 1.2 --- Log message: fix the test on FreeBSD, contributed by Vladimir Merzliakov --- Diffs of the changes: (+6 -1) Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/perl/doio.c diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/perl/doio.c:1.1 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/perl/doio.c:1.2 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/perl/doio.c:1.1 Tue Feb 17 16:21:16 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/perl/doio.c Fri Jun 25 03:07:12 2004 @@ -1,4 +1,4 @@ -/* $RCSfile: doio.c,v $$Revision: 1.1 $$Date: 2004/02/17 22:21:16 $ +/* $RCSfile: doio.c,v $$Revision: 1.2 $$Date: 2004/06/25 08:07:12 $ * * Copyright (c) 1989, Larry Wall * @@ -6,6 +6,9 @@ * as specified in the README file that comes with the perl 3.0 kit. * * $Log: doio.c,v $ + * Revision 1.2 2004/06/25 08:07:12 lattner + * fix the test on FreeBSD, contributed by Vladimir Merzliakov + * * Revision 1.1 2004/02/17 22:21:16 criswell * Initial commit of the perl Malloc Benchmark. I've cheated a little by * generating the yacc output files and committing them directly, but it was @@ -2689,7 +2692,9 @@ char *mbuf, *shm; int id, mpos, msize; struct shmid_ds shmds; +#if !defined(__FreeBSD__) extern char *shmat(); +#endif id = (int)str_gnum(st[++sp]); mstr = st[++sp]; From lattner at cs.uiuc.edu Fri Jun 25 03:16:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 03:16:01 2004 Subject: [llvm-commits] CVS: llvm-www/testresults/index.html Message-ID: <200406250815.DAA23985@apoc.cs.uiuc.edu> Changes in directory llvm-www/testresults: index.html updated: 1.7 -> 1.8 --- Log message: Add a link to Vladimir Merzliakov freebsd tester. --- Diffs of the changes: (+7 -6) Index: llvm-www/testresults/index.html diff -u llvm-www/testresults/index.html:1.7 llvm-www/testresults/index.html:1.8 --- llvm-www/testresults/index.html:1.7 Wed Jun 23 15:25:18 2004 +++ llvm-www/testresults/index.html Fri Jun 25 03:15:33 2004 @@ -23,14 +23,15 @@
                  -
                1. Linux on X86 (Dual P4 Xeon @ 3.06GHz) -- debug build
                2. +
                3. X86: Linux (Dual P4 Xeon @ 3.06GHz) -- debug build
                4. -
                5. Linux on X86 (Celeron @ +
                6. X86: Linux (Celeron @ 1.7GHz) -- release build
                7. - -
                8. Solaris on Sparc V9 (Sun Fire V240, dual 1Ghz CPU)
                9. +
                10. X86: FreeBSD 5.1 (may not be run every day)
                11. -
                12. Mac OS X 10.3 "Panther" on PowerPC G5 (dual 1.8Ghz CPU) (C Back-end Only)
                13. +
                14. PPC: Mac OS X 10.3 "Panther" on PowerPC G5 (dual 1.8Ghz CPU) (C Back-end Only)
                15. + +
                16. Sparc V9: Solaris (Sun Fire V240, dual 1Ghz CPU)
                @@ -40,7 +41,7 @@
                Chris Lattner
                The LLVM Compiler Infrastructure
                - Last modified: $Date: 2004/06/23 20:25:18 $ + Last modified: $Date: 2004/06/25 08:15:33 $ From brukman at cs.uiuc.edu Fri Jun 25 08:38:01 2004 From: brukman at cs.uiuc.edu (Misha Brukman) Date: Fri Jun 25 08:38:01 2004 Subject: [llvm-commits] CVS: llvm/CREDITS.TXT Message-ID: <200406251337.IAA25084@zion.cs.uiuc.edu> Changes in directory llvm: CREDITS.TXT updated: 1.10 -> 1.11 --- Log message: Vladimir Prus also contributed the LowerConstantExprs pass. --- Diffs of the changes: (+1 -1) Index: llvm/CREDITS.TXT diff -u llvm/CREDITS.TXT:1.10 llvm/CREDITS.TXT:1.11 --- llvm/CREDITS.TXT:1.10 Thu May 6 13:06:18 2004 +++ llvm/CREDITS.TXT Fri Jun 25 08:37:03 2004 @@ -47,7 +47,7 @@ N: Vladimir Prus E: ghost at cs.msu.su -D: Made inst_iterator behave like a proper iterator +D: Made inst_iterator behave like a proper iterator, LowerConstantExprs pass N: Ruchira Sasanka E: sasanka at uiuc.edu From criswell at cs.uiuc.edu Fri Jun 25 10:18:01 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Jun 25 10:18:01 2004 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200406251517.KAA11847@choi.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.67 -> 1.68 --- Log message: Added missing quote. --- Diffs of the changes: (+48 -2) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.67 llvm/docs/LangRef.html:1.68 --- llvm/docs/LangRef.html:1.67 Mon Jun 21 17:52:48 2004 +++ llvm/docs/LangRef.html Fri Jun 25 10:16:57 2004 @@ -764,7 +764,7 @@
                Semantics:

                When the 'ret' instruction is executed, control flow returns back to the calling function's context. If the caller is a "call instruction, execution continues at + href="#i_call">call" instruction, execution continues at the instruction after the call. If the caller was an "invoke" instruction, execution continues at the beginning "normal" of the destination block. If the instruction @@ -2357,6 +2357,52 @@ + +

                + +
                + +
                Syntax:
                +
                +  call void (void)* %llvm.interrupt_handler (void)
                +
                + +
                Overview:
                + +

                +The 'llvm.interrupt_handler' intrinsic installs the specified function +as an interrupt handler for the specified interrupt. +

                + +
                Arguments:
                + +

                +The first argument is the value to write to the memory mapped I/O location. +The second argument is a pointer indicating the memory address to which the +data should be written. +

                + +
                Semantics:
                + +

                +The 'llvm.writeio' intrinsic writes value to the memory mapped +I/O address specified by pointer. The value must be a +first class type. However, certain architectures +may not support I/O on all first class types. For example, 32 bit processors +may only support I/O on data types that are 32 bits or less. +

                + +

                +This intrinsic enforces an in-order memory model for llvm.readio and +llvm.writeio calls on machines that use dynamic scheduling. Dynamically +scheduled processors may execute loads and stores out of order, re-ordering at +run time accesses to memory mapped I/O registers. Using these intrinsics +ensures that accesses to memory mapped I/O registers occur in program order. +

                + +
                @@ -2591,7 +2637,7 @@ Chris Lattner
                The LLVM Compiler Infrastructure
                - Last modified: $Date: 2004/06/21 22:52:48 $ + Last modified: $Date: 2004/06/25 15:16:57 $ From criswell at cs.uiuc.edu Fri Jun 25 11:06:01 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Jun 25 11:06:01 2004 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200406251605.LAA12205@choi.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.68 -> 1.69 --- Log message: Grammar and punctuation fixes. --- Diffs of the changes: (+6 -6) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.68 llvm/docs/LangRef.html:1.69 --- llvm/docs/LangRef.html:1.68 Fri Jun 25 10:16:57 2004 +++ llvm/docs/LangRef.html Fri Jun 25 11:05:06 2004 @@ -831,16 +831,16 @@

                The switch instruction specifies a table of values and destinations. When the 'switch' instruction is executed, this -table is searched for the given value. If the value is found, the -corresponding destination is branched to, otherwise the default value -it transfered to.

                +table is searched for the given value. If the value is found, control flow is +transfered to the corresponding destination; otherwise, control flow is +transfered to the default destination.

                Implementation:

                Depending on properties of the target machine and the particular switch instruction, this instruction may be code generated in different -ways, for example as a series of chained conditional branches, or with a lookup -table.

                +ways. For example, it could be generated as a series of chained conditional +branches or with a lookup table.

                Example:
                @@ -2637,7 +2637,7 @@ Chris Lattner
                The LLVM Compiler Infrastructure
                - Last modified: $Date: 2004/06/25 15:16:57 $ + Last modified: $Date: 2004/06/25 16:05:06 $ From criswell at cs.uiuc.edu Fri Jun 25 11:44:01 2004 From: criswell at cs.uiuc.edu (John Criswell) Date: Fri Jun 25 11:44:01 2004 Subject: [llvm-commits] CVS: llvm/docs/LangRef.html Message-ID: <200406251643.LAA12254@choi.cs.uiuc.edu> Changes in directory llvm/docs: LangRef.html updated: 1.69 -> 1.70 --- Log message: Removed the interrupt_handler instrinsic section that I accidently added in my previous commits. It's not implemented and is out of date. --- Diffs of the changes: (+1 -48) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.69 llvm/docs/LangRef.html:1.70 --- llvm/docs/LangRef.html:1.69 Fri Jun 25 11:05:06 2004 +++ llvm/docs/LangRef.html Fri Jun 25 11:42:50 2004 @@ -2357,53 +2357,6 @@
                - - - -
                - -
                Syntax:
                -
                -  call void (void)* %llvm.interrupt_handler (void)
                -
                - -
                Overview:
                - -

                -The 'llvm.interrupt_handler' intrinsic installs the specified function -as an interrupt handler for the specified interrupt. -

                - -
                Arguments:
                - -

                -The first argument is the value to write to the memory mapped I/O location. -The second argument is a pointer indicating the memory address to which the -data should be written. -

                - -
                Semantics:
                - -

                -The 'llvm.writeio' intrinsic writes value to the memory mapped -I/O address specified by pointer. The value must be a -first class type. However, certain architectures -may not support I/O on all first class types. For example, 32 bit processors -may only support I/O on data types that are 32 bits or less. -

                - -

                -This intrinsic enforces an in-order memory model for llvm.readio and -llvm.writeio calls on machines that use dynamic scheduling. Dynamically -scheduled processors may execute loads and stores out of order, re-ordering at -run time accesses to memory mapped I/O registers. Using these intrinsics -ensures that accesses to memory mapped I/O registers occur in program order. -

                - -
                -
                Standard C Library Intrinsics @@ -2637,7 +2590,7 @@ Chris Lattner
                The LLVM Compiler Infrastructure
                - Last modified: $Date: 2004/06/25 16:05:06 $ + Last modified: $Date: 2004/06/25 16:42:50 $ From gaeke at cs.uiuc.edu Fri Jun 25 14:33:16 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 14:33:16 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/espresso.h getopt.c main.c Message-ID: <200406251932.OAA25857@kain.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso: espresso.h updated: 1.1 -> 1.2 getopt.c updated: 1.1 -> 1.2 main.c updated: 1.2 -> 1.3 --- Log message: Make this benchmark at least compile on Solaris. --- Diffs of the changes: (+3 -3) Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/espresso.h diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/espresso.h:1.1 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/espresso.h:1.2 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/espresso.h:1.1 Tue Feb 17 12:13:40 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/espresso.h Fri Jun 25 14:32:04 2004 @@ -620,7 +620,7 @@ /* gasp.c */ extern pcover last_gasp(); /* gasp.c */ extern pcover super_gasp(); /* gasp.c */ extern void expand1_gasp(); -/* getopt.c */ extern int getopt(); +/* getopt.c */ extern int espresso_getopt(); /* hack.c */ extern find_dc_inputs(); /* hack.c */ extern find_inputs(); /* hack.c */ extern form_bitvector(); Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/getopt.c diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/getopt.c:1.1 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/getopt.c:1.2 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/getopt.c:1.1 Tue Feb 17 12:13:40 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/getopt.c Fri Jun 25 14:32:04 2004 @@ -9,7 +9,7 @@ char *optarg; /* Global argument pointer. */ int optind = 0; /* Global argv index. */ -int getopt(argc, argv, optstring) +int espresso_getopt(argc, argv, optstring) int argc; char *argv[]; char *optstring; Index: llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/main.c diff -u llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/main.c:1.2 llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/main.c:1.3 --- llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/main.c:1.2 Mon Apr 5 13:22:14 2004 +++ llvm/test/Programs/MultiSource/Benchmarks/MallocBench/espresso/main.c Fri Jun 25 14:32:04 2004 @@ -66,7 +66,7 @@ /* parse command line options*/ - while ((i = getopt(argc, argv, "D:S:de:o:r:stv:x")) != EOF) { + while ((i = espresso_getopt(argc, argv, "D:S:de:o:r:stv:x")) != EOF) { switch(i) { case 'D': /* -Dcommand invokes a subcommand */ for(j = 0; option_table[j].name != 0; j++) { From lattner at cs.uiuc.edu Fri Jun 25 15:53:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 15:53:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp Message-ID: <200406252052.PAA22609@zion.cs.uiuc.edu> Changes in directory llvm/lib/Bytecode/Writer: Writer.cpp updated: 1.66 -> 1.67 --- Log message: No functionality changes here: * Some warning fixes for MSVC * Minor simplification to the deque scanning code --- Diffs of the changes: (+4 -7) Index: llvm/lib/Bytecode/Writer/Writer.cpp diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.66 llvm/lib/Bytecode/Writer/Writer.cpp:1.67 --- llvm/lib/Bytecode/Writer/Writer.cpp:1.66 Thu Jun 24 19:35:55 2004 +++ llvm/lib/Bytecode/Writer/Writer.cpp Fri Jun 25 15:52:10 2004 @@ -56,7 +56,7 @@ // Output the version identifier... we are currently on bytecode version #2, // which corresponds to LLVM v1.3. - unsigned Version = (2 << 4) | isBigEndian | (hasLongPointers << 1) | + unsigned Version = (2 << 4) | (unsigned)isBigEndian | (hasLongPointers << 1) | (hasNoEndianness << 2) | (hasNoPointerSize << 3); output_vbr(Version, Out); align32(Out); @@ -203,7 +203,7 @@ // Fields: bit0 = isConstant, bit1 = hasInitializer, bit2-4=Linkage, // bit5+ = Slot # for type unsigned oSlot = ((unsigned)Slot << 5) | (getEncodedLinkage(I) << 2) | - (I->hasInitializer() << 1) | I->isConstant(); + (I->hasInitializer() << 1) | (unsigned)I->isConstant(); output_vbr(oSlot, Out); // If we have an initializer, output it now. @@ -363,6 +363,7 @@ // sequential in memory, however, so write out as much as possible in big // chunks, until we're done. // + std::deque::const_iterator I = Buffer.begin(),E = Buffer.end(); while (I != E) { // Loop until it's all written // Scan to see how big this chunk is... @@ -370,16 +371,12 @@ const unsigned char *LastPtr = ChunkPtr; while (I != E) { const unsigned char *ThisPtr = &*++I; - if (LastPtr+1 != ThisPtr) { // Advanced by more than a byte of memory? - ++LastPtr; + if (++LastPtr != ThisPtr) // Advanced by more than a byte of memory? break; - } - LastPtr = ThisPtr; } // Write out the chunk... Out.write((char*)ChunkPtr, unsigned(LastPtr-ChunkPtr)); } - Out.flush(); } From lattner at cs.uiuc.edu Fri Jun 25 15:56:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 15:56:01 2004 Subject: [llvm-commits] CVS: llvm/tools/llvm-as/llvm-as.cpp Message-ID: <200406252054.PAA22964@zion.cs.uiuc.edu> Changes in directory llvm/tools/llvm-as: llvm-as.cpp updated: 1.27 -> 1.28 --- Log message: Write .bc files to binary ostreams. This shouldn't change anything on unix, but allows us to generate valid code on hosts (like windows) that do newline translation for text files. --- Diffs of the changes: (+4 -2) Index: llvm/tools/llvm-as/llvm-as.cpp diff -u llvm/tools/llvm-as/llvm-as.cpp:1.27 llvm/tools/llvm-as/llvm-as.cpp:1.28 --- llvm/tools/llvm-as/llvm-as.cpp:1.27 Thu May 27 00:38:45 2004 +++ llvm/tools/llvm-as/llvm-as.cpp Fri Jun 25 15:54:43 2004 @@ -73,7 +73,8 @@ << "Use -f command line argument to force output\n"; return 1; } - Out = new std::ofstream(OutputFilename.c_str()); + Out = new std::ofstream(OutputFilename.c_str(), std::ios_base::out | + std::ios_base::trunc | std::ios_base::binary); } else { // Specified stdout Out = &std::cout; } @@ -100,7 +101,8 @@ return 1; } - Out = new std::ofstream(OutputFilename.c_str()); + Out = new std::ofstream(OutputFilename.c_str(), std::ios_base::out | + std::ios_base::trunc | std::ios_base::binary); // Make sure that the Out file gets unlinked from the disk if we get a // SIGINT RemoveFileOnSignal(OutputFilename); From lattner at cs.uiuc.edu Fri Jun 25 15:58:00 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 15:58:00 2004 Subject: [llvm-commits] CVS: llvm/utils/NightlyTestTemplate.html Message-ID: <200406252057.PAA23373@zion.cs.uiuc.edu> Changes in directory llvm/utils: NightlyTestTemplate.html updated: 1.30 -> 1.31 --- Log message: Fix relative links for nightly testers not hosted on llvm.cs. Patch contributed by Vladimir Merzliakov! --- Diffs of the changes: (+2 -2) Index: llvm/utils/NightlyTestTemplate.html diff -u llvm/utils/NightlyTestTemplate.html:1.30 llvm/utils/NightlyTestTemplate.html:1.31 --- llvm/utils/NightlyTestTemplate.html:1.30 Tue Jun 22 10:32:02 2004 +++ llvm/utils/NightlyTestTemplate.html Fri Jun 25 15:57:19 2004 @@ -30,8 +30,8 @@

                Back to:
                -Test Results
                -LLVM Page

                +Test Results
                +LLVM Page

                From lattner at cs.uiuc.edu Fri Jun 25 16:01:00 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 16:01:00 2004 Subject: [llvm-commits] CVS: llvm/CREDITS.TXT Message-ID: <200406252100.QAA23786@zion.cs.uiuc.edu> Changes in directory llvm: CREDITS.TXT updated: 1.11 -> 1.12 --- Log message: Add credits entry --- Diffs of the changes: (+4 -0) Index: llvm/CREDITS.TXT diff -u llvm/CREDITS.TXT:1.11 llvm/CREDITS.TXT:1.12 --- llvm/CREDITS.TXT:1.11 Fri Jun 25 08:37:03 2004 +++ llvm/CREDITS.TXT Fri Jun 25 16:00:10 2004 @@ -45,6 +45,10 @@ W: http://nondot.org/~sabre/ D: Primary architect of LLVM +N: Vladimir Merzliakov +E: wanderer at rsu.ru +D: Test suite fixes for FreeBSD. + N: Vladimir Prus E: ghost at cs.msu.su D: Made inst_iterator behave like a proper iterator, LowerConstantExprs pass From lattner at cs.uiuc.edu Fri Jun 25 18:08:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 18:08:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/iTerminators.h Message-ID: <200406252307.SAA04403@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: iTerminators.h updated: 1.43 -> 1.44 --- Log message: new ReturnInst(BB) does not "do the right thing". Add an assert to catch it sooner rather than later. --- Diffs of the changes: (+2 -0) Index: llvm/include/llvm/iTerminators.h diff -u llvm/include/llvm/iTerminators.h:1.43 llvm/include/llvm/iTerminators.h:1.44 --- llvm/include/llvm/iTerminators.h:1.43 Tue Jun 8 17:03:05 2004 +++ llvm/include/llvm/iTerminators.h Fri Jun 25 18:06:57 2004 @@ -35,6 +35,8 @@ void init(Value *RetVal) { if (RetVal) { + assert(!isa(RetVal) && + "Cannot return basic block. Probably using the incorrect ctor"); Operands.reserve(1); Operands.push_back(Use(RetVal, this)); } From lattner at cs.uiuc.edu Fri Jun 25 18:11:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Fri Jun 25 18:11:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/iTerminators.h Message-ID: <200406252310.SAA05001@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm: iTerminators.h updated: 1.44 -> 1.45 --- Log message: Hey, why not just make 'new ReturnInst(BB)' DTRT? --- Diffs of the changes: (+3 -0) Index: llvm/include/llvm/iTerminators.h diff -u llvm/include/llvm/iTerminators.h:1.44 llvm/include/llvm/iTerminators.h:1.45 --- llvm/include/llvm/iTerminators.h:1.44 Fri Jun 25 18:06:57 2004 +++ llvm/include/llvm/iTerminators.h Fri Jun 25 18:10:30 2004 @@ -58,6 +58,9 @@ : TerminatorInst(Instruction::Ret, InsertAtEnd) { init(RetVal); } + ReturnInst(BasicBlock *InsertAtEnd) + : TerminatorInst(Instruction::Ret, InsertAtEnd) { + } virtual Instruction *clone() const { return new ReturnInst(*this); } From gaeke at cs.uiuc.edu Fri Jun 25 23:57:00 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 23:57:00 2004 Subject: [llvm-commits] CVS: reopt/test/run-tests Message-ID: <200406260456.XAA28309@kain.cs.uiuc.edu> Changes in directory reopt/test: run-tests updated: 1.8 -> 1.9 --- Log message: bzip2 and gzip are cint2000, not cfp2000 :-P --- Diffs of the changes: (+2 -2) Index: reopt/test/run-tests diff -u reopt/test/run-tests:1.8 reopt/test/run-tests:1.9 --- reopt/test/run-tests:1.8 Fri Jun 25 03:04:04 2004 +++ reopt/test/run-tests Fri Jun 25 23:56:15 2004 @@ -56,8 +56,8 @@ mcf) SUBDIR=External/SPEC/CINT2000/181.mcf; spectest=1 ;; art) SUBDIR=External/SPEC/CFP2000/179.art; spectest=1;; equake) SUBDIR=External/SPEC/CFP2000/183.equake; spectest=1 ;; - gzip) SUBDIR=External/SPEC/CFP2000/164.gzip; spectest=1 ;; - bzip2) SUBDIR=External/SPEC/CFP2000/256.bzip2; spectest=1 ;; + gzip) SUBDIR=External/SPEC/CINT2000/164.gzip; spectest=1 ;; + bzip2) SUBDIR=External/SPEC/CINT2000/256.bzip2; spectest=1 ;; *) die "Error: Unknown benchmark $arg" ;; esac From gaeke at cs.uiuc.edu Fri Jun 25 23:57:09 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Fri Jun 25 23:57:09 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Message-ID: <200406260456.XAA28302@kain.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: UnpackTraceFunction.cpp updated: 1.88 -> 1.89 --- Log message: In addLiveOutCopy, support copying a live-out from a spill slot on TraceFn's stack to a MatrixFn register. Other minor refactorings. --- Diffs of the changes: (+23 -19) Index: reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp diff -u reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.88 reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.89 --- reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp:1.88 Fri Jun 25 02:22:23 2004 +++ reopt/lib/LightWtProfiling/UnpackTraceFunction.cpp Fri Jun 25 23:56:14 2004 @@ -332,12 +332,13 @@ std::cerr << "copyConstantToRegister Output: " << **i << "\n"); } -void UnpackTraceFunction::addLiveOutCopy (MachineFunction &MF, MachineBasicBlock &MBB, - const AllocInfo &Source, const AllocInfo &Target, - Value *liveOutValue, Value *liveOutTraceValue) { +void UnpackTraceFunction::addLiveOutCopy (MachineFunction &MF, + MachineBasicBlock &MBB, const AllocInfo &Source, + const AllocInfo &Target, Value *liveOutValue, Value *liveOutTraceValue) { const SparcV9RegInfo &TRI = *TM->getRegInfo (); std::vector mvec; - static const unsigned sp = SparcV9::o6, g1 = SparcV9::g1, g2 = SparcV9::g2; + static const unsigned sp = SparcV9::o6, fp = SparcV9::i6, g1 = SparcV9::g1, + g2 = SparcV9::g2; assert (Target.AllocState == AllocInfo::Allocated && "Live-out values must be in regs in the matrixFn"); @@ -347,25 +348,28 @@ << RegStr (Target.Placement) << " to RegsToSave set\n"); RegsToSave.insert (Target.Placement); } + unsigned R = g1, RegType; + // We don't need to use a temp reg. if the live-out value is already + // in a register in the TraceFn. + if (Source.AllocState == AllocInfo::Allocated) + R = Source.Placement; + RegType = TRI.getRegType (R); if (Source.AllocState == AllocInfo::NotAllocated) { - assert (liveOutValue); - assert (isa (liveOutTraceValue) - && "Can't handle non-constant, non-allocated live-out value in traceFn"); - copyConstantToRegister (MF, cast (liveOutTraceValue), g1, g2, mvec); - unsigned R = g1; - unsigned RegType = TRI.getRegType (R); + assert (liveOutValue && isa (liveOutTraceValue) + && "Non-allocated live-out value in TraceFn must be constant"); DEBUG (std::cerr << "addLiveOutCopy: " << liveOutValue->getName() << " is a constant in TraceFn\n"); - TRI.cpReg2MemMI (mvec, R, sp, stackOffsetForReg (Target.Placement), - RegType, g2); - } else { - assert (Source.AllocState == AllocInfo::Allocated - && "Can't handle live-out value spilled in traceFn"); - unsigned R = Source.Placement; - unsigned RegType = TRI.getRegType (R); - TRI.cpReg2MemMI (mvec, R, sp, stackOffsetForReg (Target.Placement), - RegType, g2); + // Copy the constant to the register. + copyConstantToRegister (MF, cast (liveOutTraceValue), g1, + g2, mvec); + } else if (Source.AllocState == AllocInfo::Spilled) { + // Copy live-out value from TraceFn's stack to the register. + TRI.cpMem2RegMI (mvec, fp, Source.Placement, R, RegType, g2); } + // Copy the live-out value from the register to the place on the + // stack from which it will be restored to MatrixFn's register. + TRI.cpReg2MemMI (mvec, R, sp, stackOffsetForReg (Target.Placement), + RegType, g2); for (std::vector::iterator vi = mvec.begin (), ve = mvec.end (); vi != ve; ++vi) MBB.push_back (*vi); From llvm at cs.uiuc.edu Sat Jun 26 12:05:01 2004 From: llvm at cs.uiuc.edu (LLVM) Date: Sat Jun 26 12:05:01 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/RunSafely.sh Message-ID: <200406261704.MAA28302@zion.cs.uiuc.edu> Changes in directory llvm/test/Programs: RunSafely.sh updated: 1.12 -> 1.13 --- Log message: Make the "time" command output use POSIX standard format. This is the default on Linux but FreeBSD uses the BSD output format by default. Patch contributed by Vladimir Merzliakov! Thanks, Vladimir! --- Diffs of the changes: (+1 -1) Index: llvm/test/Programs/RunSafely.sh diff -u llvm/test/Programs/RunSafely.sh:1.12 llvm/test/Programs/RunSafely.sh:1.13 --- llvm/test/Programs/RunSafely.sh:1.12 Sat May 29 14:53:36 2004 +++ llvm/test/Programs/RunSafely.sh Sat Jun 26 12:01:12 2004 @@ -51,7 +51,7 @@ # we tell time to launch a shell which in turn executes $PROGRAM with the # necessary I/O redirection. # -(time sh -c "$PROGRAM $* > $OUTFILE 2>&1 < $INFILE") > $OUTFILE.time 2>&1 +(time -p sh -c "$PROGRAM $* > $OUTFILE 2>&1 < $INFILE") > $OUTFILE.time 2>&1 if test $? -eq 0 then From lattner at cs.uiuc.edu Sat Jun 26 13:59:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Jun 26 13:59:01 2004 Subject: [llvm-commits] CVS: llvm-www/header.incl Message-ID: <200406261858.NAA29343@zion.cs.uiuc.edu> Changes in directory llvm-www: header.incl updated: 1.19 -> 1.20 --- Log message: Add a link to bugzilla in the devresources section where I always look for it. :) --- Diffs of the changes: (+2 -1) Index: llvm-www/header.incl diff -u llvm-www/header.incl:1.19 llvm-www/header.incl:1.20 --- llvm-www/header.incl:1.19 Mon Jun 21 13:02:24 2004 +++ llvm-www/header.incl Sat Jun 26 13:58:20 2004 @@ -83,7 +83,8 @@ Dev. Resources:
                doxygen cvsweb
                - Nightly Tester + Nightly Tester
                + LLVM Bugzilla


                From lattner at cs.uiuc.edu Sat Jun 26 14:32:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Jun 26 14:32:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/Expressions.cpp Message-ID: <200406261931.OAA02322@zion.cs.uiuc.edu> Changes in directory llvm/lib/Analysis: Expressions.cpp updated: 1.41 -> 1.42 --- Log message: Simplify code --- Diffs of the changes: (+5 -12) Index: llvm/lib/Analysis/Expressions.cpp diff -u llvm/lib/Analysis/Expressions.cpp:1.41 llvm/lib/Analysis/Expressions.cpp:1.42 --- llvm/lib/Analysis/Expressions.cpp:1.41 Mon Jan 12 12:02:15 2004 +++ llvm/lib/Analysis/Expressions.cpp Sat Jun 26 14:31:26 2004 @@ -243,25 +243,18 @@ // ExprType llvm::ClassifyExpr(Value *Expr) { assert(Expr != 0 && "Can't classify a null expression!"); - if (Expr->getType() == Type::FloatTy || Expr->getType() == Type::DoubleTy) + if (Expr->getType()->isFloatingPoint()) return Expr; // FIXME: Can't handle FP expressions - switch (Expr->getValueType()) { - case Value::InstructionVal: break; // Instruction... hmmm... investigate. - case Value::TypeVal: case Value::BasicBlockVal: - case Value::FunctionVal: default: - //assert(0 && "Unexpected expression type to classify!"); - std::cerr << "Bizarre thing to expr classify: " << Expr << "\n"; - return Expr; - case Value::GlobalVariableVal: // Global Variable & Function argument: - case Value::ArgumentVal: // nothing known, return variable itself - return Expr; - case Value::ConstantVal: // Constant value, just return constant + if (Constant *C = dyn_cast(Expr)) { if (ConstantInt *CPI = dyn_cast(cast(Expr))) // It's an integral constant! return ExprType(CPI->isNullValue() ? 0 : CPI); return Expr; + } else if (!isa(Expr)) { + return Expr; } + Instruction *I = cast(Expr); const Type *Ty = I->getType(); From lattner at cs.uiuc.edu Sat Jun 26 14:37:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Jun 26 14:37:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Target/SparcV9/InstrSelection/InstrForest.cpp Message-ID: <200406261936.OAA06993@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Target/SparcV9/InstrSelection: InstrForest.cpp updated: 1.52 -> 1.53 --- Log message: There is no reason to print ValueType here --- Diffs of the changes: (+2 -6) Index: llvm/lib/Target/SparcV9/InstrSelection/InstrForest.cpp diff -u llvm/lib/Target/SparcV9/InstrSelection/InstrForest.cpp:1.52 llvm/lib/Target/SparcV9/InstrSelection/InstrForest.cpp:1.53 --- llvm/lib/Target/SparcV9/InstrSelection/InstrForest.cpp:1.52 Thu Jun 17 13:17:12 2004 +++ llvm/lib/Target/SparcV9/InstrSelection/InstrForest.cpp Sat Jun 26 14:36:34 2004 @@ -123,18 +123,14 @@ VRegNode::dumpNode(int indent) const { for (int i=0; i < indent; i++) std::cerr << " "; - - std::cerr << "VReg " << getValue() << "\t(type " - << (int) getValue()->getValueType() << ")" << "\n"; + std::cerr << "VReg " << getValue() << "\n"; } void ConstantNode::dumpNode(int indent) const { for (int i=0; i < indent; i++) std::cerr << " "; - - std::cerr << "Constant " << getValue() << "\t(type " - << (int) getValue()->getValueType() << ")" << "\n"; + std::cerr << "Constant " << getValue() << "\n"; } void LabelNode::dumpNode(int indent) const { From lattner at cs.uiuc.edu Sat Jun 26 14:41:00 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Jun 26 14:41:00 2004 Subject: [llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Message-ID: <200406261940.OAA07171@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: AsmWriter.cpp updated: 1.143 -> 1.144 --- Log message: Don't call getValueType directly. the LLVM optimizer will turn it into the same code anyway :) --- Diffs of the changes: (+12 -10) Index: llvm/lib/VMCore/AsmWriter.cpp diff -u llvm/lib/VMCore/AsmWriter.cpp:1.143 llvm/lib/VMCore/AsmWriter.cpp:1.144 --- llvm/lib/VMCore/AsmWriter.cpp:1.143 Mon Jun 21 16:53:56 2004 +++ llvm/lib/VMCore/AsmWriter.cpp Sat Jun 26 14:40:40 2004 @@ -1163,16 +1163,18 @@ CachedWriter &CachedWriter::operator<<(const Value *V) { assert(AW && SC && "CachedWriter does not have a current module!"); - switch (V->getValueType()) { - case Value::ConstantVal: - case Value::ArgumentVal: AW->writeOperand(V, true, true); break; - case Value::TypeVal: AW->write(cast(V)); break; - case Value::InstructionVal: AW->write(cast(V)); break; - case Value::BasicBlockVal: AW->write(cast(V)); break; - case Value::FunctionVal: AW->write(cast(V)); break; - case Value::GlobalVariableVal: AW->write(cast(V)); break; - default: Out << "getValueType() << '>'; break; - } + if (const Instruction *I = dyn_cast(V)) + AW->write(I); + else if (const BasicBlock *BB = dyn_cast(V)) + AW->write(BB); + else if (const Function *F = dyn_cast(V)) + AW->write(F); + else if (const GlobalVariable *GV = dyn_cast(V)) + AW->write(GV); + else if (const Type *Ty = dyn_cast(V)) + AW->write(Ty); + else + AW->writeOperand(V, true, true); return *this; } From lattner at cs.uiuc.edu Sat Jun 26 15:34:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Jun 26 15:34:01 2004 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Value.cpp Message-ID: <200406262033.PAA19988@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Value.cpp updated: 1.41 -> 1.42 --- Log message: Instancevar was renamed --- Diffs of the changes: (+2 -3) Index: llvm/lib/VMCore/Value.cpp diff -u llvm/lib/VMCore/Value.cpp:1.41 llvm/lib/VMCore/Value.cpp:1.42 --- llvm/lib/VMCore/Value.cpp:1.41 Fri Nov 21 14:23:48 2003 +++ llvm/lib/VMCore/Value.cpp Sat Jun 26 15:33:39 2004 @@ -28,9 +28,8 @@ return Ty; } -Value::Value(const Type *ty, ValueTy vty, const std::string &name) - : Name(name), Ty(checkType(ty)) { - VTy = vty; +Value::Value(const Type *ty, unsigned scid, const std::string &name) + : SubclassID(scid), Ty(checkType(ty)), Name(name) { } Value::~Value() { From lattner at cs.uiuc.edu Sat Jun 26 15:34:09 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Jun 26 15:34:09 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Value.h Message-ID: <200406262033.PAA19979@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: Value.h updated: 1.51 -> 1.52 --- Log message: Rearrange some code. --- Diffs of the changes: (+24 -17) Index: llvm/include/llvm/Value.h diff -u llvm/include/llvm/Value.h:1.51 llvm/include/llvm/Value.h:1.52 --- llvm/include/llvm/Value.h:1.51 Tue Jun 8 12:44:21 2004 +++ llvm/include/llvm/Value.h Sat Jun 26 15:33:27 2004 @@ -41,26 +41,17 @@ /// as operands to other values. /// struct Value { - enum ValueTy { - TypeVal, // This is an instance of Type - ConstantVal, // This is an instance of Constant - ArgumentVal, // This is an instance of Argument - InstructionVal, // This is an instance of Instruction - BasicBlockVal, // This is an instance of BasicBlock - FunctionVal, // This is an instance of Function - GlobalVariableVal, // This is an instance of GlobalVariable - }; - private: + unsigned SubclassID; // Subclass identifier (for isa/dyn_cast) + PATypeHolder Ty; iplist Uses; std::string Name; - PATypeHolder Ty; - ValueTy VTy; void operator=(const Value &); // Do not implement Value(const Value &); // Do not implement + public: - Value(const Type *Ty, ValueTy vty, const std::string &name = ""); + Value(const Type *Ty, unsigned scid, const std::string &name = ""); virtual ~Value(); /// dump - Support for debugging, callable in GDB: V->dump() @@ -83,10 +74,6 @@ Name = name; } - /// getValueType - Return the immediate subclass of this Value. - /// - inline ValueTy getValueType() const { return VTy; } - /// replaceAllUsesWith - Go through the uses list for this definition and make /// each use point to "V" instead of "this". After this completes, 'this's /// use list is guaranteed to be empty. @@ -126,6 +113,26 @@ /// void addUse(Use &U) { Uses.push_back(&U); } void killUse(Use &U) { Uses.remove(&U); } + + /// getValueType - Return an ID for the concrete type of this object. This is + /// used to implement the classof checks. This should not be used for any + /// other purpose, as the values may change as LLVM evolves. Also, note that + /// starting with the InstructionVal value, the value stored is actually the + /// Instruction opcode, so there are more than just these values possible here + /// (and Instruction must be last). + /// + enum ValueTy { + TypeVal, // This is an instance of Type + ArgumentVal, // This is an instance of Argument + BasicBlockVal, // This is an instance of BasicBlock + FunctionVal, // This is an instance of Function + GlobalVariableVal, // This is an instance of GlobalVariable + ConstantVal, // This is an instance of Constant + InstructionVal, // This is an instance of Instruction + }; + unsigned getValueType() const { + return SubclassID; + } }; inline std::ostream &operator<<(std::ostream &OS, const Value *V) { From lattner at cs.uiuc.edu Sat Jun 26 15:53:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sat Jun 26 15:53:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/User.h Instruction.h Message-ID: <200406262052.PAA30611@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: User.h updated: 1.28 -> 1.29 Instruction.h updated: 1.57 -> 1.58 --- Log message: Consider anything with a ValueType that is >= Instruction to be an instruction --- Diffs of the changes: (+3 -4) Index: llvm/include/llvm/User.h diff -u llvm/include/llvm/User.h:1.28 llvm/include/llvm/User.h:1.29 --- llvm/include/llvm/User.h:1.28 Sun Nov 16 14:21:15 2003 +++ llvm/include/llvm/User.h Sat Jun 26 15:51:50 2004 @@ -86,9 +86,8 @@ // Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const User *) { return true; } static inline bool classof(const Value *V) { - return V->getValueType() == Value::GlobalVariableVal || - V->getValueType() == Value::ConstantVal || - V->getValueType() == Value::InstructionVal; + return isa(V) || isa(V) || + isa(V); } }; Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.57 llvm/include/llvm/Instruction.h:1.58 --- llvm/include/llvm/Instruction.h:1.57 Thu Jun 10 22:06:43 2004 +++ llvm/include/llvm/Instruction.h Sat Jun 26 15:51:50 2004 @@ -138,7 +138,7 @@ /// Methods for support type inquiry through isa, cast, and dyn_cast: static inline bool classof(const Instruction *I) { return true; } static inline bool classof(const Value *V) { - return V->getValueType() == Value::InstructionVal; + return V->getValueType() >= Value::InstructionVal; } //---------------------------------------------------------------------- From lattner at cs.uiuc.edu Sun Jun 27 13:02:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:02:01 2004 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Value.cpp Message-ID: <200406271801.NAA15117@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Value.cpp updated: 1.42 -> 1.43 --- Log message: User ctor is now inline --- Diffs of the changes: (+0 -4) Index: llvm/lib/VMCore/Value.cpp diff -u llvm/lib/VMCore/Value.cpp:1.42 llvm/lib/VMCore/Value.cpp:1.43 --- llvm/lib/VMCore/Value.cpp:1.42 Sat Jun 26 15:33:39 2004 +++ llvm/lib/VMCore/Value.cpp Sun Jun 27 13:01:38 2004 @@ -86,10 +86,6 @@ // User Class //===----------------------------------------------------------------------===// -User::User(const Type *Ty, ValueTy vty, const std::string &name) - : Value(Ty, vty, name) { -} - // replaceUsesOfWith - Replaces all references to the "From" definition with // references to the "To" definition. // From lattner at cs.uiuc.edu Sun Jun 27 13:02:09 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:02:09 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/User.h Message-ID: <200406271801.NAA15103@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: User.h updated: 1.29 -> 1.30 --- Log message: Make ctor inline, change ValueTy ->unsigned --- Diffs of the changes: (+2 -1) Index: llvm/include/llvm/User.h diff -u llvm/include/llvm/User.h:1.29 llvm/include/llvm/User.h:1.30 --- llvm/include/llvm/User.h:1.29 Sat Jun 26 15:51:50 2004 +++ llvm/include/llvm/User.h Sun Jun 27 13:01:15 2004 @@ -29,7 +29,8 @@ protected: std::vector Operands; public: - User(const Type *Ty, ValueTy vty, const std::string &name = ""); + User(const Type *Ty, unsigned vty, const std::string &name = "") + : Value(Ty, vty, name) {} inline Value *getOperand(unsigned i) { assert(i < Operands.size() && "getOperand() out of range!"); From lattner at cs.uiuc.edu Sun Jun 27 13:23:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:23:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineCodeForInstruction.h Message-ID: <200406271821.NAA24464@zion.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineCodeForInstruction.h updated: 1.13 -> 1.14 --- Log message: Make it obvious that this file is bad bad bad --- Diffs of the changes: (+3 -0) Index: llvm/include/llvm/CodeGen/MachineCodeForInstruction.h diff -u llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.13 llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.14 --- llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.13 Sun Feb 29 13:02:26 2004 +++ llvm/include/llvm/CodeGen/MachineCodeForInstruction.h Sun Jun 27 13:21:20 2004 @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// // +// FIXME: This file is SparcV9 specific. Do not rely on this class for new +// targets, it will go away in the future. +// // Representation of the sequence of machine instructions created for a single // VM instruction. Additionally records information about hidden and implicit // values used by the machine instructions: about hidden values used by the From lattner at cs.uiuc.edu Sun Jun 27 13:37:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:37:01 2004 Subject: [llvm-commits] CVS: llvm/include/Support/Annotation.h Message-ID: <200406271836.NAA18767@apoc.cs.uiuc.edu> Changes in directory llvm/include/Support: Annotation.h updated: 1.14 -> 1.15 --- Log message: Get rid of Annotable's vtable. If anyone deletes an object through an Annotable*, they get what they deserve. This reduces the size of Instruction & Function by 4 bytes each. --- Diffs of the changes: (+1 -1) Index: llvm/include/Support/Annotation.h diff -u llvm/include/Support/Annotation.h:1.14 llvm/include/Support/Annotation.h:1.15 --- llvm/include/Support/Annotation.h:1.14 Thu Feb 26 01:23:53 2004 +++ llvm/include/Support/Annotation.h Sun Jun 27 13:36:39 2004 @@ -95,7 +95,7 @@ void operator=(const Annotable &); // Do not implement public: Annotable() : AnnotationList(0) {} - virtual ~Annotable(); // Virtual because it's designed to be subclassed... + ~Annotable(); // getAnnotation - Search the list for annotations of the specified ID. The // pointer returned is either null (if no annotations of the specified ID From lattner at cs.uiuc.edu Sun Jun 27 13:39:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:39:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Instruction.h Value.h Message-ID: <200406271838.NAA18781@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instruction.h updated: 1.58 -> 1.59 Value.h updated: 1.52 -> 1.53 --- Log message: Eliminate the Instruction::iType field, folding it into the Value::VTy field. This reduces the size of the instruction class by 4 bytes, and means that isa(V) (for example) only needs to do one load from memory instead of two. --- Diffs of the changes: (+15 -6) Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.58 llvm/include/llvm/Instruction.h:1.59 --- llvm/include/llvm/Instruction.h:1.58 Sat Jun 26 15:51:50 2004 +++ llvm/include/llvm/Instruction.h Sun Jun 27 13:38:24 2004 @@ -21,6 +21,7 @@ namespace llvm { struct AssemblyAnnotationWriter; +class BinaryOperator; template struct ilist_traits; template= BinaryOpsBegin && iType < BinaryOpsEnd; + return getOpcode() >= BinaryOpsBegin && getOpcode() < BinaryOpsEnd; } /// isAssociative - Return true if the instruction is associative: Index: llvm/include/llvm/Value.h diff -u llvm/include/llvm/Value.h:1.52 llvm/include/llvm/Value.h:1.53 --- llvm/include/llvm/Value.h:1.52 Sat Jun 26 15:33:27 2004 +++ llvm/include/llvm/Value.h Sun Jun 27 13:38:24 2004 @@ -133,6 +133,11 @@ unsigned getValueType() const { return SubclassID; } + +private: + /// FIXME: this is a gross hack, needed by another gross hack. Eliminate! + void setValueType(unsigned VT) { SubclassID = VT; } + friend class Instruction; }; inline std::ostream &operator<<(std::ostream &OS, const Value *V) { @@ -190,7 +195,7 @@ return Val.getValueType() == Value::ArgumentVal; } template <> inline bool isa_impl(const Value &Val) { - return Val.getValueType() == Value::InstructionVal; + return Val.getValueType() >= Value::InstructionVal; } template <> inline bool isa_impl(const Value &Val) { return Val.getValueType() == Value::BasicBlockVal; From lattner at cs.uiuc.edu Sun Jun 27 13:40:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:40:01 2004 Subject: [llvm-commits] CVS: llvm/lib/VMCore/Instruction.cpp iOperators.cpp Message-ID: <200406271838.NAA18794@apoc.cs.uiuc.edu> Changes in directory llvm/lib/VMCore: Instruction.cpp updated: 1.36 -> 1.37 iOperators.cpp updated: 1.28 -> 1.29 --- Log message: Fold iType into Value::VTy --- Diffs of the changes: (+8 -7) Index: llvm/lib/VMCore/Instruction.cpp diff -u llvm/lib/VMCore/Instruction.cpp:1.36 llvm/lib/VMCore/Instruction.cpp:1.37 --- llvm/lib/VMCore/Instruction.cpp:1.36 Wed May 26 16:41:09 2004 +++ llvm/lib/VMCore/Instruction.cpp Sun Jun 27 13:38:48 2004 @@ -25,9 +25,7 @@ Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name, Instruction *InsertBefore) - : User(ty, Value::InstructionVal, Name), - Parent(0), - iType(it) { + : User(ty, Value::InstructionVal + it, Name), Parent(0) { init(); // If requested, insert this instruction into a basic block... @@ -40,9 +38,7 @@ Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name, BasicBlock *InsertAtEnd) - : User(ty, Value::InstructionVal, Name), - Parent(0), - iType(it) { + : User(ty, Value::InstructionVal + it, Name), Parent(0) { init(); // append this instruction into the basic block @@ -50,6 +46,10 @@ InsertAtEnd->getInstList().push_back(this); } +void Instruction::setOpcode(unsigned opc) { + setValueType(Value::InstructionVal + opc); +} + void Instruction::setParent(BasicBlock *P) { if (getParent()) { if (!P) LeakDetector::addGarbageObject(this); Index: llvm/lib/VMCore/iOperators.cpp diff -u llvm/lib/VMCore/iOperators.cpp:1.28 llvm/lib/VMCore/iOperators.cpp:1.29 --- llvm/lib/VMCore/iOperators.cpp:1.28 Wed Jun 9 20:57:38 2004 +++ llvm/lib/VMCore/iOperators.cpp Sun Jun 27 13:38:48 2004 @@ -173,7 +173,8 @@ if (isCommutative()) ; // If the instruction is commutative, it is safe to swap the operands else if (SetCondInst *SCI = dyn_cast(this)) - iType = SCI->getSwappedCondition(); + /// FIXME: SetCC instructions shouldn't all have different opcodes. + setOpcode(SCI->getSwappedCondition()); else return true; // Can't commute operands From lattner at cs.uiuc.edu Sun Jun 27 13:52:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:52:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineFunctionInfo.h Message-ID: <200406271851.NAA28165@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineFunctionInfo.h updated: 1.4 -> 1.5 --- Log message: Add a map of MachineCodeForInstruction objects to MachineFunctionInfo --- Diffs of the changes: (+7 -1) Index: llvm/include/llvm/CodeGen/MachineFunctionInfo.h diff -u llvm/include/llvm/CodeGen/MachineFunctionInfo.h:1.4 llvm/include/llvm/CodeGen/MachineFunctionInfo.h:1.5 --- llvm/include/llvm/CodeGen/MachineFunctionInfo.h:1.4 Sat Dec 20 03:15:01 2003 +++ llvm/include/llvm/CodeGen/MachineFunctionInfo.h Sun Jun 27 13:50:30 2004 @@ -9,25 +9,29 @@ // // This class keeps track of information about the stack frame and about the // per-function constant pool. +// +// FIXME: This class is completely SparcV9 specific. Do not use it for future +// targets. This file will be eliminated in future versions of LLVM. // //===----------------------------------------------------------------------===// #ifndef LLVM_CODEGEN_MACHINEFUNCTIONINFO_H #define LLVM_CODEGEN_MACHINEFUNCTIONINFO_H +#include "llvm/CodeGen/MachineCodeForInstruction.h" #include "Support/HashExtras.h" #include "Support/hash_set" namespace llvm { class MachineFunction; -class Value; class Constant; class Type; class MachineFunctionInfo { hash_set constantsForConstPool; hash_map offsets; + unsigned staticStackSize; unsigned automaticVarsSize; unsigned regSpillsSize; @@ -41,6 +45,8 @@ MachineFunction &MF; public: + hash_map MCFIEntries; + MachineFunctionInfo(MachineFunction &mf) : MF(mf) { staticStackSize = automaticVarsSize = regSpillsSize = 0; maxOptionalArgsSize = maxOptionalNumArgs = currentTmpValuesSize = 0; From lattner at cs.uiuc.edu Sun Jun 27 13:52:08 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:52:08 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineCodeForInstruction.h Message-ID: <200406271851.NAA28150@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/CodeGen: MachineCodeForInstruction.h updated: 1.14 -> 1.15 --- Log message: This class is no longer an annotation --- Diffs of the changes: (+2 -5) Index: llvm/include/llvm/CodeGen/MachineCodeForInstruction.h diff -u llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.14 llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.15 --- llvm/include/llvm/CodeGen/MachineCodeForInstruction.h:1.14 Sun Jun 27 13:21:20 2004 +++ llvm/include/llvm/CodeGen/MachineCodeForInstruction.h Sun Jun 27 13:50:49 2004 @@ -28,7 +28,6 @@ #ifndef LLVM_CODEGEN_MACHINECODE_FOR_INSTRUCTION_H #define LLVM_CODEGEN_MACHINECODE_FOR_INSTRUCTION_H -#include "Support/Annotation.h" #include namespace llvm { @@ -38,14 +37,12 @@ class Value; class CallArgsDescriptor; -extern AnnotationID MCFI_AID; - -class MachineCodeForInstruction : public Annotation { + class MachineCodeForInstruction { std::vector tempVec; // used by m/c instr but not VM instr std::vector Contents; // the machine instr for this VM instr CallArgsDescriptor* callArgsDesc; // only used for CALL instructions public: - MachineCodeForInstruction() : Annotation(MCFI_AID), callArgsDesc(NULL) {} + MachineCodeForInstruction() : callArgsDesc(NULL) {} ~MachineCodeForInstruction(); static MachineCodeForInstruction &get(const Instruction *I); From lattner at cs.uiuc.edu Sun Jun 27 13:55:00 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:55:00 2004 Subject: [llvm-commits] CVS: llvm/lib/CodeGen/MachineCodeForInstruction.cpp Message-ID: <200406271852.NAA29487@apoc.cs.uiuc.edu> Changes in directory llvm/lib/CodeGen: MachineCodeForInstruction.cpp updated: 1.16 -> 1.17 --- Log message: Do not find these ugly sparc-specific objects by using the annotation API on instructions. Instead, keep a map of instructions -> MCFI objects in the already sparc-specific class MachineFunctionInfo. This will slow down the sparc backend a bit, but it does not penalize the rest of LLVM! --- Diffs of the changes: (+7 -21) Index: llvm/lib/CodeGen/MachineCodeForInstruction.cpp diff -u llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.16 llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.17 --- llvm/lib/CodeGen/MachineCodeForInstruction.cpp:1.16 Sat May 29 22:33:48 2004 +++ llvm/lib/CodeGen/MachineCodeForInstruction.cpp Sun Jun 27 13:52:17 2004 @@ -23,36 +23,22 @@ //===----------------------------------------------------------------------===// #include "llvm/CodeGen/MachineCodeForInstruction.h" +#include "llvm/Function.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/CodeGen/MachineFunction.h" +#include "llvm/CodeGen/MachineFunctionInfo.h" #include "../Target/SparcV9/MachineInstrAnnot.h" -#include "llvm/Instruction.h" using namespace llvm; MachineCodeForInstruction &MachineCodeForInstruction::get(const Instruction *I){ - return *(MachineCodeForInstruction*)I->getOrCreateAnnotation(MCFI_AID); + MachineFunction &MF = MachineFunction::get(I->getParent()->getParent()); + return MF.getInfo()->MCFIEntries[I]; } void MachineCodeForInstruction::destroy(const Instruction *I) { - I->deleteAnnotation(MCFI_AID); + MachineFunction &MF = MachineFunction::get(I->getParent()->getParent()); + MF.getInfo()->MCFIEntries.erase(I); } - - -AnnotationID llvm::MCFI_AID( - AnnotationManager::getID("CodeGen::MachineCodeForInstruction")); - -static Annotation *CreateMCFI(AnnotationID AID, const Annotable *, void *) { - assert(AID == MCFI_AID); - return new MachineCodeForInstruction(); // Invoke constructor! -} - -// Register the annotation with the annotation factory -static struct MCFIInitializer { - MCFIInitializer() { - AnnotationManager::registerAnnotationFactory(MCFI_AID, &CreateMCFI); - } -} RegisterCreateMCFI; - - void MachineCodeForInstruction::dropAllReferences() { From lattner at cs.uiuc.edu Sun Jun 27 13:58:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 13:58:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Instruction.h Message-ID: <200406271857.NAA04431@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm: Instruction.h updated: 1.59 -> 1.60 --- Log message: Now that the SparcV9 specific MachineCodeForInstruction class uses it's own map on the side, Instruction no longer has to be Annotable. This reduces the size of the Instruction class by another 4 bytes (on a 32-bit system). --- Diffs of the changes: (+1 -2) Index: llvm/include/llvm/Instruction.h diff -u llvm/include/llvm/Instruction.h:1.59 llvm/include/llvm/Instruction.h:1.60 --- llvm/include/llvm/Instruction.h:1.59 Sun Jun 27 13:38:24 2004 +++ llvm/include/llvm/Instruction.h Sun Jun 27 13:57:34 2004 @@ -16,7 +16,6 @@ #define LLVM_INSTRUCTION_H #include "llvm/User.h" -#include "Support/Annotation.h" namespace llvm { @@ -27,7 +26,7 @@ template class SymbolTableListTraits; -class Instruction : public User, public Annotable { +class Instruction : public User { BasicBlock *Parent; Instruction *Prev, *Next; // Next and Prev links for our intrusive linked list From lattner at cs.uiuc.edu Sun Jun 27 17:52:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 17:52:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp Message-ID: <200406272251.RAA01178@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.214 -> 1.215 --- Log message: Implement InstCombine/add.ll:test21 --- Diffs of the changes: (+6 -1) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.214 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.215 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.214 Fri Jun 18 01:07:51 2004 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Jun 27 17:51:36 2004 @@ -1520,10 +1520,15 @@ if (BinaryOperator *BO = dyn_cast(Op0)) { switch (BO->getOpcode()) { case Instruction::Add: - if (CI->isNullValue()) { + // Replace ((add A, B) != C) with (A != C-B) if B & C are constants. + if (ConstantInt *BOp1C = dyn_cast(BO->getOperand(1))) { + return new SetCondInst(I.getOpcode(), BO->getOperand(0), + ConstantExpr::getSub(CI, BOp1C)); + } else if (CI->isNullValue()) { // Replace ((add A, B) != 0) with (A != -B) if A or B is // efficiently invertible, or if the add has just this one use. Value *BOp0 = BO->getOperand(0), *BOp1 = BO->getOperand(1); + if (Value *NegVal = dyn_castNegVal(BOp1)) return new SetCondInst(I.getOpcode(), BOp0, NegVal); else if (Value *NegVal = dyn_castNegVal(BOp0)) From lattner at cs.uiuc.edu Sun Jun 27 17:52:10 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 17:52:10 2004 Subject: [llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/add.ll Message-ID: <200406272251.RAA01169@apoc.cs.uiuc.edu> Changes in directory llvm/test/Regression/Transforms/InstCombine: add.ll updated: 1.19 -> 1.20 --- Log message: new testcase --- Diffs of the changes: (+5 -0) Index: llvm/test/Regression/Transforms/InstCombine/add.ll diff -u llvm/test/Regression/Transforms/InstCombine/add.ll:1.19 llvm/test/Regression/Transforms/InstCombine/add.ll:1.20 --- llvm/test/Regression/Transforms/InstCombine/add.ll:1.19 Sat Apr 10 17:01:27 2004 +++ llvm/test/Regression/Transforms/InstCombine/add.ll Sun Jun 27 17:51:19 2004 @@ -130,3 +130,8 @@ ret int %tmp.4 } +bool %test21(uint %x) { + %t = add uint %x, 4 + %y = seteq uint %t, 123 + ret bool %y +} From lattner at cs.uiuc.edu Sun Jun 27 19:21:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:21:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/PgmDependenceGraph.h Message-ID: <200406280020.TAA12847@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: PgmDependenceGraph.h (r1.7) removed --- Log message: Moved to lib/Analysis/DataStructure --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Sun Jun 27 19:21:09 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:21:09 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h Parallelize.cpp PgmDependenceGraph.cpp Message-ID: <200406280020.TAA11705@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: PgmDependenceGraph.h added (r1.1) Parallelize.cpp updated: 1.14 -> 1.15 PgmDependenceGraph.cpp updated: 1.4 -> 1.5 --- Log message: Move PgmDependenceGraph.h out of the public include hierarchy --- Diffs of the changes: (+304 -2) Index: llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h diff -c /dev/null llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h:1.1 *** /dev/null Sun Jun 27 19:20:14 2004 --- llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h Sun Jun 27 19:20:04 2004 *************** *** 0 **** --- 1,302 ---- + //===- PgmDependenceGraph.h - Enumerate the PDG for a function --*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // The Program Dependence Graph (PDG) for a single function represents all + // data and control dependences for the function. This file provides an + // iterator to enumerate all these dependences. In particular, it enumerates: + // + // -- Data dependences on memory locations, computed using the + // MemoryDepAnalysis pass; + // -- Data dependences on SSA registers, directly from Def-Use edges of Values; + // -- Control dependences, computed using postdominance frontiers + // (NOT YET IMPLEMENTED). + // + // Note that this file does not create an explicit dependence graph -- + // it only provides an iterator to traverse the PDG conceptually. + // The MemoryDepAnalysis does build an explicit graph, which is used internally + // here. That graph could be augmented with the other dependences above if + // desired, but for most uses there will be little need to do that. + // + // Key Classes: + // + // enum PDGIteratorFlags -- Specify which dependences to enumerate. + // + // class PDGIterator -- The PDG iterator. This is essentially like a + // pointer to class Dependence, but doesn't explicitly + // construct a Dependence object for each dependence. + // + // class PgmDependenceGraph -- Interface to obtain PDGIterators for each + // instruction. + // + //===----------------------------------------------------------------------===// + + #ifndef LLVM_ANALYSIS_PGMDEPENDENCEGRAPH_H + #define LLVM_ANALYSIS_PGMDEPENDENCEGRAPH_H + + #include "llvm/Analysis/DependenceGraph.h" + #include "llvm/Analysis/MemoryDepAnalysis.h" + /* #include "llvm/Analysis/PostDominators.h" -- see below */ + #include "llvm/Instruction.h" + #include "llvm/Pass.h" + #include "Support/iterator" + + namespace llvm { + + class DSGraph; + class DependenceGraph; + class PgmDependenceGraph; + + //--------------------------------------------------------------------------- + /// enum PDGIteratorFlags - specify which dependences incident on a statement + /// are to be enumerated: Memory deps, SSA deps, Control deps, or any + /// combination thereof. + /// + enum PDGIteratorFlags { + MemoryDeps = 0x1, // load/store/call deps + SSADeps = 0x2, // SSA deps (true) + ControlDeps = /* 0x4*/ 0x0, // control dependences + AllDataDeps = MemoryDeps | SSADeps, // shorthand for data deps + AllDeps = MemoryDeps | SSADeps | ControlDeps // shorthand for all three + }; + + //--------------------------------------------------------------------------- + /// struct DepIterState - an internal implementation detail. + /// It are exposed here only to give inlinable access to field dep, + /// which is the representation for the current dependence pointed to by + /// a PgmDependenceGraph::iterator. + /// + class DepIterState { + private: + typedef char IterStateFlags; + static const IterStateFlags NoFlag, MemDone, SSADone, AllDone, FirstTimeFlag; + + public: + DepGraphNode* depNode; // the node being enumerated + DependenceGraph::iterator memDepIter; // pointer to current memory dep + Instruction::op_iterator ssaInEdgeIter; // pointer to current SSA in-dep + Value::use_iterator ssaOutEdgeIter; // pointer to current SSA out-dep + DependenceGraph* memDepGraph; // the core dependence graph + Dependence dep; // the "current" dependence + PDGIteratorFlags depFlags:8; // which deps are we enumerating? + IterStateFlags iterFlags:8; // marking where the iter stands + + DepIterState(DependenceGraph* _memDepGraph, + Instruction& I, + bool incomingDeps, + PDGIteratorFlags whichDeps); + + bool operator==(const DepIterState& S) { + assert(memDepGraph == S.memDepGraph && + "Incompatible iterators! This is a probable sign of something BAD."); + return (iterFlags == S.iterFlags && + dep == S.dep && depFlags == S.depFlags && depNode == S.depNode && + memDepIter == S.memDepIter && ssaInEdgeIter == S.ssaInEdgeIter && + ssaOutEdgeIter == S.ssaOutEdgeIter); + } + + // Is the iteration completely done? + // + bool done() const { return iterFlags & AllDone; } + + /// Next - Bump this iterator logically by 1 (to next dependence) and reset + /// the dep field to represent the new dependence if there is one. + /// Set done = true otherwise. + /// + void Next(); + + /// SetFirstMemoryDep - Find the first memory dependence for the current Mem + /// In/Out iterators. Sets dep to that dependence and returns true if one is + /// found. Returns false and leaves dep unchanged otherwise. + /// + bool SetFirstMemoryDep(); + + /// SetFirstSSADep - Find the next valid data dependence for the current SSA + /// In/Out iterators. A valid data dependence is one that is to/from an + /// Instruction. E.g., an SSA edge from a formal parameter is not a valid + /// dependence. Sets dep to that dependence and returns true if a valid one is + /// found. Returns false and leaves dep unchanged otherwise. + /// + bool SetFirstSSADep(); + }; + + + //--------------------------------------------------------------------------- + /// PDGIterator Class - represents a pointer to a single dependence in the + /// program dependence graph. It is essentially like a pointer to an object of + /// class Dependence but it is much more efficient to retrieve information about + /// the dependence directly rather than constructing the equivalent Dependence + /// object (since that object is normally not constructed for SSA def-use + /// dependences). + /// + class PDGIterator: public forward_iterator { + DepIterState* istate; + + #if 0 + /*copy*/ PDGIterator (const PDGIterator& I); // do not implement! + PDGIterator& operator= (const PDGIterator& I); // do not implement! + + /*copy*/ PDGIterator (PDGIterator& I) : istate(I.istate) { + I.istate = NULL; // ensure this is not deleted twice. + } + #endif + + friend class PgmDependenceGraph; + + public: + typedef PDGIterator _Self; + + PDGIterator(DepIterState* _istate) : istate(_istate) {} + ~PDGIterator() { delete istate; } + + PDGIterator(const PDGIterator& I) :istate(new DepIterState(*I.istate)) {} + + PDGIterator& operator=(const PDGIterator& I) { + if (istate) delete istate; + istate = new DepIterState(*I.istate); + return *this; + } + + /// fini - check if the iteration is complete + /// + bool fini() const { return !istate || istate->done(); } + + // Retrieve the underlying Dependence. Returns NULL if fini(). + // + Dependence* operator*() const { return fini() ? NULL : &istate->dep; } + Dependence* operator->() const { assert(!fini()); return &istate->dep; } + + // Increment the iterator + // + _Self& operator++() { if (!fini()) istate->Next(); return *this;} + _Self& operator++(int); // do not implement! + + // Equality comparison: a "null" state should compare equal to done + // This is efficient for comparing with "end" or with itself, but could + // be quite inefficient for other cases. + // + bool operator==(const PDGIterator& I) const { + if (I.istate == NULL) // most common case: iter == end() + return (istate == NULL || istate->done()); + if (istate == NULL) + return (I.istate == NULL || I.istate->done()); + return (*istate == *I.istate); + } + bool operator!=(const PDGIterator& I) const { + return ! (*this == I); + } + }; + + + ///--------------------------------------------------------------------------- + /// class PgmDependenceGraph: + /// + /// This pass enumerates dependences incident on each instruction in a function. + /// It can be made a FunctionPass once a Pass (such as Parallelize) is + /// allowed to use a FunctionPass such as this one. + ///--------------------------------------------------------------------------- + + class PgmDependenceGraph: public Pass { + + /// Information about the function being analyzed. + /// + DependenceGraph* memDepGraph; + + // print helper function. + void printOutgoingSSADeps(Instruction& I, std::ostream &O); + + /// MakeIterator - creates and initializes an iterator as specified. + /// + PDGIterator MakeIterator(Instruction& I, + bool incomingDeps, + PDGIteratorFlags whichDeps); + + /// MakeIterator - creates a null iterator representing end-of-iteration. + /// + PDGIterator MakeIterator() { return PDGIterator(NULL); } + + friend class PDGIterator; + friend class DepIterState; + + public: + typedef PDGIterator iterator; + /* typedef PDGIterator const iterator; */ + + public: + PgmDependenceGraph() : memDepGraph(NULL) {} + ~PgmDependenceGraph() {} + + /// Iterators to enumerate the program dependence graph for a function. + /// Note that this does not provide "end" iterators to check for completion. + /// Instead, just use iterator::fini() or iterator::operator*() == NULL + /// + iterator inDepBegin(Instruction& I, PDGIteratorFlags whichDeps = AllDeps) { + return MakeIterator(I, /*inDeps*/ true, whichDeps); + } + iterator inDepEnd (Instruction& I, PDGIteratorFlags whichDeps = AllDeps) { + return MakeIterator(); + } + iterator outDepBegin(Instruction& I, PDGIteratorFlags whichDeps = AllDeps) { + return MakeIterator(I, /*inDeps*/ false, whichDeps); + } + iterator outDepEnd (Instruction& I, PDGIteratorFlags whichDeps = AllDeps) { + return MakeIterator(); + } + + //------------------------------------------------------------------------ + /// TEMPORARY FUNCTIONS TO MAKE THIS A MODULE PASS --- + /// These functions will go away once this class becomes a FunctionPass. + + /// Driver function to compute dependence graphs for every function. + /// + bool run(Module& M) { return true; } + + /// getGraph() -- Retrieve the pgm dependence graph for a function. + /// This is temporary and will go away once this is a FunctionPass. + /// At that point, this class itself will be the PgmDependenceGraph you want. + /// + PgmDependenceGraph& getGraph(Function& F) { + Visiting(F); + return *this; + } + + private: + void Visiting(Function& F) { + memDepGraph = &getAnalysis().getGraph(F); + } + public: + ///----END TEMPORARY FUNCTIONS--------------------------------------------- + + + /// This initializes the program dependence graph iterator for a function. + /// + bool runOnFunction(Function& func) { + Visiting(func); + return true; + } + + /// getAnalysisUsage - This does not modify anything. + /// It uses the Memory Dependence Analysis pass. + /// It needs to use the PostDominanceFrontier pass, but cannot because + /// that is a FunctionPass. This means control dependence are not emumerated. + /// + void getAnalysisUsage(AnalysisUsage &AU) const { + AU.setPreservesAll(); + AU.addRequired(); + /* AU.addRequired(); */ + } + + /// Debugging support methods + /// + void print(std::ostream &O) const; + void dump() const; + }; + + } // End llvm namespace + + #endif Index: llvm/lib/Analysis/DataStructure/Parallelize.cpp diff -u llvm/lib/Analysis/DataStructure/Parallelize.cpp:1.14 llvm/lib/Analysis/DataStructure/Parallelize.cpp:1.15 --- llvm/lib/Analysis/DataStructure/Parallelize.cpp:1.14 Sat Mar 13 20:13:38 2004 +++ llvm/lib/Analysis/DataStructure/Parallelize.cpp Sun Jun 27 19:20:04 2004 @@ -41,7 +41,7 @@ #include "llvm/DerivedTypes.h" #include "llvm/Instructions.h" #include "llvm/Module.h" -#include "llvm/Analysis/PgmDependenceGraph.h" +#include "PgmDependenceGraph.h" #include "llvm/Analysis/DataStructure.h" #include "llvm/Analysis/DSGraph.h" #include "llvm/Support/InstVisitor.h" Index: llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp diff -u llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp:1.4 llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp:1.5 --- llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp:1.4 Tue Nov 11 16:41:32 2003 +++ llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp Sun Jun 27 19:20:04 2004 @@ -25,7 +25,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Analysis/PgmDependenceGraph.h" +#include "PgmDependenceGraph.h" #include "llvm/Analysis/MemoryDepAnalysis.h" #include "llvm/Analysis/PostDominators.h" #include "llvm/Function.h" From lattner at cs.uiuc.edu Sun Jun 27 19:28:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:28:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/MemoryDepAnalysis.h Message-ID: <200406280027.TAA17662@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: MemoryDepAnalysis.h (r1.8) removed --- Log message: Moved to lib/Analysis/DataStructure --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Sun Jun 27 19:28:10 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:28:10 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h MemoryDepAnalysis.cpp PgmDependenceGraph.cpp PgmDependenceGraph.h Message-ID: <200406280027.TAA17639@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: MemoryDepAnalysis.h added (r1.1) MemoryDepAnalysis.cpp updated: 1.13 -> 1.14 PgmDependenceGraph.cpp updated: 1.5 -> 1.6 PgmDependenceGraph.h updated: 1.1 -> 1.2 --- Log message: Move MemoryDepAnalysis.h into lib/Analysis/DataStructure --- Diffs of the changes: (+105 -3) Index: llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h diff -c /dev/null llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h:1.1 *** /dev/null Sun Jun 27 19:27:26 2004 --- llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h Sun Jun 27 19:27:15 2004 *************** *** 0 **** --- 1,103 ---- + //===- MemoryDepAnalysis.h - Compute dep graph for memory ops ---*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file provides a pass (MemoryDepAnalysis) that computes memory-based + // data dependences between instructions for each function in a module. + // Memory-based dependences occur due to load and store operations, but + // also the side-effects of call instructions. + // + // The result of this pass is a DependenceGraph for each function + // representing the memory-based data dependences between instructions. + // + //===----------------------------------------------------------------------===// + + #ifndef LLVM_ANALYSIS_MEMORYDEPANALYSIS_H + #define LLVM_ANALYSIS_MEMORYDEPANALYSIS_H + + #include "llvm/Analysis/DependenceGraph.h" + #include "llvm/Pass.h" + #include "Support/hash_map" + + namespace llvm { + + class ModRefTable; + class DSGraph; + class FunctionModRefInfo; + + ///--------------------------------------------------------------------------- + /// class MemoryDepGraph: + /// Dependence analysis for load/store/call instructions using IPModRef info + /// computed at the granularity of individual DSGraph nodes. + /// + /// This pass computes memory dependences for each function in a module. + /// It can be made a FunctionPass once a Pass (such as Parallelize) is + /// allowed to use a FunctionPass such as this one. + ///--------------------------------------------------------------------------- + + class MemoryDepAnalysis : public Pass { + /// The following map and depGraph pointer are temporary until this class + /// becomes a FunctionPass instead of a module Pass. + hash_map funcMap; + DependenceGraph* funcDepGraph; + + /// Information about one function being analyzed. + const DSGraph* funcGraph; + const FunctionModRefInfo* funcModRef; + + /// Internal routine that processes each SCC of the CFG. + /// + void ProcessSCC(std::vector &SCC, ModRefTable& ModRefAfter, + bool HasLoop); + + friend class PgmDependenceGraph; + + public: + MemoryDepAnalysis() : funcDepGraph(0), funcGraph(0), funcModRef(0) {} + ~MemoryDepAnalysis(); + + /// Driver function to compute dependence graphs for every function. + /// + bool run(Module &M); + + /// getGraph - Retrieve the dependence graph for a function. + /// This is temporary and will go away once this is a FunctionPass. + /// At that point, this class should directly inherit from DependenceGraph. + /// + DependenceGraph& getGraph(Function& F) { + hash_map::iterator I = funcMap.find(&F); + assert(I != funcMap.end()); + return *I->second; + } + const DependenceGraph& getGraph(Function& F) const { + hash_map::const_iterator I = funcMap.find(&F); + assert(I != funcMap.end()); + return *I->second; + } + + /// Release depGraphs held in the Function -> DepGraph map. + /// + virtual void releaseMemory(); + + /// Driver functions to compute the Load/Store Dep. Graph per function. + /// + bool runOnFunction(Function &F); + + /// getAnalysisUsage - This does not modify anything. It uses the Top-Down DS + /// Graph and IPModRef. + void getAnalysisUsage(AnalysisUsage &AU) const; + + /// Debugging support methods + /// + void print(std::ostream &O) const; + void dump() const; + }; + + } // End llvm namespace + + #endif Index: llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp diff -u llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp:1.13 llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp:1.14 --- llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp:1.13 Thu Mar 11 18:58:41 2004 +++ llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp Sun Jun 27 19:27:15 2004 @@ -17,7 +17,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Analysis/MemoryDepAnalysis.h" +#include "MemoryDepAnalysis.h" #include "llvm/Module.h" #include "llvm/iMemory.h" #include "llvm/iOther.h" Index: llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp diff -u llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp:1.5 llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp:1.6 --- llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp:1.5 Sun Jun 27 19:20:04 2004 +++ llvm/lib/Analysis/DataStructure/PgmDependenceGraph.cpp Sun Jun 27 19:27:16 2004 @@ -26,7 +26,6 @@ //===----------------------------------------------------------------------===// #include "PgmDependenceGraph.h" -#include "llvm/Analysis/MemoryDepAnalysis.h" #include "llvm/Analysis/PostDominators.h" #include "llvm/Function.h" Index: llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h diff -u llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h:1.1 llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h:1.2 --- llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h:1.1 Sun Jun 27 19:20:04 2004 +++ llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h Sun Jun 27 19:27:16 2004 @@ -40,7 +40,7 @@ #define LLVM_ANALYSIS_PGMDEPENDENCEGRAPH_H #include "llvm/Analysis/DependenceGraph.h" -#include "llvm/Analysis/MemoryDepAnalysis.h" +#include "MemoryDepAnalysis.h" /* #include "llvm/Analysis/PostDominators.h" -- see below */ #include "llvm/Instruction.h" #include "llvm/Pass.h" From lattner at cs.uiuc.edu Sun Jun 27 19:30:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:30:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/IPA/DependenceGraph.cpp Message-ID: <200406280029.TAA19665@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/IPA: DependenceGraph.cpp (r1.5) removed --- Log message: Moving to lib/Analysis/DataStructure --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Sun Jun 27 19:31:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:31:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/DependenceGraph.h Message-ID: <200406280030.TAA21154@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: DependenceGraph.h (r1.10) removed --- Log message: Moved to lib/analysis/datastructure --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Sun Jun 27 19:33:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:33:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DependenceGraph.cpp DependenceGraph.h MemoryDepAnalysis.h PgmDependenceGraph.h Message-ID: <200406280032.TAA21896@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: DependenceGraph.cpp added (r1.1) DependenceGraph.h added (r1.1) MemoryDepAnalysis.h updated: 1.1 -> 1.2 PgmDependenceGraph.h updated: 1.2 -> 1.3 --- Log message: Move DependenceGraph.* to lib/Analysis/DataStructure --- Diffs of the changes: (+343 -2) Index: llvm/lib/Analysis/DataStructure/DependenceGraph.cpp diff -c /dev/null llvm/lib/Analysis/DataStructure/DependenceGraph.cpp:1.1 *** /dev/null Sun Jun 27 19:32:43 2004 --- llvm/lib/Analysis/DataStructure/DependenceGraph.cpp Sun Jun 27 19:32:33 2004 *************** *** 0 **** --- 1,87 ---- + //===- DependenceGraph.cpp - Dependence graph for a function ----*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file implements an explicit representation for the dependence graph + // of a function, with one node per instruction and one edge per dependence. + // Dependences include both data and control dependences. + // + // Each dep. graph node (class DepGraphNode) keeps lists of incoming and + // outgoing dependence edges. + // + // Each dep. graph edge (class Dependence) keeps a pointer to one end-point + // of the dependence. This saves space and is important because dep. graphs + // can grow quickly. It works just fine because the standard idiom is to + // start with a known node and enumerate the dependences to or from that node. + //===----------------------------------------------------------------------===// + + + #include "DependenceGraph.h" + #include "llvm/Function.h" + + namespace llvm { + + //---------------------------------------------------------------------------- + // class Dependence: + // + // A representation of a simple (non-loop-related) dependence + //---------------------------------------------------------------------------- + + void Dependence::print(std::ostream &O) const + { + assert(depType != NoDependence && "This dependence should never be created!"); + switch (depType) { + case TrueDependence: O << "TRUE dependence"; break; + case AntiDependence: O << "ANTI dependence"; break; + case OutputDependence: O << "OUTPUT dependence"; break; + case ControlDependence: O << "CONTROL dependence"; break; + default: assert(0 && "Invalid dependence type"); break; + } + } + + + //---------------------------------------------------------------------------- + // class DepGraphNode + //---------------------------------------------------------------------------- + + void DepGraphNode::print(std::ostream &O) const + { + const_iterator DI = outDepBegin(), DE = outDepEnd(); + + O << "\nDeps. from instr:" << getInstr(); + + for ( ; DI != DE; ++DI) + { + O << "\t"; + DI->print(O); + O << " to instruction:"; + O << DI->getSink()->getInstr(); + } + } + + //---------------------------------------------------------------------------- + // class DependenceGraph + //---------------------------------------------------------------------------- + + DependenceGraph::~DependenceGraph() + { + // Free all DepGraphNode objects created for this graph + for (map_iterator I = depNodeMap.begin(), E = depNodeMap.end(); I != E; ++I) + delete I->second; + } + + void DependenceGraph::print(const Function& func, std::ostream &O) const + { + O << "DEPENDENCE GRAPH FOR FUNCTION " << func.getName() << ":\n"; + for (Function::const_iterator BB=func.begin(), FE=func.end(); BB != FE; ++BB) + for (BasicBlock::const_iterator II=BB->begin(), IE=BB->end(); II !=IE; ++II) + if (const DepGraphNode* dgNode = this->getNode(*II)) + dgNode->print(O); + } + + } // End llvm namespace Index: llvm/lib/Analysis/DataStructure/DependenceGraph.h diff -c /dev/null llvm/lib/Analysis/DataStructure/DependenceGraph.h:1.1 *** /dev/null Sun Jun 27 19:32:43 2004 --- llvm/lib/Analysis/DataStructure/DependenceGraph.h Sun Jun 27 19:32:33 2004 *************** *** 0 **** --- 1,255 ---- + //===- DependenceGraph.h - Dependence graph for a function ------*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // This file provides an explicit representation for the dependence graph + // of a function, with one node per instruction and one edge per dependence. + // Dependences include both data and control dependences. + // + // Each dep. graph node (class DepGraphNode) keeps lists of incoming and + // outgoing dependence edges. + // + // Each dep. graph edge (class Dependence) keeps a pointer to one end-point + // of the dependence. This saves space and is important because dep. graphs + // can grow quickly. It works just fine because the standard idiom is to + // start with a known node and enumerate the dependences to or from that node. + // + //===----------------------------------------------------------------------===// + + #ifndef LLVM_ANALYSIS_DEPENDENCEGRAPH_H + #define LLVM_ANALYSIS_DEPENDENCEGRAPH_H + + #include "Support/hash_map" + #include + #include + #include + #include + + namespace llvm { + + class Instruction; + class Function; + class Dependence; + class DepGraphNode; + class DependenceGraph; + + //---------------------------------------------------------------------------- + /// enum DependenceType - The standard data dependence types + /// + enum DependenceType { + NoDependence = 0x0, + TrueDependence = 0x1, + AntiDependence = 0x2, + OutputDependence = 0x4, + ControlDependence = 0x8, // from a terminator to some other instr. + IncomingFlag = 0x10 // is this an incoming or outgoing dep? + }; + + //---------------------------------------------------------------------------- + /// Dependence Class - A representation of a simple (non-loop-related) + /// dependence. + /// + class Dependence { + DepGraphNode* toOrFromNode; + unsigned char depType; + + public: + Dependence(DepGraphNode* toOrFromN, DependenceType type, bool isIncoming) + : toOrFromNode(toOrFromN), + depType(type | (isIncoming? IncomingFlag : 0x0)) { } + + Dependence(const Dependence& D) : toOrFromNode(D.toOrFromNode), + depType(D.depType) { } + + bool operator==(const Dependence& D) const { + return toOrFromNode == D.toOrFromNode && depType == D.depType; + } + + /// Get information about the type of dependence. + /// + unsigned getDepType() const { + return depType; + } + + /// Get source or sink depending on what type of node this is! + /// + DepGraphNode* getSrc() { + assert(depType & IncomingFlag); return toOrFromNode; + } + const DepGraphNode* getSrc() const { + assert(depType & IncomingFlag); return toOrFromNode; + } + + DepGraphNode* getSink() { + assert(! (depType & IncomingFlag)); return toOrFromNode; + } + const DepGraphNode* getSink() const { + assert(! (depType & IncomingFlag)); return toOrFromNode; + } + + /// Debugging support methods + /// + void print(std::ostream &O) const; + + // Default constructor: Do not use directly except for graph builder code + // + Dependence() : toOrFromNode(NULL), depType(NoDependence) { } + }; + + #ifdef SUPPORTING_LOOP_DEPENDENCES + struct LoopDependence: public Dependence { + DependenceDirection dir; + int distance; + short level; + LoopInfo* enclosingLoop; + }; + #endif + + + //---------------------------------------------------------------------------- + /// DepGraphNode Class - A representation of a single node in a dependence + /// graph, corresponding to a single instruction. + /// + class DepGraphNode { + Instruction* instr; + std::vector inDeps; + std::vector outDeps; + friend class DependenceGraph; + + typedef std::vector:: iterator iterator; + typedef std::vector::const_iterator const_iterator; + + iterator inDepBegin() { return inDeps.begin(); } + const_iterator inDepBegin() const { return inDeps.begin(); } + iterator inDepEnd() { return inDeps.end(); } + const_iterator inDepEnd() const { return inDeps.end(); } + + iterator outDepBegin() { return outDeps.begin(); } + const_iterator outDepBegin() const { return outDeps.begin(); } + iterator outDepEnd() { return outDeps.end(); } + const_iterator outDepEnd() const { return outDeps.end(); } + + public: + DepGraphNode(Instruction& I) : instr(&I) { } + + Instruction& getInstr() { return *instr; } + const Instruction& getInstr() const { return *instr; } + + /// Debugging support methods + /// + void print(std::ostream &O) const; + }; + + + //---------------------------------------------------------------------------- + /// DependenceGraph Class - A representation of a dependence graph for a + /// procedure. The primary query operation here is to look up a DepGraphNode for + /// a particular instruction, and then use the in/out dependence iterators + /// for the node. + /// + class DependenceGraph { + DependenceGraph(const DependenceGraph&); // DO NOT IMPLEMENT + void operator=(const DependenceGraph&); // DO NOT IMPLEMENT + + typedef hash_map DepNodeMapType; + typedef DepNodeMapType:: iterator map_iterator; + typedef DepNodeMapType::const_iterator const_map_iterator; + + DepNodeMapType depNodeMap; + + inline DepGraphNode* getNodeInternal(Instruction& inst, + bool createIfMissing = false) { + map_iterator I = depNodeMap.find(&inst); + if (I == depNodeMap.end()) + return (!createIfMissing)? NULL : + depNodeMap.insert( + std::make_pair(&inst, new DepGraphNode(inst))).first->second; + else + return I->second; + } + + public: + typedef std::vector:: iterator iterator; + typedef std::vector::const_iterator const_iterator; + + public: + DependenceGraph() { } + ~DependenceGraph(); + + /// Get the graph node for an instruction. There will be one if and + /// only if there are any dependences incident on this instruction. + /// If there is none, these methods will return NULL. + /// + DepGraphNode* getNode(Instruction& inst, bool createIfMissing = false) { + return getNodeInternal(inst, createIfMissing); + } + const DepGraphNode* getNode(const Instruction& inst) const { + return const_cast(this) + ->getNodeInternal(const_cast(inst)); + } + + iterator inDepBegin(DepGraphNode& T) { + return T.inDeps.begin(); + } + const_iterator inDepBegin (const DepGraphNode& T) const { + return T.inDeps.begin(); + } + + iterator inDepEnd(DepGraphNode& T) { + return T.inDeps.end(); + } + const_iterator inDepEnd(const DepGraphNode& T) const { + return T.inDeps.end(); + } + + iterator outDepBegin(DepGraphNode& F) { + return F.outDeps.begin(); + } + const_iterator outDepBegin(const DepGraphNode& F) const { + return F.outDeps.begin(); + } + + iterator outDepEnd(DepGraphNode& F) { + return F.outDeps.end(); + } + const_iterator outDepEnd(const DepGraphNode& F) const { + return F.outDeps.end(); + } + + /// Debugging support methods + /// + void print(const Function& func, std::ostream &O) const; + + public: + /// AddSimpleDependence - adding and modifying the dependence graph. + /// These should to be used only by dependence analysis implementations. + /// + void AddSimpleDependence(Instruction& fromI, Instruction& toI, + DependenceType depType) { + DepGraphNode* fromNode = getNodeInternal(fromI, /*create*/ true); + DepGraphNode* toNode = getNodeInternal(toI, /*create*/ true); + fromNode->outDeps.push_back(Dependence(toNode, depType, false)); + toNode-> inDeps. push_back(Dependence(fromNode, depType, true)); + } + + #ifdef SUPPORTING_LOOP_DEPENDENCES + // This interface is a placeholder to show what information is needed. + // It will probably change when it starts being used. + void AddLoopDependence(Instruction& fromI, + Instruction& toI, + DependenceType depType, + DependenceDirection dir, + int distance, + short level, + LoopInfo* enclosingLoop); + #endif // SUPPORTING_LOOP_DEPENDENCES + }; + + } // End llvm namespace + + #endif Index: llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h diff -u llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h:1.1 llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h:1.2 --- llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h:1.1 Sun Jun 27 19:27:15 2004 +++ llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.h Sun Jun 27 19:32:33 2004 @@ -20,7 +20,7 @@ #ifndef LLVM_ANALYSIS_MEMORYDEPANALYSIS_H #define LLVM_ANALYSIS_MEMORYDEPANALYSIS_H -#include "llvm/Analysis/DependenceGraph.h" +#include "DependenceGraph.h" #include "llvm/Pass.h" #include "Support/hash_map" Index: llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h diff -u llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h:1.2 llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h:1.3 --- llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h:1.2 Sun Jun 27 19:27:16 2004 +++ llvm/lib/Analysis/DataStructure/PgmDependenceGraph.h Sun Jun 27 19:32:33 2004 @@ -39,7 +39,6 @@ #ifndef LLVM_ANALYSIS_PGMDEPENDENCEGRAPH_H #define LLVM_ANALYSIS_PGMDEPENDENCEGRAPH_H -#include "llvm/Analysis/DependenceGraph.h" #include "MemoryDepAnalysis.h" /* #include "llvm/Analysis/PostDominators.h" -- see below */ #include "llvm/Instruction.h" From lattner at cs.uiuc.edu Sun Jun 27 19:40:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:40:01 2004 Subject: [llvm-commits] CVS: llvm/test/Programs/MultiSource/Applications/sgefa/Makefile driver.c Message-ID: <200406280039.TAA22302@apoc.cs.uiuc.edu> Changes in directory llvm/test/Programs/MultiSource/Applications/sgefa: Makefile updated: 1.5 -> 1.6 driver.c updated: 1.3 -> 1.4 --- Log message: Eliminate PROGRAM_IS_NONDETERMINISTIC --- Diffs of the changes: (+5 -7) Index: llvm/test/Programs/MultiSource/Applications/sgefa/Makefile diff -u llvm/test/Programs/MultiSource/Applications/sgefa/Makefile:1.5 llvm/test/Programs/MultiSource/Applications/sgefa/Makefile:1.6 --- llvm/test/Programs/MultiSource/Applications/sgefa/Makefile:1.5 Sun Feb 29 21:23:35 2004 +++ llvm/test/Programs/MultiSource/Applications/sgefa/Makefile Sun Jun 27 19:39:14 2004 @@ -2,13 +2,11 @@ PROG = sgefa LDFLAGS = -lm +FP_TOLERANCE = 0.0001 ifdef LARGE_PROBLEM_SIZE CPPFLAGS = -DSCALE=50 else CPPFLAGS = -DSCALE=40 endif -# This program is adversely effected by the underlying precision of the machine -PROGRAM_IS_NONDETERMINISTIC = 1 - include ../../Makefile.multisrc Index: llvm/test/Programs/MultiSource/Applications/sgefa/driver.c diff -u llvm/test/Programs/MultiSource/Applications/sgefa/driver.c:1.3 llvm/test/Programs/MultiSource/Applications/sgefa/driver.c:1.4 --- llvm/test/Programs/MultiSource/Applications/sgefa/driver.c:1.3 Sun Oct 12 13:05:10 2003 +++ llvm/test/Programs/MultiSource/Applications/sgefa/driver.c Sun Jun 27 19:39:14 2004 @@ -61,8 +61,8 @@ } (void)vexopy( a.rd, b, x, b, 2 ); err = snrm2( a.rd, b, 1 ); - printf(" For Ax=b. Absolute error = %e. Relative error = %e.\n", - err, err/snrm2( a.rd, x, 1 ) ); + //printf(" For Ax=b. Absolute error = %e. Relative error = %e.\n", + // err, err/snrm2( a.rd, x, 1 ) ); /* Solve transpose system. */ (void)sgesl( &a, ipvt, bt, 1 ); @@ -71,8 +71,8 @@ } (void)vexopy( a.rd, bt, x, bt, 2 ); err = snrm2( a.rd, bt, 1 ); - printf(" For A^Tx=b. Absolute error = %e. Relative error = %e.\n", - err, err/snrm2( a.rd, x, 1 ) ); + //printf(" For A^Tx=b. Absolute error = %e. Relative error = %e.\n", + // err, err/snrm2( a.rd, x, 1 ) ); } } /* End of while loop over test cases. */ } /* End of MAIN */ From lattner at cs.uiuc.edu Sun Jun 27 19:41:00 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:41:00 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Analysis/IPModRef.h Message-ID: <200406280040.TAA23863@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Analysis: IPModRef.h (r1.15) removed --- Log message: Move file to lib/Analysis/DataStructure --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Sun Jun 27 19:42:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:42:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Analysis/DataStructure/IPModRef.h IPModRef.cpp MemoryDepAnalysis.cpp Message-ID: <200406280041.TAA23881@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Analysis/DataStructure: IPModRef.h added (r1.1) IPModRef.cpp updated: 1.21 -> 1.22 MemoryDepAnalysis.cpp updated: 1.14 -> 1.15 --- Log message: Moved IPModRef out of the public include dir --- Diffs of the changes: (+234 -2) Index: llvm/lib/Analysis/DataStructure/IPModRef.h diff -c /dev/null llvm/lib/Analysis/DataStructure/IPModRef.h:1.1 *** /dev/null Sun Jun 27 19:41:33 2004 --- llvm/lib/Analysis/DataStructure/IPModRef.h Sun Jun 27 19:41:23 2004 *************** *** 0 **** --- 1,232 ---- + //===- IPModRef.h - Compute IP Mod/Ref information --------------*- C++ -*-===// + // + // The LLVM Compiler Infrastructure + // + // This file was developed by the LLVM research group and is distributed under + // the University of Illinois Open Source License. See LICENSE.TXT for details. + // + //===----------------------------------------------------------------------===// + // + // class IPModRef: + // + // class IPModRef is an interprocedural analysis pass that computes + // flow-insensitive IP Mod and Ref information for every function + // (the GMOD and GREF problems) and for every call site (MOD and REF). + // + // In practice, this needs to do NO real interprocedural work because + // all that is needed is done by the data structure analysis. + // This uses the top-down DS graph for a function and the bottom-up DS graph + // for each callee (including the Mod/Ref flags in the bottom-up graph) + // to compute the set of nodes that are Mod and Ref for the function and + // for each of its call sites. + // + // + // class FunctionModRefInfo: + // + // The results of IPModRef are encapsulated in the class FunctionModRefInfo. + // The results are stored as bit vectors: bit i represents node i + // in the TD DSGraph for the current function. (This node numbering is + // implemented by class FunctionModRefInfo.) Each FunctionModRefInfo + // includes: + // -- 2 bit vectors for the function (GMOD and GREF), and + // -- 2 bit vectors for each call site (MOD and REF). + // + // + // IPModRef vs. Alias Analysis for Clients: + // + // The IPModRef pass does not provide simpler query interfaces for specific + // LLVM values, instructions, or pointers because those results should be + // obtained through alias analysis (e.g., class DSAliasAnalysis). + // class IPModRef is primarily meant for other analysis passes that need to + // use Mod/Ref information efficiently for more complicated purposes; + // the bit-vector representations make propagation very efficient. + // + //===----------------------------------------------------------------------===// + + #ifndef LLVM_ANALYSIS_IPMODREF_H + #define LLVM_ANALYSIS_IPMODREF_H + + #include "llvm/Pass.h" + #include "Support/BitSetVector.h" + #include "Support/hash_map" + + namespace llvm { + + class Module; + class Function; + class CallSite; + class Instruction; + class CallInst; + class InvokeInst; + class DSNode; + class DSGraph; + class DSNodeHandle; + class ModRefInfo; // Result of IP Mod/Ref for one entity + class FunctionModRefInfo; // ModRefInfo for a func and all calls in it + class IPModRef; // Pass that computes IP Mod/Ref info + + //---------------------------------------------------------------------------- + /// ModRefInfo Class - Representation of Mod/Ref information for a single + /// function or callsite. This is represented as a pair of bit vectors, one each + /// for Mod and Ref. Each bit vector is indexed by the node id of the DS graph + /// node index. + /// + class ModRefInfo { + BitSetVector modNodeSet; // set of modified nodes + BitSetVector refNodeSet; // set of referenced nodes + + public: + // Methods to construct ModRefInfo objects. + ModRefInfo(unsigned int numNodes) + : modNodeSet(numNodes), + refNodeSet(numNodes) { } + + unsigned getSize() const { + assert(modNodeSet.size() == refNodeSet.size() && + "Mod & Ref different size?"); + return modNodeSet.size(); + } + + void setNodeIsMod (unsigned nodeId) { modNodeSet[nodeId] = true; } + void setNodeIsRef (unsigned nodeId) { refNodeSet[nodeId] = true; } + + // Methods to query the mod/ref info + bool nodeIsMod (unsigned nodeId) const { return modNodeSet.test(nodeId); } + bool nodeIsRef (unsigned nodeId) const { return refNodeSet.test(nodeId); } + bool nodeIsKill(unsigned nodeId) const { return false; } + + const BitSetVector& getModSet() const { return modNodeSet; } + BitSetVector& getModSet() { return modNodeSet; } + + const BitSetVector& getRefSet() const { return refNodeSet; } + BitSetVector& getRefSet() { return refNodeSet; } + + // Debugging support methods + void print(std::ostream &O, const std::string& prefix=std::string("")) const; + void dump() const; + }; + + + //---------------------------------------------------------------------------- + /// FunctionModRefInfo Class - Representation of the results of IP Mod/Ref + /// analysis for a function and for each of the call sites within the function. + /// Each of these are represented as bit vectors of size = the number of nodes + /// in the top-dwon DS graph of the function. Nodes are identified by their + /// nodeId, in the range [0 .. funcTDGraph.size()-1]. + /// + class FunctionModRefInfo { + const Function& F; // The function + IPModRef& IPModRefObj; // The IPModRef Object owning this + DSGraph* funcTDGraph; // Top-down DS graph for function + ModRefInfo funcModRefInfo; // ModRefInfo for the function body + std::map + callSiteModRefInfo; // ModRefInfo for each callsite + std::map NodeIds; + + friend class IPModRef; + + void computeModRef(const Function &func); + void computeModRef(CallSite call); + DSGraph* + ResolveCallSiteModRefInfo(CallSite CS, + hash_map &NodeMap); + + public: + FunctionModRefInfo(const Function& func, IPModRef &IPModRefObj, + DSGraph* tdgClone); + ~FunctionModRefInfo(); + + // Identify the function and its relevant DS graph + // + const Function& getFunction() const { return F; } + const DSGraph& getFuncGraph() const { return *funcTDGraph; } + + // Retrieve Mod/Ref results for a single call site and for the function body + // + const ModRefInfo* getModRefInfo(const Function& func) const { + return &funcModRefInfo; + } + const ModRefInfo* getModRefInfo(const CallInst& callInst) const { + std::map::const_iterator I = + callSiteModRefInfo.find((Instruction*)&callInst); + return (I == callSiteModRefInfo.end()) ? NULL : I->second; + } + const ModRefInfo* getModRefInfo(const InvokeInst& II) const { + std::map::const_iterator I = + callSiteModRefInfo.find((Instruction*)&II); + return (I == callSiteModRefInfo.end()) ? NULL : I->second; + } + + // Get the nodeIds used to index all Mod/Ref information for current function + // + unsigned getNodeId(const DSNode* node) const { + std::map::const_iterator iter = NodeIds.find(node); + assert(iter != NodeIds.end() && iter->second < funcModRefInfo.getSize()); + return iter->second; + } + + unsigned getNodeId(const Value* value) const; + + // Debugging support methods + void print(std::ostream &O) const; + void dump() const; + }; + + + //---------------------------------------------------------------------------- + /// IPModRef Class - An interprocedural pass that computes IP Mod/Ref info for + /// functions and for individual call sites. + /// + /// Given the DSGraph of a function, this class can be queried for + /// a ModRefInfo object describing all the nodes in the DSGraph that are + /// (a) modified, and (b) referenced during an execution of the function + /// from an arbitrary callsite, or during an execution of a single call-site + /// within the function. + /// + class IPModRef : public Pass { + std::map funcToModRefInfoMap; + Module* M; + + FunctionModRefInfo& getFuncInfo(const Function& func, + bool computeIfMissing = false); + public: + IPModRef() : M(NULL) {} + ~IPModRef() {} + + /// run - Driver function to run IP Mod/Ref on a Module. + /// This initializes the module reference, and then computes IPModRef + /// results immediately if demand-driven analysis was *not* specified. + /// + virtual bool run(Module &M); + + /// getFunctionModRefInfo - Retrieve the Mod/Ref information for a single + /// function + /// + const FunctionModRefInfo& getFunctionModRefInfo(const Function& func) { + return getFuncInfo(func); + } + + /// getBUDSGraph - This method returns the BU data structure graph for F + /// through the use of the BUDataStructures object. + /// + const DSGraph &getBUDSGraph(const Function &F); + + // Debugging support methods + // + void print(std::ostream &O) const; + void dump() const; + + /// releaseMemory - Release memory held by this pass when the pass pipeline is + /// done + /// + virtual void releaseMemory(); + + /// getAnalysisUsage - This pass requires top-down data structure graphs. + /// It modifies nothing. + /// + virtual void getAnalysisUsage(AnalysisUsage &AU) const; + }; + + } // End llvm namespace + + #endif Index: llvm/lib/Analysis/DataStructure/IPModRef.cpp diff -u llvm/lib/Analysis/DataStructure/IPModRef.cpp:1.21 llvm/lib/Analysis/DataStructure/IPModRef.cpp:1.22 --- llvm/lib/Analysis/DataStructure/IPModRef.cpp:1.21 Sat Feb 7 17:57:26 2004 +++ llvm/lib/Analysis/DataStructure/IPModRef.cpp Sun Jun 27 19:41:23 2004 @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Analysis/IPModRef.h" +#include "IPModRef.h" #include "llvm/Analysis/DataStructure.h" #include "llvm/Analysis/DSGraph.h" #include "llvm/Module.h" Index: llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp diff -u llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp:1.14 llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp:1.15 --- llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp:1.14 Sun Jun 27 19:27:15 2004 +++ llvm/lib/Analysis/DataStructure/MemoryDepAnalysis.cpp Sun Jun 27 19:41:23 2004 @@ -21,7 +21,7 @@ #include "llvm/Module.h" #include "llvm/iMemory.h" #include "llvm/iOther.h" -#include "llvm/Analysis/IPModRef.h" +#include "IPModRef.h" #include "llvm/Analysis/DataStructure.h" #include "llvm/Analysis/DSGraph.h" #include "llvm/Support/InstVisitor.h" From lattner at cs.uiuc.edu Sun Jun 27 19:44:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:44:01 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/IPO.h Message-ID: <200406280043.TAA26837@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms: IPO.h updated: 1.32 -> 1.33 --- Log message: Remove two dead passes --- Diffs of the changes: (+0 -8) Index: llvm/include/llvm/Transforms/IPO.h diff -u llvm/include/llvm/Transforms/IPO.h:1.32 llvm/include/llvm/Transforms/IPO.h:1.33 --- llvm/include/llvm/Transforms/IPO.h:1.32 Thu Apr 22 18:00:17 2004 +++ llvm/include/llvm/Transforms/IPO.h Sun Jun 27 19:43:25 2004 @@ -130,14 +130,6 @@ //===----------------------------------------------------------------------===// -/// These passes are wrappers that can do a few simple structure mutation -/// transformations. -/// -Pass *createSwapElementsPass(); -Pass *createSortElementsPass(); - - -//===----------------------------------------------------------------------===// // /// createSingleLoopExtractorPass - This pass extracts one natural loop from the /// program into a function if it can. This is used by bugpoint. From lattner at cs.uiuc.edu Sun Jun 27 19:45:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:45:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/SimpleStructMutation.cpp Message-ID: <200406280044.TAA26849@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: SimpleStructMutation.cpp (r1.26) removed --- Log message: These passes are long dead/obsolete. They never worked in the first place and are a maintenence burden. Nuke nuke nuke --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Sun Jun 27 19:46:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:46:01 2004 Subject: [llvm-commits] CVS: llvm/docs/ReleaseNotes.html Message-ID: <200406280044.TAA27154@apoc.cs.uiuc.edu> Changes in directory llvm/docs: ReleaseNotes.html updated: 1.207 -> 1.208 --- Log message: Bad passes are gone --- Diffs of the changes: (+2 -2) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.207 llvm/docs/ReleaseNotes.html:1.208 --- llvm/docs/ReleaseNotes.html:1.207 Wed Jun 23 01:33:15 2004 +++ llvm/docs/ReleaseNotes.html Sun Jun 27 19:44:45 2004 @@ -378,7 +378,7 @@
                • The following passes are incomplete or buggy: -pgmdep, -memdep, - -ipmodref, -sortstructs, -swapstructs, -cee
                • + -ipmodref, -cee
                • The -pre pass is incomplete (there are cases it doesn't handle that it should) and not thoroughly tested.
                • @@ -739,7 +739,7 @@ src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /> The LLVM Compiler Infrastructure
                  - Last modified: $Date: 2004/06/23 06:33:15 $ + Last modified: $Date: 2004/06/28 00:44:45 $ From lattner at cs.uiuc.edu Sun Jun 27 19:48:01 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:48:01 2004 Subject: [llvm-commits] CVS: llvm/lib/Transforms/IPO/MutateStructTypes.cpp Message-ID: <200406280047.TAA29033@apoc.cs.uiuc.edu> Changes in directory llvm/lib/Transforms/IPO: MutateStructTypes.cpp (r1.48) removed --- Log message: Remove unused file --- Diffs of the changes: (+0 -0) From lattner at cs.uiuc.edu Sun Jun 27 19:48:08 2004 From: lattner at cs.uiuc.edu (Chris Lattner) Date: Sun Jun 27 19:48:08 2004 Subject: [llvm-commits] CVS: llvm/include/llvm/Transforms/MutateStructTypes.h Message-ID: <200406280047.TAA29028@apoc.cs.uiuc.edu> Changes in directory llvm/include/llvm/Transforms: MutateStructTypes.h (r1.12) removed --- Log message: Remove dead file --- Diffs of the changes: (+0 -0) From gaeke at cs.uiuc.edu Sun Jun 27 21:29:01 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Jun 27 21:29:01 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/ReoptimizerInternal.h RuntimeOptimizations.cpp Message-ID: <200406280228.VAA08260@kain.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: ReoptimizerInternal.h updated: 1.5 -> 1.6 RuntimeOptimizations.cpp updated: 1.44 -> 1.45 --- Log message: Make optimizeTrace return false for "skip this trace", true otherwise. Wrap some long lines. --- Diffs of the changes: (+11 -8) Index: reopt/lib/LightWtProfiling/ReoptimizerInternal.h diff -u reopt/lib/LightWtProfiling/ReoptimizerInternal.h:1.5 reopt/lib/LightWtProfiling/ReoptimizerInternal.h:1.6 --- reopt/lib/LightWtProfiling/ReoptimizerInternal.h:1.5 Wed May 26 16:23:36 2004 +++ reopt/lib/LightWtProfiling/ReoptimizerInternal.h Sun Jun 27 21:28:05 2004 @@ -154,7 +154,7 @@ // RuntimeOptimizations.cpp ///////////////////////////////////////////// -void optimizeTrace (std::vector &vBB, uint64_t a); +bool optimizeTrace (std::vector &vBB, uint64_t a); // TraceWriter.cpp ////////////////////////////////////////////////////// Index: reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp diff -u reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.44 reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.45 --- reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp:1.44 Fri Jun 25 00:15:27 2004 +++ reopt/lib/LightWtProfiling/RuntimeOptimizations.cpp Sun Jun 27 21:28:05 2004 @@ -54,20 +54,20 @@ /// This method is called when we have finally constructed a /// trace. The first parameter is the vector of basic blocks that form /// the trace; the second parameter is the starting -/// address for the trace. +/// address for the trace. Returns false if we're skipping this trace. /// -void optimizeTrace (std::vector &vBB, uint64_t a) { +bool optimizeTrace (std::vector &vBB, uint64_t a) { static std::set alreadyDone; if (alreadyDone.find (a) != alreadyDone.end ()) // Used to have debug msg here, but it generated megabytes of spam. - return; + return false; else alreadyDone.insert (a); DEBUG(++TraceCount; if (skipTrace.find (TraceCount) != skipTrace.end ()) { std::cerr << "optimizeTrace: skipping trace " << TraceCount << "\n"; - return; + return false; }); // Initialization stuff: ensure module has been read in, and allocate a @@ -88,8 +88,9 @@ DEBUG (WriteTraceToFile (&T)); TraceFunction *TF = TraceFunction::get (T); - // Compile the TraceFunction to machine code using the optimizing trace JIT compiler, and - // unpack the resulting optimized trace back into its matrix function. + // Compile the TraceFunction to machine code using the optimizing trace JIT + // compiler, and unpack the resulting optimized trace back into its matrix + // function. uint64_t traceStartAddr = TJIT->compileTraceFunction (TF); // Add a branch from address A (the parameter to this method) to the @@ -97,9 +98,11 @@ // will proceed from the optimized version of the code. DEBUG(std::cerr << "Writing branch at 0x" << std::hex << a << " to point to 0x" << traceStartAddr << std::dec << "\n"); - TraceOptimizerDone(a, traceStartAddr, TJIT->getEmitter ()->getCurrentPCValue ()); + TraceOptimizerDone(a, traceStartAddr, + TJIT->getEmitter ()->getCurrentPCValue ()); vm->writeBranchInstruction(a, traceStartAddr); doFlush (a, a + 4); + return true; } } // end namespace llvm From gaeke at cs.uiuc.edu Sun Jun 27 21:29:10 2004 From: gaeke at cs.uiuc.edu (Brian Gaeke) Date: Sun Jun 27 21:29:10 2004 Subject: [llvm-commits] CVS: reopt/lib/LightWtProfiling/SecondTrigger.cpp Message-ID: <200406280228.VAA08267@kain.cs.uiuc.edu> Changes in directory reopt/lib/LightWtProfiling: SecondTrigger.cpp updated: 1.30 -> 1.31 --- Log message: Fix a bug with --skip-trace: If we skip a trace, try to avoid looping infinitely (e.g., by reentering optimizeTrace() through the instrumentation routines) by cancelling out the SLI trace. --- Diffs of the changes: (+3 -1) Index: reopt/lib/LightWtProfiling/SecondTrigger.cpp diff -u reopt/lib/LightWtProfiling/SecondTrigger.cpp:1.30 reopt/lib/LightWtProfiling/SecondTrigger.cpp:1.31 --- reopt/lib/LightWtProfiling/SecondTrigger.cpp:1.30 Fri Jun 25 01:07:26 2004 +++ reopt/lib/LightWtProfiling/SecondTrigger.cpp Sun Jun 27 21:28:06 2004 @@ -526,7 +526,9 @@ //use path 0 to form vBB std::vector vBB; constructVBB (paths[0], start, vBB); - if (!vBB.empty()) { optimizeTrace (vBB, firstLevelTraceStartAddr); } + if (vBB.empty()) return; + if (!optimizeTrace (vBB, firstLevelTraceStartAddr)) + tr->patchTrace(firstLevelTraceStartAddr); return; }