Displaying 20 results from an estimated 79 matches for "intval".
Did you mean:
int_val
2009 Jul 25
3
[LLVMdev] Bug in ExecutionEngine::getConstantValue() -- Instruction::PtrToInt
...'s 'constants
folding'.
Basically APInt's parameters are the wrong way round.
Line 577 for lib/ExecutionEngine/ExecutionEngine.cpp :-
case Instruction::PtrToInt: {
GenericValue GV = getConstantValue(Op0);
uint32_t PtrWidth = TD->getPointerSizeInBits();
GV.IntVal = APInt(PtrWidth, uintptr_t(GV.PointerVal));
return GV;
}
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090725/db18ac2e/attachment.html>
2006 May 18
1
[LLVMdev] Runtime optimisation in the JIT
...ng bytecode / binary?
2. Is there a way, with the existing infrastructure, to do adaptive
compilation using the JIT interpreter?
Watching said interpreter through GDB shows that it starts off
with runFunction() called on the function representing "main", and
ends up at the line:
rv.IntVal = PF(ArgValues[0].IntVal, (char **)GVTOP(ArgValues[1]));
where PF is a pointer to (I think) the machine code representation of
main(). So, main() is invoked, and the result returned to the caller.
Now, what I'm looking at implementing is something like the following
scenario.
a. The JIT int...
2009 Mar 20
2
[LLVMdev] Possible memory leakage in the LLVM JIT Engine
...t do its job properly.
Let us look at HowToUseJIT.cpp example that comes with LLVM source bundle
and let us modify the last lines in the following way:
for (;;)
{
gv = EE->runFunction(FooF, noargs);
// Import result of execution:
outs() << "Result: " << gv.IntVal << "\n";
}
Everithing works fine. However if we do the following modification:
for (;;)
{
gv = EE->runFunction(FooF, noargs);
// Import result of execution:
outs() << "Result: " << gv.IntVal << "\n";
EE->freeMachine...
2009 Mar 22
0
[LLVMdev] Possible memory leakage in the LLVM JIT Engine
...at HowToUseJIT.cpp example that comes with LLVM source
> bundle and let us modify the last lines in the following way:
>
> for (;;)
> {
> gv = EE->runFunction(FooF, noargs);
> // Import result of execution:
> outs() << "Result: " << gv.IntVal << "\n";
> }
>
> Everithing works fine. However if we do the following modification:
>
> for (;;)
> {
> gv = EE->runFunction(FooF, noargs);
> // Import result of execution:
> outs() << "Result: " << gv.IntVal <...
2019 Mar 22
2
Understand if a condition was true or false
Hi all,
I have the condition of an ICmpInst in a variable called condition obtained
doing GenericValue condition = getOperandValue(&I, SF);
Now I would like to understand if the comparison was true or false. Is it
correct to use condition.IntVal.getSExtValue() and if the value is 0
consider the true and if the value is -1 consider the condition false?
I'm not sure because I was expecting something different and I'm a bit lost
Should I use another approach?
Thanks
-------------- next part --------------
An HTML attachment was scr...
2010 Apr 14
6
sum specific rows in a data frame
I have a data frame called "pose":
DESCRIPTION QUANITY CLOSING.PRICE
1 WHEAT May/10 1 467.75
2 WHEAT May/10 2 467.75
3 WHEAT May/10 1 467.75
4 WHEAT May/10 1 467.75
5 COTTON NO.2 May/10 1 78.13
6 COTTON NO.2 May/10 3 78.13
7 COTTON NO.2 May/10 1 78.13
2018 Apr 05
1
llvm::PointerIntPair -- is this by design or a bug?
I do agree that sign-extension is the right thing to do. Unlike bit-fields, llvm::PointerIntPair has asserts checking that the int value is within range. So if you assign an out of range value, it should fail with an assertion:
llvm::PointerIntPair<SomeType*, 3, int> pip;
pip.setInt(7); // can be made to fail as the valid range
// of signed 3-bit values is [-4:3]
The above
2008 Aug 19
7
[LLVMdev] Please help with LLVM C++ integration
...out << "We just constructed this LLVM module:\n\n" << *M;
std::cout << "\n\nRunning foo: " << std::flush;
std::vector<GenericValue> noargs;
GenericValue gv = EE->runFunction(FooF, noargs);
std::cout << "Result: " << gv.IntVal.toStringUnsigned(10) << "\n";
return 0;
}
2008/8/19, Gordon Henriksen <gordonhenriksen at me.com>:
>
> On Aug 19, 2008, at 13:36, kirill havok wrote:
>
> I got very interested in LLVM project, and I decided to start writing my own
> scripting language based...
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
...o create JIT
> > ExistingModuleProvider* MP = new ExistingModuleProvider(M);
> > ExecutionEngine* EE = ExecutionEngine::create( MP, false );
> >
> > // Call the `foo' function with argument n:
> > std::vector<GenericValue> args(1);
> > args[0].IntVal = n;
> >
> >
> > std::clog << "verifying... ";
> > if (verifyModule(*M)) {
> > std::cerr << argv[0]
> > << ": assembly parsed, but does not verify as correct!\n";
> > return 1;
> > }
> >...
2009 Jul 25
0
[LLVMdev] Bug in ExecutionEngine::getConstantValue() -- Instruction::PtrToInt
...Basically APInt's parameters are the wrong way round.
>
> Line 577 for lib/ExecutionEngine/ExecutionEngine.cpp :-
>
> case Instruction::PtrToInt: {
> GenericValue GV = getConstantValue(Op0);
> uint32_t PtrWidth = TD->getPointerSizeInBits();
> GV.IntVal = APInt(PtrWidth, uintptr_t(GV.PointerVal));
> return GV;
> }
> Aaron
That looks to be the right order to me:
APInt(unsigned numBits, uint64_t val, bool isSigned=false)
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.o...
2012 May 28
2
[LLVMdev] Help with Values sign
On May 27, 2012, at 9:15 PM, Santos Merino wrote:
> I have found that the problem is the endianness of Values. For example a 1 it's
> stored as 00000001 00000000 00000000 0000000 instead of 0000000 00000000 0000000
> 00000000 so how can I change how the values are stored and/or load (because I
> suppose that the problem is when I store it or load from memory)
Are you setting up
2012 May 28
0
[LLVMdev] Help with Values sign
...ayout(str);
if (verifyModule(*M)) {
errs() << argv[0] << ": Error building the function!\n";
return 1;
}
vector<GenericValue> noargs;
GenericValue GV = EE->runFunction(Main, noargs);
outs() << "Result: " << GV.IntVal << "\n";
return 0;
2012 Nov 11
1
[LLVMdev] wrong value with getPointerToGlobal
...::GlobalVariable( *module, int32Type,
/*constant*/false, llvm::GlobalValue::ExternalLinkage, /*init*/0,
"gresult" );
I run the function and get the results with:
llvm::GenericValue gv = ee->runFunction( funcPtr, args/*empty*/ );
void * gptr = ee->getPointerToGlobal( global );
gv.IntVal has the correct value, but *static_cast<int32_t*>(gptr) does not.
--
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.
-------------- next part ----------...
2015 Feb 16
2
[LLVMdev] LLVM Backend
I am working on LLVM backend and was wondering if there is any way by which
I can access the value stored SDValue so I can either assign it as a
literal or move it to register in an user defined instruction.
Something like:
SDValue Value = Op->getOperand(2);
intValue = Value.get_integer_value //get Value as an int
and then
if ( intValue > 31)
Thanks,
Ambuj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150216/9a72caa2/attachment.html>
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 iterating through the formal argument list...
2013 Nov 10
1
[LLVMdev] about creating the first value of the storeinst
...toreInst using
StoreInst *SI = new StoreInst(val, AI, BB);
AI is an alloca instruction previously created, BB is the basicBlock I want to put instructionsi in. Val is the value to store.
I've created val from a genericValue like this:
Value* val = ConstantInt::get(getGlobalContext(), Result.IntVal);
Result is the genericValue
However I keep getting this error:
void llvm::StoreInst::AssertOK(): Assertion `getOperand(0)->getType() == cast<PointerType>(getOperand(1)->getType())->getElementType() && "Ptr must be a pointer to Val type!"' failed.
What is w...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...t;
> // Now we going to create JIT
> ExistingModuleProvider* MP = new ExistingModuleProvider(M);
> ExecutionEngine* EE = ExecutionEngine::create( MP, false );
>
> // Call the `foo' function with argument n:
> std::vector<GenericValue> args(1);
> args[0].IntVal = n;
>
>
> std::clog << "verifying... ";
> if (verifyModule(*M)) {
> std::cerr << argv[0]
> << ": assembly parsed, but does not verify as correct!\n";
> return 1;
> }
> else
> std::clog << "...
2012 Sep 19
0
[LLVMdev] newbie question on getelementptr
...p();
}
if (myfn && isa<Function>(myfn)) {
ExecutionEngine *EE = EngineBuilder(module).create();
if (!EE) {
return 1;
}
std::vector<GenericValue> Args(2);
Args[0].IntVal = APInt(32, 5);
Args[1].IntVal = APInt(32, 10);
outs() << "\ntype of myfn:";
myfn->getType()->dump();
GenericValue GV = EE->runFunction(func_add, Args);
outs() << "\nResult: " &l...
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
...>>> ExistingModuleProvider* MP = new ExistingModuleProvider(M);
>>> ExecutionEngine* EE = ExecutionEngine::create( MP, false );
>>>
>>> // Call the `foo' function with argument n:
>>> std::vector<GenericValue> args(1);
>>> args[0].IntVal = n;
>>>
>>>
>>> std::clog << "verifying... ";
>>> if (verifyModule(*M)) {
>>> std::cerr << argv[0]
>>> << ": assembly parsed, but does not verify as correct!\n";
>>> return 1;
>>...
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
...uleProvider* MP = new ExistingModuleProvider(M);
> >>> ExecutionEngine* EE = ExecutionEngine::create( MP, false );
> >>>
> >>> // Call the `foo' function with argument n:
> >>> std::vector<GenericValue> args(1);
> >>> args[0].IntVal = n;
> >>>
> >>>
> >>> std::clog << "verifying... ";
> >>> if (verifyModule(*M)) {
> >>> std::cerr << argv[0]
> >>> << ": assembly parsed, but does not verify as correct!\n";
>...