summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Codegen:Chris Lattner2007-12-291-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as: _bar: pushl %esi subl $8, %esp movl 16(%esp), %esi call L_foo$stub fstps (%esi) addl $8, %esp popl %esi #FP_REG_KILL ret instead of: _bar: pushl %esi subl $8, %esp movl 16(%esp), %esi call L_foo$stub fstpl (%esi) cvtsd2ss (%esi), %xmm0 movss %xmm0, (%esi) addl $8, %esp popl %esi #FP_REG_KILL ret llvm-svn: 45401
* don't fold fp_round(fp_extend(load)) -> fp_round(extload)Chris Lattner2007-12-291-0/+4
| | | | llvm-svn: 45400
* avoid going through a stack slot to convert from fpstack to xmm regChris Lattner2007-12-292-29/+39
| | | | | | | | | if we are just going to store it back anyway. This improves things like: double foo(); void bar(double *P) { *P = foo(); } llvm-svn: 45399
* Delete a store whose input is a load from the same pointer:Chris Lattner2007-12-291-1/+12
| | | | | | | x = load p store x -> p llvm-svn: 45398
* add a noteChris Lattner2007-12-291-1/+41
| | | | llvm-svn: 45397
* expand note.Chris Lattner2007-12-291-0/+4
| | | | llvm-svn: 45393
* dead calls to llvm.stacksave can be deleted, even though theyChris Lattner2007-12-291-1/+10
| | | | | | have potential side-effects. llvm-svn: 45392
* add a note.Chris Lattner2007-12-281-0/+32
| | | | llvm-svn: 45388
* add a note.Chris Lattner2007-12-281-0/+32
| | | | llvm-svn: 45387
* Repair a transform that Chris noticed a bug in. Thanks to Nicholas for ↵Owen Anderson2007-12-281-5/+12
| | | | | | pointing out my stupid mistakes when writing this patch. :-) llvm-svn: 45384
* disable this instcombine xform, it miscompiles:Chris Lattner2007-12-281-0/+2
| | | | | | | | | | | | | | | | | | | define i32 @main() { entry: %z = alloca i32 ; <i32*> [#uses=2] store i32 0, i32* %z %tmp = load i32* %z ; <i32> [#uses=1] %sub = sub i32 %tmp, 1 ; <i32> [#uses=1] %cmp = icmp ult i32 %sub, 0 ; <i1> [#uses=1] %retval = select i1 %cmp, i32 1, i32 0 ; <i32> [#uses=1] ret i32 %retval } into ret 1, instead of ret 0. Christopher, please investigate. llvm-svn: 45383
* add a noteChris Lattner2007-12-281-0/+19
| | | | llvm-svn: 45377
* Ignore functions with internal linkages during linking. This snipped mimics theAnton Korobeynikov2007-12-271-0/+3
| | | | | | behaviour of LinkGlobals() function. llvm-svn: 45375
* Adding bindings for target triple and data layout.Gordon Henriksen2007-12-271-0/+19
| | | | llvm-svn: 45369
* Switch the bindings to use LLVMFoldingBuilder.Gordon Henriksen2007-12-271-1/+1
| | | | llvm-svn: 45367
* Fixing several transforms which would drop the collector attributeGordon Henriksen2007-12-254-0/+10
| | | | | | when copying functions. llvm-svn: 45356
* Don't break critical edges for single-bb loops, this helps with PR1877, thoughChris Lattner2007-12-251-3/+1
| | | | | | | | | | it is only a partial fix. This change is noise for most programs, but speeds up Shootout-C++/matrix by 20%, Ptrdist/ks by 24%, smg2000 by 8%, hexxagon by 9%, bzip2 by 9% (not sure I trust this), ackerman by 13%, etc. OTOH, it slows down Shootout/fib2 by 40% (I'll update PR1877 with this info). llvm-svn: 45354
* GC poses hazards to the inliner. Consider:Gordon Henriksen2007-12-251-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | define void @f() { ... call i32 @g() ... } define void @g() { ... } The hazards are: - @f and @g have GC, but they differ GC. Inlining is invalid. This may never occur. - @f has no GC, but @g does. g's GC must be propagated to @f. The other scenarios are safe: - @f and @g have the same GC. - @f and @g have no GC. - @g has no GC. This patch adds inliner checks for the former two scenarios. llvm-svn: 45351
* Noting and enforcing that GC intrinsics are valid only within aGordon Henriksen2007-12-251-28/+36
| | | | | | | | | function with GC. This will catch the error when the inliner inlines a function with GC into a caller with no GC. llvm-svn: 45350
* Adjusting verification of "llvm.gc*" intrinsic prototypes to matchGordon Henriksen2007-12-251-26/+33
| | | | | | LangRef. llvm-svn: 45349
* Flesh out the Briggs implementation a little bit more, fix a few FIXMEs.Owen Anderson2007-12-241-11/+35
| | | | llvm-svn: 45347
* add a -backedge-hack llc-beta option to codegenprepare.Chris Lattner2007-12-241-2/+10
| | | | | | | When specified, don't split backedges of single-bb loops. This helps address PR1877 llvm-svn: 45344
* add a simple hackChris Lattner2007-12-241-0/+12
| | | | llvm-svn: 45343
* Cygwin defines uint32_t as unsigned long. Unbreak call to std::min in this caseAnton Korobeynikov2007-12-241-1/+1
| | | | llvm-svn: 45342
* Setting GlobalDirective in TargetAsmInfo by default rather thanGordon Henriksen2007-12-232-2/+1
| | | | | | | providing a misleading facility. It's used once in the MIPS backend and hardcoded as "\t.globl\t" everywhere else. llvm-svn: 45338
* C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).Gordon Henriksen2007-12-231-0/+187
| | | | llvm-svn: 45335
* Sketch out an implementation of Briggs' copy placement algorithm.Owen Anderson2007-12-231-10/+104
| | | | llvm-svn: 45334
* fix some warnings. This code needs to be de-tabified :(Chris Lattner2007-12-221-2/+3
| | | | llvm-svn: 45325
* fix strict-aliasing violationChris Lattner2007-12-221-3/+1
| | | | llvm-svn: 45324
* initial code for forming an FGETSIGN node. This is disabled untilChris Lattner2007-12-221-0/+26
| | | | | | legalizer support goes in. llvm-svn: 45323
* improve support for fgetsignChris Lattner2007-12-221-0/+6
| | | | llvm-svn: 45322
* Tell TargetLoweringOpt whether it is running beforeChris Lattner2007-12-221-1/+1
| | | | | | or after legalize. llvm-svn: 45321
* Add a new FGETSIGN operation, which defaults to expand on allChris Lattner2007-12-221-1/+5
| | | | | | targets. llvm-svn: 45320
* Erm, really disable :)Anton Korobeynikov2007-12-221-1/+1
| | | | llvm-svn: 45319
* Disable, until we'll really need itAnton Korobeynikov2007-12-221-0/+3
| | | | llvm-svn: 45318
* Use getIntrinsicID instead of looking up intrinsic prototypes. AlsoGordon Henriksen2007-12-221-28/+29
| | | | | | | fixes a bug with indirect calls. (Test case will be included with ocaml collector patch.) llvm-svn: 45316
* Unbreak mingw buildAnton Korobeynikov2007-12-221-1/+2
| | | | llvm-svn: 45314
* Preliminary PIC JIT support for X86 (32-bit) / Darwin.Evan Cheng2007-12-225-65/+89
| | | | llvm-svn: 45313
* Oops.Evan Cheng2007-12-221-2/+1
| | | | llvm-svn: 45312
* implement InstCombine/shift-trunc-shift.ll. This allowsChris Lattner2007-12-221-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | us to compile: #include <math.h> int t1(double d) { return signbit(d); } into: _t1: movd %xmm0, %rax shrq $63, %rax ret instead of: _t1: movd %xmm0, %rax shrq $32, %rax shrl $31, %eax ret on x86-64. llvm-svn: 45311
* Note what still needs doing.Owen Anderson2007-12-221-1/+6
| | | | llvm-svn: 45310
* Remove critical edge breaking. It won't be necessary as long as we are very ↵Owen Anderson2007-12-221-37/+0
| | | | | | careful when inserting copies. llvm-svn: 45309
* Fix JIT code emission of X86::MovePCtoStack.Evan Cheng2007-12-222-5/+7
| | | | llvm-svn: 45307
* If succ has succ itself as one of the predecessors then doDevang Patel2007-12-221-2/+2
| | | | | | | not merge current bb and succ even if bb's terminator is unconditional branch to succ. llvm-svn: 45305
* Allow JIT with non-static relocation model.Evan Cheng2007-12-221-1/+2
| | | | llvm-svn: 45304
* Fix silly typo in the FP CEP handling.Anton Korobeynikov2007-12-211-0/+1
| | | | llvm-svn: 45300
* Fix a brain fart by our beloved leader (the contentDuncan Sands2007-12-211-4/+3
| | | | | | of this patch is the last line). llvm-svn: 45289
* Get the verifier to check attributes on calls as wellDuncan Sands2007-12-211-74/+97
| | | | | | | | | | as on functions. Make it verify invokes and not just ordinary calls. As a (desired) side-effect, it is no longer legal to have call attributes on arguments that are being passed to the varargs part of a varargs function (llvm-as drops them on the floor anyway). llvm-svn: 45286
* Make DAE not wipe out attributes on calls, and not dropDuncan Sands2007-12-211-36/+55
| | | | | | | | | | | | | | | return attributes on the floor. In the case of a call to a varargs function where the varargs arguments are being removed, any call attributes on those arguments need to be dropped. I didn't do this because I plan to make it illegal to have such attributes (see next patch). With this change, compiling the gcc filter2 eh test at -O0 and then running opt -std-compile-opts on it results in a correctly working program (compiling at -O1 or higher results in the test failing due to a problem with how we output eh info into the IR). llvm-svn: 45285
* Fix unintented change from last commitNicolas Geoffray2007-12-211-3/+3
| | | | llvm-svn: 45282
OpenPOWER on IntegriCloud