aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* Add missing D* register clobbers for Thumb-2 call.David Goodwin2009-07-301-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77611 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor whitespace tidiness.Dan Gohman2009-07-301-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77602 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename GRAD to GR32_AD, to follow the naming convention of otherDan Gohman2009-07-302-2/+4
| | | | | | | classes. And define its SubRegClassList. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77601 91177308-0d34-0410-b5e6-96231b3b80d8
* add a random codegen deficiency.Chris Lattner2009-07-301-0/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77598 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a note.Evan Cheng2009-07-301-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77584 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize some common usage patterns of atomic built-ins ↵Evan Cheng2009-07-305-14/+280
| | | | | | | | | | | | | __sync_add_and_fetch() and __sync_sub_and_fetch. When the return value is not used (i.e. only care about the value in the memory), x86 does not have to use add to implement these. Instead, it can use add, sub, inc, dec instructions with the "lock" prefix. This is currently implemented using a bit of instruction selection trick. The issue is the target independent pattern produces one output and a chain and we want to map it into one that just output a chain. The current trick is to select it into a merge_values with the first definition being an implicit_def. The proper solution is to add new ISD opcodes for the no-output variant. DAG combiner can then transform the node before it gets to target node selection. Problem #2 is we are adding a whole bunch of x86 atomic instructions when in fact these instructions are identical to the non-lock versions. We need a way to add target specific information to target nodes and have this information carried over to machine instructions. Asm printer (or JIT) can use this information to add the "lock" prefix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77582 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch obvious clients to Twine instead of utostr (when they were already usingDaniel Dunbar2009-07-301-2/+1
| | | | | | | | | | a Twine, e.g., for names). - I am a little ambivalent about this; we don't want the string conversion of utostr, but using overload '+' mixed with string and integer arguments is sketchy. On the other hand, this particular usage is something of an idiom. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77579 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep track of references to mem(cpy,move,set) and then print only one externSanjiv Gupta2009-07-302-2/+41
| | | | | | | declaration for them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77578 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new register class to describe operands that can't be SP,Dan Gohman2009-07-305-38/+189
| | | | | | | | due to x86 encoding restrictions. This is currently off by default because it may cause code quality regressions. This is for PR4572. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77565 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate a bunch of redundant tables.Dan Gohman2009-07-301-167/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77558 91177308-0d34-0410-b5e6-96231b3b80d8
* Lower a 128-bit BUILD_VECTOR with 2 elements to a pair of INSERT_VECTOR_ELTs.Bob Wilson2009-07-301-1/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77557 91177308-0d34-0410-b5e6-96231b3b80d8
* Use array_endof instead of doing it manually.Dan Gohman2009-07-301-27/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77553 91177308-0d34-0410-b5e6-96231b3b80d8
* tbb / tbh instructions only branch forward, not backwards.Evan Cheng2009-07-291-2/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77522 91177308-0d34-0410-b5e6-96231b3b80d8
* Add VFP3 D registers to the DPR register class.Evan Cheng2009-07-291-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77521 91177308-0d34-0410-b5e6-96231b3b80d8
* Move types back to the 2.5 API.Owen Anderson2009-07-294-9/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
* inline the global 'getInstrOperandRegClass' function into its callersChris Lattner2009-07-291-10/+0
| | | | | | | now that TargetOperandInfo does the heavy lifting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77508 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure Thumb2 uses the right call instructions.Evan Cheng2009-07-293-19/+80
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77507 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Introduce a new TargetOperandInfo::getRegClass() helper methodChris Lattner2009-07-292-15/+17
| | | | | | | | | | | | | | | and convert code to using it, instead of having lots of things poke the isLookupPtrRegClass() method directly. 2. Make PointerLikeRegClass contain a 'kind' int, and store it in the existing regclass field of TargetOperandInfo when the isLookupPtrRegClass() predicate is set. Make getRegClass pass this into TargetRegisterInfo::getPointerRegClass(), allowing targets to have multiple ptr_rc things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77504 91177308-0d34-0410-b5e6-96231b3b80d8
* Give getPointerRegClass() a "kind" value so that targets can Chris Lattner2009-07-2910-24/+25
| | | | | | | support multiple different pointer register classes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77501 91177308-0d34-0410-b5e6-96231b3b80d8
* - Fix an obvious copy and paste error.Evan Cheng2009-07-293-6/+7
| | | | | | | - Darwin Thumb2 call clobbers r9. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77500 91177308-0d34-0410-b5e6-96231b3b80d8
* Add llvm_unreachable for ... unreachable code!Eric Christopher2009-07-291-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77480 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Neon VLDn intrinsics to return multiple values instead of reallyBob Wilson2009-07-291-26/+26
| | | | | | | | wide vectors. Likewise, change VSTn intrinsics to take separate arguments for each vector in a multi-vector struct. Adjust tests accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77468 91177308-0d34-0410-b5e6-96231b3b80d8
* more syntactic cleanups.Chris Lattner2009-07-291-5/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77442 91177308-0d34-0410-b5e6-96231b3b80d8
* minor smallvector cleanupsChris Lattner2009-07-291-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77441 91177308-0d34-0410-b5e6-96231b3b80d8
* whitespace cleanup.Chris Lattner2009-07-291-6/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77438 91177308-0d34-0410-b5e6-96231b3b80d8
* mingw uses .data and .text, not _data and _text.Chris Lattner2009-07-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77435 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR4584 with a trivial patch now that the pieces are in place.Chris Lattner2009-07-291-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77434 91177308-0d34-0410-b5e6-96231b3b80d8
* pass the mangler down into the various SectionForGlobal methods.Chris Lattner2009-07-2914-59/+56
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77432 91177308-0d34-0410-b5e6-96231b3b80d8
* constant prop a utostr.Chris Lattner2009-07-291-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77430 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some completely wrong code. 1 is never < 16. It turns out that GCC ↵Chris Lattner2009-07-291-20/+10
| | | | | | appears to put strings of any length into the ELF cstring equivalent, so just rip out the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77429 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize Thumb2 jumptable to use tbb / tbh when all the offsets fit in byte ↵Evan Cheng2009-07-297-44/+204
| | | | | | / halfword. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77422 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Eric Christopher2009-07-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77415 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the "PreferredEHDataFormat" from "absptr" if we're on a Darwin system >Bill Wendling2009-07-292-10/+18
| | | | | | | Leopard. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77414 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for gcc __builtin_ia32_ptest{z,c,nzc} intrinsics. LowerEric Christopher2009-07-293-3/+46
| | | | | | | to ptest instruction plus setcc. Revamp ptest instruction. Add test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77407 91177308-0d34-0410-b5e6-96231b3b80d8
* Match X86 register names to number.Daniel Dunbar2009-07-292-4/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77404 91177308-0d34-0410-b5e6-96231b3b80d8
* Thumb-2: fix typo that caused incorrect stack elimination for VFP operations ↵David Goodwin2009-07-281-1/+1
| | | | | | and very large stack frames. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77401 91177308-0d34-0410-b5e6-96231b3b80d8
* Move X86 instruction parsing into X86/AsmParser.Daniel Dunbar2009-07-281-23/+268
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77384 91177308-0d34-0410-b5e6-96231b3b80d8
* Output the correct format for Darwin.Bill Wendling2009-07-281-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77376 91177308-0d34-0410-b5e6-96231b3b80d8
* Darwin outputs (DW_EH_PE_pcrel | DW_EH_PE_indirect | DW_EH_PE_sdata4) when we'reBill Wendling2009-07-281-2/+5
| | | | | | | dealing with Data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77372 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MDNode.h header. It defines MDnode and other metadata classes.Devang Patel2009-07-287-7/+7
| | | | | | | | New name is Metadata.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77370 91177308-0d34-0410-b5e6-96231b3b80d8
* Return ConstantVector to 2.5 API.Owen Anderson2009-07-282-7/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8
* In thumb2 mode, add pc is unpredictable. Use add + mov pc instead (that is ↵Evan Cheng2009-07-285-18/+7
| | | | | | until more optimization goes in). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77364 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove support for ORN to workaround <rdar://problem/7096522>.David Goodwin2009-07-281-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77363 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide generic MCAsmParser when constructing target specific parsers.Daniel Dunbar2009-07-281-6/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77362 91177308-0d34-0410-b5e6-96231b3b80d8
* more simplifications and cleanup. :)Chris Lattner2009-07-281-18/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77350 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ConstantArray to 2.5 API.Owen Anderson2009-07-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
* Add workaround for <rdar://problem/7098328>.David Goodwin2009-07-281-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77340 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR4639, a ELF-TLS regression from some of my refactoring.Chris Lattner2009-07-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77336 91177308-0d34-0410-b5e6-96231b3b80d8
* the apple "ld_classic" linker doesn't support .literal16 in 32-bitChris Lattner2009-07-284-8/+15
| | | | | | | | mode, and "ld64" (the default linker) falls back to it in -static mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77334 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Thumb-2 patterns for ARMsrl_flag and ARMsra_flag.David Goodwin2009-07-281-1/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77329 91177308-0d34-0410-b5e6-96231b3b80d8