| #
6d4ea22e |
| 25-Sep-2019 |
Sanjay Patel <[email protected]> |
[IR] allow fast-math-flags on phi of FP values (2nd try)
The changes here are based on the corresponding diffs for allowing FMF on 'select': D61917 <https://reviews.llvm.org/D61917>
As discussed th
[IR] allow fast-math-flags on phi of FP values (2nd try)
The changes here are based on the corresponding diffs for allowing FMF on 'select': D61917 <https://reviews.llvm.org/D61917>
As discussed there, we want to have fast-math-flags be a property of an FP value because the alternative (having them on things like fcmp) leads to logical inconsistency such as: https://bugs.llvm.org/show_bug.cgi?id=38086
The earlier patch for select made almost no practical difference because most unoptimized conditional code begins life as a phi (based on what I see in clang). Similarly, I don't expect this patch to do much on its own either because SimplifyCFG promptly drops the flags when converting to select on a minimal example like: https://bugs.llvm.org/show_bug.cgi?id=39535
But once we have this plumbing in place, we should be able to wire up the FMF propagation and start solving cases like that.
The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a regression in a LoopVectorize test. We are intersecting the FMF of any FPMathOperator there, so if a phi is not properly annotated, new math instructions may not be either. Once we fix the propagation in SimplifyCFG, it may be safe to remove that hack.
Differential Revision: https://reviews.llvm.org/D67564
llvm-svn: 372878
show more ...
|
| #
2cec4b58 |
| 25-Sep-2019 |
Sanjay Patel <[email protected]> |
Revert [IR] allow fast-math-flags on phi of FP values
This reverts r372866 (git commit dec03223a97af0e4dfcb23da55c0f7f8c9b62d00)
llvm-svn: 372868
|
| #
dec03223 |
| 25-Sep-2019 |
Sanjay Patel <[email protected]> |
[IR] allow fast-math-flags on phi of FP values
The changes here are based on the corresponding diffs for allowing FMF on 'select': D61917
As discussed there, we want to have fast-math-flags be a pr
[IR] allow fast-math-flags on phi of FP values
The changes here are based on the corresponding diffs for allowing FMF on 'select': D61917
As discussed there, we want to have fast-math-flags be a property of an FP value because the alternative (having them on things like fcmp) leads to logical inconsistency such as: https://bugs.llvm.org/show_bug.cgi?id=38086
The earlier patch for select made almost no practical difference because most unoptimized conditional code begins life as a phi (based on what I see in clang). Similarly, I don't expect this patch to do much on its own either because SimplifyCFG promptly drops the flags when converting to select on a minimal example like: https://bugs.llvm.org/show_bug.cgi?id=39535
But once we have this plumbing in place, we should be able to wire up the FMF propagation and start solving cases like that.
The change to RecurrenceDescriptor::AddReductionVar() is required to prevent a regression in a LoopVectorize test. We are intersecting the FMF of any FPMathOperator there, so if a phi is not properly annotated, new math instructions may not be either. Once we fix the propagation in SimplifyCFG, it may be safe to remove that hack.
Differential Revision: https://reviews.llvm.org/D67564
llvm-svn: 372866
show more ...
|
|
Revision tags: llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3 |
|
| #
dc5f805d |
| 23-Aug-2019 |
Benjamin Kramer <[email protected]> |
Do a sweep of symbol internalization. NFC.
llvm-svn: 369803
|
|
Revision tags: llvmorg-9.0.0-rc2, llvmorg-9.0.0-rc1, llvmorg-10-init |
|
| #
c5e7f562 |
| 15-Jul-2019 |
Evgeniy Stepanov <[email protected]> |
ARM MTE stack sanitizer.
Add "memtag" sanitizer that detects and mitigates stack memory issues using armv8.5 Memory Tagging Extension.
It is similar in principle to HWASan, which is a software impl
ARM MTE stack sanitizer.
Add "memtag" sanitizer that detects and mitigates stack memory issues using armv8.5 Memory Tagging Extension.
It is similar in principle to HWASan, which is a software implementation of the same idea, but there are enough differencies to warrant a new sanitizer type IMHO. It is also expected to have very different performance properties.
The new sanitizer does not have a runtime library (it may grow one later, along with a "debugging" mode). Similar to SafeStack and StackProtector, the instrumentation pass (in a follow up change) will be inserted in all cases, but will only affect functions marked with the new sanitize_memtag attribute.
Reviewers: pcc, hctim, vitalybuka, ostannard
Subscribers: srhines, mehdi_amini, javed.absar, kristof.beyls, hiraditya, cryptoad, steven_wu, dexonsmith, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D64169
llvm-svn: 366123
show more ...
|
| #
06263672 |
| 11-Jul-2019 |
Stefan Stipanovic <[email protected]> |
[Attributor] Deduce "nosync" function attribute.
Introduce and deduce "nosync" function attribute to indicate that a function does not synchronize with another thread in a way that other thread migh
[Attributor] Deduce "nosync" function attribute.
Introduce and deduce "nosync" function attribute to indicate that a function does not synchronize with another thread in a way that other thread might free memory.
Reviewers: jdoerfert, jfb, nhaehnle, arsenm
Subscribers: wdng, hfinkel, nhaenhle, mehdi_amini, steven_wu, dexonsmith, arsenm, uenoku, hiraditya, jfb, llvm-commits
Differential Revision: https://reviews.llvm.org/D62766
llvm-svn: 365830
show more ...
|
|
Revision tags: llvmorg-8.0.1, llvmorg-8.0.1-rc4 |
|
| #
6a4c2e4f |
| 09-Jul-2019 |
Bob Haarman <[email protected]> |
[ThinLTO] only emit used or referenced CFI records to index
Summary: We emit CFI_FUNCTION_DEFS and CFI_FUNCTION_DECLS to distributed ThinLTO indices to implement indirect function call checking. Th
[ThinLTO] only emit used or referenced CFI records to index
Summary: We emit CFI_FUNCTION_DEFS and CFI_FUNCTION_DECLS to distributed ThinLTO indices to implement indirect function call checking. This change causes us to only emit entries for functions that are either defined or used by the module we're writing the index for (instead of all functions in the combined index), which can make the indices substantially smaller.
Fixes PR42378.
Reviewers: pcc, vitalybuka, eugenis
Subscribers: mehdi_amini, hiraditya, dexonsmith, arphaman, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D63887
llvm-svn: 365537
show more ...
|
| #
b4b21d80 |
| 08-Jul-2019 |
Brian Homerding <[email protected]> |
Add, and infer, a nofree function attribute
This patch adds a function attribute, nofree, to indicate that a function does not, directly or indirectly, call a memory-deallocation function (e.g., fre
Add, and infer, a nofree function attribute
This patch adds a function attribute, nofree, to indicate that a function does not, directly or indirectly, call a memory-deallocation function (e.g., free, C++'s operator delete).
Reviewers: jdoerfert
Differential Revision: https://reviews.llvm.org/D49165
llvm-svn: 365336
show more ...
|
| #
3aef3528 |
| 05-Jul-2019 |
Eugene Leviant <[email protected]> |
[ThinLTO] Attempt to recommit r365188 after alignment fix
llvm-svn: 365215
|
| #
e91f86f0 |
| 05-Jul-2019 |
Eugene Leviant <[email protected]> |
Reverted r365188 due to alignment problems on i686-android
llvm-svn: 365206
|
| #
957c40db |
| 05-Jul-2019 |
Graham Hunter <[email protected]> |
Scalable Vector IR Type with further LTO fixes
Reintroduces the scalable vector IR type from D32530, after it was reverted a couple of times due to increasing chromium LTO build times. This latest i
Scalable Vector IR Type with further LTO fixes
Reintroduces the scalable vector IR type from D32530, after it was reverted a couple of times due to increasing chromium LTO build times. This latest incarnation removes the walk over aggregate types from the verifier entirely, in favor of rejecting scalable vectors in the isValidElementType methods in ArrayType and StructType. This removes the 70% degradation observed with the second repro tarball from PR42210.
Reviewers: thakis, hans, rengolin, sdesmalen
Reviewed By: sdesmalen
Differential Revision: https://reviews.llvm.org/D64079
llvm-svn: 365203
show more ...
|
| #
820cc01d |
| 05-Jul-2019 |
Eugene Leviant <[email protected]> |
[ThinLTO] Attempt to recommit r365040 after caching fix
It's possible that some function can load and store the same variable using the same constant expression:
store %Derived* @foo, %Derived** bi
[ThinLTO] Attempt to recommit r365040 after caching fix
It's possible that some function can load and store the same variable using the same constant expression:
store %Derived* @foo, %Derived** bitcast (%Base** @bar to %Derived**) %42 = load %Derived*, %Derived** bitcast (%Base** @bar to %Derived**)
The bitcast expression was mistakenly cached while processing loads, and never examined later when processing store. This caused @bar to be mistakenly treated as read-only variable. See load-store-caching.ll.
llvm-svn: 365188
show more ...
|
| #
f7e52fbd |
| 04-Jul-2019 |
Reid Kleckner <[email protected]> |
Revert [ThinLTO] Optimize writeonly globals out
This reverts r365040 (git commit 5cacb914758c7f436b47c8362100f10cef14bbc4)
Speculatively reverting, since this appears to have broken check-lld on Li
Revert [ThinLTO] Optimize writeonly globals out
This reverts r365040 (git commit 5cacb914758c7f436b47c8362100f10cef14bbc4)
Speculatively reverting, since this appears to have broken check-lld on Linux. Partial analysis in https://crbug.com/981168.
llvm-svn: 365097
show more ...
|
| #
e0308279 |
| 03-Jul-2019 |
Francis Visoiu Mistrih <[email protected]> |
[Bitcode] Move Bitstream to a separate library
This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/.
This is needed to avoid a circular dependency when using the bitstream code for parsi
[Bitcode] Move Bitstream to a separate library
This moves Bitcode/Bitstream*, Bitcode/BitCodes.h to Bitstream/.
This is needed to avoid a circular dependency when using the bitstream code for parsing optimization remarks.
Since Bitcode uses Core for the IR part:
libLLVMRemarks -> Bitcode -> Core
and Core uses libLLVMRemarks to generate remarks (see IR/RemarkStreamer.cpp):
Core -> libLLVMRemarks
we need to separate the Bitstream and Bitcode part.
For clang-doc, it seems that it doesn't need the whole bitcode layer, so I updated the CMake to only use the bitstream part.
Differential Revision: https://reviews.llvm.org/D63899
llvm-svn: 365091
show more ...
|
| #
5cacb914 |
| 03-Jul-2019 |
Eugene Leviant <[email protected]> |
[ThinLTO] Optimize writeonly globals out
Differential revision: https://reviews.llvm.org/D63444
llvm-svn: 365040
|
| #
5b868285 |
| 02-Jul-2019 |
Teresa Johnson <[email protected]> |
[ThinLTO] Address post-review suggestions for index-based WPD summary
Removes a couple of unnecessary and/or redundant checks introduced by r364960.
llvm-svn: 364968
|
| #
a7004363 |
| 02-Jul-2019 |
Teresa Johnson <[email protected]> |
[ThinLTO] Add summary entries for index-based WPD
Summary: If LTOUnit splitting is disabled, the module summary analysis computes the summary information necessary to perform single implementation d
[ThinLTO] Add summary entries for index-based WPD
Summary: If LTOUnit splitting is disabled, the module summary analysis computes the summary information necessary to perform single implementation devirtualization during the thin link with the index and no IR. The information collected from the regular LTO IR in the current hybrid WPD algorithm is summarized, including: 1) For vtable definitions, record the function pointers and their offset within the vtable initializer (subsumes the information collected from IR by tryFindVirtualCallTargets). 2) A record for each type metadata summarizing the vtable definitions decorated with that metadata (subsumes the TypeIdentiferMap collected from IR).
Also added are the necessary bitcode records, and the corresponding assembly support.
The follow-on index-based WPD patch is D55153.
Depends on D53890.
Reviewers: pcc
Subscribers: mehdi_amini, Prazek, inglorion, eraman, steven_wu, dexonsmith, arphaman, llvm-commits
Differential Revision: https://reviews.llvm.org/D54815
llvm-svn: 364960
show more ...
|
| #
3b77583e |
| 27-Jun-2019 |
Johannes Doerfert <[email protected]> |
[Attr] Add "willreturn" function attribute
This patch introduces a new function attribute, willreturn, to indicate that a call of this function will either exhibit undefined behavior or comes back a
[Attr] Add "willreturn" function attribute
This patch introduces a new function attribute, willreturn, to indicate that a call of this function will either exhibit undefined behavior or comes back and continues execution at a point in the existing call stack that includes the current invocation.
This attribute guarantees that the function does not have any endless loops, endless recursion, or terminating functions like abort or exit.
Patch by Hideto Ueno (@uenoku)
Reviewers: jdoerfert
Subscribers: mehdi_amini, hiraditya, steven_wu, dexonsmith, lebedev.ri, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D62801
llvm-svn: 364555
show more ...
|
| #
408fc084 |
| 27-Jun-2019 |
Hans Wennborg <[email protected]> |
Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix"
We saw a 70% ThinLTO link time increase in Chromium for Android, see crbug.com/978817. Sounds like more of PR42210.
> Recommit of
Revert r363658 "[SVE][IR] Scalable Vector IR Type with pr42210 fix"
We saw a 70% ThinLTO link time increase in Chromium for Android, see crbug.com/978817. Sounds like more of PR42210.
> Recommit of D32530 with a few small changes: > - Stopped recursively walking through aggregates in > the verifier, so that we don't impose too much > overhead on large modules under LTO (see PR42210). > - Changed tests to match; the errors are slightly > different since they only report the array or > struct that actually contains a scalable vector, > rather than all aggregates which contain one in > a nested member. > - Corrected an older comment > > Reviewers: thakis, rengolin, sdesmalen > > Reviewed By: sdesmalen > > Differential Revision: https://reviews.llvm.org/D63321
llvm-svn: 364543
show more ...
|
|
Revision tags: llvmorg-8.0.1-rc3 |
|
| #
43854e3c |
| 18-Jun-2019 |
Graham Hunter <[email protected]> |
[SVE][IR] Scalable Vector IR Type with pr42210 fix
Recommit of D32530 with a few small changes: - Stopped recursively walking through aggregates in the verifier, so that we don't impose too mu
[SVE][IR] Scalable Vector IR Type with pr42210 fix
Recommit of D32530 with a few small changes: - Stopped recursively walking through aggregates in the verifier, so that we don't impose too much overhead on large modules under LTO (see PR42210). - Changed tests to match; the errors are slightly different since they only report the array or struct that actually contains a scalable vector, rather than all aggregates which contain one in a nested member. - Corrected an older comment
Reviewers: thakis, rengolin, sdesmalen
Reviewed By: sdesmalen
Differential Revision: https://reviews.llvm.org/D63321
llvm-svn: 363658
show more ...
|
| #
b00dbcbb |
| 13-Jun-2019 |
Eugene Leviant <[email protected]> |
[ThinLTO][Bitcode] Add 'entrycount' to FS_COMBINED_PROFILE. NFC
Differential revision: https://reviews.llvm.org/D63078
llvm-svn: 363254
|
|
Revision tags: llvmorg-8.0.1-rc2 |
|
| #
80fee257 |
| 09-Jun-2019 |
Nico Weber <[email protected]> |
Revert r361953 "[SVE][IR] Scalable Vector IR Type"
This reverts commit f4fc01f8dd3a5dfd2060d1ad0df6b90e8351ddf7. It caused a 3-4x slowdown when doing thinlto links, PR42210.
llvm-svn: 362913
|
| #
b7141207 |
| 30-May-2019 |
Tim Northover <[email protected]> |
Reapply: IR: add optional type to 'byval' function parameters
When we switch to opaque pointer types we will need some way to describe how many bytes a 'byval' parameter should occupy on the stack.
Reapply: IR: add optional type to 'byval' function parameters
When we switch to opaque pointer types we will need some way to describe how many bytes a 'byval' parameter should occupy on the stack. This adds a (for now) optional extra type parameter.
If present, the type must match the pointee type of the argument.
The original commit did not remap byval types when linking modules, which broke LTO. This version fixes that.
Note to front-end maintainers: if this causes test failures, it's probably because the "byval" attribute is printed after attributes without any parameter after this change.
llvm-svn: 362128
show more ...
|
| #
71ee3d02 |
| 29-May-2019 |
Tim Northover <[email protected]> |
Revert "IR: add optional type to 'byval' function parameters"
The IRLinker doesn't delve into the new byval attribute when mapping types, and this breaks LTO.
llvm-svn: 362029
|
| #
6e07f16f |
| 29-May-2019 |
Tim Northover <[email protected]> |
IR: add optional type to 'byval' function parameters
When we switch to opaque pointer types we will need some way to describe how many bytes a 'byval' parameter should occupy on the stack. This adds
IR: add optional type to 'byval' function parameters
When we switch to opaque pointer types we will need some way to describe how many bytes a 'byval' parameter should occupy on the stack. This adds a (for now) optional extra type parameter.
If present, the type must match the pointee type of the argument.
Note to front-end maintainers: if this causes test failures, it's probably because the "byval" attribute is printed after attributes without any parameter after this change.
llvm-svn: 362012
show more ...
|