Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Emitting recursive types"
2013 Jan 22
2
[LLVMdev] StructType opaque->sized
I'm building a StructType without a body using
StructType *StructType::create(LLVMContext &Context, StringRef Name);
and then later adding a body to with setBody(). It starts of isOpaque() == true, and isSized() == false, and after I add the body, isOpaque() == false, but isSized() is still false.
If I create a StructType using
StructType * StructType ::create(LLVMContext
2011 Jun 25
3
[LLVMdev] inefficiencies in ConstantUniqueMap ?
Hi Chris,
> 3. Clang/dragonegg need to adapt to the new API (help appreciated!)
what needs to be done exactly?
Ciao, Duncan.
2012 Dec 30
2
[LLVMdev] Cannot interchange "literal" and "identified" structs
With primitive types, I can interchange literal usage and type aliases in
IR:
%mytype = type i32
define void @foo(%mytype* %ptr) {
%t1 = load *%mytype** %ptr
store i32 *%t1*, *i32** %ptr
ret void
}
But for structs, I cannot:
%mytype = type { i32, i32 }
define void @foo(%mytype* %ptr) {
%t1 = load *%mytype** %ptr
store* { i32, i32 }* %t1, *{ i32, i32 }** %ptr
ret void
}
2011 Jun 25
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On 25 June 2011 13:00, Duncan Sands <baldrick at free.fr> wrote:
>> 3. Clang/dragonegg need to adapt to the new API (help appreciated!)
>
> what needs to be done exactly?
Background info: http://www.nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt
As I understand it, PATypeHolder, OpaqueType and the Module's
TypeSymbolTable are gone. Instead, StructTypes can optionally be
2012 Dec 30
0
[LLVMdev] Cannot interchange "literal" and "identified" structs
Justin,
http://llvm.org/docs/LangRef.html#structure-type
"Identified types can be recursive, can be opaqued, and are never uniqued."
Do you think it would be less descriptive?
"Identified type, aka named llvm::StructType, is never uniqued against
other identified types nor literal types, aka unnamed StructType(s)."
?
See also;
2010 Feb 08
1
[LLVMdev] TypeBuilder for const void*
Hi!
In Line 230 of llvm\Support\TypeBuilder.h is support for void*:
/// void* is disallowed in LLVM types, but it occurs often enough in C
code that
/// we special case it.
template<> class TypeBuilder<void*, false>
: public TypeBuilder<types::i<8>*, false> {};
If would be cool if the same thing can be added for const void*:
template<> class
2012 Jun 13
2
[LLVMdev] Structs passed by value
Hello,
I'm trying to change the default behavior for how structures are passed to functions to use pass-by-value. Currently LLVM's default behavior is to pass structures by reference. I'm not disputing the benefits of this but I really want to change the default behavior for experimentation purposes.
To this end I've changed the code in DefaultABIInfo::classifyArgumentType() to
2009 Sep 15
1
Regular expression problem
Dear R-users,
I am trying to use the grep function to test whether a particular string
is of the form "n.../mydir/myfile.mytype.myext". Anything between n and
mytype could vary, and anything after mytype could vary. I tried to
proceed by steps to build my regular expression... but I do not really
understand why the last call of the following code do not work.
Any help would be
2012 Jun 14
0
[LLVMdev] Structs passed by value
Hi,
On Wed, Jun 13, 2012 at 9:55 AM, Martinez, Javier E <
javier.e.martinez at intel.com> wrote:
> Hello,****
>
> ** **
>
> I’m trying to change the default behavior for how structures are passed to
> functions to use pass-by-value. Currently LLVM’s default behavior is to
> pass structures by reference. I’m not disputing the benefits of this but I
> really want to
2005 Mar 08
3
[LLVMdev] Recursive Types using the llvm support library
As far as I can tell, when you construct a type using the support
library StructType::get, you have to pass in a list of types. How can
you make a Recursive type by passing in a pointer to the type you are
constucting.
An example where something really simple like the line below was output
would be perfect.
%struct.linked_list = type { %struct.linked_list*, %sbyte* }
Thanks for any help,
2011 Nov 27
4
[LLVMdev] LLVM 3.0 release notes
The first draft of the LLVM 3.0 release notes now done, in llvm/docs/ReleaseNotes.html (the web page isn't autoupdating at the moment). Please take a look and make corrections or enhancements as you see fit.
There are still a few things that I need from specific people (marked with XXX's):
- BillW is writing a blog about exception handling.
- The llvm.expect intrinsic isn't documented
2005 Mar 08
0
[LLVMdev] Recursive Types using the llvm support library
On Mon, 7 Mar 2005, John Carrino wrote:
> As far as I can tell, when you construct a type using the support
> library StructType::get, you have to pass in a list of types. How can
> you make a Recursive type by passing in a pointer to the type you are
> constucting.
>
> An example where something really simple like the line below was output
> would be perfect.
>
>
2008 Dec 05
2
adding rows as arithmatic calculation on original rows
Dear R users,
Suppose I have the following data.frame:
myID myType myNum1 myNum2 myNum3
a Single 10 11 12
b Single 15 25 35
c Double 22 33 44
d Double 4 6 8
and I want to have new records:
myID myType myNum1 myNum2 myNum3
e Single 12.5 18
2005 Mar 08
2
[LLVMdev] Recursive Types using the llvm support library
>> An example where something really simple like the line below was output
>> would be perfect.
>>
>> %struct.linked_list = type { %struct.linked_list*, %sbyte* }
>
> Use something like this:
>
> PATypeHolder StructTy = OpaqueType::get();
> std::vector<const Type*> Elts;
> Elts.push_back(PointerType::get(StructTy));
>
2007 Jul 24
3
How to require a defined type...
Hi all,
I''m struggling with the following:
I have a defined type wrapped in a class:
class myclass {
define mytype(bla) {
file { "blabla":
....
}
exec { "blablabla":
...
}
}
}
And I access the defined type in my other class by doing this:
class otherclass {
include myclass
myclass::mytype { "alb":
...
}
# and here I want to
2011 Nov 28
1
[LLVMdev] LLVM 3.0 release notes
On Nov 28, 2011, at 7:20 AM, Joe Abbey wrote:
> Internal API changes mentioned the Type system changes twice... merging. It should now read:
>
> The biggest and most pervasive change is that the type system has been rewritten: PATypeHolder and OpaqueType are gone, and all APIs deal with Type* instead of const Type*. If you need to create recursive structures, then create a named
2009 Aug 25
0
[LLVMdev] Simplifying a front-end project
On Tue, Aug 25, 2009 at 3:01 PM, Vikram S. Adve<vadve at cs.uiuc.edu> wrote:
> For my introductory Compiler Construction class, I have been giving
> the students a project to write a simple compiler for a toy, single-
> inheritance object-oriented language. We give them a set of classes
> implementing an AST for the language and a type checker as well. The
> students write
2010 Nov 29
0
[LLVMdev] FunctionType as a function argument
You need a pointer-to-function type, but FunctionType just gives you a
function type. Use PointerType::getUnqual(FunctionType::get(...)). Or
TypeBuilder<char (*func)(void*), false>::get(context) from
Support/TypeBuilder.h.
On Mon, Nov 29, 2010 at 10:37 AM, Salomon Brys <salomon.brys at gmail.com>wrote:
> Hi all.
> I would like to declare a function that takes a function pointer
2017 Jan 09
3
[cfe-dev] Modernizing LLVM Coding Style Guide and enforcing Clang-tidy
Hi,
Sorry I fat fingered an earlier send in the previous email. I was
trying to say:
On Mon, Jan 9, 2017 at 2:52 PM, Sanjoy Das
<sanjoy at playingwithpointers.com> wrote:
>> +1 Exactly this.
>> I don't think C programmer will not understand using. The "=" makes it much
>> simpler to read, even if it is the first time you see it, which is not the
>>
2012 Sep 19
3
[LLVMdev] newbie question on getelementptr
Hi All,
I'm new to LLVM and I'm having a coding problem.
I'm creating a GlobalVariable that contains a StructType that contains a
Function. The function returns i32 and takes two i32's.
Here is my code:
GlobalVariable* retrieved = module->getGlobalVariable("myGV");
...
Constant* result = ConstantExpr::getGetElementPtr(retrieved, indices);
How do I get my Function