aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
...
* Iterate over globals once and sectionize them into appropriate sections.Sanjiv Gupta2009-05-124-78/+111
| | | | | | | | Later in asmprinter, go over thsese sections and print them. Do not print empty sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71560 91177308-0d34-0410-b5e6-96231b3b80d8
* We do not need to create a label for external defs and decls,Sanjiv Gupta2009-05-122-17/+4
| | | | | | | just emit a comment for readability. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71544 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark mayLoad, mayStore for insns correctly and use themSanjiv Gupta2009-05-123-24/+14
| | | | | | | to check if an insn is accessing memory during mem sel optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71537 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor the code for collecting IV users out of LSR into an IVUsers class,Dan Gohman2009-05-121-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | and generalize it so that it can be used by IndVarSimplify. Implement the base IndVarSimplify transformation code using IVUsers. This removes TestOrigIVForWrap and associated code, as ScalarEvolution now has enough builtin overflow detection and folding logic to handle all the same cases, and more. Run "opt -iv-users -analyze -disable-output" on your favorite loop for an example of what IVUsers does. This lets IndVarSimplify eliminate IV casts and compute trip counts in more cases. Also, this happens to finally fix the remaining testcases in PR1301. Now that IndVarSimplify is being more aggressive, it occasionally runs into the problem where ScalarEvolutionExpander's code for avoiding duplicate expansions makes it difficult to ensure that all expanded instructions dominate all the instructions that will use them. As a temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function to fix up instructions inserted by SCEVExpander. Fortunately, this code is contained, and can be easily removed once a more comprehensive solution is available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71535 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid unneeded SIB byte encoding. Patch by Zoltan Varga.Evan Cheng2009-05-122-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71520 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't #include DerivedTypes.h from TargetData.h.Jay Foad2009-05-111-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71468 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix two wording errors that Duncan spotted.Dan Gohman2009-05-111-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71459 91177308-0d34-0410-b5e6-96231b3b80d8
* LLVM has unaligned loads and stores now.Dan Gohman2009-05-111-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71449 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade this example to new-style syntax.Dan Gohman2009-05-111-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71447 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert a subtract into a negate and an add when it helps x86Dan Gohman2009-05-112-1/+71
| | | | | | | address folding. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71446 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some done things: we have nocapture and SROA is smarter.Chris Lattner2009-05-111-77/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71443 91177308-0d34-0410-b5e6-96231b3b80d8
* add a noteChris Lattner2009-05-111-0/+35
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71442 91177308-0d34-0410-b5e6-96231b3b80d8
* Change TargetData::getIntPtrType() to return an IntegerType instead ofJay Foad2009-05-111-1/+1
| | | | | | just a Type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71426 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix more naming issues.Sanjiv Gupta2009-05-114-30/+69
| | | | | | | | | compiler libcalls start with .lib. now. fixed section names. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71424 91177308-0d34-0410-b5e6-96231b3b80d8
* Detect calls to compiler intrinsics and emit an extern declarations Sanjiv Gupta2009-05-114-10/+43
| | | | | | | | | | | | | only for those. These extern declarations to intrinsics are currently being emitted at the bottom of generated .s file, which works fine with gpasm(not sure about MPSAM though). PIC16 linker generates errors for few cases (function-args/struct_args_5) if you do not include any extern declarations (even if no intrinsics are being used), but that needs to be fixed in the linker itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71423 91177308-0d34-0410-b5e6-96231b3b80d8
* Module iterator contains list of filescope functions as well, we don't need ↵Sanjiv Gupta2009-05-101-2/+2
| | | | | | to emit and global declarations for them. This was working earlier and was broken during one of the recent commit for PIC16 naming. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71394 91177308-0d34-0410-b5e6-96231b3b80d8
* Add imm-reg and imm-mem patters for cmp on msp430Anton Korobeynikov2009-05-101-0/+14
| | | | | | (imm is allowed to be source operand, not dest...) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71393 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed lowering and asmprinter to use ABI Names class called PAN.Sanjiv Gupta2009-05-107-202/+281
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71386 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a completed optimization. Add a potential optimization I ran Eli Friedman2009-05-091-17/+9
| | | | | | | | into. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71352 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-0924-46/+46
| | | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71349 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 16 bit arithmetic while retrieving the address of callee's frame during ↵Sanjiv Gupta2009-05-091-7/+16
| | | | | | indirect function calls, and set pclath before every call to retrieve the frame address. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71323 91177308-0d34-0410-b5e6-96231b3b80d8
* PPC::B and PPC::BCC's target operand may be an immediate.Evan Cheng2009-05-081-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71282 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out cycle-finder code and make it generic.Anton Korobeynikov2009-05-081-106/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71241 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow 8 bit select in custom inserterAnton Korobeynikov2009-05-081-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71239 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand UREM / SREM into libcallsAnton Korobeynikov2009-05-081-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71236 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 8 bit selectAnton Korobeynikov2009-05-081-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71235 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4152: asm constraint validation happens before dag combine, so weChris Lattner2009-05-081-29/+28
| | | | | | | | need to work a bit to combine things like (x+c1+c2) into x+c3. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71232 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize code placement in loop to eliminate unconditional branches or move ↵Evan Cheng2009-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unconditional branch to the outside of the loop. e.g. /// A: /// ... /// <fallthrough to B> /// /// B: --> loop header /// ... /// jcc <cond> C, [exit] /// /// C: /// ... /// jmp B /// /// ==> /// /// A: /// ... /// jmp B /// /// C: --> new loop header /// ... /// <fallthough to B> /// /// B: /// ... /// jcc <cond> C, [exit] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71209 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing #include for "strlen" which is used inline in this header. FixesNick Lewycky2009-05-081-0/+1
| | | | | | | build under gcc 4.3. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71208 91177308-0d34-0410-b5e6-96231b3b80d8
* Moved pic16 naming functions to correct place.Sanjiv Gupta2009-05-083-84/+79
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71207 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate compiler warnings.Evan Cheng2009-05-071-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71149 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Updated lib/Target/PIC16/CMakeLists.txt.Oscar Fuentes2009-05-061-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71115 91177308-0d34-0410-b5e6-96231b3b80d8
* Use X86AddrNumOperands instead of magic constant oneDale Johannesen2009-05-061-1/+2
| | | | | | | | | | | | more place. This fixes a bunch of x86-64 JIT regressions. (Introduced when the value of the magic constant changed in 68645. At the time apparently nobody noticed; failures were hidden in 70343-70439 by an unrelated bug, so showed up again as "new" failures in 70440.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71106 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit banksel and movlp instructions.Sanjiv Gupta2009-05-0612-142/+586
| | | | | | | | | Split large global data (both initialized and un-initialized) into multiple sections of <= 80 bytes. Provide routines to manage PIC16 ABI naming conventions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71073 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic support for code generation of Chris Lattner2009-05-052-0/+17
| | | | | | | addrspace(257) -> FS relative on x86. Patch by Zoltan Varga! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70992 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert part of 70929 that has to do with determining whether a SIB byte is ↵Evan Cheng2009-05-052-3/+3
| | | | | | needed. It causes a lot of x86_64 JIT failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70986 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getInstrOperandRegClass from the scheduler to TargetInstrInfo.Evan Cheng2009-05-051-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70950 91177308-0d34-0410-b5e6-96231b3b80d8
* - Avoid the longer SIB encoding on x86_64 when it's not needed.Evan Cheng2009-05-042-9/+24
| | | | | | | | - Synchronize instruction length computation code in X86InstrInfo with code in X86CodeEmitter.cpp Patch by Zoltan Varga. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70929 91177308-0d34-0410-b5e6-96231b3b80d8
* X86FastISel doesn't support the -tailcallopt ABI.Dan Gohman2009-05-041-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70902 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix code emission for conditional branches.asl2009-05-042-4/+2
| | | | | | Patch by Collin Winter! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70898 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle implicit zext in a better way. Shamelessly stolen from x86 backend.Anton Korobeynikov2009-05-031-0/+16
| | | | | | Thanks for Dan Gohman for suggestion! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70782 91177308-0d34-0410-b5e6-96231b3b80d8
* Update due to mainline API changeAnton Korobeynikov2009-05-035-19/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70769 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TODO list :)Anton Korobeynikov2009-05-031-0/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70768 91177308-0d34-0410-b5e6-96231b3b80d8
* Make handling of conditional stuff much more straightforwardAnton Korobeynikov2009-05-033-95/+60
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70767 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporary disable imm patterns for cmp. Actually, all cmp-related stuff ↵Anton Korobeynikov2009-05-031-18/+82
| | | | | | (select_cc, setcc, br_cc). needs to be rethought git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70766 91177308-0d34-0410-b5e6-96231b3b80d8
* Expand divisions into libcallsAnton Korobeynikov2009-05-031-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70765 91177308-0d34-0410-b5e6-96231b3b80d8
* Custom lower SIGN_EXTENDAnton Korobeynikov2009-05-032-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70763 91177308-0d34-0410-b5e6-96231b3b80d8
* Some eye-candyAnton Korobeynikov2009-05-033-10/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70762 91177308-0d34-0410-b5e6-96231b3b80d8
* Print function header / footerAnton Korobeynikov2009-05-031-0/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70761 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix printing: je => jeqAnton Korobeynikov2009-05-031-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70760 91177308-0d34-0410-b5e6-96231b3b80d8