search for: constantsint

Displaying 20 results from an estimated 35 matches for "constantsint".

Did you mean: constantint
2005 Mar 16
2
[LLVMdev] Dynamic Creation of a simple program
Hi Misha, Thanks for your answer I was doing this: ======================== BasicBlock *BBlock = new BasicBlock("entry", MyFunc); ... Value *Zero = ConstantSInt::get(Type::IntTy, 0); Value *UZero = ConstantUInt::get(Type::UIntTy, 0); MallocInst* mi = new MallocInst( STyStru ); mi->setName("tmp.0"); BBlock->getInstList().push_back( mi ); GetElementPtrInst *m_Next = new GetElementPtrInst(mi, UZero, Zero, "tmp.3", BBlock...
2006 Sep 12
1
[LLVMdev] ICE in LLVM GCC4 Front End
...ow that we can turn this - // into a getelementptr instruction. - int64_t EltOffset = Offset/EltSize; - if (EltOffset*EltSize == Offset) { - // If this is a subtract, we want to step backwards. - if (Opc == Instruction::Sub) - EltOffset = -EltOffset; - Constant *C = ConstantSInt::get(Type::LongTy, EltOffset); - Value *V = new GetElementPtrInst(LHS, C, "tmp", CurBB); - return CastToType(V, TREE_TYPE(exp)); + // If EltSize exactly divides Offset, then we know that we can turn + // this into a getelementptr instruction. + int64_t EltOffset...
2006 Oct 20
0
[LLVMdev] SignlessTypes: Removal of Constant[SU]Int
All, Just in case you're not on the llvm-commits list, the classes ConstantSInt and ConstantUInt have been removed from the LLVM C++ IR. This affects only the CVS HEAD. A patch to llvm-gcc4 to compensate for this should be available in the next day or so, depending on when it gets committed and updated. If you're maintaining a language front end or other llvm-based softwa...
2002 Sep 22
2
[LLVMdev] Accessing constant indexes in GetElementPtr
...st that is used to access structure elements. In this case the indexes will be constants and I want to get the constant values as an a native C int. Now I can iterate over all the indexes with idx_begin(). I can cast all of the indexes to a ConstantIntegral. However, I cannot cast the indexes to a ConstantSInt or ConstantUInt (cast<> throws an assertion) and these two classes are the ones that have the getValue() method I need. Am I missing something here? Wojciech
2004 Aug 09
1
[LLVMdev] API on JIT, code snippets
...; > // Add a basic block to the function... (again, it automatically inserts > // because of the last argument.) > BasicBlock *BB = new BasicBlock("EntryBlock of add1 function", Add1F); > > // Get pointers to the constant `1'... > Value *One = ConstantSInt::get(Type::IntTy, 1); > > // Get pointers to the integer argument of the add1 function... > Value *ArgX = 0; // FIXME!! > > > // Create the add instruction... does not insert... > Instruction *Add = BinaryOperator::create(Instruction::Add, One, ArgX, >...
2004 Aug 09
5
[LLVMdev] API on JIT, code snippets
...; > // Add a basic block to the function... (again, it automatically inserts > // because of the last argument.) > BasicBlock *BB = new BasicBlock("EntryBlock of add1 function", Add1F); > > // Get pointers to the constant `1'... > Value *One = ConstantSInt::get(Type::IntTy, 1); > > // Get pointers to the integer argument of the add1 function... > Value *ArgX = 0; // FIXME!! > > > // Create the add instruction... does not insert... > Instruction *Add = BinaryOperator::create(Instruction::Add, One, ArgX, >...
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
...Add a basic block to the function... (again, it automatically inserts > > // because of the last argument.) > > BasicBlock *BB = new BasicBlock("EntryBlock of fib function", FibF); > > > > // Get pointers to the constants ... > > Value *One = ConstantSInt::get(Type::IntTy, 1); > > Value *Two = ConstantSInt::get(Type::IntTy, 2); > > > > // Get pointers to the integer argument of the add1 function... > > assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg > > > > Argument &a...
2002 Sep 17
1
[LLVMdev] Compile error in InstrSelectionSupport.cpp
ISSUE: line 474 of InstrSelectionSupport.cpp is a conditional expression of the form (<expr> ? (ConstantSInt*) : (ConstantUInt*)), which is an unholy mixture of pointer types. ACTION: Apply static_cast<Value*> to the two pointers, as the source intends. -- Casey Carter Casey at Carter.net ccarter at uiuc.edu AIM: cartec69 -------------- next part -------------- An embedded and charset-unspecif...
2005 Mar 08
1
[LLVMdev] Making Constants from GenericValues
I'm trying to turn some GenericValues into Constants in the interpreter using code like this, in a switch statement: case Type::IntTyID: SI = ConstantSInt::get(FB->getType(), ArgVals[i].IntVal); params.push_back(UI); UI->dump(); //for testing break; FB is a Function::ArgumentListType::iterator ArgVals is a std::vector<GenericValue> the switch is on FB->getType()->getTypeID() so basically what I am doing is it...
2006 Nov 15
0
[LLVMdev] 1.9 Prerelease Available for Testing
...t think its really a bug. > Could you try doing a make first and then install? Please let me > know if > you have any more problems. You were right. Doing a proper "make ; make install" did the trick. After making necessary adjustments to my LLVM-app (due to disappearing of ConstantSInt and ConstantUInt, and replacement of RegisterOpt by RegisterPass), all its tests passed. Didn't check LLVM's test suite. Kind regards, Bram Adams GH-SEL, INTEC, Ghent University
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...M); > > // Add a basic block to the function... (again, it automatically inserts > // because of the last argument.) > BasicBlock *BB = new BasicBlock("EntryBlock of fib function", FibF); > > // Get pointers to the constants ... > Value *One = ConstantSInt::get(Type::IntTy, 1); > Value *Two = ConstantSInt::get(Type::IntTy, 2); > > // Get pointers to the integer argument of the add1 function... > assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg > > Argument &ArgX = FibF->afront();...
2006 Apr 26
0
[LLVMdev] LLVM Java front-end
Hello, I have just downloaded the source from CVS. Does exist a LLVM Java front-end? If yes, where can I find documentations about it? If no, is anyway somebody working on it? Where can I find the source code related? Thanks, Alessandro
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
...asic block to the function... (again, it automatically inserts > > // because of the last argument.) > > BasicBlock *BB = new BasicBlock("EntryBlock of add1 function", Add1F); > > > > // Get pointers to the constant `1'... > > Value *One = ConstantSInt::get(Type::IntTy, 1); > > > > // Get pointers to the integer argument of the add1 function... > > Value *ArgX = 0; // FIXME!! > > > > > > // Create the add instruction... does not insert... > > Instruction *Add = BinaryOperator::create(Instr...
2006 Nov 15
3
[LLVMdev] 1.9 Prerelease Available for Testing
> When building LLVM 1.9 on OSX 10.4.8, I get (after a while, see attachment): > > make[1]: *** No rule to make target `/path/to/llvm-build/Debug/bin/tblgen', > needed by `/path/to/llvm-build/lib/VMCore/Debug/Intrinsics.gen.tmp'. Stop. > make: *** [install] Error 1 > > when doing: > > $LLVM_SRC/configure --prefix=$LLVM_INSTALL --with-llvmgccdir=$LLVM_FRONT
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
Reid wrote: > I have to agree with Misha on this. None of us knows "everything" about > LLVM and as you can see, Misha responded three hours before I did :). > Asking questions here is encouraged, so please feel free to post them on > LLVMdev. We'll always help where we can. well, OK :) Please find the attachment with the first approach to such an example i've
2002 Sep 23
2
[LLVMdev] Accessing constant indexes in GetElementPtr
...ments. In this case the indexes will be constants and I want > to get the > } constant values as an a native C int. > } > } Now I can iterate over all the indexes with idx_begin(). I can cast > } all of the indexes to a ConstantIntegral. However, I cannot cast the > } indexes to a ConstantSInt or ConstantUInt (cast<> throws an > assertion) and > } these two classes are the ones that have the getValue() method I need. > } > } Am I missing something here? > } > I'm not quite sure what particular problem you're having, but a few > things to remember... &gt...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...c block to the function... (again, it automatically inserts >>> // because of the last argument.) >>> BasicBlock *BB = new BasicBlock("EntryBlock of fib function", FibF); >>> >>> // Get pointers to the constants ... >>> Value *One = ConstantSInt::get(Type::IntTy, 1); >>> Value *Two = ConstantSInt::get(Type::IntTy, 2); >>> >>> // Get pointers to the integer argument of the add1 function... >>> assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg >>> >>>...
2004 Aug 09
3
[LLVMdev] API on JIT, code snippets
Valery, I have to agree with Misha on this. None of us knows "everything" about LLVM and as you can see, Misha responded three hours before I did :). Asking questions here is encouraged, so please feel free to post them on LLVMdev. We'll always help where we can. Thanks, Reid. On Mon, 2004-08-09 at 06:37, Misha Brukman wrote: > On Mon, Aug 09, 2004 at 12:32:33PM +0400, Valery
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
.... (again, it automatically inserts > >>> // because of the last argument.) > >>> BasicBlock *BB = new BasicBlock("EntryBlock of fib function", FibF); > >>> > >>> // Get pointers to the constants ... > >>> Value *One = ConstantSInt::get(Type::IntTy, 1); > >>> Value *Two = ConstantSInt::get(Type::IntTy, 2); > >>> > >>> // Get pointers to the integer argument of the add1 function... > >>> assert(FibF->abegin() != FibF->aend()); // Make sure there's an arg > &...
2004 Jul 14
1
[LLVMdev] Constants.cpp:368: error: `INT8_MAX' undeclared (first use this function)
Hi By manipulating a #define for G++ I've managed to compile int64_t type with ostream. Now, I'm stopped by some to me unknown constants: ----------------------------------- Compiling Constants.cpp Constants.cpp: In static member function `static bool llvm::ConstantSInt::isValueValidForType(const llvm::Type*, long long int)': Constants.cpp:368: error: `INT8_MAX' undeclared (first use this function) Constants.cpp:368: error: (Each undeclared identifier is reported only once for each function it appears in.) Constants.cpp:368: error: `INT8_MIN' unde...