Chandler Carruth d24d326705 [SDAG] Introduce a combined set to the DAG combiner which tracks nodes
which have successfully round-tripped through the combine phase, and use
this to ensure all operands to DAG nodes are visited by the combiner,
even if they are only added during the combine phase.

This is critical to have the combiner reach nodes that are *introduced*
during combining. Previously these would sometimes be visited and
sometimes not be visited based on whether they happened to end up on the
worklist or not. Now we always run them through the combiner.

This fixes quite a few bad codegen test cases lurking in the suite while
also being more principled. Among these, the TLS codegeneration is
particularly exciting for programs that have this in the critical path
like TSan-instrumented binaries (although I think they engineer to use
a different TLS that is faster anyways).

I've tried to check for compile-time regressions here by running llc
over a merged (but not LTO-ed) clang bitcode file and observed at most
a 3% slowdown in llc. Given that this is essentially a worst case (none
of opt or clang are running at this phase) I think this is tolerable.
The actual LTO case should be even less costly, and the cost in normal
compilation should be negligible.

With this combining logic, it is possible to re-legalize as we combine
which is necessary to implement PSHUFB formation on x86 as
a post-legalize DAG combine (my ultimate goal).

Differential Revision: http://reviews.llvm.org/D4638

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213898 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-24 22:15:28 +00:00
..
2014-07-15 21:44:37 +00:00
2014-06-18 17:57:29 +00:00
2014-06-18 17:57:29 +00:00
2014-06-10 19:00:20 +00:00
2014-06-10 19:00:20 +00:00
2014-07-15 20:18:31 +00:00
2014-06-18 22:03:45 +00:00
2014-06-20 17:06:05 +00:00
2014-06-06 01:20:28 +00:00
2014-05-02 15:41:47 +00:00
2014-06-20 17:06:05 +00:00
2014-06-20 17:06:07 +00:00
2014-07-24 06:59:20 +00:00
2014-06-15 21:08:54 +00:00
2014-07-15 21:44:37 +00:00
2014-07-15 21:44:37 +00:00
2014-05-09 16:42:19 +00:00
2014-06-18 12:27:13 +00:00
2014-06-18 12:27:17 +00:00
2014-06-18 12:27:15 +00:00
2014-06-24 23:33:04 +00:00
2014-06-23 18:00:38 +00:00
2014-06-22 21:42:58 +00:00
2014-07-21 14:01:10 +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.