summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PrologEpilogInserter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Unbreak non-debug build.Evan Cheng2009-05-111-0/+8
| | | | llvm-svn: 71457
* Shrink wrapping in PEI:John Mosby2009-05-111-610/+1066
| | | | | | | | | | | | | | | - reduces _static_ callee saved register spills and restores similar to Chow's original algorithm. - iterative implementation with simple heuristic limits to mitigate compile time impact. - handles placing spills/restores for multi-entry, multi-exit regions in the Machine CFG without splitting edges. - passes test-suite in LLCBETA mode. Added contains() method to ADT/SparseBitVector. llvm-svn: 71438
* Shrink wrapping in PEI: initial release. Finishing development, enable with ↵John Mosby2009-03-271-43/+913
| | | | | | --shrink-wrap. llvm-svn: 67828
* Fix PR3845: Avoid stale MachineInstruction pointer reference.Evan Cheng2009-03-241-3/+1
| | | | llvm-svn: 67649
* Apply the patch requested in PR3846.Chris Lattner2009-03-201-1/+1
| | | | llvm-svn: 67364
* Fix PEI to not walk off the start of a block when an updated instructionChris Lattner2009-03-191-2/+6
| | | | | | is the first in its block. This is PR3842. llvm-svn: 67304
* Rename getAnalysisToUpdate to getAnalysisIfAvailable.Duncan Sands2009-01-281-1/+1
| | | | llvm-svn: 63198
* Refactor code that adjusts the offsets of stack objects.Bill Wendling2008-11-071-79/+34
| | | | llvm-svn: 58829
* Don't recalculate the stack position of the stack protector.Bill Wendling2008-11-061-0/+2
| | | | llvm-svn: 58815
* - Rename stackprotector_{prologue,epilogue} to stackprotector_{create,check}.Bill Wendling2008-11-061-1/+1
| | | | | | | - Get rid of "HasStackProtector" in MachineFrameInfo. - Modify intrinsics to tell which are doing what with memory. llvm-svn: 58799
* Implement the stack protector stack accesses via intrinsics:Bill Wendling2008-11-061-0/+27
| | | | | | | | | | | | - stackprotector_prologue creates a stack object and stores the guard there. - stackprotector_epilogue reads the stack guard from the stack position created by stackprotector_prologue. - The PrologEpilogInserter was changed to make sure that the stack guard is first on the stack frame. llvm-svn: 58791
* Revert r58489. It isn't correct for all cases.Bill Wendling2008-10-311-2/+2
| | | | llvm-svn: 58523
* Don't skip over all "terminator" instructions when determining where to put theBill Wendling2008-10-311-2/+2
| | | | | | | callee-saved restore code. It could skip over conditional jumps accidentally. Instead, just skip the "return" instructions. llvm-svn: 58489
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-1/+1
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Instead of setPreservesAll, just mark them preseving machine loop info and ↵Evan Cheng2008-09-221-1/+2
| | | | | | machine dominators. llvm-svn: 56475
* Mark several codegen passes as preserving all analysis.Evan Cheng2008-09-221-0/+5
| | | | llvm-svn: 56469
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Fix a comment to say nonnegative instead of positive.Dan Gohman2008-07-161-1/+1
| | | | llvm-svn: 53681
* No need to align the stack if there are no stackDale Johannesen2008-06-301-1/+2
| | | | | | objects. Fixes a couple of tests on Linux. llvm-svn: 52921
* Fixes the last x86-64 test failure in compat.exp:Dale Johannesen2008-06-261-2/+6
| | | | | | | | | | | | | <16 x float> is 64-byte aligned (for some reason), which gets us into the stack realignment code. The computation changing FP-relative offsets to SP-relative was broken, assiging a spill temp to a location also used for parameter passing. This fixes it by rounding up the stack frame to a multiple of the largest alignment (I concluded it wasn't fixable without doing this, but I'm not very sure.) llvm-svn: 52750
* Fixed bug in bad behavior in calculateFrameObjectOffsets,Bruno Cardoso Lopes2008-06-031-1/+2
| | | | | | | the solution commited is different from the previous patch to avoid int and unsigned comparison llvm-svn: 51899
* Use precomputed value, if anyAnton Korobeynikov2008-04-231-1/+1
| | | | llvm-svn: 50164
* CleanupAnton Korobeynikov2008-04-231-3/+5
| | | | llvm-svn: 50160
* detabify llvm, patch by Mike Stump!Chris Lattner2008-03-201-36/+36
| | | | llvm-svn: 48577
* Miscellaneous clean-ups based on Evan's feedback:Bill Wendling2008-03-031-42/+52
| | | | | | | | | - Cleaned up how the prologue-epilogue inserter loops over the instructions. - Instead of restarting the processing of an instruction if we remove an implicit kill, just update the end iterator and make sure that the iterator isn't incremented. llvm-svn: 47870
* Multiple instructions can be inserted when eliminating frame indexes. We needBill Wendling2008-03-031-7/+24
| | | | | | | the register scavenger to process all of those new instructions instead of just the last one inserted. llvm-svn: 47860
* Don't track max alignment during stack object allocations since they can be ↵Evan Cheng2008-02-271-2/+1
| | | | | | deleted later. Let PEI compute it. llvm-svn: 47668
* Spiller now remove unused spill slots.Evan Cheng2008-02-271-0/+2
| | | | llvm-svn: 47657
* Adjust the MaxAlignment for the special register scavenging spill slot.Bill Wendling2008-02-211-0/+3
| | | | llvm-svn: 47452
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-11/+11
| | | | llvm-svn: 46930
* SDIsel processes llvm.dbg.declare by recording the variable debug ↵Evan Cheng2008-02-021-2/+5
| | | | | | | | | information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc. Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes. For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time. llvm-svn: 46659
* Remove the nasty LABEL hack with a much less evil one. Now ↵Evan Cheng2008-02-011-7/+0
| | | | | | llvm.dbg.func.start implies a stoppoint is set. SelectionDAGISel records a new source line but does not create a ISD::LABEL node for this special stoppoint. Asm printer will magically print this label. This ensures nothing is emitted before. llvm-svn: 46635
* Add an extra operand to LABEL nodes which distinguishes between debug, EH, ↵Evan Cheng2008-01-311-1/+1
| | | | | | or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution. llvm-svn: 46609
* Also avoid adding callee save code before debug labels.Evan Cheng2008-01-311-1/+9
| | | | llvm-svn: 46586
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-3/+3
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* Move a bunch more accessors from TargetInstrInfo to TargetInstrDescriptorChris Lattner2008-01-071-3/+2
| | | | llvm-svn: 45680
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-071-1/+1
| | | | | | | | | | | | | | | that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. llvm-svn: 45674
* Remove an unused variable.Duncan Sands2008-01-061-1/+0
| | | | llvm-svn: 45655
* I should not be allowed to commit when sleepy.Owen Anderson2008-01-051-2/+2
| | | | llvm-svn: 45608
* Move some more instruction creation methods from RegisterInfo into InstrInfo.Owen Anderson2008-01-011-4/+4
| | | | llvm-svn: 45484
* Rename SSARegMap -> MachineRegisterInfo in keeping with the idea Chris Lattner2007-12-311-4/+5
| | | | | | | | | | | | | | that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
* MachineOperand::getImmedValue -> MachineOperand::getImmChris Lattner2007-12-301-2/+2
| | | | llvm-svn: 45454
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Add a argument to storeRegToStackSlot and storeRegToAddr to specify whetherEvan Cheng2007-12-051-1/+1
| | | | | | the stored register is killed. llvm-svn: 44600
* Long live the exception handling!Anton Korobeynikov2007-07-141-2/+2
| | | | | | | | | | | | | | | This patch fills the last necessary bits to enable exceptions handling in LLVM. Currently only on x86-32/linux. In fact, this patch adds necessary intrinsics (and their lowering) which represent really weird target-specific gcc builtins used inside unwinder. After corresponding llvm-gcc patch will land (easy) exceptions should be more or less workable. However, exceptions handling support should not be thought as 'finished': I expect many small and not so small glitches everywhere. llvm-svn: 39855
* Fix PR1424.Lauro Ramos Venancio2007-05-311-1/+1
| | | | | | | When a function has FP, the register scavenging spill slot offset already was calculated. llvm-svn: 37371
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* If call frame is not part of stack frame and no dynamic alloc, ↵Evan Cheng2007-05-011-14/+44
| | | | | | eliminateFrameIndex() must adjust SP offset with size of call frames. llvm-svn: 36625
OpenPOWER on IntegriCloud