| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
After Philip added support for range-based for loops to our C++
bindings, we now convert another bunch of foreach calls to range-for loops.
This improves general readability of the code.
llvm-svn: 337201
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This could simplify the isl iterator implementation a lot.
Reviewers: grosser, Meinersbur, bollu
Reviewed By: grosser
Subscribers: pollydev, llvm-commits
Differential Revision: https://reviews.llvm.org/D49019
llvm-svn: 337054
|
|
|
|
| |
llvm-svn: 336430
|
|
|
|
|
|
|
|
| |
This is a maintenance update. Besides many minor changes it ships two
functions "isl_*_list_size" and "isl_*_list_get_at" which will allow us
to simplify the iterator implementation in Polly.
llvm-svn: 336425
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch updates the isl interface used in `foldSizeConstantsToRight()` to the new C++ interface.
Reviewers: chelini, grosser, philip.pfaffe, Meinersbur
Reviewed By: grosser
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D48965
llvm-svn: 336362
|
|
|
|
|
|
|
|
|
|
| |
ScalarEvolution::getSCEV dereferences its argument, s.t. passing nullptr
leads to undefined behaviour.
Check for nullptr before calling it instead of checking its argument
afterwards.
llvm-svn: 336350
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
It appears that llvm uses unbuffered C++ streams. So, we should not
mix C and C++ stream operations, because that will give us mixed
up output.
Reviewers: efriedma, jdoerfert, Meinersbur, gareevroman, sebpop, zinob, huihuiz, pollydev, grosser, singam-sanjay, philip.pfaffe
Reviewed By: philip.pfaffe
Subscribers: nemanjai, kbarton
Differential Revision: https://reviews.llvm.org/D40126
llvm-svn: 336288
|
|
|
|
|
|
|
|
|
| |
This change has no impact on upstream Polly directly, but reduces output
noise for some internal isl versions we are testing. In general, storing
simpler and more canonical output is a good idea. Hence, it seems useful
to upstream this change.
llvm-svn: 336281
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch adds <isl_space.h> to gpu_tree.c. This prevents a segfault
when allocating a new isl_space in the function create_sync_domain(), as
the compiler now knows that the return type is a pointer instead of
assuming the function returns an int.
This has been updated in upstream PPCG, so we should bump up our PPCG
version.
Initially discovered by Philip Pfaffe in Polly.
Reviewers: grosser, bollu, philip.pfaffe
Reviewed By: bollu
Subscribers: nemanjai, kbarton, llvm-commits
Differential Revision: https://reviews.llvm.org/D48883
Contributed-by: Alain Denzler <alaindenzler@gmail.com>
llvm-svn: 336251
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch changes the return types for ocl_get_* functions during SPIR code generation. Because these functions return size_t types, the return type needs to be changed to the actual size of size_t on the device.
Based on work by Michal Babej and Pekka Jääskeläinen
Patch by: Alain Denzler
Reviewers: grosser, philip.pfaffe, bollu
Reviewed By: grosser, philip.pfaffe
Subscribers: nemanjai, kbarton, llvm-commits
Differential Revision: https://reviews.llvm.org/D48774
llvm-svn: 336080
|
|
|
|
| |
llvm-svn: 335971
|
|
|
|
|
|
|
| |
Thanks to Philip Pfaffe for providing iterator support in the previous
commit.
llvm-svn: 335970
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch aims to provide support for detecting load patterns which are collectively invariant but right now `isHoistableLoad()` is checking each load instruction individually which cannot detect the load pattern as a whole.
Patch by: Sahil Girish Yerawar
Reviewers: bollu, philip.pfaffe, Meinersbur
Reviewed By: philip.pfaffe, Meinersbur
Differential Revision: https://reviews.llvm.org/D48026
llvm-svn: 335949
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The number of SCEV expressions is usually linear in the number of IR
instructions being modeled. However, a naive SCEV visitor is not. For
an expression like x*x, "x" will be visited twice. If x is itself an
expression like x*x, that will be visited twice, etc, and the overall
runtime is O(2^N) in the number of SCEV expressions.
To prevent this from happening, add a cache, so we only visit each SCEV
expression once.
Not sure this is the best solution. Maybe we can instead check whether
the SCEV is scop-invariant (in which case we never need to map the
value). But we don't have a utility for that at the moment.
Differential Revision: https://reviews.llvm.org/D47087
llvm-svn: 335783
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the optimized getDefToTarget() from ForwardOpTree to ZoneAlgo such
that it can be used by makeValInst.
This reduces the compile time of GrTestUtils of the aosp buildbot from
2m46s to 21s, which should fix the timeout issue.
Differential Revision: https://reviews.llvm.org/D48579
llvm-svn: 335606
|
|
|
|
| |
llvm-svn: 335029
|
|
|
|
| |
llvm-svn: 334941
|
|
|
|
| |
llvm-svn: 334940
|
|
|
|
|
|
|
|
|
|
|
| |
This change includes:
- getFortranArrayIds
- adjustDomainDimensions
- propagateInvalidStmtDomains
- buildAliasGroupsForAccesses
llvm-svn: 334939
|
|
|
|
| |
llvm-svn: 334938
|
|
|
|
| |
llvm-svn: 334937
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The function is currently awfully complicated. Drop the IILE and use
StringRef over std::string.
Reviewers: Meinersbur, grosser, bollu
Reviewed By: Meinersbur
Subscribers: nemanjai, kbarton, bollu, llvm-commits, pollydev
Differential Revision: https://reviews.llvm.org/D48070
llvm-svn: 334695
|
|
|
|
| |
llvm-svn: 334413
|
|
|
|
|
|
|
|
| |
First build the surrounding loops and then build up the polyhedral
structures. Before r326664 we had to mix these updates, clean this
up to improve readability (slightly).
llvm-svn: 334412
|
|
|
|
|
|
| |
This is mainly a maintenance update.
llvm-svn: 334406
|
|
|
|
| |
llvm-svn: 334172
|
|
|
|
| |
llvm-svn: 334166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In case the schedule has not changed and the operand tree root uses a
value defined in an ancestor loop, the def-to-target mapping is trivial.
For instance, the SCoP
for (int i < 0; i < N; i+=1) {
DefStmt:
D = ...;
for (int j < 0; j < N; j+=1) {
TargetStmt:
use(D);
}
}
has DefStmt-to-TargetStmt mapping of
{ DefStmt[i] -> TargetStmt[i,j] }
This should apply on the majority of def-to-target mappings.
This patch detects this case and directly constructs the expected
mapping. It assumes that the mapping never crosses the loop header
DefStmt is in, which ForwardOpTree does not support at the moment
anyway.
Differential Revision: https://reviews.llvm.org/D47752
llvm-svn: 334134
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: Meinersbur, grosser, bollu, cs15btech11044, jdoerfert
Reviewed By: grosser
Subscribers: pollydev, llvm-commits
Tags: #polly
Differential Revision: https://reviews.llvm.org/D47786
llvm-svn: 334092
|
|
|
|
| |
llvm-svn: 333988
|
|
|
|
| |
llvm-svn: 333956
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: partitionSetParts from C to new C++ interface.
Reviewers: grosser, Meinersbur, jdoerfert, bollu, cs15btech11044
Reviewed By: grosser, Meinersbur
Subscribers: llvm-commits, pollydev
Tags: #polly
Differential Revision: https://reviews.llvm.org/D47252
llvm-svn: 333780
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The aosp-O3-polly-before-vectorizer-unprofitable buildbot currently
fails in ZoneAlgorithm::isNormalized, presumably because an
out-of-quota happens in that function.
Modify ZoneAlgorithm::isNormalized to return an isl::boolean such
it can report an error.
In the failing case, it was called in an assertion in ForwardOpTree.
Allow to pass the assertion in an out-of-quota event, a condition that
is later checked before forwarding an operand tree.
llvm-svn: 333709
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This update adds new list types and adds functions which convert isl
data types to lists of their contained elements:
isl::set::get_basic_set_list
isl::union_set::get_set_list
isl::map::get_basic_map_list
isl::union_map::get_map_list
llvm-svn: 333688
|
|
|
|
|
|
|
|
|
| |
Besides other changes, this update introduces functions to translate a
maps and sets into lists of their elements. These lists are useful as
we can define iterators for lists, which allow us to replace many uses
of foreach.
llvm-svn: 333621
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
def-to-target map. NFCI.
When forwarding a LoadInst to another statement, a map that translates
their domain is needed. Before this patch, is was computed by appending
the def-to-use map to the def-to-target of the operand tree's target.
This patch lets the new method getDefToTarget do this. This is
computationally less expensive due to:
* Caching of the result such that it can be used for multiple operands
tree to the same target.
* The map is only computed when there is a LoadInst that needs it.
* It is only computed for the statement requiring the translator map,
instead of having an intermediate result for every edge in the
operand tree.
The downside is that this scheme cannot handle forwarding from a
previous loop iteration (which would require the entire path from
statement to target). Since ForwardOpTree currently does not support
forwarding across loop iterations (SCEV expressions would need to be
transformed), this was not needed anyway.
Differential Revision: https://reviews.llvm.org/D47385
llvm-svn: 333426
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch updates `Scop::addUserContext()` function to the new C++ interface and replaces the `auto` keyword with explicit type wherever used in this function.
Reviewers: grosser, bollu, philip.pfaffe, chelini, Meinersbur
Reviewed By: grosser
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D47438
llvm-svn: 333366
|
|
|
|
|
|
|
|
| |
Besides normal updates this change also contains a bug-fix to in
isl_coalesce which broke the AOSP buildbot. Thanks to Michael Kruse for
reporting this bug and Sven Verdoolage for fixing this bug.
llvm-svn: 333118
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: update createNextIterationMap function to new C++ interface.
Reviewers: grosser, Meinersbur, jdoerfert, bollu, cs15btech11044
Reviewed By: cs15btech11044
Subscribers: llvm-commits, pollydev
Tags: #polly
Differential Revision: https://reviews.llvm.org/D47102
llvm-svn: 333113
|
|
|
|
|
|
|
| |
Other than before, don't clear out LI entirely but only those relevant
loops.
llvm-svn: 333089
|
|
|
|
|
|
|
|
|
|
| |
up to dwo output.
Part of PR37466.
Differential Revision: https://reviews.llvm.org/D47089
llvm-svn: 332881
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes build:
/build/polly/lib/Support/RegisterPasses.cpp:709:80: error: expected ';' after top level declarator
extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK LLVM_PLUGIN_EXPORT
^
;
Was missed in rL332796 / D47082
llvm-svn: 332814
|
|
|
|
|
|
| |
Fixes post-commit review comment on r332309.
llvm-svn: 332775
|
|
|
|
|
|
|
|
|
|
| |
An assertion was not prepared to be passed a nullptr because the
out-of-quota limit was exceeded. Bail-out before the assertion
since the assertion does not apply on out-of-quote.
This fixes llvm.org/PR37477.
llvm-svn: 332488
|
|
|
|
|
|
|
|
|
|
| |
Summary: This patch aims to remove the usage of old C-styled isl functions (in this case `isl_set_n_basic_set()`) in favor of new C++ isl interface based methods in `ScopInfo.cpp`.
Patch by Sahil Yerawar
Differential Revision: https://reviews.llvm.org/D46935
llvm-svn: 332471
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Creating the Scop name is expensive, because creating the
Region name it's derived from is expensive. So create the name lazily,
because getName() is actually called rarely.
This is a reiteration of r328666, which introduced a use-after-free and
got reverted in r331363.
Differential Revision: https://reviews.llvm.org/D46868
llvm-svn: 332359
|
|
|
|
|
|
|
|
|
|
|
| |
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
Differential Revision: https://reviews.llvm.org/D44978
llvm-svn: 332352
|
|
|
|
|
|
|
|
|
|
|
| |
nullptr is not a valid affine expression, and none of the callers check
for null, so we eventually hit an isl error and crash.
Instead, invalidate the scop and return a constant zero.
Differential Revision: https://reviews.llvm.org/D46445
llvm-svn: 332309
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The condition was introduced in r267142 to mitigate a long compile-time
case. In r306087, a max-computation limit was introduced that should
handle the same case while leaving the max disjuncts heuristic it
should have replaced intact.
Today, the max disjuncts bail-out causes problems in that it prematurely
stops SCoPs from being detected, e.g. in SPEC's lbm. This would hit less
like if isl_set_coalesce would be called after isl_set_remove_divs
(which makes more basic_set likely to be coalescable) instead of before.
This patch tries to remove the premature max-disjuncts bail-out
condition by using simple_hull() to reduce the computational overhead,
instead of directly invalidating that SCoP.
Differential Revision: https://reviews.llvm.org/D45066
Contributed-by: Sahil Girish Yerawar <cs15btech11044@iith.ac.in>
llvm-svn: 331891
|
|
|
|
|
|
|
|
|
| |
This reverts commit 0f9dc03765dc301fff7a52e2a0e1dd3e5f3130c5, r328666.
The change introduced a use-after-free, caused by the temporary name string
being destroyed after converting it to a StringRef.
llvm-svn: 331363
|