summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary argument.Rafael Espindola2011-04-272-4/+3
| | | | llvm-svn: 130343
* Rename getPersonalityPICSymbol to getCFIPersonalitySymbol, document it, andRafael Espindola2011-04-272-16/+44
| | | | | | | | | | | | | | | | | | give it a bit more responsibility. Also implement it for MachO. If hacked to use cfi, 32 bit MachO will produce .cfi_personality 155, L___gxx_personality_v0$non_lazy_ptr and 64 bit will produce .cfi_presonality ___gxx_personality_v0 The general idea is that .cfi_personality gets passed the final symbol. It is up to codegen to produce it if using indirect representation (like 32 bit MachO), but it is up to MC to decide which relocations to create. llvm-svn: 130341
* Simplify handling of variables with complex address (i.e. blocks variables)Devang Patel2011-04-273-44/+32
| | | | llvm-svn: 130339
* Make the fast-isel code for literal 0.0 a bit shorter/faster, since 0.0 is ↵Eli Friedman2011-04-271-2/+6
| | | | | | common. rdar://problem/9303592 . llvm-svn: 130338
* Remove unused function.Eli Friedman2011-04-271-47/+0
| | | | llvm-svn: 130337
* Fix indentation.Rafael Espindola2011-04-271-21/+21
| | | | llvm-svn: 130331
* Revert r130178. It turned out to be not the optimal path to emit complex ↵Devang Patel2011-04-271-4/+3
| | | | | | location expressions. llvm-svn: 130326
* If converter was being too cute. It look for root BBs (which don't haveEvan Cheng2011-04-271-18/+3
| | | | | | | | | | successors) and use inverse depth first search to traverse the BBs. However that doesn't work when the CFG has infinite loops. Simply do a linear traversal of all BBs work just fine. rdar://9344645 llvm-svn: 130324
* Also add <imp-def> operands for defined and dead super-registers when rewriting.Jakob Stoklund Olesen2011-04-271-6/+15
| | | | | | | We cannot rely on the <imp-def> operands added by LiveIntervals in all cases as demonstrated by the test case. llvm-svn: 130313
* Add a safe-guard against repeated splitting for some rare cases.Jakob Stoklund Olesen2011-04-263-3/+43
| | | | | | | The number of blocks covered by a live range must be strictly decreasing when splitting, otherwise we can't allow repeated splitting. llvm-svn: 130249
* Be careful about scheduling nodes above previous calls. It increase usages ofEvan Cheng2011-04-262-1/+61
| | | | | | | | | | | | more callee-saved registers and introduce copies. Only allows it if scheduling a node above calls would end up lessen register pressure. Call operands also has added ABI restrictions for register allocation, so be extra careful with hoisting them above calls. rdar://9329627 llvm-svn: 130245
* Print the label if we will use it in debug_frame.Rafael Espindola2011-04-261-2/+5
| | | | llvm-svn: 130232
* Refactor code. Keep dwarf register operation selection logic at one place.Devang Patel2011-04-262-72/+66
| | | | llvm-svn: 130231
* Use the new TRI->getLargestLegalSuperClass hook to constrain register class ↵Jakob Stoklund Olesen2011-04-261-50/+29
| | | | | | | | | | inflation. This has two effects: 1. We never inflate to a larger register class than what the sub-target can handle. 2. Completely unconstrained virtual registers get the largest possible register class. llvm-svn: 130229
* Fast-isel support for simple inline asms.Dan Gohman2011-04-261-10/+31
| | | | llvm-svn: 130205
* don't emit the symbol name twice for local bss and commonChris Lattner2011-04-261-6/+0
| | | | | | | | | | | symbols. For example, don't emit: .comm _i,4,2 ## @i ## @i instead emit: .comm _i,4,2 ## @i llvm-svn: 130192
* Fix typoEvan Cheng2011-04-261-1/+1
| | | | llvm-svn: 130190
* Print all the moves at a given label instead of just the first one.Rafael Espindola2011-04-262-6/+6
| | | | | | Remove previous DwarfCFI hack. llvm-svn: 130187
* Let dwarf writer allocate extra space in the debug location expression. This ↵Devang Patel2011-04-261-3/+4
| | | | | | space, if requested, will be used for complex addresses of the Blocks' variables. llvm-svn: 130178
* Rename a local variable.Devang Patel2011-04-251-17/+21
| | | | llvm-svn: 130171
* Rename a method to match what it really does.Devang Patel2011-04-253-8/+10
| | | | | | s/addVariableAddress/addFrameVariableAddress/g llvm-svn: 130170
* Do not drop a variable's complex address if it is not based on frame base.Devang Patel2011-04-251-1/+5
| | | | | | Observed this while reading code, so I do not have a test case handy here. llvm-svn: 130167
* A dbg.declare may not be in entry block, even if it is referring to an ↵Devang Patel2011-04-251-4/+0
| | | | | | incoming argument. However, It is appropriate to emit DBG_VALUE referring to this incoming argument in entry block in MachineFunction. llvm-svn: 130129
* Simplify the logic. Noticed by aKor.Rafael Espindola2011-04-241-2/+1
| | | | llvm-svn: 130116
* Synchronize the conditions for producing a .cfi_startproc and a .cfi_endproc.Rafael Espindola2011-04-241-1/+1
| | | | | | Fixes PR9787. llvm-svn: 130115
* Give SplitKit.h a header guard.Sebastian Redl2011-04-241-0/+5
| | | | llvm-svn: 130095
* Remove unused STL header includes.Jay Foad2011-04-234-4/+0
| | | | llvm-svn: 130068
* Teach FastISel to deal with instructions that have two immediate operands.Owen Anderson2011-04-221-10/+27
| | | | llvm-svn: 130033
* Let front-end tie subprogram declaration with subprogram definition directly.Devang Patel2011-04-221-38/+50
| | | | llvm-svn: 130028
* Always compare the cost of region splitting with the cost of per-block ↵Jakob Stoklund Olesen2011-04-221-6/+45
| | | | | | | | splitting. Sometimes it is better to split per block, and we missed those cases. llvm-svn: 130025
* Recommit the fix for rdar://9289512 with a couple tweaks toChris Lattner2011-04-221-17/+54
| | | | | | | | | | | fix bugs exposed by the gcc dejagnu testsuite: 1. The load may actually be used by a dead instruction, which would cause an assert. 2. The load may not be used by the current chain of instructions, and we could move it past a side-effecting instruction. Change how we process uses to define the problem away. llvm-svn: 130018
* DAGCombine: fold "(zext x) == C" into "x == (trunc C)" if the trunc is lossless.Benjamin Kramer2011-04-221-0/+36
| | | | | | | | | | | | On x86 this allows to fold a load into the cmp, greatly reducing register pressure. movzbl (%rdi), %eax cmpl $47, %eax -> cmpb $47, (%rdi) This shaves 8k off gcc.o on i386. I'll leave applying the patch in README.txt to Chris :) llvm-svn: 130005
* Do not leak argument's DbgVariables.Devang Patel2011-04-221-1/+1
| | | | llvm-svn: 130004
* TypoEvan Cheng2011-04-221-1/+1
| | | | llvm-svn: 129970
* Branch folding is folding a landing pad into a regular BB.Bill Wendling2011-04-221-1/+1
| | | | | | | | | | | | | | | An exception is thrown via a call to _cxa_throw, which we don't expect to return. Therefore, the "true" part of the invoke goes to a BB that has 'unreachable' as its only instruction. This is lowered into an empty MachineBB. The landing pad for this invoke, however, is directly after the "true" MBB. When the empty MBB is removed, the landing pad is directly below the BB with the invoke call. The unconditional branch is removed and then the two blocks are merged together. The testcase is too big for a regression test. <rdar://problem/9305728> llvm-svn: 129965
* Refactor.Devang Patel2011-04-212-30/+35
| | | | llvm-svn: 129938
* Don't recycle loop variables.Matt Beaumont-Gay2011-04-211-1/+1
| | | | llvm-svn: 129928
* Allow allocatable ranges from global live range splitting to be split again.Jakob Stoklund Olesen2011-04-213-7/+45
| | | | | | | | | | | | | | | | | | | | | These intervals are allocatable immediately after splitting, but they may be evicted because of later splitting. This is rare, but when it happens they should be split again. The remainder intervals that cannot be allocated after splitting still move directly to spilling. SplitEditor::finish can optionally provide a mapping from new live intervals back to the original interval indexes returned by openIntv(). Each original interval index can map to multiple new intervals after connected components have been separated. Dead code elimination may also add existing intervals to the list. The reverse mapping allows the SplitEditor client to treat the new intervals differently depending on the split region they came from. llvm-svn: 129925
* Add comment in output stream.Devang Patel2011-04-211-0/+3
| | | | llvm-svn: 129921
* Revert r1296656, "Fix rdar://9289512 - not folding load into compare at -O0...",Daniel Dunbar2011-04-211-41/+15
| | | | | | which broke a couple GCC test suite tests at -O0. llvm-svn: 129914
* Add debug output for rematerializable instructions.Jakob Stoklund Olesen2011-04-203-6/+10
| | | | llvm-svn: 129883
* Permit remat when a virtual register has multiple defs.Jakob Stoklund Olesen2011-04-201-5/+0
| | | | | | | | TII::isTriviallyReMaterializable() shouldn't depend on any properties of the register being defined by the instruction. Rematerialization is going to create a new virtual register anyway. llvm-svn: 129882
* Prefer cheap registers for busy live ranges.Jakob Stoklund Olesen2011-04-202-6/+45
| | | | | | | | | | | | | | On the x86-64 and thumb2 targets, some registers are more expensive to encode than others in the same register class. Add a CostPerUse field to the TableGen register description, and make it available from TRI->getCostPerUse. This represents the cost of a REX prefix or a 32-bit instruction encoding required by choosing a high register. Teach the greedy register allocator to prefer cheap registers for busy live ranges (as indicated by spill weight). llvm-svn: 129864
* ARM byval support. Will be enabled by another patch to the FE. ↵Stuart Hastings2011-04-201-3/+4
| | | | | | <rdar://problem/7662569> llvm-svn: 129858
* Remove unused arguments.Rafael Espindola2011-04-202-5/+3
| | | | llvm-svn: 129844
* Rewrite the expander for umulo/smulo to remember to sign extend the inputEric Christopher2011-04-201-10/+58
| | | | | | | | | manually and pass all (now) 4 arguments to the mul libcall. Add a new ExpandLibCall for just this (copied gratuitously from type legalization). Fixes rdar://9292577 llvm-svn: 129842
* ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OSDaniel Dunbar2011-04-201-1/+1
| | | | | | triple component. llvm-svn: 129838
* CodeGen: Eliminate a use of getDarwinMajorNumber().Daniel Dunbar2011-04-191-11/+3
| | | | | | | | | - There is a minor semantic change here (evidenced by the test change) for Darwin triples that have no version component. I debated changing the default behavior of isOSVersionLT, but decided it made more sense for triples to be explicit. llvm-svn: 129802
* Delete unnecessary variable. <rdar://problem/7662569>Stuart Hastings2011-04-191-11/+4
| | | | llvm-svn: 129796
* Avoid write-after-write issue hazards for Cortex-A9.Bob Wilson2011-04-191-10/+24
| | | | | | | | | | | Add a avoidWriteAfterWrite() target hook to identify register classes that suffer from write-after-write hazards. For those register classes, try to avoid writing the same register in two consecutive instructions. This is currently disabled by default. We should not spill to avoid hazards! The command line flag -avoid-waw-hazard can be used to enable waw avoidance. llvm-svn: 129772
OpenPOWER on IntegriCloud