Commit Graph

44014 Commits

Author SHA1 Message Date
Chris Lattner
2c7ed11d93 Fix PR3353, infinitely jump threading an infinite loop make from switches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62529 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 21:20:34 +00:00
Dale Johannesen
1f54f58e64 compile-time fmod was done incorrectly. PR 3316.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 21:17:05 +00:00
Devang Patel
c15255cfe9 DebugInfo is a lightweight APIs and consumers are expected to use light objects directly. There is no need to support isa<>, dyn_cast<> etc...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 21:13:39 +00:00
Devang Patel
0153308abf Verify Intrinsic::dbg_declare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 21:00:48 +00:00
Mike Stump
b76ace310a Add targets to support the installation of clang in isolation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 19:48:23 +00:00
Evan Cheng
2722e7b139 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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62519 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 19:06:11 +00:00
Evan Cheng
c1a168a0fc Fix 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 18:57:29 +00:00
Evan Cheng
5fc742d5b2 Handle ISD::DECLARE with PIC relocation model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 18:31:51 +00:00
Nick Lewycky
1999ff1d81 Port this test from dejagnu to unit testing.
The way this worked before was to test APInt by running
"lli -force-interpreter=true" knowing the lli uses APInt under the hood to
store its values. Now, we test APInt directly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62514 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 18:08:33 +00:00
Nick Lewycky
4bd4787785 Fix typo, sentence fragment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62512 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 17:42:33 +00:00
Dan Villiom Podlaski Christiansen
bf22bc66b9 Adding your's truly to CREDITS.TXT
(This is also a test commit.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62511 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 15:04:29 +00:00
Bill Wendling
13524bfd00 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
...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62506 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 08:46:20 +00:00
Evan Cheng
50c3dfefd9 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62505 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 08:19:57 +00:00
Evan Cheng
a06ec9efe1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62504 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 08:08:22 +00:00
Chris Lattner
c4f85dd708 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62487 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 02:46:28 +00:00
Chris Lattner
9e0dad4f41 reduce indentation by using 'continue', no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62477 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 02:07:32 +00:00
Chris Lattner
6fe73bbcf3 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62476 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-19 00:36:37 +00:00
Chris Lattner
9dd3b610dc Make this a bit more explicit about which cases need the
check.  No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62474 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 23:22:07 +00:00
Chris Lattner
d62284a804 Fix rdar://6505632, an llc crash on 483.xalancbmk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62470 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 20:35:00 +00:00
Sanjiv Gupta
15c94d08ab Few targets like PIC16 wants libcall generation for illegal type i16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62467 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 18:25:27 +00:00
Oscar Fuentes
2cb560f6ef CMake: Add lib/Analysis/CaptureTracking.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62462 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 13:14:11 +00:00
Duncan Sands
8556d2a7f1 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62461 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 12:19:30 +00:00
Mon P Wang
e3bc6ae92a Simplify extract element based on comments from Duncan Sands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 06:43:40 +00:00
Nick Lewycky
b3ec5ba9cd Forgot this in the previous checkin: fopen now has nocapture, realloc is
supposed to take two arguments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62457 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 04:46:10 +00:00
Nick Lewycky
0b6679d32f 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 04:34:36 +00:00
Gabor Greif
7f85bb6f83 add a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62436 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18 00:27:21 +00:00
Gabor Greif
7f2e381b56 switch over some other methods from indices to iterators
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62430 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 19:46:01 +00:00
Gabor Greif
7543f7fae3 make comparisons a bist faster
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 19:03:45 +00:00
Devang Patel
2d1768ca52 Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 08:05:14 +00:00
Devang Patel
5aac3d3707 Refactor code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62421 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 08:01:33 +00:00
Bill Wendling
959fb88949 Testcase for last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62418 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 07:42:44 +00:00
Bill Wendling
030939c87b Extend thi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62415 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 07:40:19 +00:00
Evan Cheng
8e27826649 Fix MatchAddress bug that's preventing negative displacement from being folded in 64-bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62413 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 07:09:27 +00:00
Devang Patel
7ab2450674 Assign argument type to appropriate DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62412 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 06:57:25 +00:00
Devang Patel
7e55b3a663 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62410 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 06:51:37 +00:00
Devang Patel
2d91d18ba1 Disable composite type debug info for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62406 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 05:05:12 +00:00
Bill Wendling
f6a4e2edb0 Temporarily revert my last change. It is causing a bootstrap failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62405 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 04:23:51 +00:00
Bill Wendling
8b8a636843 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 03:56:04 +00:00
Oscar Fuentes
70fd453a02 CMake: Add lib/Target/IA64/IA64Subtarget.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62394 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 01:50:32 +00:00
Gabor Greif
7b98424f71 speed up iterative loop by using iterators. changes direction, but functionally equivalent
if this works out, I'll change the others next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62385 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 00:14:25 +00:00
Gabor Greif
125329891f introduce typedef for complicated vector, and use it too
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62384 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 00:09:08 +00:00
Mon P Wang
7ac9cdfc99 Simplify extract element of a scalar to vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62383 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17 00:07:25 +00:00
Gabor Greif
de62aeaec4 typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62377 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 23:08:50 +00:00
Evan Cheng
ee5c2b8ba2 Fix PPC ISD::Declare isel and eliminate the need for PPCTargetLowering::LowerGlobalAddress to check if isVerifiedDebugInfoDesc() is true. Given the recent changes, it would falsely return true for a lot of GlobalAddressSDNode's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62373 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 22:57:32 +00:00
Mikhail Glushenkov
7059d47a6e Support for multi-valued options in CommandLine
Makes possible to specify options that take multiple arguments (a-la
-sectalign on Darwin). See documentation for details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62372 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 22:54:19 +00:00
Dan Gohman
01bbc3e334 Give IA64 a TargetSubtarget subclass, so that it can
implement getSubtargetImpl.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62369 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 22:49:36 +00:00
Dan Gohman
f7119393a9 Instead of adding dependence edges between terminator instructions
and every other instruction in their blocks to keep the terminator
instructions at the end, teach the post-RA scheduler how to operate
on ranges of instructions, and exclude terminators from the range
of instructions that get scheduled.

Also, exclude mid-block labels, such as EH_LABEL instructions, and
schedule code before them separately from code after them. This
fixes problems with the post-RA scheduler moving code past
EH_LABELs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 22:10:20 +00:00
Dan Gohman
49bb50e0b6 If an anti-dependence uses a non-allocatable register, set AntiDepReg
to 0, to ensure that the subsequent code doesn't try to break the
dependence.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62365 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 21:57:43 +00:00
Dan Gohman
b6a6164832 Use the getNode() accessor instead of accessing the Node
member directly, which is private as of r55504.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62364 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 21:47:21 +00:00
Dan Gohman
3326f16036 Disable the post-RA scheduler on this test, since it uses a
simple %prcontext which doesn't find what it's looking for
if the scheduler has rearranged the instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-16 21:40:12 +00:00