#
0cac726a |
| 27-Sep-2018 |
Fangrui Song <maskray@google.com> |
llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Summary: The convenience wrapper in STLExtras is available since rL342102.
Reviewers: dblaikie, javed.absar, JDevlieghere, andreadb
Subscr
llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)
Summary: The convenience wrapper in STLExtras is available since rL342102.
Reviewers: dblaikie, javed.absar, JDevlieghere, andreadb
Subscribers: MatzeB, sanjoy, arsenm, dschuff, mehdi_amini, sdardis, nemanjai, jvesely, nhaehnle, sbc100, jgravelle-google, eraman, aheejin, kbarton, JDevlieghere, javed.absar, gbedwell, jrtc27, mgrang, atanasyan, steven_wu, george.burgess.iv, dexonsmith, kristina, jsji, llvm-commits
Differential Revision: https://reviews.llvm.org/D52573
llvm-svn: 343163
show more ...
|
Revision tags: llvmorg-7.0.0, llvmorg-7.0.0-rc3 |
|
#
9ae926b9 |
| 26-Aug-2018 |
Chandler Carruth <chandlerc@gmail.com> |
[IR] Replace `isa<TerminatorInst>` with `isTerminator()`.
This is a bit awkward in a handful of places where we didn't even have an instruction and now we have to see if we can build one. But on the
[IR] Replace `isa<TerminatorInst>` with `isTerminator()`.
This is a bit awkward in a handful of places where we didn't even have an instruction and now we have to see if we can build one. But on the whole, this seems like a win and at worst a reasonable cost for removing `TerminatorInst`.
All of this is part of the removal of `TerminatorInst` from the `Instruction` type hierarchy.
llvm-svn: 340701
show more ...
|
Revision tags: llvmorg-7.0.0-rc2, llvmorg-7.0.0-rc1 |
|
#
cd5f37f3 |
| 31-Jul-2018 |
John Brawn <john.brawn@arm.com> |
[MemDep] Use PhiValuesAnalysis to improve alias analysis results
This is being done in order to make GVN able to better optimize certain inputs. MemDep doesn't use PhiValues directly, but does need
[MemDep] Use PhiValuesAnalysis to improve alias analysis results
This is being done in order to make GVN able to better optimize certain inputs. MemDep doesn't use PhiValues directly, but does need to notifiy it when things get invalidated.
Differential Revision: https://reviews.llvm.org/D48489
llvm-svn: 338384
show more ...
|
Revision tags: llvmorg-6.0.1, llvmorg-6.0.1-rc3, llvmorg-6.0.1-rc2 |
|
#
ce358262 |
| 18-May-2018 |
Piotr Padlewski <piotr.padlewski@gmail.com> |
Dissallow non-empty metadata for invariant.group
Summary: This feature is not needed, but it might be usefull in the future to use metadata to mark what which function should support it (and strip i
Dissallow non-empty metadata for invariant.group
Summary: This feature is not needed, but it might be usefull in the future to use metadata to mark what which function should support it (and strip it when not).
Reviewers: rsmith, sanjoy, amharc, kuhar
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D45419
llvm-svn: 332787
show more ...
|
#
153fe600 |
| 18-May-2018 |
Piotr Padlewski <piotr.padlewski@gmail.com> |
[MemDep] Fixed handling of invariant.group
Summary: Memdep had funny bug related to invariant.groups - because it did not invalidated cache, in some very rare cases it was possible to show memory de
[MemDep] Fixed handling of invariant.group
Summary: Memdep had funny bug related to invariant.groups - because it did not invalidated cache, in some very rare cases it was possible to show memory dependence of the instruction that was deleted, but because other instruction took it's place it resulted in call to vtable! Thanks @amharc for repro!.
Reviewers: dberlin, kuhar, amharc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D45320
Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com> llvm-svn: 332781
show more ...
|
#
d34e60ca |
| 14-May-2018 |
Nicola Zaghen <nicola.zaghen@imgtec.com> |
Rename DEBUG macro to LLVM_DEBUG. The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/
Rename DEBUG macro to LLVM_DEBUG. The DEBUG() macro is very generic so it might clash with other projects. The renaming was done as follows: - git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g' - git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM - Manual change to APInt - Manually chage DOCS as regex doesn't match it.
In the transition period the DEBUG() macro is still present and aliased to the LLVM_DEBUG() one.
Differential Revision: https://reviews.llvm.org/D43624
llvm-svn: 332240
show more ...
|
Revision tags: llvmorg-6.0.1-rc1 |
|
#
97bcade7 |
| 01-Apr-2018 |
Mandeep Singh Grang <mgrang@codeaurora.org> |
[Analysis] Change std::sort to llvm::sort in response to r327219
Summary: r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-de
[Analysis] Change std::sort to llvm::sort in response to r327219
Summary: r327219 added wrappers to std::sort which randomly shuffle the container before sorting. This will help in uncovering non-determinism caused due to undefined sorting order of objects having the same key.
To make use of that infrastructure we need to invoke llvm::sort instead of std::sort.
Note: This patch is one of a series of patches to replace *all* std::sort to llvm::sort. Refer D44363 for a list of all the required patches.
Reviewers: sanjoy, dexonsmith, hfinkel, RKSimon
Reviewed By: dexonsmith
Subscribers: david2050, llvm-commits
Differential Revision: https://reviews.llvm.org/D44944
llvm-svn: 328925
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 |
|
#
f5ff5d58 |
| 17-Jan-2018 |
Philip Reames <listmail@philipreames.com> |
[MDA] Use common code instead of reimplementing same. [NFC]
llvm-svn: 322747
|
Revision tags: llvmorg-6.0.0-rc1 |
|
#
6d31001c |
| 28-Dec-2017 |
Reid Kleckner <rnk@google.com> |
Revert "[memcpyopt] Teach memcpyopt to optimize across basic blocks"
This reverts r321138. It seems there are still underlying issues with memdep. PR35519 seems to still be present if debug info is
Revert "[memcpyopt] Teach memcpyopt to optimize across basic blocks"
This reverts r321138. It seems there are still underlying issues with memdep. PR35519 seems to still be present if debug info is enabled. We end up losing a memcpy. Somehow during store to memset merging, we insert the memset after the memcpy or fail to update the memdep analysis to account for the newly inserted memset of a pair.
Reduced test case:
#include <assert.h> #include <stdio.h> #include <string> #include <utility> #include <vector>
void do_push_back( std::vector<std::pair<std::string, std::vector<std::string>>>* crls) { crls->push_back(std::make_pair(std::string(), std::vector<std::string>())); }
int __attribute__((optnone)) main() { // Put some data in the vector and then remove it so we take the push_back // fast path. std::vector<std::pair<std::string, std::vector<std::string>>> crl_set; crl_set.push_back({"asdf", {}}); crl_set.pop_back(); printf("first word in vector storage: %p\n", *(void**)crl_set.data());
// Do the push_back which may fail to initialize the data. do_push_back(&crl_set); auto* first = &crl_set.back().first; printf("first word in vector storage (should be zero): %p\n", *(void**)crl_set.data()); assert(first->empty()); puts("ok"); }
Compile with libc++, enable optimizations, and enable debug info: $ clang++ -stdlib=libc++ -g -O2 t.cpp -o t.exe -Wl,-rpath=llvm/build/lib
This program will assert with this change.
llvm-svn: 321510
show more ...
|
#
50db8a20 |
| 21-Dec-2017 |
Alina Sbirlea <asbirlea@google.com> |
[ModRefInfo] Add must alias info to ModRefInfo.
Summary: Add an additional bit to ModRefInfo, ModRefInfo::Must, to be cleared for known must aliases. Shift existing Mod/Ref/ModRef values to include
[ModRefInfo] Add must alias info to ModRefInfo.
Summary: Add an additional bit to ModRefInfo, ModRefInfo::Must, to be cleared for known must aliases. Shift existing Mod/Ref/ModRef values to include an additional most significant bit. Update wrappers that modify ModRefInfo values to reflect the change.
Notes: * ModRefInfo::Must is almost entirely cleared in the AAResults methods, the remaining changes are trying to preserve it. * Only some small changes to make custom AA passes set ModRefInfo::Must (BasicAA). * GlobalsModRef already declares a bit, who's meaning overlaps with the most significant bit in ModRefInfo (MayReadAnyGlobal). No changes to shift the value of MayReadAnyGlobal (see AlignedMap). FunctionInfo.getModRef() ajusts most significant bit so correctness is preserved, but the Must info is lost. * There are cases where the ModRefInfo::Must is not set, e.g. 2 calls that only read will return ModRefInfo::NoModRef, though they may read from exactly the same location.
Reviewers: dberlin, hfinkel, george.burgess.iv
Subscribers: llvm-commits, sanjoy
Differential Revision: https://reviews.llvm.org/D38862
llvm-svn: 321309
show more ...
|
#
aa392281 |
| 20-Dec-2017 |
Dan Gohman <dan433584@gmail.com> |
[memcpyopt] Teach memcpyopt to optimize across basic blocks
This teaches memcpyopt to make a non-local memdep query when a local query indicates that the dependency is non-local. This notably allows
[memcpyopt] Teach memcpyopt to optimize across basic blocks
This teaches memcpyopt to make a non-local memdep query when a local query indicates that the dependency is non-local. This notably allows it to eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%.
This is r319482 and r319483, along with fixes for PR35519: fix the optimization that merges stores into memsets to preserve cached memdep info, and fix memdep's non-local caching strategy to not assume that larger queries are always more conservative than smaller ones.
Fixes PR28958 and PR35519.
Differential Revision: https://reviews.llvm.org/D40802
llvm-svn: 321138
show more ...
|
#
c667c1f4 |
| 09-Dec-2017 |
Evgeniy Stepanov <eugeni.stepanov@gmail.com> |
Hardware-assisted AddressSanitizer (llvm part).
Summary: This is LLVM instrumentation for the new HWASan tool. It is basically a stripped down copy of ASan at this point, w/o stack or global support
Hardware-assisted AddressSanitizer (llvm part).
Summary: This is LLVM instrumentation for the new HWASan tool. It is basically a stripped down copy of ASan at this point, w/o stack or global support. Instrumenation adds a global constructor + runtime callbacks for every load and store.
HWASan comes with its own IR attribute.
A brief design document can be found in clang/docs/HardwareAssistedAddressSanitizerDesign.rst (submitted earlier).
Reviewers: kcc, pcc, alekseyshl
Subscribers: srhines, mehdi_amini, mgorny, javed.absar, eraman, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D40932
llvm-svn: 320217
show more ...
|
#
193429f0 |
| 07-Dec-2017 |
Alina Sbirlea <asbirlea@google.com> |
[ModRefInfo] Make enum ModRefInfo an enum class [NFC].
Summary: Make enum ModRefInfo an enum class. Changes to ModRefInfo values should be done using inline wrappers. This should prevent future bit-
[ModRefInfo] Make enum ModRefInfo an enum class [NFC].
Summary: Make enum ModRefInfo an enum class. Changes to ModRefInfo values should be done using inline wrappers. This should prevent future bit-wise opearations from being added, which can be more error-prone.
Reviewers: sanjoy, dberlin, hfinkel, george.burgess.iv
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40933
llvm-svn: 320107
show more ...
|
#
d6037ebe |
| 07-Dec-2017 |
Alina Sbirlea <asbirlea@google.com> |
[ModRefInfo] Replace remaining bit-wise operations with wrappers.
llvm-svn: 319993
|
Revision tags: llvmorg-5.0.1, llvmorg-5.0.1-rc3 |
|
#
146a9c3e |
| 06-Dec-2017 |
Hans Wennborg <hans@hanshq.net> |
Revert r319482 and r319483 "[memcpyopt] Teach memcpyopt to optimize across basic blocks"
This caused PR35519.
> [memcpyopt] Teach memcpyopt to optimize across basic blocks > > This teaches memcpyop
Revert r319482 and r319483 "[memcpyopt] Teach memcpyopt to optimize across basic blocks"
This caused PR35519.
> [memcpyopt] Teach memcpyopt to optimize across basic blocks > > This teaches memcpyopt to make a non-local memdep query when a local query > indicates that the dependency is non-local. This notably allows it to > eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%. > > Fixes PR28958. > > Differential Revision: https://reviews.llvm.org/D38374 >
> [memcpyopt] Commit file missed in r319482. > > This change was meant to be included with r319482 but was accidentally > omitted.
llvm-svn: 319873
show more ...
|
#
63d2250a |
| 05-Dec-2017 |
Alina Sbirlea <asbirlea@google.com> |
Modify ModRefInfo values using static inline method abstractions [NFC].
Summary: The aim is to make ModRefInfo checks and changes more intuitive and less error prone using inline methods that abstra
Modify ModRefInfo values using static inline method abstractions [NFC].
Summary: The aim is to make ModRefInfo checks and changes more intuitive and less error prone using inline methods that abstract the bit operations.
Ideally ModRefInfo would become an enum class, but that change will require a wider set of changes into FunctionModRefBehavior.
Reviewers: sanjoy, george.burgess.iv, dberlin, hfinkel
Subscribers: nlopes, llvm-commits
Differential Revision: https://reviews.llvm.org/D40749
llvm-svn: 319821
show more ...
|
#
59e4c0b9 |
| 30-Nov-2017 |
Dan Gohman <dan433584@gmail.com> |
[memcpyopt] Teach memcpyopt to optimize across basic blocks
This teaches memcpyopt to make a non-local memdep query when a local query indicates that the dependency is non-local. This notably allows
[memcpyopt] Teach memcpyopt to optimize across basic blocks
This teaches memcpyopt to make a non-local memdep query when a local query indicates that the dependency is non-local. This notably allows it to eliminate many more llvm.memcpy calls in common Rust code, often by 20-30%.
Fixes PR28958.
Differential Revision: https://reviews.llvm.org/D38374
llvm-svn: 319482
show more ...
|
Revision tags: llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1 |
|
#
279790b6 |
| 25-Oct-2017 |
Mikael Holmen <mikael.holmen@ericsson.com> |
[MemDep] DBG intrinsics don't impact abort limit for call site dependence analysis
Summary: Memory dependence analysis no longer counts DbgInfoIntrinsics towards the limit where to abort the analysi
[MemDep] DBG intrinsics don't impact abort limit for call site dependence analysis
Summary: Memory dependence analysis no longer counts DbgInfoIntrinsics towards the limit where to abort the analysis. Before, a bunch of calls to dbg.value could affect the generated code, meaning that with -g we could generate different code than without.
Reviewers: chandlerc, Prazek, davide, efriedma
Reviewed By: efriedma
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39181
llvm-svn: 316551
show more ...
|
Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5, llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3 |
|
#
bb1b2d09 |
| 16-Aug-2017 |
Eugene Zelenko <eugene.zelenko@gmail.com> |
[Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 311048
|
Revision tags: llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1 |
|
#
f15fb368 |
| 25-Jun-2017 |
Davide Italiano <davide@freebsd.org> |
[MemDep] Cleanup return after else & use `auto`. NFC.
llvm-svn: 306255
|
Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3 |
|
#
6bda14b3 |
| 06-Jun-2017 |
Chandler Carruth <chandlerc@gmail.com> |
Sort the remaining #include lines in include/... and lib/....
I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line
Sort the remaining #include lines in include/... and lib/....
I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days.
I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch.
This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files.
Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again).
llvm-svn: 304787
show more ...
|
#
0b69e363 |
| 31-May-2017 |
Galina Kistanova <gkistanova@gmail.com> |
Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.
llvm-svn: 304356
|
Revision tags: llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1, llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1 |
|
#
9530883e |
| 12-Jan-2017 |
Piotr Padlewski <piotr.padlewski@gmail.com> |
[Devirtualization] MemDep returns non-local !invariant.group dependencies
Summary: Memory Dependence Analysis was limited to return only local dependencies for invariant.group handling. Now it retur
[Devirtualization] MemDep returns non-local !invariant.group dependencies
Summary: Memory Dependence Analysis was limited to return only local dependencies for invariant.group handling. Now it returns NonLocal when it finds it and then by asking getNonLocalPointerDependency we get found dep.
Thanks to this we are able to devirtualize loops!
void indirect(A &a, int n) { for (int i = 0 ; i < n; i++) a.foo();
} void test(int n) { A a; indirect(a); }
After inlining a.foo() will be changed to direct call, even if foo and A::A() is external (but only if vtable definition is be available).
Reviewers: nlewycky, dberlin, chandlerc, rsmith
Subscribers: mehdi_amini, davide, llvm-commits
Differential Revision: https://reviews.llvm.org/D28137
llvm-svn: 291762
show more ...
|
#
e41beed4 |
| 11-Jan-2017 |
Piotr Padlewski <piotr.padlewski@gmail.com> |
[MemDep] NFC variable name change
llvm-svn: 291679
|
#
09ad678b |
| 08-Jan-2017 |
Piotr Padlewski <piotr.padlewski@gmail.com> |
[MemDep] NFC walk invariant.group graph only down
Summary: By using stripPointerCasts we can get to the root value and then walk down the bitcast graph
Reviewers: reames
Subscribers: llvm-commits
[MemDep] NFC walk invariant.group graph only down
Summary: By using stripPointerCasts we can get to the root value and then walk down the bitcast graph
Reviewers: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28181
llvm-svn: 291405
show more ...
|