<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/clang.git/lib/CodeGen/CGExpr.cpp, branch master</title>
<subtitle>llvm.org: Obsolete (use llvm)
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/'/>
<entry>
<title>[c++20] Add CXXRewrittenBinaryOperator to represent a comparison</title>
<updated>2019-10-19T00:04:38+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2019-10-19T00:04:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=ea521aa6024431138f7890d486a6e3500822b3d5'/>
<id>ea521aa6024431138f7890d486a6e3500822b3d5</id>
<content type='text'>
operator that is rewritten as a call to multiple other operators.

No functionality change yet: nothing creates these expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375305 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
operator that is rewritten as a call to multiple other operators.

No functionality change yet: nothing creates these expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375305 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert Tag CFI-generated data structures with "#pragma clang section" attributes.</title>
<updated>2019-10-17T00:55:38+00:00</updated>
<author>
<name>Dmitry Mikulin</name>
<email>dmitry.mikulin@sony.com</email>
</author>
<published>2019-10-17T00:55:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=b18fc6c363618bd0022635bb1d48203d9a9a03dd'/>
<id>b18fc6c363618bd0022635bb1d48203d9a9a03dd</id>
<content type='text'>
This reverts r375022 (git commit e2692b3bc0327606748b6d291b9009d2c845ced5)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375069 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts r375022 (git commit e2692b3bc0327606748b6d291b9009d2c845ced5)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375069 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Tag CFI-generated data structures with "#pragma clang section" attributes.</title>
<updated>2019-10-16T17:51:40+00:00</updated>
<author>
<name>Dmitry Mikulin</name>
<email>dmitry.mikulin@sony.com</email>
</author>
<published>2019-10-16T17:51:40+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=4da6acb783d62e0d65c3543e874fd8e883ed3370'/>
<id>4da6acb783d62e0d65c3543e874fd8e883ed3370</id>
<content type='text'>
Differential Revision: https://reviews.llvm.org/D68808

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375022 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Differential Revision: https://reviews.llvm.org/D68808

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375022 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[BPF] do compile-once run-everywhere relocation for bitfields</title>
<updated>2019-10-08T18:23:17+00:00</updated>
<author>
<name>Yonghong Song</name>
<email>yhs@fb.com</email>
</author>
<published>2019-10-08T18:23:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=2eb3835e1cb4b13450a7a1c2bbe5e96904567612'/>
<id>2eb3835e1cb4b13450a7a1c2bbe5e96904567612</id>
<content type='text'>
A bpf specific clang intrinsic is introduced:
   u32 __builtin_preserve_field_info(member_access, info_kind)
Depending on info_kind, different information will
be returned to the program. A relocation is also
recorded for this builtin so that bpf loader can
patch the instruction on the target host.
This clang intrinsic is used to get certain information
to facilitate struct/union member relocations.

The offset relocation is extended by 4 bytes to
include relocation kind.
Currently supported relocation kinds are
 enum {
    FIELD_BYTE_OFFSET = 0,
    FIELD_BYTE_SIZE,
    FIELD_EXISTENCE,
    FIELD_SIGNEDNESS,
    FIELD_LSHIFT_U64,
    FIELD_RSHIFT_U64,
 };
for __builtin_preserve_field_info. The old
access offset relocation is covered by
    FIELD_BYTE_OFFSET = 0.

An example:
struct s {
    int a;
    int b1:9;
    int b2:4;
};
enum {
    FIELD_BYTE_OFFSET = 0,
    FIELD_BYTE_SIZE,
    FIELD_EXISTENCE,
    FIELD_SIGNEDNESS,
    FIELD_LSHIFT_U64,
    FIELD_RSHIFT_U64,
};

void bpf_probe_read(void *, unsigned, const void *);
int field_read(struct s *arg) {
  unsigned long long ull = 0;
  unsigned offset = __builtin_preserve_field_info(arg-&gt;b2, FIELD_BYTE_OFFSET);
  unsigned size = __builtin_preserve_field_info(arg-&gt;b2, FIELD_BYTE_SIZE);
 #ifdef USE_PROBE_READ
  bpf_probe_read(&amp;ull, size, (const void *)arg + offset);
  unsigned lshift = __builtin_preserve_field_info(arg-&gt;b2, FIELD_LSHIFT_U64);
 #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  lshift = lshift + (size &lt;&lt; 3) - 64;
 #endif
 #else
  switch(size) {
  case 1:
    ull = *(unsigned char *)((void *)arg + offset); break;
  case 2:
    ull = *(unsigned short *)((void *)arg + offset); break;
  case 4:
    ull = *(unsigned int *)((void *)arg + offset); break;
  case 8:
    ull = *(unsigned long long *)((void *)arg + offset); break;
  }
  unsigned lshift = __builtin_preserve_field_info(arg-&gt;b2, FIELD_LSHIFT_U64);
 #endif
  ull &lt;&lt;= lshift;
  if (__builtin_preserve_field_info(arg-&gt;b2, FIELD_SIGNEDNESS))
    return (long long)ull &gt;&gt; __builtin_preserve_field_info(arg-&gt;b2, FIELD_RSHIFT_U64);
  return ull &gt;&gt; __builtin_preserve_field_info(arg-&gt;b2, FIELD_RSHIFT_U64);
}

There is a minor overhead for bpf_probe_read() on big endian.

The code and relocation generated for field_read where bpf_probe_read() is
used to access argument data on little endian mode:
        r3 = r1
        r1 = 0
        r1 = 4  &lt;=== relocation (FIELD_BYTE_OFFSET)
        r3 += r1
        r1 = r10
        r1 += -8
        r2 = 4  &lt;=== relocation (FIELD_BYTE_SIZE)
        call bpf_probe_read
        r2 = 51 &lt;=== relocation (FIELD_LSHIFT_U64)
        r1 = *(u64 *)(r10 - 8)
        r1 &lt;&lt;= r2
        r2 = 60 &lt;=== relocation (FIELD_RSHIFT_U64)
        r0 = r1
        r0 &gt;&gt;= r2
        r3 = 1  &lt;=== relocation (FIELD_SIGNEDNESS)
        if r3 == 0 goto LBB0_2
        r1 s&gt;&gt;= r2
        r0 = r1
LBB0_2:
        exit

Compare to the above code between relocations FIELD_LSHIFT_U64 and
FIELD_LSHIFT_U64, the code with big endian mode has four more
instructions.
        r1 = 41   &lt;=== relocation (FIELD_LSHIFT_U64)
        r6 += r1
        r6 += -64
        r6 &lt;&lt;= 32
        r6 &gt;&gt;= 32
        r1 = *(u64 *)(r10 - 8)
        r1 &lt;&lt;= r6
        r2 = 60   &lt;=== relocation (FIELD_RSHIFT_U64)

The code and relocation generated when using direct load.
        r2 = 0
        r3 = 4
        r4 = 4
        if r4 s&gt; 3 goto LBB0_3
        if r4 == 1 goto LBB0_5
        if r4 == 2 goto LBB0_6
        goto LBB0_9
LBB0_6:                                 # %sw.bb1
        r1 += r3
        r2 = *(u16 *)(r1 + 0)
        goto LBB0_9
LBB0_3:                                 # %entry
        if r4 == 4 goto LBB0_7
        if r4 == 8 goto LBB0_8
        goto LBB0_9
LBB0_8:                                 # %sw.bb9
        r1 += r3
        r2 = *(u64 *)(r1 + 0)
        goto LBB0_9
LBB0_5:                                 # %sw.bb
        r1 += r3
        r2 = *(u8 *)(r1 + 0)
        goto LBB0_9
LBB0_7:                                 # %sw.bb5
        r1 += r3
        r2 = *(u32 *)(r1 + 0)
LBB0_9:                                 # %sw.epilog
        r1 = 51
        r2 &lt;&lt;= r1
        r1 = 60
        r0 = r2
        r0 &gt;&gt;= r1
        r3 = 1
        if r3 == 0 goto LBB0_11
        r2 s&gt;&gt;= r1
        r0 = r2
LBB0_11:                                # %sw.epilog
        exit

Considering verifier is able to do limited constant
propogation following branches. The following is the
code actually traversed.
        r2 = 0
        r3 = 4   &lt;=== relocation
        r4 = 4   &lt;=== relocation
        if r4 s&gt; 3 goto LBB0_3
LBB0_3:                                 # %entry
        if r4 == 4 goto LBB0_7
LBB0_7:                                 # %sw.bb5
        r1 += r3
        r2 = *(u32 *)(r1 + 0)
LBB0_9:                                 # %sw.epilog
        r1 = 51   &lt;=== relocation
        r2 &lt;&lt;= r1
        r1 = 60   &lt;=== relocation
        r0 = r2
        r0 &gt;&gt;= r1
        r3 = 1
        if r3 == 0 goto LBB0_11
        r2 s&gt;&gt;= r1
        r0 = r2
LBB0_11:                                # %sw.epilog
        exit

For native load case, the load size is calculated to be the
same as the size of load width LLVM otherwise used to load
the value which is then used to extract the bitfield value.

Differential Revision: https://reviews.llvm.org/D67980

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374099 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A bpf specific clang intrinsic is introduced:
   u32 __builtin_preserve_field_info(member_access, info_kind)
Depending on info_kind, different information will
be returned to the program. A relocation is also
recorded for this builtin so that bpf loader can
patch the instruction on the target host.
This clang intrinsic is used to get certain information
to facilitate struct/union member relocations.

The offset relocation is extended by 4 bytes to
include relocation kind.
Currently supported relocation kinds are
 enum {
    FIELD_BYTE_OFFSET = 0,
    FIELD_BYTE_SIZE,
    FIELD_EXISTENCE,
    FIELD_SIGNEDNESS,
    FIELD_LSHIFT_U64,
    FIELD_RSHIFT_U64,
 };
for __builtin_preserve_field_info. The old
access offset relocation is covered by
    FIELD_BYTE_OFFSET = 0.

An example:
struct s {
    int a;
    int b1:9;
    int b2:4;
};
enum {
    FIELD_BYTE_OFFSET = 0,
    FIELD_BYTE_SIZE,
    FIELD_EXISTENCE,
    FIELD_SIGNEDNESS,
    FIELD_LSHIFT_U64,
    FIELD_RSHIFT_U64,
};

void bpf_probe_read(void *, unsigned, const void *);
int field_read(struct s *arg) {
  unsigned long long ull = 0;
  unsigned offset = __builtin_preserve_field_info(arg-&gt;b2, FIELD_BYTE_OFFSET);
  unsigned size = __builtin_preserve_field_info(arg-&gt;b2, FIELD_BYTE_SIZE);
 #ifdef USE_PROBE_READ
  bpf_probe_read(&amp;ull, size, (const void *)arg + offset);
  unsigned lshift = __builtin_preserve_field_info(arg-&gt;b2, FIELD_LSHIFT_U64);
 #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  lshift = lshift + (size &lt;&lt; 3) - 64;
 #endif
 #else
  switch(size) {
  case 1:
    ull = *(unsigned char *)((void *)arg + offset); break;
  case 2:
    ull = *(unsigned short *)((void *)arg + offset); break;
  case 4:
    ull = *(unsigned int *)((void *)arg + offset); break;
  case 8:
    ull = *(unsigned long long *)((void *)arg + offset); break;
  }
  unsigned lshift = __builtin_preserve_field_info(arg-&gt;b2, FIELD_LSHIFT_U64);
 #endif
  ull &lt;&lt;= lshift;
  if (__builtin_preserve_field_info(arg-&gt;b2, FIELD_SIGNEDNESS))
    return (long long)ull &gt;&gt; __builtin_preserve_field_info(arg-&gt;b2, FIELD_RSHIFT_U64);
  return ull &gt;&gt; __builtin_preserve_field_info(arg-&gt;b2, FIELD_RSHIFT_U64);
}

There is a minor overhead for bpf_probe_read() on big endian.

The code and relocation generated for field_read where bpf_probe_read() is
used to access argument data on little endian mode:
        r3 = r1
        r1 = 0
        r1 = 4  &lt;=== relocation (FIELD_BYTE_OFFSET)
        r3 += r1
        r1 = r10
        r1 += -8
        r2 = 4  &lt;=== relocation (FIELD_BYTE_SIZE)
        call bpf_probe_read
        r2 = 51 &lt;=== relocation (FIELD_LSHIFT_U64)
        r1 = *(u64 *)(r10 - 8)
        r1 &lt;&lt;= r2
        r2 = 60 &lt;=== relocation (FIELD_RSHIFT_U64)
        r0 = r1
        r0 &gt;&gt;= r2
        r3 = 1  &lt;=== relocation (FIELD_SIGNEDNESS)
        if r3 == 0 goto LBB0_2
        r1 s&gt;&gt;= r2
        r0 = r1
LBB0_2:
        exit

Compare to the above code between relocations FIELD_LSHIFT_U64 and
FIELD_LSHIFT_U64, the code with big endian mode has four more
instructions.
        r1 = 41   &lt;=== relocation (FIELD_LSHIFT_U64)
        r6 += r1
        r6 += -64
        r6 &lt;&lt;= 32
        r6 &gt;&gt;= 32
        r1 = *(u64 *)(r10 - 8)
        r1 &lt;&lt;= r6
        r2 = 60   &lt;=== relocation (FIELD_RSHIFT_U64)

The code and relocation generated when using direct load.
        r2 = 0
        r3 = 4
        r4 = 4
        if r4 s&gt; 3 goto LBB0_3
        if r4 == 1 goto LBB0_5
        if r4 == 2 goto LBB0_6
        goto LBB0_9
LBB0_6:                                 # %sw.bb1
        r1 += r3
        r2 = *(u16 *)(r1 + 0)
        goto LBB0_9
LBB0_3:                                 # %entry
        if r4 == 4 goto LBB0_7
        if r4 == 8 goto LBB0_8
        goto LBB0_9
LBB0_8:                                 # %sw.bb9
        r1 += r3
        r2 = *(u64 *)(r1 + 0)
        goto LBB0_9
LBB0_5:                                 # %sw.bb
        r1 += r3
        r2 = *(u8 *)(r1 + 0)
        goto LBB0_9
LBB0_7:                                 # %sw.bb5
        r1 += r3
        r2 = *(u32 *)(r1 + 0)
LBB0_9:                                 # %sw.epilog
        r1 = 51
        r2 &lt;&lt;= r1
        r1 = 60
        r0 = r2
        r0 &gt;&gt;= r1
        r3 = 1
        if r3 == 0 goto LBB0_11
        r2 s&gt;&gt;= r1
        r0 = r2
LBB0_11:                                # %sw.epilog
        exit

Considering verifier is able to do limited constant
propogation following branches. The following is the
code actually traversed.
        r2 = 0
        r3 = 4   &lt;=== relocation
        r4 = 4   &lt;=== relocation
        if r4 s&gt; 3 goto LBB0_3
LBB0_3:                                 # %entry
        if r4 == 4 goto LBB0_7
LBB0_7:                                 # %sw.bb5
        r1 += r3
        r2 = *(u32 *)(r1 + 0)
LBB0_9:                                 # %sw.epilog
        r1 = 51   &lt;=== relocation
        r2 &lt;&lt;= r1
        r1 = 60   &lt;=== relocation
        r0 = r2
        r0 &gt;&gt;= r1
        r3 = 1
        if r3 == 0 goto LBB0_11
        r2 s&gt;&gt;= r1
        r0 = r2
LBB0_11:                                # %sw.epilog
        exit

For native load case, the load size is calculated to be the
same as the size of load width LLVM otherwise used to load
the value which is then used to extract the bitfield value.

Differential Revision: https://reviews.llvm.org/D67980

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@374099 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Codegen - silence static analyzer getAs&lt;&gt; null dereference warnings. NFCI.</title>
<updated>2019-10-07T16:42:25+00:00</updated>
<author>
<name>Simon Pilgrim</name>
<email>llvm-dev@redking.me.uk</email>
</author>
<published>2019-10-07T16:42:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=7fc84cdab92b37e220ddd495857b3ef4cebed5ea'/>
<id>7fc84cdab92b37e220ddd495857b3ef4cebed5ea</id>
<content type='text'>
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs&lt;&gt; directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373918 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs&lt;&gt; directly and if not assert will fire for us.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373918 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[Alignment][Clang][NFC] Add CharUnits::getAsAlign</title>
<updated>2019-10-03T13:00:29+00:00</updated>
<author>
<name>Guillaume Chatelet</name>
<email>gchatelet@google.com</email>
</author>
<published>2019-10-03T13:00:29+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=4eef7a8ad0695039c9eca1e5fe6c89a37ba8bdf2'/>
<id>4eef7a8ad0695039c9eca1e5fe6c89a37ba8bdf2</id>
<content type='text'>
Summary:
This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`.
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68274

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373592 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This is a prerequisite to removing `llvm::GlobalObject::setAlignment(unsigned)`.
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D68274

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373592 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)</title>
<updated>2019-09-30T13:34:44+00:00</updated>
<author>
<name>Guillaume Chatelet</name>
<email>gchatelet@google.com</email>
</author>
<published>2019-09-30T13:34:44+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=57596fe21ba4c792a89d92cebe54a4386bfbe82a'/>
<id>57596fe21ba4c792a89d92cebe54a4386bfbe82a</id>
<content type='text'>
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, arsenm, jvesely, nhaehnle, eraman, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D68141

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373207 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: jholewinski, arsenm, jvesely, nhaehnle, eraman, hiraditya, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D68141

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373207 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve code generation for thread_local variables:</title>
<updated>2019-09-12T20:00:24+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2019-09-12T20:00:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=2eb4788e8c154e12dce92b5dac3bc4d7b2da4662'/>
<id>2eb4788e8c154e12dce92b5dac3bc4d7b2da4662</id>
<content type='text'>
Summary:
 * Don't bother using a thread wrapper when the variable is known to
   have constant initialization.
 * Emit the thread wrapper as discardable-if-unused in TUs that don't
   contain a definition of the thread_local variable.
 * Don't emit the thread wrapper at all if the thread_local variable
   is unused and discardable; it will be emitted by all TUs that need
   it.

Reviewers: rjmccall, jdoerfert

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D67429

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371767 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
 * Don't bother using a thread wrapper when the variable is known to
   have constant initialization.
 * Emit the thread wrapper as discardable-if-unused in TUs that don't
   contain a definition of the thread_local variable.
 * Don't emit the thread wrapper at all if the thread_local variable
   is unused and discardable; it will be emitted by all TUs that need
   it.

Reviewers: rjmccall, jdoerfert

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D67429

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371767 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix for PR43175: compiler crash when trying to emit noncapturable</title>
<updated>2019-09-10T19:16:56+00:00</updated>
<author>
<name>Alexey Bataev</name>
<email>a.bataev@hotmail.com</email>
</author>
<published>2019-09-10T19:16:56+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=744ff96f70c6261a92dc496d34310f182e9c27d0'/>
<id>744ff96f70c6261a92dc496d34310f182e9c27d0</id>
<content type='text'>
constant.

If the constexpr variable is partially initialized, the initializer can
be emitted as the structure, not as an array, because of some early
optimizations. The llvm variable gets the type from this constant and,
thus, gets the type which is pointer to struct rather than pointer to an
array. We need to convert this type to be truely array, otherwise it may
lead to the compiler crash when trying to emit array subscript
expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371548 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
constant.

If the constexpr variable is partially initialized, the initializer can
be emitted as the structure, not as an array, because of some early
optimizations. The llvm variable gets the type from this constant and,
thus, gets the type which is pointer to struct rather than pointer to an
array. We need to convert this type to be truely array, otherwise it may
lead to the compiler crash when trying to emit array subscript
expression.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371548 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement codegen for MSVC unions with reference members.</title>
<updated>2019-08-27T12:42:45+00:00</updated>
<author>
<name>Aaron Ballman</name>
<email>aaron@aaronballman.com</email>
</author>
<published>2019-08-27T12:42:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/clang.git/commit/?id=61f045413ff9744bf1871cf9f02af17c1425115b'/>
<id>61f045413ff9744bf1871cf9f02af17c1425115b</id>
<content type='text'>
Currently, clang accepts a union with a reference member when given the -fms-extensions flag. This change fixes the codegen for this case.

Patch by Dominic Ferreira.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370052 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, clang accepts a union with a reference member when given the -fms-extensions flag. This change fixes the codegen for this case.

Patch by Dominic Ferreira.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370052 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
</feed>
