summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
Commit message (Collapse)AuthorAgeFilesLines
* change Mangler::makeNameProper to return its result in a SmallVectorChris Lattner2010-01-136-67/+90
| | | | | | | | | | | | instead of returning it in an std::string. Based on this change: 1. Change TargetLoweringObjectFileCOFF::getCOFFSection to take a StringRef 2. Change a bunch of targets to call makeNameProper with a smallstring, making several of them *much* more efficient. 3. Rewrite Mangler::makeNameProper to not build names and then prepend prefixes, not use temporary std::strings, and to avoid other crimes. llvm-svn: 93298
* Remove the JustSP single-register regclass.Jakob Stoklund Olesen2010-01-132-14/+1
| | | | | | | | It was only being used by instructions with the t_addrmode_sp addressing mode, and that is pattern matched in a way that guarantees SP is used. There is never any register allocation done from this class. llvm-svn: 93280
* Add a quick pass to optimize sign / zero extension instructions. For targets ↵Evan Cheng2010-01-132-16/+17
| | | | | | | | where the pre-extension values are available in the subreg of the result of the extension, replace the uses of the pre-extension value with the result + extract_subreg. For now, this pass is fairly conservative. It only perform the replacement when both the pre- and post- extension values are used in the block. It will miss cases where the post-extension values are live, but not used. llvm-svn: 93278
* Eliminate or_not_add and just use AddedComplexity so isel tries or_is_add ↵Evan Cheng2010-01-122-22/+13
| | | | | | patterns first. llvm-svn: 93245
* Revert commit 93204, since it causes the assembler to barfDuncan Sands2010-01-121-42/+0
| | | | | | | on x86-64 linux with messages like this: Error: Incorrect register `%r14' used with `l' suffix llvm-svn: 93242
* Fix typo.Duncan Sands2010-01-121-1/+1
| | | | llvm-svn: 93235
* Tweak commit 91745, which changed target data for both Mingw and Cygwin,Duncan Sands2010-01-121-1/+1
| | | | | | | to not touch Cygwin: the change caused llvm-gcc build failures due to long double getting the wrong size. Patch by Aaron Gray. llvm-svn: 93234
* Reapply the MOV64r0 patch, with a fix: MOV64r0 clobbers EFLAGS.Dan Gohman2010-01-125-38/+46
| | | | llvm-svn: 93229
* Add TargetInstrInfo::isCoalescableInstr. It returns true if the specifiedEvan Cheng2010-01-122-0/+61
| | | | | | | | | instruction is copy like where the source and destination registers can overlap. This is to be used by the coalescable to coalesce the source and destination registers of instructions like X86::MOVSX64rr32. Apparently some crazy people believe the coalescer is too simple. llvm-svn: 93210
* Add manual ISD::OR fastisel selection routines. TableGen is no longer ↵Evan Cheng2010-01-111-0/+42
| | | | | | autogen them after 93152 and 93191. llvm-svn: 93204
* Extend r93152 to work on OR r, r. If the source set bits are known not to ↵Evan Cheng2010-01-112-9/+34
| | | | | | overlap, then select as an ADD instead. llvm-svn: 93191
* Revert 93158. It's breaking quite a few x86_64 tests.Evan Cheng2010-01-115-44/+37
| | | | llvm-svn: 93185
* Do not turn 8-bit OR to ADD since ADD8ri is not 3-addressfiable.Evan Cheng2010-01-111-4/+1
| | | | llvm-svn: 93182
* Reimplement getToken and SplitString as "StringRef helper functions"Benjamin Kramer2010-01-111-2/+2
| | | | | | | | | - getToken is modeled after StringRef::split but it can split on multiple separator chars and skips leading seperators. - SplitString is a StringRef::split variant for more than 2 elements with the same behaviour as getToken. llvm-svn: 93161
* Use a 32-bit and with implicit zero-extension instead of a 64-bit and if itDan Gohman2010-01-111-0/+11
| | | | | | | | | | | has an immediate with at least 32 bits of leading zeros, to avoid needing to materialize that immediate in a register first. FileCheckize, tidy, and extend a testcase to cover this case. This fixes rdar://7527390. llvm-svn: 93160
* Re-instate MOV64r0 and MOV16r0, with adjustments to work with theDan Gohman2010-01-115-37/+44
| | | | | | | | new AsmPrinter. This is perhaps less elegant than describing them in terms of MOV32r0 and subreg operations, but it allows the current register to rematerialize them. llvm-svn: 93158
* Pattern top-level operators don't need to be restricted to aDan Gohman2010-01-112-2/+2
| | | | | | single user. The _su forms are intended for non-top-level nodes. llvm-svn: 93155
* Reword this comment to reference a more fundamental issue.Dan Gohman2010-01-111-2/+2
| | | | llvm-svn: 93154
* Select an OR with immediate as an ADD if the input bits are known zero. This ↵Evan Cheng2010-01-112-9/+46
| | | | | | allow the instruction to be 3address-fied if needed. llvm-svn: 93152
* Implement a feature (-vector-unaligned-mem) to allow targets toDavid Greene2010-01-114-4/+16
| | | | | | | | ignore alignment requirements for SIMD memory operands. This is useful on architectures like the AMD 10h that do not trap on unaligned references if a status bit is twiddled at startup time. llvm-svn: 93151
* "In order to ease automatic bindings generation, it would be helpful if ↵Chris Lattner2010-01-091-1/+1
| | | | | | | | boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for." Patch by James Y Knight! llvm-svn: 93079
* Fix http://llvm.org/PR5729: x86-64 tail calls were putting their targets intoJeffrey Yasskin2010-01-091-2/+2
| | | | | | | | R11, and then asserting that the target was in R9. Since R9 isn't reserved for the target anymore, and is used as an argument, this patch changes the assertion. llvm-svn: 93065
* Fix a critical bug in 64-bit atomic operation lowering for 32-bit. The ↵Evan Cheng2010-01-081-8/+10
| | | | | | results of the cmpxchg8b instructions are being thrown away when it branches back to the top of the checking loop. This means the loop always compares against the old value and this can result in a dead lock. llvm-svn: 93028
* Fix comment.Evan Cheng2010-01-081-1/+1
| | | | llvm-svn: 93020
* Minor change, change the order of two "let Inst{...}" stmts within multiclassJohnny Chen2010-01-081-1/+1
| | | | | | T2I_bin_ii12rs definition. llvm-svn: 93006
* After further thought revert the patch to make fast-isel avoidEric Christopher2010-01-081-6/+0
| | | | | | | | | | | putting relocations into the constant pool - this isn't needed for correctness and in the rare occasion it happens would pull us out of fast isel for the block. If fast-isel application startup time ever becomes an issue we can add better support for these addresses instead of bailing. llvm-svn: 92995
* Fix what looks to me obvious instruction definition bugs.Evan Cheng2010-01-082-1/+3
| | | | | | | 1. CMPXCHG8B and CMPXCHG16B did not specify implicit physical register defs and uses. 2. LCMPXCHG8B is loading 64 bit memory, not 32 bit. llvm-svn: 92985
* Remove extraneous include.Eric Christopher2010-01-081-1/+0
| | | | llvm-svn: 92972
* If the data requires a relocation then don't attempt toEric Christopher2010-01-071-0/+7
| | | | | | | add it to the constant pool for fast-isel. We already don't add it for the normal case. llvm-svn: 92934
* We need to put any kind of data with a relocation into aEric Christopher2010-01-071-1/+1
| | | | | | not-readonly segment on darwin. llvm-svn: 92933
* constant materialization could be improved.Chris Lattner2010-01-071-0/+33
| | | | llvm-svn: 92921
* Fix a minor regression from my dag combiner changes. One more place which ↵Evan Cheng2010-01-071-4/+12
| | | | | | needs to look pass truncates. llvm-svn: 92885
* 80 column violationsJim Grosbach2010-01-061-4/+6
| | | | llvm-svn: 92876
* Add Target hook to duplicate machine instructions.Jakob Stoklund Olesen2010-01-062-21/+48
| | | | | | | Some instructions refer to unique labels, and so cannot be trivially cloned with CloneMachineInstr. llvm-svn: 92873
* Addressing mode 6 (load/store) instructions can't encode an immediate offsetJim Grosbach2010-01-061-1/+4
| | | | | | for stack references. llvm-svn: 92871
* Teach dag combine to fold the following transformation more aggressively:Evan Cheng2010-01-061-49/+85
| | | | | | | | | | (OP (trunc x), (trunc y)) -> (trunc (OP x, y)) Unfortunately this simple change causes dag combine to infinite looping. The problem is the shrink demanded ops optimization tend to canonicalize expressions in the opposite manner. That is badness. This patch disable those optimizations in dag combine but instead it is done as a late pass in sdisel. This also exposes some deficiencies in dag combine and x86 setcc / brcond lowering. Teach them to look pass ISD::TRUNCATE in various places. llvm-svn: 92849
* Fix a README item: have functionattrs look through selects andDuncan Sands2010-01-061-30/+1
| | | | | | | | | phi nodes when deciding which pointers point to local memory. I actually checked long ago how useful this is, and it isn't very: it hardly ever fires in the testsuite, but since Chris wants it here it is! llvm-svn: 92836
* Partially address a README by having functionattrs consider calls toDuncan Sands2010-01-061-2/+2
| | | | | | | | | | memcpy, memset and other intrinsics that only access their arguments to be readnone if the intrinsic's arguments all point to local memory. This improves the testcase in the README to readonly, but it could in theory be made readnone, however this would involve more sophisticated analysis that looks through the memcpy. llvm-svn: 92829
* Reenable debug info on PPC. Works well enough toDale Johannesen2010-01-061-0/+1
| | | | | | bootstrap. llvm-svn: 92818
* Make sure debug info hook gets called when emittingDale Johannesen2010-01-061-12/+11
| | | | | | synonyms for PPC. llvm-svn: 92817
* Undo r92785, it caused test failure.Johnny Chen2010-01-051-3/+3
| | | | llvm-svn: 92796
* Add Rt2 to the asm format string for 32-bit Thumb load/store register dualJohnny Chen2010-01-051-3/+3
| | | | | | instructions. Thumb does not have the restriction that t2 = t+1. llvm-svn: 92785
* Don't specify CR sub-registers as implicit defs of BL instructions.Jakob Stoklund Olesen2010-01-051-6/+2
| | | | | | | It is enough to give the super registers CR0, CR1, ..., and specifying the sub-registers as well causes confusion in the liveness computations. llvm-svn: 92778
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-051-2/+1
| | | | llvm-svn: 92771
* Convert a ton of simple integer type equality tests to the new predicate.Benjamin Kramer2010-01-052-8/+8
| | | | llvm-svn: 92760
* Code refactoring.Evan Cheng2010-01-051-9/+19
| | | | llvm-svn: 92694
* Change errs() to dbgs().David Greene2010-01-051-1/+2
| | | | llvm-svn: 92655
* Change errs() to dbgs().David Greene2010-01-051-8/+8
| | | | llvm-svn: 92654
* Change errs() to dbgs().David Greene2010-01-051-1/+2
| | | | llvm-svn: 92653
* Change errs() to dbgs().David Greene2010-01-051-1/+1
| | | | llvm-svn: 92651
OpenPOWER on IntegriCloud