aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* Update the names of the exception handling sjlj instrinsics toJim Grosbach2009-05-144-14/+16
| | | | | | | | | | | llvm.eh.sjlj.* for better clarity as to their purpose and scope. Add a description of llvm.eh.sjlj.setjmp to ExceptionHandling.html. (llvm.eh.sjlj.longjmp documentation coming when that implementation is added). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71758 91177308-0d34-0410-b5e6-96231b3b80d8
* Spelling correction s/builting/builtin/ and remove trailing whitespace in a ↵Jim Grosbach2009-05-131-10/+10
| | | | | | few places git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71735 91177308-0d34-0410-b5e6-96231b3b80d8
* Run code placement optimization for targets that want it (arm and x86 for now).Evan Cheng2009-05-132-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71726 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MachineInstrBuilder::addReg() to take a flag instead of a list ofBill Wendling2009-05-1318-150/+193
| | | | | | | | | | | | | booleans. This gives a better indication of what the "addReg()" is doing. Remembering what all of those booleans mean isn't easy, especially if you aren't spending all of your time in that code. I took Jakob's suggestion and made it illegal to pass in "true" for the flag. This should hopefully prevent any unintended misuse of this (by reverting to the old way of using addReg()). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71722 91177308-0d34-0410-b5e6-96231b3b80d8
* Run through the list of globals once and sectionize all types of globlas ↵Sanjiv Gupta2009-05-134-38/+72
| | | | | | includeing declarations. Later emit them from their section lists. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71661 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an int64_t variant of abs, for host environmentsDale Johannesen2009-05-131-2/+2
| | | | | | | | | | | | | without one. Use it where we were using abs on int64_t objects. (I strongly suspect the casts to unsigned in the fragments in LoopStrengthReduce are not doing whatever the original intent was, but the obvious change to uint64_t doesn't work. Maybe later.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71612 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for GCC compatible builtin setjmp and longjmp intrinsics. This isJim Grosbach2009-05-124-4/+52
| | | | | | | | | a supporting preliminary patch for GCC-compatible SjLJ exception handling. Note that these intrinsics are not designed to be invoked directly by the user, but rather used by the front-end as target hooks for exception handling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71610 91177308-0d34-0410-b5e6-96231b3b80d8
* correct register class for tADDspi to GPR since the register will always be SPJim Grosbach2009-05-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71602 91177308-0d34-0410-b5e6-96231b3b80d8
* More MSVC fixes -- class/struct conflicts.Bill Wendling2009-05-121-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71601 91177308-0d34-0410-b5e6-96231b3b80d8
* 80 col violations.Evan Cheng2009-05-121-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71582 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up a few minor typos in comments.Bob Wilson2009-05-121-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71563 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 80-col violations and remove trailing whitespace. No functional changes.Bob Wilson2009-05-121-69/+71
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71562 91177308-0d34-0410-b5e6-96231b3b80d8
* 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