llvm-6502/lib
Shuxin Yang 45c7544339 Fix a defect in code-layout pass, improving Benchmarks/Olden/em3d/em3d by about 30%
(4.58s vs 3.2s on an oldish Mac Tower). 

  The corresponding src is excerpted bellow. The lopp accounts for about 90% of execution time.
  --------------------
    cat -n test-suite/MultiSource/Benchmarks/Olden/em3d/make_graph.c
     90 
     91         for (k=0; k<j; k++)
     92           if (other_node == cur_node->to_nodes[k]) break;

  The defective layout is sketched bellow, where the two branches need to swap.
  ------------------------------------------------------------------------
      L:
         ...
      if (cond) goto out-of-loop
      goto L

  While this code sequence is defective, I don't understand why it incurs 1/3 of 
execution time. CPU-event-profiling indicates the poor laoyout dose not increase
in br-misprediction; it dosen't increase stall cycle at all, and it dosen't 
prevent the CPU detect the loop (i.e. Loop-Stream-Detector seems to be working fine
as well)... 

   The root cause of the problem is that the layout pass calls AnalyzeBranch() 
with basic-block which is not updated to reflect its current layout.

rdar://13966341


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183174 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-04 01:00:57 +00:00
..
Analysis Prevent loop-unroll from making assumptions about undefined behavior. 2013-05-31 23:34:46 +00:00
Archive Fix auto_ptr is deprecated warnings 2013-02-26 21:20:35 +00:00
AsmParser Add a new function attribute 'cold' to functions. 2013-05-24 12:26:52 +00:00
Bitcode Remove the Copied parameter from MemoryObject::readBytes. 2013-05-24 10:54:58 +00:00
CodeGen Fix a defect in code-layout pass, improving Benchmarks/Olden/em3d/em3d by about 30% 2013-06-04 01:00:57 +00:00
DebugInfo Change how we iterate over relocations on ELF. 2013-05-30 03:05:14 +00:00
ExecutionEngine Update RuntimeDyldELF::findOPDEntrySection the new relocation iterators. 2013-06-03 19:37:34 +00:00
IR Move getRealLinkageName to a common place and remove all the duplicates of it. 2013-06-01 17:51:14 +00:00
IRReader Measure time that IR parsing took as part of the -time-passes measurement. 2013-04-03 15:33:45 +00:00
Linker Extend RemapInstruction and friends to take an optional new parameter, a ValueMaterializer. 2013-05-28 15:17:05 +00:00
MC Make SubRegIndex size mandatory, following r183020. 2013-05-31 23:45:26 +00:00
Object [Object/COFF] Fix Windows .lib name handling. 2013-06-03 00:27:03 +00:00
Option Resort the #include lines in include/... and lib/... with the 2013-01-02 10:22:59 +00:00
Support Introduce needsCleanup() for APFloat and APInt. 2013-06-03 13:03:05 +00:00
TableGen Allow TableGen DAG arguments to be just a name. 2013-03-24 19:36:51 +00:00
Target R600/SI: Add support for work item and work group intrinsics 2013-06-03 17:40:18 +00:00
Transforms Delete dead safety check. 2013-06-03 23:15:20 +00:00
CMakeLists.txt Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
LLVMBuild.txt Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
Makefile Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00