Bill Wendling [Mon, 19 Jan 2009 08:46:20 +0000 (08:46 +0000)]
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
Evan Cheng [Mon, 19 Jan 2009 08:19:57 +0000 (08:19 +0000)]
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
Evan Cheng [Mon, 19 Jan 2009 08:08:22 +0000 (08:08 +0000)]
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
Chris Lattner [Mon, 19 Jan 2009 02:46:28 +0000 (02:46 +0000)]
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
Chris Lattner [Mon, 19 Jan 2009 02:07:32 +0000 (02:07 +0000)]
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
Chris Lattner [Mon, 19 Jan 2009 00:36:37 +0000 (00:36 +0000)]
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
Chris Lattner [Sun, 18 Jan 2009 23:22:07 +0000 (23:22 +0000)]
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
Chris Lattner [Sun, 18 Jan 2009 20:35:00 +0000 (20:35 +0000)]
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
Sanjiv Gupta [Sun, 18 Jan 2009 18:25:27 +0000 (18:25 +0000)]
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
Oscar Fuentes [Sun, 18 Jan 2009 13:14:11 +0000 (13:14 +0000)]
CMake: Add lib/Analysis/CaptureTracking.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62462
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sun, 18 Jan 2009 12:19:30 +0000 (12:19 +0000)]
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
Mon P Wang [Sun, 18 Jan 2009 06:43:40 +0000 (06:43 +0000)]
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
Nick Lewycky [Sun, 18 Jan 2009 04:46:10 +0000 (04:46 +0000)]
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
Nick Lewycky [Sun, 18 Jan 2009 04:34:36 +0000 (04:34 +0000)]
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
Gabor Greif [Sun, 18 Jan 2009 00:27:21 +0000 (00:27 +0000)]
add a comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62436
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sat, 17 Jan 2009 19:46:01 +0000 (19:46 +0000)]
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
Gabor Greif [Sat, 17 Jan 2009 19:03:45 +0000 (19:03 +0000)]
make comparisons a bist faster
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62428
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 17 Jan 2009 08:05:14 +0000 (08:05 +0000)]
Remove tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62423
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 17 Jan 2009 08:01:33 +0000 (08:01 +0000)]
Refactor code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62421
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 17 Jan 2009 07:42:44 +0000 (07:42 +0000)]
Testcase for last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62418
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 17 Jan 2009 07:40:19 +0000 (07:40 +0000)]
Extend thi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62415
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 17 Jan 2009 07:09:27 +0000 (07:09 +0000)]
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
Devang Patel [Sat, 17 Jan 2009 06:57:25 +0000 (06:57 +0000)]
Assign argument type to appropriate DIE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62412
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 17 Jan 2009 06:51:37 +0000 (06:51 +0000)]
Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62410
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sat, 17 Jan 2009 05:05:12 +0000 (05:05 +0000)]
Disable composite type debug info for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62406
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 17 Jan 2009 04:23:51 +0000 (04:23 +0000)]
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
Bill Wendling [Sat, 17 Jan 2009 03:56:04 +0000 (03:56 +0000)]
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
Oscar Fuentes [Sat, 17 Jan 2009 01:50:32 +0000 (01:50 +0000)]
CMake: Add lib/Target/IA64/IA64Subtarget.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62394
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Sat, 17 Jan 2009 00:14:25 +0000 (00:14 +0000)]
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
Gabor Greif [Sat, 17 Jan 2009 00:09:08 +0000 (00:09 +0000)]
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
Mon P Wang [Sat, 17 Jan 2009 00:07:25 +0000 (00:07 +0000)]
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
Gabor Greif [Fri, 16 Jan 2009 23:08:50 +0000 (23:08 +0000)]
typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62377
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Jan 2009 22:57:32 +0000 (22:57 +0000)]
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
Mikhail Glushenkov [Fri, 16 Jan 2009 22:54:19 +0000 (22:54 +0000)]
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
Dan Gohman [Fri, 16 Jan 2009 22:49:36 +0000 (22:49 +0000)]
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
Dan Gohman [Fri, 16 Jan 2009 22:10:20 +0000 (22:10 +0000)]
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
Dan Gohman [Fri, 16 Jan 2009 21:57:43 +0000 (21:57 +0000)]
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
Dan Gohman [Fri, 16 Jan 2009 21:47:21 +0000 (21:47 +0000)]
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
Dan Gohman [Fri, 16 Jan 2009 21:40:12 +0000 (21:40 +0000)]
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
Dan Gohman [Fri, 16 Jan 2009 21:37:14 +0000 (21:37 +0000)]
Fix the check for an empty basic block to check for an empty SUnits
array instead, since this is what the scheduler actually cares about.
And remove a check that is unnecessary, since it can assume that
SUnits isn't empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62362
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 16 Jan 2009 21:30:55 +0000 (21:30 +0000)]
Avoid triggering an assertion failure when an instruction pattern
is a leaf node. Patch by Brandner!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62361
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 21:15:56 +0000 (21:15 +0000)]
new nodes should be added to the worklist, not old nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62359
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 16 Jan 2009 21:07:53 +0000 (21:07 +0000)]
Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62358
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Jan 2009 20:57:18 +0000 (20:57 +0000)]
CreateVirtualRegisters does trivial copy coalescing. If a node def is used by a single CopyToReg, it reuses the virtual register assigned to the CopyToReg. This won't work for SDNode that is a clone or is itself cloned. Disable this optimization for those nodes or it can end up with non-SSA machine instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62356
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 20:26:53 +0000 (20:26 +0000)]
remove a dead method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62354
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 20:17:02 +0000 (20:17 +0000)]
don't assert and die on out of range (undefined) shifts. This fixes
PR3334.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62352
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 20:12:52 +0000 (20:12 +0000)]
Fix PR3335 by not turning a store to one address space into a store to another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62351
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Jan 2009 20:08:59 +0000 (20:08 +0000)]
reduce indentation by using early exits, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62350
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 16 Jan 2009 19:28:14 +0000 (19:28 +0000)]
Use lightweight DebugInfo objects directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62341
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 16 Jan 2009 19:25:27 +0000 (19:25 +0000)]
Add support for non-zero __builtin_return_address values on X86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62338
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Jan 2009 19:14:49 +0000 (19:14 +0000)]
Change isGVCompilationDisabled() semantics again. It should abort on any GV that's not constant whether it's "internal" or not. In a server / client environment, GV is returned in the same block of memory as code. However, the memory might not be writable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62336
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Fri, 16 Jan 2009 18:40:27 +0000 (18:40 +0000)]
use specialized accessor instead of plain getOperand(0)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62330
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 16 Jan 2009 18:01:58 +0000 (18:01 +0000)]
Align source code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62328
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 16 Jan 2009 17:55:08 +0000 (17:55 +0000)]
Fix a "comparison between signed and unsigned integer expressions"
warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62327
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 16 Jan 2009 17:07:22 +0000 (17:07 +0000)]
Reinstate r60509 from Dale:
Make the debugging dump be a full line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62325
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 16 Jan 2009 15:54:57 +0000 (15:54 +0000)]
Get this building with gcc-4.4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62322
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 16 Jan 2009 09:29:46 +0000 (09:29 +0000)]
Grammar fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62319
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 16 Jan 2009 07:02:28 +0000 (07:02 +0000)]
Registry.h should not depend on CommandLine.h.
Split Support/Registry.h into two files so that we have less to
recompile every time CommandLine.h is changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62312
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Jan 2009 06:59:14 +0000 (06:59 +0000)]
This is now passing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62308
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 16 Jan 2009 06:53:46 +0000 (06:53 +0000)]
Delete trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62307
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 16 Jan 2009 05:06:35 +0000 (05:06 +0000)]
Reverting back 62301.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62304
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Fri, 16 Jan 2009 02:45:46 +0000 (02:45 +0000)]
Few targets do not have a single directive to emit global constants.
For example, PIC16 needs to break a long or int constant into mulitple parts and emit multiple directives. So Allow targets to overried EmitConstantValueOnly().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62301
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Jan 2009 02:16:37 +0000 (02:16 +0000)]
ARMCompilationCallback should not save / restore vfp registers if vfp is not available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62299
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 16 Jan 2009 02:15:14 +0000 (02:15 +0000)]
Validate debug info values only if DwarfDebug is initialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62298
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 16 Jan 2009 02:11:43 +0000 (02:11 +0000)]
Clean up previous cast optimization a bit. Also make zext elimination a bit more aggressive: if it's not necessary to emit an AND (i.e. high bits are already zero), it's profitable to evaluate the operand at a different type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62297
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 16 Jan 2009 02:05:52 +0000 (02:05 +0000)]
Add support for instructions with multiple ComplexPatterns, by
adding more information to the temporary variables names so that
they don't conflict.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62296
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 16 Jan 2009 01:49:46 +0000 (01:49 +0000)]
Any debug info symbol is only valid if atleast one compile unit is seen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62294
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 16 Jan 2009 01:33:36 +0000 (01:33 +0000)]
Initial hazard recognizer support in post-pass scheduling. This includes
a new toy hazard recognizier heuristic which attempts to direct the
scheduler to avoid clumping large groups of loads or stores too densely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62291
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 16 Jan 2009 00:50:53 +0000 (00:50 +0000)]
Do not stumble over forward declared struct member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62288
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 15 Jan 2009 23:41:32 +0000 (23:41 +0000)]
Validate dbg_* intrinsics before lowering them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62286
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 15 Jan 2009 22:43:38 +0000 (22:43 +0000)]
Added missing support to widen an operand from a bit convert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62285
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 15 Jan 2009 22:18:12 +0000 (22:18 +0000)]
Generalize the HazardRecognizer interface so that it can be used
to support MachineInstr-based scheduling in addition to
SDNode-based scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62284
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 15 Jan 2009 22:01:38 +0000 (22:01 +0000)]
Simplify the MachineLICM pass by having it only traverse outer
loops, hoisting instructions all the way out in one step rather
than hoisting them one nest level at a time. Also, make a few
other code simplifications. This speeds up MachineLICM
by several fold.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62283
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 15 Jan 2009 21:51:46 +0000 (21:51 +0000)]
Fix Alpha test and support for private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62282
91177308-0d34-0410-b5e6-
96231b3b80d8
Mon P Wang [Thu, 15 Jan 2009 21:10:20 +0000 (21:10 +0000)]
Expand insert/extract of a <4 x i32> with a variable index.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62281
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 15 Jan 2009 20:18:42 +0000 (20:18 +0000)]
Add the private linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62279
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 15 Jan 2009 19:26:23 +0000 (19:26 +0000)]
Use lightweight DebugInfo objects directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62276
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 15 Jan 2009 19:20:50 +0000 (19:20 +0000)]
Move a few containers out of ScheduleDAGInstrs::BuildSchedGraph
and into the ScheduleDAGInstrs class, so that they don't get
destructed and re-constructed for each block. This fixes a
compile-time hot spot in the post-pass scheduler.
To help facilitate this, tidy and do some minor reorganization
in the scheduler constructor functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62275
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 15 Jan 2009 18:40:57 +0000 (18:40 +0000)]
add comment to explain my previous commit, as asked by Chris
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62272
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 15 Jan 2009 18:40:09 +0000 (18:40 +0000)]
avoid using iterators when they get invalidated potentially
this fixes PR3332
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62271
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 15 Jan 2009 18:25:17 +0000 (18:25 +0000)]
Use variable's context to identify respective DbgScope.
Use light weight DebugInfo object directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62269
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 15 Jan 2009 17:57:09 +0000 (17:57 +0000)]
Add load-folding table entries for BT*ri8 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62267
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 15 Jan 2009 17:39:39 +0000 (17:39 +0000)]
Make getWidenVectorType const; this file was missed in the
previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62266
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 15 Jan 2009 17:34:08 +0000 (17:34 +0000)]
Make getWidenVectorType const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62265
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 15 Jan 2009 17:09:07 +0000 (17:09 +0000)]
Eliminate a redundant check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62264
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 15 Jan 2009 17:01:23 +0000 (17:01 +0000)]
- Teach CanEvaluateInDifferentType of this xform: sext (zext ty1), ty2 -> zext ty2
- Looking at the number of sign bits of the a sext instruction to determine whether new trunc + sext pair should be added when its source is being evaluated in a different type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62263
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 15 Jan 2009 16:58:17 +0000 (16:58 +0000)]
More consts on TargetLowering references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62262
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 15 Jan 2009 16:43:02 +0000 (16:43 +0000)]
Use const with TargetLowering references in a few more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62260
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 15 Jan 2009 16:29:45 +0000 (16:29 +0000)]
Const-qualify getPreIndexedAddressParts and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62259
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 15 Jan 2009 11:32:30 +0000 (11:32 +0000)]
Don't fold address calculations which use negative offsets into
the ADDRspii addressing mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62258
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 15 Jan 2009 11:18:53 +0000 (11:18 +0000)]
Update the operands used when building LDAWSP instructions to match the .td
changes in the last commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62257
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Thu, 15 Jan 2009 11:10:44 +0000 (11:10 +0000)]
minor refactoring: use a more specific API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62256
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Thu, 15 Jan 2009 04:41:47 +0000 (04:41 +0000)]
- Convert remaining i64 custom lowering into custom instruction emission
sequences in SPUDAGToDAGISel.cpp and SPU64InstrInfo.td, killing custom
DAG node types as needed.
- i64 mul is now a legal instruction, but emits an instruction sequence
that stretches tblgen and the imagination, as well as violating laws of
several small countries and most southern US states (just kidding, but
looking at a function with 80+ parameters is really weird and just plain
wrong.)
- Update tests as needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62254
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 15 Jan 2009 02:42:40 +0000 (02:42 +0000)]
Some small documentation fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62251
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Thu, 15 Jan 2009 02:04:54 +0000 (02:04 +0000)]
Clarify the documentation a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62249
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2009 21:01:16 +0000 (21:01 +0000)]
Fix PR3325, a miscompilation of invokes by IPSCCP. Patch by Jay Foad!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62244
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 14 Jan 2009 20:10:24 +0000 (20:10 +0000)]
xfail for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62243
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Wed, 14 Jan 2009 18:26:46 +0000 (18:26 +0000)]
Add pseudo instructions to the XCore for (load|store|load address) of a
frame index. eliminateFrameIndex will replace these instructions with
(LDWSP|STWSP|LDAWSP) or (LDW|STW|LDAWF) if a frame pointer is in use.
This fixes PR 3324. Previously we used LDWSP, STWSP, LDAWSP before frame
pointer elimination. However since they were marked as implicitly using
SP they could not be rematerialised.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62238
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 14 Jan 2009 17:51:41 +0000 (17:51 +0000)]
fix crash in the case when some arg is null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62236
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 14 Jan 2009 17:09:04 +0000 (17:09 +0000)]
minor simplification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62232
91177308-0d34-0410-b5e6-
96231b3b80d8