digitalmars.D.ldc - Profile Guide Optimization on LDC2 -emit-llvm
- Prasun Anand (14/14) Mar 26 2017 Hi,
- David Nadlinger via digitalmars-d-ldc (9/11) Mar 27 2017 -emit-llvm causes Clang to emit bitcode instead of object files, and
- Prasun Anand (7/20) Mar 27 2017 Thanks David,
- Nicholas Wilson (2/24) Mar 27 2017 `-output-bc` and `-output-ll`
- David Nadlinger via digitalmars-d-ldc (6/8) Apr 03 2017 No worries, I was just not sure what you were referring to. Actually, to...
- Prasun Anand (6/15) Apr 05 2017 Thanks Nicholas and David.
Hi, Recently, I wrote a software in D. I am using ldc2 1.1.0 (DMD v2.071.2, LLVM 3.7.1) for compiling. I am interested in PGO and profiled the project with [ldc-profdata](https://wiki.dlang.org/LDC_LLVM_profiling_instrumentation). However, I wanted to get a full-report of profiling-data. I find that ldc-profdata provides only two options i.e. show(not very helpful) and merge. clang is able to generate .bc files that creates report by adding an option -emit-llvm. How can I get a full-report of profiling data? Regards, Prasun
Mar 26 2017
Hi, On 27 Mar 2017, at 8:28, Prasun Anand via digitalmars-d-ldc wrote:clang is able to generate .bc files that creates report by adding an option -emit-llvm.-emit-llvm causes Clang to emit bitcode instead of object files, and LLVM IR instead of textual assembly. The LDC equivalents are -output-ll and -output-bc, respectively. I don't think I have used the report you mention myself, so I'm unsure how it relates to that – could you give an example or a link to the corresponding Clang documentation? — David
Mar 27 2017
On Monday, 27 March 2017 at 12:33:04 UTC, David Nadlinger wrote:Hi, On 27 Mar 2017, at 8:28, Prasun Anand via digitalmars-d-ldc wrote:Thanks David, I was looking for how to output bc files and LLVM IR. Sorry, I am new to LLVM naming conventions. So, I was referring to bitcode and LLVM IR as reports. Regards, Prasunclang is able to generate .bc files that creates report by adding an option -emit-llvm.-emit-llvm causes Clang to emit bitcode instead of object files, and LLVM IR instead of textual assembly. The LDC equivalents are -output-ll and -output-bc, respectively. I don't think I have used the report you mention myself, so I'm unsure how it relates to that – could you give an example or a link to the corresponding Clang documentation? — David
Mar 27 2017
On Monday, 27 March 2017 at 17:50:28 UTC, Prasun Anand wrote:On Monday, 27 March 2017 at 12:33:04 UTC, David Nadlinger wrote:`-output-bc` and `-output-ll`Hi, On 27 Mar 2017, at 8:28, Prasun Anand via digitalmars-d-ldc wrote:Thanks David, I was looking for how to output bc files and LLVM IR. Sorry, I am new to LLVM naming conventions. So, I was referring to bitcode and LLVM IR as reports. Regards, Prasun[...]-emit-llvm causes Clang to emit bitcode instead of object files, and LLVM IR instead of textual assembly. The LDC equivalents are -output-ll and -output-bc, respectively. I don't think I have used the report you mention myself, so I'm unsure how it relates to that – could you give an example or a link to the corresponding Clang documentation? — David
Mar 27 2017
Hi Prasun, On 27 Mar 2017, at 19:50, Prasun Anand via digitalmars-d-ldc wrote:Sorry, I am new to LLVM naming conventions. So, I was referring to bitcode and LLVM IR as reports.No worries, I was just not sure what you were referring to. Actually, to be fully correct, bitcode is LLVM IR as well, and I should really be speaking about its textual vs. binary forms. — David
Apr 03 2017
On Monday, 3 April 2017 at 21:52:46 UTC, David Nadlinger wrote:Hi Prasun, On 27 Mar 2017, at 19:50, Prasun Anand via digitalmars-d-ldc wrote:Thanks Nicholas and David. I have been using gperftools and LLVM IR to understand how PGO works and for optimizing my project :) . Regards, PrasunSorry, I am new to LLVM naming conventions. So, I was referring to bitcode and LLVM IR as reports.No worries, I was just not sure what you were referring to. Actually, to be fully correct, bitcode is LLVM IR as well, and I should really be speaking about its textual vs. binary forms. — David
Apr 05 2017