summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed version of 121434 with no new memory leaks.Rafael Espindola2010-12-104-27/+16
| | | | llvm-svn: 121471
* Revert my previous patch to make the valgrind bots happy.Rafael Espindola2010-12-104-16/+27
| | | | llvm-svn: 121461
* Initial support for the cfi directives. This is just enough to getRafael Espindola2010-12-094-27/+16
| | | | | | | | | | | f: .cfi_startproc nop .cfi_endproc assembled (on ELF). llvm-svn: 121434
* Initial support for nested CALLSEQ_START/CALLSEQ_END constructs in LegalizeDAG.Stuart Hastings2010-12-091-8/+24
| | | | | | Necessary for byval support on ARM. Radar 7662569. llvm-svn: 121412
* Remember to filter out reserved rergisters from the allocation order.Jakob Stoklund Olesen2010-12-091-1/+1
| | | | llvm-svn: 121411
* Add a forgotten initializer for CheckedFirstInterference.Jakob Stoklund Olesen2010-12-092-2/+5
| | | | llvm-svn: 121410
* Added register reassignment prototype to RAGreedy. It's a simpleAndrew Trick2010-12-095-19/+116
| | | | | | | heuristic to reshuffle register assignments when we can't find an available reg. llvm-svn: 121388
* 80-col fixups.Eric Christopher2010-12-091-9/+15
| | | | llvm-svn: 121356
* IntervalMap iterators are heavyweight, so avoid copying them around and useJakob Stoklund Olesen2010-12-092-5/+25
| | | | | | | | | | | references instead. Similarly, IntervalMap::begin() is almost as expensive as find(), so use find(x) instead of begin().advanceTo(x); This makes RegAllocBasic run another 5% faster. llvm-svn: 121344
* DW_FORM_data1 may not provide sufficient room for vtable index, use _udata ↵Devang Patel2010-12-091-1/+1
| | | | | | | | instead. This fixes radar 8730409. llvm-svn: 121323
* Properly deal with empty intervals when checking for interference.Jakob Stoklund Olesen2010-12-082-1/+3
| | | | llvm-svn: 121319
* Implement very primitive hinting support in RegAllocGreedy.Jakob Stoklund Olesen2010-12-081-1/+25
| | | | | | | The hint is simply tried first and then forgotten if it couldn't be allocated immediately. llvm-svn: 121306
* Store (priority,regnum) pairs in the priority queue instead of providing anJakob Stoklund Olesen2010-12-083-57/+25
| | | | | | | | | | | | | | | | | | | | | | | abstract priority queue interface in subclasses that want to override the priority calculations. Subclasses must provide a getPriority() implementation instead. This approach requires less code as long as priorities are expressable as simple floats, and it avoids the dangers of defining potentially expensive priority comparison functions. It also should speed up priority_queue operations since they no longer have to chase pointers when comparing registers. This is not measurable, though. Preferably, we shouldn't use floats to guide code generation. The use of floats here is derived from the use of floats for spill weights. Spill weights have a dynamic range that doesn't lend itself easily to a fixpoint implementation. When someone invents a stable spill weight representation, it can be reused for allocation priorities. llvm-svn: 121294
* Reword comment slightly.Eric Christopher2010-12-081-1/+1
| | | | llvm-svn: 121293
* Fix comment.Eric Christopher2010-12-081-1/+1
| | | | llvm-svn: 121285
* Trim includes.Jakob Stoklund Olesen2010-12-081-4/+0
| | | | llvm-svn: 121283
* Generalize PostRAHazardRecognizer so it can be used in any pass forAndrew Trick2010-12-083-18/+29
| | | | | | | | both forward and backward scheduling. Rename it to ScoreboardHazardRecognizer (Scoreboard is one word). Remove integer division from the scoreboard's critical path. llvm-svn: 121274
* Stub out RegAllocGreedy.Jakob Stoklund Olesen2010-12-082-0/+215
| | | | | | | | | This new register allocator is initially identical to RegAllocBasic, but it will receive all of the tricks that RegAllocBasic won't get. RegAllocGreedy will eventually replace linear scan. llvm-svn: 121234
* Move RABasic::addMBBLiveIns to the base class, it is generally useful.Jakob Stoklund Olesen2010-12-083-33/+35
| | | | | | | Minor optimization to the use of IntervalMap iterators. They are fairly heavyweight, so prefer SI.valid() over SI != end(). llvm-svn: 121217
* Switch LiveIntervalUnion from std::set to IntervalMap.Jakob Stoklund Olesen2010-12-074-212/+100
| | | | | | | This speeds up RegAllocBasic by 20%, not counting releaseMemory which becomes way faster. llvm-svn: 121201
* Simplify assertion.Jakob Stoklund Olesen2010-12-071-9/+2
| | | | llvm-svn: 121162
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-076-69/+59
| | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121120
* Remove unused member.Jakob Stoklund Olesen2010-12-071-8/+0
| | | | llvm-svn: 121098
* Undefined value in reg 0 may need a marker to identify end of source range.Devang Patel2010-12-061-4/+2
| | | | | | This will be used to truncate live range of DBG_VALUE instruction by register allocator and friends. llvm-svn: 121061
* If dbg_declare() or dbg_value() is not lowered by isel then emit DEBUG ↵Devang Patel2010-12-062-23/+14
| | | | | | message instead of creating DBG_VALUE for undefined value in reg0. llvm-svn: 121059
* Second try at making direct object emission produce the same resultsRafael Espindola2010-12-061-1/+1
| | | | | | | as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc bootstrap on darwin10 using darwin9's assembler and linker. llvm-svn: 121006
* Revert previous two patches while I try to find out how to make bothRafael Espindola2010-12-061-1/+1
| | | | | | linux and darwin assemblers happy :-( llvm-svn: 121004
* Add an EmitAbsValue helper method and use it in cases where we want to be sureRafael Espindola2010-12-061-1/+1
| | | | | | | that no relocations are used (on MochO). Fixes llc producing different output from llc + llvm-mc. llvm-svn: 121000
* Some cleanup before I start committing some incremental progress onCameron Zwarich2010-12-051-21/+22
| | | | | | StrongPHIElimination. llvm-svn: 120961
* Remove the PHIElimination.h header, as it is no longer needed.Cameron Zwarich2010-12-052-82/+55
| | | | llvm-svn: 120959
* I forgot to actually remove the FindCopyInsertPoint() declaration fromCameron Zwarich2010-12-051-8/+0
| | | | | | PHIElimination.h. llvm-svn: 120953
* Remove the SplitCriticalEdge() method declaration from PHIElimination.h. At oneCameron Zwarich2010-12-051-6/+0
| | | | | | | time, this method existed, but now PHIElimination uses the method of the same name on MachineBasicBlock. llvm-svn: 120952
* Move the FindCopyInsertPoint method of PHIElimination to a new standaloneCameron Zwarich2010-12-054-45/+89
| | | | | | function so that it can be shared with StrongPHIElimination. llvm-svn: 120951
* Remove PHIElimination's private copy of SkipPHIsAndLabels.Cameron Zwarich2010-12-042-31/+2
| | | | llvm-svn: 120918
* Remove unneeded zero arrays.Benjamin Kramer2010-12-042-4/+2
| | | | llvm-svn: 120910
* Rename virtRegMap to avoid confusion with the VirtRegMap that it isn't.Jakob Stoklund Olesen2010-12-031-5/+5
| | | | llvm-svn: 120846
* Coalesce debug locations when possible, causing less DBG_VALUE instructions toJakob Stoklund Olesen2010-12-031-2/+34
| | | | | | be emitted. llvm-svn: 120845
* Emit DBG_VALUE instructions from LiveDebugVariables.Jakob Stoklund Olesen2010-12-033-2/+192
| | | | llvm-svn: 120842
* Also update virtRegMap when renaming virtual registers.Jakob Stoklund Olesen2010-12-031-1/+11
| | | | llvm-svn: 120841
* Delete the StrongPHIElimination pass, leaving only a shell.Jakob Stoklund Olesen2010-12-031-1018/+22
| | | | | | | | | | The StrongPHIElimination pass did not work, and nobody has worked on it for two years. A rewrite is underway, so I am leaving this shell pass instead of deleting it completely. llvm-svn: 120830
* Update LiveDebugVariables during coalescing.Jakob Stoklund Olesen2010-12-023-0/+56
| | | | llvm-svn: 120720
* Implement the first half of LiveDebugVariables.Jakob Stoklund Olesen2010-12-024-5/+514
| | | | | | | | | | | | | | | | | | | Scan the MachineFunction for DBG_VALUE instructions, and replace them with a data structure similar to LiveIntervals. The live range of a DBG_VALUE is determined by propagating it down the dominator tree until a new DBG_VALUE is found. When a DBG_VALUE lives in a register, its live range is confined to the live range of the register's value. LiveDebugVariables runs before coalescing, so DBG_VALUEs are not artificially extended when registers are joined. The missing half will recreate DBG_VALUE instructions from the intervals when register allocation is complete. The pass is disabled by default. It can be enabled with the temporary command line option -live-debug-variables. llvm-svn: 120636
* PR5207: Rename overloaded APInt methods set(), clear(), flip() toJay Foad2010-12-013-7/+7
| | | | | | setAllBits(), setBit(unsigned), etc. llvm-svn: 120564
* Comment typo.Andrew Trick2010-11-301-1/+1
| | | | llvm-svn: 120504
* Enable sibling call optimization of libcalls which are expanded duringEvan Cheng2010-11-302-6/+35
| | | | | | | | | | | legalization time. Since at legalization time there is no mapping from SDNode back to the corresponding LLVM instruction and the return SDNode is target specific, this requires a target hook to check for eligibility. Only x86 and ARM support this form of sibcall optimization right now. rdar://8707777 llvm-svn: 120501
* Coding style. No significant functionality. Abandon linear scan styleAndrew Trick2010-11-304-524/+548
| | | | | | | | in favor of the widespread llvm style. Capitalize variables and add newlines for visual parsing. Rename variables for readability. And other cleanup. llvm-svn: 120490
* add TLI support indicating that jumps are more expensive than logical operationsChris Lattner2010-11-302-1/+4
| | | | | | and use this to disable a specific optimization. Patch by Micah Villmow! llvm-svn: 120435
* PR5207: Make APInt::set(), APInt::clear() and APInt::flip() return void.Jay Foad2010-11-301-2/+3
| | | | llvm-svn: 120413
* Stub out a new LiveDebugVariables pass.Jakob Stoklund Olesen2010-11-304-0/+109
| | | | | | | | | | | | | This analysis is going to run immediately after LiveIntervals. It will stay alive during register allocation and keep track of user variables mentioned in DBG_VALUE instructions. When the register allocator is moving values between registers and the stack, it is very hard to keep track of DBG_VALUE instructions. We usually get it wrong. This analysis maintains a data structure that makes it easy to update DBG_VALUE instructions. llvm-svn: 120385
* Merge System into Support.Michael J. Spencer2010-11-295-5/+5
| | | | llvm-svn: 120298
OpenPOWER on IntegriCloud