search for: isintegerty

Displaying 20 results from an estimated 32 matches for "isintegerty".

Did you mean: isinteger
2015 Jan 22
2
[LLVMdev] access IntegerType::getSignBit from Type *
Hi, I have a Type * which may come from an IntegerType as shown below: Type.getIntegerBitWidth() tells me numBits. But how to extract the IntegerType.getSignBit? If pType isIntegerType, I need to know if it is signed or unsigned... How to achieve this? Thx Alex llvm::Type * getRandomValid_IntegerType(llvm::LLVMContext &C) { using namespace llvm; //--- determine num of bits between allowed bits int rI=randInt(IntegerType::MIN_INT_BITS,IntegerType::MAX_INT_...
2017 Jan 31
2
Folding zext from i1 into PHI nodes with only zwo incoming values.
...to convert from a legal to an illegal type for example > or from > -/// a smaller to a larger illegal type. > +/// a smaller to a larger illegal type. i1 is always treated as a legal > type. > bool InstCombiner::ShouldChangeType(Type *From, Type *To) const { > assert(From->isIntegerTy() && To->isIntegerTy()); > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170131/38a0e09a/attachment.html>
2013 Feb 25
2
[LLVMdev] Queries regarding function's arguments data type
...onType *FTy = F->getFunctionType(); unsigned int numArgs = FTy->getNumParams(); //Currently just checking data type of the 0th argument. Eventually will be running it in the loop from 0 to numArgs. errs() << "\n1 Argument type int 32 : " << FTy->getParamType(0)->isIntegerTy(32); errs() << "\n2 Argument type char : " << FTy->getParamType(0)->isIntegerTy(8); errs() << "\n4 Argument type pointer : " << FTy->getParamType(0)->isPointerTy(); errs() << "\n5 Argument type array : " << FTy->...
2011 Jun 06
2
[LLVMdev] Explanation
Hi All, I am trying to check if a Value type is a int32 pointer by using if(T == Type::getInt1PtrTy(Context, AS)) ... I am trying to understand the AS (address space). How do I get it? Thanks. George * * -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110606/775e4f09/attachment.html>
2011 Jun 06
0
[LLVMdev] Explanation
...17:08, George Baah <georgebaah at gmail.com> wrote: > if(T == Type::getInt1PtrTy(Context, AS)) ... Hi, You don't need to care about address spaces to check for an int32*: if (T->isPointerTy()) { const Type* intT = cast<PointerType>(T)->getElementType(); if (intT->isIntegerTy() && intT->getPrimitiveSizeInBits() == 32) cout << "Yeah!" << endl; } Also, to create a pointer type, if you don't care about address space at all, use the unqualified version: const Type* ptrT = PointerType::getUnqual(intT); cheers, --renato
2011 Jun 06
1
[LLVMdev] Explanation
...rgebaah at gmail.com> wrote: >> if(T == Type::getInt1PtrTy(Context, AS)) ... > > You don't need to care about address spaces to check for an int32*: > > if (T->isPointerTy()) { > const Type* intT = cast<PointerType>(T)->getElementType(); > if (intT->isIntegerTy() && intT->getPrimitiveSizeInBits() == 32) > cout << "Yeah!" << endl; > } The more idiomatic way would be: if (const PointerType *Ptr = dyn_cast<PointerType>(T)) if (Ptr->getElementType()->isIntegerTy(32)) cout << "Yeah!&...
2017 Jan 31
0
Folding zext from i1 into PHI nodes with only zwo incoming values.
...to an illegal type for example >> or from >> -/// a smaller to a larger illegal type. >> +/// a smaller to a larger illegal type. i1 is always treated as a legal >> type. >> bool InstCombiner::ShouldChangeType(Type *From, Type *To) const { >> assert(From->isIntegerTy() && To->isIntegerTy()); >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170131/7b66db3c/attachment.html>
2017 Jan 31
1
Folding zext from i1 into PHI nodes with only zwo incoming values.
...>>> example or from >>> -/// a smaller to a larger illegal type. >>> +/// a smaller to a larger illegal type. i1 is always treated as a legal >>> type. >>> bool InstCombiner::ShouldChangeType(Type *From, Type *To) const { >>> assert(From->isIntegerTy() && To->isIntegerTy()); >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170131/64798dc6/attachment.html>
2013 Feb 25
0
[LLVMdev] Queries regarding function's arguments data type
...onType(); > unsigned int numArgs = FTy->getNumParams(); > > //Currently just checking data type of the 0th argument. Eventually > will be running it in the loop from 0 to numArgs. > errs() << "\n1 Argument type int 32 : " << > FTy->getParamType(0)->isIntegerTy(32); > errs() << "\n2 Argument type char : " << > FTy->getParamType(0)->isIntegerTy(8); > errs() << "\n4 Argument type pointer : " << > FTy->getParamType(0)->isPointerTy(); > errs() << "\n5 Argument type array...
2015 Mar 10
4
[LLVMdev] n-bit bytes for clang/llvm
...appears (to my neophyte eyes) to be explicitly 8-bit, e.g. one instance called out in the mail thread remains: /// isString - This method returns true if this is an array of i8. bool ConstantDataSequential::isString() const { return isa<ArrayType>(getType()) && getElementType()->isIntegerTy(8); } I didn't find anything related beyond this mail thread such as a discussion of a patch but of course I might be searching too narrowly - perhaps someone here can recall whether it went any further, whether insurmountable barriers do exist, etc? Thanks for whatever advice & thread ne...
2017 Jan 30
0
Folding zext from i1 into PHI nodes with only zwo incoming values.
...o'. /// We don't want to convert from a legal to an illegal type for example or from -/// a smaller to a larger illegal type. +/// a smaller to a larger illegal type. i1 is always treated as a legal type. bool InstCombiner::ShouldChangeType(Type *From, Type *To) const { assert(From->isIntegerTy() && To->isIntegerTy()); On Mon, Jan 30, 2017 at 1:22 PM, Björn Steinbrink <bsteinbr at gmail.com> wrote: > Hi Sanjay, > > unfortunately that patch does not help in my case. Here's the IR that > fails to get fully optimized: > > target datalayout = &quo...
2015 Oct 12
2
question about llvm partial unrolling/runtime unrolling
...Runtime.cpp // Only unroll loops with a computable trip count and the trip count needs // to be an int value (allowing a pointer type is a TODO item) const SCEV *BECountSC = SE->getBackedgeTakenCount(L); if (isa<SCEVCouldNotCompute>(BECountSC) || !BECountSC->getType()->isIntegerTy()) return false; BECountSC=0xcccccccc and returns false here. Based on the comments it looks like I still need a constant loop counter. Is there a way to unroll with non-constant loop counter as in the example above? Thanks, Frances -------------- next part -------------- An HTML attachment...
2017 Aug 07
2
vrp
..., DT, llvm::outs()); The value analysis in llvm is lazy (hence, LVI), so you're trying to print an empty cache, I guess. > for (BasicBlock &BB : F) { > for (Instruction &I : BB) { > if (Value* v = dyn_cast<Value>(&I)) > if (v->getType()->isIntegerTy()) { > ConstantRange r = LV.getConstantRange(v, &BB, &I); > I.dump(); > printf("LOWER VALUE : %llu\n",r.getLower().getRawData()); > printf("UPPER VALUE : %llu\n",r.getUpper().getRawData()); > } > } About your...
2017 Jan 30
3
Folding zext from i1 into PHI nodes with only zwo incoming values.
Hi Sanjay, unfortunately that patch does not help in my case. Here's the IR that fails to get fully optimized: target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" define fastcc zeroext i1 @testfunc(i8** noalias nocapture readonly dereferenceable(8)) unnamed_addr { entry-block: %1 = load i8*, i8**
2010 Apr 22
1
[LLVMdev] 2.7 release notes
...ago) : > > --- ReleaseNotes.html.old 2010-04-22 09:43:42.000000000 +0200 > +++ ReleaseNotes.html 2010-04-22 10:27:22.000000000 +0200 > @@ -862,6 +862,18 @@ > <tt>isFPOrFPVector</tt> and <tt>isFPOrFPVector</tt> methods have been renamed > <tt>isIntegerTy</tt>, <tt>isIntOrIntVectorTy</tt>, <tt>isFloatingPointTy</tt>, > <tt>isFPOrFPVectorTy</tt> and <tt>isFPOrFPVectorTy</tt> respectively.</li> > + > +<li><tt>llvm::Instruction::clone()</tt> no longer takes argument...
2017 Aug 07
2
vrp
...azy (hence, LVI), so you're trying to >> print an empty cache, I guess. >> >> > for (BasicBlock &BB : F) { >> > for (Instruction &I : BB) { >> > if (Value* v = dyn_cast<Value>(&I)) >> > if (v->getType()->isIntegerTy()) { >> > ConstantRange r = LV.getConstantRange(v, &BB, &I); >> > I.dump(); >> > printf("LOWER VALUE : %llu\n",r.getLower().getRawData()); >> > printf("UPPER VALUE : %llu\n",r.getUpper().getRawData()); &...
2010 Apr 22
0
[LLVMdev] 2.7 release notes
...nt a private email some time ago) : --- ReleaseNotes.html.old 2010-04-22 09:43:42.000000000 +0200 +++ ReleaseNotes.html 2010-04-22 10:27:22.000000000 +0200 @@ -862,6 +862,18 @@ <tt>isFPOrFPVector</tt> and <tt>isFPOrFPVector</tt> methods have been renamed <tt>isIntegerTy</tt>, <tt>isIntOrIntVectorTy</tt>, <tt>isFloatingPointTy</tt>, <tt>isFPOrFPVectorTy</tt> and <tt>isFPOrFPVectorTy</tt> respectively.</li> + +<li><tt>llvm::Instruction::clone()</tt> no longer takes argument.</li> +...
2015 Oct 16
2
question about llvm partial unrolling/runtime unrolling
...roll loops with a computable trip count and the trip count > needs > // to be an int value (allowing a pointer type is a TODO item) > const SCEV *BECountSC = SE->getBackedgeTakenCount(L); > if (isa<SCEVCouldNotCompute>(BECountSC) || > !BECountSC->getType()->isIntegerTy()) > return false; > > BECountSC=0xcccccccc and returns false here. > > Based on the comments it looks like I still need a constant loop counter. > Is there a way to unroll with non-constant loop counter as in the example > above? > > Computable is not the same as con...
2017 Aug 07
2
vrp
Hello, I am trying to figure out, what vrp propagation does in llvm. I tried this program: #include <stdio.h> int main() { int s = 0; int j = 0; for (int i = 0; i < 100; i++) { j = j+i+1; s+=j; } return (s+j); } And got this under optimized version ( I don't want everything to be eliminated) define i32 @main()
2015 Mar 11
3
[LLVMdev] n-bit bytes for clang/llvm
...appears (to my neophyte eyes) to be explicitly 8-bit, e.g. one instance called out in the mail thread remains: /// isString - This method returns true if this is an array of i8. bool ConstantDataSequential::isString() const {   return isa<ArrayType>(getType()) && getElementType()->isIntegerTy(8); } I didn't find anything related beyond this mail thread such as a discussion of a patch but of course I might be searching too narrowly - perhaps someone here can recall whether it went any further, whether insurmountable barriers do exist, etc? Thanks for whatever advice & thread ne...