aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* Allow target to specify regclass for which antideps will only be broken ↵David Goodwin2009-11-135-9/+9
| | | | | | along the critical path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88682 91177308-0d34-0410-b5e6-96231b3b80d8
* Support fp64 immediate zero, this fixes only part of PR5445 Bruno Cardoso Lopes2009-11-132-3/+22
| | | | | | | | because the testcase is triggering one more bug. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@88674 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust isConstantSplat to allow for big-endian targets.Dale Johannesen2009-11-131-2/+2
| | | | | | | | PPC is such a target; make it work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87060 91177308-0d34-0410-b5e6-96231b3b80d8
* Block renumberingJim Grosbach2009-11-131-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87056 91177308-0d34-0410-b5e6-96231b3b80d8
* use lower case for readabilityJim Grosbach2009-11-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87054 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bootstrap failure.David Greene2009-11-132-24/+63
| | | | | | | | | Provide special isLoadFromStackSlotPostFE and isStoreToStackSlotPostFE interfaces to explicitly request checking for post-frame ptr elimination operands. This uses a heuristic so it isn't reliable for correctness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87047 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the MachineFunction argument of getFrameRegister const.David Greene2009-11-1217-18/+19
| | | | | | | This also fixes a build error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87027 91177308-0d34-0410-b5e6-96231b3b80d8
* Add hasLoadFromStackSlot and hasStoreToStackSlot to return whether aDavid Greene2009-11-122-12/+79
| | | | | | | | | | | | | | | | machine instruction loads or stores from/to a stack slot. Unlike isLoadFromStackSlot and isStoreFromStackSlot, the instruction may be something other than a pure load/store (e.g. it may be an arithmetic operation with a memory operand). This helps AsmPrinter determine when to print a spill/reload comment. This is only a hint since we may not be able to figure this out in all cases. As such, it should not be relied upon for correctness. Implement for X86. Return false by default for other architectures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87026 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a bool flag to StackObjects telling whether they reference spillDavid Greene2009-11-1220-77/+109
| | | | | | | | | | | | | | slots. The AsmPrinter will use this information to determine whether to print a spill/reload comment. Remove default argument values. It's too easy to pass a wrong argument value when multiple arguments have default values. Make everything explicit to trap bugs early. Update all targets to adhere to the new interfaces.. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87022 91177308-0d34-0410-b5e6-96231b3b80d8
* Add compare_lower and equals_lower methods to StringRef. Switch all users ofBenjamin Kramer2009-11-121-2/+2
| | | | | | | StringsEqualNoCase (from StringExtras.h) to it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@87020 91177308-0d34-0410-b5e6-96231b3b80d8
* Update TB[BH] layout optimization. Add support for moving the target blockJim Grosbach2009-11-121-33/+115
| | | | | | | | | to directly follow the jump table. Move the layout changes to prior to any constant island handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86999 91177308-0d34-0410-b5e6-96231b3b80d8
* Use table to separate opcode from operands.Evan Cheng2009-11-121-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86965 91177308-0d34-0410-b5e6-96231b3b80d8
* isLegalICmpImmediate should take a signed integer; code clean up.Evan Cheng2009-11-122-32/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86964 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 86857. It's causing consumer-typeset to fail, and there's a better ↵Jim Grosbach2009-11-121-7/+4
| | | | | | way to do it forthcoming anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86945 91177308-0d34-0410-b5e6-96231b3b80d8
* A real solution for the first part of PR5445Bruno Cardoso Lopes2009-11-111-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86895 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TargetLowering::isLegalICmpImmediate. It tells LSR what immediate can be ↵Evan Cheng2009-11-112-0/+18
| | | | | | folded into target icmp instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86858 91177308-0d34-0410-b5e6-96231b3b80d8
* Do jump table adjustment before constant island allocationJim Grosbach2009-11-111-4/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86857 91177308-0d34-0410-b5e6-96231b3b80d8
* Set isBarrier = 1 on return instructions, as they are control barriers.Dan Gohman2009-11-115-4/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86851 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a tab in INT3's asm string, for consistency.Dan Gohman2009-11-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86850 91177308-0d34-0410-b5e6-96231b3b80d8
* another const prop failure.Chris Lattner2009-11-111-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86848 91177308-0d34-0410-b5e6-96231b3b80d8
* add a noteChris Lattner2009-11-111-0/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86847 91177308-0d34-0410-b5e6-96231b3b80d8
* The TBB and TBH instructions for Thumb2 are really handy for jump tables, butJim Grosbach2009-11-111-3/+96
| | | | | | | | | | | | | can only branch forward. To best take advantage of them, we'd like to adjust the basic blocks around a bit when reasonable. This patch puts basics in place to do that, with a super-simple algorithm for backwards jump table targets that creates a new branch after the jump table which branches backwards. Real heuristics for reordering blocks or other modifications rather than inserting branches will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86791 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-gcc/clang don't (won't?) need this hack.Daniel Dunbar2009-11-111-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86769 91177308-0d34-0410-b5e6-96231b3b80d8
* add a noteChris Lattner2009-11-101-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86756 91177308-0d34-0410-b5e6-96231b3b80d8
* I did this a week or two agoChris Lattner2009-11-101-6/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86754 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't mark conditional branch instructions as control barriers.Dan Gohman2009-11-101-14/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86732 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify how the prologue encoded the "move" information for the FDE. GCCBill Wendling2009-11-101-31/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | generates a sequence similar to this: __Z4funci: LFB2: mflr r0 LCFI0: stmw r30,-8(r1) LCFI1: stw r0,8(r1) LCFI2: stwu r1,-80(r1) LCFI3: mr r30,r1 LCFI4: where LCFI3 and LCFI4 are used by the FDE to indicate what the FP, LR, and other things are. We generated something more like this: Leh_func_begin1: mflr r0 stw r31, 20(r1) stw r0, 8(r1) Llabel1: stwu r1, -80(r1) Llabel2: mr r31, r1 Note that we are missing the "mr" instruction. This patch makes it more like the GCC output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86729 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Thumb1 address mode printing, instead ofEvan Cheng2009-11-101-5/+2
| | | | | | | | | | | [r0, #2 * 4] Now [r0, #8] This makes Thumb2 assembly more uniform and frankly the scale doesn't add much. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86707 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Evan Cheng2009-11-101-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86706 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a monstrous hack to improve X86ISelDAGToDAG compile time.Daniel Dunbar2009-11-101-0/+8
| | | | | | | | | | - Force NDEBUG on in any Release build. This drops the compile time to ~100s from ~600s, in Release mode. - This may just be a temporary workaround, I don't know the true nature of the gcc-4.2 compile time performance problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86695 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5445Bruno Cardoso Lopes2009-11-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86651 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix DenseMap iterator constness.Jeffrey Yasskin2009-11-102-6/+6
| | | | | | | | | | | | | | | | | | | | This patch forbids implicit conversion of DenseMap::const_iterator to DenseMap::iterator which was possible because DenseMapIterator inherited (publicly) from DenseMapConstIterator. Conversion the other way around is now allowed as one may expect. The template DenseMapConstIterator is removed and the template parameter IsConst which specifies whether the iterator is constant is added to DenseMapIterator. Actually IsConst parameter is not necessary since the constness can be determined from KeyT but this is not relevant to the fix and can be addressed later. Patch by Victor Zverovich! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86636 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed to address code review. No functional changes.David Goodwin2009-11-105-13/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86634 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow targets to specify register classes whose member registers should not ↵David Goodwin2009-11-102-4/+10
| | | | | | be renamed to break anti-dependencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86628 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the default is 'enabled,' a separate command line option for ARM isJim Grosbach2009-11-091-8/+1
| | | | | | not necessary. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86621 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable dynamic stack realignment by default.Jim Grosbach2009-11-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86604 91177308-0d34-0410-b5e6-96231b3b80d8
* Set dynamic stack realignment to real values.Jim Grosbach2009-11-091-11/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86602 91177308-0d34-0410-b5e6-96231b3b80d8
* Similar to r86588, but for Darwin this time.Bill Wendling2009-11-091-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86592 91177308-0d34-0410-b5e6-96231b3b80d8
* The jump table was being generated before the end label for exception handlingBill Wendling2009-11-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | was generated. This caused code like this: ## The asm code for the function .section __TEXT,__const .align 2 lJTI11_0: LJTI11_0: .long LBB11_16 .long LBB11_4 .long LBB11_5 .long LBB11_6 .long LBB11_7 .long LBB11_8 .long LBB11_9 .long LBB11_10 .long LBB11_11 .long LBB11_12 .long LBB11_13 .long LBB11_14 Leh_func_end11: ## <---now in the wrong section! The `Leh_func_end11' would then end up in the wrong section, causing the resulting EH frame information to be wrong: __ZL11CheckRightsjPKcbRbRP6NSData.eh: .set Lset500eh,Leh_frame_end11-Leh_frame_begin11 .long Lset500eh ; Length of Frame Information Entry Leh_frame_begin11: .long Leh_frame_begin11-Leh_frame_common .long Leh_func_begin11-. .set Lset501eh,Leh_func_end11-Leh_func_begin11 .long Lset501eh ; FDE address range `Lset501eh' is now something huge instead of the real value. The X86 back-end generates the jump table after the EH information is emitted. Do the same here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86588 91177308-0d34-0410-b5e6-96231b3b80d8
* Work around assembler not recognizing #0.0 form immediate for vmcpJim Grosbach2009-11-091-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86548 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR5149.Bruno Cardoso Lopes2009-11-092-8/+6
| | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=5149 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86543 91177308-0d34-0410-b5e6-96231b3b80d8
* Use Unified Assembly Syntax for the ARM backend.Jim Grosbach2009-11-0917-295/+294
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86494 91177308-0d34-0410-b5e6-96231b3b80d8
* Add and-not (bic) patterns. Based heavily on patch by Brian Lucas!Anton Korobeynikov2009-11-081-1/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86471 91177308-0d34-0410-b5e6-96231b3b80d8
* Move OR patterns upper to all logical stuff. No functionality change.Anton Korobeynikov2009-11-081-56/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86470 91177308-0d34-0410-b5e6-96231b3b80d8
* Some nice peephole patterns. Based on patch by Brian Lucas!Anton Korobeynikov2009-11-081-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86469 91177308-0d34-0410-b5e6-96231b3b80d8
* Print tab before operand of jccAnton Korobeynikov2009-11-081-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86468 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix invalid operand updates & implement post-inc memory operandsAnton Korobeynikov2009-11-082-16/+94
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86466 91177308-0d34-0410-b5e6-96231b3b80d8
* Throw an error when stack realignment stuff fails instead of silentAnton Korobeynikov2009-11-081-3/+7
| | | | | | code miscompilation git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86463 91177308-0d34-0410-b5e6-96231b3b80d8
* Make TargetData::getStringRepresentation spit out native integer types,Chris Lattner2009-11-081-0/+7
| | | | | | | this gives llvm-gcc generated modules the right data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86435 91177308-0d34-0410-b5e6-96231b3b80d8
* Use aligned load/store instructions for spilling Q registers when we know ↵Jim Grosbach2009-11-082-8/+25
| | | | | | the stack slot is 128 bit aligned git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86425 91177308-0d34-0410-b5e6-96231b3b80d8