| Commit message (Collapse) | Author | Age | Files | Lines | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
|  | 
llvm-svn: 45400
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
| 
|  | 
x = load p
  store x -> p
llvm-svn: 45398
 | 
| | 
| 
| 
|  | 
llvm-svn: 45397
 | 
| | 
| 
| 
|  | 
llvm-svn: 45393
 | 
| | 
| 
| 
| 
| 
|  | 
have potential side-effects.
llvm-svn: 45392
 | 
| | 
| 
| 
|  | 
llvm-svn: 45388
 | 
| | 
| 
| 
|  | 
llvm-svn: 45387
 | 
| | 
| 
| 
| 
| 
|  | 
pointing out my stupid mistakes when writing this patch. :-)
llvm-svn: 45384
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
|  | 
llvm-svn: 45377
 | 
| | 
| 
| 
| 
| 
|  | 
behaviour of LinkGlobals() function.
llvm-svn: 45375
 | 
| | 
| 
| 
|  | 
llvm-svn: 45369
 | 
| | 
| 
| 
|  | 
llvm-svn: 45367
 | 
| | 
| 
| 
| 
| 
|  | 
when copying functions.
llvm-svn: 45356
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
|  | 
LangRef.
llvm-svn: 45349
 | 
| | 
| 
| 
|  | 
llvm-svn: 45347
 | 
| | 
| 
| 
| 
| 
| 
|  | 
When specified, don't split backedges of single-bb loops.
This helps address PR1877
llvm-svn: 45344
 | 
| | 
| 
| 
|  | 
llvm-svn: 45343
 | 
| | 
| 
| 
|  | 
llvm-svn: 45342
 | 
| | 
| 
| 
| 
| 
| 
|  | 
providing a misleading facility. It's used once in the MIPS backend
and hardcoded as "\t.globl\t" everywhere else.
llvm-svn: 45338
 | 
| | 
| 
| 
|  | 
llvm-svn: 45335
 | 
| | 
| 
| 
|  | 
llvm-svn: 45334
 | 
| | 
| 
| 
|  | 
llvm-svn: 45325
 | 
| | 
| 
| 
|  | 
llvm-svn: 45324
 | 
| | 
| 
| 
| 
| 
|  | 
legalizer support goes in.
llvm-svn: 45323
 | 
| | 
| 
| 
|  | 
llvm-svn: 45322
 | 
| | 
| 
| 
| 
| 
|  | 
or after legalize.
llvm-svn: 45321
 | 
| | 
| 
| 
| 
| 
|  | 
targets.
llvm-svn: 45320
 | 
| | 
| 
| 
|  | 
llvm-svn: 45319
 | 
| | 
| 
| 
|  | 
llvm-svn: 45318
 | 
| | 
| 
| 
| 
| 
| 
|  | 
fixes a bug with indirect calls. (Test case will be included with
ocaml collector patch.)
llvm-svn: 45316
 | 
| | 
| 
| 
|  | 
llvm-svn: 45314
 | 
| | 
| 
| 
|  | 
llvm-svn: 45313
 | 
| | 
| 
| 
|  | 
llvm-svn: 45312
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
|  | 
llvm-svn: 45310
 | 
| | 
| 
| 
| 
| 
|  | 
careful when inserting copies.
llvm-svn: 45309
 | 
| | 
| 
| 
|  | 
llvm-svn: 45307
 | 
| | 
| 
| 
| 
| 
| 
|  | 
not merge current bb and succ even if bb's terminator is
unconditional branch to succ.
llvm-svn: 45305
 | 
| | 
| 
| 
|  | 
llvm-svn: 45304
 | 
| | 
| 
| 
|  | 
llvm-svn: 45300
 | 
| | 
| 
| 
| 
| 
|  | 
of this patch is the last line).
llvm-svn: 45289
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
|  | 
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
 | 
| | 
| 
| 
|  | 
llvm-svn: 45282
 |