search for: gettypebyid

Displaying 14 results from an estimated 14 matches for "gettypebyid".

2007 Nov 25
2
[LLVMdev] C embedded extensions and LLVM
...etTypeID(cast<PointerType>(T)- >getElementType())); The code to read them look like this: case bitc::TYPE_CODE_POINTER: // POINTER: [pointee type] if (Record.size() < 1) return Error("Invalid POINTER type record"); ResultTy = PointerType::get(getTypeByID(Record[0], true)); break; The interesting point here is that PointerType currently has one field (that it push_back's onto TypeVals). The reader requires this field to be present, but ignores any additional fields. You should just be able to add another typeVals.push_back() to t...
2010 Jan 18
5
[LLVMdev] [patch] Union Types - work in progress
...) @@ -584,6 +584,13 @@ ResultTy = StructType::get(Context, EltTys, Record[0]); break; } + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] + std::vector<const Type*> EltTys; + for (unsigned i = 0, e = Record.size(); i != e; ++i) + EltTys.push_back(getTypeByID(Record[i], true)); + ResultTy = UnionType::get(&EltTys[0], EltTys.size()); + break; + } This can use SmallVector. Otherwise, the patch is looking great to me! -Chris
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...ResultTy = StructType::get(Context, EltTys, Record[0]); > break; > } > + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] > + std::vector<const Type*> EltTys; > + for (unsigned i = 0, e = Record.size(); i != e; ++i) > + EltTys.push_back(getTypeByID(Record[i], true)); > + ResultTy = UnionType::get(&EltTys[0], EltTys.size()); > + break; > + } > > This can use SmallVector. > > Otherwise, the patch is looking great to me! > > -Chris > > > -- -- Talin -------------- next part -------------- A...
2012 Sep 26
0
[LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...
...handling constants. > return Error("Invalid BR record"); > I = BranchInst::Create(TrueDest, FalseDest, Cond); > InstructionList.push_back(I); > @@ -2276,9 +2293,10 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { > Type *OpTy = getTypeByID(Record[1]); > unsigned ValueBitWidth = cast<IntegerType>(OpTy)->getBitWidth(); > > - Value *Cond = getFnValueByID(Record[2], OpTy); > + Value *Cond; > BasicBlock *Default = getBasicBlock(Record[3]); > - if (OpTy == 0 || Cond == 0 ||...
2010 Jan 28
0
[LLVMdev] [patch] Union Types - work in progress
...ResultTy = StructType::get(Context, EltTys, Record[0]); > break; > } > + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] > + std::vector<const Type*> EltTys; > + for (unsigned i = 0, e = Record.size(); i != e; ++i) > + EltTys.push_back(getTypeByID(Record[i], true)); > + ResultTy = UnionType::get(&EltTys[0], EltTys.size()); > + break; > + } > > This can use SmallVector. > > Otherwise, the patch is looking great to me! > > -Chris > > > -- -- Talin -------------- next part -------------- A...
2017 Apr 04
3
RFC: Adding a string table to the bitcode format
On Tue, Apr 4, 2017 at 12:36 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > On 2017-Apr-04, at 12:12, Peter Collingbourne <peter at pcc.me.uk> wrote: > > On Mon, Apr 3, 2017 at 8:13 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > >> >> On Apr 3, 2017, at 7:08 PM, Peter Collingbourne <peter at pcc.me.uk> wrote: >>
2007 Nov 25
0
[LLVMdev] C embedded extensions and LLVM
On Nov 24, 2007, at 7:47 PM, Christopher Lamb wrote: > > On Nov 21, 2007, at 6:22 PM, Chris Lattner wrote: > >> On Wed, 21 Nov 2007, Christopher Lamb wrote: >>>> Unlike alignment and volatility, I think that the address space >>>> qualifier >>>> should be represented explicitly in the type system. The >>>> reason for this
2008 Aug 28
1
[LLVMdev] instruction CE_GEP
Hi all, I have a question with the "getelemptr" instruction. E.g.: I have some GEP instructions in my program. Some look like: <INST_GEP op0=26 op1=64 op2=429/> . <INST_GEP op0=341 op1=64 op2=101 op3=499 op4=0/> The first instruction above in assembly file: %tmp60 = getelementptr [512 x i32]* @weights, i32 0, i32 %k.3.ph Ok, we see it all: Index of @weights in value
2012 Sep 26
9
[LLVMdev] [PATCH / PROPOSAL] bitcode encoding that is ~15% smaller for large bitcode files...
Hi all, I've been looking into how to make llvm bitcode files smaller. There is one simple change that appears to shrink linked bitcode files by about 15%. See this spreadsheet for some rough data: https://docs.google.com/spreadsheet/ccc?key=0AjRrJHQc4_bddEtJdjdIek5fMDdIdFFIZldZXzdWa0E The change is in how operand ids are encoded in bitcode files. Rather than use an "absolute
2008 Jan 29
1
[LLVMdev] C embedded extensions and LLVM
...etTypeID(cast<PointerType>(T)- >getElementType())); The code to read them look like this: case bitc::TYPE_CODE_POINTER: // POINTER: [pointee type] if (Record.size() < 1) return Error("Invalid POINTER type record"); ResultTy = PointerType::get(getTypeByID(Record[0], true)); break; The interesting point here is that PointerType currently has one field (that it push_back's onto TypeVals). The reader requires this field to be present, but ignores any additional fields. You should just be able to add another typeVals.push_back() to t...
2010 Jan 16
0
[LLVMdev] [patch] Union Types - work in progress
OK here's the patch for real this time :) On Fri, Jan 15, 2010 at 4:36 PM, Talin <viridia at gmail.com> wrote: > Here's a work in progress of the union patch. Note that the test "union.ll" > does not work, so you probably don't want to check this in as is. However, > I'd be interested in any feedback you're willing to give. > > -- > -- Talin
2007 Nov 25
2
[LLVMdev] C embedded extensions and LLVM
On Nov 21, 2007, at 6:22 PM, Chris Lattner wrote: > On Wed, 21 Nov 2007, Christopher Lamb wrote: >>> Unlike alignment and volatility, I think that the address space >>> qualifier >>> should be represented explicitly in the type system. The reason >>> for this > >> I've come across a hitch. Store instructions do not reference the
2010 Jan 16
2
[LLVMdev] [patch] Union Types - work in progress
Here's a work in progress of the union patch. Note that the test "union.ll" does not work, so you probably don't want to check this in as is. However, I'd be interested in any feedback you're willing to give. -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL:
2010 Feb 10
3
[LLVMdev] [patch] Union Types - work in progress
...pe::get(Context, EltTys, Record[0]); >> break; >> } >> + case bitc::TYPE_CODE_UNION: { // UNION: [eltty x N] >> + std::vector<const Type*> EltTys; >> + for (unsigned i = 0, e = Record.size(); i != e; ++i) >> + EltTys.push_back(getTypeByID(Record[i], true)); >> + ResultTy = UnionType::get(&EltTys[0], EltTys.size()); >> + break; >> + } >> >> This can use SmallVector. >> >> Otherwise, the patch is looking great to me! >> >> -Chris >> >> >> > &gt...