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
Dale Johannesen [Wed, 14 Jan 2009 02:35:31 +0000 (02:35 +0000)]
Fix the time regression I introduced in 464.h264ref with
my earlier patch to this file.
The issue there was that all uses of an IV inside a loop
are actually references to Base[IV*2], and there was one
use outside that was the same but LSR didn't see the base
or the scaling because it didn't recurse into uses outside
the loop; thus, it used base+IV*scale mode inside the loop
instead of pulling base out of the loop. This was extra bad
because register pressure later forced both base and IV into
memory. Doing that recursion, at least enough
to figure out addressing modes, is a good idea in general;
the change in AddUsersIfInteresting does this. However,
there were side effects....
It is also possible for recursing outside the loop to
introduce another IV where there was only 1 before (if
the refs inside are not scaled and the ref outside is).
I don't think this is a common case, but it's in the testsuite.
It is right to be very aggressive about getting rid of
such introduced IVs (CheckForIVReuse and the handling of
nonzero RewriteFactor in StrengthReduceStridedIVUsers).
In the testcase in question the new IV produced this way
has both a nonconstant stride and a nonzero base, neither
of which was handled before. And when inserting
new code that feeds into a PHI, it's right to put such
code at the original location rather than in the PHI's
immediate predecessor(s) when the original location is outside
the loop (a case that couldn't happen before)
(RewriteInstructionToUseNewBase); better to avoid making
multiple copies of it in this case.
Also, the mechanism for keeping SCEV's corresponding to GEP's
no longer works, as the GEP might change after its SCEV
is remembered, invalidating the SCEV, and we might get a bad
SCEV value when looking up the GEP again for a later loop.
This also couldn't happen before, as we weren't recursing
into GEP's outside the loop.
Also, when we build an expression that involves a (possibly
non-affine) IV from a different loop as well as an IV from
the one we're interested in (containsAddRecFromDifferentLoop),
don't recurse into that. We can't do much with it and will
get in trouble if we try to create new non-affine IVs or something.
More testcases are coming.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62212
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 14 Jan 2009 02:02:16 +0000 (02:02 +0000)]
Make -o a prefix option.
Both 'llvmc -o file' and 'llvmc -ofile' should work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62211
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 14 Jan 2009 01:34:32 +0000 (01:34 +0000)]
Do not construct debug scope if RootScope *is* null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62209
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 14 Jan 2009 00:38:21 +0000 (00:38 +0000)]
Add member template MallocAllocator::Allocate(Num) (to match the same function in BumpPtrAllocator).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62202
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Jan 2009 00:12:58 +0000 (00:12 +0000)]
rewrite OptimizeAwayTrappingUsesOfLoads to 1) avoid a temporary
vector and extraneous loop over it, 2) not delete globals used by
phis/selects etc which could actually be useful. This fixes PR3321.
Many thanks to Duncan for narrowing this down.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62201
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Jan 2009 23:54:55 +0000 (23:54 +0000)]
Removoe MachineModuleInfo methods (and related DebugInfoDesc class hierarchy) that were used to handle debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62199
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Tue, 13 Jan 2009 23:35:49 +0000 (23:35 +0000)]
fix memleaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62198
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Jan 2009 23:27:15 +0000 (23:27 +0000)]
BT appears to be available on all >= i386 chips.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62196
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Jan 2009 23:25:30 +0000 (23:25 +0000)]
Don't use a BT instruction if the AND has multiple uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62195
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Jan 2009 23:23:30 +0000 (23:23 +0000)]
Disable the register+memory forms of the bt instructions for now. Thanks
to Eli for pointing out that these forms don't ignore the high bits of
their index operands, and as such are not immediately suitable for use
by isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62194
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Jan 2009 23:02:17 +0000 (23:02 +0000)]
Keep "has debug info" big in MachineModuleInfo to avoid circular dependency between AsmPrinter and CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62191
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Jan 2009 22:54:57 +0000 (22:54 +0000)]
Undo previous checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62190
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Tue, 13 Jan 2009 22:43:37 +0000 (22:43 +0000)]
Fix testsuite regressions from recursive inlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62189
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Jan 2009 21:44:10 +0000 (21:44 +0000)]
Use DwarfWriter to record dbg variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62185
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Jan 2009 21:25:00 +0000 (21:25 +0000)]
Use dwarf writer to decide whether the module has debug info or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62184
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Jan 2009 20:33:23 +0000 (20:33 +0000)]
Add bt instructions that take immediate operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62180
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Jan 2009 20:32:45 +0000 (20:32 +0000)]
Fix a few more JIT encoding issues in the BT instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62179
91177308-0d34-0410-b5e6-
96231b3b80d8