summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Micro-optimization:Bill Wendling2010-03-052-13/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add metadata example.Devang Patel2010-03-041-0/+17
| | | | llvm-svn: 97764
* Stop leaking MDStrings.Jeffrey Yasskin2010-03-042-11/+23
| | | | llvm-svn: 97763
* Make rewritten source compiled with clang++.Fariborz Jahanian2010-03-041-11/+2
| | | | llvm-svn: 97762
* Make rewritten source compiled with clang++ for correctness.Fariborz Jahanian2010-03-041-4/+2
| | | | llvm-svn: 97761
* Drop the ".w" qualifier for t2UXTB16* instructions as there is no 16-bit versionJohnny Chen2010-03-042-11/+37
| | | | | | 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
* Change test to compile rewritten test with clang++.Fariborz Jahanian2010-03-041-1/+2
| | | | llvm-svn: 97756
* pr6478: The frame pointer spill frame index is only defined when there is aBob Wilson2010-03-042-1/+68
| | | | | | frame pointer. llvm-svn: 97755
* Patch to get around a rewriter bug rewriting storage classFariborz Jahanian2010-03-041-6/+15
| | | | | | on a block API struct definition. llvm-svn: 97754
* Run machine licm before machine cse to avoid messing up licm opportunities.Evan Cheng2010-03-041-2/+2
| | | | llvm-svn: 97752
* really fix 6473 by handling weakref in constant expressions.Rafael Espindola2010-03-042-1/+11
| | | | llvm-svn: 97750
* Avoid cse load instructions unless they are known to be invariant loads.Evan Cheng2010-03-041-10/+36
| | | | llvm-svn: 97747
* add TCE target support, patch by Pekka J!Chris Lattner2010-03-046-3/+136
| | | | llvm-svn: 97746
* pr6480: Don't try producing ld/st-multiple instructions when the address isBob Wilson2010-03-042-0/+59
| | | | | | | | 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
* Use LLVM's new DESTDIR-less PROJ_* variables.Erick Tryzelaar2010-03-042-12/+12
| | | | llvm-svn: 97744
* Rewrite makefiles to explicitly reference DESTDIR to fix bug 3153.Erick Tryzelaar2010-03-047-51/+51
| | | | | | 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-042-8/+36
| | | | | | | | | 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-042-5/+77
| | | | | | 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-042-115/+27
| | | | | | | | | 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
* c-index-test's printing of linkage was completely broken, as was theDouglas Gregor2010-03-042-9/+12
| | | | | | test of this functionality. The API worked great, though! :) llvm-svn: 97736
* Fix a typo Duncan noticed.Dan Gohman2010-03-041-1/+1
| | | | llvm-svn: 97735
* Fixes a bug whereby static const block var has static Fariborz Jahanian2010-03-042-0/+28
| | | | | | moved incorrectly. (radar 7714443). llvm-svn: 97734
* Fix PR6473.Rafael Espindola2010-03-046-6/+174
| | | | | | | | | Clang's support for weakref is now better than llvm-gcc's :-) We don't introduce a new symbol and we correctly mark undefined references weak only if there is no definition or regular undefined references in the same file. llvm-svn: 97733
* 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
* Simplify the condition-checking logic and hopefully clear up a build failureJohn McCall2010-03-041-14/+7
| | | | | | that somehow got through my testing. llvm-svn: 97728
* Steal the TARGET lit condition from the LLVM test suite.John McCall2010-03-041-0/+12
| | | | llvm-svn: 97727
* Teach lit to honor conditional directives. The syntax is:John McCall2010-03-043-3/+33
| | | | | | | | | | | | | | | | IF(condition(value)): If the value satisfies the condition, the line is processed by lit; otherwise it is skipped. A test with no unignored directives is resolved as Unsupported. The test suite is responsible for defining conditions; conditions are unary functions over strings. I've defined two conditions in the LLVM test suite, TARGET (with values like those in TARGETS_TO_BUILD) and BINDING (with values like those in llvm_bindings). So for example you can write: IF(BINDING(ocaml)): RUN: %blah %s -o - and the RUN line will only execute if LLVM was configured with the ocaml bindings. llvm-svn: 97726
* The FIXME is fixed.Zhongxing Xu2010-03-041-1/+0
| | | | llvm-svn: 97725
* When profiling Environment, also profile with AnalysisContext*, bacauseZhongxing Xu2010-03-046-0/+27
| | | | | | | | | | we now may have identical states with different analysis context. Set the right AnalysisContext in state when entering and leaving a callee. With both of the above changes, we can pass the test case. llvm-svn: 97724
* Make the 'icmp pred trunc(ext(X)), CST --> icmp pred X, ext(trunc(CST))'Nick Lewycky2010-03-042-24/+23
| | | | | | | | | | 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-042-24/+65
| | | | | | the set. llvm-svn: 97720
* Revert changes r97693, r97700, and r97718.John McCall2010-03-0415-132/+62
| | | | | | Our testing framework can't deal with disabled targets yet. llvm-svn: 97719
* XFAIL these tests on win32, since the win32 buildbot apparently disables allJohn McCall2010-03-048-0/+16
| | | | | | targets except X86. llvm-svn: 97718
* First start on smmintrin.h, rounding and blending.Eric Christopher2010-03-041-0/+130
| | | | llvm-svn: 97717
* Add in disabled case as well.Eric Christopher2010-03-041-0/+4
| | | | llvm-svn: 97716
* Add in -msse4.1 and -msse4.2 options and continuing a ratherEric Christopher2010-03-042-3/+13
| | | | | | | hacky solution for translating. Expanded on comment explaining the hack a bit. llvm-svn: 97714
* 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
* so hey, it turns out that the histogram was completely wrong, becauseChris Lattner2010-03-041-10/+32
| | | | | | | we sometimes emit nodes multiple times to string buffers to size them. Compute the histogram correctly. llvm-svn: 97708
* Fix __builtin_ia32_roundss and __builtin_ia32_roundsd definitions.Eric Christopher2010-03-042-4/+4
| | | | | | Re-enable test. llvm-svn: 97707
* 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
* zap fixme.Chris Lattner2010-03-041-4/+0
| | | | llvm-svn: 97705
* now that complexpatterns are all emitted at the end of the matchChris Lattner2010-03-041-4/+3
| | | | | | | | sequence, just emit instruction predicates right before them. This exposes yet more factoring opportunitites, shrinking the X86 table to 79144 bytes. llvm-svn: 97704
* change the new isel matcher to emit ComplexPattern matchesChris Lattner2010-03-044-40/+99
| | | | | | | | | | 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
OpenPOWER on IntegriCloud