llvm-6502/include/llvm
Quentin Colombet 4c2a2ac196 [LiveIntervalAnalysis] Speed up creation of live ranges for physical registers
by using a segment set.

The patch addresses a compile-time performance regression in the LiveIntervals
analysis pass (see http://llvm.org/bugs/show_bug.cgi?id=18580). This regression
is especially critical when compiling long functions. Our analysis had shown
that the most of time is taken for generation of live intervals for physical
registers. Insertions in the middle of the array of live ranges cause quadratic
algorithmic complexity, which is apparently the main reason for the slow-down. 

Overview of changes:
- The patch introduces an additional std::set<Segment>* member in LiveRange for
  storing segments in the phase of initial creation. The set is used if this
  member is not NULL, otherwise everything works the old way. 
- The set of operations on LiveRange used during initial creation (i.e. used by
  createDeadDefs and extendToUses) have been reimplemented to use the segment
  set if it is available.
- After a live range is created the contents of the set are flushed to the
  segment vector, because the set is not as efficient as the vector for the
  later uses of the live range. After the flushing, the set is deleted and
  cannot be used again.
- The set is only for live ranges computed in
  LiveIntervalAnalysis::computeLiveInRegUnits() and getRegUnit() but not in
  computeVirtRegs(), because I did not bring any performance benefits to
  computeVirtRegs() and for some examples even brought a slow down.

Patch by Vaidas Gasiunas <vaidas.gasiunas@sap.com>

Differential Revision: http://reviews.llvm.org/D6013


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228421 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-06 18:42:41 +00:00
..
ADT ADT: Add int64_t interoperability to APSInt 2015-02-05 00:17:43 +00:00
Analysis [LV] Move addRuntimeCheck to LoopAccessAnalysis 2015-02-06 18:31:04 +00:00
AsmParser Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
Bitcode IR: Assembly and bitcode for GenericDebugNode 2015-02-03 21:54:14 +00:00
CodeGen [LiveIntervalAnalysis] Speed up creation of live ranges for physical registers 2015-02-06 18:42:41 +00:00
Config [Cygming] Seek also chkstk_ms, or JIT fails with DLL builds. It is fixup for r227519. 2015-01-30 13:01:19 +00:00
DebugInfo/DWARF Move DebugInfo to DebugInfo/DWARF. 2015-01-30 18:07:45 +00:00
ExecutionEngine [Orc] Make the ObjectLinkingLayer take ownership of object files until 2015-02-02 04:32:17 +00:00
IR Value: Remove superfluous typedefs and deprecated method. NFC. 2015-02-06 14:44:02 +00:00
IRReader Pass a MemoryBufferRef when we can avoid taking ownership. 2014-08-26 21:49:01 +00:00
LineEditor [C++11] Replace OwningPtr with std::unique_ptr in places where it doesn't break the API. 2014-04-21 09:34:48 +00:00
Linker Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
LTO [LTO API] split lto_codegen_compile to lto_codegen_optimize and 2015-02-03 18:39:15 +00:00
MC [MC] Remove various unused MCAsmInfo parameters. 2015-02-05 00:58:51 +00:00
Object dd the option, -link-opt-hints to llvm-objdump used with -macho to print the 2015-01-27 21:28:24 +00:00
Option Add an overload of getLastArgNoClaim taking two OptSpecifiers. 2014-09-12 19:42:53 +00:00
ProfileData InstrProf: Make CounterMappingRegions less confusing to construct 2015-02-03 23:59:33 +00:00
Support Add support for double / float to EndianStream 2015-02-05 03:30:08 +00:00
TableGen Make MultiClass::DefPrototypes own their Records to fix memory leaks. 2014-12-11 05:25:33 +00:00
Target [CodeGen] Add hook/combine to form vector extloads, enabled on X86. 2015-02-05 18:31:02 +00:00
Transforms Add missing include. 2015-02-04 18:16:53 +00:00
CMakeLists.txt Remove llvm_headers_do_not_build for the benefit of XCode and Visual Studio users. 2014-08-14 00:51:47 +00:00
InitializePasses.h Introduce print-memderefs to test isDereferenceablePointer 2015-02-06 01:46:42 +00:00
LinkAllIR.h
LinkAllPasses.h Introduce print-memderefs to test isDereferenceablePointer 2015-02-06 01:46:42 +00:00
module.modulemap Bring the modules buildbot back to life after r226940. 2015-01-24 01:55:52 +00:00
module.modulemap.build [modules] Add module maps for LLVM. These are not quite ready for prime-time 2014-05-21 02:46:14 +00:00
Pass.h Revert "[PM] Add pass run listeners to the pass manager." 2014-05-15 17:49:20 +00:00
PassAnalysisSupport.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
PassInfo.h Remove pimpl class from PassRegistry. 2014-06-12 16:06:51 +00:00
PassManager.h
PassRegistry.h [PM] Remove an unused and rather expensive mapping from an analysis 2014-10-06 00:30:59 +00:00
PassSupport.h Defining a new API for debug options that doesn't rely on static global cl::opts. 2014-10-15 21:54:35 +00:00