llvm-mirror/lib
Preston Gurd 4b0d66f924 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.

llvm-svn: 171879
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 Resort the #include lines in include/... and lib/... with the 2013-01-02 10:22:59 +00:00
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 Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
LLVMBuild.txt Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00
Makefile Rename VMCore directory to IR. 2013-01-02 09:10:48 +00:00