search for: numelem

Displaying 15 results from an estimated 15 matches for "numelem".

2014 Aug 21
2
[LLVMdev] Any Optimization Suggestion to Get Rid of AddrSpaceCast around PHI
...%for.body.lr.ph ], [ %inc, %for.body ] %ptr.02 = phi i32 addrspace(4)* [ %0, %for.body.lr.ph ], [ %add.ptr, %for.body ] store i32 %i.03, i32 addrspace(4)* %ptr.02, align 4 %add.ptr = getelementptr inbounds i32 addrspace(4)* %ptr.02, i64 4 %inc = add i32 %i.03, 1 %exitcond = icmp eq i32 %inc, %numElems br i1 %exitcond, label %for.end, label %for.body for.end: ; preds = % Thanks; Changpeng -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140821/a0d9e48b/attachment.html>
2011 Dec 02
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...ed type is already a vector, then its length is doubled. > + static inline VectorType *getVecType(Type *VElemType) { What about naming this getVecTypeForPair()? I think ElemType is sufficient. No need for the 'V'. > + if (VElemType->isVectorTy()) { > + unsigned numElem = cast<VectorType>(VElemType)->getNumElements(); > + return VectorType::get(VElemType->getScalarType(), numElem*2); > + } else { > + return VectorType::get(VElemType, 2); > + } > + } This can be: if (VectorType *VectorTy = dyn_cast<VectorTy...
2011 Dec 14
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...ngth is doubled. > > + static inline VectorType *getVecType(Type *VElemType) { > > What about naming this getVecTypeForPair()? > > I think ElemType is sufficient. No need for the 'V'. > > > + if (VElemType->isVectorTy()) { > > + unsigned numElem = cast<VectorType>(VElemType)->getNumElements(); > > + return VectorType::get(VElemType->getScalarType(), numElem*2); > > + } else { > > + return VectorType::get(VElemType, 2); > > + } > > + } > > This can be: > > if...
2011 Nov 23
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 21:22 -0600, Hal Finkel wrote: > On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > > Tobias, > > > > I've attached an updated patch. It contains a few bug fixes and many > > (refactoring and coding-convention) changes inspired by your comments. > > > > I'm currently trying to fix the bug responsible for causing a compile
2011 Dec 02
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...ngth is doubled. > > + static inline VectorType *getVecType(Type *VElemType) { > > What about naming this getVecTypeForPair()? > > I think ElemType is sufficient. No need for the 'V'. > > > + if (VElemType->isVectorTy()) { > > + unsigned numElem = cast<VectorType>(VElemType)->getNumElements(); > > + return VectorType::get(VElemType->getScalarType(), numElem*2); > > + } else { > > + return VectorType::get(VElemType, 2); > > + } > > + } > > This can be: > > if...
2011 Nov 22
5
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
On Mon, 2011-11-21 at 11:55 -0600, Hal Finkel wrote: > Tobias, > > I've attached an updated patch. It contains a few bug fixes and many > (refactoring and coding-convention) changes inspired by your comments. > > I'm currently trying to fix the bug responsible for causing a compile > failure when compiling >
2015 Feb 13
2
[LLVMdev] DAGCombiner::MergeConsecutiveStores
.../ Replace one of the loads with the new load. LoadSDNode *Ld = cast<LoadSDNode>(LoadNodes[0].MemNode); DAG.ReplaceAllUsesOfValueWith(SDValue(Ld, 1), SDValue(NewLoad.getNode(), 1)); // Remove the rest of the load chains. for (unsigned i = 1; i < NumElem ; ++i) { // Replace all chain users of the old load nodes with the chain of the new // load node. LoadSDNode *Ld = cast<LoadSDNode>(LoadNodes[i].MemNode); DAG.ReplaceAllUsesOfValueWith(SDValue(Ld, 1), Ld->getChain()); } And here I can't understand why we should...
2009 May 21
0
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On Wed, May 20, 2009 at 4:55 PM, Dan Gohman <gohman at apple.com> wrote: > Can you explain why you chose the approach of using a new pass? > I pictured removing LegalizeDAG's type legalization code would > mostly consist of finding all the places that use TLI.getTypeAction > and just deleting code for handling its Expand and Promote. Are you > anticipating something more
2009 May 20
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
On May 20, 2009, at 1:34 PM, Eli Friedman wrote: > On Wed, May 20, 2009 at 1:19 PM, Eli Friedman > <eli.friedman at gmail.com> wrote: > >> Per subject, this patch adding an additional pass to handle vector >> >> operations; the idea is that this allows removing the code from >> >> LegalizeDAG that handles illegal types, which should be a significant
2009 May 21
2
[LLVMdev] [PATCH] Add new phase to legalization to handle vector operations
...AG.getConstantFP(-0.0, Op.getValueType()); + return DAG.getNode(ISD::FSUB, Op.getDebugLoc(), Op.getValueType(), + Zero, Op.getOperand(0)); + } + return UnrollVectorOp(Op); +} + +SDValue VectorLegalizer::UnrollVSETCC(SDValue Op) { + MVT VT = Op.getValueType(); + unsigned NumElems = VT.getVectorNumElements(); + MVT EltVT = VT.getVectorElementType(); + SDValue LHS = Op.getOperand(0), RHS = Op.getOperand(1), CC = Op.getOperand(2); + MVT TmpEltVT = LHS.getValueType().getVectorElementType(); + DebugLoc dl = Op.getDebugLoc(); + SmallVector<SDValue, 8> Ops(NumElems); +...
2011 Feb 19
3
[LLVMdev] DIFactory
On Fri, Feb 18, 2011 at 1:52 PM, Renato Golin <rengolin at systemcall.org>wrote: > On 18 February 2011 21:34, Talin <viridia at gmail.com> wrote: > > Sorry, I meant DIBuilder. > > DIBuilder is the new DIFactory. I've been playing with it this week > and it's much easier and straightforward to use. I'm still having > problems to create arrays, though.
2011 Nov 17
2
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...anged = true; > + } > + else { > + break; > + } In general you should use '} else {'. Here braces are not needed at all. > + static inline VectorType *getVecType(Type *iType) { > + if (iType->isVectorTy()) { > + unsigned numElem = cast<VectorType>(iType)->getNumElements(); > + return VectorType::get(iType->getScalarType(), numElem*2); > + } > + else { > + return VectorType::get(iType, 2); > + } > + } > + > + // Note: when this function returns 0, the &g...
2011 Nov 21
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
...else { > > + break; > > + } > > In general you should use '} else {'. Here braces are not needed at all. > > > + static inline VectorType *getVecType(Type *iType) { > > + if (iType->isVectorTy()) { > > + unsigned numElem = cast<VectorType>(iType)->getNumElements(); > > + return VectorType::get(iType->getScalarType(), numElem*2); > > + } > > + else { > > + return VectorType::get(iType, 2); > > + } > > + } > > + > > + // No...
2011 Nov 16
0
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, et al., Attached is the my autovectorization pass. I've fixed a bug that appears when using -bb-vectorize-aligned-only, fixed some 80-col violations, etc., and at least on x86_64, all test cases pass except for a few; and all of these failures look like instruction-selection bugs. For example: MultiSource/Applications/ClamAV - fails to compile shared_sha256.c with an error: error in
2011 Nov 15
3
[LLVMdev] [llvm-commits] [PATCH] BasicBlock Autovectorization Pass
Tobias, I've attached the latest version of my autovectorization patch. I was able to add support for using the ScalarEvolution analysis for load/store pairing (thanks for your help!). This led to a modest performance increase and a modest compile-time increase. This version also has a cutoff as you suggested (although the default value is set high (4000 instructions between pairs) because