Anton Korobeynikov
a0113f6c70
Cygwin defines uint32_t as unsigned long. Unbreak call to std::min in this case
...
llvm-svn: 45342
2007-12-24 11:16:47 +00:00
Gordon Henriksen
3e409a37ac
Setting GlobalDirective in TargetAsmInfo by default rather than
...
providing a misleading facility. It's used once in the MIPS backend
and hardcoded as "\t.globl\t" everywhere else.
llvm-svn: 45338
2007-12-23 20:58:16 +00:00
Gordon Henriksen
606ac32019
C and Ocaml bindings for ExecutionEngine (i.e., the JIT compiler).
...
llvm-svn: 45335
2007-12-23 16:59:28 +00:00
Owen Anderson
e9538b78ce
Sketch out an implementation of Briggs' copy placement algorithm.
...
llvm-svn: 45334
2007-12-23 15:37:26 +00:00
Chris Lattner
a2156b160a
fix some warnings. This code needs to be de-tabified :(
...
llvm-svn: 45325
2007-12-22 22:47:03 +00:00
Chris Lattner
1c6a1f71cb
fix strict-aliasing violation
...
llvm-svn: 45324
2007-12-22 22:45:38 +00:00
Chris Lattner
084002dcb0
initial code for forming an FGETSIGN node. This is disabled until
...
legalizer support goes in.
llvm-svn: 45323
2007-12-22 21:35:38 +00:00
Chris Lattner
24b2a6de5c
improve support for fgetsign
...
llvm-svn: 45322
2007-12-22 21:26:52 +00:00
Chris Lattner
a8f6fac7a3
Tell TargetLoweringOpt whether it is running before
...
or after legalize.
llvm-svn: 45321
2007-12-22 20:56:36 +00:00
Chris Lattner
f2aa80e0de
Add a new FGETSIGN operation, which defaults to expand on all
...
targets.
llvm-svn: 45320
2007-12-22 20:47:56 +00:00
Anton Korobeynikov
4275f59e61
Erm, really disable :)
...
llvm-svn: 45319
2007-12-22 20:46:24 +00:00
Anton Korobeynikov
9f148a1a2a
Disable, until we'll really need it
...
llvm-svn: 45318
2007-12-22 20:41:12 +00:00
Gordon Henriksen
fccde96a4c
Use getIntrinsicID instead of looking up intrinsic prototypes. Also
...
fixes a bug with indirect calls. (Test case will be included with
ocaml collector patch.)
llvm-svn: 45316
2007-12-22 17:27:01 +00:00
Anton Korobeynikov
07c828b637
Unbreak mingw build
...
llvm-svn: 45314
2007-12-22 14:26:49 +00:00
Evan Cheng
c226a1a7d3
Preliminary PIC JIT support for X86 (32-bit) / Darwin.
...
llvm-svn: 45313
2007-12-22 09:40:20 +00:00
Evan Cheng
5b05d625cd
Oops.
...
llvm-svn: 45312
2007-12-22 09:14:34 +00:00
Chris Lattner
d64df490ca
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.
llvm-svn: 45311
2007-12-22 09:07:47 +00:00
Owen Anderson
3fc4fdaa1f
Note what still needs doing.
...
llvm-svn: 45310
2007-12-22 04:59:10 +00:00
Owen Anderson
f3765d08f8
Remove critical edge breaking. It won't be necessary as long as we are very careful when inserting copies.
...
llvm-svn: 45309
2007-12-22 04:50:11 +00:00
Evan Cheng
8f4ec948d3
Fix JIT code emission of X86::MovePCtoStack.
...
llvm-svn: 45307
2007-12-22 02:26:46 +00:00
Devang Patel
e035f776e9
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.
llvm-svn: 45305
2007-12-22 01:32:53 +00:00
Evan Cheng
51f51c7572
Allow JIT with non-static relocation model.
...
llvm-svn: 45304
2007-12-22 01:12:14 +00:00
Anton Korobeynikov
913c80d37f
Fix silly typo in the FP CEP handling.
...
llvm-svn: 45300
2007-12-21 23:33:44 +00:00
Duncan Sands
99690fb26c
Fix a brain fart by our beloved leader (the content
...
of this patch is the last line).
llvm-svn: 45289
2007-12-21 20:18:41 +00:00
Duncan Sands
bc10247769
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).
llvm-svn: 45286
2007-12-21 19:19:01 +00:00
Duncan Sands
85ca85c070
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).
llvm-svn: 45285
2007-12-21 19:16:16 +00:00
Nicolas Geoffray
1996d8b1f4
Fix unintented change from last commit
...
llvm-svn: 45282
2007-12-21 12:22:29 +00:00
Nicolas Geoffray
18ab237446
Enable EH for linux/ppc32 targets
...
llvm-svn: 45281
2007-12-21 12:19:44 +00:00
Evan Cheng
a111629401
New entry.
...
llvm-svn: 45280
2007-12-21 01:31:58 +00:00
Evan Cheng
eba18a1952
Fix JIT encoding for CMPSD as well.
...
llvm-svn: 45268
2007-12-20 19:57:09 +00:00
Evan Cheng
8fee10d116
More accurate checks for two-address constraints.
...
llvm-svn: 45259
2007-12-20 09:25:31 +00:00
Christopher Lamb
7ca648a7b1
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.
llvm-svn: 45256
2007-12-20 07:21:11 +00:00
Evan Cheng
d0bb7ee0a1
The physical register + virtual register joining requirement was much too strict.
...
llvm-svn: 45253
2007-12-20 02:23:25 +00:00
Evan Cheng
1994e3038e
Bring back a burr scheduling heuristic that's still needed.
...
llvm-svn: 45252
2007-12-20 02:22:36 +00:00
Evan Cheng
eb07401701
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.
...
llvm-svn: 45251
2007-12-20 02:20:53 +00:00
Chris Lattner
1a386cbdae
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.
llvm-svn: 45250
2007-12-20 01:56:58 +00:00
Bill Wendling
cba1938285
Updated comments to reflect what "side effects" means in this situation.
...
llvm-svn: 45245
2007-12-20 01:08:10 +00:00
Scott Michel
5cbdbd26a8
More working CellSPU tests:
...
- vec_const.ll: Vector constant loads
- immed64.ll: i64, f64 constant loads
llvm-svn: 45242
2007-12-20 00:44:13 +00:00
Evan Cheng
cf7b6b419a
Allow iv reuse if the user is a PHI node which is in turn used as addresses.
...
llvm-svn: 45230
2007-12-19 23:33:23 +00:00
Gordon Henriksen
46137f1e2e
Adding bindings for memory buffers and module providers. Switching
...
to exceptions rather than variants for error handling in Ocaml.
llvm-svn: 45226
2007-12-19 22:30:40 +00:00
Dale Johannesen
f93ea63eaa
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.)
llvm-svn: 45221
2007-12-19 21:54:36 +00:00
Scott Michel
83ac96e27d
CellSPU testcase, extract_elt.ll: extract vector element.
...
llvm-svn: 45219
2007-12-19 21:17:42 +00:00
Duncan Sands
56f3add5b7
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.
llvm-svn: 45218
2007-12-19 21:13:37 +00:00
Scott Michel
6cb9f6d20c
Two more test cases: or_ops.ll (arithmetic or operations) and vecinsert.ll
...
(vector insertions)
llvm-svn: 45216
2007-12-19 20:15:47 +00:00
Duncan Sands
b2e0a67cc0
Simplify LowerCallTo by using a callsite.
...
llvm-svn: 45198
2007-12-19 09:48:52 +00:00
Duncan Sands
09250d2dff
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).
llvm-svn: 45197
2007-12-19 07:36:31 +00:00
Scott Michel
d4d96bb6f6
Add new immed16.ll test case, fix CellSPU errata to make test case work.
...
llvm-svn: 45196
2007-12-19 07:35:06 +00:00
Bill Wendling
ce9eae6687
Mark the "isRemat" instruction as never having side effects.
...
llvm-svn: 45190
2007-12-19 06:07:48 +00:00
Evan Cheng
694994ba7b
Don't leave newly created nodes around if it turns out they are not needed.
...
llvm-svn: 45186
2007-12-19 01:34:38 +00:00
Ted Kremenek
b8c85efce1
Added "GetCurrentDirectory()" to sys::Path.
...
llvm-svn: 45182
2007-12-18 22:07:33 +00:00