[llvm-commits] CVS: llvm/include/llvm/BasicBlock.h
Changes in directory llvm/include/llvm: BasicBlock.h updated: 1.58 -> 1.59 --- Log message: New method BasicBlock::getFirstNonPHI. --- Diffs of the changes: (+8 -1) BasicBlock.h |9 - 1 files changed, 8 insertions(+), 1 deletion(-) Index: llvm/include/llvm/BasicBlock.h diff -u llvm/include/llvm/BasicBlock.h:1.58 llvm/include/llvm/BasicBlock.h:1.59 --- llvm/include/llvm/BasicBlock.h:1.58 Mon Jun 5 11:29:06 2006 +++ llvm/include/llvm/BasicBlock.h Thu Jun 8 10:46:17 2006 @@ -91,7 +91,14 @@ /// TerminatorInst *getTerminator(); const TerminatorInst *const getTerminator() const; - + + /// Returns a pointer to the first instructon in this block that is not a + /// PHINode instruction. When adding instruction to the beginning of the + /// basic block, they should be added before the returned value, not before + /// the first instruction, which might be PHI. + /// Returns 0 is there's no non-PHI instruction. + Instruction* getFirstNonPHI(); + /// removeFromParent - This method unlinks 'this' from the containing /// function, but does not delete it. /// ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp
Changes in directory llvm/lib/VMCore: BasicBlock.cpp updated: 1.68 -> 1.69 --- Log message: New method BasicBlock::getFirstNonPHI. --- Diffs of the changes: (+11 -0) BasicBlock.cpp | 11 +++ 1 files changed, 11 insertions(+) Index: llvm/lib/VMCore/BasicBlock.cpp diff -u llvm/lib/VMCore/BasicBlock.cpp:1.68 llvm/lib/VMCore/BasicBlock.cpp:1.69 --- llvm/lib/VMCore/BasicBlock.cpp:1.68 Fri Aug 12 17:14:06 2005 +++ llvm/lib/VMCore/BasicBlock.cpp Thu Jun 8 10:46:18 2006 @@ -121,6 +121,17 @@ return dyn_cast(&InstList.back()); } +Instruction* BasicBlock::getFirstNonPHI() +{ +BasicBlock::iterator i = begin(), e = end(); +// All valid basic blocks should have a terminator, +// which is not a PHINode. If we have invalid basic +// block we'll get assert when dereferencing past-the-end +// iterator. +while (isa(i)) ++i; +return &*i; +} + void BasicBlock::dropAllReferences() { for(iterator I = begin(), E = end(); I != E; ++I) I->dropAllReferences(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp
Vladimir,The e = end() is no longer needed.Cheers,-- JimOn Jun 8, 2006, at 12:46 PM, Vladimir Prus wrote:+Instruction* BasicBlock::getFirstNonPHI() +{ + BasicBlock::iterator i = begin(), e = end(); + // All valid basic blocks should have a terminator, + // which is not a PHINode. If we have invalid basic + // block we'll get assert when dereferencing past-the-end + // iterator. + while (isa(i)) ++i; + return &*i; +} + smime.p7s Description: S/MIME cryptographic signature ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/VMCore/BasicBlock.cpp
Changes in directory llvm/lib/VMCore: BasicBlock.cpp updated: 1.69 -> 1.70 --- Log message: Remove dead code. --- Diffs of the changes: (+1 -1) BasicBlock.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/VMCore/BasicBlock.cpp diff -u llvm/lib/VMCore/BasicBlock.cpp:1.69 llvm/lib/VMCore/BasicBlock.cpp:1.70 --- llvm/lib/VMCore/BasicBlock.cpp:1.69 Thu Jun 8 10:46:18 2006 +++ llvm/lib/VMCore/BasicBlock.cpp Thu Jun 8 11:03:13 2006 @@ -123,7 +123,7 @@ Instruction* BasicBlock::getFirstNonPHI() { -BasicBlock::iterator i = begin(), e = end(); +BasicBlock::iterator i = begin(); // All valid basic blocks should have a terminator, // which is not a PHINode. If we have invalid basic // block we'll get assert when dereferencing past-the-end ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/System/Win32/Path.inc
Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.43 -> 1.44 --- Log message: For PR804: http://llvm.org/PR804 : Change the file size field of StatusInfo to be uint64_t instead of size_t so that we know it is always 64 bits. This prevents some overflow on systems where size_t is 32 bits when it ought to be 64. --- Diffs of the changes: (+1 -1) Path.inc |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.43 llvm/lib/System/Win32/Path.inc:1.44 --- llvm/lib/System/Win32/Path.inc:1.43 Mon Jun 5 10:44:46 2006 +++ llvm/lib/System/Win32/Path.inc Thu Jun 8 12:00:08 2006 @@ -340,7 +340,7 @@ ThrowError("getStatusInfo():" + std::string(path) + ": Can't get status: "); info.fileSize = fi.nFileSizeHigh; - info.fileSize <<= 32; + info.fileSize <<= sizeof(fi.nFileSizeHigh)*8; info.fileSize += fi.nFileSizeLow; info.mode = fi.dwFileAttributes & FILE_ATTRIBUTE_READONLY ? 0555 : 0777; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/System/Path.h
Changes in directory llvm/include/llvm/System: Path.h updated: 1.28 -> 1.29 --- Log message: For PR804: http://llvm.org/PR804 : Change the file size field of StatusInfo to be uint64_t instead of size_t so that we know it is always 64 bits. This prevents some overflow on systems where size_t is 32 bits when it ought to be 64. --- Diffs of the changes: (+1 -1) Path.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/System/Path.h diff -u llvm/include/llvm/System/Path.h:1.28 llvm/include/llvm/System/Path.h:1.29 --- llvm/include/llvm/System/Path.h:1.28Wed Feb 22 10:23:43 2006 +++ llvm/include/llvm/System/Path.h Thu Jun 8 12:00:08 2006 @@ -67,7 +67,7 @@ struct StatusInfo { StatusInfo() : fileSize(0), modTime(0,0), mode(0777), user(999), group(999), isDir(false) { } -size_t fileSize; ///< Size of the file in bytes +uint64_tfileSize; ///< Size of the file in bytes TimeValue modTime;///< Time of file's modification uint32_tmode; ///< Mode of the file, if applicable uint32_tuser; ///< User ID of owner, if applicable ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/AsmPrinter.cpp
Changes in directory llvm/lib/CodeGen: AsmPrinter.cpp updated: 1.78 -> 1.79 --- Log message: Fix an assert-on-inline-inline-asm bug. --- Diffs of the changes: (+18 -12) AsmPrinter.cpp | 30 ++ 1 files changed, 18 insertions(+), 12 deletions(-) Index: llvm/lib/CodeGen/AsmPrinter.cpp diff -u llvm/lib/CodeGen/AsmPrinter.cpp:1.78 llvm/lib/CodeGen/AsmPrinter.cpp:1.79 --- llvm/lib/CodeGen/AsmPrinter.cpp:1.78Fri May 12 12:50:35 2006 +++ llvm/lib/CodeGen/AsmPrinter.cpp Thu Jun 8 13:00:47 2006 @@ -656,24 +656,30 @@ // operand! if (CurVariant == -1 || CurVariant == AsmPrinterVariant) { unsigned OpNo = 1; - + +bool Error = false; + // Scan to find the machine operand number for the operand. for (; Val; --Val) { + if (OpNo >= MI->getNumOperands()) break; unsigned OpFlags = MI->getOperand(OpNo).getImmedValue(); OpNo += (OpFlags >> 3) + 1; } - -unsigned OpFlags = MI->getOperand(OpNo).getImmedValue(); -++OpNo; // Skip over the ID number. - -bool Error; -AsmPrinter *AP = const_cast(this); -if ((OpFlags & 7) == 4 /*ADDR MODE*/) { - Error = AP->PrintAsmMemoryOperand(MI, OpNo, AsmPrinterVariant, -Modifier[0] ? Modifier : 0); + +if (OpNo >= MI->getNumOperands()) { + Error = true; } else { - Error = AP->PrintAsmOperand(MI, OpNo, AsmPrinterVariant, - Modifier[0] ? Modifier : 0); + unsigned OpFlags = MI->getOperand(OpNo).getImmedValue(); + ++OpNo; // Skip over the ID number. + + AsmPrinter *AP = const_cast(this); + if ((OpFlags & 7) == 4 /*ADDR MODE*/) { +Error = AP->PrintAsmMemoryOperand(MI, OpNo, AsmPrinterVariant, + Modifier[0] ? Modifier : 0); + } else { +Error = AP->PrintAsmOperand(MI, OpNo, AsmPrinterVariant, +Modifier[0] ? Modifier : 0); + } } if (Error) { std::cerr << "Invalid operand found in inline asm: '" ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/System/Win32/Path.inc
Changes in directory llvm/lib/System/Win32: Path.inc updated: 1.44 -> 1.45 --- Log message: Squelch a warning about signed/unsigned. --- Diffs of the changes: (+1 -1) Path.inc |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/System/Win32/Path.inc diff -u llvm/lib/System/Win32/Path.inc:1.44 llvm/lib/System/Win32/Path.inc:1.45 --- llvm/lib/System/Win32/Path.inc:1.44 Thu Jun 8 12:00:08 2006 +++ llvm/lib/System/Win32/Path.inc Thu Jun 8 13:08:43 2006 @@ -121,7 +121,7 @@ // Append a subdirectory passed on our process id so multiple LLVMs don't // step on each other's toes. - sprintf(pathname, "LLVM_%u", GetCurrentProcessId()); + sprintf(pathname, "LLVM_%u", unsigned(GetCurrentProcessId())); result.appendComponent(pathname); // If there's a directory left over from a previous LLVM execution that ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/X86: X86ISelDAGToDAG.cpp updated: 1.73 -> 1.74 --- Log message: Add support for "m" inline asm constraints. --- Diffs of the changes: (+29 -1) X86ISelDAGToDAG.cpp | 30 +- 1 files changed, 29 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86ISelDAGToDAG.cpp diff -u llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.73 llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.74 --- llvm/lib/Target/X86/X86ISelDAGToDAG.cpp:1.73Fri Jun 2 17:38:37 2006 +++ llvm/lib/Target/X86/X86ISelDAGToDAG.cpp Thu Jun 8 13:03:49 2006 @@ -128,7 +128,13 @@ bool TryFoldLoad(SDOperand P, SDOperand N, SDOperand &Base, SDOperand &Scale, SDOperand &Index, SDOperand &Disp); - +/// SelectInlineAsmMemoryOperand - Implement addressing mode selection for +/// inline asm expressions. +virtual bool SelectInlineAsmMemoryOperand(const SDOperand &Op, + char ConstraintCode, + std::vector &OutOps, + SelectionDAG &DAG); + void EmitSpecialCodeForMain(MachineBasicBlock *BB, MachineFrameInfo *MFI); inline void getAddressOperands(X86ISelAddressMode &AM, SDOperand &Base, @@ -876,6 +882,28 @@ #endif } +bool X86DAGToDAGISel:: +SelectInlineAsmMemoryOperand(const SDOperand &Op, char ConstraintCode, + std::vector &OutOps, SelectionDAG &DAG){ + SDOperand Op0, Op1, Op2, Op3; + switch (ConstraintCode) { + case 'o': // offsetable?? + case 'v': // not offsetable?? + default: return true; + case 'm': // memory +if (!SelectAddr(Op, Op0, Op1, Op2, Op3)) + return true; +break; + } + + OutOps.resize(4); + Select(OutOps[0], Op0); + Select(OutOps[1], Op1); + Select(OutOps[2], Op2); + Select(OutOps[3], Op3); + return false; +} + /// createX86ISelDag - This pass converts a legalized DAG into a /// X86-specific DAG, ready for instruction scheduling. /// ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/inline-asm.ll
Changes in directory llvm/test/Regression/CodeGen/X86: inline-asm.ll added (r1.1) --- Log message: New testcase, using "AX" as i32. --- Diffs of the changes: (+8 -0) inline-asm.ll |8 1 files changed, 8 insertions(+) Index: llvm/test/Regression/CodeGen/X86/inline-asm.ll diff -c /dev/null llvm/test/Regression/CodeGen/X86/inline-asm.ll:1.1 *** /dev/null Thu Jun 8 13:20:23 2006 --- llvm/test/Regression/CodeGen/X86/inline-asm.ll Thu Jun 8 13:20:13 2006 *** *** 0 --- 1,8 + ; RUN: llvm-as < %s | llc -march=x86 + + int %test1() { + ; Dest is AX, dest type = i32. + %tmp4 = call int asm sideeffect "FROB %0", "={ax}"() + ret int %tmp4 + } + ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.253 -> 1.254 --- Log message: Fix Regression/CodeGen/X86/inline-asm.ll, a case where inline asm causes implement extension of a register. --- Diffs of the changes: (+13 -6) SelectionDAGISel.cpp | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.253 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.254 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.253Fri May 26 18:13:20 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Jun 8 13:22:48 2006 @@ -1780,15 +1780,19 @@ return DAG.getNode(ISD::BUILD_PAIR, ValueVT, Hi, Val); } - // Otherwise, if the return value was promoted, truncate it to the + // Otherwise, if the return value was promoted or extended, truncate it to the // appropriate type. if (RegVT == ValueVT) return Val; - if (MVT::isInteger(RegVT)) -return DAG.getNode(ISD::TRUNCATE, ValueVT, Val); - else + if (MVT::isInteger(RegVT)) { +if (ValueVT < RegVT) + return DAG.getNode(ISD::TRUNCATE, ValueVT, Val); +else + return DAG.getNode(ISD::ANY_EXTEND, ValueVT, Val); + } else { return DAG.getNode(ISD::FP_ROUND, ValueVT, Val); + } } /// getCopyToRegs - Emit a series of CopyToReg nodes that copies the @@ -1895,14 +1899,17 @@ if (PhysReg.first) { if (VT == MVT::Other) ValueVT = *PhysReg.second->vt_begin(); -RegVT = VT; + +// Get the actual register value type. This is important, because the user +// may have asked for (e.g.) the AX register in i32 type. We need to +// remember that AX is actually i16 to get the right extension. +RegVT = *PhysReg.second->vt_begin(); // This is a explicit reference to a physical register. Regs.push_back(PhysReg.first); // If this is an expanded reference, add the rest of the regs to Regs. if (NumRegs != 1) { - RegVT = *PhysReg.second->vt_begin(); TargetRegisterClass::iterator I = PhysReg.second->begin(); TargetRegisterClass::iterator E = PhysReg.second->end(); for (; *I != PhysReg.first; ++I) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/CodeGen/X86/inline-asm.ll
Changes in directory llvm/test/Regression/CodeGen/X86: inline-asm.ll updated: 1.1 -> 1.2 --- Log message: Add new testcase --- Diffs of the changes: (+7 -1) inline-asm.ll |8 +++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/test/Regression/CodeGen/X86/inline-asm.ll diff -u llvm/test/Regression/CodeGen/X86/inline-asm.ll:1.1 llvm/test/Regression/CodeGen/X86/inline-asm.ll:1.2 --- llvm/test/Regression/CodeGen/X86/inline-asm.ll:1.1 Thu Jun 8 13:20:13 2006 +++ llvm/test/Regression/CodeGen/X86/inline-asm.ll Thu Jun 8 13:26:48 2006 @@ -2,7 +2,13 @@ int %test1() { ; Dest is AX, dest type = i32. -%tmp4 = call int asm sideeffect "FROB %0", "={ax}"() +%tmp4 = call int asm sideeffect "FROB $0", "={ax}"() ret int %tmp4 } +void %test2(int %V) { + ; input is AX, in type = i32. +call void asm sideeffect "FROB $0", "{ax}"(int %V) +ret void +} + ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Changes in directory llvm/lib/CodeGen/SelectionDAG: SelectionDAGISel.cpp updated: 1.254 -> 1.255 --- Log message: Fix X86/inline-asm.ll:test2, a case where an input value was implicitly truncated. --- Diffs of the changes: (+6 -3) SelectionDAGISel.cpp |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.254 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.255 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.254Thu Jun 8 13:22:48 2006 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Jun 8 13:27:11 2006 @@ -1804,9 +1804,12 @@ // If there is a single register and the types differ, this must be // a promotion. if (RegVT != ValueVT) { - if (MVT::isInteger(RegVT)) -Val = DAG.getNode(ISD::ANY_EXTEND, RegVT, Val); - else + if (MVT::isInteger(RegVT)) { +if (RegVT < ValueVT) + Val = DAG.getNode(ISD::TRUNCATE, RegVT, Val); +else + Val = DAG.getNode(ISD::ANY_EXTEND, RegVT, Val); + } else Val = DAG.getNode(ISD::FP_EXTEND, RegVT, Val); } Chain = DAG.getCopyToReg(Chain, Regs[0], Val, Flag); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/Transforms/Scalar.h
Changes in directory llvm/include/llvm/Transforms: Scalar.h updated: 1.65 -> 1.66 --- Log message: Update some comments, and expose LCSSAID in preparation for having other passes require LCSSA. --- Diffs of the changes: (+1 -0) Scalar.h |1 + 1 files changed, 1 insertion(+) Index: llvm/include/llvm/Transforms/Scalar.h diff -u llvm/include/llvm/Transforms/Scalar.h:1.65 llvm/include/llvm/Transforms/Scalar.h:1.66 --- llvm/include/llvm/Transforms/Scalar.h:1.65 Fri May 26 08:58:26 2006 +++ llvm/include/llvm/Transforms/Scalar.h Thu Jun 8 15:02:53 2006 @@ -306,6 +306,7 @@ // This pass inserts phi nodes at loop boundaries to simplify other loop // optimizations. FunctionPass *createLCSSAPass(); +extern const PassInfo *LCSSAID; } // End llvm namespace ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Utils/LCSSA.cpp
Changes in directory llvm/lib/Transforms/Utils: LCSSA.cpp updated: 1.15 -> 1.16 --- Log message: Update some comments, and expose LCSSAID in preparation for having other passes require LCSSA. --- Diffs of the changes: (+8 -1) LCSSA.cpp |9 - 1 files changed, 8 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Utils/LCSSA.cpp diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.15 llvm/lib/Transforms/Utils/LCSSA.cpp:1.16 --- llvm/lib/Transforms/Utils/LCSSA.cpp:1.15Mon Jun 5 23:36:36 2006 +++ llvm/lib/Transforms/Utils/LCSSA.cpp Thu Jun 8 15:02:53 2006 @@ -86,7 +86,9 @@ } FunctionPass *llvm::createLCSSAPass() { return new LCSSA(); } +const PassInfo *llvm::LCSSAID = X.getPassInfo(); +/// runOnFunction - Process all loops in the function, inner-most out. bool LCSSA::runOnFunction(Function &F) { bool changed = false; LI = &getAnalysis(); @@ -100,6 +102,8 @@ return changed; } +/// visitSubloop - Recursively process all subloops, and then process the given +/// loop if it has live-out values. bool LCSSA::visitSubloop(Loop* L) { for (Loop::iterator I = L->begin(), E = L->end(); I != E; ++I) visitSubloop(*I); @@ -131,7 +135,8 @@ return true; } -/// processInstruction - +/// processInstruction - Given a live-out instruction, insert LCSSA Phi nodes, +/// eliminate all out-of-loop uses. void LCSSA::processInstruction(Instruction* Instr, const std::vector& exitBlocks) { @@ -252,6 +257,8 @@ return AffectedValues; } +/// getValueDominatingBlock - Return the value within the potential dominators +/// map that dominates the given block. Instruction *LCSSA::getValueDominatingBlock(BasicBlock *BB, std::map& PotDoms) { DominatorTree::Node* bbNode = DT->getNode(BB); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Changes in directory llvm/lib/Transforms/Scalar: LoopStrengthReduce.cpp updated: 1.83 -> 1.84 --- Log message: RewriteExpr, either the new PHI node of induction variable or the post-increment value, should be first cast to the appropriated type (to the type of the common expr). Otherwise, the rewrite of a use based on (common + iv) may end up with an incorrect type. --- Diffs of the changes: (+3 -0) LoopStrengthReduce.cpp |3 +++ 1 files changed, 3 insertions(+) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.83 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.84 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.83 Wed Apr 12 14:28:15 2006 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Thu Jun 8 19:12:42 2006 @@ -1074,6 +1074,9 @@ if (L->contains(User.Inst->getParent())) User.Inst->moveBefore(LatchBlock->getTerminator()); } + if (RewriteOp->getType() != ReplacedTy) +RewriteOp = SCEVExpander::InsertCastOfTo(RewriteOp, ReplacedTy); + SCEVHandle RewriteExpr = SCEVUnknown::get(RewriteOp); // Clear the SCEVExpander's expression map so that we are guaranteed ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelLowering.cpp
Changes in directory llvm/lib/Target/X86: X86ISelLowering.cpp updated: 1.227 -> 1.228 --- Log message: Minor compilation speed improvement. --- Diffs of the changes: (+2 -2) X86ISelLowering.cpp |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Target/X86/X86ISelLowering.cpp diff -u llvm/lib/Target/X86/X86ISelLowering.cpp:1.227 llvm/lib/Target/X86/X86ISelLowering.cpp:1.228 --- llvm/lib/Target/X86/X86ISelLowering.cpp:1.227 Tue Jun 6 18:30:24 2006 +++ llvm/lib/Target/X86/X86ISelLowering.cpp Fri Jun 9 01:24:42 2006 @@ -3413,8 +3413,8 @@ MachineFunction &MF = DAG.getMachineFunction(); const Function* Fn = MF.getFunction(); if (Fn->hasExternalLinkage() && - Fn->getName() == "main" && - Subtarget->TargetType == X86Subtarget::isCygwin) + Subtarget->TargetType == X86Subtarget::isCygwin && + Fn->getName() == "main") MF.getInfo()->setForceFramePointer(true); unsigned CC = cast(Op.getOperand(1))->getValue(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/X86/X86MachineFunctionInfo.h
Changes in directory llvm/lib/Target/X86: X86MachineFunctionInfo.h updated: 1.1 -> 1.2 --- Log message: Comments to appease sabre. --- Diffs of the changes: (+7 -1) X86MachineFunctionInfo.h |8 +++- 1 files changed, 7 insertions(+), 1 deletion(-) Index: llvm/lib/Target/X86/X86MachineFunctionInfo.h diff -u llvm/lib/Target/X86/X86MachineFunctionInfo.h:1.1 llvm/lib/Target/X86/X86MachineFunctionInfo.h:1.2 --- llvm/lib/Target/X86/X86MachineFunctionInfo.h:1.1Tue Jun 6 18:30:24 2006 +++ llvm/lib/Target/X86/X86MachineFunctionInfo.hFri Jun 9 01:25:10 2006 @@ -18,8 +18,14 @@ namespace llvm { +/// X86FunctionInfo - This class is derived from MachineFunction private +/// X86 target-specific information for each MachineFunction. class X86FunctionInfo : public MachineFunctionInfo { - bool ForceFramePointer; // Function requires use of frame pointer. + // ForceFramePointer - True if the function is required to use of frame + // pointer for reasons other than it containing dynamic allocation or + // that FP eliminatation is turned off. For example, Cygwin main function + // contains stack pointer re-alignment code which requires FP. + bool ForceFramePointer; public: X86FunctionInfo(MachineFunction& MF) : ForceFramePointer(false) {} bool getForceFramePointer() const { return ForceFramePointer;} ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits