Evan Cheng
a14fd26a8b
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
53e83a2eb9
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
bb76cc9447
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
af6f58bbf4
reduce indentation by using 'continue', no functionality change.
...
llvm-svn: 62477
2009-01-19 02:07:32 +00:00
Chris Lattner
c03b442e54
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
ead19aaccb
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
6f03811071
Fix rdar://6505632, an llc crash on 483.xalancbmk
...
llvm-svn: 62470
2009-01-18 20:35:00 +00:00
Sanjiv Gupta
5a5af71ca2
Few targets like PIC16 wants libcall generation for illegal type i16.
...
llvm-svn: 62467
2009-01-18 18:25:27 +00:00
Oscar Fuentes
fae323d3f2
CMake: Add lib/Analysis/CaptureTracking.cpp
...
llvm-svn: 62462
2009-01-18 13:14:11 +00:00
Duncan Sands
ddfeabbab7
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
27ea1af89f
Simplify extract element based on comments from Duncan Sands.
...
llvm-svn: 62459
2009-01-18 06:43:40 +00:00
Nick Lewycky
39fcb513ca
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
6a02ecbd29
add a comment
...
llvm-svn: 62436
2009-01-18 00:27:21 +00:00
Gabor Greif
5608ce587b
switch over some other methods from indices to iterators
...
llvm-svn: 62430
2009-01-17 19:46:01 +00:00
Devang Patel
4a7a53217b
Remove tabs.
...
llvm-svn: 62423
2009-01-17 08:05:14 +00:00
Devang Patel
97cd6a4a7c
Refactor code
...
llvm-svn: 62421
2009-01-17 08:01:33 +00:00
Bill Wendling
ce30a8cab9
Extend thi
...
llvm-svn: 62415
2009-01-17 07:40:19 +00:00
Evan Cheng
182d9c4c9f
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
2fc394ddfd
Assign argument type to appropriate DIE.
...
llvm-svn: 62412
2009-01-17 06:57:25 +00:00
Devang Patel
24e250ee74
Remove dead code.
...
llvm-svn: 62410
2009-01-17 06:51:37 +00:00
Devang Patel
732220a09f
Disable composite type debug info for now.
...
llvm-svn: 62406
2009-01-17 05:05:12 +00:00
Bill Wendling
ddd55bdfec
Temporarily revert my last change. It is causing a bootstrap failure.
...
llvm-svn: 62405
2009-01-17 04:23:51 +00:00
Bill Wendling
d18c38c0f2
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
ee36d9ce83
CMake: Add lib/Target/IA64/IA64Subtarget.cpp
...
llvm-svn: 62394
2009-01-17 01:50:32 +00:00
Gabor Greif
c379e7909b
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
20f36c51bd
introduce typedef for complicated vector, and use it too
...
llvm-svn: 62384
2009-01-17 00:09:08 +00:00
Mon P Wang
563134282c
Simplify extract element of a scalar to vector.
...
llvm-svn: 62383
2009-01-17 00:07:25 +00:00
Gabor Greif
0d0908d06a
typo
...
llvm-svn: 62377
2009-01-16 23:08:50 +00:00
Evan Cheng
d7cc550900
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.
...
llvm-svn: 62373
2009-01-16 22:57:32 +00:00
Mikhail Glushenkov
b0aa02acee
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.
llvm-svn: 62372
2009-01-16 22:54:19 +00:00
Dan Gohman
cb207179b1
Give IA64 a TargetSubtarget subclass, so that it can
...
implement getSubtargetImpl.
llvm-svn: 62369
2009-01-16 22:49:36 +00:00
Dan Gohman
3d0633627d
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.
llvm-svn: 62366
2009-01-16 22:10:20 +00:00
Dan Gohman
9636e74701
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.
llvm-svn: 62365
2009-01-16 21:57:43 +00:00
Dan Gohman
4dc9f47c97
Use the getNode() accessor instead of accessing the Node
...
member directly, which is private as of r55504.
llvm-svn: 62364
2009-01-16 21:47:21 +00:00
Dan Gohman
733d817b4d
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.
llvm-svn: 62362
2009-01-16 21:37:14 +00:00
Chris Lattner
cfaf556999
new nodes should be added to the worklist, not old nodes.
...
llvm-svn: 62359
2009-01-16 21:15:56 +00:00
Devang Patel
9ecd23c14d
Fix comments.
...
llvm-svn: 62358
2009-01-16 21:07:53 +00:00
Evan Cheng
c4d19d6e8c
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.
...
llvm-svn: 62356
2009-01-16 20:57:18 +00:00
Chris Lattner
0354d30311
don't assert and die on out of range (undefined) shifts. This fixes
...
PR3334.
llvm-svn: 62352
2009-01-16 20:17:02 +00:00
Chris Lattner
5d1ed9ed1f
Fix PR3335 by not turning a store to one address space into a store to another.
...
llvm-svn: 62351
2009-01-16 20:12:52 +00:00
Chris Lattner
59dfd7d4af
reduce indentation by using early exits, no functionality change.
...
llvm-svn: 62350
2009-01-16 20:08:59 +00:00
Devang Patel
6f83d4b68f
Use lightweight DebugInfo objects directly.
...
llvm-svn: 62341
2009-01-16 19:28:14 +00:00
Bill Wendling
c9e856fbfd
Add support for non-zero __builtin_return_address values on X86.
...
llvm-svn: 62338
2009-01-16 19:25:27 +00:00
Evan Cheng
2932869ed4
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.
...
llvm-svn: 62336
2009-01-16 19:14:49 +00:00
Gabor Greif
34a28dbecf
use specialized accessor instead of plain getOperand(0)
...
llvm-svn: 62330
2009-01-16 18:40:27 +00:00
Devang Patel
627bb2afb9
Align source code.
...
llvm-svn: 62328
2009-01-16 18:01:58 +00:00
Dan Gohman
e4265cdbb9
Fix a "comparison between signed and unsigned integer expressions"
...
warning.
llvm-svn: 62327
2009-01-16 17:55:08 +00:00
Nick Lewycky
3f81059a01
Reinstate r60509 from Dale:
...
Make the debugging dump be a full line.
llvm-svn: 62325
2009-01-16 17:07:22 +00:00
Mikhail Glushenkov
49be18cfc6
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.
llvm-svn: 62312
2009-01-16 07:02:28 +00:00
Mikhail Glushenkov
5000223556
Delete trailing whitespace.
...
llvm-svn: 62307
2009-01-16 06:53:46 +00:00