summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* SelectionDAGBuilder: style fixes (add space between end parentheses and open ↵Stephen Lin2013-07-061-10/+10
| | | | | | brace) llvm-svn: 185768
* Emit personality function and Dwarf EH data for Win64 SEH.Kai Nacke2013-07-061-9/+3
| | | | | | | | | | | Obviously the personality function should be emitted as language handler instead of the hard coded _GCC_specific_handler. The language specific data must be placed after the unwind information therefore it must not be emitted into a separate section. Reviewed by Charles Davis and Nico Rieck. llvm-svn: 185761
* DAGCombiner: Don't drop extension behavior when shrinking a load when unsafe.Benjamin Kramer2013-07-061-0/+7
| | | | | | | | | | | | ReduceLoadWidth unconditionally drops extensions from loads. Limit it to the case when all of the bits the extension would otherwise produce are dropped by the shrink. It would be possible to shrink the load in more cases by merging the extensions, but this isn't trivial and a very rare case. I left a TODO for that case. Fixes PR16551. llvm-svn: 185755
* Stop putting operations after a tail call.Tim Northover2013-07-061-0/+4
| | | | | | | | This prevents the emission of DAG-generated vreg definitions after a tail call be dropping them entirely (on the grounds that nothing could use them anyway, and they interfere with O0 CodeGen). llvm-svn: 185754
* MC: Implement COFF .linkonce directiveNico Rieck2013-07-061-3/+3
| | | | llvm-svn: 185753
* Use modern API to avoid exposing LiveInterval internals.Jakob Stoklund Olesen2013-07-051-5/+3
| | | | | | No functional change intended. llvm-svn: 185733
* Remove dead function.Jakob Stoklund Olesen2013-07-051-26/+0
| | | | llvm-svn: 185731
* [SystemZ] Remove no-op MVCsRichard Sandiford2013-07-051-1/+10
| | | | | | | | | | | The stack coloring pass has code to delete stores and loads that become trivially dead after coloring. Extend it to cope with single instructions that copy from one frame index to another. The testcase happens to show an example of this kicking in at the moment. It did occur in Real Code too though. llvm-svn: 185705
* Fix double renaming bug in stack coloring passRichard Sandiford2013-07-051-26/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The stack coloring pass renumbered frame indexes with a loop of the form: for each frame index FI for each instruction I that uses FI for each use of FI in I rename FI to FI' This caused problems if an instruction used two frame indexes F0 and F1 and if F0 was renamed to F1 and F1 to F2. The first time we visited the instruction we changed F0 to F1, then we changed both F1s to F2. In other words, the problem was that SSRefs recorded which instructions used an FI, but not which MachineOperands and MachineMemOperands within that instruction used it. This is easily fixed for MachineOperands by walking the instructions once and processing each operand in turn. There's already a loop to do that for dead store elimination, so it seemed more efficient to fuse the two at the block level. MachineMemOperands are more tricky because they can be shared between instructions. The patch handles them by making SSRefs an array of MachineMemOperands rather than an array of MachineInstrs. We might end up processing the same MachineMemOperand twice, but that's OK because we always know from the SSRefs index what the original frame index was. llvm-svn: 185703
* [SystemZ] Clean up register scavenging codeRichard Sandiford2013-07-051-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | SystemZ wants normal register scavenging slots, as close to the stack or frame pointer as possible. The only reason it was using custom code was because PrologEpilogInserter assumed an x86-like layout, where the frame pointer is at the opposite end of the frame from the stack pointer. This meant that when frame pointer elimination was disabled, the slots ended up being as close as possible to the incoming stack pointer, which is the opposite of what we want on SystemZ. This patch adds a new knob to say which layout is used and converts SystemZ to use target-independent scavenging slots. It's one of the pieces needed to support frame-to-frame MVCs, where two slots might be required. The ABI requires us to allocate 160 bytes for calls, so one approach would be to use that area as temporary spill space instead. It would need some surgery to make sure that the slot isn't live across a call though. I stuck to the "isFPCloseToIncomingSP - ..." style comment on the "do what the surrounding code does" principle. The FP case is already covered by several Systemz/frame-* tests, which fail without the PrologueEpilogueInserter change, so no new ones are needed. No behavioural change intended. llvm-svn: 185696
* Simplify code. No functionality change.Benjamin Kramer2013-07-051-7/+3
| | | | llvm-svn: 185689
* Initialize object file info before output streamerNico Rieck2013-07-041-2/+2
| | | | | | | | | r179494 switched to using the object file info to retrieve the default text section for some MC streamers. It is possible that initializing an MC streamer can request sections before the object file info is initialized when the AutoInitSections flag is set on the streamer. llvm-svn: 185670
* Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.Jakob Stoklund Olesen2013-07-042-19/+0
| | | | | | These exception-related opcodes are not used any longer. llvm-svn: 185625
* Typo.Jakob Stoklund Olesen2013-07-041-1/+1
| | | | llvm-svn: 185618
* Simplify landing pad lowering.Jakob Stoklund Olesen2013-07-042-26/+21
| | | | | | | | | | | | | | | | | | | | | Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering landing pad arguments. These nodes were previously legalized into CopyFromReg nodes, but that never worked properly because the CopyFromReg node weren't guaranteed to be scheduled at the top of the basic block. This meant the exception pointer and selector registers could be clobbered before being copied to a virtual register. This patch copies the two physical registers to virtual registers at the beginning of the basic block, and lowers the landingpad instruction directly to two CopyFromReg nodes reading the *virtual* registers. This is safe because virtual registers don't get clobbered. A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION nodes. llvm-svn: 185617
* FastISel can only apend to basic blocks.Jakob Stoklund Olesen2013-07-041-8/+5
| | | | | | | | | | Compute the insertion point from the end of the basic block instead of skipping labels from the front. This caused failures in landing pads when live-in copies where inserted before instruction selection. llvm-svn: 185616
* Live-in copies go *after* EH_LABELs.Jakob Stoklund Olesen2013-07-041-1/+1
| | | | | | This will soon be tested by exception handling working at all. llvm-svn: 185615
* Revert r185595-185596 which broke buildbots.Jakob Stoklund Olesen2013-07-044-21/+45
| | | | | | | Revert "Simplify landing pad lowering." Revert "Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes." llvm-svn: 185600
* Remove the EXCEPTIONADDR, EHSELECTION, and LSDAADDR ISD opcodes.Jakob Stoklund Olesen2013-07-032-19/+0
| | | | | | These exception-related opcodes are not used any longer. llvm-svn: 185596
* Simplify landing pad lowering.Jakob Stoklund Olesen2013-07-032-26/+21
| | | | | | | | | | | | | | | | | | | | | Stop using the ISD::EXCEPTIONADDR and ISD::EHSELECTION when lowering landing pad arguments. These nodes were previously legalized into CopyFromReg nodes, but that never worked properly because the CopyFromReg node weren't guaranteed to be scheduled at the top of the basic block. This meant the exception pointer and selector registers could be clobbered before being copied to a virtual register. This patch copies the two physical registers to virtual registers at the beginning of the basic block, and lowers the landingpad instruction directly to two CopyFromReg nodes reading the *virtual* registers. This is safe because virtual registers don't get clobbered. A future patch will remove the ISD::EXCEPTIONADDR and ISD::EHSELECTION nodes. llvm-svn: 185595
* Add MachineBasicBlock::addLiveIn().Jakob Stoklund Olesen2013-07-031-0/+33
| | | | | | | This function adds a live-in physical register to an MBB and ensures that it is copied to a virtual register immediately. llvm-svn: 185594
* Hoist all of the Entry.getLoc() calls int a single variable.Eric Christopher2013-07-031-7/+8
| | | | llvm-svn: 185589
* Make DotDebugLocEntry a class, reorder the members along with commentsEric Christopher2013-07-032-14/+29
| | | | | | for them and update all uses. llvm-svn: 185588
* Elaborate on comment.Eric Christopher2013-07-031-1/+1
| | | | llvm-svn: 185586
* Add names to the header file since they help in documenting the APIEric Christopher2013-07-031-10/+11
| | | | | | (and for consistency). llvm-svn: 185585
* Move typedefs inside the class that they belong to.Eric Christopher2013-07-031-10/+7
| | | | llvm-svn: 185573
* Remove unused field.Eric Christopher2013-07-031-12/+19
| | | | llvm-svn: 185523
* Constify a few functions.Eric Christopher2013-07-031-3/+3
| | | | llvm-svn: 185520
* Use SmallVectorImpl::const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-031-4/+4
| | | | | | specifying the vector size. llvm-svn: 185514
* Use SmallVectorImpl instead of SmallVector as method argument to avoid ↵Craig Topper2013-07-032-2/+2
| | | | | | specifying vector size. llvm-svn: 185513
* Use SmallVectorImpl instead of SmallVector for iterators and references to ↵Craig Topper2013-07-0313-37/+37
| | | | | | avoid specifying the vector size unnecessarily. llvm-svn: 185512
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-031-2/+2
| | | | | | specifying the vector size. llvm-svn: 185509
* Introduce some typedefs for DenseMaps containing SmallVectors so the vector ↵Craig Topper2013-07-032-7/+9
| | | | | | size doesn't have to repeated when creating iterators for the DenseMap. llvm-svn: 185508
* Return SmallVectorImpl& instead of SmallVector& in a couple places to avoid ↵Craig Topper2013-07-031-2/+2
| | | | | | having to specify the vector size in multiple places. llvm-svn: 185507
* Use SmallVectorImpl& instead of SmallVector& to avoid needlessly ↵Craig Topper2013-07-031-6/+6
| | | | | | respecifying the small vector size. llvm-svn: 185505
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-031-8/+8
| | | | | | specifying the vector size. llvm-svn: 185504
* Avoid doing a lot of computation when we have multiple ranges andEric Christopher2013-07-031-26/+29
| | | | | | | avoid adding information for the debug_inlined section when it isn't going to be emitted anyhow. llvm-svn: 185500
* Move iterator to where it's used and update comments.Eric Christopher2013-07-031-1/+3
| | | | llvm-svn: 185498
* Move instance variable before experimental section.Eric Christopher2013-07-031-4/+5
| | | | llvm-svn: 185497
* Fix typo to make grep for DW_AT_comp_dir work without case-insensitiveEric Christopher2013-07-031-1/+1
| | | | | | grep. llvm-svn: 185496
* Remove unnecessary forward declare.Eric Christopher2013-07-031-1/+0
| | | | llvm-svn: 185495
* Add a helpful comment.Eric Christopher2013-07-031-0/+2
| | | | llvm-svn: 185492
* addConstantValue, addConstantFPValue never returned anything butEric Christopher2013-07-032-30/+18
| | | | | | true, so remove the return value and propagate accordingly. llvm-svn: 185490
* Debug Info: use module flag to set up Dwarf version.Manman Ren2013-07-024-6/+44
| | | | | | | | Correctly handles ref_addr depending on the Dwarf version. Emit Dwarf with version from module flag. TODO: turn on/off features depending on the Dwarf version. llvm-svn: 185484
* Fix comment.Eric Christopher2013-07-021-1/+1
| | | | llvm-svn: 185480
* [DebugInfo] Allow getDebugThreadLocalSymbol to return MCExprUlrich Weigand2013-07-021-3/+3
| | | | | | | | | | | This allows getDebugThreadLocalSymbol to return a generic MCExpr instead of just a MCSymbolRefExpr. This is in preparation for supporting debug info for TLS variables on PowerPC, where we need to describe the variable location using a more complex expression than just MCSymbolRefExpr. llvm-svn: 185460
* [DebugInfo] Hold generic MCExpr in AddrPoolUlrich Weigand2013-07-022-9/+9
| | | | | | | | | | | This changes the AddrPool infrastructure to enable it to hold generic MCExpr expressions, not just MCSymbolRefExpr. This is in preparation for supporting debug info for TLS variables on PowerPC, where we need to describe the variable location using a more complex expression than just MCSymbolRefExpr. llvm-svn: 185459
* [DebugInfo] Introduce DIEExpr variant of DIEValue to hold MCExpr valuesUlrich Weigand2013-07-025-21/+80
| | | | | | | | | | | | This partially reverts r185202 and restores DIELabel to hold plain MCSymbol references. Instead, we add a new subclass DIEExpr of DIEValue that can hold generic MCExpr references. This is in preparation for supporting debug info for TLS variables on PowerPC, where we need to describe the variable location using a more complex expression than just MCSymbolRefExpr. llvm-svn: 185458
* Revert (most of) r185393 and r185395.Jakob Stoklund Olesen2013-07-022-80/+82
| | | | | | | | | | | "Remove floating point computations form SpillPlacement.cpp." These commits caused test failures in lencod on clang-native-arm-lnt. I suspect these changes are only exposing an existing issue, but reverting anyway to keep the bots passing while we investigate. llvm-svn: 185447
* Remove address spaces from MC.Rafael Espindola2013-07-022-50/+43
| | | | | | | | This is dead code since PIC16 was removed in 2010. The result was an odd mix, where some parts would carefully pass it along and others would assert it was zero (most of the object streamer for example). llvm-svn: 185436
OpenPOWER on IntegriCloud