summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add a separate unrolling threshold when the current function is being ↵Owen Anderson2010-09-071-4/+20
| | | | | | | | | | optimized for size. The threshold value of 50 is arbitrary, and I chose it simply by analogy to the inlining thresholds, where the baseline unrolling threshold is slightly smaller than the baseline inlining threshold. This could undoubtedly use some tuning. llvm-svn: 113306
* Don't add <imp-def> operands during register rewriting.Jakob Stoklund Olesen2010-09-071-16/+9
| | | | | | | | | | | | | | LiveIntervals already adds <imp-def> operands for super-registers when a subreg def defines the whole register. Thus, it is not necessary to do it again when rewriting. In fact, the super-register imp-defs caused miscompilations because the late scheduler couldn't see that the super-register was read. We still add super-reg <imp-use,kill> operands when rewriting virtuals to physicals. llvm-svn: 113299
* To shrink a t2LDM instruction to the 16-bit wide tLDM instruction, the baseJim Grosbach2010-09-071-0/+12
| | | | | | | | | | register must be one of the destination registers for the load. Otherwise, the tLDM instruction will write-back to the base register, which isn't what's desired (otherwise, we'd have a t2LDM_UPD instead). rdar://8394087 llvm-svn: 113297
* grammar tweakJim Grosbach2010-09-071-1/+1
| | | | llvm-svn: 113289
* Factor out some x86 vector shuffle rewriting and add comments about the ↵Bruno Cardoso Lopes2010-09-071-29/+59
| | | | | | direction the shuffle lowering is heading to llvm-svn: 113286
* Fix PR7972, in which the PassRegistry was being leaked. As part of this,Owen Anderson2010-09-071-35/+16
| | | | | | | switch to using a ManagedStatic for the global PassRegistry instead of a ManagedCleanup, and fix a destruction ordering bug this exposed. llvm-svn: 113283
* Move code around to prepare for moving some of the logic together to another ↵Bruno Cardoso Lopes2010-09-071-3/+3
| | | | | | function llvm-svn: 113267
* Add an MVT::x86mmx type. It will take the place of all current MMX vector types.Bill Wendling2010-09-072-0/+4
| | | | llvm-svn: 113261
* Fix a serious performance regression introduced by r108687 on linux:Chris Lattner2010-09-071-1/+6
| | | | | | | | turning (fptrunc (sqrt (fpext x))) -> (sqrtf x) is great, but we have to delete the original sqrt as well. Not doing so causes us to do two sqrt's when building with -fmath-errno (the default on linux). llvm-svn: 113260
* Remove a dead comment.Evan Cheng2010-09-071-1/+0
| | | | llvm-svn: 113259
* hopefully fix a problem building on cygwin-1.5Chris Lattner2010-09-071-2/+2
| | | | llvm-svn: 113255
* Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce ↵Owen Anderson2010-09-072-26/+66
| | | | | | | | #include clutter and exposing internal details. llvm-svn: 113252
* decouple MMX check from regular splat checks. Some refactoring is coming, ↵Bruno Cardoso Lopes2010-09-071-4/+8
| | | | | | and MMX should be left alone to be easily removed after moving to intrinsics llvm-svn: 113247
* Remove now useless check, because the code can be matched below, no need to ↵Bruno Cardoso Lopes2010-09-071-1/+1
| | | | | | leave it for isel llvm-svn: 113242
* Issue a #error if the host doesn't have an implementation forDan Gohman2010-09-071-0/+2
| | | | | | GetMainExecutable yet. llvm-svn: 113240
* Minor change. Since the checks are equivalent, use isMMXBruno Cardoso Lopes2010-09-071-1/+1
| | | | llvm-svn: 113239
* Create PTX backend. Patch by Che-Liang Chiou!Nick Lewycky2010-09-0713-0/+230
| | | | llvm-svn: 113235
* Add patterns for MMX that use the new intrinsics.Dale Johannesen2010-09-072-16/+71
| | | | | | | Enable palignr intrinsic. These may need adjustment for a new VT in due course. llvm-svn: 113233
* Remove unused target specific nodeBruno Cardoso Lopes2010-09-072-10/+0
| | | | llvm-svn: 113224
* Don't leak the old operand when transforming "sldt" into "sldtw".Benjamin Kramer2010-09-071-1/+3
| | | | llvm-svn: 113200
* Add completely hokey binary-and and binary-or operations to ConstantRange andNick Lewycky2010-09-072-0/+32
| | | | | | teach LazyValueInfo to use them. llvm-svn: 113196
* Fix major bug in thunk detection. Also verify the calling convention.Nick Lewycky2010-09-071-22/+39
| | | | | | | | | Switch from isWeakForLinker to mayBeOverridden which is more accurate. Add more statistics and debugging info. Add comments. Move static function outside anonymous namespace. llvm-svn: 113190
* add missing cmov aliases, this resolves rdar://8208499Chris Lattner2010-09-071-13/+27
| | | | llvm-svn: 113189
* remove duplicated entryChris Lattner2010-09-061-1/+0
| | | | llvm-svn: 113188
* Add a new isSignWrappedSet() method to ConstantRange.Nick Lewycky2010-09-061-3/+15
| | | | | | | | | Fix zeroExtend and signExtend to support empty sets, and to return the smallest possible result set which contains the extension of each element in their inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10) which contains 63446 members. llvm-svn: 113187
* "sldt <mem>" is ambiguous in 64-bit mode, but shouldChris Lattner2010-09-061-0/+7
| | | | | | | | always be disambiguated as sldtw. sldtw and sldtq with a mem operands have the same effect, but sldtw is more compact. Force it to sldtw, resolving rdar://8017530 llvm-svn: 113186
* fix rdar://8017621 - llvm-mc can't guess encoding for "push $(1000)"Chris Lattner2010-09-061-0/+1
| | | | llvm-svn: 113184
* fix the operand constraints of the immediate form of in/out,Chris Lattner2010-09-061-6/+6
| | | | | | allowing unsigned 8-bit operands. This fixes rdar://8208481 llvm-svn: 113182
* in the case where an instruction only has one implementationChris Lattner2010-09-062-9/+21
| | | | | | | | | | | | | | | | | | | | of a mneumonic, report operand errors with better location info. For example, we now report: t.s:6:14: error: invalid operand for instruction cwtl $1 ^ but we fail for common cases like: t.s:11:4: error: invalid operand for instruction addl $1, $1 ^ because we don't know if this is supposed to be the reg/imm or imm/reg form. llvm-svn: 113178
* Now that we know if we had a total fail on the instruction mnemonic, Chris Lattner2010-09-061-7/+27
| | | | | | | | | | | | | | | | | | | | | | | | give a more detailed error. Before: t.s:11:4: error: unrecognized instruction addl $1, $1 ^ t.s:12:4: error: unrecognized instruction f2efqefa $1 ^ After: t.s:11:4: error: invalid operand for instruction addl $1, $1 ^ t.s:12:4: error: invalid instruction mnemonic 'f2efqefa' f2efqefa $1 ^ This fixes rdar://8017912 - llvm-mc says "unrecognized instruction" when it means "invalid operands" llvm-svn: 113176
* simplify the hacks around jrcxz.Chris Lattner2010-09-061-4/+1
| | | | llvm-svn: 113167
* have tblgen detect when an instruction would have matched, butChris Lattner2010-09-061-34/+44
| | | | | | | | | | | | | failed because a subtarget feature was not enabled. Use this to remove a bunch of hacks from the X86AsmParser for rejecting things like popfl in 64-bit mode. Previously these hacks weren't needed, but were important to get a message better than "invalid instruction" when used in the wrong mode. This also fixes bugs where pushal would not be rejected correctly in 32-bit mode (just pusha). llvm-svn: 113166
* change MatchInstructionImpl to return an enum instead of bool.Chris Lattner2010-09-062-6/+6
| | | | llvm-svn: 113165
* have AsmMatcherEmitter.cpp produce the hunk of code that gets includedChris Lattner2010-09-063-20/+16
| | | | | | | into the middle of the class, and rework how the different sections of the generated file are conditionally included for simplicity. llvm-svn: 113163
* Redefine LOOP* instructions from I to Ii8PCRel as they take an i8 argument.Roman Divacky2010-09-061-3/+3
| | | | llvm-svn: 113158
* random cleanupsChris Lattner2010-09-061-9/+12
| | | | llvm-svn: 113157
* MCELF: Align symtab, relocation sections and section headers properly. Patch ↵Benjamin Kramer2010-09-061-12/+24
| | | | | | by Krister Wombell. llvm-svn: 113155
* compute the HasSSE3 bit correctly, patch by Nikolai Saoukh.Chris Lattner2010-09-061-9/+8
| | | | llvm-svn: 113147
* fix PR8067, an over-aggressive assertion in LICM.Chris Lattner2010-09-061-4/+4
| | | | llvm-svn: 113146
* cleanup some of the lifetime/invariant marker stuff, add a big fixme.Chris Lattner2010-09-061-6/+11
| | | | llvm-svn: 113144
* speed up -gvn 3.4% on the testcase in PR7023Chris Lattner2010-09-061-1/+1
| | | | llvm-svn: 113135
* Teach loop rotate to hoist trivially invariant instructionsChris Lattner2010-09-061-10/+27
| | | | | | | | | | | | | | | in the duplicated block instead of duplicating them. Duplicating them into the end of the loop and the preheader means that we got a phi node in the header of the loop, which prevented LICM from hoisting them. GVN would usually come around later and merge the duplicated instructions so we'd get reasonable output... except that anything dependent on the shoulda-been-hoisted value can't be hoisted. In PR5319 (which this fixes), a memory value didn't get promoted. llvm-svn: 113134
* pull a simple method out of LICM into a new Chris Lattner2010-09-062-22/+11
| | | | | | | | | | Loop::hasLoopInvariantOperands method. Remove a useless and confusing Loop::isLoopInvariant(Instruction) method, which didn't do what you thought it did. No functionality change. llvm-svn: 113133
* remove some dead code. t2addrmode_imm8s4 is never used in a Chris Lattner2010-09-052-32/+1
| | | | | | pattern, so there is no need to define a matching function. llvm-svn: 113122
* cleanups.Chris Lattner2010-09-051-22/+17
| | | | llvm-svn: 113119
* add a comment about where this should eventually move.Chris Lattner2010-09-051-0/+7
| | | | llvm-svn: 113117
* update this.Chris Lattner2010-09-051-10/+29
| | | | llvm-svn: 113116
* more cleanupsChris Lattner2010-09-051-52/+38
| | | | llvm-svn: 113115
* Change lower atomic pass to use IntrinsicInst to simplify it a bit.Chris Lattner2010-09-052-41/+30
| | | | llvm-svn: 113114
* eliminate some non-obvious casts. UndefValue isa Constant.Chris Lattner2010-09-051-4/+4
| | | | llvm-svn: 113113
OpenPOWER on IntegriCloud