#
5bf1ead3 |
| 27-Jun-2018 |
Michael J. Spencer <bigcheesegs@gmail.com> |
Add support for generating a call graph profile from Branch Frequency Info.
=== Generating the CG Profile ===
The CGProfile module pass simply gets the block profile count for each BB and scans for
Add support for generating a call graph profile from Branch Frequency Info.
=== Generating the CG Profile ===
The CGProfile module pass simply gets the block profile count for each BB and scans for call instructions. For each call instruction it adds an edge from the current function to the called function with the current BB block profile count as the weight.
After scanning all the functions, it generates an appending module flag containing the data. The format looks like: ``` !llvm.module.flags = !{!0}
!0 = !{i32 5, !"CG Profile", !1} !1 = !{!2, !3, !4} ; List of edges !2 = !{void ()* @a, void ()* @b, i64 32} ; Edge from a to b with a weight of 32 !3 = !{void (i1)* @freq, void ()* @a, i64 11} !4 = !{void (i1)* @freq, void ()* @b, i64 20} ```
Differential Revision: https://reviews.llvm.org/D48105
llvm-svn: 335794
show more ...
|
#
aa5f4d2e |
| 22-Jun-2018 |
Chandler Carruth <chandlerc@gmail.com> |
Revert r335306 (and r335314) - the Call Graph Profile pass.
This is the first pass in the main pipeline to use the legacy PM's ability to run function analyses "on demand". Unfortunately, it turns o
Revert r335306 (and r335314) - the Call Graph Profile pass.
This is the first pass in the main pipeline to use the legacy PM's ability to run function analyses "on demand". Unfortunately, it turns out there are bugs in that somewhat-hacky approach. At the very least, it leaks memory and doesn't support -debug-pass=Structure. Unclear if there are larger issues or not, but this should get the sanitizer bots back to green by fixing the memory leaks.
llvm-svn: 335320
show more ...
|
#
fc93dd8e |
| 21-Jun-2018 |
Michael J. Spencer <bigcheesegs@gmail.com> |
[Instrumentation] Add Call Graph Profile pass
This patch adds support for generating a call graph profile from Branch Frequency Info.
The CGProfile module pass simply gets the block profile count f
[Instrumentation] Add Call Graph Profile pass
This patch adds support for generating a call graph profile from Branch Frequency Info.
The CGProfile module pass simply gets the block profile count for each BB and scans for call instructions. For each call instruction it adds an edge from the current function to the called function with the current BB block profile count as the weight.
After scanning all the functions, it generates an appending module flag containing the data. The format looks like:
!llvm.module.flags = !{!0}
!0 = !{i32 5, !"CG Profile", !1} !1 = !{!2, !3, !4} ; List of edges !2 = !{void ()* @a, void ()* @b, i64 32} ; Edge from a to b with a weight of 32 !3 = !{void (i1)* @freq, void ()* @a, i64 11} !4 = !{void (i1)* @freq, void ()* @b, i64 20}
Differential Revision: https://reviews.llvm.org/D48105
llvm-svn: 335306
show more ...
|
#
2ef48669 |
| 21-Jun-2018 |
Reid Kleckner <rnk@google.com> |
[X86] Fix 32-bit mingw comdat names, only add one underscore
llvm-svn: 335304
|
#
13c9ee68 |
| 21-Jun-2018 |
Reid Kleckner <rnk@google.com> |
[mingw] Fix GCC ABI compatibility for comdat things
Summary: GCC and the binutils COFF linker do comdats differently from MSVC. If we want to be ABI compatible, we have to do what they do, which is
[mingw] Fix GCC ABI compatibility for comdat things
Summary: GCC and the binutils COFF linker do comdats differently from MSVC. If we want to be ABI compatible, we have to do what they do, which is to emit unique section names like ".text$_Z3foov" instead of short section names like ".text". Otherwise, the binutils linker gets confused and reports multiple definition errors when two object files from GCC and Clang containing the same inline function are linked together.
The best description of the issue is probably at https://github.com/Alexpux/MINGW-packages/issues/1677, we don't seem to have a good one in our tracker.
I fixed up the .pdata and .xdata sections needed everywhere other than 32-bit x86. GCC doesn't use associative comdats for those, it appears to rely on the section name.
Reviewers: smeenai, compnerd, mstorsjo, martell, mati865
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D48402
llvm-svn: 335286
show more ...
|
#
76cfef46 |
| 21-Jun-2018 |
Eric Christopher <echristo@gmail.com> |
Add some explanatory text to the associated symbol support.
llvm-svn: 335207
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3 |
|
#
277f898a |
| 14-Jun-2018 |
Sam Clegg <sbc@chromium.org> |
[WebAssembly] Ignore explicit section names for functions
WebAssembly doesn't support more than one function per section and we rely on function sections being unique. This change ignores the sectio
[WebAssembly] Ignore explicit section names for functions
WebAssembly doesn't support more than one function per section and we rely on function sections being unique. This change ignores the section provided by the function to avoid two functions being in the same section.
Without this change the object writer produces the following error for this test: LLVM ERROR: section already has a defining function: baz
Differential Revision: https://reviews.llvm.org/D48178
llvm-svn: 334752
show more ...
|
#
98117a47 |
| 12-Jun-2018 |
Reid Kleckner <rnk@google.com> |
[MS][ARM64] Hoist __ImageBase handling into TargetLoweringObjectFileCOFF
All COFF targets should use @IMGREL32 relocations for symbol differences against __ImageBase. Do the same for getSectionForCo
[MS][ARM64] Hoist __ImageBase handling into TargetLoweringObjectFileCOFF
All COFF targets should use @IMGREL32 relocations for symbol differences against __ImageBase. Do the same for getSectionForConstant, so that immediates lowered to globals get merged across TUs.
Patch by Chris January
Differential Revision: https://reviews.llvm.org/D47783
llvm-svn: 334523
show more ...
|
Revision tags: llvmorg-6.0.1-rc2 |
|
#
f31e91e4 |
| 18-May-2018 |
Eric Christopher <echristo@gmail.com> |
Tidy comment up a bit.
llvm-svn: 332687
|
#
1f5eb86b |
| 16-May-2018 |
Eric Christopher <echristo@gmail.com> |
Fix small grammar-o.
llvm-svn: 332522
|
#
aadbabc0 |
| 20-Apr-2018 |
Eric Christopher <echristo@gmail.com> |
Remove unused argument from emitModuleMetadata.
NFCI.
llvm-svn: 330470
|
Revision tags: llvmorg-6.0.1-rc1 |
|
#
d0804aa6 |
| 10-Apr-2018 |
Steven Wu <stevenwu@apple.com> |
[MachO] Emit Weak ReadOnlyWithRel to ConstDataSection
Summary: Darwin dynamic linker can handle weak symbols in ConstDataSection. ReadonReadOnlyWithRel symbols should be emitted in ConstDataSection
[MachO] Emit Weak ReadOnlyWithRel to ConstDataSection
Summary: Darwin dynamic linker can handle weak symbols in ConstDataSection. ReadonReadOnlyWithRel symbols should be emitted in ConstDataSection instead of normal DataSection.
rdar://problem/39298457
Reviewers: dexonsmith, kledzik
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45472
llvm-svn: 329752
show more ...
|
Revision tags: llvmorg-5.0.2, llvmorg-5.0.2-rc2, llvmorg-5.0.2-rc1, llvmorg-6.0.0, llvmorg-6.0.0-rc3, llvmorg-6.0.0-rc2 |
|
#
b36fbbc3 |
| 30-Jan-2018 |
Saleem Abdulrasool <compnerd@compnerd.org> |
CodeGen: support an extension to pass linker options on ELF
Introduce an extension to support passing linker options to the linker. These would be ignored by older linkers, but newer linkers which s
CodeGen: support an extension to pass linker options on ELF
Introduce an extension to support passing linker options to the linker. These would be ignored by older linkers, but newer linkers which support this feature would be able to process the linker.
Emit a special discarded section `.linker-option`. The content of this section is a pair of strings (key, value). The key is a type identifier for the parameter. This allows for an argument free parameter that will be processed by the linker with the value being the parameter. As an example, `lib` identifies a library to be linked against, traditionally the `-l` argument for Unix-based linkers with the parameter being the library name.
Thanks to James Henderson, Cary Coutant, Rafael Espinolda, Sean Silva for the valuable discussion on the design of this feature.
llvm-svn: 323783
show more ...
|
#
99f479ab |
| 20-Jan-2018 |
Saleem Abdulrasool <compnerd@compnerd.org> |
CodeGen: handle llvm.used properly for COFF
`llvm.used` contains a list of pointers to named values which the compiler, assembler, and linker are required to treat as if there is a reference that th
CodeGen: handle llvm.used properly for COFF
`llvm.used` contains a list of pointers to named values which the compiler, assembler, and linker are required to treat as if there is a reference that they cannot see. Ensure that the symbols are preserved by adding an explicit `-include` reference to the linker command.
llvm-svn: 323017
show more ...
|
Revision tags: llvmorg-6.0.0-rc1 |
|
#
ea7cacee |
| 09-Jan-2018 |
Sam Clegg <sbc@chromium.org> |
[WebAssembly] Add COMDAT support
This adds COMDAT support to the Wasm object-file format. Spec: https://github.com/WebAssembly/tool-conventions/pull/31
Corresponding LLD change: https://bugs.llvm.o
[WebAssembly] Add COMDAT support
This adds COMDAT support to the Wasm object-file format. Spec: https://github.com/WebAssembly/tool-conventions/pull/31
Corresponding LLD change: https://bugs.llvm.org/show_bug.cgi?id=35533, and D40845
Patch by Nicholas Wilson
Differential Revision: https://reviews.llvm.org/D40844
llvm-svn: 322135
show more ...
|
#
bafe6902 |
| 15-Dec-2017 |
Sam Clegg <sbc@chromium.org> |
[WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors
Summary: - lowers @llvm.global_dtors by adding @llvm.global_ctors functions which register the destructors with `__cxa_atexit`. -
[WebAssembly] Implement @llvm.global_ctors and @llvm.global_dtors
Summary: - lowers @llvm.global_dtors by adding @llvm.global_ctors functions which register the destructors with `__cxa_atexit`. - impements @llvm.global_ctors with wasm start functions and linker metadata
See [here](https://github.com/WebAssembly/tool-conventions/issues/25) for more background.
Subscribers: jfb, dschuff, mgorny, jgravelle-google, aheejin, sunfish
Differential Revision: https://reviews.llvm.org/D41211
llvm-svn: 320774
show more ...
|
#
e1694f9b |
| 07-Dec-2017 |
Sam Clegg <sbc@chromium.org> |
[WebAssembly] section kind can be code
Currently, when creating a named section, the Wasm frontend forces it to use `SectionKind::Data`, whereas in fact C++ does generate code sections with custom n
[WebAssembly] section kind can be code
Currently, when creating a named section, the Wasm frontend forces it to use `SectionKind::Data`, whereas in fact C++ does generate code sections with custom names.
Patch by Nicholas Wilson
Differential Revision: https://reviews.llvm.org/D40906
llvm-svn: 320002
show more ...
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3, llvmorg-5.0.1-rc2 |
|
#
04b68446 |
| 28-Nov-2017 |
Martin Storsjo <martin@martin.st> |
[COFF] Implement constructor priorities
The priorities in the section name suffixes are zero padded, allowing the linker to just do a lexical sort.
Add zero padding for .ctors sections in ELF as we
[COFF] Implement constructor priorities
The priorities in the section name suffixes are zero padded, allowing the linker to just do a lexical sort.
Add zero padding for .ctors sections in ELF as well.
Differential Revision: https://reviews.llvm.org/D40407
llvm-svn: 319150
show more ...
|
#
e7353446 |
| 15-Nov-2017 |
Fangrui Song <maskray@google.com> |
NFC Remove default argument of DataLayout::getPointerABIAlignment
Differential Revision: https://reviews.llvm.org/D40005
llvm-svn: 318272
|
#
99966076 |
| 14-Nov-2017 |
Sam Clegg <sbc@chromium.org> |
[WebAssembly] Explicily disable comdat support for wasm output
For now at least. We clearly need some kind of comdat or linkonce_odr support for wasm but currently COMDAT is not supported.
Disable
[WebAssembly] Explicily disable comdat support for wasm output
For now at least. We clearly need some kind of comdat or linkonce_odr support for wasm but currently COMDAT is not supported.
Disable COMDAT support in the same way we do the Mach-O. This also causes clang not to generated COMDATs.
Differential Revision: https://reviews.llvm.org/D39873
llvm-svn: 318123
show more ...
|
Revision tags: llvmorg-5.0.1-rc1 |
|
#
12fd3da9 |
| 20-Oct-2017 |
Sam Clegg <sbc@chromium.org> |
[WebAssembly] MC: Fix crash when -g specified.
At this point we don't output any debug sections or thier relocations.
Differential Revision: https://reviews.llvm.org/D39076
llvm-svn: 316240
|
#
b2b019f7 |
| 03-Oct-2017 |
Sam Clegg <sbc@chromium.org> |
[WebAssembly] MC: Support for init_array and fini_array
Differential Revision: https://reviews.llvm.org/D37757
llvm-svn: 314783
|
#
759631c7 |
| 15-Sep-2017 |
Sam Clegg <sbc@chromium.org> |
[WebAssembly] MC: Create wasm data segments based on MCSections
This means that we can honor -fdata-sections rather than always creating a segment for each symbol.
It also allows for a followup cha
[WebAssembly] MC: Create wasm data segments based on MCSections
This means that we can honor -fdata-sections rather than always creating a segment for each symbol.
It also allows for a followup change to add .init_array and friends.
Differential Revision: https://reviews.llvm.org/D37876
llvm-svn: 313395
show more ...
|
#
2176a9f2 |
| 12-Sep-2017 |
Sam Clegg <sbc@chromium.org> |
[WebAssembly] Remove flags from MCSectionWasm
Looks like these were copied from the ELF sections but don't apply to Wasm and were not used anywhere.
Also remove unused Wasm methods in MCContext.
D
[WebAssembly] Remove flags from MCSectionWasm
Looks like these were copied from the ELF sections but don't apply to Wasm and were not used anywhere.
Also remove unused Wasm methods in MCContext.
Differential Revision: https://reviews.llvm.org/D37633
llvm-svn: 313058
show more ...
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3, llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1, llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
#
89061b22 |
| 12-Jun-2017 |
Peter Collingbourne <peter@pcc.me.uk> |
IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata.
The new metadata is easier to manipulate than module flags.
Differential Revision: https://reviews.llvm.org/D
IR: Replace the "Linker Options" module flag with "llvm.linker.options" named metadata.
The new metadata is easier to manipulate than module flags.
Differential Revision: https://reviews.llvm.org/D31349
llvm-svn: 305227
show more ...
|