<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/CodeGen/link-bitcode-file.c, branch users/nico/python-2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[Clang] Allow bitcode linking when the input is LLVM-IR</title>
<updated>2023-06-20T13:02:58+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>jhuber6@vols.utk.edu</email>
</author>
<published>2023-06-07T18:11:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8784b6a8540f4a333690e7233587859f1d82f620'/>
<id>8784b6a8540f4a333690e7233587859f1d82f620</id>
<content type='text'>
Clang provides the `-mlink-bitcode-file` and `-mlink-builtin-bitcode`
options to insert LLVM-IR into the current TU. These are usefuly
primarily for including LLVM-IR files that require special handling to
be correct and cannot be linked normally, such as GPU vendor libraries
like `libdevice.10.bc`. Currently these options can only be used if the
source input goes through the AST consumer path. This patch makes the
changes necessary to also support this when the input is LLVM-IR. This
will allow the following operation:

```
clang in.bc -Xclang -mlink-builtin-bitcode -Xclang libdevice.10.bc
```

Reviewed By: yaxunl

Differential Revision: https://reviews.llvm.org/D152391
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clang provides the `-mlink-bitcode-file` and `-mlink-builtin-bitcode`
options to insert LLVM-IR into the current TU. These are usefuly
primarily for including LLVM-IR files that require special handling to
be correct and cannot be linked normally, such as GPU vendor libraries
like `libdevice.10.bc`. Currently these options can only be used if the
source input goes through the AST consumer path. This patch makes the
changes necessary to also support this when the input is LLVM-IR. This
will allow the following operation:

```
clang in.bc -Xclang -mlink-builtin-bitcode -Xclang libdevice.10.bc
```

Reviewed By: yaxunl

Differential Revision: https://reviews.llvm.org/D152391
</pre>
</div>
</content>
</entry>
<entry>
<title>[test] Add {{.*}} to make ELF tests immune to dso_local/dso_preemptable/(none) differences</title>
<updated>2020-12-31T08:27:11+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2020-12-31T08:27:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fd739804e0591468762eb87488a497a3f7d4afb0'/>
<id>fd739804e0591468762eb87488a497a3f7d4afb0</id>
<content type='text'>
For a default visibility external linkage definition, dso_local is set for ELF
-fno-pic/-fpie and COFF and Mach-O. Since default clang -cc1 for ELF is similar
to -fpic ("PIC Level" is not set), this nuance causes unneeded binary format differences.

To make emitted IR similar, ELF -cc1 -fpic will default to -fno-semantic-interposition,
which sets dso_local for default visibility external linkage definitions.

To make this flip smooth and enable future (dso_local as definition default),
this patch replaces (function) `define ` with `define{{.*}} `,
(variable/constant/alias) `= ` with `={{.*}} `, or inserts appropriate `{{.*}} `.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For a default visibility external linkage definition, dso_local is set for ELF
-fno-pic/-fpie and COFF and Mach-O. Since default clang -cc1 for ELF is similar
to -fpic ("PIC Level" is not set), this nuance causes unneeded binary format differences.

To make emitted IR similar, ELF -cc1 -fpic will default to -fno-semantic-interposition,
which sets dso_local for default visibility external linkage definitions.

To make this flip smooth and enable future (dso_local as definition default),
this patch replaces (function) `define ` with `define{{.*}} `,
(variable/constant/alias) `= ` with `={{.*}} `, or inserts appropriate `{{.*}} `.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition"</title>
<updated>2020-02-03T18:09:39+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-02-03T18:09:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dbc96b518b619d37aacf670e1a9d3b90b5614dd2'/>
<id>dbc96b518b619d37aacf670e1a9d3b90b5614dd2</id>
<content type='text'>
This reverts commit 789a46f2d742e11edaade28cb59a0f4d2a1d770e.

Accidentally committed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 789a46f2d742e11edaade28cb59a0f4d2a1d770e.

Accidentally committed.
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition</title>
<updated>2020-02-03T17:52:48+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>maskray@google.com</email>
</author>
<published>2020-02-02T20:23:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=789a46f2d742e11edaade28cb59a0f4d2a1d770e'/>
<id>789a46f2d742e11edaade28cb59a0f4d2a1d770e</id>
<content type='text'>
Summary:
Clang -fpic defaults to -fno-semantic-interposition (GCC -fpic defaults
to -fsemantic-interposition).
Users need to specify -fsemantic-interposition to get semantic
interposition behavior.

Semantic interposition is currently a best-effort feature. There may
still be some cases where it is not handled well.

Reviewers: peter.smith, rnk, serge-sans-paille, sfertile, jfb, jdoerfert

Subscribers: dschuff, jyknight, dylanmckay, nemanjai, jvesely, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, arphaman, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73865
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Clang -fpic defaults to -fno-semantic-interposition (GCC -fpic defaults
to -fsemantic-interposition).
Users need to specify -fsemantic-interposition to get semantic
interposition behavior.

Semantic interposition is currently a best-effort feature. There may
still be some cases where it is not handled well.

Reviewers: peter.smith, rnk, serge-sans-paille, sfertile, jfb, jdoerfert

Subscribers: dschuff, jyknight, dylanmckay, nemanjai, jvesely, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, arphaman, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73865
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Update test after recent changes in llvm (r293846).</title>
<updated>2017-02-02T00:47:53+00:00</updated>
<author>
<name>Davide Italiano</name>
<email>davide@freebsd.org</email>
</author>
<published>2017-02-02T00:47:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8236b73deee2294e154c9e2e6507748c07909e63'/>
<id>8236b73deee2294e154c9e2e6507748c07909e63</id>
<content type='text'>
llvm-svn: 293848
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 293848
</pre>
</div>
</content>
</entry>
<entry>
<title>[CodeGen] Update test after recent changes in llvm (r293799).</title>
<updated>2017-02-01T20:43:28+00:00</updated>
<author>
<name>Davide Italiano</name>
<email>davide@freebsd.org</email>
</author>
<published>2017-02-01T20:43:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04496077383e486f7cf84e1c739fbfdb7a94d7bc'/>
<id>04496077383e486f7cf84e1c739fbfdb7a94d7bc</id>
<content type='text'>
llvm-svn: 293810
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 293810
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow linking multiple bitcode files.</title>
<updated>2015-10-27T17:56:59+00:00</updated>
<author>
<name>Artem Belevich</name>
<email>tra@google.com</email>
</author>
<published>2015-10-27T17:56:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5d40ae3a46a43eb0dd16dec801af5517d2ea9e96'/>
<id>5d40ae3a46a43eb0dd16dec801af5517d2ea9e96</id>
<content type='text'>
Linking options for particular file depend on the option that specifies the file.
Currently there are two:

* -mlink-bitcode-file links in complete content of the specified file.
* -mlink-cuda-bitcode links in only the symbols needed by current TU.
   Linked symbols are internalized. This bitcode linking mode is used to
   link device-specific bitcode provided by CUDA.

Files are linked in order they are specified on command line.

-mlink-cuda-bitcode replaces -fcuda-uses-libdevice flag.

Differential Revision: http://reviews.llvm.org/D13913

llvm-svn: 251427
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Linking options for particular file depend on the option that specifies the file.
Currently there are two:

* -mlink-bitcode-file links in complete content of the specified file.
* -mlink-cuda-bitcode links in only the symbols needed by current TU.
   Linked symbols are internalized. This bitcode linking mode is used to
   link device-specific bitcode provided by CUDA.

Files are linked in order they are specified on command line.

-mlink-cuda-bitcode replaces -fcuda-uses-libdevice flag.

Differential Revision: http://reviews.llvm.org/D13913

llvm-svn: 251427
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed double-free in case of module loading error.</title>
<updated>2015-05-12T17:44:15+00:00</updated>
<author>
<name>Artem Belevich</name>
<email>tra@google.com</email>
</author>
<published>2015-05-12T17:44:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed0577cc6d3a15b4951111e5565a2964b85ab8f4'/>
<id>ed0577cc6d3a15b4951111e5565a2964b85ab8f4</id>
<content type='text'>
GetOutputStream() owns the stream it returns pointer to and the
pointer should never be freed by us. When we fail to load and exit
early, unique_ptr still holds the pointer and frees it which leads to
compiler crash when CompilerInstance attempts to free it again.

Added regression test for failed bitcode linking.

Differential Revision: http://reviews.llvm.org/D9625

llvm-svn: 237159
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GetOutputStream() owns the stream it returns pointer to and the
pointer should never be freed by us. When we fail to load and exit
early, unique_ptr still holds the pointer and frees it which leads to
compiler crash when CompilerInstance attempts to free it again.

Added regression test for failed bitcode linking.

Differential Revision: http://reviews.llvm.org/D9625

llvm-svn: 237159
</pre>
</div>
</content>
</entry>
<entry>
<title>Make this test a bit stricter by checking clang's output too.</title>
<updated>2014-10-25T01:51:19+00:00</updated>
<author>
<name>Rafael Espindola</name>
<email>rafael.espindola@gmail.com</email>
</author>
<published>2014-10-25T01:51:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5a1106f8fc52ef57a5910708ce0227ae9cdc3e5c'/>
<id>5a1106f8fc52ef57a5910708ce0227ae9cdc3e5c</id>
<content type='text'>
llvm-svn: 220604
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 220604
</pre>
</div>
</content>
</entry>
<entry>
<title>CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.</title>
<updated>2013-08-15T06:47:53+00:00</updated>
<author>
<name>Stephen Lin</name>
<email>stephenwlin@gmail.com</email>
</author>
<published>2013-08-15T06:47:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4362261b0093730e46ffcad910e8b465cf0bb1cb'/>
<id>4362261b0093730e46ffcad910e8b465cf0bb1cb</id>
<content type='text'>
llvm-svn: 188447
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
llvm-svn: 188447
</pre>
</div>
</content>
</entry>
</feed>
