llvm-project/polly/test/Simplify
Michael Kruse 6983741eaa [Polly] Fix use-after-free.
VirtualUse of type UseKind::Inter expects the definition of a
llvm::Value to be represented in another statement. In the bug report
that statement has been removed due to its domain being empty.
Scop::InstStmtMap for the llvm::Value's defintion still pointed to the
removed statement, which resulted in the use-after-free.

The defintion statement was removed by Simplify because it was
considered to not be reachable by other uses; trivially because it is
never executed due to its empty domain. However, no such thing happend
to the using statement using the value altough its domain is also empty.

Fix by always removing statements with empty domains in Simplify since
these are not properly analyzable. A UseKind::Inter should always have a
statement with its defintion due to LLVM's SSA form.
Scop::removeStmtNotInDomainMap() also removes statements with empty
domains but does so without considering the context as used by
Simplify's analyzes.

In another angle, InstStmtMap pointing to removed statements should not
happen either and ForwardOpTree would have bailed out if the llvm::Value
definition was not represented by a statement. This will be corrected in
a followup-commit.

This fixes llvm.org/PR47098
2020-08-22 10:10:49 -05:00
..
coalesce_3partials.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
coalesce_3partials___%for---%return.jscop [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
coalesce_3partials___%for---%return.jscop.transformed [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
coalesce_disjointelements.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
coalesce_disjointelements___%for---%return.jscop [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
coalesce_disjointelements___%for---%return.jscop.transformed [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
coalesce_overlapping.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
coalesce_overlapping___%for---%return.jscop [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
coalesce_overlapping___%for---%return.jscop.transformed [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
coalesce_partial.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
coalesce_partial___%for---%return.jscop [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
coalesce_partial___%for---%return.jscop.transformed [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
dead_access_load.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
dead_access_phi.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
dead_access_value.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
dead_instruction.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
emptyaccessdomain.ll [Simplify] Fix typo in statistics output. NFC. 2017-07-28 16:57:51 +00:00
emptyaccessdomain___%for---%return.jscop [Simplify] Remove partial write accesses with empty domain. 2017-07-22 20:33:09 +00:00
emptyaccessdomain___%for---%return.jscop.transformed [Simplify] Remove partial write accesses with empty domain. 2017-07-22 20:33:09 +00:00
exit_phi_accesses-2.ll [Simplify] Count PHINodes in simplifiable exit nodes as escaping use. 2017-07-27 14:09:31 +00:00
func-b320a7.ll [Polly] Fix use-after-free. 2020-08-22 10:10:49 -05:00
gemm.ll [Simplify] Remove all kinds of redundant scalar writes. 2017-07-31 17:04:55 +00:00
gemm___%bb3---%bb28.jscop [Simplify] Add test case which we currently miss 2017-07-11 10:30:45 +00:00
gemm___%bb3---%bb28.jscop.transformed [Simplify] Add test case which we currently miss 2017-07-11 10:30:45 +00:00
nocoalesce_differentvalues.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
nocoalesce_differentvalues___%for---%return.jscop [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
nocoalesce_differentvalues___%for---%return.jscop.transformed [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
nocoalesce_elementmismatch.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
nocoalesce_elementmismatch___%for---%return.jscop [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
nocoalesce_elementmismatch___%for---%return.jscop.transformed [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
nocoalesce_readbetween.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
nocoalesce_readbetween___%for---%return.jscop [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
nocoalesce_readbetween___%for---%return.jscop.transformed [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
nocoalesce_writebetween.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
nocoalesce_writebetween___%for---%return.jscop [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
nocoalesce_writebetween___%for---%return.jscop.transformed [Simplify] Implement write accesses coalescing. 2017-07-29 16:21:16 +00:00
notdead_region_exitphi.ll [test] Add test case for -polly-simplify. NFC. 2017-07-29 00:06:06 +00:00
notdead_region_innerphi.ll [Simplify] Do not remove dependencies of phis within region stmts. 2017-07-28 23:22:32 +00:00
notredundant_region_loop.ll [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
notredundant_region_loop___%for---%return.jscop [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
notredundant_region_loop___%for---%return.jscop.transformed [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
notredundant_region_middle.ll [JSON] Make the failure to parse a jscop file a hard error 2017-08-10 14:53:25 +00:00
notredundant_synthesizable_unknownit.ll [Polly] Fix a testcase after LLVM commit r334318 2018-06-08 21:39:55 +00:00
out-of-scop-use-in-region-entry-phi-node.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
overwritten.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
overwritten_3phi.ll [tests] Set -polly-import-jscop-dir=%S always 2017-07-11 10:39:01 +00:00
overwritten_3phi___%for---%return.jscop
overwritten_3phi___%for---%return.jscop.transformed
overwritten_3store.ll [ScopBuilder] Make -polly-stmt-granularity=scalar-indep the default. 2018-02-03 06:59:47 +00:00
overwritten_implicit_and_explicit.ll [tests] Set -polly-import-jscop-dir=%S always 2017-07-11 10:39:01 +00:00
overwritten_implicit_and_explicit___%for---%return.jscop
overwritten_implicit_and_explicit___%for---%return.jscop.transformed
overwritten_loadbetween.ll
overwritten_scalar.ll [tests] Set -polly-import-jscop-dir=%S always 2017-07-11 10:39:01 +00:00
overwritten_scalar___%for---%return.jscop
overwritten_scalar___%for---%return.jscop.transformed
pass_existence.ll
phi_in_regionstmt.ll Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
pr33323.ll [tests] Set -polly-import-jscop-dir=%S always 2017-07-11 10:39:01 +00:00
pr33323___%for.body98---%for.cond87.loopexit.jscop
pr33323___%for.body98---%for.cond87.loopexit.jscop.transformed
redundant.ll
redundant_differentindex.ll [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_partialwrite.ll [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_partialwrite___%for---%return.jscop [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_partialwrite___%for---%return.jscop.transformed [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_region.ll [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_region___%for---%return.jscop [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_region___%for---%return.jscop.transformed [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_region_scalar.ll [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_region_scalar___%for---%return.jscop [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_region_scalar___%for---%return.jscop.transformed [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
redundant_scalarwrite.ll [Simplify] Remove all kinds of redundant scalar writes. 2017-07-31 17:04:55 +00:00
redundant_scalarwrite___%for---%return.jscop [Simplify] Remove all kinds of redundant scalar writes. 2017-07-31 17:04:55 +00:00
redundant_scalarwrite___%for---%return.jscop.transformed [Simplify] Remove all kinds of redundant scalar writes. 2017-07-31 17:04:55 +00:00
redundant_storebetween.ll [Simplify] Rewrite redundant write detection algorithm. 2017-08-01 20:01:34 +00:00
scalability1.ll [Simplify] Improve scalability. 2017-08-01 19:39:11 +00:00
scalability2.ll [Simplify] Improve scalability. 2017-08-01 19:39:11 +00:00
sweep_mapped_phi.ll [Simplify] Mark (and sweep) based on latest access relation. 2017-10-26 12:34:36 +00:00
sweep_mapped_phi___%for---%return.jscop [Simplify] Mark (and sweep) based on latest access relation. 2017-10-26 12:34:36 +00:00
sweep_mapped_phi___%for---%return.jscop.transformed [test] Remove non-JSPON comments in JSCOP file. NFC. 2018-07-28 01:11:45 +00:00
sweep_mapped_value.ll [Simplify] Mark (and sweep) based on latest access relation. 2017-10-26 12:34:36 +00:00
sweep_mapped_value___%for---%return.jscop [Simplify] Mark (and sweep) based on latest access relation. 2017-10-26 12:34:36 +00:00
sweep_mapped_value___%for---%return.jscop.transformed [Simplify] Mark (and sweep) based on latest access relation. 2017-10-26 12:34:36 +00:00
ununsed_read_in_region_entry.ll [Simplify] Actually remove unsed instruction from region header. 2017-09-05 19:44:39 +00:00