[llvm-commits] CVS: llvm/include/llvm/Analysis/LoopInfo.h
Changes in directory llvm/include/llvm/Analysis: LoopInfo.h updated: 1.54 -> 1.55 --- Log message: Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert on this. --- Diffs of the changes: (+4 -1) LoopInfo.h |5 - 1 files changed, 4 insertions(+), 1 deletion(-) Index: llvm/include/llvm/Analysis/LoopInfo.h diff -u llvm/include/llvm/Analysis/LoopInfo.h:1.54 llvm/include/llvm/Analysis/LoopInfo.h:1.55 --- llvm/include/llvm/Analysis/LoopInfo.h:1.54 Wed Jun 7 17:00:25 2006 +++ llvm/include/llvm/Analysis/LoopInfo.h Fri Jun 9 13:33:30 2006 @@ -98,7 +98,7 @@ /// isLoopInvariant - Return true if the specified value is loop invariant /// bool isLoopInvariant(Value *V) const; - + //======// // APIs for simple analysis of the loop. // @@ -147,6 +147,9 @@ /// Value *getTripCount() const; + /// isLCSSAForm - Return true if the Loop is in LCSSA form + bool isLCSSAForm() const; + //======// // APIs for updating loop information after changing the CFG // ___ 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.16 -> 1.17 --- Log message: Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert on this. --- Diffs of the changes: (+3 -1) LCSSA.cpp |4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Utils/LCSSA.cpp diff -u llvm/lib/Transforms/Utils/LCSSA.cpp:1.16 llvm/lib/Transforms/Utils/LCSSA.cpp:1.17 --- llvm/lib/Transforms/Utils/LCSSA.cpp:1.16Thu Jun 8 15:02:53 2006 +++ llvm/lib/Transforms/Utils/LCSSA.cpp Fri Jun 9 13:33:30 2006 @@ -98,7 +98,7 @@ for (LoopInfo::iterator I = LI->begin(), E = LI->end(); I != E; ++I) { changed |= visitSubloop(*I); } - + return changed; } @@ -132,6 +132,8 @@ processInstruction(*I, exitBlocks); } + assert(L->isLCSSAForm()); + return true; } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Analysis/LoopInfo.cpp
Changes in directory llvm/lib/Analysis: LoopInfo.cpp updated: 1.70 -> 1.71 --- Log message: Make Loop able to verify that it is in LCSSA-form, and have the LCSSA pass assert on this. --- Diffs of the changes: (+16 -0) LoopInfo.cpp | 16 1 files changed, 16 insertions(+) Index: llvm/lib/Analysis/LoopInfo.cpp diff -u llvm/lib/Analysis/LoopInfo.cpp:1.70 llvm/lib/Analysis/LoopInfo.cpp:1.71 --- llvm/lib/Analysis/LoopInfo.cpp:1.70 Wed Jun 7 17:00:26 2006 +++ llvm/lib/Analysis/LoopInfo.cpp Fri Jun 9 13:33:30 2006 @@ -479,6 +479,22 @@ return 0; } +/// isLCSSAForm - Return true if the Loop is in LCSSA form +bool Loop::isLCSSAForm() const { + for (Loop::block_iterator BB = block_begin(), E = block_end(); + BB != E; ++BB) { +for (BasicBlock::iterator I = (*BB)->begin(), E = (*BB)->end(); I != E; ++I) + for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E; + ++UI) { +BasicBlock *UserBB = cast(*UI)->getParent(); +if (!isa(*UI) && !contains(UserBB)) { + return false; +} + } + } + + return true; +} //===---===// // APIs for updating loop information after changing the CFG ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
Changes in directory llvm/lib/Transforms/Scalar: LoopUnswitch.cpp updated: 1.36 -> 1.37 --- Log message: Add LCSSA as a requirement for LoopUnswitch, and assert that LoopUnswitch preserves LCSSA. --- Diffs of the changes: (+4 -0) LoopUnswitch.cpp |4 1 files changed, 4 insertions(+) Index: llvm/lib/Transforms/Scalar/LoopUnswitch.cpp diff -u llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.36 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.37 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp:1.36Fri Mar 24 01:14:00 2006 +++ llvm/lib/Transforms/Scalar/LoopUnswitch.cpp Fri Jun 9 13:40:32 2006 @@ -73,6 +73,8 @@ AU.addPreservedID(LoopSimplifyID); AU.addRequired(); AU.addPreserved(); + AU.addRequiredID(LCSSAID); + AU.addPreservedID(LCSSAID); } private: @@ -199,6 +201,8 @@ } } + assert(L->isLCSSAForm()); + return Changed; } ___ 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/Program.inc
Changes in directory llvm/lib/System/Unix: Program.inc updated: 1.17 -> 1.18 --- Log message: Don't pull in environ, not always safe. Global variables are bad anyway. Use execve when explicit environment variables ptr is available. Otherwise just use execv. --- Diffs of the changes: (+4 -8) Program.inc | 12 1 files changed, 4 insertions(+), 8 deletions(-) Index: llvm/lib/System/Unix/Program.inc diff -u llvm/lib/System/Unix/Program.inc:1.17 llvm/lib/System/Unix/Program.inc:1.18 --- llvm/lib/System/Unix/Program.inc:1.17 Wed Jun 7 18:18:33 2006 +++ llvm/lib/System/Unix/Program.incFri Jun 9 15:43:11 2006 @@ -29,8 +29,6 @@ #include #endif -extern char** environ; - namespace llvm { using namespace sys; @@ -147,13 +145,11 @@ } } - // Set up the environment - char** env = environ; - if (envp != 0) -env = (char**) envp; - // Execute! - execve (path.c_str(), (char** const)args, env); + if (envp != 0) +execve (path.c_str(), (char** const)args, (char**)envp); + else +execv (path.c_str(), (char** const)args); // If the execve() failed, we should exit and let the parent pick up // our non-zero exit status. exit (errno); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/tools/bugpoint/ToolRunner.cpp
Changes in directory llvm/tools/bugpoint: ToolRunner.cpp updated: 1.52 -> 1.53 --- Log message: After telling GCC to type of the input file with -x asm/-x c, switch back to -x none, to not foul up autodetection of .a file or .dylibs. --- Diffs of the changes: (+2 -0) ToolRunner.cpp |2 ++ 1 files changed, 2 insertions(+) Index: llvm/tools/bugpoint/ToolRunner.cpp diff -u llvm/tools/bugpoint/ToolRunner.cpp:1.52 llvm/tools/bugpoint/ToolRunner.cpp:1.53 --- llvm/tools/bugpoint/ToolRunner.cpp:1.52 Tue Jun 6 17:30:59 2006 +++ llvm/tools/bugpoint/ToolRunner.cpp Fri Jun 9 16:31:53 2006 @@ -405,6 +405,8 @@ #endif } GCCArgs.push_back(ProgramFile.c_str()); // Specify the input filename... + GCCArgs.push_back("-x"); + GCCArgs.push_back("none"); GCCArgs.push_back("-o"); sys::Path OutputBinary (ProgramFile+".gcc.exe"); OutputBinary.makeUnique(); ___ 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.214 -> 1.215 --- Log message: llvmgcc4 uses -regalloc=local at -O0. As it turns out, it's massively buggy, we should fix it, and fixing it requires testing it. --- Diffs of the changes: (+1 -1) Makefile.programs |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: llvm-test/Makefile.programs diff -u llvm-test/Makefile.programs:1.214 llvm-test/Makefile.programs:1.215 --- llvm-test/Makefile.programs:1.214 Tue Jun 6 19:05:16 2006 +++ llvm-test/Makefile.programs Fri Jun 9 16:47:24 2006 @@ -187,7 +187,7 @@ endif#DISABLE_DIFFS ifeq ($(ARCH),PowerPC) -LLCBETAOPTION := -sched=list-td +LLCBETAOPTION := -regalloc=local endif ifeq ($(ARCH),Alpha) LLCBETAOPTION := -sched=list-td ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/utils/TableGen/DAGISelEmitter.cpp
Changes in directory llvm/utils/TableGen: DAGISelEmitter.cpp updated: 1.207 -> 1.208 --- Log message: Wrap to 80 cols --- Diffs of the changes: (+5 -4) DAGISelEmitter.cpp |9 + 1 files changed, 5 insertions(+), 4 deletions(-) Index: llvm/utils/TableGen/DAGISelEmitter.cpp diff -u llvm/utils/TableGen/DAGISelEmitter.cpp:1.207 llvm/utils/TableGen/DAGISelEmitter.cpp:1.208 --- llvm/utils/TableGen/DAGISelEmitter.cpp:1.207Thu May 25 15:16:55 2006 +++ llvm/utils/TableGen/DAGISelEmitter.cpp Fri Jun 9 18:59:44 2006 @@ -2748,7 +2748,8 @@ emitCode(" Result = SDOperand(ResNode, N.ResNo-1);"); } emitCode("else"); - emitCode(" Result = SDOperand(" + ChainName + ".Val, " + ChainName + ".ResNo);"); + emitCode(" Result = SDOperand(" + ChainName + ".Val, " + + ChainName + ".ResNo);"); } else { emitCode("Result = SDOperand(ResNode, N.ResNo);"); } @@ -2780,8 +2781,8 @@ if (NodeHasInFlag || HasImpInputs) Code += ", InFlag"; emitCode(Code + ");"); -emitCode(" SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, N.ResNo, " - "ResNode, 0);"); +emitCode(" SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, N.ResNo" + ", ResNode, 0);"); emitCode(" Result = SDOperand(ResNode, 0);"); emitCode("}"); } @@ -3544,7 +3545,7 @@ << "E = From.Val->use_end(); UI != E; ++UI) {\n"; OS << " SDNode *Use = *UI;\n"; OS << " std::vector Ops;\n"; - OS << " for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i) {\n"; + OS << " for (unsigned i = 0, e = Use->getNumOperands(); i != e; ++i){\n"; OS << "SDOperand O = Use->getOperand(i);\n"; OS << "if (O.Val == From.Val)\n"; OS << " Ops.push_back(To);\n"; ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td PPCISelLowering.cpp
Changes in directory llvm/lib/Target/PowerPC: PPCInstrInfo.td updated: 1.221 -> 1.222 PPCISelLowering.cpp updated: 1.186 -> 1.187 --- Log message: Fix a problem exposed by the local allocator. CALL instructions are not marked as using incoming argument registers, so the local allocator would clobber them between their set and use. To fix this, we give the call instructions a variable number of uses in the CALL MachineInstr itself, so live variables understands the live ranges of these register arguments. --- Diffs of the changes: (+22 -18) PPCISelLowering.cpp | 32 ++-- PPCInstrInfo.td |8 2 files changed, 22 insertions(+), 18 deletions(-) Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.221 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.222 --- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.221 Tue Jun 6 16:29:23 2006 +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Fri Jun 9 20:14:28 2006 @@ -71,7 +71,7 @@ def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_PPCCallSeq,[SDNPHasChain]>; def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_PPCCallSeq,[SDNPHasChain]>; -def SDT_PPCCall : SDTypeProfile<0, 1, [SDTCisVT<0, i32>]>; +def SDT_PPCCall : SDTypeProfile<0, -1, [SDTCisVT<0, i32>]>; def PPCcall : SDNode<"PPCISD::CALL", SDT_PPCCall, [SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>; def PPCmtctr : SDNode<"PPCISD::MTCTR", SDT_PPCCall, @@ -310,11 +310,11 @@ LR,CTR, CR0,CR1,CR5,CR6,CR7] in { // Convenient aliases for call instructions - def BL : IForm<18, 0, 1, (ops calltarget:$func), + def BL : IForm<18, 0, 1, (ops calltarget:$func, variable_ops), "bl $func", BrB, []>; // See Pat patterns below. - def BLA : IForm<18, 1, 1, (ops aaddr:$func), + def BLA : IForm<18, 1, 1, (ops aaddr:$func, variable_ops), "bla $func", BrB, [(PPCcall imm:$func)]>; - def BCTRL : XLForm_2_ext<19, 528, 20, 0, 1, (ops), "bctrl", BrB, + def BCTRL : XLForm_2_ext<19, 528, 20, 0, 1, (ops variable_ops), "bctrl", BrB, [(PPCbctrl)]>; } Index: llvm/lib/Target/PowerPC/PPCISelLowering.cpp diff -u llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.186 llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.187 --- llvm/lib/Target/PowerPC/PPCISelLowering.cpp:1.186 Tue May 30 16:21:04 2006 +++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp Fri Jun 9 20:14:28 2006 @@ -1041,6 +1041,11 @@ } std::vector NodeTys; + NodeTys.push_back(MVT::Other); // Returns a chain + NodeTys.push_back(MVT::Flag);// Returns a flag for retval copy to use. + + std::vector Ops; + unsigned CallOpc = PPCISD::CALL; // If the callee is a GlobalAddress/ExternalSymbol node (quite common, every // direct call is) turn it into a TargetGlobalAddress/TargetExternalSymbol @@ -1055,11 +1060,8 @@ else { // Otherwise, this is an indirect call. We have to use a MTCTR/BCTRL pair // to do the call, we can't use PPCISD::CALL. -std::vector Ops; Ops.push_back(Chain); Ops.push_back(Callee); -NodeTys.push_back(MVT::Other); -NodeTys.push_back(MVT::Flag); if (InFlag.Val) Ops.push_back(InFlag); @@ -1075,25 +1077,27 @@ NodeTys.push_back(MVT::Flag); Ops.clear(); Ops.push_back(Chain); -Ops.push_back(InFlag); -Chain = DAG.getNode(PPCISD::BCTRL, NodeTys, Ops); -InFlag = Chain.getValue(1); +CallOpc = PPCISD::BCTRL; Callee.Val = 0; } - // Create the PPCISD::CALL node itself. + // If this is a direct call, pass the chain and the callee. if (Callee.Val) { -NodeTys.push_back(MVT::Other); // Returns a chain -NodeTys.push_back(MVT::Flag);// Returns a flag for retval copy to use. -std::vector Ops; Ops.push_back(Chain); Ops.push_back(Callee); -if (InFlag.Val) - Ops.push_back(InFlag); -Chain = DAG.getNode(PPCISD::CALL, NodeTys, Ops); -InFlag = Chain.getValue(1); } + // Add argument registers to the end of the list so that they are known live + // into the call. + for (unsigned i = 0, e = RegsToPass.size(); i != e; ++i) +Ops.push_back(DAG.getRegister(RegsToPass[i].first, + RegsToPass[i].second.getValueType())); + + if (InFlag.Val) +Ops.push_back(InFlag); + Chain = DAG.getNode(CallOpc, NodeTys, Ops); + InFlag = Chain.getValue(1); + std::vector ResultVals; NodeTys.clear(); ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
Changes in directory llvm/lib/Target/PowerPC: PPCISelDAGToDAG.cpp updated: 1.191 -> 1.192 --- Log message: Work around a nasty tblgen bug where it doesn't add operands for varargs nodes correctly. --- Diffs of the changes: (+157 -0) PPCISelDAGToDAG.cpp | 157 1 files changed, 157 insertions(+) Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.191 llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.192 --- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.191 Thu May 25 13:06:16 2006 +++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Fri Jun 9 20:15:02 2006 @@ -152,6 +152,8 @@ private: SDOperand SelectSETCC(SDOperand Op); +void MySelect_PPCbctrl(SDOperand &Result, SDOperand N); +void MySelect_PPCcall(SDOperand &Result, SDOperand N); }; } @@ -1093,6 +1095,7 @@ return; } case ISD::BRIND: { +// FIXME: Should custom lower this. SDOperand Chain, Target; Select(Chain, N->getOperand(0)); Select(Target,N->getOperand(1)); @@ -1101,12 +1104,166 @@ Result = CurDAG->SelectNodeTo(N, PPC::BCTR, MVT::Other, Chain); return; } + // FIXME: These are manually selected because tblgen isn't handling varargs + // nodes correctly. + case PPCISD::BCTRL:MySelect_PPCbctrl(Result, Op); return; + case PPCISD::CALL: MySelect_PPCcall(Result, Op); return; } SelectCode(Result, Op); } +// FIXME: This is manually selected because tblgen isn't handling varargs nodes +// correctly. +void PPCDAGToDAGISel::MySelect_PPCbctrl(SDOperand &Result, SDOperand N) { + SDOperand Chain(0, 0); + SDOperand InFlag(0, 0); + SDNode *ResNode; + + bool hasFlag = +N.getOperand(N.getNumOperands()-1).getValueType() == MVT::Flag; + + std::vector Ops; + // Push varargs arguments, including optional flag. + for (unsigned i = 1, e = N.getNumOperands()-hasFlag; i != e; ++i) { +Select(Chain, N.getOperand(i)); +Ops.push_back(Chain); + } + + Select(Chain, N.getOperand(0)); + Ops.push_back(Chain); + + if (hasFlag) { +Select(Chain, N.getOperand(N.getNumOperands()-1)); +Ops.push_back(Chain); + } + + ResNode = CurDAG->getTargetNode(PPC::BCTRL, MVT::Other, MVT::Flag, Ops); + Chain = SDOperand(ResNode, 0); + InFlag = SDOperand(ResNode, 1); + SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, 0, Chain.Val, + Chain.ResNo); + SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, 1, InFlag.Val, + InFlag.ResNo); + Result = SDOperand(ResNode, N.ResNo); + return; +} + +// FIXME: This is manually selected because tblgen isn't handling varargs nodes +// correctly. +void PPCDAGToDAGISel::MySelect_PPCcall(SDOperand &Result, SDOperand N) { + SDOperand Chain(0, 0); + SDOperand InFlag(0, 0); + SDOperand N1(0, 0); + SDOperand Tmp0(0, 0); + SDNode *ResNode; + Chain = N.getOperand(0); + N1 = N.getOperand(1); + + // Pattern: (PPCcall:void (imm:i32):$func) + // Emits: (BLA:void (imm:i32):$func) + // Pattern complexity = 4 cost = 1 + if (N1.getOpcode() == ISD::Constant) { +unsigned Tmp0C = (unsigned)cast(N1)->getValue(); + +std::vector Ops; +Ops.push_back(CurDAG->getTargetConstant(Tmp0C, MVT::i32)); + +bool hasFlag = + N.getOperand(N.getNumOperands()-1).getValueType() == MVT::Flag; + +// Push varargs arguments, not including optional flag. +for (unsigned i = 2, e = N.getNumOperands()-hasFlag; i != e; ++i) { + Select(Chain, N.getOperand(i)); + Ops.push_back(Chain); +} +Select(Chain, N.getOperand(0)); +Ops.push_back(Chain); +if (hasFlag) { + Select(Chain, N.getOperand(N.getNumOperands()-1)); + Ops.push_back(Chain); +} +ResNode = CurDAG->getTargetNode(PPC::BLA, MVT::Other, MVT::Flag, Ops); + +Chain = SDOperand(ResNode, 0); +InFlag = SDOperand(ResNode, 1); +SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, 0, Chain.Val, Chain.ResNo); +SelectionDAG::InsertISelMapEntry(CodeGenMap, N.Val, 1, InFlag.Val, InFlag.ResNo); +Result = SDOperand(ResNode, N.ResNo); +return; + } + + // Pattern: (PPCcall:void (tglobaladdr:i32):$dst) + // Emits: (BL:void (tglobaladdr:i32):$dst) + // Pattern complexity = 4 cost = 1 + if (N1.getOpcode() == ISD::TargetGlobalAddress) { +std::vector Ops; +Ops.push_back(N1); + +bool hasFlag = + N.getOperand(N.getNumOperands()-1).getValueType() == MVT::Flag; + +// Push varargs arguments, not including optional flag. +for (unsigned i = 2, e = N.getNumOperands()-hasFlag; i != e; ++i) { + Select(Chain, N.getOperand(i)); + Ops.push_back(Chain); +} +Select(Chain, N.getOperand(0)); +Ops.push_back(Chain); +if (hasFlag) { + Select(Chain, N.getOperand(N.getNumOperands()-1)); + Ops.push_back(Chain); +} + +ResNode = CurDAG->getTargetNode(PPC::BL, MVT::Other, MVT::Fla
[llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp
Changes in directory llvm/lib/VMCore: Constants.cpp updated: 1.153 -> 1.154 --- Log message: Add a missing assertion that would have helped out Reid --- Diffs of the changes: (+2 -0) Constants.cpp |2 ++ 1 files changed, 2 insertions(+) Index: llvm/lib/VMCore/Constants.cpp diff -u llvm/lib/VMCore/Constants.cpp:1.153 llvm/lib/VMCore/Constants.cpp:1.154 --- llvm/lib/VMCore/Constants.cpp:1.153 Tue May 30 13:15:07 2006 +++ llvm/lib/VMCore/Constants.cpp Fri Jun 9 23:16:23 2006 @@ -863,6 +863,8 @@ static char getValType(ConstantAggregateZero *CPZ) { return 0; } Constant *ConstantAggregateZero::get(const Type *Ty) { + assert((isa(Ty) || isa(Ty) || isa(Ty)) && + "Cannot create an aggregate zero of non-aggregate type!"); return AggZeroConstants.getOrCreate(Ty, 0); } ___ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits