[llvm-commits] CVS: llvm-test/Makefile.config.in
Changes in directory llvm-test: Makefile.config.in updated: 1.21 -> 1.22 --- Log message: disable this for now. Without autoconf being run, this breaks the nightly testers. --- Diffs of the changes: (+1 -1) Makefile.config.in |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.config.in diff -u llvm-test/Makefile.config.in:1.21 llvm-test/Makefile.config.in:1.22 --- llvm-test/Makefile.config.in:1.21 Fri Sep 1 19:04:00 2006 +++ llvm-test/Makefile.config.inSat Sep 2 02:29:33 2006 @@ -35,7 +35,7 @@ # SPEC benchmarks: # If these are set then run the SPEC benchmarks. # You must provide the SPEC benchmarks on your own. [EMAIL PROTECTED]@ [EMAIL PROTECTED]@ @USE_SPEC2000@ @USE_SPEC95@ ___ 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.223 -> 1.224 --- Log message: Fix PR891: http://llvm.org/PR891 --- Diffs of the changes: (+3 -3) Makefile.programs |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.223 llvm-test/Makefile.programs:1.224 --- llvm-test/Makefile.programs:1.223 Tue Aug 29 15:55:09 2006 +++ llvm-test/Makefile.programs Sat Sep 2 12:24:34 2006 @@ -203,7 +203,7 @@ LLCBETAOPTION := -sched=simple endif ifeq ($(ARCH),x86) -LLCBETAOPTION := -enable-x86-fastcc +LLCBETAOPTION := -regalloc=local -fast endif ifeq ($(ARCH),Sparc) LLCBETAOPTION := -enable-sparc-v9-insts @@ -266,11 +266,11 @@ # Targets to get the pass arguments that gccas and gccld are using... Output/gccas-pass-args: $(LGCCAS) Output/.dir -$(LGCCAS) /dev/null -o /dev/null -debug-pass=Arguments > [EMAIL PROTECTED] 2>&1 - sed 's/Pass Arguments: //' < [EMAIL PROTECTED] > $@ + sed 's/Pass Arguments: //' < [EMAIL PROTECTED] | sed 's/-emitbytecode//'> $@ Output/gccld-pass-args: $(LGCCLDPROG) Output/.dir $(LLVMAS) < /dev/null > Output/gccld.test.bc $(LGCCLD) Output/gccld.test.bc -o Output/gccld.test-out -debug-pass=Arguments > [EMAIL PROTECTED] 2>&1 - sed 's/Pass Arguments: //' < [EMAIL PROTECTED] > $@ + sed 's/Pass Arguments: //' < [EMAIL PROTECTED] | sed 's/-emitbytecode//' | > $@ # If the program requires exception handling support, enable (potentially # expensive) support for it. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/MachOWriter.cpp
Changes in directory llvm/lib/CodeGen: MachOWriter.cpp updated: 1.3 -> 1.4 --- Log message: improve compat with certain versions of GCC (on cygwin?) --- Diffs of the changes: (+1 -1) MachOWriter.cpp |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/lib/CodeGen/MachOWriter.cpp diff -u llvm/lib/CodeGen/MachOWriter.cpp:1.3 llvm/lib/CodeGen/MachOWriter.cpp:1.4 --- llvm/lib/CodeGen/MachOWriter.cpp:1.3Sat Aug 26 10:46:34 2006 +++ llvm/lib/CodeGen/MachOWriter.cppSat Sep 2 12:37:30 2006 @@ -197,7 +197,7 @@ // desired section alignment, which must be at least as much as required by // this symbol. if (Align) { -Sec.align = std::max(Sec.align, Align); +Sec.align = std::max(unsigned(Sec.align), Align); Sec.size = (Sec.size + Align - 1) & ~(Align-1); } // Record the offset of the symbol, and then allocate space for it. ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/PredicateSimplifier/2006-08-02-Switch.ll predsimplify.ll
Changes in directory llvm/test/Regression/Transforms/PredicateSimplifier: 2006-08-02-Switch.ll added (r1.1) predsimplify.ll updated: 1.1 -> 1.2 --- Log message: Improve handling of SelectInst. Reorder operations to remove duplicated work. Fix to leave floating-point types out of the optimization. Add tests to predsimplify.ll for SwitchInst and SelectInst handling. --- Diffs of the changes: (+185 -1) 2006-08-02-Switch.ll | 22 ++ predsimplify.ll | 164 ++- 2 files changed, 185 insertions(+), 1 deletion(-) Index: llvm/test/Regression/Transforms/PredicateSimplifier/2006-08-02-Switch.ll diff -c /dev/null llvm/test/Regression/Transforms/PredicateSimplifier/2006-08-02-Switch.ll:1.1 *** /dev/null Sat Sep 2 14:40:48 2006 --- llvm/test/Regression/Transforms/PredicateSimplifier/2006-08-02-Switch.ll Sat Sep 2 14:40:38 2006 *** *** 0 --- 1,22 + ; RUN: llvm-as < %s | opt -predsimplify -disable-output + + fastcc void %_ov_splice(int %n1, int %n2, int %ch2) { + entry: + %tmp = setgt int %n1, %n2 ; [#uses=1] + %n.0 = select bool %tmp, int %n2, int %n1 ; [#uses=1] + %tmp104 = setlt int 0, %ch2 ; [#uses=1] + br bool %tmp104, label %cond_true105, label %return + + cond_true95: ; preds = %cond_true105 + ret void + + bb98: ; preds = %cond_true105 + ret void + + cond_true105: ; preds = %entry + %tmp94 = setgt int %n.0, 0 ; [#uses=1] + br bool %tmp94, label %cond_true95, label %bb98 + + return: ; preds = %entry + ret void + } Index: llvm/test/Regression/Transforms/PredicateSimplifier/predsimplify.ll diff -u llvm/test/Regression/Transforms/PredicateSimplifier/predsimplify.ll:1.1 llvm/test/Regression/Transforms/PredicateSimplifier/predsimplify.ll:1.2 --- llvm/test/Regression/Transforms/PredicateSimplifier/predsimplify.ll:1.1 Mon Aug 28 17:44:55 2006 +++ llvm/test/Regression/Transforms/PredicateSimplifier/predsimplify.ll Sat Sep 2 14:40:38 2006 @@ -1,4 +1,5 @@ -; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | not grep fail +; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | not grep fail && +; RUN: llvm-as < %s | opt -predsimplify -instcombine -simplifycfg | llvm-dis | grep -v declare | grep pass | wc -l | grep 3 void %test1(int %x) { entry: @@ -124,6 +125,167 @@ ret void } +void %test9(int %y, int %z) { +entry: + %x = add int %y, %z + %A = seteq int %y, 3 + %B = seteq int %z, 5 + %C = and bool %A, %B + br bool %C, label %cond_true, label %return + +cond_true: + %D = seteq int %x, 8 + br bool %D, label %then, label %oops + +then: + call void (...)* %pass( ) + ret void + +oops: + call void (...)* %fail( ) + ret void + +return: + ret void +} + +void %switch1(int %x) { +entry: + %A = seteq int %x, 10 + br bool %A, label %return, label %cond_false + +cond_false: + switch int %x, label %return [ +int 9, label %then1 +int 10, label %then2 + ] + +then1: + call void (...)* %pass( ) + ret void + +then2: + call void (...)* %fail( ) + ret void + +return: + ret void +} + +void %switch2(int %x) { +entry: + %A = seteq int %x, 10 + br bool %A, label %return, label %cond_false + +cond_false: + switch int %x, label %return [ +int 8, label %then1 +int 9, label %then1 +int 10, label %then1 + ] + +then1: + %B = setne int %x, 8 + br bool %B, label %then2, label %return + +then2: + call void (...)* %pass( ) + ret void + +return: + ret void +} + +void %switch3(int %x) { +entry: + %A = seteq int %x, 10 + br bool %A, label %return, label %cond_false + +cond_false: + switch int %x, label %return [ +int 9, label %then1 +int 10, label %then1 + ] + +then1: + %B = seteq int %x, 9 + br bool %B, label %return, label %oops + +oops: + call void (...)* %fail( ) + ret void + +return: + ret void +} + +void %switch4(int %x) { +entry: + %A = seteq int %x, 10 + br bool %A, label %then1, label %cond_false + +cond_false: + switch int %x, label %default [ +int 9, label %then1 +int 10, label %then2 + ] + +then1: + ret void + +then2: + ret void + +default: + %B = seteq int %x, 9 + br bool %B, label %oops, label %then1 + +oops: + call void (...)* %fail( ) + ret void +} + +void %select1(int %x) { +entry: + %A = seteq int %x, 10 + %B = select bool %A, int 1, int 2 + %C = seteq int %B, 1 + br bool %C, label %then, label %else + +then: + br bool %A, label %return, label %oops + +else: + br bool %A, label %oops, label %return + +oops: + call void (...)* %fail( ) + ret void + +return: + ret void +} + +void %select2(int %x) { +entry: + %A = seteq int %x, 10 + %B = select bool %A, int 1, int 2 + %C = seteq int %B, 1 + br bool %A, label %then, label %else + +then: + br bool %C, label %return, label %oops + +else: + br b
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
Changes in directory llvm/lib/Transforms/Scalar: PredicateSimplifier.cpp updated: 1.4 -> 1.5 --- Log message: Improve handling of SelectInst. Reorder operations to remove duplicated work. Fix to leave floating-point types out of the optimization. Add tests to predsimplify.ll for SwitchInst and SelectInst handling. --- Diffs of the changes: (+44 -31) PredicateSimplifier.cpp | 75 1 files changed, 44 insertions(+), 31 deletions(-) Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.4 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.5 --- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.4 Thu Aug 31 22:26:35 2006 +++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp Sat Sep 2 14:40:37 2006 @@ -28,9 +28,6 @@ // //===--===// -// TODO: -// * Check handling of NAN in floating point types - #define DEBUG_TYPE "predsimplify" #include "llvm/Transforms/Scalar.h" #include "llvm/Constants.h" @@ -112,14 +109,22 @@ } void addEqual(Value *V1, Value *V2) { + // If %x = 0. and %y = -0., seteq %x, %y is true, but + // copysign(%x) is not the same as copysign(%y). + if (V2->getType()->isFloatingPoint()) return; + order(V1, V2); if (isa(V2)) return; // refuse to set false == true. + DEBUG(std::cerr << "equal: " << *V1 << " and " << *V2 << "\n"); union_find.unionSets(V1, V2); addImpliedProperties(EQ, V1, V2); } void addNotEqual(Value *V1, Value *V2) { + // If %x = NAN then seteq %x, %x is false. + if (V2->getType()->isFloatingPoint()) return; + DEBUG(std::cerr << "not equal: " << *V1 << " and " << *V2 << "\n"); if (findProperty(NE, V1, V2) != Properties.end()) return; // found. @@ -180,15 +185,9 @@ struct Property { Property(Ops opcode, Value *v1, Value *v2) : Opcode(opcode), V1(v1), V2(v2) - { assert(opcode != EQ && "Equality belongs in the synonym set," + { assert(opcode != EQ && "Equality belongs in the synonym set, " "not a property."); } - bool operator<(const Property &rhs) const { -if (Opcode != rhs.Opcode) return Opcode < rhs.Opcode; -if (V1 != rhs.V1) return V1 < rhs.V1; -return V2 < rhs.V2; - } - Ops Opcode; Value *V1, *V2; }; @@ -208,7 +207,7 @@ } } -// Finds the properties implied by a synonym and adds them too. +// Finds the properties implied by a equivalence and adds them too. // Example: ("seteq %a, %b", true, EQ) --> (%a, %b, EQ) // ("seteq %a, %b", false, EQ) --> (%a, %b, NE) void addImpliedProperties(Ops Opcode, Value *V1, Value *V2) { @@ -267,13 +266,25 @@ default: break; } + } else if (SelectInst *SI = dyn_cast(V2)) { +if (Opcode != EQ && Opcode != NE) return; + +ConstantBool *True = (Opcode==EQ) ? ConstantBool::True + : ConstantBool::False, + *False = (Opcode==EQ) ? ConstantBool::False + : ConstantBool::True; + +if (V1 == SI->getTrueValue()) + addEqual(SI->getCondition(), True); +else if (V1 == SI->getFalseValue()) + addEqual(SI->getCondition(), False); +else if (Opcode == EQ) + assert("Result of select not equal to either value."); } } -std::map SynonymMap; -std::vector Synonyms; - public: +#ifdef DEBUG void debug(std::ostream &os) const { for (EquivalenceClasses::iterator I = union_find.begin(), E = union_find.end(); I != E; ++I) { @@ -284,6 +295,7 @@ std::cerr << "\n--\n"; } } +#endif std::vector Properties; }; @@ -351,13 +363,13 @@ // resolve catches cases addProperty won't because it wasn't used as a // condition in the branch, and that visit won't, because the instruction -// was defined outside of the range that the properties apply to. +// was defined outside of the scope that the properties apply to. Value *PredicateSimplifier::resolve(SetCondInst *SCI, const PropertySet &KP) { // Attempt to resolve the SetCondInst to a boolean. - Value *SCI0 = SCI->getOperand(0), -*SCI1 = SCI->getOperand(1); + Value *SCI0 = resolve(SCI->getOperand(0), KP), +*SCI1 = resolve(SCI->getOperand(1), KP); PropertySet::ConstPropertyIterator NE = KP.findProperty(PropertySet::NE, SCI0, SCI1); @@ -378,9 +390,6 @@ } } - SCI0 = KP.canonicalize(SCI0); - SCI1 = KP.canonicalize(SCI1); - ConstantIntegral *CI1 = dyn_cast(SCI0), *CI2 = dyn_cast(SCI1); @@ -445,6 +454,8 @@ V = KP.canonicalize(V); + DEBUG(std::cerr << "peering into " << *V << "\n"); + if
[llvm-commits] CVS: llvm/lib/Target/ARM/ARM.h ARMISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/ARM: ARM.h updated: 1.3 -> 1.4 ARMISelDAGToDAG.cpp updated: 1.38 -> 1.39 --- Log message: add more condition codes --- Diffs of the changes: (+30 -2) ARM.h | 30 -- ARMISelDAGToDAG.cpp |2 ++ 2 files changed, 30 insertions(+), 2 deletions(-) Index: llvm/lib/Target/ARM/ARM.h diff -u llvm/lib/Target/ARM/ARM.h:1.3 llvm/lib/Target/ARM/ARM.h:1.4 --- llvm/lib/Target/ARM/ARM.h:1.3 Thu Aug 24 12:19:08 2006 +++ llvm/lib/Target/ARM/ARM.h Sat Sep 2 15:24:25 2006 @@ -23,16 +23,42 @@ // Enums corresponding to ARM condition codes namespace ARMCC { enum CondCodes { + EQ, NE, - EQ + CS, + CC, + MI, + PL, + VS, + VC, + HI, + LS, + GE, + LT, + GT, + LE, + AL }; } static const char *ARMCondCodeToString(ARMCC::CondCodes CC) { switch (CC) { default: assert(0 && "Unknown condition code"); -case ARMCC::NE: return "ne"; case ARMCC::EQ: return "eq"; +case ARMCC::NE: return "ne"; +case ARMCC::CS: return "cs"; +case ARMCC::CC: return "cc"; +case ARMCC::MI: return "mi"; +case ARMCC::PL: return "pl"; +case ARMCC::VS: return "vs"; +case ARMCC::VC: return "vc"; +case ARMCC::HI: return "hi"; +case ARMCC::LS: return "ls"; +case ARMCC::GE: return "ge"; +case ARMCC::LT: return "lt"; +case ARMCC::GT: return "gt"; +case ARMCC::LE: return "le"; +case ARMCC::AL: return "al"; } } Index: llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp diff -u llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.38 llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.39 --- llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp:1.38Sat Aug 26 00:32:46 2006 +++ llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp Sat Sep 2 15:24:25 2006 @@ -89,6 +89,8 @@ default: assert(0 && "Unknown condition code!"); case ISD::SETNE: return ARMCC::NE; case ISD::SETEQ: return ARMCC::EQ; + case ISD::SETGE: return ARMCC::GE; + case ISD::SETUGE: return ARMCC::CS; } } ___ 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/ARM/branch.ll
Changes in directory llvm/test/Regression/CodeGen/ARM: branch.ll updated: 1.1 -> 1.2 --- Log message: add more condition codes --- Diffs of the changes: (+33 -3) branch.ll | 36 +--- 1 files changed, 33 insertions(+), 3 deletions(-) Index: llvm/test/Regression/CodeGen/ARM/branch.ll diff -u llvm/test/Regression/CodeGen/ARM/branch.ll:1.1 llvm/test/Regression/CodeGen/ARM/branch.ll:1.2 --- llvm/test/Regression/CodeGen/ARM/branch.ll:1.1 Thu Aug 24 08:45:55 2006 +++ llvm/test/Regression/CodeGen/ARM/branch.ll Sat Sep 2 15:24:25 2006 @@ -1,7 +1,37 @@ -; RUN: llvm-as < %s | llc -march=arm -void %f(int %a, int* %v) { +; RUN: llvm-as < %s | llc -march=arm && +; RUN: llvm-as < %s | llc -march=arm | grep bne && +; RUN: llvm-as < %s | llc -march=arm | grep bge && +; RUN: llvm-as < %s | llc -march=arm | grep bcs + +void %f1(int %a, int %b, int* %v) { +entry: + %tmp = seteq int %a, %b ; [#uses=1] + br bool %tmp, label %cond_true, label %return + +cond_true: ; preds = %entry + store int 0, int* %v + ret void + +return:; preds = %entry + ret void +} + +void %f2(int %a, int %b, int* %v) { +entry: + %tmp = setlt int %a, %b ; [#uses=1] + br bool %tmp, label %cond_true, label %return + +cond_true: ; preds = %entry + store int 0, int* %v + ret void + +return:; preds = %entry + ret void +} + +void %f3(uint %a, uint %b, int* %v) { entry: - %tmp = seteq int %a, 0 ; [#uses=1] + %tmp = setlt uint %a, %b; [#uses=1] br bool %tmp, label %cond_true, label %return cond_true: ; preds = %entry ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll
Changes in directory llvm/test/Regression/Transforms/ArgumentPromotion: recursion.ll added (r1.1) --- Log message: Make ArgumentPromotion handle recursive functions that pass pointers in their recursive calls. --- Diffs of the changes: (+16 -0) recursion.ll | 16 1 files changed, 16 insertions(+) Index: llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll diff -c /dev/null llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll:1.1 *** /dev/null Sat Sep 2 16:19:54 2006 --- llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll Sat Sep 2 16:19:44 2006 *** *** 0 --- 1,16 + ; RUN: llvm-as < %s | opt -argpromotion | llvm-dis | grep x.val + ; ModuleID = 'recursive2.bc' + + implementation ; Functions: + + internal int %foo(int* %x) { + entry: + %tmp.foo = load int* %x + ret int %tmp.foo + } + + int %bar(int* %x) { + entry: + %tmp3 = call int %foo( int* %x); [#uses=1] + ret int %tmp3 + } \ No newline at end of file ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp
Changes in directory llvm/lib/Transforms/IPO: ArgumentPromotion.cpp updated: 1.22 -> 1.23 --- Log message: Make ArgumentPromotion handle recursive functions that pass pointers in their recursive calls. --- Diffs of the changes: (+33 -11) ArgumentPromotion.cpp | 44 +--- 1 files changed, 33 insertions(+), 11 deletions(-) Index: llvm/lib/Transforms/IPO/ArgumentPromotion.cpp diff -u llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.22 llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.23 --- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp:1.22 Sun Aug 27 17:42:52 2006 +++ llvm/lib/Transforms/IPO/ArgumentPromotion.cpp Sat Sep 2 16:19:44 2006 @@ -186,6 +186,8 @@ /// elements of the aggregate in order to avoid exploding the number of /// arguments passed in. bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg) const { + AliasAnalysis &AA = getAnalysis(); + // We can only promote this argument if all of the uses are loads, or are GEP // instructions (with constant indices) that are subsequently loaded. bool HasLoadInEntryBlock = false; @@ -240,6 +242,25 @@ } GEPIndices.push_back(Operands); } +} else if (CallInst* CI = dyn_cast(*UI)) { + // Is this a recursive call? + if (CI->getCalledFunction() != Arg->getParent()) +return false; + + // Find out what position argument we're dealing with. + unsigned Position = 0; + Function::arg_iterator ArgPos = Arg->getParent()->arg_begin(); + while (Arg != ArgPos) { +assert(ArgPos != Arg->getParent()->arg_end() && + "Arg not in parent's arg list?"); +Position++; +ArgPos++; + } + + // We only know that the call is safe if it's passing the argument in + // the same position that it came in at. + if (UI.getOperandNo() != Position+1) +return false; } else { return false; // Not a load or a GEP. } @@ -264,8 +285,7 @@ // Because there could be several/many load instructions, remember which // blocks we know to be transparent to the load. std::set TranspBlocks; - - AliasAnalysis &AA = getAnalysis(); + TargetData &TD = getAnalysis(); for (unsigned i = 0, e = Loads.size(); i != e; ++i) { @@ -360,15 +380,17 @@ for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; ++UI) { Instruction *User = cast(*UI); -assert(isa(User) || isa(User)); -std::vector Indices(User->op_begin()+1, User->op_end()); -ArgIndices.insert(Indices); -LoadInst *OrigLoad; -if (LoadInst *L = dyn_cast(User)) - OrigLoad = L; -else - OrigLoad = cast(User->use_back()); -OriginalLoads[Indices] = OrigLoad; +if (!isa(User)) { + assert(isa(User) || isa(User)); + std::vector Indices(User->op_begin()+1, User->op_end()); + ArgIndices.insert(Indices); + LoadInst *OrigLoad; + if (LoadInst *L = dyn_cast(User)) +OrigLoad = L; + else +OrigLoad = cast(User->use_back()); + OriginalLoads[Indices] = OrigLoad; +} } // Add a parameter to the function for each element passed in. ___ 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/LiveIntervalAnalysis.h
Changes in directory llvm/include/llvm/CodeGen: LiveIntervalAnalysis.h updated: 1.59 -> 1.60 --- Log message: Fix a typo pointed out by Gabor --- Diffs of the changes: (+1 -1) LiveIntervalAnalysis.h |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h diff -u llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.59 llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.60 --- llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h:1.59 Sat Sep 2 00:32:53 2006 +++ llvm/include/llvm/CodeGen/LiveIntervalAnalysis.hSat Sep 2 17:27:29 2006 @@ -180,7 +180,7 @@ /// below to update aliases. bool JoinIntervals(LiveInterval &LHS, LiveInterval &RHS); -/// SimpleJoin - Attempt to joint the specified interval into this one. The +/// SimpleJoin - Attempt to join the specified interval into this one. The /// caller of this method must guarantee that the RHS only contains a single /// value number and that the RHS is not defined by a copy from this /// interval. This returns false if the intervals are not joinable, or it ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll
Changes in directory llvm/test/Regression/Transforms/ArgumentPromotion: recursion.ll updated: 1.1 -> 1.2 --- Log message: Make this testcase actually recursive. I accidentally committed the wrong copy last time. --- Diffs of the changes: (+2 -1) recursion.ll |3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll diff -u llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll:1.1 llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll:1.2 --- llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll:1.1 Sat Sep 2 16:19:44 2006 +++ llvm/test/Regression/Transforms/ArgumentPromotion/recursion.ll Sat Sep 2 17:46:58 2006 @@ -5,7 +5,8 @@ internal int %foo(int* %x) { entry: -%tmp.foo = load int* %x +%tmp = load int* %x +%tmp.foo = call int %foo(int *%x) ret int %tmp.foo } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/VMCore/PassManagerT.h
Changes in directory llvm/lib/VMCore: PassManagerT.h updated: 1.68 -> 1.69 --- Log message: Count the time for a pass to ReleaseMemory against that pass. Not doing this was under accounting for the time that livevariables cost --- Diffs of the changes: (+2 -0) PassManagerT.h |2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/VMCore/PassManagerT.h diff -u llvm/lib/VMCore/PassManagerT.h:1.68 llvm/lib/VMCore/PassManagerT.h:1.69 --- llvm/lib/VMCore/PassManagerT.h:1.68 Sun Aug 27 19:08:25 2006 +++ llvm/lib/VMCore/PassManagerT.h Sat Sep 2 18:09:24 2006 @@ -670,7 +670,9 @@ for (std::vector::iterator I = DeadPass.begin(),E = DeadPass.end(); I != E; ++I) { PMDebug::PrintPassInformation(getDepth()+1, "Freeing Pass", *I, M); + if (TheTimeInfo) TheTimeInfo->passStarted(*I); (*I)->releaseMemory(); + if (TheTimeInfo) TheTimeInfo->passEnded(*I); } for (std::map::iterator I = CurrentAnalyses.begin(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm-www/Features.html
Changes in directory llvm-www: Features.html updated: 1.16 -> 1.17 --- Log message: clean this up --- Diffs of the changes: (+11 -8) Features.html | 19 +++ 1 files changed, 11 insertions(+), 8 deletions(-) Index: llvm-www/Features.html diff -u llvm-www/Features.html:1.16 llvm-www/Features.html:1.17 --- llvm-www/Features.html:1.16 Thu Mar 16 13:02:22 2006 +++ llvm-www/Features.html Sat Sep 2 19:03:59 2006 @@ -5,7 +5,8 @@ following: - Front-ends for C and C++ based on the GCC 3.4 parser. They support the + Front-ends for C and C++ based on the GCC 3.4 and 4.0.01 parsers. + They support the full ANSI-standard C and C++ languages, plus many GCC extensions. LLVM also includes a front-end for "Stacker", a Forth-like language. @@ -25,11 +26,11 @@ analysis, call graph construction, and support for profile-guided optimizations. - Static native code generators for x86, Sparc, PowerPC, Alpha, and - IA-64. + An easily retargettable code generator, which currently supports X86, + Sparc, PowerPC, Alpha, and IA-64. - A Just-In-Time (JIT) code generation system for x86, Sparc, and - PowerPC. + A Just-In-Time (JIT) code generation system for X86, Sparc, + PowerPC and PowerPC-64. A C back-end useful for testing and for generating native code on targets other than the ones listed above. @@ -67,9 +68,8 @@ LLVM has full support for accurate garbage collection. - It includes native code generators for X86, Sparc, PowerPC, Alpha, and - IA-64. LLVM can also compile to C code on targets where it does not have - native back-end support. Other native backends are in development. + The LLVM code generator is relatively easy to retarget, and makes use of + a powerful target description language. LLVM has extensive documentation and has hosted many projects of various sorts. @@ -86,6 +86,9 @@ LLVM is freely available under an OSI-approved "three-clause BSD" http://llvm.org/docs/FAQ.html#license";>license. + + LLVM is currently used by several commercial entities, who contribute + many extensions and new features. ___ 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/LiveVariables.h
Changes in directory llvm/include/llvm/CodeGen: LiveVariables.h updated: 1.28 -> 1.29 --- Log message: Move two methods out of line, make them work when the record for a machine instruction includes physregs. --- Diffs of the changes: (+6 -28) LiveVariables.h | 34 ++ 1 files changed, 6 insertions(+), 28 deletions(-) Index: llvm/include/llvm/CodeGen/LiveVariables.h diff -u llvm/include/llvm/CodeGen/LiveVariables.h:1.28 llvm/include/llvm/CodeGen/LiveVariables.h:1.29 --- llvm/include/llvm/CodeGen/LiveVariables.h:1.28 Wed Jan 4 01:29:33 2006 +++ llvm/include/llvm/CodeGen/LiveVariables.h Sat Sep 2 19:05:09 2006 @@ -242,19 +242,8 @@ /// removeVirtualRegistersKilled - Remove all killed info for the specified /// instruction. - void removeVirtualRegistersKilled(MachineInstr *MI) { -std::map >::iterator I = - RegistersKilled.find(MI); -if (I != RegistersKilled.end()) { - std::vector &Regs = I->second; - for (unsigned i = 0, e = Regs.size(); i != e; ++i) { -bool removed = getVarInfo(Regs[i]).removeKill(MI); -assert(removed && "kill not in register's VarInfo?"); - } - RegistersKilled.erase(I); -} - } - + void removeVirtualRegistersKilled(MachineInstr *MI); + /// addVirtualRegisterDead - Add information about the fact that the specified /// register is dead after being used by the specified instruction. /// @@ -292,21 +281,10 @@ return true; } - /// removeVirtualRegistersDead - Remove all of the specified dead - /// registers from the live variable information. - void removeVirtualRegistersDead(MachineInstr *MI) { -std::map >::iterator I = - RegistersDead.find(MI); -if (I != RegistersDead.end()) { - std::vector &Regs = I->second; - for (unsigned i = 0, e = Regs.size(); i != e; ++i) { -bool removed = getVarInfo(Regs[i]).removeKill(MI); -assert(removed && "kill not in register's VarInfo?"); - } - RegistersDead.erase(I); -} - } - + /// removeVirtualRegistersDead - Remove all of the dead registers for the + /// specified instruction from the live variable information. + void removeVirtualRegistersDead(MachineInstr *MI); + virtual void getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesAll(); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/LiveVariables.cpp
Changes in directory llvm/lib/CodeGen: LiveVariables.cpp updated: 1.57 -> 1.58 --- Log message: Move two methods out of line, make them work when the record for a machine instruction includes physregs. --- Diffs of the changes: (+36 -0) LiveVariables.cpp | 36 1 files changed, 36 insertions(+) Index: llvm/lib/CodeGen/LiveVariables.cpp diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.57 llvm/lib/CodeGen/LiveVariables.cpp:1.58 --- llvm/lib/CodeGen/LiveVariables.cpp:1.57 Sun Aug 27 17:30:17 2006 +++ llvm/lib/CodeGen/LiveVariables.cpp Sat Sep 2 19:05:09 2006 @@ -415,3 +415,39 @@ RegistersDead.erase(OldMI); } } + +/// removeVirtualRegistersKilled - Remove all killed info for the specified +/// instruction. +void LiveVariables::removeVirtualRegistersKilled(MachineInstr *MI) { + std::map >::iterator I = +RegistersKilled.find(MI); + if (I == RegistersKilled.end()) return; + + std::vector &Regs = I->second; + for (unsigned i = 0, e = Regs.size(); i != e; ++i) { +if (MRegisterInfo::isVirtualRegister(Regs[i])) { + bool removed = getVarInfo(Regs[i]).removeKill(MI); + assert(removed && "kill not in register's VarInfo?"); +} + } + RegistersKilled.erase(I); +} + +/// removeVirtualRegistersDead - Remove all of the dead registers for the +/// specified instruction from the live variable information. +void LiveVariables::removeVirtualRegistersDead(MachineInstr *MI) { + std::map >::iterator I = +RegistersDead.find(MI); + if (I == RegistersDead.end()) return; + + std::vector &Regs = I->second; + for (unsigned i = 0, e = Regs.size(); i != e; ++i) { +if (MRegisterInfo::isVirtualRegister(Regs[i])) { + bool removed = getVarInfo(Regs[i]).removeKill(MI); + assert(removed && "kill not in register's VarInfo?"); +} + } + RegistersDead.erase(I); +} + + ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLocal.cpp
Changes in directory llvm/lib/CodeGen: RegAllocLocal.cpp updated: 1.86 -> 1.87 --- Log message: When deleting a machine instruction, make sure to remove it from the livevariables information. This fixes several regalloc=local failures on x86 --- Diffs of the changes: (+4 -1) RegAllocLocal.cpp |5 - 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/lib/CodeGen/RegAllocLocal.cpp diff -u llvm/lib/CodeGen/RegAllocLocal.cpp:1.86 llvm/lib/CodeGen/RegAllocLocal.cpp:1.87 --- llvm/lib/CodeGen/RegAllocLocal.cpp:1.86 Sun Aug 27 07:54:01 2006 +++ llvm/lib/CodeGen/RegAllocLocal.cpp Sat Sep 2 19:06:08 2006 @@ -659,8 +659,11 @@ // Finally, if this is a noop copy instruction, zap it. unsigned SrcReg, DstReg; -if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg) +if (TII.isMoveInstr(*MI, SrcReg, DstReg) && SrcReg == DstReg) { + LV->removeVirtualRegistersKilled(MI); + LV->removeVirtualRegistersDead(MI); MBB.erase(MI); +} } MachineBasicBlock::iterator MI = MBB.getFirstTerminator(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits