- May 03, 2020
-
-
Johannes Doerfert authored
This reduces memory consumption for IRPositions by eliminating the vtable pointer and the `KindOrArgNo` integer. Since each abstract attribute has an associated IRPosition, the 12-16 bytes we save add up quickly. No functional change is intended. --- Single run of the Attributor module and then CGSCC pass (oldPM) for SPASS/clause.c (~10k LLVM-IR loc): Before: ``` calls to allocation functions: 469545 (260135/s) temporary memory allocations: 77137 (42735/s) peak heap memory consumption: 30.50MB peak RSS (including heaptrack overhead): 119.50MB total memory leaked: 269.07KB ``` After: ``` calls to allocation functions: 468999 (274108/s) temporary memory allocations: 77002 (45004/s) peak heap memory consumption: 28.83MB peak RSS (including heaptrack overhead): 118.05MB total memory leaked: 269.07KB ``` Difference: ``` calls to allocation functions: -546 (5808/s) temporary memory allocations: -135 (1436/s) peak heap memory consumption: -1.67MB peak RSS (including heaptrack overhead): 0B total memory leaked: 0B ``` --- CTMark 15 runs Metric: compile_time Program lhs rhs diff test-suite...:: CTMark/sqlite3/sqlite3.test 25.07 24.09 -3.9% test-suite...Mark/mafft/pairlocalalign.test 14.58 14.14 -3.0% test-suite...-typeset/consumer-typeset.test 21.78 21.58 -0.9% test-suite :: CTMark/SPASS/SPASS.test 21.95 22.03 0.4% test-suite :: CTMark/lencod/lencod.test 25.43 25.50 0.3% test-suite...ark/tramp3d-v4/tramp3d-v4.test 23.88 23.83 -0.2% test-suite...TMark/7zip/7zip-benchmark.test 60.24 60.11 -0.2% test-suite :: CTMark/kimwitu++/kc.test 15.69 15.69 -0.0% test-suite...:: CTMark/ClamAV/clamscan.test 25.43 25.42 -0.0% test-suite :: CTMark/Bullet/bullet.test 37.63 37.62 -0.0% Geomean difference -0.8% --- Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D78722
-
Johannes Doerfert authored
Since every AbstractAttribute so far, and for the foreseeable future, corresponds to a single IRPosition we can simplify the class structure. We already did this for IRAttribute but there is no reason to stop there.
-
Mircea Trofin authored
Discussion is in https://reviews.llvm.org/D79215
-
- May 02, 2020
-
-
Nikita Popov authored
getNumUses() scans the full use list. Don't use it is we only want to check if there's zero or one uses.
-
https://reviews.llvm.org/D79215Mircea Trofin authored
Operator error - performed the rename and didn't save.
-
Mircea Trofin authored
Summary: shouldInline makes a decision based on the InlineCost of a call site, as well as an evaluation on whether the site should be deferred. This means it's possible for the decision to be not to inline, even for an InlineCost that would otherwise allow it. Both uses of shouldInline performed the exact same logic after calling it. In addition, the decision on whether to inline or not was communicated through two values of the Option<InlineCost> return value: None, or an InlineCost evaluating to false. Simplified by: - encapsulating the decision in the return object. The bool it evaluates to communicates unambiguously the decision. The InlineCost is also available. - encapsulated the common post-shouldInline code into shouldInline. Reviewers: davidxl, echristo, eraman Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79215
-
- Apr 30, 2020
-
-
Arthur Eubanks authored
Summary: In preparation for preallocated. Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79152
-
David Spickett authored
of a struct that cover the whole struct This can happen when the rest of the members of are zero length. Following the same pattern applied to the SROA pass in: d7f6f163 Fixes: https://bugs.llvm.org/show_bug.cgi?id=45335 Differential Revision: https://reviews.llvm.org/D78720
-
Mircea Trofin authored
Summary: Renamed 'CS' to 'CB', and, in one case, to a more specific name to avoid naming collision with outer scope (a maintainability/readability reason, not correctness) Also updated comments. Reviewers: davidxl, dblaikie, jdoerfert Subscribers: eraman, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79101
-
- Apr 29, 2020
-
-
Mircea Trofin authored
Removed already-addressed fixme, and updated formatting of a few lines that were triggering Harbormaster.
-
- Apr 28, 2020
-
-
Mircea Trofin authored
Summary: Refactored the parameter and return type where they are too generally typed as Instruction. Reviewers: dblaikie, wmi, craig.topper Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79027
-
David Blaikie authored
-
David Blaikie authored
-
Craig Topper authored
This method has been commented as deprecated for a while. Remove it and replace all uses with the equivalent getCalledOperand(). I also made a few cleanups in here. For example, to removes use of getElementType on a pointer when we could just use getFunctionType from the call. Differential Revision: https://reviews.llvm.org/D78882
-
- Apr 26, 2020
-
-
Simon Pilgrim authored
Both PassSupport.h and PassAnalysisSupport.h are only supposed to be included via Pass.h. Differential Revision: https://reviews.llvm.org/D78815
-
- Apr 25, 2020
-
-
Sergei Trofimovich authored
Summary: Missing error mangling is noticed in https://bugs.llvm.org/show_bug.cgi?id=45636 where inconsistent profiling input caused llvm/lld to crash as: ``` Program aborted due to an unhandled Error: linking module flags 'ProfileSummary': IDs have conflicting values in 'Mutex_posix.o' and 'nsBrowserApp.o' ``` The change does not change the fact that LLVM crashes but changes error output to say what was incorrect: ``` LLVM ERROR: Function Import: link error: linking module flags 'ProfileSummary': IDs have conflicting values in 'Mutex_posix.o' and 'nsBrowserApp.o' ``` Actual crash has yet to be fixed. Reviewers: lattner Reviewed By: lattner Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78676
-
Sergey Dmitriev authored
[Attributor] Do not set 'returned' attribute for arguments that cannot be bitcasted to function result Reviewers: jdoerfert, sstefan1, uenoku Reviewed By: jdoerfert Subscribers: hiraditya, uenoku, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78828
-
Benjamin Kramer authored
-
Craig Topper authored
The CallSite and ImmutableCallSite were removed in a previous commit. So rename the file to match the remaining class and the name of the cpp that implements it.
-
- Apr 24, 2020
-
-
Tyker authored
Summary: Use nonnull and dereferenceable from an assume bundle in isKnownNonZero Reviewers: jdoerfert, nikic, lebedev.ri, reames, fhahn, sstefan1 Reviewed By: jdoerfert Subscribers: fhahn, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76149
-
Johannes Doerfert authored
A dependent patch has been reverted [0]. Until it goes back in this one has to stay out. [0] ebdb8939 This reverts commit d254b50b.
-
Johannes Doerfert authored
This reduces memory consumption for IRPositions by eliminating the vtable pointer and the `KindOrArgNo` integer. Since each abstract attribute has an associated IRPosition, the 12-16 bytes we save add up quickly. No functional change is intended. --- Single run of the Attributor module and then CGSCC pass (oldPM) for SPASS/clause.c (~10k LLVM-IR loc): Before: ``` calls to allocation functions: 469545 (260135/s) temporary memory allocations: 77137 (42735/s) peak heap memory consumption: 30.50MB peak RSS (including heaptrack overhead): 119.50MB total memory leaked: 269.07KB ``` After: ``` calls to allocation functions: 468999 (274108/s) temporary memory allocations: 77002 (45004/s) peak heap memory consumption: 28.83MB peak RSS (including heaptrack overhead): 118.05MB total memory leaked: 269.07KB ``` Difference: ``` calls to allocation functions: -546 (5808/s) temporary memory allocations: -135 (1436/s) peak heap memory consumption: -1.67MB peak RSS (including heaptrack overhead): 0B total memory leaked: 0B ``` --- CTMark 15 runs Metric: compile_time Program lhs rhs diff test-suite...:: CTMark/sqlite3/sqlite3.test 25.07 24.09 -3.9% test-suite...Mark/mafft/pairlocalalign.test 14.58 14.14 -3.0% test-suite...-typeset/consumer-typeset.test 21.78 21.58 -0.9% test-suite :: CTMark/SPASS/SPASS.test 21.95 22.03 0.4% test-suite :: CTMark/lencod/lencod.test 25.43 25.50 0.3% test-suite...ark/tramp3d-v4/tramp3d-v4.test 23.88 23.83 -0.2% test-suite...TMark/7zip/7zip-benchmark.test 60.24 60.11 -0.2% test-suite :: CTMark/kimwitu++/kc.test 15.69 15.69 -0.0% test-suite...:: CTMark/ClamAV/clamscan.test 25.43 25.42 -0.0% test-suite :: CTMark/Bullet/bullet.test 37.63 37.62 -0.0% Geomean difference -0.8% --- Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D78722
-
- Apr 23, 2020
-
-
Mircea Trofin authored
Reviewers: craig.topper, dblaikie Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78666
-
Serguei Katkov authored
The motivation is to be able to play with the option and change if it is required. Reviewers: fedor.sergeev, apilipenko, rnk, jdoerfert Reviewed By: fedor.sergeev Subscribers: hiraditya, dantrushin, llvm-commits Differential Revision: https://reviews.llvm.org/D78624
-
Craig Topper authored
I don't believe this pass deals with vectors of pointers. I think this getScalarType() was added during a mechanical opaque pointer change of the interface to GetElementPtrInst::getIndexedType.
-
- Apr 22, 2020
-
-
Craig Topper authored
[CallSite removal][ValueTracking] Use CallBase instead of ImmutableCallSite for getIntrinsicForCallSite. NFC Differential Revision: https://reviews.llvm.org/D78613
-
Christopher Tetreault authored
Summary: Introduce new types for fixed width and scalable vectors. Does not remove getNumElements yet so as to not break code during transition period. Reviewers: deadalnix, efriedma, sdesmalen, craig.topper, huntergr Reviewed By: sdesmalen Subscribers: jholewinski, arsenm, jvesely, nhaehnle, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, nicolasvasilache, csigg, arpith-jacob, mgester, lucyrfox, liufengdb, kerbowa, Joonsoo, grosul1, frgossen, lldb-commits, tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm, #lldb Differential Revision: https://reviews.llvm.org/D77587
-
Mircea Trofin authored
Summary: Implementation details and internal (to module) APIs. Reviewers: craig.topper, dblaikie Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78610
-
Craig Topper authored
-
Johannes Doerfert authored
The number of different access location kinds we track is relatively small (8 so far). With this patch we replace the DenseMap that mapped from index (0-7) to the access set pointer with an array of access set pointers. This reduces memory consumption. No functional change is intended. --- Single run of the Attributor module and then CGSCC pass (oldPM) for SPASS/clause.c (~10k LLVM-IR loc): Before: ``` calls to allocation functions: 472499 (215654/s) temporary memory allocations: 77794 (35506/s) peak heap memory consumption: 35.28MB peak RSS (including heaptrack overhead): 125.46MB total memory leaked: 269.04KB ``` After: ``` calls to allocation functions: 472270 (308673/s) temporary memory allocations: 77578 (50704/s) peak heap memory consumption: 32.70MB peak RSS (including heaptrack overhead): 121.78MB total memory leaked: 269.04KB ``` Difference: ``` calls to allocation functions: -229 (346/s) temporary memory allocations: -216 (326/s) peak heap memory consumption: -2.58MB peak RSS (including heaptrack overhead): 0B total memory leaked: 0B ``` ---
-
Johannes Doerfert authored
-
Mircea Trofin authored
Reviewers: dblaikie, craig.topper Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78584
-
- Apr 21, 2020
-
-
Johannes Doerfert authored
If we have a dependence between an abstract attribute A to an abstract attribute B such hat changes in A should trigger an update of B, we do not need to keep the dependence around once the update was triggered. If the dependence is still required the update will reinsert it into the dependence map, if it is not we avoid triggering B in the future. This replaces the "recompute interval" mechanism we used before to prune stale dependences. Number of required iterations is generally down, compile time for the module pass (not really the CGSCC pass) is down quite a bit. There is one test change which looks like an artifact in the undefined behavior AA that needs to be looked at.
-
Johannes Doerfert authored
-
Johannes Doerfert authored
The old command line option `-attributor-disable` was too coarse grained as we want to measure the effects of the module or cgscc pass without the other as well. Since `none` is the default there is no real functional change. Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D78571
-
Benjamin Kramer authored
-
Fangrui Song authored
-
Mircea Trofin authored
Summary: Also capitalized some induction variables, to match coding style. Reviewers: dblaikie, craig.topper Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D78538
-
Johannes Doerfert authored
This reduces memory consumption and the need to copy complex data structures repeatedly. No functional change is intended. --- Single run of the Attributor module and then CGSCC pass (oldPM) for SPASS/clause.c (~10k LLVM-IR loc): Before: ``` calls to allocation functions: 490390 (320725/s) temporary memory allocations: 84601 (55330/s) peak heap memory consumption: 41.70MB peak RSS (including heaptrack overhead): 131.18MB total memory leaked: 269.04KB ``` After: ``` calls to allocation functions: 489359 (301144/s) temporary memory allocations: 82983 (51066/s) peak heap memory consumption: 36.76MB peak RSS (including heaptrack overhead): 126.48MB total memory leaked: 269.04KB ``` Difference: ``` calls to allocation functions: -1031 (-10739/s) temporary memory allocations: -1618 (-16854/s) peak heap memory consumption: -4.94MB peak RSS (including heaptrack overhead): 0B total memory leaked: 0B ---
-
Johannes Doerfert authored
This reduces memory consumption and the need to copy complex data structures repeatedly. No functional change is intended. --- Single run of the Attributor module and then CGSCC pass (oldPM) for SPASS/clause.c (~10k LLVM-IR loc): Before: ``` calls to allocation functions: 596180 (374484/s) temporary memory allocations: 84979 (53378/s) peak heap memory consumption: 52.14MB peak RSS (including heaptrack overhead): 139.79MB total memory leaked: 269.04KB ``` After: ``` calls to allocation functions: 489200 (303285/s) temporary memory allocations: 83406 (51708/s) peak heap memory consumption: 41.70MB peak RSS (including heaptrack overhead): 131.76MB total memory leaked: 269.04KB ``` Difference: ``` calls to allocation functions: -106980 (-5094285/s) temporary memory allocations: -1573 (-74904/s) peak heap memory consumption: -10.44MB peak RSS (including heaptrack overhead): 0B total memory leaked: 0B ---
-