llvm-6502/lib
Bill Schmidt 421021157e PPCDAGToDAGISel::PostprocessISelDAG()
This patch implements the PPCDAGToDAGISel::PostprocessISelDAG virtual
method to perform post-selection peephole optimizations on the DAG
representation.

One optimization is implemented here:  folds to clean up complex
addressing expressions for thread-local storage and medium code
model.  It will also be useful for large code model sequences when
those are added later.  I originally thought about doing this on the
MI representation prior to register assignment, but it's difficult to
do effective global dead code elimination at that point.  DCE is
trivial on the DAG representation.

A typical example of a candidate code sequence in assembly:

   addis 3, 2, globalvar@toc@ha
   addi  3, 3, globalvar@toc@l
   lwz   5, 0(3)

When the final instruction is a load or store with an immediate offset
of zero, the offset from the add-immediate can replace the zero,
provided the relocation information is carried along:

   addis 3, 2, globalvar@toc@ha
   lwz   5, globalvar@toc@l(3)

Since the addi can in general have multiple uses, we need to only
delete the instruction when the last use is removed.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175697 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 00:38:25 +00:00
..
Analysis Formatting. 2013-02-20 23:57:30 +00:00
Archive
AsmParser
Bitcode Simplify code. No functionality change. 2013-02-19 09:48:30 +00:00
CodeGen Don't allocate memory in LiveInterval::join(). 2013-02-20 23:51:10 +00:00
DebugInfo Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C linkage. 2013-02-15 12:30:38 +00:00
ExecutionEngine Formatting, grammar 2013-02-20 18:24:34 +00:00
IR Add and remove the attribute from the correct slot. 2013-02-20 23:04:11 +00:00
Linker
MC MCParser: Update method names per coding guidelines. 2013-02-20 22:21:35 +00:00
Object
Option
Support Provide a "None" value for convenience when using Optional<T>() 2013-02-21 00:27:28 +00:00
TableGen Make helpers static. Add missing include so LLVMInitializeObjCARCOpts gets C linkage. 2013-02-15 12:30:38 +00:00
Target PPCDAGToDAGISel::PostprocessISelDAG() 2013-02-21 00:38:25 +00:00
Transforms Update a comment that looks to have been accidentally deleted many moons ago. 2013-02-20 20:15:55 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile