Commit Graph

44001 Commits

Author SHA1 Message Date
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 e5be1cd635 Forgot this in the previous checkin: fopen now has nocapture, realloc is
supposed to take two arguments.

llvm-svn: 62457
2009-01-18 04:46:10 +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
Gabor Greif 2269f405b0 make comparisons a bist faster
llvm-svn: 62428
2009-01-17 19:03:45 +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 9880a2cb2f Testcase for last commit.
llvm-svn: 62418
2009-01-17 07:42:44 +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
Mon P Wang ca6d6dea0b Simplify extract element of a scalar to vector.
llvm-svn: 62383
2009-01-17 00:07:25 +00:00
Gabor Greif 8c573f7e49 typo
llvm-svn: 62377
2009-01-16 23:08:50 +00:00
Evan Cheng 41e9f6a854 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 cbc26fdb6e 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 703a6c7274 Give IA64 a TargetSubtarget subclass, so that it can
implement getSubtargetImpl.

llvm-svn: 62369
2009-01-16 22:49:36 +00:00
Dan Gohman 5f8a2598b2 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 157e008816 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 38978ba972 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 f1002495e3 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.

llvm-svn: 62363
2009-01-16 21:40:12 +00:00
Dan Gohman 014142fd1a 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
Dan Gohman 3289983d69 Avoid triggering an assertion failure when an instruction pattern
is a leaf node. Patch by Brandner!

llvm-svn: 62361
2009-01-16 21:30:55 +00:00
Chris Lattner 41828cdb0a new nodes should be added to the worklist, not old nodes.
llvm-svn: 62359
2009-01-16 21:15:56 +00:00
Devang Patel 5d7813cb2d Fix comments.
llvm-svn: 62358
2009-01-16 21:07:53 +00:00
Evan Cheng 968e2e7b3d 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 6bfc77d8fe remove a dead method.
llvm-svn: 62354
2009-01-16 20:26:53 +00:00
Chris Lattner 762edbc074 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 db2d9613d2 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 733256fe31 reduce indentation by using early exits, no functionality change.
llvm-svn: 62350
2009-01-16 20:08:59 +00:00
Devang Patel 0d733b5d9f Use lightweight DebugInfo objects directly.
llvm-svn: 62341
2009-01-16 19:28:14 +00:00
Bill Wendling e04334730e Add support for non-zero __builtin_return_address values on X86.
llvm-svn: 62338
2009-01-16 19:25:27 +00:00
Evan Cheng 5f936ef1ac 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 4b79e47f94 use specialized accessor instead of plain getOperand(0)
llvm-svn: 62330
2009-01-16 18:40:27 +00:00
Devang Patel 867df54606 Align source code.
llvm-svn: 62328
2009-01-16 18:01:58 +00:00
Dan Gohman b903071735 Fix a "comparison between signed and unsigned integer expressions"
warning.

llvm-svn: 62327
2009-01-16 17:55:08 +00:00
Nick Lewycky 032e6dd3c5 Reinstate r60509 from Dale:
Make the debugging dump be a full line.

llvm-svn: 62325
2009-01-16 17:07:22 +00:00
Duncan Sands 230c35eda2 Get this building with gcc-4.4.
llvm-svn: 62322
2009-01-16 15:54:57 +00:00
Duncan Sands 35e43c12f1 Grammar fix.
llvm-svn: 62319
2009-01-16 09:29:46 +00:00
Mikhail Glushenkov 6e8d814d36 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
Evan Cheng 2d9e40ed24 This is now passing.
llvm-svn: 62308
2009-01-16 06:59:14 +00:00
Mikhail Glushenkov b2f9a73029 Delete trailing whitespace.
llvm-svn: 62307
2009-01-16 06:53:46 +00:00
Sanjiv Gupta 3227928eeb Reverting back 62301.
llvm-svn: 62304
2009-01-16 05:06:35 +00:00
Sanjiv Gupta 30bd194504 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().

llvm-svn: 62301
2009-01-16 02:45:46 +00:00
Evan Cheng d243c0e3d9 ARMCompilationCallback should not save / restore vfp registers if vfp is not available.
llvm-svn: 62299
2009-01-16 02:16:37 +00:00
Devang Patel e067a7988c Validate debug info values only if DwarfDebug is initialized.
llvm-svn: 62298
2009-01-16 02:15:14 +00:00
Evan Cheng beac6f8b0c 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.
llvm-svn: 62297
2009-01-16 02:11:43 +00:00
Dan Gohman 3e35fe8968 Add support for instructions with multiple ComplexPatterns, by
adding more information to the temporary variables names so that
they don't conflict.

llvm-svn: 62296
2009-01-16 02:05:52 +00:00
Devang Patel 32fed1c0ef Any debug info symbol is only valid if atleast one compile unit is seen.
llvm-svn: 62294
2009-01-16 01:49:46 +00:00
Dan Gohman ceac7c34f1 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.

llvm-svn: 62291
2009-01-16 01:33:36 +00:00
Devang Patel fa1b408b3b Do not stumble over forward declared struct member.
llvm-svn: 62288
2009-01-16 00:50:53 +00:00
Devang Patel 76d190cf4a Validate dbg_* intrinsics before lowering them.
llvm-svn: 62286
2009-01-15 23:41:32 +00:00
Mon P Wang e248edff1b Added missing support to widen an operand from a bit convert.
llvm-svn: 62285
2009-01-15 22:43:38 +00:00
Dan Gohman 7e105f0b12 Generalize the HazardRecognizer interface so that it can be used
to support MachineInstr-based scheduling in addition to
SDNode-based scheduling.

llvm-svn: 62284
2009-01-15 22:18:12 +00:00
Dan Gohman 79618d1de8 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.

llvm-svn: 62283
2009-01-15 22:01:38 +00:00
Rafael Espindola f2831d6cd1 Fix Alpha test and support for private linkage.
llvm-svn: 62282
2009-01-15 21:51:46 +00:00
Mon P Wang ebfafee903 Expand insert/extract of a <4 x i32> with a variable index.
llvm-svn: 62281
2009-01-15 21:10:20 +00:00
Rafael Espindola 6de96a1b5d Add the private linkage.
llvm-svn: 62279
2009-01-15 20:18:42 +00:00
Devang Patel 851cdaf1fd Use lightweight DebugInfo objects directly.
llvm-svn: 62276
2009-01-15 19:26:23 +00:00
Dan Gohman 619ef48a52 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.

llvm-svn: 62275
2009-01-15 19:20:50 +00:00
Nuno Lopes 04fe2f0a95 add comment to explain my previous commit, as asked by Chris
llvm-svn: 62272
2009-01-15 18:40:57 +00:00
Gabor Greif 5aa1922614 avoid using iterators when they get invalidated potentially
this fixes PR3332

llvm-svn: 62271
2009-01-15 18:40:09 +00:00
Devang Patel 8bdc698336 Use variable's context to identify respective DbgScope.
Use light weight DebugInfo object directly.

llvm-svn: 62269
2009-01-15 18:25:17 +00:00
Dan Gohman dbb22a4483 Add load-folding table entries for BT*ri8 instructions.
llvm-svn: 62267
2009-01-15 17:57:09 +00:00
Dan Gohman 307954ac69 Make getWidenVectorType const; this file was missed in the
previous commit.

llvm-svn: 62266
2009-01-15 17:39:39 +00:00
Dan Gohman 0ad43ca6e5 Make getWidenVectorType const.
llvm-svn: 62265
2009-01-15 17:34:08 +00:00
Evan Cheng ff716cb342 Eliminate a redundant check.
llvm-svn: 62264
2009-01-15 17:09:07 +00:00
Evan Cheng 60e19a46f2 - 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.

llvm-svn: 62263
2009-01-15 17:01:23 +00:00
Dan Gohman 91febd1330 More consts on TargetLowering references.
llvm-svn: 62262
2009-01-15 16:58:17 +00:00
Dan Gohman 4bdf021e05 Use const with TargetLowering references in a few more places.
llvm-svn: 62260
2009-01-15 16:43:02 +00:00
Dan Gohman 02b93136e9 Const-qualify getPreIndexedAddressParts and friends.
llvm-svn: 62259
2009-01-15 16:29:45 +00:00
Richard Osborne 40119780a8 Don't fold address calculations which use negative offsets into
the ADDRspii addressing mode.

llvm-svn: 62258
2009-01-15 11:32:30 +00:00
Richard Osborne 502b91a35c Update the operands used when building LDAWSP instructions to match the .td
changes in the last commit.

llvm-svn: 62257
2009-01-15 11:18:53 +00:00
Gabor Greif 08a4c281cb minor refactoring: use a more specific API
llvm-svn: 62256
2009-01-15 11:10:44 +00:00
Scott Michel a292fc6d6b - 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.

llvm-svn: 62254
2009-01-15 04:41:47 +00:00
Mikhail Glushenkov bc39dff6e5 Some small documentation fixes.
llvm-svn: 62251
2009-01-15 02:42:40 +00:00
Mikhail Glushenkov bf78b20490 Clarify the documentation a bit.
llvm-svn: 62249
2009-01-15 02:04:54 +00:00
Chris Lattner 8fb9480ed2 Fix PR3325, a miscompilation of invokes by IPSCCP. Patch by Jay Foad!
llvm-svn: 62244
2009-01-14 21:01:16 +00:00
Devang Patel 08e5e62f98 xfail for now.
llvm-svn: 62243
2009-01-14 20:10:24 +00:00
Richard Osborne 4359325ba8 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.

llvm-svn: 62238
2009-01-14 18:26:46 +00:00
Nuno Lopes 0971e77529 fix crash in the case when some arg is null
llvm-svn: 62236
2009-01-14 17:51:41 +00:00
Gabor Greif 191812fe08 minor simplification
llvm-svn: 62232
2009-01-14 17:09:04 +00:00
Dale Johannesen 1f0e0e7c9c 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.

llvm-svn: 62212
2009-01-14 02:35:31 +00:00
Mikhail Glushenkov 66068b3baf Make -o a prefix option.
Both 'llvmc -o file' and 'llvmc -ofile' should work.

llvm-svn: 62211
2009-01-14 02:02:16 +00:00
Devang Patel dedd3e1e14 Do not construct debug scope if RootScope *is* null.
llvm-svn: 62209
2009-01-14 01:34:32 +00:00
Ted Kremenek adeeb1af44 Add member template MallocAllocator::Allocate(Num) (to match the same function in BumpPtrAllocator).
llvm-svn: 62202
2009-01-14 00:38:21 +00:00
Chris Lattner 2538eb664c 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.

llvm-svn: 62201
2009-01-14 00:12:58 +00:00
Devang Patel 3c82aa0209 Removoe MachineModuleInfo methods (and related DebugInfoDesc class hierarchy) that were used to handle debug info.
llvm-svn: 62199
2009-01-13 23:54:55 +00:00
Nuno Lopes b0a78f8fa1 fix memleaks
llvm-svn: 62198
2009-01-13 23:35:49 +00:00
Dan Gohman a63bede3c6 BT appears to be available on all >= i386 chips.
llvm-svn: 62196
2009-01-13 23:27:15 +00:00
Dan Gohman d3942af5cb Don't use a BT instruction if the AND has multiple uses.
llvm-svn: 62195
2009-01-13 23:25:30 +00:00
Dan Gohman b8f5ba6781 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.

llvm-svn: 62194
2009-01-13 23:23:30 +00:00
Devang Patel 7b13aeedea Keep "has debug info" big in MachineModuleInfo to avoid circular dependency between AsmPrinter and CodeGen.
llvm-svn: 62191
2009-01-13 23:02:17 +00:00
Devang Patel fe9581f0cd Undo previous checkin.
llvm-svn: 62190
2009-01-13 22:54:57 +00:00
Dale Johannesen 0aeabdff57 Fix testsuite regressions from recursive inlining.
llvm-svn: 62189
2009-01-13 22:43:37 +00:00
Devang Patel dd25a9d0aa Use DwarfWriter to record dbg variables.
llvm-svn: 62185
2009-01-13 21:44:10 +00:00
Devang Patel ca997988c3 Use dwarf writer to decide whether the module has debug info or not.
llvm-svn: 62184
2009-01-13 21:25:00 +00:00
Dan Gohman 0fdf71cb9d Add bt instructions that take immediate operands.
llvm-svn: 62180
2009-01-13 20:33:23 +00:00
Dan Gohman eb2591bbdd Fix a few more JIT encoding issues in the BT instructions.
llvm-svn: 62179
2009-01-13 20:32:45 +00:00
Dan Gohman 5d4afb7bd9 Use assertions to check for conditions that should never happen.
llvm-svn: 62178
2009-01-13 20:25:24 +00:00
Dan Gohman 1407484178 The list-td and list-tdrr schedulers don't yet support physreg
scheduling dependencies. Add assertion checks to help catch
this.

It appears the Mips target defaults to list-td, and it has a
regression test that uses a physreg dependence. Such code was
liable to be miscompiled, and now evokes an assertion failure.

llvm-svn: 62177
2009-01-13 20:24:13 +00:00
Dan Gohman 59af77376c Make instcombine ensure that all allocas are explicitly aligned at at
least their preferred alignment.

llvm-svn: 62176
2009-01-13 20:18:38 +00:00
Sanjiv Gupta 45da8b779c Checking in conditionals, function call, arrays and libcalls implementation.
llvm-svn: 62174
2009-01-13 19:18:47 +00:00
Dan Gohman 13141d5538 Avoid referring to edge D after the Succs or Preds arrays have
been modified, to avoid trouble in the (unlikely) scenario that
D is a reference to an element in one of those arrays.

llvm-svn: 62173
2009-01-13 19:08:45 +00:00
Duncan Sands ffc6133318 When replacing uses and the same node is reached
via two paths, process it once not twice, d'oh!
Analysis, testcase and original patch thanks to
Mon Ping Wang.

llvm-svn: 62169
2009-01-13 15:17:14 +00:00
Duncan Sands ab2fd9e4b9 Mark this XFAIL for the moment.
llvm-svn: 62168
2009-01-13 15:15:46 +00:00
Duncan Sands 90d2a7bd72 Fix some typos. Also, the WidenedVectors map
was not being cleaned by ExpungeNode.

llvm-svn: 62167
2009-01-13 14:42:39 +00:00
Duncan Sands 013be76241 Correct a comment - this is not a sign extension.
llvm-svn: 62166
2009-01-13 14:04:14 +00:00
Duncan Sands 944ccc5d6a Correct a comment.
llvm-svn: 62165
2009-01-13 13:48:44 +00:00
Nick Lewycky 52348300a4 Wind SCEV back in time, to Nov 18th. This 'fixes' PR3275, PR3294, PR3295,
PR3296 and PR3302.

llvm-svn: 62160
2009-01-13 09:18:58 +00:00
Chris Lattner 6e66d0a6a1 add a new insertAfter method, patch by Tom Jablin!
llvm-svn: 62158
2009-01-13 07:43:51 +00:00
Chris Lattner 1a579351d2 make -march=cpp handle the nocapture attribute, make it assert if it
sees attributes it doesn't know.

llvm-svn: 62155
2009-01-13 07:22:22 +00:00
Evan Cheng 4f9c47aab9 Un-tabify.
llvm-svn: 62151
2009-01-13 06:08:37 +00:00
Owen Anderson b282d1b6ff Fix fallout from r62144. Evan, please double check this.
llvm-svn: 62150
2009-01-13 06:05:10 +00:00
Evan Cheng f343168f1f FIX llvm-gcc bootstrap on x86_64 linux. If a virtual register is copied to a physical register, it's not necessarily defined by a copy. We have to watch out it doesn't clobber any sub-register that might be live during its live interval. If the live interval crosses a basic block, then it's not safe to check with the less conservative check (by scanning uses and defs) because it's possible a sub-register might be live out of the block.
llvm-svn: 62144
2009-01-13 03:57:45 +00:00
Devang Patel 5c6e1e3b7d Use DebugInfo interface to lower dbg_* intrinsics.
llvm-svn: 62127
2009-01-13 00:35:13 +00:00
Devang Patel 76007e009e Use DebugInfo interface to lower dbg_* intrinsics.
llvm-svn: 62126
2009-01-13 00:32:17 +00:00
Devang Patel f3456e8f07 Start using DebugInfo API to emit debug info.
llvm-svn: 62125
2009-01-13 00:20:51 +00:00
Dan Gohman 3065b6169f Document several current CodeGen limitations in LangRef.html.
Patches for any of these are welcome!

llvm-svn: 62120
2009-01-12 23:12:39 +00:00
Devang Patel 243b4add9a Emit debug info, only if at least one compile unit is seen.
llvm-svn: 62118
2009-01-12 23:09:42 +00:00
Devang Patel b71fbeb19f If multiple compile units are seen then emit them independently. In other words, do not force all DIEs into first, whatever it is, compile unit.
Note, multiple compile unit support is not well tested (it did not work correctly until now anyway.)

llvm-svn: 62116
2009-01-12 23:05:55 +00:00
Devang Patel 4aa4128ced Avoid cast<>, use light weith wrapper directly.
llvm-svn: 62115
2009-01-12 22:58:14 +00:00
Devang Patel 4223582f00 Use SrcLineInfo from DwarfWriter. The MachineModuleInfo copy will disappear soon.
llvm-svn: 62114
2009-01-12 22:54:42 +00:00
Dale Johannesen 433a9086c0 Enable recursive inlining. Reduce inlining threshold
back to 200; 400 seems to be too high, loses more than
it gains.

llvm-svn: 62107
2009-01-12 22:11:50 +00:00
Devang Patel 45d2cfd064 Add classof() methods to support isa<> and other related facilities.
llvm-svn: 62104
2009-01-12 21:38:43 +00:00
Dan Gohman 33a9cef204 The LLVM Assembly Language Reference incorrectly stated that the
prefix used for dll{import,export} is _imp__; it is actually __imp_.
Patch by Mahadevan R!

llvm-svn: 62103
2009-01-12 21:35:55 +00:00
Dan Gohman 87bc800384 Fix the instructions to work even when PATH does not contain ".".
Thanks to Martin Geisse for pointing this out!

llvm-svn: 62102
2009-01-12 21:29:24 +00:00
Duncan Sands dc020f9c3c Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.

llvm-svn: 62099
2009-01-12 20:38:59 +00:00
Devang Patel df31a7256d Add DwarfWriter interface to mainipulate source location info.
( May be this info should be directly handled by the dwarf writer ? )

llvm-svn: 62096
2009-01-12 19:17:34 +00:00
Chris Lattner ecbe933d6a remove some dead options.
llvm-svn: 62095
2009-01-12 19:02:50 +00:00
Devang Patel f033d53264 Clear debug info at the end of function processing.
llvm-svn: 62092
2009-01-12 18:48:36 +00:00
Devang Patel 5daa1abf25 There is no need to maintain separate labelid list in the dwarf writer. It is not a good idea.
llvm-svn: 62090
2009-01-12 18:41:00 +00:00
Rafael Espindola 6919ab4d05 Remove some dead code from the days llvm had type planes.
There might be more dead code, but with llvm-gcc bootstrap broken on linux x86-64 it is had to test :-(

llvm-svn: 62088
2009-01-12 15:53:25 +00:00
Evan Cheng 2adb5cfb48 Second test is only valid in 32-bit mode.
llvm-svn: 62084
2009-01-12 08:05:54 +00:00
Evan Cheng 0258874607 Test for r62076.
llvm-svn: 62077
2009-01-12 03:46:55 +00:00
Evan Cheng b2c42c648d Fix PR3241: Currently EmitCopyFromReg emits a copy from the physical register to a virtual register unless it requires an expensive cross class copy. That means we are only treating "expensive to copy" register dependency as physical register dependency.
Also future proof the scheduler to handle "normal" physical register dependencies. The code is not exercised yet.

llvm-svn: 62074
2009-01-12 03:19:55 +00:00
Owen Anderson 45cfef2cb6 More two-address fixes. This gets lua working with join-creation enabled.
llvm-svn: 62073
2009-01-12 03:10:40 +00:00