Displaying 17 results from an estimated 17 matches for "ptrty".
Did you mean:
party
2009 May 21
3
[LLVMdev] Passing a pointer to a function
...his assertion.
Assertion `ValueType != Type::VoidTy && "Pointer to void is not valid,
use sbyte* instead!"' failed.
I can try checking the type before building the function, as in:
void
visitLoadInst(LoadInst &I) {
Value *P;
P = I.getPointerOperand();
PointerType* PtrTy = (PointerType*)(P);
Constant* fcall;
if (PtrTy->getElementType()->isInteger()) {
fcall = buildFcallMem(*theModule, "load_int", Type::Int32Ty);
CallInst::Create(fcall, P, "", &I);
} else if (PtrTy->getElementType()->isInteger()){
fcall = build...
2009 May 21
0
[LLVMdev] Passing a pointer to a function
On Wed, May 20, 2009 at 7:31 PM, Scott Ricketts <sricketts at maxentric.com> wrote:
> Where load_fcall is build using a call to Module::getOrInsertFunction
> as in the example here:
>
> http://wiki.llvm.org/HowTo:_Insert_a_function_call
>
> My question is, what do I pass as the argument type for P above? The
> following seems to work, as long as there are no floating
2008 Jul 07
0
[LLVMdev] (GEP) Index validity
...eturn V->getType()->isInteger();
}
namespace llvm {
Index: lib/Target/TargetData.cpp
===================================================================
--- lib/Target/TargetData.cpp (revision 53136)
+++ lib/Target/TargetData.cpp (working copy)
@@ -553,8 +553,7 @@
TI = gep_type_begin(ptrTy, Indices, Indices+NumIndices);
for (unsigned CurIDX = 0; CurIDX != NumIndices; ++CurIDX, ++TI) {
if (const StructType *STy = dyn_cast<StructType>(*TI)) {
- assert(Indices[CurIDX]->getType() == Type::Int32Ty &&
- "Illegal struct idx");
+ asser...
2012 Aug 25
0
[LLVMdev] FW: RFC: Supporting different sized address space arithmetic
...deGen/Analysis.cpp? If
TargetLowering::getValueType() doesn't work for arbitrary address
spaces, you should fix it.
I think my earlier comments about getIntPtrConstant still hold:
instead of "DAG.getIntPtrConstant(Offset, addrSpace)", you can just
write "DAG.getConstant(Offset, PtrTy)".
+ EVT NewPtrVT = TLI.getPointerTy(dyn_cast<PointerType>(
+ SV->getType())->getAddressSpace());
+ if (PtrVT != NewPtrVT) {
+ // Check to see if we want to change the size of the pointer
+ // based on the address space and if so extend or truncate the pointer.
+...
2008 Jul 10
2
[LLVMdev] (GEP) Index validity
...}
>
> namespace llvm {
> Index: lib/Target/TargetData.cpp
> ===================================================================
> --- lib/Target/TargetData.cpp (revision 53136)
> +++ lib/Target/TargetData.cpp (working copy)
> @@ -553,8 +553,7 @@
> TI = gep_type_begin(ptrTy, Indices, Indices+NumIndices);
> for (unsigned CurIDX = 0; CurIDX != NumIndices; ++CurIDX, ++TI) {
> if (const StructType *STy = dyn_cast<StructType>(*TI)) {
> - assert(Indices[CurIDX]->getType() == Type::Int32Ty &&
> - "Illegal struct idx&...
2008 Jul 07
2
[LLVMdev] (GEP) Index validity
Hi all,
I'm fiddling around a bit with programmatically created GEP instructions,
which is failing when using i64 for any indix, except the first.
The reason behind this, is that StructureType::indexValid only accepts Value*
that are constant ints of width 32. I can't really see why this limitation is
here.
SequentialType solves this slightly differently, it allows for both 32 and 64
2012 Aug 24
5
[LLVMdev] FW: RFC: Supporting different sized address space arithmetic
> -----Original Message-----
> From: Villmow, Micah
> Sent: Friday, August 24, 2012 2:56 PM
> To: 'Eli Friedman'
> Cc: LLVM Developers Mailing List
> Subject: RE: [LLVMdev] RFC: Supporting different sized address space
> arithmetic
>
> Eli,
> There is a patch that implements the beginning what I think is the
> correct approach to support the backend
2012 Aug 27
2
[LLVMdev] FW: RFC: Supporting different sized address space arithmetic
...h an
> uppercase letter).
>
> > if (PtrBits < 64)
> > - OffsVal = DAG.getNode(ISD::TRUNCATE, getCurDebugLoc(),
> > - TLI.getPointerTy(),
> > + OffsVal = DAG.getNode(ISD::TRUNCATE, getCurDebugLoc(),
> > PtrTy, DAG.getConstant(Offs, MVT::i64));
>
> This is not necessarily specific to your patch, but can you explain the
> special role of 64-bits here?
>
> Thanks again,
> Hal
>
> On Fri, 24 Aug 2012 23:07:54 +0000
> "Villmow, Micah" <Micah.Villmow at amd.com> w...
2012 Aug 24
0
[LLVMdev] FW: RFC: Supporting different sized address space arithmetic
...pecifies that they should start with an
uppercase letter).
> if (PtrBits < 64)
> - OffsVal = DAG.getNode(ISD::TRUNCATE, getCurDebugLoc(),
> - TLI.getPointerTy(),
> + OffsVal = DAG.getNode(ISD::TRUNCATE, getCurDebugLoc(),
> PtrTy, DAG.getConstant(Offs, MVT::i64));
This is not necessarily specific to your patch, but can you explain the
special role of 64-bits here?
Thanks again,
Hal
On Fri, 24 Aug 2012 23:07:54 +0000
"Villmow, Micah" <Micah.Villmow at amd.com> wrote:
>
>
> > -----Original Me...
2008 Jul 10
0
[LLVMdev] (GEP) Index validity
...e llvm {
>> Index: lib/Target/TargetData.cpp
>> ===================================================================
>> --- lib/Target/TargetData.cpp (revision 53136)
>> +++ lib/Target/TargetData.cpp (working copy)
>> @@ -553,8 +553,7 @@
>> TI = gep_type_begin(ptrTy, Indices, Indices+NumIndices);
>> for (unsigned CurIDX = 0; CurIDX != NumIndices; ++CurIDX, ++TI) {
>> if (const StructType *STy = dyn_cast<StructType>(*TI)) {
>> - assert(Indices[CurIDX]->getType() == Type::Int32Ty &&
>> - "Illeg...
2012 Aug 27
0
[LLVMdev] FW: RFC: Supporting different sized address space arithmetic
...gt; >
> > > if (PtrBits < 64)
> > > - OffsVal = DAG.getNode(ISD::TRUNCATE, getCurDebugLoc(),
> > > - TLI.getPointerTy(),
> > > + OffsVal = DAG.getNode(ISD::TRUNCATE, getCurDebugLoc(),
> > > PtrTy, DAG.getConstant(Offs, MVT::i64));
> >
> > This is not necessarily specific to your patch, but can you explain
> > the special role of 64-bits here?
> >
> > Thanks again,
> > Hal
> >
> > On Fri, 24 Aug 2012 23:07:54 +0000
> > "Villmow, M...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...teStructGEP without the assert. I thought it was a version issue, so I changed the call to:
Value *x_idx = builder.CreateConstGEP2_32(cB, 0, 0);
However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack:
815 Type *PtrTy = PointerType::get(checkGEPType(
816 getIndexedType(Ptr->getType(), IdxList)),
817 Ptr->getType()->getPointerAddressSpace());
Resulting in the debugger producing:
(gdb) p PtrTy
$19 = (llvm::Type *) 0x7f...
2012 Aug 30
2
[LLVMdev] FW: RFC: Supporting different sized address space arithmetic
...argetLowering::getValueType() doesn't work for arbitrary address
> spaces, you should fix it.
>
> I think my earlier comments about getIntPtrConstant still hold:
> instead of "DAG.getIntPtrConstant(Offset, addrSpace)", you can just
> write "DAG.getConstant(Offset, PtrTy)".
>
> + EVT NewPtrVT = TLI.getPointerTy(dyn_cast<PointerType>(
> + SV->getType())->getAddressSpace());
> + if (PtrVT != NewPtrVT) {
> + // Check to see if we want to change the size of the pointer
> + // based on the address space and if so extend...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...ert. I thought it was a version issue, so I changed the call to:
>
> Value *x_idx = builder.CreateConstGEP2_32(cB, 0, 0);
>
> However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack:
>
> 815 Type *PtrTy = PointerType::get(checkGEPType(
> 816 getIndexedType(Ptr->getType(), IdxList)),
> 817 Ptr->getType()->getPointerAddressSpace());
>
> Resulting in the debugger producing:
>
> (gdb) p PtrTy
&...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...n issue, so I changed the call to:
> >
> > Value *x_idx = builder.CreateConstGEP2_32(cB, 0, 0);
> >
> > However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack:
> >
> > 815 Type *PtrTy = PointerType::get(checkGEPType(
> > 816 getIndexedType(Ptr->getType(), IdxList)),
> > 817 Ptr->getType()->getPointerAddressSpace());
> >
> > Resulting in the debugger producing:
> >...
2014 Aug 20
2
[LLVMdev] LLVM CreateStructGEP type assert error
...to:
> > >
> > > Value *x_idx = builder.CreateConstGEP2_32(cB, 0, 0);
> > >
> > > However I got the same assert. It looks like this line in Instruction.h from LLVM is producing the assert further down the stack:
> > >
> > > 815 Type *PtrTy = PointerType::get(checkGEPType(
> > > 816 getIndexedType(Ptr->getType(), IdxList)),
> > > 817 Ptr->getType()->getPointerAddressSpace());
> > >
> > > Resulting in the debugger...
2014 Mar 07
3
[LLVMdev] [RFC] Add second "failure" AtomicOrdering to cmpxchg instruction
...alValue *GV, unsigned Val) {
}
}
+
namespace llvm {
namespace {
/// @brief A class for maintaining the slot number definition
@@ -2882,7 +2901,8 @@ error_code BitcodeReader::ParseFunctionBody(Function *F) {
break;
}
case bitc::FUNC_CODE_INST_CMPXCHG: {
- // CMPXCHG:[ptrty, ptr, cmp, new, vol, ordering, synchscope]
+ // CMPXCHG:[ptrty, ptr, cmp, new, vol, successordering, synchscope,
+ // failureordering]
unsigned OpNum = 0;
Value *Ptr, *Cmp, *New;
if (getValueTypePair(Record, OpNum, NextValueNo, Ptr) ||
@@ -2890,13 +2910,21 @@...