Displaying 20 results from an estimated 1000 matches similar to: ""Do not use Static Constructors" LLVM Coding Standard rule question"
2016 Mar 09
2
"Do not use Static Constructors" LLVM Coding Standard rule question
a static local still produces a static dtor, though
One of the ways you can get around this is with a deliberate non-cleanup:
const foo &getFoo() {
static const foo &f = *new foo();
return f;
}
that way no global dtor runs. Obviously only works if you don't need foo's
dtor to run.
On Tue, Mar 8, 2016 at 11:42 PM, Craig Topper via llvm-dev <
llvm-dev at lists.llvm.org>
2016 Mar 09
3
"Do not use Static Constructors" LLVM Coding Standard rule question
These type of constructs are less than ideal if you have something that
uses LLVM as a library in a "long running" application (e.g. imagine
something like photo editor that compiles "filters", and a user that loads
the application on monday, and closes it on the following thursday) , as
there is no (trivial) way to know that this stringmap exists, or that it
may need cleaning
2017 Jun 14
0
Implementing cross-thread reduction in the AMDGPU backend
Sorry about the formatting...
Anyway, I think there may be a misinterpretation of bound_cntl. My understanding is that:
0 => if the source is invalid or disabled, do not write a result
1 => if the source is invalid or disabled, use a 0 instead
So the problematic case is where bound_cntl is 0, not when it is 1.
-----Original Message-----
From: Tom Stellard [mailto:tstellar at redhat.com]
2015 Dec 08
3
compiler-rt fails to find <stdarg.h> on FreeBSD
I'm unsure why this is failing this week, but when I build for FreeBSD
HEAD, I now get a failure to find <stdarg.h>. Very strange. Maybe its
missing a -I /usr/include somewhere?
[1950/2811] Building CXX object
projects/compiler-rt/lib/tsan/CMakeFiles/clang_rt.tsan-x86_64.dir/rtl/tsan_interceptors.cc.o
FAILED: /usr/bin/CC -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
2017 Jun 14
5
Implementing cross-thread reduction in the AMDGPU backend
On 06/13/2017 07:33 PM, Matt Arsenault wrote:
>
>> On Jun 12, 2017, at 17:23, Tom Stellard <tstellar at redhat.com <mailto:tstellar at redhat.com>> wrote:
>>
>> On 06/12/2017 08:03 PM, Connor Abbott wrote:
>>> On Mon, Jun 12, 2017 at 4:56 PM, Tom Stellard <tstellar at redhat.com <mailto:tstellar at redhat.com>> wrote:
>>>> On
2017 Jun 15
1
Implementing cross-thread reduction in the AMDGPU backend
I'm wondering about the focus on bound_cntl. Any cleared bit in the row_mask or bank_mask will also disable updating the result.
Brian
-----Original Message-----
From: Connor Abbott [mailto:cwabbott0 at gmail.com]
Sent: Wednesday, June 14, 2017 6:13 PM
To: tstellar at redhat.com
Cc: Matt Arsenault; llvm-dev at lists.llvm.org; Kolton, Sam; Sumner, Brian; Pykhtin, Valery
Subject: Re:
2003 Sep 28
1
Re: [theora] xiph.org irc channels moving
I'd just like to throw my 2 cents in here.
I can understand the need to drop a xiph irc server. However, I do take
issue with moving to Freenode. The reason that we moved so long ago (as
I understand it) is that an overwhelming flood of politics made real
vorbis discussion uncomfortable. A few people took things personally and
acted out, and pretty soon everybody was on edge. Just looking
2003 Sep 28
1
Re: [theora] xiph.org irc channels moving
I'd just like to throw my 2 cents in here.
I can understand the need to drop a xiph irc server. However, I do take
issue with moving to Freenode. The reason that we moved so long ago (as
I understand it) is that an overwhelming flood of politics made real
vorbis discussion uncomfortable. A few people took things personally and
acted out, and pretty soon everybody was on edge. Just looking
2015 Mar 09
5
[LLVMdev] Build failure with compiler-rt on trunk under linux
I've been building clang on linux for a couple of years now,
contributing to the testing on Ubuntu, but this one has me stumped:
fatal error: 'asm/socket.h' file not found
#include <asm/socket.h>
[1556/4006] Building CXX object
projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_posix.cc.o
FAILED:
2012 Feb 07
5
[LLVMdev] Static ctors in llvm::Attribute
Hi Kostya,
One unexpected piece of fallout in your recent attributes change (r148553) was that it introduced a bunch of static constructors into .o files that #include Attributes.h, due to stuff like this:
const Attributes None (0); ///< No attributes have been set
const Attributes ZExt (1<<0); ///< Zero extended before/after call
const Attributes SExt
2014 Nov 28
0
Re: [PATCH] lib: Add COMPILE_REGEXP macro to hide regexp constructors/destructors.
On Friday 28 November 2014 14:44:30 Richard W.M. Jones wrote:
> [NOTE: this is not the complete patch. Once ACKed, I will make the
> same mechanical change to all the other places in the library that use
> this pattern.]
> ---
> src/guestfs-internal.h | 24 ++++++++
> src/inspect-fs-unix.c | 164 +++++++++++--------------------------------------
> 2 files changed, 59
2008 Dec 11
2
[LLVMdev] C++ Constructors
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? In older versions of LLVM, llvm-gcc added an explicit function
call to __main() as the first instruction in main(); __main() would call
all global static constructors. It seems __main() is now gone.
I've got a transform that
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 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
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
2009 Sep 26
0
[LLVMdev] byval and copy constructors / destructors.
On gcc/x86, when a class or struct has a copy constructor or destructor
and is passed by value to a function, the caller creates a temporary
copy and passes a pointer to the copy. LLVM does the same.
msvc++ does not use the pointer trick. It puts the class on the stack
like any other function parameter.
How to pass a class parameter `byval' while honoring the copy
constructor and/or
2010 Oct 11
0
[LLVMdev] MAJOR API CHANGE: Pass initialization without static constructors
John,
On Oct 8, 2010, at 1:05 PM, John Criswell wrote:
>> These initialization routines must be invoked before the PassManager will be able to resolve pipelines involving your pass. For convenience, LLVM now exposes per-library batch initialization routines, i.e. initializeScalarOpts(), which initialize all the passes within a given library in a single go.
>
> From an ease of
2012 Mar 05
2
[LLVMdev] Microsoft constructors implementation problem.
Hi!
I have another question.
If ctor was called from other ctor then additional parameter must be
equal 0 otherwise it`s equal 1.
How can I determine who call constructor?
- Dmitry.
2012 Mar 08
0
[LLVMdev] [cfe-dev] Microsoft constructors implementation problem.
On Mar 5, 2012, at 12:40 AM, r4start wrote:
> I have another question.
> If ctor was called from other ctor then additional parameter must be
> equal 0 otherwise it`s equal 1.
The rule isn't "Is this constructor being called from another constructor?",
it's "Is this constructor being used to initialize a base subobject?". That's
equivalent to the Itanium
2010 Oct 08
1
[LLVMdev] MAJOR API CHANGE: Pass initialization without static constructors
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 they can now control when and if initialization occurs, as opposed to being forced to incur the initialization cost at