#
e54811ff |
| 08-Feb-2021 |
Marco Antognini <marco.antognini@arm.com> |
Restore diagnostic handler after CodeGenAction::ExecuteAction
Fix dangling pointer to local variable and address some typos.
Reviewed By: xur
Differential Revision: https://reviews.llvm.org/D96487
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1 |
|
#
69132d12 |
| 24-Dec-2020 |
Alexandre Ganea <alexandre.ganea@ubisoft.com> |
[Clang] Reverse test to save on indentation. NFC.
|
Revision tags: llvmorg-11.0.1, llvmorg-11.0.1-rc2 |
|
#
1821265d |
| 02-Dec-2020 |
Yuanfang Chen <yuanfang.chen@sony.com> |
[Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation
Currently, -ftime-report + new pass manager emits one line of report for each pass run. This pot
[Time-report] Add a flag -ftime-report={per-pass,per-pass-run} to control the pass timing aggregation
Currently, -ftime-report + new pass manager emits one line of report for each pass run. This potentially causes huge output text especially with regular LTO or large single file (Obeserved in private tests and was reported in D51276). The behaviour of -ftime-report + legacy pass manager is emitting one line of report for each pass object which has relatively reasonable text output size. This patch adds a flag `-ftime-report=` to control time report aggregation for new pass manager.
The flag is for new pass manager only. Using it with legacy pass manager gives an error. It is a driver and cc1 flag. `per-pass` is the new default so `-ftime-report` is aliased to `-ftime-report=per-pass`. Before this patch, functionality-wise `-ftime-report` is aliased to `-ftime-report=per-pass-run`.
* Adds an boolean variable TimePassesHandler::PerRun to control per-pass vs per-pass-run. * Adds a new clang CodeGen flag CodeGenOptions::TimePassesPerRun to work with the existing CodeGenOptions::TimePasses. * Remove FrontendOptions::ShowTimers, its uses are replaced by the existing CodeGenOptions::TimePasses. * Remove FrontendTimesIsEnabled (It was introduced in D45619 which was largely reverted.)
Differential Revision: https://reviews.llvm.org/D92436
show more ...
|
Revision tags: llvmorg-11.0.1-rc1 |
|
#
6861d938 |
| 14-Nov-2020 |
Roman Lebedev <lebedev.ri@gmail.com> |
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
See discussion in https://bugs.llvm.org/show_bug.cgi?id=45073 / https://reviews.llvm.org/D66324#2334485 the imp
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
See discussion in https://bugs.llvm.org/show_bug.cgi?id=45073 / https://reviews.llvm.org/D66324#2334485 the implementation is known-broken for certain inputs, the bugreport was up for a significant amount of timer, and there has been no activity to address it. Therefore, just completely rip out all of misexpect handling.
I suspect, fixing it requires redesigning the internals of MD_misexpect. Should anyone commit to fixing the implementation problem, starting from clean slate may be better anyways.
This reverts commit 7bdad08429411e7d0ecd58cd696b1efe3cff309e, and some of it's follow-ups, that don't stand on their own.
show more ...
|
#
dde4e031 |
| 14-Oct-2020 |
Duncan P. N. Exon Smith <dexonsmith@apple.com> |
clang/CodeGen: Stop using SourceManager::getBuffer, NFC
Update `clang/lib/CodeGen` to use a `MemoryBufferRef` from `getBufferOrNone` instead of `MemoryBuffer*` from `getBuffer`. No functionality cha
clang/CodeGen: Stop using SourceManager::getBuffer, NFC
Update `clang/lib/CodeGen` to use a `MemoryBufferRef` from `getBufferOrNone` instead of `MemoryBuffer*` from `getBuffer`. No functionality change here.
Differential Revision: https://reviews.llvm.org/D89411
show more ...
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3 |
|
#
cf112382 |
| 16-Sep-2020 |
Mircea Trofin <mtrofin@google.com> |
[ThinLTO] Option to bypass function importing.
This completes the circle, complementing -lto-embed-bitcode (specifically, post-merge-pre-opt). Using -thinlto-assume-merged skips function importing.
[ThinLTO] Option to bypass function importing.
This completes the circle, complementing -lto-embed-bitcode (specifically, post-merge-pre-opt). Using -thinlto-assume-merged skips function importing. The index file is still needed for the other data it contains.
Differential Revision: https://reviews.llvm.org/D87949
show more ...
|
#
4d4f0922 |
| 16-Sep-2020 |
Michael Liao <michael.hliao@gmail.com> |
[clang][codegen] Skip adding default function attributes on intrinsics.
- After loading builtin bitcode for linking, skip adding default function attributes on LLVM intrinsics as their attributes
[clang][codegen] Skip adding default function attributes on intrinsics.
- After loading builtin bitcode for linking, skip adding default function attributes on LLVM intrinsics as their attributes are well-defined and retrieved directly from internal definitions. Adding extra attributes on intrinsics results in inconsistent result when `-save-temps` is present. Also, that makes few optimizations conservative.
Differential Revision: https://reviews.llvm.org/D87761
show more ...
|
Revision tags: llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1 |
|
#
b46176bb |
| 23-Jul-2020 |
Zequan Wu <zequanwu@google.com> |
Reland [Coverage] Add comment to skipped regions
Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757. Add comment to skipped regions so we don't track execution count for lines containing o
Reland [Coverage] Add comment to skipped regions
Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757. Add comment to skipped regions so we don't track execution count for lines containing only comments.
Differential Revision: https://reviews.llvm.org/D83592
show more ...
|
#
238bbd48 |
| 22-Jul-2020 |
Hans Wennborg <hans@chromium.org> |
Revert abd45154b "[Coverage] Add comment to skipped regions"
This casued assertions during Chromium builds. See comment on the code review
> Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=4
Revert abd45154b "[Coverage] Add comment to skipped regions"
This casued assertions during Chromium builds. See comment on the code review
> Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757. > Add comment to skipped regions so we don't track execution count for lines containing only comments. > > Differential Revision: https://reviews.llvm.org/D84208
This reverts commit abd45154bdb6b76c5b480455eacc8c75b08242aa and the follow-up 87d725473380652bbe845fd2fbd9c0507a55172f.
show more ...
|
#
abd45154 |
| 20-Jul-2020 |
Zequan Wu <zequanwu@google.com> |
[Coverage] Add comment to skipped regions
Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757. Add comment to skipped regions so we don't track execution count for lines containing only com
[Coverage] Add comment to skipped regions
Bug filled here: https://bugs.llvm.org/show_bug.cgi?id=45757. Add comment to skipped regions so we don't track execution count for lines containing only comments.
Differential Revision: https://reviews.llvm.org/D84208
show more ...
|
Revision tags: llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1 |
|
#
32870a84 |
| 16-May-2020 |
John McCall <rjmccall@apple.com> |
Expose IRGen API to add the default IR attributes to a function definition.
I've also made a stab at imposing some more order on where and how we add attributes; this part should be NFC. I wasn't s
Expose IRGen API to add the default IR attributes to a function definition.
I've also made a stab at imposing some more order on where and how we add attributes; this part should be NFC. I wasn't sure whether the CUDA use case for libdevice should propagate CPU/features attributes, so there's a bit of unnecessary duplication.
show more ...
|
#
5c03beef |
| 22-Apr-2020 |
Matt Arsenault <Matthew.Arsenault@amd.com> |
clang: Allow backend unsupported warnings
Currently this asserts on anything other than errors. In one workaround scenario, AMDGPU emits DiagnosticInfoUnsupported as a warning for functions that can
clang: Allow backend unsupported warnings
Currently this asserts on anything other than errors. In one workaround scenario, AMDGPU emits DiagnosticInfoUnsupported as a warning for functions that can't be correctly codegened, but should never be executed.
show more ...
|
Revision tags: llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3 |
|
#
11857d49 |
| 25-Feb-2020 |
Rong Xu <xur@google.com> |
[remark][diagnostics] [codegen] Fix PR44896
This patch fixes PR44896. For IR input files, option fdiscard-value-names should be ignored as we need named values in loadModule(). Commit 60d3947922 set
[remark][diagnostics] [codegen] Fix PR44896
This patch fixes PR44896. For IR input files, option fdiscard-value-names should be ignored as we need named values in loadModule(). Commit 60d3947922 sets this option after loadModule() where valued names already created. This creates an inconsistent state in setNameImpl() that leads to a seg fault. This patch forces fdiscard-value-names to be false for IR input files.
This patch also emits a warning of "ignoring -fdiscard-value-names" if option fdiscard-value-names is explictly enabled in the commandline for IR input files.
Differential Revision: https://reviews.llvm.org/D74878
show more ...
|
Revision tags: llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1 |
|
#
7531a503 |
| 28-Oct-2019 |
Francis Visoiu Mistrih <francisvm@yahoo.com> |
[Remarks] Extend the RemarkStreamer to support other emitters
This extends the RemarkStreamer to allow for other emitters (e.g. frontends, SIL, etc.) to emit remarks through a common interface.
See
[Remarks] Extend the RemarkStreamer to support other emitters
This extends the RemarkStreamer to allow for other emitters (e.g. frontends, SIL, etc.) to emit remarks through a common interface.
See changes in llvm/docs/Remarks.rst for motivation and design choices.
Differential Revision: https://reviews.llvm.org/D73676
show more ...
|
#
adcd0268 |
| 28-Jan-2020 |
Benjamin Kramer <benny.kra@googlemail.com> |
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly m
Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with std::string_view. There should be no functional change here.
This is mostly mechanical from a custom clang-tidy check, with a lot of manual fixups. It uncovers a lot of minor inefficiencies.
This doesn't actually modify StringRef yet, I'll do that in a follow-up.
show more ...
|
#
60d39479 |
| 14-Jan-2020 |
Rong Xu <xur@google.com> |
[remark][diagnostics] Using clang diagnostic handler for IR input files
For IR input files, we currently use LLVM diagnostic handler even the compilation is from clang. As a result, we are not able
[remark][diagnostics] Using clang diagnostic handler for IR input files
For IR input files, we currently use LLVM diagnostic handler even the compilation is from clang. As a result, we are not able to use -Rpass to get the transformation reports. Some warnings are not handled properly either: We found many mysterious warnings in our ThinLTO backend compilations in SamplePGO and CSPGO. An example of the warning: "warning: net/proto2/public/metadata_lite.h:51:21: 0.02% (1 / 4999)"
This turns out to be a warning by Wmisexpect, which is supposed to be filtered out by default. But since the filter is in clang's diagnostic hander, we emit these incomplete warnings from LLVM's diagnostic handler.
This patch uses clang diagnostic handler for IR input files. We create a fake backendconsumer just to install the diagnostic handler.
With this change, we will have proper handling of all the warnings and we can use -Rpass* options in IR input files compilation. Also note that with is patch, LLVM's diagnostic options, like "-mllvm -pass-remarks=*", are no longer be able to get optimization remarks.
Differential Revision: https://reviews.llvm.org/D72523
show more ...
|
#
e3d8ee35 |
| 22-Nov-2019 |
Yonghong Song <yhs@fb.com> |
reland "[DebugInfo] Support to emit debugInfo for extern variables"
Commit d77ae1552fc21a9f3877f3ed7e13d631f517c825 ("[DebugInfo] Support to emit debugInfo for extern variables") added deebugInfo fo
reland "[DebugInfo] Support to emit debugInfo for extern variables"
Commit d77ae1552fc21a9f3877f3ed7e13d631f517c825 ("[DebugInfo] Support to emit debugInfo for extern variables") added deebugInfo for extern variables for BPF target. The commit is reverted by 891e25b02d760d0de18c7d46947913b3166047e7 as the committed tests using %clang instead of %clang_cc1 causing test failed in certain scenarios as reported by Reid Kleckner.
This patch fixed the tests by using %clang_cc1.
Differential Revision: https://reviews.llvm.org/D71818
show more ...
|
#
891e25b0 |
| 22-Dec-2019 |
Reid Kleckner <rnk@google.com> |
Revert "[DebugInfo] Support to emit debugInfo for extern variables"
This reverts commit d77ae1552fc21a9f3877f3ed7e13d631f517c825.
The tests committed along with this change do not pass, and should
Revert "[DebugInfo] Support to emit debugInfo for extern variables"
This reverts commit d77ae1552fc21a9f3877f3ed7e13d631f517c825.
The tests committed along with this change do not pass, and should be changed to use %clang_cc1.
show more ...
|
#
df494f75 |
| 11-Dec-2019 |
Russell Gallop <russell.gallop@sony.com> |
[Support] Add TimeTraceScope constructor without detail arg
This simplifies code where no extra details are required Also don't write out detail when it is empty.
Differential Revision: https://rev
[Support] Add TimeTraceScope constructor without detail arg
This simplifies code where no extra details are required Also don't write out detail when it is empty.
Differential Revision: https://reviews.llvm.org/D71347
show more ...
|
#
d77ae155 |
| 22-Nov-2019 |
Yonghong Song <yhs@fb.com> |
[DebugInfo] Support to emit debugInfo for extern variables
Extern variable usage in BPF is different from traditional pure user space application. Recent discussion in linux bpf mailing list has two
[DebugInfo] Support to emit debugInfo for extern variables
Extern variable usage in BPF is different from traditional pure user space application. Recent discussion in linux bpf mailing list has two use cases where debug info types are required to use extern variables: - extern types are required to have a suitable interface in libbpf (bpf loader) to provide kernel config parameters to bpf programs. https://lore.kernel.org/bpf/CAEf4BzYCNo5GeVGMhp3fhysQ=_axAf=23PtwaZs-yAyafmXC9g@mail.gmail.com/T/#t - extern types are required so kernel bpf verifier can verify program which uses external functions more precisely. This will make later link with actual external function no need to reverify. https://lore.kernel.org/bpf/87eez4odqp.fsf@toke.dk/T/#m8d5c3e87ffe7f2764e02d722cb0d8cbc136880ed
This patch added clang support to emit debuginfo for extern variables with a TargetInfo hook to enable it. The debuginfo for the extern variable is emitted only if that extern variable is referenced in the current compilation unit.
Currently, only BPF target enables to generate debug info for extern variables. The emission of such debuginfo is disabled for C++ at this moment since BPF only supports a subset of C language. Emission with C++ can be enabled later if an appropriate use case is identified.
-fstandalone-debug permits us to see more debuginfo with the cost of bloated binary size. This patch did not add emission of extern variable debug info with -fstandalone-debug. This can be re-evaluated if there is a real need.
Differential Revision: https://reviews.llvm.org/D70696
show more ...
|
#
a3b25525 |
| 05-Dec-2019 |
Zahira Ammarguellat <zahira.ammarguellat@intel.com> |
Fix for PR44000. Optimization record for bytecode input missing. Review is here: https://reviews.llvm.org/D70691
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5 |
|
#
7bdad084 |
| 11-Sep-2019 |
Petr Hosek <phosek@chromium.org> |
Reland "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
This patch contains the basic functionality for reporting potentially incorrect usage of __builtin_expect() by
Reland "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
This patch contains the basic functionality for reporting potentially incorrect usage of __builtin_expect() by comparing the developer's annotation against a collected PGO profile. A more detailed proposal and discussion appears on the CFE-dev mailing list (http://lists.llvm.org/pipermail/cfe-dev/2019-July/062971.html) and a prototype of the initial frontend changes appear here in D65300
We revised the work in D65300 by moving the misexpect check into the LLVM backend, and adding support for IR and sampling based profiles, in addition to frontend instrumentation.
We add new misexpect metadata tags to those instructions directly influenced by the llvm.expect intrinsic (branch, switch, and select) when lowering the intrinsics. The misexpect metadata contains information about the expected target of the intrinsic so that we can check against the correct PGO counter when emitting diagnostics, and the compiler's values for the LikelyBranchWeight and UnlikelyBranchWeight. We use these branch weight values to determine when to emit the diagnostic to the user.
A future patch should address the comment at the top of LowerExpectIntrisic.cpp to hoist the LikelyBranchWeight and UnlikelyBranchWeight values into a shared space that can be accessed outside of the LowerExpectIntrinsic pass. Once that is done, the misexpect metadata can be updated to be smaller.
In the long term, it is possible to reconstruct portions of the misexpect metadata from the existing profile data. However, we have avoided this to keep the code simple, and because some kind of metadata tag will be required to identify which branch/switch/select instructions are influenced by the use of llvm.expect
Patch By: paulkirth Differential Revision: https://reviews.llvm.org/D66324
llvm-svn: 371635
show more ...
|
#
57256af3 |
| 11-Sep-2019 |
Dmitri Gribenko <gribozavr@gmail.com> |
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
This reverts commit r371584. It introduced a dependency from compiler-rt to llvm/include/ADT, which is problema
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
This reverts commit r371584. It introduced a dependency from compiler-rt to llvm/include/ADT, which is problematic for multiple reasons.
One is that it is a novel dependency edge, which needs cross-compliation machinery for llvm/include/ADT (yes, it is true that right now compiler-rt included only header-only libraries, however, if we allow compiler-rt to depend on anything from ADT, other libraries will eventually get used).
Secondly, depending on ADT from compiler-rt exposes ADT symbols from compiler-rt, which would cause ODR violations when Clang is built with the profile library.
llvm-svn: 371598
show more ...
|
#
394a8ed8 |
| 11-Sep-2019 |
Petr Hosek <phosek@chromium.org> |
clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM
This patch contains the basic functionality for reporting potentially incorrect usage of __builtin_expect() by comparing
clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM
This patch contains the basic functionality for reporting potentially incorrect usage of __builtin_expect() by comparing the developer's annotation against a collected PGO profile. A more detailed proposal and discussion appears on the CFE-dev mailing list (http://lists.llvm.org/pipermail/cfe-dev/2019-July/062971.html) and a prototype of the initial frontend changes appear here in D65300
We revised the work in D65300 by moving the misexpect check into the LLVM backend, and adding support for IR and sampling based profiles, in addition to frontend instrumentation.
We add new misexpect metadata tags to those instructions directly influenced by the llvm.expect intrinsic (branch, switch, and select) when lowering the intrinsics. The misexpect metadata contains information about the expected target of the intrinsic so that we can check against the correct PGO counter when emitting diagnostics, and the compiler's values for the LikelyBranchWeight and UnlikelyBranchWeight. We use these branch weight values to determine when to emit the diagnostic to the user.
A future patch should address the comment at the top of LowerExpectIntrisic.cpp to hoist the LikelyBranchWeight and UnlikelyBranchWeight values into a shared space that can be accessed outside of the LowerExpectIntrinsic pass. Once that is done, the misexpect metadata can be updated to be smaller.
In the long term, it is possible to reconstruct portions of the misexpect metadata from the existing profile data. However, we have avoided this to keep the code simple, and because some kind of metadata tag will be required to identify which branch/switch/select instructions are influenced by the use of llvm.expect
Patch By: paulkirth Differential Revision: https://reviews.llvm.org/D66324
llvm-svn: 371584
show more ...
|
Revision tags: llvmorg-9.0.0-rc4 |
|
#
7d1757ab |
| 10-Sep-2019 |
Petr Hosek <phosek@chromium.org> |
Revert "clang-misexpect: Profile Guided Validation of Performance Annotations in LLVM"
This reverts commit r371484: this broke sanitizer-x86_64-linux-fast bot.
llvm-svn: 371488
|