similar to: [LLVMdev] C++ Constructors

Displaying 20 results from an estimated 40000 matches similar to: "[LLVMdev] C++ Constructors"

2008 Dec 11
0
[LLVMdev] C++ Constructors
On Dec 11, 2008, at 2:35 PM, John Criswell wrote: > Dear All, > > Are global static constructors called before main() in LLVM these days > using some behind-the-scenes magic that is not explicit in the LLVM > bitcode? It is explicit in the bitcode. You should see an llvm.globalctors global array that has function pointers for each initializer to run. > In older versions of
2008 Dec 11
3
[LLVMdev] C++ Constructors
Chris Lattner wrote: > On Dec 11, 2008, at 2:35 PM, John Criswell wrote: > > >> Dear All, >> >> Are global static constructors called before main() in LLVM these days >> using some behind-the-scenes magic that is not explicit in the LLVM >> bitcode? >> > > It is explicit in the bitcode. You should see an llvm.globalctors > global
2008 Dec 12
0
[LLVMdev] C++ Constructors
On Dec 11, 2008, at 2:45 PM, John Criswell wrote: >> It is explicit in the bitcode. You should see an llvm.globalctors >> global array that has function pointers for each initializer to run. >> > Right, I saw that. I just didn't see anything from main() calling > those > functions, which led me to believe that something else is calling > those > functions
2010 Oct 08
2
[LLVMdev] MAJOR API CHANGE: Pass initialization without static constructors
On Oct 8, 2010, at 1:37 PM, John Criswell wrote: > On 10/8/10 3:15 PM, Owen Anderson wrote: >> >> On Oct 8, 2010, at 1:05 PM, John Criswell wrote: >> >>> On 10/8/10 1:29 PM, Owen Anderson wrote: >>>> Hello fellow LLVM-ers, >>>> >>>> As those of you who follow llvm-commits have probably noticed, I've been hard at work
2010 Oct 08
0
[LLVMdev] MAJOR API CHANGE: Pass initialization without static constructors
On 10/8/10 3:44 PM, Owen Anderson wrote: > [snip] > >> Hrm. I see. >> >> I still don't like the idea of having every statically-linked tool explicitly initializing every library that gets linked in. Just dumping the library into the Makefile and being done with it was much nicer. >> >> If you can find a reasonable way to support that, it would be nice.
2011 Aug 09
2
[LLVMdev] Adding a module in a pass
On 2011-08-09 16:48, John Criswell wrote: > On 8/9/11 6:49 AM, Bjorn Reese wrote: >> I have an optimization pass (FunctionPass) where I need to add global >> constructors. >> >> For cleaness sake I decided to add these in my own module. My module >> is created in my FunctionPass constructor: > > This is not how I would do it. A FunctionPass has
2014 Jul 03
5
[LLVMdev] Global constructors "get lost" when transforming bitcode files
Hello, A strange problem appears when upgrading from release_34 to testing. Some transformations to bitcode files cause registered global_ctors to not be called. Here's an example (I've also attached the complete example and pasted it below): This works: clang -fsanitize=address -flto -c -o sum.o sum.c clang -fsanitize=address -o sum sum.o This doesn't work: clang
2006 Nov 06
0
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
Hi Napi, On Mon, 2006-11-06 at 10:44 +0800, Mohd-Hanafiah Abdullah wrote: > Hi: > > I've been able to compile the attached "helloworld.c" file converted > from "helloworld.cpp". Great. > > My question is how does one usually use __main() and CODE_FOR_MAIN() > in tying up with the rest of the code? I'm not quite sure what you're asking.
2011 Aug 09
0
[LLVMdev] Adding a module in a pass
On 8/9/11 9:15 AM, Bjorn Reese wrote: > On 2011-08-09 16:48, John Criswell wrote: >> On 8/9/11 6:49 AM, Bjorn Reese wrote: >>> I have an optimization pass (FunctionPass) where I need to add global >>> constructors. >>> >>> For cleaness sake I decided to add these in my own module. My module >>> is created in my FunctionPass constructor:
2006 Nov 06
2
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
On Sun, 2006-11-05 at 19:06 -0800, Reid Spencer wrote: ... > As for the __main function, its a gcc library call required by the > compiler for program startup. The details vary but the call is needed. > Amongst other things it will probably initialize your C++ static > constructors. Hi Reid: I'm not using gcc for this purpose but another C compiler called AMPC. It compiles C
2010 Oct 08
0
[LLVMdev] MAJOR API CHANGE: Pass initialization without static constructors
On 10/8/10 3:15 PM, Owen Anderson wrote: > > On Oct 8, 2010, at 1:05 PM, John Criswell wrote: > >> On 10/8/10 1:29 PM, Owen Anderson wrote: >>> Hello fellow LLVM-ers, >>> >>> As those of you who follow llvm-commits have probably noticed, I've >>> been hard at work reworking our pass infrastructure to perform pass >>>
2010 Oct 08
2
[LLVMdev] MAJOR API CHANGE: Pass initialization without static constructors
On Oct 8, 2010, at 1:05 PM, John Criswell wrote: > On 10/8/10 1:29 PM, Owen Anderson wrote: >> Hello fellow LLVM-ers, >> >> As those of you who follow llvm-commits have probably noticed, I've been hard at work reworking our pass infrastructure to perform pass initialization/registration without static constructors. This is a boon for clients of the LLVM libraries, as
2006 Nov 06
0
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
Hi Napi, On Mon, 2006-11-06 at 12:17 +0800, Mohd-Hanafiah Abdullah wrote: > On Sun, 2006-11-05 at 19:06 -0800, Reid Spencer wrote: > ... > > As for the __main function, its a gcc library call required by the > > compiler for program startup. The details vary but the call is needed. > > Amongst other things it will probably initialize your C++ static > >
2008 Dec 12
2
[LLVMdev] C++ Constructors
Chris Lattner wrote: > [snip] > > Yes, that will cause it to run before anything else in the module. If > you link to native code with a static ctor, the static ctors in that > code may run first. > Thanks Chris and Anton! Another question: the llvm.global.ctor array is an array of structures with an integer and a function pointer. What information does the integer
2008 Feb 15
2
[LLVMdev] Question on link error
Hello, Ted > __main is supposed to be inside hello.bc, so why can�t lli find it? No, it shouldn't be there. On targets, which lacks init sections (for example, all win-based, like mingw & cygwin) __main is used to call static constructors and relevant stuff. The call to __main is assembled early in the main routine before the actual code will be executed. I'll try to look into
2006 Nov 06
2
[LLVMdev] Convert C++ to C. What is 0x0p+0 ?
Hi: I've been able to compile the attached "helloworld.c" file converted from "helloworld.cpp". My question is how does one usually use __main() and CODE_FOR_MAIN() in tying up with the rest of the code? Attached here are the original "helloworld.cpp" and "helloworld.c" files. Thanks. Napi On Sun, 2006-11-05 at 09:14 -0800, Reid Spencer wrote: >
2019 Mar 15
2
Static constructors with ORC JIT?
Thank you Alex, I went and implemented a solution along those lines. It works well. It may be worth mentioning static constructors in the Kaleidoscope tutorial. Cheers, Daniele ________________________________________ From: Alex Denisov [1101.debian at gmail.com] Sent: 15 March 2019 08:07 To: Daniele Vettorel Cc: llvm-dev at lists.llvm.org Subject: Re: [llvm-dev] Static constructors with ORC
2016 Dec 13
0
Enabling statistics in release builds / static constructors
Given that LLVM has so many auto-registration systems (cl::opt, target registry, pass registry, statistics, I'm sure there's more), maybe we should spend the time to build an auto-registration system that doesn't involve static constructors? It needs custom code for every supported object file format, and is hard to get right when DSOs are involved, but in the long run it's
2016 Dec 13
3
Enabling statistics in release builds / static constructors
> On Dec 13, 2016, at 12:56 PM, Reid Kleckner <rnk at google.com> wrote: > > Given that LLVM has so many auto-registration systems (cl::opt, target registry, pass registry, statistics, I'm sure there's more), maybe we should spend the time to build an auto-registration system that doesn't involve static constructors? I would volunteer to do the work, however this
2019 Mar 14
2
Static constructors with ORC JIT?
Hi all, Is there way to tell the ORC JIT infrastructure to run the static constructors in a module that has just been compiled? I see that the ExecutionEngine class has a runStaticConstructorsDestructors function, is that relevant with ORC and if so, how should it be accessed? Thanks, Daniele -------------- next part -------------- An HTML attachment was scrubbed... URL: