llvm-6502/lib
Preston Gurd c7b902e7fe Pad Short Functions for Intel Atom
The current Intel Atom microarchitecture has a feature whereby
when a function returns early then it is slightly faster to execute
a sequence of NOP instructions to wait until the return address is ready,
as opposed to simply stalling on the ret instruction until
the return address is ready.

When compiling for X86 Atom only, this patch will run a pass,
called "X86PadShortFunction" which will add NOP instructions where less
than four cycles elapse between function entry and return.

It includes tests.

This patch has been updated to address Nadav's review comments
- Optimize only at >= O1 and don't do optimization if -Os is set
- Stores MachineBasicBlock* instead of BBNum
- Uses DenseMap instead of std::map
- Fixes placement of braces

Patch by Andy Zhang.




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171879 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-08 18:27:24 +00:00
..
Analysis Move CallGraphSCCPass.h into the Analysis tree; that's where the 2013-01-07 15:26:48 +00:00
Archive Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
AsmParser There was a switch fall-through in the parser for textual LLVM that caused 2013-01-07 13:32:38 +00:00
Bitcode Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
CodeGen Add fp128 rtlib function names to LLVM 2013-01-08 17:09:59 +00:00
DebugInfo Whitespace and 80-col. 2013-01-07 22:40:48 +00:00
ExecutionEngine [Object][ELF] Add a maximum alignment. This is used by createELFObjectFile to create a properly aligned reader. 2013-01-04 20:36:28 +00:00
IR Remove the llvm-local DW_TAG_vector_type tag and add a test to 2013-01-08 01:53:52 +00:00
Linker Move TypeFinder.h into the IR tree, it clearly belongs with the IR library. 2013-01-07 15:43:51 +00:00
MC Rename statistic for instruction fragments -> relaxable 2013-01-08 17:41:59 +00:00
Object [Object][ELF] Add a maximum alignment. This is used by createELFObjectFile to create a properly aligned reader. 2013-01-04 20:36:28 +00:00
Option
Support Remove the llvm-local DW_TAG_vector_type tag and add a test to 2013-01-08 01:53:52 +00:00
TableGen Revert r171140. We don't actually need to support #NAME. Because NAME by itself is interpreted just fine. 2013-01-07 05:09:33 +00:00
Target Pad Short Functions for Intel Atom 2013-01-08 18:27:24 +00:00
Transforms Code cleanup: refactor the switch statements in the generation of reduction variables into an IR builder call. 2013-01-08 17:37:45 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile