llvm-6502/test
Hal Finkel b8a6712c27 [PowerPC] Prepare loops for pre-increment loads/stores
PowerPC supports pre-increment load/store instructions (except for Altivec/VSX
vector load/stores). Using these on embedded cores can be very important, but
most loops are not naturally set up to use them. We can often change that,
however, by placing loops into a non-canonical form. Generically, this means
transforming loops like this:

  for (int i = 0; i < n; ++i)
    array[i] = c;

to look like this:

  T *p = array[-1];
  for (int i = 0; i < n; ++i)
    *++p = c;

the key point is that addresses accessed are pulled into dedicated PHIs and
"pre-decremented" in the loop preheader. This allows the use of pre-increment
load/store instructions without loop peeling.

A target-specific late IR-level pass (running post-LSR), PPCLoopPreIncPrep, is
introduced to perform this transformation. I've used this code out-of-tree for
generating code for the PPC A2 for over a year. Somewhat to my surprise,
running the test suite + externals on a P7 with this transformation enabled
showed no performance regressions, and one speedup:

External/SPEC/CINT2006/483.xalancbmk/483.xalancbmk
	-2.32514% +/- 1.03736%

So I'm going to enable it on everything for now. I was surprised by this
because, on the POWER cores, these pre-increment load/store instructions are
cracked (and, thus, harder to schedule effectively). But seeing no regressions,
and feeling that it is generally easier to split instructions apart late than
it is to combine them late, this might be the better approach regardless.

In the future, we might want to integrate this functionality into LSR (but
currently LSR does not create new PHI nodes, so (for that and other reasons)
significant work would need to be done).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228328 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-05 18:43:00 +00:00
..
Analysis [PM] Change the core design of the TTI analysis to use a polymorphic 2015-01-31 03:43:40 +00:00
Assembler AsmParser: Recognize DW_TAG_* constants 2015-02-03 21:56:01 +00:00
Bindings Propagate a better error message to the C api. 2015-02-03 01:53:03 +00:00
Bitcode Check bit widths before trying to get a type. 2015-01-30 18:13:50 +00:00
BugPoint IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
CodeGen [PowerPC] Prepare loops for pre-increment loads/stores 2015-02-05 18:43:00 +00:00
DebugInfo Debug Info: Relax assertion in isUnsignedDIType() to allow floats to be 2015-02-02 18:31:58 +00:00
ExecutionEngine [Orc] Make OrcMCJITReplacement::addObject calls transfer buffer ownership to the 2015-02-02 19:51:18 +00:00
Feature IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
FileCheck
Instrumentation [sanitizer] add another workaround for PR 17409: when over a threshold emit coverage instrumentation as calls. 2015-02-04 01:21:45 +00:00
Integer
JitListener IR: Move MDLocation into place 2015-01-14 22:27:36 +00:00
Linker Utils: Resolve cycles under distinct MDNodes 2015-02-04 19:44:34 +00:00
LTO Introduce llvm/test/LTO/X86. LTO tests may be assumed as target-specific. 2015-01-30 10:09:26 +00:00
MC [PowerPC] Implement the vclz instructions for PWR8 2015-02-05 15:24:47 +00:00
Object [ELFYAML] Provide default value 0 for YAML relocation addendum field 2015-01-29 06:56:24 +00:00
Other [PM] Teach the module-to-function adaptor to not run function passes 2015-02-01 10:47:25 +00:00
SymbolRewriter SymbolRewriter: allow rewriting with comdats 2015-01-27 22:57:39 +00:00
TableGen
tools Add code to llvm-objdump so the -section option with -macho will dump ‘C’ string 2015-02-04 21:38:42 +00:00
Transforms Teach isDereferenceablePointer() to look through bitcast constant expressions. 2015-02-05 09:15:37 +00:00
Unit
Verifier Fix statepoint verifier tests to actually test verifier. 2015-01-30 23:18:42 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg Remove a gross usage of environment variables in MachineVerifier, replacing it with support for setting the -verify-machineinstrs flag via an environment variable in LIT. 2015-02-04 00:02:59 +00:00
lit.site.cfg.in Reverting r226937: lit: Make MCJIT's supported arch check case insensitive 2015-01-24 01:42:44 +00:00
Makefile [lit] Make config.llvm_lib_dir available on cmake, too. 2014-12-30 03:24:11 +00:00
Makefile.tests
TestRunner.sh