search for: getmemoryopcost

Displaying 6 results from an estimated 6 matches for "getmemoryopcost".

2013 Jul 19
4
[LLVMdev] Disable vectorization for unaligned data
...return false; .... } After that, I could see that vectorization is still done on unaligned data except that llvm will copy the data back and forth from the source to the top of the stack and work from there. This is very costly, I rather get scalar operations. Then I tried to add: unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment, unsigned AddressSpace) const { if (Src->isVectorTy() && Alignment != 16) return 10000; // <== high number to try to avoid unaligned load/store. return TargetTransformInf...
2013 Jul 20
0
[LLVMdev] Disable vectorization for unaligned data
...> > After that, I could see that vectorization is still done on unaligned data except that llvm will copy the data back and forth from the source to the top of the stack and work from there. This is very costly, I rather get scalar operations. > > Then I tried to add: > unsigned getMemoryOpCost(unsigned Opcode, Type *Src, > unsigned Alignment, > unsigned AddressSpace) const { > if (Src->isVectorTy() && Alignment != 16) > return 10000; // <== high number to try to avoid unaligned load/store. >...
2013 Jul 21
2
[LLVMdev] Disable vectorization for unaligned data
...ld see that vectorization is still done on unaligned > data except that llvm will copy the data back and forth from the source to > the top of the stack and work from there. This is very costly, I rather get > scalar operations. > > > > Then I tried to add: > > unsigned getMemoryOpCost(unsigned Opcode, Type *Src, > > unsigned Alignment, > > unsigned AddressSpace) const { > > if (Src->isVectorTy() && Alignment != 16) > > return 10000; // <== high number to try to avoid unaligned &...
2013 Jul 21
0
[LLVMdev] Disable vectorization for unaligned data
No, I am afraid not without computing alignment based on the scalar code. In order to limit vectorization to 16-byte aligned data we need to know that data is 16-byte aligned. The way we vectorize we won’t know that until after we have vectorized. As you have observed we will pass “4” to getMemoryOpCost in the loop vectorizer (as that is the only thing that can be inferred from a consecutive scalar access like “aligned_ptr += 32bit”). scalar code -> estimate cost based on scalar instructions -> vectorize -> vectorized code -> ... -> instcombine (calls ComputeMaskedBits) which compu...
2013 Jul 19
0
[LLVMdev] Disable vectorization for unaligned data
...ter that, I could see that vectorization is still done on unaligned data > except that llvm will copy the data back and forth from the source to the > top of the stack and work from there. This is very costly, I rather get > scalar operations. > > Then I tried to add: > unsigned getMemoryOpCost(unsigned Opcode, Type *Src, > unsigned Alignment, > unsigned AddressSpace) const { > if (Src->isVectorTy() && Alignment != 16) > return 10000; // <== high number to try to avoid unaligned load/store. >...
2019 Oct 25
4
Tag for using git describe on master
..."a4783ef58d3" is the hash with "g" as a magic prefix to indicate it's a git hash. The name can be used to refer to commits directly (git only looks at the hash after the "g"): $ git show llvmorg-10-init-8348-ga4783ef58d3 -s --oneline a4783ef58d3 [Alignment][NFC] getMemoryOpCost uses MaybeAlign Thanks, Hans