[llvm-commits] CVS: llvm-www/DevMtgMay2007.html
Changes in directory llvm-www: DevMtgMay2007.html updated: 1.131 -> 1.132 --- Log message: Josh Added. --- Diffs of the changes: (+4 -3) DevMtgMay2007.html |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.131 llvm-www/DevMtgMay2007.html:1.132 --- llvm-www/DevMtgMay2007.html:1.131 Wed May 9 17:05:36 2007 +++ llvm-www/DevMtgMay2007.html Thu May 10 03:02:40 2007 @@ -286,6 +286,7 @@ Ryan BrownGoogle Evan ChengApple Inc. Jeff CohenIndependent +Josh ConnerApple Inc. John CriswellUIUC Mike EnglerAdobe Systems Incorporated. Tomas EvensenWind River @@ -301,13 +302,13 @@ Nick LewyckyIndependent Efrem LipkinCoDesign Gabe McArthurIndependent -Paul McJonesAdobe Systems Incorporated. Confirmed Attendees NameOrganization +Paul McJonesAdobe Systems Incorporated. Scott MichelAerospace Dan MonizMatasano Alireza MoshtaghiMicrochip Technology @@ -333,7 +334,7 @@ - Total confirmed: 43 + Total confirmed: 44 Unconfirmed Attendees NameOrganization @@ -353,6 +354,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss"; alt="Valid CSS!"> http://validator.w3.org/check/referer";>http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01!"> -Last modified: $Date: 2007/05/09 22:05:36 $ +Last modified: $Date: 2007/05/10 08:02:40 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/docs/ReleaseNotes.html
Changes in directory llvm/docs: ReleaseNotes.html updated: 1.372 -> 1.373 --- Log message: These attributes are supported! --- Diffs of the changes: (+8 -9) ReleaseNotes.html | 17 - 1 files changed, 8 insertions(+), 9 deletions(-) Index: llvm/docs/ReleaseNotes.html diff -u llvm/docs/ReleaseNotes.html:1.372 llvm/docs/ReleaseNotes.html:1.373 --- llvm/docs/ReleaseNotes.html:1.372 Wed May 9 14:31:58 2007 +++ llvm/docs/ReleaseNotes.html Thu May 10 03:26:24 2007 @@ -427,9 +427,9 @@ Declaring that functions have no side effects or that they can never return. - Supported: constructor, destructor, + Supported: alias, constructor, destructor, deprecated, fastcall, format, - format_arg, non_null, noreturn, + format_arg, non_null, noreturn, regparm section, stdcall, unused, used, visibility, warn_unused_result, weak @@ -437,15 +437,14 @@ always_inline, pure, const, nothrow, malloc, no_instrument_function, cdecl - Unsupported: alias, regparm, all other target specific - attributes + Unsupported: All other target specific attributes http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html#Variable%20Attributes";>Variable Attributes: Specifying attributes of variables. - Supported: cleanup, common, nocommon, - deprecated, dllimport, dllexport, - section, transparent_union, unused, - used, weak + Supported: alias, cleanup, common, + nocommon, deprecated, dllimport, + dllexport, section, transparent_union, + unused, used, weak Unsupported: aligned, mode, packed, shared, tls_model, @@ -600,7 +599,7 @@ src="http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01!" /> http://llvm.org/";>The LLVM Compiler Infrastructure - Last modified: $Date: 2007/05/09 19:31:58 $ + Last modified: $Date: 2007/05/10 08:26:24 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-www/DevMtgMay2007.html
Changes in directory llvm-www: DevMtgMay2007.html updated: 1.132 -> 1.133 --- Log message: Added a brief description of my talk. --- Diffs of the changes: (+3 -2) DevMtgMay2007.html |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.132 llvm-www/DevMtgMay2007.html:1.133 --- llvm-www/DevMtgMay2007.html:1.132 Thu May 10 03:02:40 2007 +++ llvm-www/DevMtgMay2007.html Thu May 10 09:38:27 2007 @@ -139,7 +139,8 @@ Processor Element. 13:5014:10John Criswell - UIUC Research. To be determined. + Secure Virtual Architecture. A presentation on our research to create a virtual machine that operates below the operating system and enforces +security properties for all software, including the operating system. 14:1014:30Jeff Cohen Using LLVM For The Jolt Compiler. Jeff will share his @@ -354,6 +355,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss"; alt="Valid CSS!"> http://validator.w3.org/check/referer";>http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01!"> -Last modified: $Date: 2007/05/10 08:02:40 $ +Last modified: $Date: 2007/05/10 14:38:27 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.136 -> 1.137 --- Log message: TypeIds are indexed by j, not i --- Diffs of the changes: (+1 -1) DwarfWriter.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.136 llvm/lib/CodeGen/DwarfWriter.cpp:1.137 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.136 Sat May 5 15:27:00 2007 +++ llvm/lib/CodeGen/DwarfWriter.cppThu May 10 10:10:34 2007 @@ -2948,7 +2948,7 @@ } else { // Gather the action sizes for (unsigned j = 0, M = TypeIds.size(); j != M; ++j) { - unsigned TypeID = TypeIds[i]; + unsigned TypeID = TypeIds[j]; unsigned SizeTypeID = Asm->SizeSLEB128(TypeID); signed Action = j ? -(SizeAction + SizeTypeID) : 0; SizeAction = SizeTypeID + Asm->SizeSLEB128(Action); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
Re: [llvm-commits] beginning unroll improvements
Hi Dan, This looks good. Have you run any llvm-test benchmarks or any other benchmarks ? - Devang On May 9, 2007, at 9:50 AM, Dan Gohman wrote: This patch extends the LoopUnroll pass to be able to unroll loops with unknown trip counts. This is left off by default, and a command-line option enables it. It also begins to separate loop unrolling into a utility routine; eventually it might be made usable from other passes. It currently works by inserting conditional branches between each unrolled iteration, unless it proves that the trip count is a multiple of a constant integer > 1, which it currently only does in the rare case that the trip count expression is a Mul operator with a ConstantInt operand. Eventually this information might be provided by other sources, for example by a pass that peels/splits the loop for this purpose. Dan -- Dan Gohman, Cray Inc. Index: test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll === RCS file: test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll diff -N test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll --- /dev/null +++ test/Transforms/LoopUnroll/2007-05-09-UnknownTripCount.ll @@ -0,0 +1,18 @@ +; RUN: llvm-as < %s | opt -loop-unroll -unroll-count=3 | llvm-dis | grep bb72.2 + +define void @foo(i32 %trips) { +entry: + br label %cond_true.outer + +cond_true.outer: + %indvar1.ph = phi i32 [ 0, %entry ], [ %indvar.next2, %bb72 ] + br label %bb72 + +bb72: + %indvar.next2 = add i32 %indvar1.ph, 1 + %exitcond3 = icmp eq i32 %indvar.next2, %trips + br i1 %exitcond3, label %cond_true138, label %cond_true.outer + +cond_true138: + ret void +} Index: lib/Transforms/Scalar/LoopUnroll.cpp === RCS file: /var/cvs/llvm/llvm/lib/Transforms/Scalar/LoopUnroll.cpp,v retrieving revision 1.46 diff -u -d -r1.46 LoopUnroll.cpp --- lib/Transforms/Scalar/LoopUnroll.cpp +++ lib/Transforms/Scalar/LoopUnroll.cpp @@ -31,6 +31,7 @@ #include "llvm/Support/Compiler.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/MathExtras.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" @@ -39,12 +40,19 @@ #include using namespace llvm; -STATISTIC(NumUnrolled, "Number of loops completely unrolled"); +STATISTIC(NumCompletelyUnrolled, "Number of loops completely unrolled"); +STATISTIC(NumUnrolled, "Number of loops unrolled (completely or otherwise)"); namespace { cl::opt - UnrollThreshold("unroll-threshold", cl::init(100), cl::Hidden, - cl::desc("The cut-off point for loop unrolling")); + UnrollThreshold +("unroll-threshold", cl::init(100), cl::Hidden, + cl::desc("The cut-off point for automatic loop unrolling")); + + cl::opt + UnrollCount +("unroll-count", cl::init(0), cl::Hidden, + cl::desc("Use this unroll count for all loops, for testing purposes")); class VISIBILITY_HIDDEN LoopUnroll : public LoopPass { LoopInfo *LI; // The current loop information @@ -52,7 +60,13 @@ static char ID; // Pass ID, replacement for typeid LoopUnroll() : LoopPass((intptr_t)&ID) {} +/// A magic value for use with the Threshold parameter to indicate +/// that the loop unroll should be performed regardless of how much +/// code expansion would result. +static const unsigned NoThreshold = UINT_MAX; + bool runOnLoop(Loop *L, LPPassManager &LPM); +bool unrollLoop(Loop *L, unsigned Count, unsigned Threshold); BasicBlock *FoldBlockIntoPredecessor(BasicBlock *BB); /// This transformation requires natural loop information & requires that @@ -162,43 +176,137 @@ } bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) { - bool Changed = false; LI = &getAnalysis(); + // Unroll the loop. + if (!unrollLoop(L, UnrollCount, UnrollThreshold)) +return false; + + // Update the loop information for this loop. + // If we completely unrolled the loop, remove it from the parent. + if (L->getNumBackEdges() == 0) +LPM.deleteLoopFromQueue(L); + + return true; +} + +/// Unroll the given loop by UnrollCount, or by a heuristically-determined +/// value if Count is zero. If Threshold is non-NULL, it points to +/// a Threshold value to limit code size expansion. If the loop size would +/// expand beyond the threshold value, unrolling is suppressed. The return +/// value is false if no transformations are performed. +/// +bool LoopUnroll::unrollLoop(Loop *L, unsigned Count, unsigned Threshold) { + assert(L->isLCSSAForm()); + BasicBlock *Header = L->getHeader(); BasicBlock *LatchBlock = L->getLoopLatch(); - BranchInst *BI = dyn_cast(LatchBlock->getTerminator()); - if (BI == 0) return Changed; // Must end in a conditional branch - ConstantInt *TripCountC = dyn_cast_or_null(L->getTripCount()); - if (!TripCountC) return
[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp
Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.137 -> 1.138 --- Log message: Later computations assume we are aligned at this point. --- Diffs of the changes: (+3 -2) DwarfWriter.cpp |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.137 llvm/lib/CodeGen/DwarfWriter.cpp:1.138 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.137 Thu May 10 10:10:34 2007 +++ llvm/lib/CodeGen/DwarfWriter.cppThu May 10 13:40:24 2007 @@ -2979,12 +2979,13 @@ sizeof(int8_t) - // LPStart format sizeof(int8_t) - // TType format sizeof(int8_t); // TType base offset (NEED ULEB128) - + // Begin the exception table. Asm->SwitchToDataSection(TAI->getDwarfExceptionSection()); O << "GCC_except_table" << SubprogramCount << ":\n"; +Asm->EmitAlignment(2); EmitLabel("exception", SubprogramCount); - + // Emit the header. Asm->EmitInt8(DW_EH_PE_omit); Asm->EOL("LPStart format (DW_EH_PE_omit)"); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-www/DevMtgMay2007.html
Changes in directory llvm-www: DevMtgMay2007.html updated: 1.133 -> 1.134 --- Log message: Updated to my presentation abstract. --- Diffs of the changes: (+2 -3) DevMtgMay2007.html |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) Index: llvm-www/DevMtgMay2007.html diff -u llvm-www/DevMtgMay2007.html:1.133 llvm-www/DevMtgMay2007.html:1.134 --- llvm-www/DevMtgMay2007.html:1.133 Thu May 10 09:38:27 2007 +++ llvm-www/DevMtgMay2007.html Thu May 10 16:23:06 2007 @@ -139,8 +139,7 @@ Processor Element. 13:5014:10John Criswell - Secure Virtual Architecture. A presentation on our research to create a virtual machine that operates below the operating system and enforces -security properties for all software, including the operating system. + Secure Virtual Architecture. A presentation on our research to create a virtual machine that operates below the operating system and some of the novel security capabilities that our architecture can enable. 14:1014:30Jeff Cohen Using LLVM For The Jolt Compiler. Jeff will share his @@ -355,6 +354,6 @@ src="http://jigsaw.w3.org/css-validator/images/vcss"; alt="Valid CSS!"> http://validator.w3.org/check/referer";>http://www.w3.org/Icons/valid-html401"; alt="Valid HTML 4.01!"> -Last modified: $Date: 2007/05/10 14:38:27 $ +Last modified: $Date: 2007/05/10 21:23:06 $ ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-test/Makefile.programs
Changes in directory llvm-test: Makefile.programs updated: 1.266 -> 1.267 --- Log message: For ARM / THUMB. Make llcbeta option --enable-tail-merge. --- Diffs of the changes: (+5 -1) Makefile.programs |6 +- 1 files changed, 5 insertions(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.266 llvm-test/Makefile.programs:1.267 --- llvm-test/Makefile.programs:1.266 Fri May 4 16:50:39 2007 +++ llvm-test/Makefile.programs Thu May 10 17:28:56 2007 @@ -242,7 +242,11 @@ LLCBETAOPTION := -enable-sparc-v9-insts endif ifeq ($(ARCH),ARM) -LLCBETAOPTION := -march=thumb +LLCBETAOPTION := --enable-tail-merge +#-march=thumb +endif +ifeq ($(ARCH),THUMB) +LLCBETAOPTION := --enable-tail-merge endif print-llcbeta-option: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/include/llvm/CodeGen/MachineModuleInfo.h
Changes in directory llvm/include/llvm/CodeGen: MachineModuleInfo.h updated: 1.11 -> 1.12 --- Log message: Allow multiple invokes per landing pad. This (probably) fixes PR1410: http://llvm.org/PR1410 . --- Diffs of the changes: (+3 -4) MachineModuleInfo.h |7 +++ 1 files changed, 3 insertions(+), 4 deletions(-) Index: llvm/include/llvm/CodeGen/MachineModuleInfo.h diff -u llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.11 llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.12 --- llvm/include/llvm/CodeGen/MachineModuleInfo.h:1.11 Sun May 6 08:37:16 2007 +++ llvm/include/llvm/CodeGen/MachineModuleInfo.h Thu May 10 17:34:59 2007 @@ -33,6 +33,7 @@ #include "llvm/Support/Dwarf.h" #include "llvm/Support/DataTypes.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/ADT/UniqueVector.h" #include "llvm/GlobalValue.h" #include "llvm/Pass.h" @@ -955,8 +956,8 @@ /// struct LandingPadInfo { MachineBasicBlock *LandingPadBlock; // Landing pad block. - unsigned BeginLabel; // Label prior to invoke. - unsigned EndLabel;// Label after invoke. + SmallVector BeginLabels; // Labels prior to invoke. + SmallVector EndLabels; // Labels after invoke. unsigned LandingPadLabel; // Label at beginning of landing pad. Function *Personality;// Personality function. std::vector TypeIds;// List of type ids. @@ -965,8 +966,6 @@ LandingPadInfo(MachineBasicBlock *MBB) : LandingPadBlock(MBB) - , BeginLabel(0) - , EndLabel(0) , LandingPadLabel(0) , TypeIds() , IsFilter(false) ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp MachineModuleInfo.cpp
Changes in directory llvm/lib/CodeGen: DwarfWriter.cpp updated: 1.138 -> 1.139 MachineModuleInfo.cpp updated: 1.9 -> 1.10 --- Log message: Allow multiple invokes per landing pad. This (probably) fixes PR1410: http://llvm.org/PR1410 . --- Diffs of the changes: (+75 -57) DwarfWriter.cpp | 103 ++ MachineModuleInfo.cpp | 29 ++ 2 files changed, 75 insertions(+), 57 deletions(-) Index: llvm/lib/CodeGen/DwarfWriter.cpp diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.138 llvm/lib/CodeGen/DwarfWriter.cpp:1.139 --- llvm/lib/CodeGen/DwarfWriter.cpp:1.138 Thu May 10 13:40:24 2007 +++ llvm/lib/CodeGen/DwarfWriter.cppThu May 10 17:34:59 2007 @@ -2933,40 +2933,42 @@ const std::vector &TypeIds = LandingPad.TypeIds; unsigned SizeAction = 0; signed FirstAction; - - if (IsFilter) { -// FIXME - Assume there is only one filter typeinfo list per function -// time being. I.E., Each call to eh_filter will have the same list. -// This can change if a function is inlined. -Filter = &LandingPad; -SizeAction = Asm->SizeSLEB128(-1) + Asm->SizeSLEB128(0); -SizeSiteActions += SizeAction; -// Record the first action of the landing pad site. -FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; - } else if (TypeIds.empty()) { -FirstAction = 0; - } else { -// Gather the action sizes -for (unsigned j = 0, M = TypeIds.size(); j != M; ++j) { - unsigned TypeID = TypeIds[j]; - unsigned SizeTypeID = Asm->SizeSLEB128(TypeID); - signed Action = j ? -(SizeAction + SizeTypeID) : 0; - SizeAction = SizeTypeID + Asm->SizeSLEB128(Action); + + for (unsigned j = 0, E = LandingPad.BeginLabels.size(); j != E; ++j) { +if (IsFilter) { + // FIXME - Assume there is only one filter typeinfo list per function + // time being. I.E., Each call to eh_filter will have the same list. + // This can change if a function is inlined. + Filter = &LandingPad; + SizeAction = Asm->SizeSLEB128(-1) + Asm->SizeSLEB128(0); SizeSiteActions += SizeAction; + // Record the first action of the landing pad site. + FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; +} else if (TypeIds.empty()) { + FirstAction = 0; +} else { + // Gather the action sizes + for (unsigned k = 0, M = TypeIds.size(); k != M; ++k) { +unsigned TypeID = TypeIds[k]; +unsigned SizeTypeID = Asm->SizeSLEB128(TypeID); +signed Action = k ? -(SizeAction + SizeTypeID) : 0; +SizeAction = SizeTypeID + Asm->SizeSLEB128(Action); +SizeSiteActions += SizeAction; + } + + // Record the first action of the landing pad site. + FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; } + +Actions.push_back(FirstAction); -// Record the first action of the landing pad site. -FirstAction = SizeActions + SizeSiteActions - SizeAction + 1; +// Compute this sites contribution to size. +SizeActions += SizeSiteActions; +SizeSites += sizeof(int32_t) + // Site start. + sizeof(int32_t) + // Site length. + sizeof(int32_t) + // Landing pad. + Asm->SizeSLEB128(FirstAction); // Action. } - - Actions.push_back(FirstAction); - - // Compute this sites contribution to size. - SizeActions += SizeSiteActions; - SizeSites += sizeof(int32_t) + // Site start. - sizeof(int32_t) + // Site length. - sizeof(int32_t) + // Landing pad. - Asm->SizeSLEB128(FirstAction); // Action. } // Final tallies. @@ -2998,30 +3000,33 @@ Asm->EmitULEB128Bytes(SizeSites); Asm->EOL("Call-site table length"); -// Emit the landng pad site information. +// Emit the landing pad site information. for (unsigned i = 0, N = LandingPads.size(); i != N; ++i) { const LandingPadInfo &LandingPad = LandingPads[i]; - EmitSectionOffset("label", "eh_func_begin", -LandingPad.BeginLabel, SubprogramCount, false, true); - Asm->EOL("Region start"); + for (unsigned j=0, E = LandingPad.BeginLabels.size(); j != E; ++j) { +EmitSectionOffset("label", "eh_func_begin", + LandingPad.BeginLabels[j], SubprogramCount, + false, true); +Asm->EOL("Region start"); - EmitDifference("label", LandingPad.EndLabel, - "label", LandingPad.BeginLabel); - Asm->EOL("Region length"); +EmitDifference("label", LandingPad.EndLabels[j], + "label", LandingPad.BeginLabels[j]); +Asm
[llvm-commits] CVS: llvm/lib/CodeGen/MachineModuleInfo.cpp
Changes in directory llvm/lib/CodeGen: MachineModuleInfo.cpp updated: 1.10 -> 1.11 --- Log message: Ooops. Some debugging stuff :) --- Diffs of the changes: (+0 -1) MachineModuleInfo.cpp |1 - 1 files changed, 1 deletion(-) Index: llvm/lib/CodeGen/MachineModuleInfo.cpp diff -u llvm/lib/CodeGen/MachineModuleInfo.cpp:1.10 llvm/lib/CodeGen/MachineModuleInfo.cpp:1.11 --- llvm/lib/CodeGen/MachineModuleInfo.cpp:1.10 Thu May 10 17:34:59 2007 +++ llvm/lib/CodeGen/MachineModuleInfo.cpp Thu May 10 17:38:46 2007 @@ -1724,7 +1724,6 @@ if (!BeginLabel || !EndLabel) { -printf("Tidy: %d, %d, %d\n", BeginLabel, EndLabel, LandingPad.LandingPadLabel); LandingPad.BeginLabels.erase(LandingPad.BeginLabels.begin() + j); LandingPad.EndLabels.erase(LandingPad.EndLabels.begin() + j); continue; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/BranchFolding.cpp
Changes in directory llvm/lib/CodeGen: BranchFolding.cpp updated: 1.51 -> 1.52 --- Log message: Do not generate branches to entry block. This fixes several test suite failures on PPC (can happen only when prologue code is null) --- Diffs of the changes: (+19 -4) BranchFolding.cpp | 23 +++ 1 files changed, 19 insertions(+), 4 deletions(-) Index: llvm/lib/CodeGen/BranchFolding.cpp diff -u llvm/lib/CodeGen/BranchFolding.cpp:1.51 llvm/lib/CodeGen/BranchFolding.cpp:1.52 --- llvm/lib/CodeGen/BranchFolding.cpp:1.51 Wed May 9 20:01:49 2007 +++ llvm/lib/CodeGen/BranchFolding.cpp Thu May 10 18:59:23 2007 @@ -338,6 +338,14 @@ MachineBasicBlock::iterator MBB2I, const TargetInstrInfo *TII, MachineBasicBlock *PredBB) { + // If one block is the entry block, split the other one; we can't generate + // a branch to the entry block, as its label is not emitted. + MachineBasicBlock *Entry = MBB1->getParent()->begin(); + if (MBB1 == Entry) +return false; + if (MBB2 == Entry) +return true; + // If one block falls through into the common successor, choose that // one to split; it is one instruction less to do that. if (PredBB) { @@ -456,8 +464,14 @@ MachineBasicBlock *MBB2 = (MergePotentials.end()-2)->second; // If neither block is the entire common tail, split the tail of one block -// to make it redundant with the other tail. -if (CurMBB->begin() != BBI1 && MBB2->begin() != BBI2) { +// to make it redundant with the other tail. Also, we cannot jump to the +// entry block, so if one block is the entry block, split the other one. +MachineBasicBlock *Entry = CurMBB->getParent()->begin(); +if (CurMBB->begin() == BBI1 && CurMBB != Entry) + ; // CurMBB is common tail +else if (MBB2->begin() == BBI2 && MBB2 != Entry) + ; // MBB2 is common tail +else { if (0) { // Enable this to disable partial tail merges. MergePotentials.pop_back(); continue; @@ -475,13 +489,14 @@ } } -if (MBB2->begin() == BBI2) { +if (MBB2->begin() == BBI2 && MBB2 != Entry) { // Hack the end off CurMBB, making it jump to MBBI@ instead. ReplaceTailWithBranchTo(BBI1, MBB2); // This modifies CurMBB, so remove it from the worklist. MergePotentials.pop_back(); } else { - assert(CurMBB->begin() == BBI1 && "Didn't split block correctly?"); + assert(CurMBB->begin() == BBI1 && CurMBB != Entry && + "Didn't split block correctly?"); // Hack the end off MBB2, making it jump to CurMBB instead. ReplaceTailWithBranchTo(BBI2, CurMBB); // This modifies MBB2, so remove it from the worklist. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/System/Unix/MappedFile.inc
Changes in directory llvm/lib/System/Unix: MappedFile.inc updated: 1.19 -> 1.20 --- Log message: Fix a bug where the bcreader could crash on .bc files that were an exact multiple of the page size, due to a bug in MappedFile --- Diffs of the changes: (+1 -0) MappedFile.inc |1 + 1 files changed, 1 insertion(+) Index: llvm/lib/System/Unix/MappedFile.inc diff -u llvm/lib/System/Unix/MappedFile.inc:1.19 llvm/lib/System/Unix/MappedFile.inc:1.20 --- llvm/lib/System/Unix/MappedFile.inc:1.19Thu Mar 29 14:11:22 2007 +++ llvm/lib/System/Unix/MappedFile.inc Thu May 10 19:00:27 2007 @@ -78,6 +78,7 @@ if (options_ & WRITE_ACCESS) ::msync(base_, info_->Size, MS_SYNC); ::munmap(base_, info_->Size); +base_ = 0; // Mark this as non-mapped. } } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Support/MemoryBuffer.cpp
Changes in directory llvm/lib/Support: MemoryBuffer.cpp updated: 1.6 -> 1.7 --- Log message: fix a memory leak --- Diffs of the changes: (+1 -1) MemoryBuffer.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/Support/MemoryBuffer.cpp diff -u llvm/lib/Support/MemoryBuffer.cpp:1.6 llvm/lib/Support/MemoryBuffer.cpp:1.7 --- llvm/lib/Support/MemoryBuffer.cpp:1.6 Mon May 7 10:21:46 2007 +++ llvm/lib/Support/MemoryBuffer.cpp Thu May 10 19:43:26 2007 @@ -39,7 +39,7 @@ BufferEnd = BufferStart+Size; memcpy(const_cast(BufferStart), BufStart, Size); *const_cast(BufferEnd) = 0; // Null terminate buffer. - MustDeleteBuffer = false; + MustDeleteBuffer = true; } /// init - Initialize this MemoryBuffer as a reference to externally allocated ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll 2007-05-09-tl.ll
Changes in directory llvm/test/Transforms/LoopUnswitch: 2007-05-09-Unreachable.ll updated: 1.1 -> 1.2 2007-05-09-tl.ll updated: 1.1 -> 1.2 --- Log message: Drop ModuleID from comment. --- Diffs of the changes: (+2 -2) 2007-05-09-Unreachable.ll |2 +- 2007-05-09-tl.ll |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll diff -u llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll:1.1 llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll:1.2 --- llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll:1.1 Wed May 9 03:08:46 2007 +++ llvm/test/Transforms/LoopUnswitch/2007-05-09-Unreachable.ll Thu May 10 19:45:58 2007 @@ -1,5 +1,5 @@ +; PR1333 ; RUN: llvm-upgrade < %s | llvm-as | opt -loop-unswitch -disable-output -; ModuleID = 'PR1333.bc' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" target triple = "i686-pc-linux-gnu" %struct.ada__streams__root_stream_type = type { %struct.ada__tags__dispatch_table* } Index: llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll diff -u llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll:1.1 llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll:1.2 --- llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll:1.1 Wed May 9 03:19:24 2007 +++ llvm/test/Transforms/LoopUnswitch/2007-05-09-tl.ll Thu May 10 19:45:58 2007 @@ -1,5 +1,5 @@ +; PR1333 ; RUN: llvm-as < %s | opt -loop-unswitch -disable-output -; ModuleID = 'PR1333-2.bc' define void @pp_cxx_expression() { entry: ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll
Changes in directory llvm/test/Transforms/InstCombine: 2007-05-10-icmp-or.ll added (r1.1) --- Log message: new testcase that crashes instcombine --- Diffs of the changes: (+8 -0) 2007-05-10-icmp-or.ll |8 1 files changed, 8 insertions(+) Index: llvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll diff -c /dev/null llvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll:1.1 *** /dev/null Fri May 11 00:55:48 2007 --- llvm/test/Transforms/InstCombine/2007-05-10-icmp-or.ll Fri May 11 00:55:38 2007 *** *** 0 --- 1,8 + ; RUN: llvm-as < %s | opt -instcombine -disable-output + define i1 @test(i32 %tmp9) { + %tmp20 = icmp ugt i32 %tmp9, 255; [#uses=1] + %tmp11.not = icmp sgt i32 %tmp9, 255; [#uses=1] + %bothcond = or i1 %tmp20, %tmp11.not; [#uses=1] + ret i1 %bothcond + } + ___ 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/InstructionCombining.cpp
Changes in directory llvm/lib/Transforms/Scalar: InstructionCombining.cpp updated: 1.762 -> 1.763 --- Log message: fix Transforms/InstCombine/2007-05-10-icmp-or.ll --- Diffs of the changes: (+10 -5) InstructionCombining.cpp | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.763 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.762 Sun May 6 08:37:16 2007 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Fri May 11 00:55:56 2007 @@ -3919,13 +3919,18 @@ LHSCC != ICmpInst::ICMP_UGE && LHSCC != ICmpInst::ICMP_ULE && RHSCC != ICmpInst::ICMP_UGE && RHSCC != ICmpInst::ICMP_ULE && LHSCC != ICmpInst::ICMP_SGE && LHSCC != ICmpInst::ICMP_SLE && -RHSCC != ICmpInst::ICMP_SGE && RHSCC != ICmpInst::ICMP_SLE) { +RHSCC != ICmpInst::ICMP_SGE && RHSCC != ICmpInst::ICMP_SLE && +// We can't fold (ugt x, C) | (sgt x, C2). +PredicatesFoldable(LHSCC, RHSCC)) { // Ensure that the larger constant is on the RHS. - ICmpInst::Predicate GT = ICmpInst::isSignedPredicate(LHSCC) ? -ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT; - Constant *Cmp = ConstantExpr::getICmp(GT, LHSCst, RHSCst); ICmpInst *LHS = cast(Op0); - if (cast(Cmp)->getZExtValue()) { + bool NeedsSwap; + if (ICmpInst::isSignedPredicate(LHSCC)) +NeedsSwap = LHSCst->getValue().sgt(LHSCst->getValue()); + else +NeedsSwap = LHSCst->getValue().ugt(LHSCst->getValue()); + + if (NeedsSwap) { std::swap(LHS, RHS); std::swap(LHSCst, RHSCst); std::swap(LHSCC, RHSCC); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Makefile
Changes in directory llvm/test: Makefile updated: 1.102 -> 1.103 --- Log message: For PR1411: http://llvm.org/PR1411 : Don't try to use {} bracketing when setting a variable in site.exp --- Diffs of the changes: (+3 -3) Makefile |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm/test/Makefile diff -u llvm/test/Makefile:1.102 llvm/test/Makefile:1.103 --- llvm/test/Makefile:1.102Sat Apr 21 16:43:18 2007 +++ llvm/test/Makefile Fri May 11 01:47:16 2007 @@ -82,9 +82,9 @@ @echo 'set objdir "$(LLVM_OBJ_ROOT)/test"' >>site.tmp @echo 'set gccpath "$(CC)"' >>site.tmp @echo 'set gxxpath "$(CXX)"' >>site.tmp - @echo 'set compile_c {$(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -c } ' >>site.tmp - @echo 'set compile_cxx {$(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) - c}' >> site.tmp - @echo 'set link {$(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) $(LD.Flags)}' >>site.tmp + @echo 'set compile_c "$(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -c "' >>site.tmp + @echo 'set compile_cxx "$(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) - c"' >> site.tmp + @echo 'set link "$(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) $(LD.Flags)"' >>site.tmp @echo 'set llvmgcc "$(LLVMGCC)"' >> site.tmp @echo 'set llvmgxx "$(LLVMGCC)"' >> site.tmp @echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits