llvm-6502/lib
Hal Finkel 13141f04d3 [PowerPC] Fix the PPCInstrInfo::getInstrLatency implementation
PowerPC uses itineraries to describe processor pipelines (and dispatch-group
restrictions for P7/P8 cores). Unfortunately, the target-independent
implementation of TII.getInstrLatency calls ItinData->getStageLatency, and that
looks for the largest cycle count in the pipeline for any given instruction.
This, however, yields the wrong answer for the PPC itineraries, because we
don't encode the full pipeline. Because the functional units are fully
pipelined, we only model the initial stages (there are no relevant hazards in
the later stages to model), and so the technique employed by getStageLatency
does not really work. Instead, we should take the maximum output operand
latency, and that's what PPCInstrInfo::getInstrLatency now does.

This caused some test-case churn, including two unfortunate side effects.
First, the new arrangement of copies we get from function parameters now
sometimes blocks VSX FMA mutation (a FIXME has been added to the code and the
test cases), and we have one significant test-suite regression:

SingleSource/Benchmarks/BenchmarkGame/spectral-norm
	56.4185% +/- 18.9398%

In this benchmark we have a loop with a vectorized FP divide, and it with the
new scheduling both divides end up in the same dispatch group (which in this
case seems to cause a problem, although why is not exactly clear). The grouping
structure is hard to predict from the bottom of the loop, and there may not be
much we can do to fix this.

Very few other test-suite performance effects were really significant, but
almost all weakly favor this change. However, in light of the issues
highlighted above, I've left the old behavior available via a
command-line flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242188 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 20:02:02 +00:00
..
Analysis [PM/AA] Reformat GlobalsModRef so that subsequent patches I make here 2015-07-14 08:42:39 +00:00
AsmParser Add argmemonly attribute. 2015-07-11 10:30:36 +00:00
Bitcode Add argmemonly attribute. 2015-07-11 10:30:36 +00:00
CodeGen [CodeGen] Force emission of personality directive if explicitly specified 2015-07-14 19:22:51 +00:00
DebugInfo Return ErrorOr from getSymbolAddress. 2015-07-03 18:19:00 +00:00
ExecutionEngine Fix the -DBUILD_SHARED_LIBS=ON build. 2015-07-07 17:48:00 +00:00
Fuzzer
IR Add capability to get and set the personalitty function from the C API 2015-07-14 01:23:06 +00:00
IRReader
LibDriver Add support deterministic output in llvm-ar and make it the default. 2015-07-13 20:38:09 +00:00
LineEditor
Linker
LTO LTO: expose LTO_SYMBOL_ALIAS, which indicates that the symbol is an alias. 2015-07-04 03:42:35 +00:00
MC [MC] Correctly escape .safeseh's symbol 2015-07-13 18:51:15 +00:00
Object Add a herper function. NFC. 2015-07-14 01:06:16 +00:00
Option [Option] Plug a leak when move-assigning an InputArgList. 2015-06-23 15:28:10 +00:00
Passes
ProfileData
Support Caused regressions: compile Release+Asserts failed on clang-native-arm-cortex-a9 2015-07-14 14:34:06 +00:00
TableGen [TableGen] Change a couple methods to return an ArrayRef instead of a const std::vector reference. NFC 2015-07-06 06:23:01 +00:00
Target [PowerPC] Fix the PPCInstrInfo::getInstrLatency implementation 2015-07-14 20:02:02 +00:00
Transforms [SROA] Don't de-atomic volatile loads and stores 2015-07-14 06:19:58 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile