Commit Graph

21150 Commits

Author SHA1 Message Date
Anton Korobeynikov
d07310af64 Erm, really disable :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45319 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 20:46:24 +00:00
Anton Korobeynikov
144a45eb94 Disable, until we'll really need it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45318 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 20:41:12 +00:00
Gordon Henriksen
a6c9925087 Use getIntrinsicID instead of looking up intrinsic prototypes. Also
fixes a bug with indirect calls. (Test case will be included with
ocaml collector patch.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45316 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 17:27:01 +00:00
Anton Korobeynikov
64ddbe48e1 Unbreak mingw build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45314 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 14:26:49 +00:00
Evan Cheng
aabe38bf0c Preliminary PIC JIT support for X86 (32-bit) / Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45313 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 09:40:20 +00:00
Evan Cheng
a9ab846669 Oops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45312 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 09:14:34 +00:00
Chris Lattner
8999dd3c68 implement InstCombine/shift-trunc-shift.ll. This allows
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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45311 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 09:07:47 +00:00
Owen Anderson
cae8d8d4be Note what still needs doing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45310 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 04:59:10 +00:00
Owen Anderson
22c43b2988 Remove critical edge breaking. It won't be necessary as long as we are very careful when inserting copies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45309 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 04:50:11 +00:00
Evan Cheng
f02ca69951 Fix JIT code emission of X86::MovePCtoStack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45307 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 02:26:46 +00:00
Devang Patel
01666bf74b If succ has succ itself as one of the predecessors then do
not merge current bb and succ even if bb's terminator is
unconditional branch to succ.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45305 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 01:32:53 +00:00
Evan Cheng
889ac61113 Allow JIT with non-static relocation model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45304 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-22 01:12:14 +00:00
Anton Korobeynikov
dceadaf8df Fix silly typo in the FP CEP handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45300 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 23:33:44 +00:00
Duncan Sands
5819799fa7 Fix a brain fart by our beloved leader (the content
of this patch is the last line).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45289 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 20:18:41 +00:00
Duncan Sands
d9d70395d9 Get the verifier to check attributes on calls as well
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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45286 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 19:19:01 +00:00
Duncan Sands
110c835039 Make DAE not wipe out attributes on calls, and not drop
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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45285 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 19:16:16 +00:00
Nicolas Geoffray
5a6c91a3ec Fix unintented change from last commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45282 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 12:22:29 +00:00
Nicolas Geoffray
616585bbff Enable EH for linux/ppc32 targets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45281 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 12:19:44 +00:00
Evan Cheng
0b0102b172 New entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45280 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21 01:31:58 +00:00
Evan Cheng
700a0fba97 Fix JIT encoding for CMPSD as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45268 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 19:57:09 +00:00
Evan Cheng
180c210a1d More accurate checks for two-address constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45259 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 09:25:31 +00:00
Christopher Lamb
103e1a3118 Implement review feedback, including additional transforms
(icmp slt (sub A B) 1) -> (icmp sle A B)
icmp sgt (sub A B) -1) -> (icmp sge A B)

and add testcase.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45256 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 07:21:11 +00:00
Evan Cheng
689494208b The physical register + virtual register joining requirement was much too strict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45253 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 02:23:25 +00:00
Evan Cheng
d6c0758944 Bring back a burr scheduling heuristic that's still needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45252 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 02:22:36 +00:00
Evan Cheng
32e4c7c486 Clean up previous patch: PHI uses should not prevent iv reuse if all other uses are addresses. This trades a constant multiply for one fewer iv.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45251 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 02:20:53 +00:00
Chris Lattner
42790486a8 simplify this code with the new m_Zero() pattern. Make sure the select only
has a single use, and generalize it to not require N to be a constant.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45250 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 01:56:58 +00:00
Bill Wendling
60ff1a3005 Updated comments to reflect what "side effects" means in this situation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45245 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 01:08:10 +00:00
Scott Michel
86c041f50e More working CellSPU tests:
- vec_const.ll: Vector constant loads
- immed64.ll: i64, f64 constant loads


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45242 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20 00:44:13 +00:00
Evan Cheng
d6b62a5722 Allow iv reuse if the user is a PHI node which is in turn used as addresses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45230 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 23:33:23 +00:00
Gordon Henriksen
da1435f86e Adding bindings for memory buffers and module providers. Switching
to exceptions rather than variants for error handling in Ocaml.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45226 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 22:30:40 +00:00
Dale Johannesen
696f768daf Enable EH on PPC Darwin. This basically works; there
are a couple of issues that show up with the optimizer,
but I don't think they're really EH problems.
(llvm-gcc testsuite users note:  By default the testsuite
uses the unwinding code that's built as part of your local
llvm-gcc, which does not work.  You need to trick it into
using the installed system unwinding code to get useful
results.)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45221 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 21:54:36 +00:00
Scott Michel
0e5665bf03 CellSPU testcase, extract_elt.ll: extract vector element.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45219 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 21:17:42 +00:00
Duncan Sands
f0c3354d99 When inlining through an 'nounwind' call, mark inlined
calls 'nounwind'.  It is important for correct C++
exception handling that nounwind markings do not get
lost, so this transformation is actually needed for
correctness.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45218 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 21:13:37 +00:00
Scott Michel
170783a5fc Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
(vector insertions)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45216 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 20:15:47 +00:00
Duncan Sands
6f74b48862 Simplify LowerCallTo by using a callsite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45198 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 09:48:52 +00:00
Duncan Sands
481dc721c3 The C++ exception handling personality function wants
to know about calls that cannot throw ('nounwind'):
if such a call does throw for some reason then the
personality will terminate the program.  The distinction
between an ordinary call and a nounwind call is that
an ordinary call gets an entry in the exception table
but a nounwind call does not.  This patch sets up the
exception table appropriately.  One oddity is that
I've chosen to bracket nounwind calls with labels (like
invokes) - the other choice would have been to bracket
ordinary calls with labels.  While bracketing
ordinary calls is more natural (because bracketing
by labels would then correspond exactly to getting an
entry in the exception table), I didn't do it because
introducing labels impedes some optimizations and I'm
guessing that ordinary calls occur more often than
nounwind calls.  This fixes the gcc filter2 eh test,
at least at -O0 (the inliner needs some tweaking at
higher optimization levels).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45197 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 07:36:31 +00:00
Scott Michel
9999e685ea Add new immed16.ll test case, fix CellSPU errata to make test case work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45196 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 07:35:06 +00:00
Bill Wendling
ee912540e7 Mark the "isRemat" instruction as never having side effects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45190 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 06:07:48 +00:00
Evan Cheng
02132d62c1 Don't leave newly created nodes around if it turns out they are not needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45186 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19 01:34:38 +00:00
Ted Kremenek
79200788df Added "GetCurrentDirectory()" to sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45182 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 22:07:33 +00:00
Bill Wendling
280f4565eb Add debugging info. Use the newly created "hasUnmodelledSideEffects" method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45178 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 21:38:04 +00:00
Christopher Lamb
7a0678cae6 Fold subtracts into integer compares vs. zero. This improves generate code for this case on X86
from
_foo:
        movl    $99, %ecx
        movl    4(%esp), %eax
        subl    %eax, %ecx
        xorl    %edx, %edx
        testl   %ecx, %ecx
        cmovs   %edx, %eax
        ret

to
_foo:
        xorl    %ecx, %ecx
        movl    4(%esp), %eax
        cmpl    $99, %eax
        cmovg   %ecx, %eax
        ret

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45173 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 21:32:20 +00:00
Anton Korobeynikov
feb8893d17 Support more insane CEP's in AsmPrinter (Yes, PyPy folks do really use them).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45172 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 20:53:41 +00:00
Christopher Lamb
1d87cb1c12 Fix comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45170 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 20:33:11 +00:00
Christopher Lamb
fd8b1fd7f6 Remove an orthogonal transformation of the selection condition from my most recent submission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45169 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 20:30:28 +00:00
Ted Kremenek
fd52711675 Added "isDirectory" method to llvm::sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45168 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:46:22 +00:00
Evan Cheng
636e5a216c Fix PR1872: SrcValue and SrcValueOffset should not be used to compute load / store node id.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45167 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:38:14 +00:00
Chris Lattner
ef361a638a remove obviously dead uses of IncludeFile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45165 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:15:48 +00:00
Evan Cheng
8131013861 Also print alignment and volatileness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45164 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:06:30 +00:00
Chris Lattner
e395598c98 remove a dead annotation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45163 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18 19:04:24 +00:00