summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* - When DAG combiner is folding a bit convert into a BUILD_VECTOR, it should ↵Evan Cheng2008-02-186-60/+107
| | | | | | | | check if it's essentially a SCALAR_TO_VECTOR. Avoid turning (v8i16) <10, u, u, u> to <10, 0, u, u, u, u, u, u>. Instead, simply convert it to a SCALAR_TO_VECTOR of the proper type. - X86 now normalize SCALAR_TO_VECTOR to (BIT_CONVERT (v4i32 SCALAR_TO_VECTOR)). Get rid of X86ISD::S2VEC. llvm-svn: 47290
* Correctly fold divide-by-constant, even when faced with overflow.Nick Lewycky2008-02-181-2/+27
| | | | llvm-svn: 47287
* Chris pointed out that it's not necessary to set i64 MUL to ExpandDan Gohman2008-02-181-12/+10
| | | | | | | on x86-32 since i64 itself is not a Legal type. And, update some comments. llvm-svn: 47282
* - Remove the previous check which broke coalescer-commute3.llEvan Cheng2008-02-181-5/+5
| | | | | | - For now, conservatively ignore copy MI whose source is a physical register. Commuting its def MI can cause a physical register live interval to be live through a loop (since we know it's live coming into the def MI). llvm-svn: 47281
* upgrade some tests.Chris Lattner2008-02-181-39/+43
| | | | llvm-svn: 47280
* Add a noteNate Begeman2008-02-181-0/+3
| | | | llvm-svn: 47279
* Add a note about sext from i1 plus flags use.Chris Lattner2008-02-181-0/+52
| | | | llvm-svn: 47278
* Don't mark scalar integer multiplication as Expand on x86, since x86Dan Gohman2008-02-181-5/+6
| | | | | | | | | | | | | has plain one-result scalar integer multiplication instructions. This avoids expanding such instructions into MUL_LOHI sequences that must be special-cased at isel time, and avoids the problem with that code that provented memory operands from being folded. This fixes PR1874, addressesing the most common case. The uncommon cases of optimizing multiply-high operations will require work in DAGCombiner. llvm-svn: 47277
* Transforming -A + -B --> -(A + B) isn't safe for FP, thanksChris Lattner2008-02-181-4/+6
| | | | | | to Dale for noticing this! llvm-svn: 47276
* minor code simplification, no functionality change.Chris Lattner2008-02-181-8/+6
| | | | llvm-svn: 47275
* Simplify caller updating using a CallSite, asDuncan Sands2008-02-182-22/+20
| | | | | | | | requested by Chris. While there, do the same for an existing function committed by someone called "lattner" :) llvm-svn: 47273
* don't bother calling getUnderlyingObject for non-pointers.Chris Lattner2008-02-181-1/+2
| | | | llvm-svn: 47272
* Since we're not checking for the more general AllocationInst first, we need ↵Owen Anderson2008-02-181-1/+1
| | | | | | | | to explicitly check that Object is an Argument before casting it to one. llvm-svn: 47268
* New helper function getMBBFromIndex() that given an index in any instruction ↵Roman Levenstein2008-02-181-16/+0
| | | | | | of an MBB returns a pointer the MBB. Reviewed by Evan. llvm-svn: 47267
* Add support to GVN for performing sret return slot optimization. This means ↵Owen Anderson2008-02-181-2/+66
| | | | | | | | | | | that, if an sret function tail calls another sret function, it should pass its own sret parameter to the tail callee, allowing it to fill in the correct return value. llvm-gcc does not emit this by default. Instead, it allocates space in the caller for the sret of the tail call and then uses memcpy to copy the result into the caller's sret parameter. This optimization detects and optimizes that case. llvm-svn: 47265
* I got the predicate backwards in my last patch. The comment is correct, the ↵Owen Anderson2008-02-181-1/+1
| | | | | | code was not. llvm-svn: 47264
* This check is not correct for mallocs, so exclude them earlier.Owen Anderson2008-02-181-2/+2
| | | | llvm-svn: 47263
* For now, avoid commuting def MI for copy MI's whose source is not killed. ↵Evan Cheng2008-02-181-0/+7
| | | | | | That simply trade a live interval for another and because only the non-two-address operands can be folded into loads, may end up pessimising code. llvm-svn: 47262
* switch simplifycfg from using vectors for most things to smallvectors,Chris Lattner2008-02-181-14/+12
| | | | | | this speeds it up 2.3% on eon. llvm-svn: 47261
* optimize away stackrestore calls that have no intervening alloca or call.Chris Lattner2008-02-181-10/+18
| | | | llvm-svn: 47258
* Duncan pointed out that we can fast fail here, because the sret parameter ofOwen Anderson2008-02-181-1/+2
| | | | | | a function must be the first parameter. llvm-svn: 47254
* Fix a comment, and a bug where we weren't applying the tail call logic in ↵Owen Anderson2008-02-181-6/+8
| | | | | | cases that failed the first test. llvm-svn: 47253
* Fix bugs that Chris noticed in my last patch.Owen Anderson2008-02-181-9/+17
| | | | llvm-svn: 47252
* simplify some code, BreakUpSubtract always returns nonnull now.Chris Lattner2008-02-181-4/+2
| | | | llvm-svn: 47251
* bitcasts of pointers are always pointers.Chris Lattner2008-02-181-5/+2
| | | | | | | If we see a memcpy of a pointer, make sure to check later uses of the pointer as well. llvm-svn: 47250
* Add a predicate to Argument to check for the StructRet attribute.Owen Anderson2008-02-171-0/+7
| | | | llvm-svn: 47248
* Teach getModRefInfo that memcpy, memmove, and memset don't "capture" memory ↵Owen Anderson2008-02-171-3/+13
| | | | | | | | | addresses. Also, noalias arguments are be considered "like" stack allocated ones for this purpose, because the only way they can be modref'ed is if they escape somewhere in the current function. llvm-svn: 47247
* Fold (-x + -y) -> -(x+y) which promotes better association, fixingChris Lattner2008-02-171-2/+10
| | | | | | the second half of PR2047 llvm-svn: 47244
* fix pastoChris Lattner2008-02-171-1/+1
| | | | llvm-svn: 47242
* Split up subtracts into add+negate if they have a reassociable use or operandChris Lattner2008-02-171-5/+8
| | | | | | that is also a subtract. This implements PR2047 and Transforms/Reassociate/subtest2.ll llvm-svn: 47241
* make the logic for breaking up subtracts more explicit, no Chris Lattner2008-02-171-9/+22
| | | | | | functionality change. llvm-svn: 47239
* move PR2053 to here.Chris Lattner2008-02-171-0/+12
| | | | llvm-svn: 47237
* Remove any 'nest' parameter attributes if the functionDuncan Sands2008-02-161-10/+52
| | | | | | is not passed as an argument to a trampoline intrinsic. llvm-svn: 47220
* Some micro-optimizations.Duncan Sands2008-02-161-4/+5
| | | | llvm-svn: 47219
* I cannot find a libgcc function for this builtin. Therefor expanding it to ↵Andrew Lenharth2008-02-169-9/+33
| | | | | | a noop (which is how it use to be treated). If someone who knows the x86 backend better than me could tell me how to get a lock prefix on an instruction, that would be nice to complete x86 support. llvm-svn: 47213
* Teach LegalizeTypes how to expand the operands ofDuncan Sands2008-02-162-4/+25
| | | | | | br_cc. This fixes 5 "make check" failures. llvm-svn: 47212
* Refactor some code; check if commuteInstruction is able to commute the ↵Evan Cheng2008-02-162-17/+34
| | | | | | instruction. llvm-svn: 47208
* llvm.memory.barrier, and impl for x86 and alphaAndrew Lenharth2008-02-168-1/+58
| | | | llvm-svn: 47204
* Fix typos.Bill Wendling2008-02-161-2/+2
| | | | llvm-svn: 47200
* Rename CountMemOperands to ComputeMemOperandsEnd to reflect whatDan Gohman2008-02-161-12/+9
| | | | | | | it actually does. Simplify CountOperands a little by reusing ComputeMemOperandsEnd. And reword some comments for both. llvm-svn: 47198
* Revert 47177, which was incorrect.Dan Gohman2008-02-161-1/+1
| | | | llvm-svn: 47196
* Make tblgen a little smarter about constants smaller than i32. Currently,Scott Michel2008-02-151-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | tblgen will complain if a sign-extended constant does not fit into a data type smaller than i32, e.g., i16. This causes a problem when certain hex constants are used, such as 0xff for byte masks or immediate xor values. tblgen will try the sign-extended value first and, if the sign extended value would overflow, it tries to see if the unsigned value will fit. Consequently, a software developer can now safely incant: (XORHIr16 R16C:$rA, 0xffff) which is somewhat clearer and more informative than incanting: (XORHIr16 R16C:$rA, (i16 -1)) even if the two are bitwise equivalent. Tblgen also outputs the 64-bit unsigned constant in the generated ISel code when getTargetConstant() is invoked. llvm-svn: 47188
* The copy instruction being coalesced will be removed, it is not a kill.Evan Cheng2008-02-151-2/+2
| | | | llvm-svn: 47179
* Fixed bug in FoldingSetIteratorImpl where we did not correctly check ifTed Kremenek2008-02-151-2/+4
| | | | | | | we had reached the "fake bucket" after the last bucket, allowing the iterator in some cases to run off the end of the hashtable. llvm-svn: 47178
* Skip over the defs and start at the uses when looking for operandsDan Gohman2008-02-151-1/+1
| | | | | | with the TIED_TO attribute. llvm-svn: 47177
* Use the TargetInstrDescr to determine the number of operandsDan Gohman2008-02-151-3/+3
| | | | | | | that should be checked for the TIED_TO attribute instead of using CountOperands. llvm-svn: 47176
* Teach LegalizeTypes how to promote the flagsDuncan Sands2008-02-152-7/+34
| | | | | | | | | in a ret node. These are created as i32 constants but on some platforms i32 is not legal. This fixes 26 "make check" failures, for example Alpha/2005-07-12-TwoMallocCalls.ll. llvm-svn: 47172
* Handle \n's in value names for more targets. The asm printers Chris Lattner2008-02-153-13/+40
| | | | | | really really really need refactoring :( llvm-svn: 47171
* If the llvm name contains an unprintable character, don't print it inChris Lattner2008-02-151-3/+15
| | | | | | | | | | | the global comment. This prevents printing things like: ... # foo bar when the name is "foo\nbar". llvm-svn: 47170
* targets that support quotes for mangled names still need to escape newlinesChris Lattner2008-02-151-0/+2
| | | | | | when they occur in the name, just like " is escaped. llvm-svn: 47169
OpenPOWER on IntegriCloud