mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-13 19:32:41 +00:00
ScopInfo: Ensure copy statement memory accesses are correct
Add asserts that verify that the memory accesses of a new copy statement are defined for all domain instances the copy statement is defined for. llvm-svn: 286047
This commit is contained in:
parent
a4e56fb569
commit
744740ad91
@ -4153,6 +4153,14 @@ void Scop::addScopStmt(BasicBlock *BB, Region *R) {
|
||||
ScopStmt *Scop::addScopStmt(__isl_take isl_map *SourceRel,
|
||||
__isl_take isl_map *TargetRel,
|
||||
__isl_take isl_set *Domain) {
|
||||
isl_set *SourceDomain = isl_map_domain(isl_map_copy(SourceRel));
|
||||
isl_set *TargetDomain = isl_map_domain(isl_map_copy(TargetRel));
|
||||
assert(isl_set_is_subset(Domain, TargetDomain) &&
|
||||
"Target access not defined for complete statement domain");
|
||||
assert(isl_set_is_subset(Domain, SourceDomain) &&
|
||||
"Source access not defined for complete statement domain");
|
||||
isl_set_free(SourceDomain);
|
||||
isl_set_free(TargetDomain);
|
||||
Stmts.emplace_back(*this, SourceRel, TargetRel, Domain);
|
||||
CopyStmtsNum++;
|
||||
return &(Stmts.back());
|
||||
|
Loading…
x
Reference in New Issue
Block a user