Displaying 20 results from an estimated 47 matches for "int8ty".
2019 Jul 03
3
optimisation issue in an llvm IR pass
Hi Craig,
On 03.07.19 17:33, Craig Topper wrote:
> Don't the CreateICmp calls return a Value* with an i1 type? But then
> they are added to an i8 type? Not sure that works.
I had that initially:
auto cf = IRB.CreateICmpULT(Incr, ConstantInt::get(Int8Ty, 1));
auto carry = IRB.CreateZExt(cf, Int8Ty);
Incr = IRB.CreateAdd(Incr, carry);
it makes no difference to the generated assembly
> Have you tried using the llvm.uadd.with.overflow.i8 intrinsic?
we have tried this:
CallInst *AddOv =
IRB.CreateBinaryIntrinsic(Intrinsic::uadd_with_overflow...
2019 Jul 03
2
optimisation issue in an llvm IR pass
...ecx,edx // <- not needed
add cl,0x1 // <- should be done to dl instead
adc dl,0x1
mov BYTE PTR [rsi+rdi*1],dl
Far below are both variants with the full code around it, however the
difference in both variants is this:
//variant1
auto cf = IRB.CreateICmpEQ(Incr, ConstantInt::get(Int8Ty, 0));
Incr = IRB.CreateAdd(Incr, cf);
//variant2
auto cf = IRB.CreateICmpULT(Incr, ConstantInt::get(Int8Ty, 1));
Incr = IRB.CreateAdd(Incr, cf);
//interestingly this totally different approach creates the same
instructions as variant2
CallInst *AddOv = IRB.CreateBinaryIntrinsic(Intrinsic::uadd_wi...
2007 Oct 03
2
[LLVMdev] Lowering operations to 8-bit!
Thank you Evan,
I added the return Type::Int8Ty to the switch statement to get it to
work.
I don't know if this can have other consequences, I haven't yet verified
if the generated Legalized DAG is correct though.
A.
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
On Behalf Of Ev...
2009 Sep 23
2
[LLVMdev] DebugFactory
...; &one, 1), Type::Int32Ty);
> }
>
> Constant * DebugInfoBuilder::getAlignment(const Type * type) {
> // Calculates the alignment of T using "sizeof({i8, T}) - sizeof
> (T)"
> return ConstantExpr::getSub(
> getSize(StructType::get(Type::Int8Ty, type, NULL)),
> getSize(type));
> }
Are ConstantExpr::getAlignOf, getSizeOf, and getOffsetOf what
you're looking for?
Dan
2007 Apr 06
1
[LLVMdev] Integrating LLVM in an existing project
...NULL);
- FuncUnwindResume = cast<Function>(
+ FuncUnwindResume =
TheModule->getOrInsertFunction("_Unwind_Resume",
Type::getPrimitiveType(Type::VoidTyID),
PointerType::get(Type::Int8Ty),
- NULL));
- FuncUnwindResume->setLinkage(Function::ExternalLinkage);
- FuncUnwindResume->setCallingConv(CallingConv::C);
+ NULL);
When compiling the C++ file in which __gxx_personality_v0 is defined,
getOrInsertFunction...
2009 Sep 22
0
[LLVMdev] DebugFactory
...l::get(PointerType::getUnqual(type)),
&one, 1), Type::Int32Ty);
}
Constant * DebugInfoBuilder::getAlignment(const Type * type) {
// Calculates the alignment of T using "sizeof({i8, T}) - sizeof(T)"
return ConstantExpr::getSub(
getSize(StructType::get(Type::Int8Ty, type, NULL)),
getSize(type));
}
This was code that was checked in before DebugInfoBuilder was replaced by
DIFactory.
--
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090922/23d0313f/att...
2007 Oct 04
0
[LLVMdev] Lowering operations to 8-bit!
On Oct 3, 2007, at 3:21 PM, Alireza.Moshtaghi at microchip.com wrote:
> Thank you Evan,
> I added the return Type::Int8Ty to the switch statement to get it to
> work.
> I don't know if this can have other consequences, I haven't yet
> verified
> if the generated Legalized DAG is correct though.
If this works, please submit a patch. Otherwise please submit a bug
report with as much information...
2007 Oct 01
0
[LLVMdev] Lowering operations to 8-bit!
...;
}
Is there a 16-bit register class?
> I tried defining 8-bit pointers in the subtarget using "p:8:8:8"
> but it
> asserts at line 566 of TargetData.cpp in the default case of
> TargetData::getIntPtrType()
Dunno why it's like this. Can you add case 1: return Type::Int8Ty?
Does it work / help?
Evan
>
> Is it difficult to add 8-bit support?
>
> A.
>
> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Chris Lattner
> Sent: Friday, September 28, 2007 5:01 PM
> To: L...
2008 Feb 16
3
[LLVMdev] linux/x86-64 codegen support
...xp, Value *&Result) {
tree arglist = TREE_OPERAND(exp, 1);
if (!validate_arglist(arglist, INTEGER_TYPE, VOID_TYPE)) {
debug_tree(arglist);
return false;
}
Value *Amt = Emit(TREE_VALUE(arglist), 0);
Amt = CastToSIntType(Amt, Type::Int32Ty);
Result = Builder.CreateAlloca(Type::Int8Ty, Amt, "tmp");
return true;
}
for a pretty (?) print of the tree at that point)
Andrew
On 2/16/08, Török Edwin <edwintorok at gmail.com> wrote:
> Andrew Lenharth wrote:
> > Interestingly, in the .i file there are 2 __builtin_alloca, and
> > EmitBuiltinAlloca is onl...
2007 Oct 08
3
[LLVMdev] Lowering operations to 8-bit!
...ounces at cs.uiuc.edu]
On Behalf Of Evan Cheng
Sent: Wednesday, October 03, 2007 11:22 PM
To: LLVM Developers Mailing List
Subject: Re: [LLVMdev] Lowering operations to 8-bit!
On Oct 3, 2007, at 3:21 PM, Alireza.Moshtaghi at microchip.com wrote:
> Thank you Evan,
> I added the return Type::Int8Ty to the switch statement to get it to
> work.
> I don't know if this can have other consequences, I haven't yet
> verified
> if the generated Legalized DAG is correct though.
If this works, please submit a patch. Otherwise please submit a bug
report with as much information...
2009 Sep 18
3
[LLVMdev] compiling java frontend
...of
the class 'llvm::Type':
PNetLib.cpp: In function ‘void decapsulePrimitive(n3::VMObject*, const
llvm::Type*, std::vector<llvm::GenericValue,
std::allocator<llvm::GenericValue> >&)’:
PNetLib.cpp:694: error: ‘Int1Ty’ is not a member of ‘llvm::Type’
PNetLib.cpp:698: error: ‘Int8Ty’ is not a member of ‘llvm::Type’
PNetLib.cpp:702: error: ‘Int16Ty’ is not a member of ‘llvm::Type’
PNetLib.cpp:706: error: ‘Int32Ty’ is not a member of ‘llvm::Type’
There are several other errors on the same form. When inspecting the source
code of llvm::Type I do not see any member variables with...
2009 Sep 22
3
[LLVMdev] DebugFactory
On Tue, Sep 22, 2009 at 9:21 AM, Devang Patel <devang.patel at gmail.com> wrote:
> On Tue, Sep 22, 2009 at 12:14 AM, Talin <viridia at gmail.com> wrote:
>> So, one feature of the late, lamented DebugInfoBuilder that I am missing
>> quite badly, and which is not available in the current DIFactory, is the
>> ability to specify structure offsets abstractly. The
2007 Oct 01
2
[LLVMdev] Lowering operations to 8-bit!
So does that mean that LLVM can't lower automatically to 8-bit values?
I tried defining 8-bit pointers in the subtarget using "p:8:8:8" but it
asserts at line 566 of TargetData.cpp in the default case of
TargetData::getIntPtrType()
Is it difficult to add 8-bit support?
A.
-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
On
2008 Nov 17
2
[LLVMdev] Assertion `castIsValid(getOpcode(), S, Ty) && "Illegal BitCast"' failed.
...suggested. I have written the below code which basically tries to write the constant 10 to a file. myprint is a function pointer to a function which takes char * parameter and writes it to file.
Value *Ten = ConstantInt::get(Type::Int32Ty, 10);
const Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty);
AllocaInst *AI = new AllocaInst(Type::Int32Ty);
Value *ST = new StoreInst(Ten,AI,false,4,j);
Value *BT = new BitCastInst(ST,VoidPtrTy,"",j);
CallInst *CallPrint = CallInst::Create(myprint, BT, "", j);
CallPrint->setTailCall(true);
I am getting the following error while exe...
2009 Sep 23
0
[LLVMdev] DebugFactory
...&one, 1), Type::Int32Ty);
>> }
>>
>> Constant * DebugInfoBuilder::getAlignment(const Type * type) {
>> // Calculates the alignment of T using "sizeof({i8, T}) - sizeof(T)"
>> return ConstantExpr::getSub(
>> getSize(StructType::get(Type::Int8Ty, type, NULL)),
>> getSize(type));
>> }
>>
>
> Are ConstantExpr::getAlignOf, getSizeOf, and getOffsetOf what
> you're looking for?
>
> That will work. Now all I need is for the methods of DIFactory to take a
Constant* instead of uint64.
--
-- Talin
-----...
2007 Oct 30
1
[LLVMdev] What am I doing wrong here...
...verywhere 'interesting' that
passes on the result by calling the C function void mcp_trace_stack(char
*ptr). First I grab the functions themselves:
Constant *MCPTraceStack, *LLVMFrameAddress;
std::vector<const Type*> argstype;
argstype.push_back(PointerType::get(Type::Int8Ty));
FunctionType *FT = FunctionType::get(Type::VoidTy, argstype, false);
MCPTraceStack = M.getOrInsertFunction("mcp_trace_stack", FT);
std::vector<const Type*> frargstype;
frargstype.push_back(Type::VoidTy);
FunctionType *FA = FunctionType::get(PointerType::get(Ty...
2007 Oct 09
0
[LLVMdev] Lowering operations to 8-bit!
...Cheng
> Sent: Wednesday, October 03, 2007 11:22 PM
> To: LLVM Developers Mailing List
> Subject: Re: [LLVMdev] Lowering operations to 8-bit!
>
>
> On Oct 3, 2007, at 3:21 PM, Alireza.Moshtaghi at microchip.com wrote:
>
>> Thank you Evan,
>> I added the return Type::Int8Ty to the switch statement to get it to
>> work.
>> I don't know if this can have other consequences, I haven't yet
>> verified
>> if the generated Legalized DAG is correct though.
>
> If this works, please submit a patch. Otherwise please submit a bug
> report...
2007 Apr 06
0
[LLVMdev] Integrating LLVM in an existing project
On Fri, 6 Apr 2007, Nicolas Geoffray wrote:
> Like you say, it's not functional for non-calls instructions. Besides,
> having to change all CalInst to InvokeInst is just too much pain in our
> current vm.
ok.
> Actually, why is it missing? What's the difference between the code
> generator and the JIT?
There are two things missing:
1. Testing and working out the set
2007 Aug 17
1
[LLVMdev] Inserting trace information during opt transformations
...eems OK. I am calling a function in my run time system with
the signature
void mcp_trace_instruction(const char *)
by first declaring it inside doInitialization():
virtual bool doInitialization(Module &M)
{
std::vector<const Type*> args;
args.push_back(PointerType::get(Type::Int8Ty));
FunctionType *FT = FunctionType::get(Type::VoidTy, args, false);
TraceFunc = M.getOrInsertFunction("mcp_trace_instruction", FT);
return true;
}
then inserting a suitable CallInst instruction
new CallInst(TraceFunc, gepinst, "", *wp);
Looking at disassembly o...
2009 Sep 23
2
[LLVMdev] DebugFactory
...2Ty);
>>> }
>>>
>>> Constant * DebugInfoBuilder::getAlignment(const Type * type) {
>>> // Calculates the alignment of T using "sizeof({i8, T}) - sizeof(T)"
>>> return ConstantExpr::getSub(
>>> getSize(StructType::get(Type::Int8Ty, type, NULL)),
>>> getSize(type));
>>> }
>>
>> Are ConstantExpr::getAlignOf, getSizeOf, and getOffsetOf what
>> you're looking for?
>>
> That will work. Now all I need is for the methods of DIFactory to take a
> Constant* instead of uint64....