Devang Patel
120e962243
Enable debug info for composite types.
...
llvm-svn: 62589
2009-01-20 18:13:03 +00:00
Evan Cheng
6cdcf1eb73
Refactor code. No functionality change.
...
llvm-svn: 62573
2009-01-20 06:44:16 +00:00
Bill Wendling
786a683441
Shift types need to match.
...
llvm-svn: 62571
2009-01-20 06:10:42 +00:00
Chris Lattner
c59945b4bd
another fix for PR3354
...
llvm-svn: 62561
2009-01-20 01:15:41 +00:00
Dan Gohman
83d2e066c1
Add a README entry noticed while investigating PR3216.
...
llvm-svn: 62558
2009-01-20 01:07:33 +00:00
Dan Gohman
161b7b66ac
Fix a dagcombine to not generate loads of non-round integer types,
...
as its comment says, even in the case where it will be generating
extending loads. This fixes PR3216.
llvm-svn: 62557
2009-01-20 01:06:45 +00:00
Devang Patel
af6a3748c7
Do not use DenseMap because the iterator is invalidated while constructing types. After all there was a reason why std::map was used initially!
...
llvm-svn: 62555
2009-01-20 00:58:55 +00:00
Nick Lewycky
766ac10452
Make the Interpreter use libffi if it's available. Patch from Alexei Svitkine!
...
This requires a rebuild of 'configure' itself. I will be committing that next, but
built with the wrong version of autoconf. Somebody who has the right one, please update
it.
As a side-note, because of the way autoconf works, all built tools will link against
libffi, not just lli. If you know how to fix this, please let me know ...
llvm-svn: 62553
2009-01-20 00:51:40 +00:00
Evan Cheng
8f79775a66
Make linear scan's trivial coalescer slightly more aggressive.
...
llvm-svn: 62547
2009-01-20 00:16:18 +00:00
Bill Wendling
caf1d22243
Doxygen-ify comments.
...
llvm-svn: 62546
2009-01-19 23:43:56 +00:00
Devang Patel
44afc82ebe
Verify debug info.
...
llvm-svn: 62545
2009-01-19 23:21:49 +00:00
Chris Lattner
ea9f1d3c47
Fix a problem exposed by PR3354: simplifycfg was making a potentially
...
trapping instruction be executed unconditionally.
llvm-svn: 62541
2009-01-19 23:03:13 +00:00
Dan Gohman
534c8a2d72
Remove SDNode's virtual destructor. This makes it impossible for
...
SDNode subclasses to keep state that requires non-trivial
destructors, however it was already effectively impossible,
since the destructor isn't actually ever called. There currently
aren't any SDNode subclasses affected by this, and in general
it's desireable to keep SDNode objects light-weight.
This eliminates the last virtual member function in the SDNode
class, so it eliminates the need for a vtable pointer, making
SDNode smaller.
llvm-svn: 62539
2009-01-19 22:39:36 +00:00
Chris Lattner
73d7fe5a34
improve compatibility with cygwin, patch by Jay Foad!
...
llvm-svn: 62535
2009-01-19 22:00:18 +00:00
Chris Lattner
dd8ef1bf30
div/rem by zero and div/rem overflow are both undefined according to
...
langref. Constant fold them to undef instead of trying to preserve
the trap. This fixes PR3354.
llvm-svn: 62534
2009-01-19 21:55:26 +00:00
Dan Gohman
cd0b1bf0a0
Fix SelectionDAG::ReplaceAllUsesWith to behave correctly when
...
uses are added to the From node while it is processing From's
use list, because of automatic local CSE. The fix is to avoid
visiting any new uses.
Fix a few places in the DAGCombiner that assumed that after
a RAUW call, the From node has no users and may be deleted.
This fixes PR3018.
llvm-svn: 62533
2009-01-19 21:44:21 +00:00
Chris Lattner
6f34e317e9
Fix PR3353, infinitely jump threading an infinite loop make from switches.
...
llvm-svn: 62529
2009-01-19 21:20:34 +00:00
Dale Johannesen
740e98704d
compile-time fmod was done incorrectly. PR 3316.
...
llvm-svn: 62528
2009-01-19 21:17:05 +00:00
Devang Patel
8c8aa2ac29
Verify Intrinsic::dbg_declare.
...
llvm-svn: 62526
2009-01-19 21:00:48 +00:00
Evan Cheng
44cc554311
DIVREM isel deficiency: If sign bit is known zero, zero out DX/EDX/RDX instead of sign extending the low part (in AX/EAX/RAX) into it.
...
llvm-svn: 62519
2009-01-19 19:06:11 +00:00
Evan Cheng
0346c04f39
Fix 80 col violations.
...
llvm-svn: 62518
2009-01-19 18:57:29 +00:00
Evan Cheng
6c02498215
Handle ISD::DECLARE with PIC relocation model.
...
llvm-svn: 62516
2009-01-19 18:31:51 +00:00
Nick Lewycky
030c450fdc
Fix typo, sentence fragment.
...
llvm-svn: 62512
2009-01-19 17:42:33 +00:00
Bill Wendling
534d2e0bae
Temporarily revert r62487. It's causing this error during a release bootstrap of
...
llvm-gcc. Most likely, it's miscompiling one of the "gen*" programs:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./prev-gcc/xgcc -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.obj/./prev-gcc/ -B/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm-gcc.install/i386-apple-darwin9.6.0/bin/ -c -g -O2 -mdynamic-no-pic -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -mdynamic-no-pic -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/build -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -o build/gencondmd.o build/gencondmd.c
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected '}' before ')' token
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: warning: excess elements in struct initializer
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: warning: (near initialization for 'insn_conditions[4]')
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected '}' before ')' token
../../llvm-gcc.src/gcc/config/i386/mmx.md:926: error: expected ',' or ';' before ')' token
../../llvm-gcc.src/gcc/config/i386/mmx.md:927: error: expected identifier or '(' before ',' token
../../llvm-gcc.src/gcc/config/i386/sse.md:3458: error: expected identifier or '(' before ',' token
...
llvm-svn: 62506
2009-01-19 08:46:20 +00:00
Evan Cheng
8f367e53c7
Minor tweak to LowerUINT_TO_FP_i32. Bias (after scalar_to_vector) has two uses so we should make it the second source operand of ISD::OR so 2-address pass won't have to be smart about commuting.
...
%reg1024<def> = MOVSDrm %reg0, 1, %reg0, <cp#0>, Mem:LD(8,8) [ConstantPool + 0]
%reg1025<def> = MOVSD2PDrr %reg1024
%reg1026<def> = MOVDI2PDIrm <fi#-1>, 1, %reg0, 0, Mem:LD(4,16) [FixedStack-1 + 0]
%reg1027<def> = ORPSrr %reg1025<kill>, %reg1026<kill>
%reg1028<def> = MOVPD2SDrr %reg1027<kill>
%reg1029<def> = SUBSDrr %reg1028<kill>, %reg1024<kill>
%reg1030<def> = CVTSD2SSrr %reg1029<kill>
MOVSSmr <fi#0>, 1, %reg0, 0, %reg1030<kill>, Mem:ST(4,4) [FixedStack0 + 0]
%reg1031<def> = LD_Fp32m80 <fi#0>, 1, %reg0, 0, Mem:LD(4,16) [FixedStack0 + 0]
RET %reg1031<kill>, %ST0<imp-use,kill>
The reason 2-addr pass isn't smart enough to commute the ORPSrr is because it can't look pass the MOVSD2PDrr instruction.
llvm-svn: 62505
2009-01-19 08:19:57 +00:00
Evan Cheng
7e9ef4d776
Now not UINT_TO_FP is legal (it's marked custom), dag combiner won't
...
optimize it to a SINT_TO_FP when the sign bit is known zero. X86 isel should perform the optimization itself.
llvm-svn: 62504
2009-01-19 08:08:22 +00:00
Chris Lattner
f2bb4ea39c
Fix PR3016, a bug which can occur do to an invalid assumption:
...
we assumed a CFG structure that would be valid when all code in
the function is reachable, but not all code is necessarily
reachable. Do a simple, but horrible, CFG walk to check for this
case.
llvm-svn: 62487
2009-01-19 02:46:28 +00:00
Chris Lattner
e381d7026f
reduce indentation by using 'continue', no functionality change.
...
llvm-svn: 62477
2009-01-19 02:07:32 +00:00
Chris Lattner
54f0c61d71
Fix some problems in SpeculativelyExecuteBB. Basically,
...
because of dead code, a phi could use the speculated instruction
that was not in "BB2". Make this check explicit and tighten up
some other corners. This fixes PR3292. No testcase becauase this
depends entirely on visitation order of blocks and requires a
sequence of 8 passes to repro.
llvm-svn: 62476
2009-01-19 00:36:37 +00:00
Chris Lattner
e1c01e4e2b
Make this a bit more explicit about which cases need the
...
check. No functionality change.
llvm-svn: 62474
2009-01-18 23:22:07 +00:00
Chris Lattner
64b7bd7f9e
Fix rdar://6505632, an llc crash on 483.xalancbmk
...
llvm-svn: 62470
2009-01-18 20:35:00 +00:00
Sanjiv Gupta
1d2fc787a9
Few targets like PIC16 wants libcall generation for illegal type i16.
...
llvm-svn: 62467
2009-01-18 18:25:27 +00:00
Oscar Fuentes
963c975975
CMake: Add lib/Analysis/CaptureTracking.cpp
...
llvm-svn: 62462
2009-01-18 13:14:11 +00:00
Duncan Sands
e0aa0d677d
BasicAliasAnalysis and FunctionAttrs were both
...
doing very similar pointer capture analysis.
Factor out the common logic. The new version
is from FunctionAttrs since it does a better
job than the version in BasicAliasAnalysis
llvm-svn: 62461
2009-01-18 12:19:30 +00:00
Mon P Wang
e9e7abb6b8
Simplify extract element based on comments from Duncan Sands.
...
llvm-svn: 62459
2009-01-18 06:43:40 +00:00
Nick Lewycky
3ced0dfa69
Fix copy and pasted typos that prevented strtok_r, realloc, getenv, ungetc,
...
putc, puts, perror, vscanf and vsscanf from getting annotations.
Add annotations for eight printf functions, memalign, pread and pwrite.
On Linux, llvm-gcc sometimes renames strdup, getc, putc, strtok_r, scanf and
sscanf. Match the alternate function names.
Fix a crash annotating opendir.
Don't mark fsetpos's second parameter as nocapture. It's supposed to be
captured.
Do mark fopen's path and mode strings as nocapture. Mark ferror as readonly,
but not fileno which may set errno.
llvm-svn: 62456
2009-01-18 04:34:36 +00:00
Gabor Greif
1b94d420ae
add a comment
...
llvm-svn: 62436
2009-01-18 00:27:21 +00:00
Gabor Greif
20b722fe1c
switch over some other methods from indices to iterators
...
llvm-svn: 62430
2009-01-17 19:46:01 +00:00
Devang Patel
3f634fe364
Remove tabs.
...
llvm-svn: 62423
2009-01-17 08:05:14 +00:00
Devang Patel
8ee1c9f220
Refactor code
...
llvm-svn: 62421
2009-01-17 08:01:33 +00:00
Bill Wendling
f9291cf43c
Extend thi
...
llvm-svn: 62415
2009-01-17 07:40:19 +00:00
Evan Cheng
bf38a5e540
Fix MatchAddress bug that's preventing negative displacement from being folded in 64-bit mode.
...
llvm-svn: 62413
2009-01-17 07:09:27 +00:00
Devang Patel
bf7d432ce4
Assign argument type to appropriate DIE.
...
llvm-svn: 62412
2009-01-17 06:57:25 +00:00
Devang Patel
2e32f71dfa
Remove dead code.
...
llvm-svn: 62410
2009-01-17 06:51:37 +00:00
Devang Patel
d250ef911f
Disable composite type debug info for now.
...
llvm-svn: 62406
2009-01-17 05:05:12 +00:00
Bill Wendling
dd40f26877
Temporarily revert my last change. It is causing a bootstrap failure.
...
llvm-svn: 62405
2009-01-17 04:23:51 +00:00
Bill Wendling
4d5275905e
Implement a special algorithm for converting uint_to_fp for i32 values on
...
X86. This code:
void f() {
uint32_t x;
float y = (float)x;
}
used to be:
movl %eax, -8(%ebp)
movl [2^52 double], -4(%ebp)
movsd -8(%ebp), %xmm0
subsd [2^52 double], %xmm0
cvtsd2ss %xmm0, %xmm0
Is now:
movsd [2^52 double], %xmm0
movsd %xmm0, %xmm1
movd %ecx, %xmm2
orps %xmm2, %xmm1
subsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
This is faster on X86. Note that there's an extra load of %xmm0 into %xmm1. That
will be fixed in a later coalescer fix.
llvm-svn: 62404
2009-01-17 03:56:04 +00:00
Oscar Fuentes
90cc7050f2
CMake: Add lib/Target/IA64/IA64Subtarget.cpp
...
llvm-svn: 62394
2009-01-17 01:50:32 +00:00
Gabor Greif
1c6549db6f
speed up iterative loop by using iterators. changes direction, but functionally equivalent
...
if this works out, I'll change the others next.
llvm-svn: 62385
2009-01-17 00:14:25 +00:00
Gabor Greif
f1abfdccdc
introduce typedef for complicated vector, and use it too
...
llvm-svn: 62384
2009-01-17 00:09:08 +00:00