summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Safely turn memset_chk etc. to non-chk variant if the known object size is ↵Evan Cheng2010-03-051-13/+19
| | | | | | >= memset / memcpy / memmove size. llvm-svn: 97828
* Instcombine should turn llvm.objectsize of a alloca with static size to an ↵Evan Cheng2010-03-051-9/+22
| | | | | | integer. llvm-svn: 97827
* Fix typo.Evan Cheng2010-03-051-1/+1
| | | | llvm-svn: 97818
* fix bss section printing for cell, patch by Kalle Raiskila!Chris Lattner2010-03-051-0/+3
| | | | llvm-svn: 97814
* fix PR6512, a case where instcombine would incorrectly merge loadsChris Lattner2010-03-051-0/+2
| | | | | | from different addr spaces. llvm-svn: 97813
* Reworking the stack layout that the MicroBlaze backend generates.Wesley Peck2010-03-055-47/+243
| | | | | | | | | | | The MicroBlaze backend was generating stack layouts that did not conform correctly to the ABI. This update generates stack layouts which are closer to what GCC does. Variable arguments support was added as well but the stack layout for varargs has not been finalized. llvm-svn: 97807
* Fix PR6503. This turned into a much more interesting and nasty bug. Various Chris Lattner2010-03-053-139/+107
| | | | | | | | | | | parts of the cmp|cmp and cmp&cmp folding logic wasn't prepared for vectors (unrelated to the bug but noticed while in the code) and the code was *definitely* not safe to use by the (cast icmp)|(cast icmp) handling logic that I added in r95855. Fix all this up by changing the various routines to more consistently use IRBuilder and not pass in the I which had the wrong type. llvm-svn: 97801
* Fix an oops in x86 sibcall optimization. If the ByVal callee argument is ↵Evan Cheng2010-03-051-8/+14
| | | | | | itself passed as a pointer, then it's obviously not safe to do a tail call. llvm-svn: 97797
* simplify some functions and make them work with vectorChris Lattner2010-03-051-62/+25
| | | | | | compares, noticed by inspection. llvm-svn: 97795
* fix a nice subtle reassociate bug which would only occurChris Lattner2010-03-051-5/+21
| | | | | | | in a very specific use pattern embodied in the carefully reduced testcase. llvm-svn: 97794
* Move GetStringLength and helper from SimplifyLibCalls to ValueTracking.Eric Christopher2010-03-052-124/+129
| | | | | | No functionality change. llvm-svn: 97793
* Revert r97788 because it broke test/FrontendC/2010-02-16-DbgVarScope.c.Jeffrey Yasskin2010-03-052-25/+16
| | | | llvm-svn: 97792
* Fix PR6497, a bug where we'd fold a load into an addcChris Lattner2010-03-051-0/+7
| | | | | | | | | | | node which has a flag. That flag in turn was used by an already-selected adde which turned into an ADC32ri8 which used a selected load which was chained to the load we folded. This flag use caused us to form a cycle. Fix this by not ignoring chains in IsLegalToFold even in cases where the isel thinks it can. llvm-svn: 97791
* inline a small function with one call site.Chris Lattner2010-03-051-16/+4
| | | | llvm-svn: 97789
* Free MDNodes when the LLVMContext is destroyed. Leak found by Valgrind.Jeffrey Yasskin2010-03-052-16/+25
| | | | llvm-svn: 97788
* Use FindExecutable as a fall-back search method.Mikhail Glushenkov2010-03-051-2/+13
| | | | | | Allows us to find executables that are in the same directory. llvm-svn: 97786
* Rever 96389 and 96990. They are causing some miscompilation that I do not ↵Evan Cheng2010-03-051-54/+0
| | | | | | fully understand. llvm-svn: 97782
* Revert r97778 and r97779. They're somehow breaking llvm-gcc builds.Dan Gohman2010-03-051-17/+41
| | | | llvm-svn: 97781
* Fix these constants to be more portable.Dan Gohman2010-03-051-3/+3
| | | | llvm-svn: 97779
* Rewrite i64-to-f64 conversion using an algorithm which handlesDan Gohman2010-03-051-41/+17
| | | | | | | | | rounding correctly. This implementation is a generalization of the x86_64 code in compiler-rt. This fixes rdar://7683708. llvm-svn: 97778
* Trivial comment change.Johnny Chen2010-03-051-1/+1
| | | | llvm-svn: 97776
* Add missing break for Intrinsic::objectsize case. It was falling through to ↵Evan Cheng2010-03-051-0/+1
| | | | | | the following Intrinsic::bswap code. I have no idea why it wasn't breaking stuff. llvm-svn: 97774
* add an assertion requested on llvmdev.Chris Lattner2010-03-051-0/+1
| | | | llvm-svn: 97769
* Revert r97766. It's deleting a tag.Bill Wendling2010-03-051-52/+13
| | | | llvm-svn: 97768
* Micro-optimization:Bill Wendling2010-03-051-13/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code: float floatingPointComparison(float x, float y) { double product = (double)x * y; if (product == 0.0) return product; return product - 1.0; } produces this: _floatingPointComparison: 0000000000000000 cvtss2sd %xmm1,%xmm1 0000000000000004 cvtss2sd %xmm0,%xmm0 0000000000000008 mulsd %xmm1,%xmm0 000000000000000c pxor %xmm1,%xmm1 0000000000000010 ucomisd %xmm1,%xmm0 0000000000000014 jne 0x00000004 0000000000000016 jp 0x00000002 0000000000000018 jmp 0x00000008 000000000000001a addsd 0x00000006(%rip),%xmm0 0000000000000022 cvtsd2ss %xmm0,%xmm0 0000000000000026 ret The "jne/jp/jmp" sequence can be reduced to this instead: _floatingPointComparison: 0000000000000000 cvtss2sd %xmm1,%xmm1 0000000000000004 cvtss2sd %xmm0,%xmm0 0000000000000008 mulsd %xmm1,%xmm0 000000000000000c pxor %xmm1,%xmm1 0000000000000010 ucomisd %xmm1,%xmm0 0000000000000014 jp 0x00000002 0000000000000016 je 0x00000008 0000000000000018 addsd 0x00000006(%rip),%xmm0 0000000000000020 cvtsd2ss %xmm0,%xmm0 0000000000000024 ret for a savings of 2 bytes. This xform can happen when we recognize that jne and jp jump to the same "true" MBB, the unconditional jump would jump to the "false" MBB, and the "true" branch is the fall-through MBB. llvm-svn: 97766
* Fix some more places where dbg_value affected codegen.Dale Johannesen2010-03-054-4/+22
| | | | llvm-svn: 97765
* Stop leaking MDStrings.Jeffrey Yasskin2010-03-041-0/+5
| | | | llvm-svn: 97763
* Drop the ".w" qualifier for t2UXTB16* instructions as there is no 16-bit versionJohnny Chen2010-03-041-1/+27
| | | | | | of either sxtb16 or uxtb16, and the unified syntax does not specify ".w". llvm-svn: 97760
* Fix memcheck-found leaks: one false positive from using new[], and one trueJeffrey Yasskin2010-03-041-9/+28
| | | | | | positive where pointers would be leaked on llvm_shutdown. llvm-svn: 97759
* For SJLJ exception handling, make sure that all calls that are not markedJim Grosbach2010-03-041-31/+36
| | | | | | | | as nounwind are marked with a -1 call-site value. This is necessary to, for example, correctly process exceptions thrown from within an "unexpected" execption handler (see SingleSource/Regression/C++/EH/expection_spec_test.cpp). llvm-svn: 97757
* pr6478: The frame pointer spill frame index is only defined when there is aBob Wilson2010-03-041-1/+3
| | | | | | frame pointer. llvm-svn: 97755
* Run machine licm before machine cse to avoid messing up licm opportunities.Evan Cheng2010-03-041-2/+2
| | | | llvm-svn: 97752
* Avoid cse load instructions unless they are known to be invariant loads.Evan Cheng2010-03-041-10/+36
| | | | llvm-svn: 97747
* pr6480: Don't try producing ld/st-multiple instructions when the address isBob Wilson2010-03-041-0/+5
| | | | | | | | an undef value. This is only going to come up for bugpoint-reduced tests -- correct programs will not access memory at undefined addresses -- so it's not worth the effort of doing anything more aggressive. llvm-svn: 97745
* Rewrite makefiles to explicitly reference DESTDIR to fix bug 3153.Erick Tryzelaar2010-03-041-2/+2
| | | | | | We need this so can not bake DESTDIR into the O'Caml symlinks. llvm-svn: 97743
* Fix the remaining MUL8 and DIV8 to define AX instead of AL,AH.Jakob Stoklund Olesen2010-03-041-8/+11
| | | | | | | | | These instructions technically define AL,AH, but a trick in X86ISelDAGToDAG reads AX in order to avoid reading AH with a REX instruction. Fix PR6489. llvm-svn: 97742
* Fix recognition of 16-bit bswap for C front-ends which emit theDan Gohman2010-03-041-3/+12
| | | | | | clobber registers in a different order. llvm-svn: 97741
* not committing what you test = bad.Chris Lattner2010-03-041-1/+2
| | | | llvm-svn: 97740
* make gep matching in fastisel match the base of the gep as aChris Lattner2010-03-041-1/+8
| | | | | | | register if it isn't possible to match the indexes *and* the base. This fixes some fast isel rejects of load instructions on oggenc. llvm-svn: 97739
* add a statistic for # times fastisel fails.Chris Lattner2010-03-041-0/+6
| | | | llvm-svn: 97738
* Fix PR6360. It's easy for a stub's address to escape to user code, so we can'tJeffrey Yasskin2010-03-041-115/+4
| | | | | | | | | just count references to it from JIT output to decide when to destroy it. This patch waits to destroy the JIT's memory of a stub until the Function it refers to is destroyed. External function stubs and GVIndirectSyms aren't destroyed until the JIT itself is. llvm-svn: 97737
* Fix a typo Duncan noticed.Dan Gohman2010-03-041-1/+1
| | | | llvm-svn: 97735
* Added 32-bit Thumb instructions for Preload Data (PLD, PLDW) and PreloadJohnny Chen2010-03-041-1/+71
| | | | | | | | | | Instruction (PLI) for disassembly only. According to A8.6.120 PLI (immediate, literal), for example, different instructions are generated for "pli [pc, #0]" and "pli [pc, #-0"]. The disassembler solves it by mapping -0 (negative zero) to -1, -1 to -2, ..., etc. llvm-svn: 97731
* Make the 'icmp pred trunc(ext(X)), CST --> icmp pred X, ext(trunc(CST))'Nick Lewycky2010-03-041-24/+5
| | | | | | | | | | transformation much more careful. Truncating binary '01' to '1' sounds like it's safe until you realize that it switched from positive to negative under a signed interpretation, and that depends on the icmp predicate. Also a few miscellaneous cleanups. llvm-svn: 97721
* Fix PR5291, in which a SmallPtrSet iterator was held across an insertion intoJeffrey Yasskin2010-03-041-24/+38
| | | | | | the set. llvm-svn: 97720
* Rename -machine-cse to -enable-machine-cse.Evan Cheng2010-03-041-1/+1
| | | | llvm-svn: 97713
* add a comment.Chris Lattner2010-03-041-0/+1
| | | | llvm-svn: 97709
* Look ahead a bit to determine if a physical register def that is not marked ↵Evan Cheng2010-03-041-6/+61
| | | | | | dead is really alive. This is necessary to catch a lot of common cse opportunities for targets like x86. llvm-svn: 97706
* change the new isel matcher to emit ComplexPattern matchesChris Lattner2010-03-041-3/+7
| | | | | | | | | | as the very last thing before node emission. This should dramatically reduce the number of times we do 'MatchAddress' on X86, speeding up compile time. This also improves comments in the tables and shrinks the table a bit, now down to 80506 bytes for x86. llvm-svn: 97703
* Make sure JITResolvers don't leave any stubs behind. When a JITResolver wasJeffrey Yasskin2010-03-041-59/+105
| | | | | | | destroyed, it could leave stubs in the StubToResolverMap, which would confuse the lookup for subsequent lazy compilations. llvm-svn: 97698
OpenPOWER on IntegriCloud