Files
Matt Arsenault aca5381bd1 StructurizeCFG: Fix broken backedge detection
The work order was changed in r228186 from SCC order
to RPO with an arbitrary sorting function. The sorting
function attempted to move inner loop nodes earlier. This
was was apparently relying on an assumption that every block
in a given loop / the same loop depth would be seen before
visiting another loop. In the broken testcase, a block
outside of the loop was encountered before moving onto
another block in the same loop. The testcase would then
structurize such that one blocks unconditional successor
could never be reached.

Revert to plain RPO for the analysis phase. This fixes
detecting edges as backedges that aren't really.

The processing phase does use another visited set, and
I'm unclear on whether the order there is as important.
An arbitrary order doesn't work, and triggers some infinite
loops. The reversed RPO list seems to work and is closer
to the order that was used before, minus the arbitary
custom sorting.

A few of the changed tests now produce smaller code,
and a few are slightly worse looking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321751 91177308-0d34-0410-b5e6-96231b3b80d8
2018-01-03 18:45:37 +00:00
..
2017-08-07 18:30:35 +00:00
2017-11-28 23:40:12 +00:00
2017-11-15 21:51:43 +00:00
2017-11-15 21:51:43 +00:00
2017-08-07 18:30:35 +00:00
2017-07-21 21:19:23 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 14:58:04 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 14:58:04 +00:00
2017-07-14 00:11:13 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-03-21 22:18:10 +00:00
2017-09-20 04:25:58 +00:00
2017-11-28 23:40:12 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-11-15 21:51:43 +00:00
2017-05-19 17:25:20 +00:00
2017-08-07 14:58:04 +00:00
2017-08-07 18:30:35 +00:00
2017-08-07 18:30:35 +00:00
2017-06-28 21:38:50 +00:00
2017-06-28 21:38:50 +00:00
2017-06-28 21:38:50 +00:00
2017-06-28 21:38:50 +00:00
2017-08-07 18:30:35 +00:00
2017-07-14 00:11:13 +00:00
2017-08-07 14:58:04 +00:00
2017-08-07 18:30:35 +00:00
2017-04-03 21:45:13 +00:00

+==============================================================================+
| How to organize the lit tests                                                |
+==============================================================================+

- If you write a test for matching a single DAG opcode or intrinsic, it should
  go in a file called {opcode_name,intrinsic_name}.ll (e.g. fadd.ll)

- If you write a test that matches several DAG opcodes and checks for a single
  ISA instruction, then that test should go in a file called {ISA_name}.ll (e.g.
  bfi_int.ll

- For all other tests, use your best judgement for organizing tests and naming
  the files.

+==============================================================================+
| Naming conventions                                                           |
+==============================================================================+

- Use dash '-' and not underscore '_' to separate words in file names, unless
  the file is named after a DAG opcode or ISA instruction that has an
  underscore '_' in its name.