llvm-6502/test
Sanjay Patel 959b276771 transform fadd chains to increase parallelism
This is a compromise: with this simple patch, we should always handle a chain of exactly 3
operations optimally, but we're not generating the optimal balanced binary tree for a longer
sequence.

In general, this transform will reduce the dependency chain for a sequence of instructions
using N operands from a worst case N-1 dependent operations to N/2 dependent operations. 
The optimal balanced binary tree would reduce the chain to log2(N).

The trade-off for not dealing with longer sequences is: (1) we have less complexity in the
compiler, (2) we avoid unknown compile-time blowup calculating a balanced tree, and (3) we
don't need to worry about the increased register pressure required to parallelize longer
sequences. It also seems unlikely that we would ever encounter really long strings of
dependent ops like that in the wild, but I'm not sure how to verify that speculation.
FWIW, I see no perf difference for test-suite running on btver2 (x86-64) with -ffast-math
and this patch.

We can extend this patch to cover other associative operations such as fmul, fmax, fmin, 
integer add, integer mul.

This is a partial fix for:
https://llvm.org/bugs/show_bug.cgi?id=17305

and if extended:
https://llvm.org/bugs/show_bug.cgi?id=21768
https://llvm.org/bugs/show_bug.cgi?id=23116

The issue also came up in:
http://reviews.llvm.org/D8941

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236031 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-28 21:03:22 +00:00
..
Analysis [getUnderlyingOjbects] Analyze loop PHIs further to remove false positives 2015-04-23 20:09:20 +00:00
Assembler IR: Add assembly/bitcode support for function metadata attachments 2015-04-24 22:04:41 +00:00
Bindings
Bitcode Relax an assert when there's a type mismatch in forward references 2015-04-28 20:18:47 +00:00
BugPoint bugpoint Enhancement. 2015-04-20 23:42:22 +00:00
CodeGen transform fadd chains to increase parallelism 2015-04-28 21:03:22 +00:00
DebugInfo Reapply r235977 "[DebugInfo] Add debug locations to constant SD nodes" 2015-04-28 14:05:47 +00:00
ExecutionEngine [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Feature [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
FileCheck
Instrumentation [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Integer [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
JitListener
Linker Linker: Copy over function metadata attachments 2015-04-24 22:07:31 +00:00
LTO Revert changes to LTO test case since llvm-lto can't handle textual IR inputs 2015-04-24 18:13:27 +00:00
MC [mips] [IAS] Do not generate redundant ORi in createLShiftOri. 2015-04-28 14:06:35 +00:00
Object Support arm32 R_ARM_V4BX relocation format 2015-04-22 15:26:43 +00:00
Other [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
SymbolRewriter
TableGen Add support for v1i128 type. 2015-04-17 16:11:05 +00:00
tools Make llvm-symbolizer work on Windows. 2015-04-27 17:19:51 +00:00
Transforms Constfold insertelement to undef when index is out-of-bounds 2015-04-27 09:30:49 +00:00
Unit
Verifier [opaque pointer type] Add textual IR support for explicit type parameter to the invoke instruction 2015-04-24 19:32:54 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh