Displaying 20 results from an estimated 22 matches for "int64ty".
Did you mean:
int64
2013 Oct 07
1
[LLVMdev] Typecasting int32ty to int64ty
...tion.
Due to which my vector<Value*> has different Type of Value*.
How can I convert i32 to i64 type before pushing it to the vector<Value*>,
so that all Value* on my vector is of same Type?
--
View this message in context: http://llvm.1065342.n5.nabble.com/Typecasting-int32ty-to-int64ty-tp61814.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
2020 Apr 30
2
Discrepancy between Debug and Release+Asserts versions of Clang/LLVM
I agree that the ArrayRef is likely the issue. I've debugged a crash caused
by a temporary ArrayRef like that a couple times.
Either do what David suggested or use a normal array:
Metadata *mdArray[] = {ConstantInt::get(Int64Ty, 0), newMD};
~Craig
On Thu, Apr 30, 2020 at 9:56 AM David Blaikie via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
>
> On Thu, Apr 30, 2020 at 9:51 AM Shishir V Jessu via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> Hello,
>>
>> I am editi...
2020 Jan 14
2
sizeof implementation: how to get size as a constantInt?
...tTy,
llvm::ConstantPointerNull::get(pointerTy),
constint1);
auto *size = builder.CreatePtrToInt(p, llvm::IntegerType::get(context,
64));
and type definitions:
auto *constint1 = llvm::ConstantInt::get(context, llvm::APInt(64, 1));
auto *int64Ty = llvm::IntegerType::get(context, 64);
auto *doubleTy = llvm::Type::getDoubleTy(context);
auto *structTy = llvm::StructType::create(context, "Foo");
structTy->setBody({int64Ty, doubleTy});
auto *pointerTy = llvm::PointerType::get(structTy, 0);
take care that the "size" is a...
2008 Jul 01
2
[LLVMdev] vmkit on x86_64
...val2 = BinaryOperator::createAnd(val2, mask, "", currentBlock);
push(BinaryOperator::createLShr(val1, val2, "", currentBlock),
AssessorDesc::dInt);
break;
@@ -1017,7 +1017,7 @@
case LUSHR : {
Value* val2 = new ZExtInst(pop(), Type::Int64Ty, "", currentBlock);
Value* mask = ConstantInt::get(Type::Int64Ty, 0x3F);
- val2 = BinaryOperator::CreateAnd(val2, mask, "", currentBlock);
+ val2 = BinaryOperator::createAnd(val2, mask, "", currentBlock);
pop(); // remove the 0 on the st...
2020 Apr 30
2
Discrepancy between Debug and Release+Asserts versions of Clang/LLVM
Hello,
I am editing the LowerTypeTests pass in LLVM, and part of my additions
include the following 3 lines of code:
// newTypeName is a std::string
MDString* newMD = MDString::get(M.getContext(), newTypeName);
ArrayRef<Metadata*> mdArray {ConstantInt::get(Int64Ty, 0), newMD};
auto* node = MDTuple::get(M.getContext(), mdArray);
Thus far, I have been developing on a version of Clang with debugging
symbols enabled, and this code has worked. However, on the Release+Asserts
version, the third line results in a segmentation fault. The backtrace for
the error, up...
2008 Jul 01
0
[LLVMdev] vmkit on x86_64
...nd(val2, mask, "", currentBlock);
> push(BinaryOperator::createLShr(val1, val2, "", currentBlock),
> AssessorDesc::dInt);
> break;
> @@ -1017,7 +1017,7 @@
> case LUSHR : {
> Value* val2 = new ZExtInst(pop(), Type::Int64Ty, "", currentBlock);
> Value* mask = ConstantInt::get(Type::Int64Ty, 0x3F);
> - val2 = BinaryOperator::CreateAnd(val2, mask, "", currentBlock);
> + val2 = BinaryOperator::createAnd(val2, mask, "", currentBlock);
> pop(); // re...
2011 Jan 24
2
[LLVMdev] How to create an IntegerType of the native word size
Hi all,
I couldn't find any reasonable way to create the IntegerType that would
match, say, intptr_t, that is the native word size of the machine I'm
building on. More accurately defined, when compiling on a 64 bit Mac OS
machine I want it to be Int64Ty, but if for example I'm using the "-arch
i386" command line option on that machine during compilation, I want it to
be Int32Ty.
I'm sure that has to be some perfect solution out there, does anyone know?
Thanks!
Harel Cain
-------------- next part --------------
An HTML attachm...
2015 Mar 12
2
[LLVMdev] Passing a function pointer as parameter to function call?
...inter as a parameter. The effect would be the same as
following:
atexit(foo);
Where foo is a function I insert with M.getOrInsertFunction(), which in
LLVM is a Function class.
I searched for a while and did not come up with a satisfying answer. Should
I create a Value class of pointer type, or a Int64Ty for a pointer? How do
I get the pointer to the function I create? I also tried passing foo as
Function* in LLVM as parameter to create CallInst directly, and I doesn't
seem to work.
Any hints and enlightenment is appreciated. Many thanks.
Regards,
Yours,
Kevin Hu
-------------- next part ---...
2007 Feb 27
2
[LLVMdev] another problem with function arguments aligment
...e same bytecode for both functions:
> >
> > declare void @f(i32, i64)
> > declare void @g(i32, i64)
> >
> > I can't differ an i64 argument from a struct argument.
>
> Oops. You can fix this by changing llvm-gcc: gcc/llvm-abi.h
>
> Grep for instances of Int64Ty there. I can help answer any q's you might
> have.
>
> -Chris
>
> --
> http://nondot.org/sabre/
> http://llvm.org/
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http:/...
2012 May 04
2
[LLVMdev] Convert a vector size
...AFQjCNFsBtV4Cr8zpL5UpgoIASRDFvcdSw>)
notes
I have understood ,that bitcast of vectors to vectors is OK,only
if provided the vectors are of
the same size.Is it possible to convert a vectors from different size? For
example a vector of 3 elements Int16Ty type to vector having one element of
64 bit Int64Ty ?
Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120504/557c89f1/attachment.html>
2007 Feb 26
0
[LLVMdev] another problem with function arguments aligment
...> The problem is: llvm-gcc generates the same bytecode for both functions:
>
> declare void @f(i32, i64)
> declare void @g(i32, i64)
>
> I can't differ an i64 argument from a struct argument.
Oops. You can fix this by changing llvm-gcc: gcc/llvm-abi.h
Grep for instances of Int64Ty there. I can help answer any q's you might
have.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
2009 Mar 08
2
[LLVMdev] Creating Pointer Constants
Hello,
I am writing a JIT compiler for a subset of the Matlab language and as a
part of my implementation, I would like to be able to pass a constant
pointer to a native function I'm calling.
Right now, this is what I do:
llvm::Constant* constInt = llvm::ConstantInt::get(llvm::Type::Int64Ty,
(int64)thePointer);
llvm::Value* constPtr = llvm::ConstantExpr::getIntToPtr(constInt,
llvm::PointerType::getUnqual(llvm::Type::Int32Ty));
builder.CreateCall(my_function, constPtr);
The resulting IR call looks like this:
call void @nativeFunc(i32* inttoptr (i64 146876396 to i32*))
I'm just...
2007 Feb 26
3
[LLVMdev] another problem with function arguments aligment
The ARM EABI (AAPCS) defines:
- i64 values are 8-bytes aligned
- "The alignment of an aggregate shall be the alignment of its
most-aligned component."
So,
struct ss {
int x;
int y;
};
void f(int a, struct ss b);
r0 <- a
r1-r2 <- b
void g(int a, long long b);
r0 <- a
r2-r3 <- b
The problem is: llvm-gcc generates the same bytecode for both functions:
declare void
2009 Mar 11
0
[LLVMdev] Creating Pointer Constants
...compiler for a subset of the Matlab language and
> as a
> part of my implementation, I would like to be able to pass a constant
> pointer to a native function I'm calling.
>
> Right now, this is what I do:
>
> llvm::Constant* constInt = llvm::ConstantInt::get(llvm::Type::Int64Ty,
> (int64)thePointer);
> llvm::Value* constPtr = llvm::ConstantExpr::getIntToPtr(constInt,
> llvm::PointerType::getUnqual(llvm::Type::Int32Ty));
>
> builder.CreateCall(my_function, constPtr);
>
> The resulting IR call looks like this:
>
> call void @nativeFunc(i32* intt...
2012 May 04
0
[LLVMdev] Convert a vector size
> Is it possible to convert a vectors from different size? For example
> a vector of 3 elements Int16Ty type to vector having one element of
> 64 bit Int64Ty ?
Not with a bitcast. You'd probably use a shuffle followed by a bitcast for that:
%temp = shufflevector <3 x i16> %incoming, <3 x i16> undef, <4 x i32>
<i32 0, i32 1, i32 2, i32 undef>
%out = bitcast <4 x i16> %temp to i64
This creates a vector with its first e...
2008 Feb 20
1
[LLVMdev] ctpop intrinsic question
Hello,
is it correct, that the "llvm.ctpop" Hamming weight intrinsic is
currently (LLVM 2.2) implemented in
Line 254 in lib/CodeGen/IntrinsicLowering.cpp
/// LowerCTPOP - Emit the code to lower ctpop of V before the specified
/// instruction IP.
static Value *LowerCTPOP(Value *V, Instruction *IP) {
assert(V->getType()->isInteger() && "Can't ctpop a
2010 Jan 06
0
[LLVMdev] [Help] How can we call an object's virtual function inside IR?
Hi Gyounghwa Kim,
> First of all, thank you very much for your answer.
> I tried your sugestion and found out that it is not what I wanted.
> What I have to do is call a native C function from inside this
> generated function.
> Is there any way that we can find and call native C functions not
> created by LLVM IR?
You can insert a declaration of the function into the IR, then
2009 Jan 19
6
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
...("test");
Constant *c
= mod->getOrInsertFunction ("foo", IntegerType::get(32),
NULL);
foo = cast <Function> (c);
BasicBlock *block = BasicBlock::Create ("entry", foo);
IRBuilder<> builder (block);
Value *tmp = ConstantInt::get(Type::Int64Ty, (long)&p);
tmp = builder.CreateIntToPtr(tmp,
PointerType::getUnqual(IntegerType::get(32)));
tmp = builder.CreateLoad(tmp);
builder.CreateRet (tmp);
return mod;
}
2010 Jan 05
5
[LLVMdev] [Help] How can we call an object's virtual function inside IR?
Dear experts,
I am learning llvm by reading documents and have a question to ask.
The following is the example of code generation that I created.
[[a [10.00]] > [3.00]]
; ModuleID = 'ExprF'
define i1 @expr(double* %record) {
entry:
%0 = getelementptr double* %record, i32 0 ;
<double*> [#uses=1]
%1 = load double* %0 ; <double>
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