Commit Graph

52702 Commits

Author SHA1 Message Date
Devang Patel 20b2a77765 Do not record line number to implicitly mark start of function if function has arguments. Extra line number entries trip gdb in some cases.
llvm-svn: 83563
2009-10-08 18:48:03 +00:00
Richard Osborne 02fda54e8f Add missing names for the XCore specific LADD and LSUB nodes.
llvm-svn: 83556
2009-10-08 17:14:57 +00:00
Dan Gohman 09984279fd Add a form of addPreserved which takes a string argument, to allow passes
to declare that they preserve other passes without needing to pull in
additional header file or library dependencies. Convert MachineFunctionPass
and CodeGenLICM to make use of this.

llvm-svn: 83555
2009-10-08 17:00:02 +00:00
Chris Lattner 8ea64c0f5f some updates from users of llvm
llvm-svn: 83551
2009-10-08 16:01:33 +00:00
Richard Osborne 4e13316bf9 Add some peepholes for signed comparisons using ashr X, X, 32.
llvm-svn: 83549
2009-10-08 15:38:17 +00:00
Chris Lattner 662efc9185 all content split into sections, still much work to be done.
llvm-svn: 83532
2009-10-08 07:01:46 +00:00
Chris Lattner 78765deded remove LoopVR pass. According to Nick:
"LoopVR's logic was copied into ScalarEvolution::getUnsignedRange and 
::getSignedRange. Please delete LoopVR."

llvm-svn: 83531
2009-10-08 06:42:44 +00:00
Chris Lattner 08c5e1f7ed checkpoint, this is still not comprehendible.
llvm-svn: 83530
2009-10-08 06:27:53 +00:00
Mikhail Glushenkov bb8386af53 Unbreak the build.
Forgot about the need to reconfigure after modifying Base.td.in....

llvm-svn: 83529
2009-10-08 06:03:38 +00:00
Bob Wilson 7d94eb4722 Convert more NEON tests to use FileCheck.
llvm-svn: 83528
2009-10-08 06:02:10 +00:00
Bob Wilson b6b0ab6117 Add codegen support for NEON vst4 intrinsics with <1 x i64> vectors.
llvm-svn: 83526
2009-10-08 05:18:18 +00:00
Mikhail Glushenkov 35aadbc05c Make the Base plugin understand -MF and -MT.
llvm-svn: 83525
2009-10-08 04:40:28 +00:00
Mikhail Glushenkov 182765004e Input files should go before all other options.
Important, for example, when calling 'gcc a.o b.o c.o -lD -lE -lF'.

llvm-svn: 83524
2009-10-08 04:40:08 +00:00
Jim Grosbach 534ea5ae32 Cleanup up unused R3LiveIn tracking.
llvm-svn: 83522
2009-10-08 01:50:26 +00:00
Jim Grosbach c0615aa17f Re-enable register scavenging in Thumb1 by default.
llvm-svn: 83521
2009-10-08 01:46:59 +00:00
Jim Grosbach 48a805bc6c bugfix. The target may use virtual registers that aren't tracked for re-use but are allocated by the scavenger. The re-use algorithm needs to watch for that.
llvm-svn: 83519
2009-10-08 01:09:45 +00:00
Bob Wilson 71387b4b2f Add codegen support for NEON vst3 intrinsics with <1 x i64> vectors.
llvm-svn: 83518
2009-10-08 00:28:28 +00:00
Bob Wilson d4f5670096 Add codegen support for NEON vst2 intrinsics with <1 x i64> vectors.
llvm-svn: 83513
2009-10-08 00:21:01 +00:00
Jeffrey Yasskin dafd08ea7e In instcombine's debug output, avoid printing ADD for instructions that are
already on the worklist, and print Visited when an instruction is about to be
visited.  Net, on one input, this reduced the output size by at least 9x.

llvm-svn: 83510
2009-10-08 00:12:24 +00:00
Bob Wilson 32cc4ec304 Add codegen support for NEON vld4 intrinsics with <1 x i64> vectors.
llvm-svn: 83508
2009-10-07 23:54:04 +00:00
Bob Wilson d1de3b82ff Convert more NEON tests to use FileCheck.
llvm-svn: 83507
2009-10-07 23:47:21 +00:00
Bob Wilson 5ef3c6d9f4 Add codegen support for NEON vld3 intrinsics with <1 x i64> vectors.
llvm-svn: 83506
2009-10-07 23:39:57 +00:00
Jeffrey Yasskin 2da7231034 Fix the OProfile part of PR5018. This fixes --without-oprofile, makes
it the default, and works around a broken libopagent on some Debian
systems.

llvm-svn: 83503
2009-10-07 23:22:42 +00:00
Bob Wilson 763be1a248 Add codegen support for NEON vld2 intrinsics with <1 x i64> vectors.
llvm-svn: 83502
2009-10-07 22:57:01 +00:00
Jim Grosbach 456735c54b reverting thumb1 scavenging default due to test failure while I figure out what's up.
llvm-svn: 83501
2009-10-07 22:49:41 +00:00
Chris Lattner 63fe7ff7d9 second half of lazy liveness removal.
llvm-svn: 83500
2009-10-07 22:49:30 +00:00
Dale Johannesen e32fe29d29 Fix handling of x86 'R' constraint.
llvm-svn: 83499
2009-10-07 22:47:20 +00:00
Bob Wilson 6d850f294d Convert more NEON tests to use FileCheck.
llvm-svn: 83497
2009-10-07 22:30:19 +00:00
Jim Grosbach 267fa622fa Enable thumb1 register scavenging by default.
llvm-svn: 83496
2009-10-07 22:26:31 +00:00
Jim Grosbach 37cf79e5a6 Enable thumb1 register scavenging by default.
llvm-svn: 83494
2009-10-07 22:26:14 +00:00
Devang Patel 55571bd7bd Extract subprogram and compile unit information from the debug info attached to an instruction.
llvm-svn: 83491
2009-10-07 22:04:08 +00:00
Bob Wilson 50820a2677 Add some instruction encoding bits for NEON load/store instructions.
llvm-svn: 83490
2009-10-07 21:53:04 +00:00
Eric Christopher 5b741f3d14 80-column and whitespace fixes.
llvm-svn: 83489
2009-10-07 21:14:25 +00:00
Kevin Enderby 818b6b96cb Fixed MCSectionMachO::ParseSectionSpecifier to allow an attribute of "none" so
that a symbol stub section with no attributes can be parsed as in:
.section __TEXT,__picsymbolstub4,symbol_stubs,none,16

llvm-svn: 83488
2009-10-07 20:57:20 +00:00
Bob Wilson 70f004d9e6 Convert test to FileCheck.
llvm-svn: 83487
2009-10-07 20:51:42 +00:00
Bob Wilson e7ef4a9a6b Add codegen support for NEON vst4 intrinsics with 128-bit vectors.
llvm-svn: 83486
2009-10-07 20:49:18 +00:00
Bob Wilson 23464866ad Add codegen support for NEON vst3 intrinsics with 128-bit vectors.
llvm-svn: 83484
2009-10-07 20:30:08 +00:00
Jim Grosbach 63849cbd32 grammar
llvm-svn: 83483
2009-10-07 19:08:36 +00:00
Bob Wilson 3dcb5377ef Add codegen support for NEON vst2 intrinsics with 128-bit vectors.
llvm-svn: 83482
2009-10-07 18:47:39 +00:00
Jim Grosbach 2af2253e49 add initializers for clarity. Add missing assignment of PrevLastUseOp.
llvm-svn: 83481
2009-10-07 18:44:24 +00:00
Owen Anderson de1cb40eb4 Remove LazyLiveness from the tree. It doesn't work right now, and I'm not going to have the time
to finish it any time soon.  If someone's interested it, they can resurrect it from SVN history.

llvm-svn: 83480
2009-10-07 18:40:17 +00:00
Bob Wilson ab3a9474d6 Add codegen support for NEON vld4 intrinsics with 128-bit vectors.
llvm-svn: 83479
2009-10-07 18:09:32 +00:00
Kevin Enderby 2207e5fc7b Add another bit of the ARM target assembler to llvm-mc to parse registers
with writeback, things like "sp!", etc.  Also added some more stuff to the
temporarily hacked methods ARMAsmParser::MatchRegisterName and
ARMAsmParser::MatchInstruction to allow more parser testing.

llvm-svn: 83477
2009-10-07 18:01:35 +00:00
Dan Gohman 9b60992120 Replace some code for aggressive-remat with MachineInstr::isInvariantLoad, and
teach it how to recognize invariant physical registers.

llvm-svn: 83476
2009-10-07 17:47:20 +00:00
Dan Gohman be8137b0b4 Replace TargetInstrInfo::isInvariantLoad and its target-specific
implementations with a new MachineInstr::isInvariantLoad, which uses
MachineMemOperands and is target-independent. This brings MachineLICM
and other functionality to targets which previously lacked an
isInvariantLoad implementation.

llvm-svn: 83475
2009-10-07 17:38:06 +00:00
Dan Gohman db9493ce68 Add a few simple MachineVerifier checks for MachineMemOperands.
llvm-svn: 83474
2009-10-07 17:36:00 +00:00
Bob Wilson 6bbefc2f67 Add codegen support for NEON vld3 intrinsics with 128-bit vectors.
llvm-svn: 83471
2009-10-07 17:24:55 +00:00
Bob Wilson 99e80228a9 Rearrange code for selecting vld2 intrinsics. No functionality change.
This is just to be more consistent with the forthcoming code for vld3/4.

llvm-svn: 83470
2009-10-07 17:23:09 +00:00
Bob Wilson aa47a8d71a Add tests for vld2 of 128-bit vectors.
llvm-svn: 83468
2009-10-07 17:19:13 +00:00
Jim Grosbach fa14dd430c Add register-reuse to frame-index register scavenging. When a target uses
a virtual register to eliminate a frame index, it can return that register
and the constant stored there to PEI to track. When scavenging to allocate
for those registers, PEI then tracks the last-used register and value, and
if it is still available and matches the value for the next index, reuses
the existing value rather and removes the re-materialization instructions.
Fancier tracking and adjustment of scavenger allocations to keep more
values live for longer is possible, but not yet implemented and would likely
be better done via a different, less special-purpose, approach to the
problem.

eliminateFrameIndex() is modified so the target implementations can return
the registers they wish to be tracked for reuse.

ARM Thumb1 implements and utilizes the new mechanism. All other targets are
simply modified to adjust for the changed eliminateFrameIndex() prototype.

llvm-svn: 83467
2009-10-07 17:12:56 +00:00
Devang Patel bcdb02587e Do not assume that the module is set.
llvm-svn: 83462
2009-10-07 16:37:55 +00:00
Torok Edwin 822f634d29 Add a comment explaining how DenseMap::insert works, because it is not
intuitive.
It does NOT update the value if the key is already in the map,
it also returns false if the key is already in the map, regardless
if the value matched.

llvm-svn: 83458
2009-10-07 09:23:56 +00:00
Torok Edwin a4560bad97 Add PR to this FIXME, looks like I didn't commit this change after all.
llvm-svn: 83457
2009-10-07 09:22:55 +00:00
Duncan Sands 986742a14f Make getPointerTo return a const PointerType* rather than
an unqualified PointerType* because it seems more correct.

llvm-svn: 83454
2009-10-07 07:35:19 +00:00
Dan Gohman 2a685bdbee INTRINSIC_W_CHAIN and INTRINSIC_VOID do not use MemSDNode. They
may access memory, but they don't carry a MachineMemOperand.

llvm-svn: 83449
2009-10-07 03:00:18 +00:00
Eric Christopher e666bc9f64 Add FreeInst to the "is a call" check for Insts that are calls, but
not intrinsics.

llvm-svn: 83441
2009-10-07 00:54:08 +00:00
Dan Gohman f8e4410994 Fix this comment. The loop header is the loop entry point.
llvm-svn: 83437
2009-10-07 00:33:10 +00:00
Anton Korobeynikov 75b59fb055 Add PseudoSourceValues for constpool stuff on ELF (Darwin should use something similar)
and register spills.

llvm-svn: 83435
2009-10-07 00:06:35 +00:00
Eric Christopher 6ba26317ce While we still have a MallocInst treat it as a call like any other
for inlining.

When MallocInst goes away this code will be subsumed as part of
calls and work just fine...

llvm-svn: 83434
2009-10-07 00:02:18 +00:00
Kevin Enderby febe39b488 Added bits of the ARM target assembler to llvm-mc to parse some load instruction
operands.  Some parsing of arm memory operands for preindexing and postindexing
forms including with register controled shifts.  This is a work in progress.

llvm-svn: 83424
2009-10-06 22:26:42 +00:00
Bob Wilson e6b778d5ff Add codegen support for NEON vld2 operations on quad registers.
llvm-svn: 83422
2009-10-06 22:01:59 +00:00
Bob Wilson 74b3d284f2 Use copyRegToReg hook to copy registers.
llvm-svn: 83421
2009-10-06 22:01:15 +00:00
Jeffrey Yasskin e2595b5be6 r83391 was completely broken since Twines keep references to their inputs, and
some of the inputs were temporaries.  Here's a real fix for the miscompilation.
Thanks to sabre for pointing out the problem.

llvm-svn: 83417
2009-10-06 21:45:26 +00:00
Bob Wilson 3251776d1d Update NEON struct names to match llvm-gcc changes.
(This is not required for correctness but might help with sanity.)

llvm-svn: 83415
2009-10-06 21:16:19 +00:00
Bob Wilson dc7d1ce575 Fix a comment typo.
Patch by Johnny Chen.

llvm-svn: 83407
2009-10-06 20:18:46 +00:00
Nicolas Geoffray 08506ee6b0 Bugfix for the CommaSeparated option. The original code was adding the whole
string at the end of the list, instead of the last comma-separated string.

llvm-svn: 83405
2009-10-06 19:55:53 +00:00
Ted Kremenek 2275a7dfef Update CMake file.
llvm-svn: 83404
2009-10-06 19:45:38 +00:00
Jeffrey Yasskin 531ccba54e Fix illegal cross-type aliasing. Found by baldrick on a newer gcc.
llvm-svn: 83401
2009-10-06 19:06:16 +00:00
Devang Patel 4598eb6214 Add support to handle debug info attached to an instruction.
This is not yet enabled.

llvm-svn: 83400
2009-10-06 18:37:31 +00:00
Dan Gohman e66abdc58f Make LLVMContext's pImpl member const.
llvm-svn: 83393
2009-10-06 17:43:57 +00:00
Dan Gohman 10d3dc569b Instead of printing unnecessary basic block labels as labels in
verbose-asm mode, print comments instead. This eliminates a non-comment
difference between verbose-asm mode and non-verbose-asm mode.

Also, factor out the relevant code out of all the targets and into
target-independent code.

llvm-svn: 83392
2009-10-06 17:38:38 +00:00
Jeffrey Yasskin 92e3a06623 Fix PR5112, a miscompilation on gcc-4.0.3. Patch by Collin Winter!
llvm-svn: 83391
2009-10-06 17:25:50 +00:00
Chris Lattner a893f5bdf5 remove predicate simplifier, it never got the last bugs beaten
out of it, and jump threading, condprop and gvn are now getting
most of the benefit.  This was approved by Nicholas and Nicolas.

llvm-svn: 83390
2009-10-06 16:59:46 +00:00
Richard Osborne 692f6e7f9d Remove xs1b predicate since it is no longer needed to differentiate betweem
xs1a and xs1b.

llvm-svn: 83383
2009-10-06 16:17:57 +00:00
Richard Osborne d7b887410d Remove xs1a subtarget. xs1a is a preproduction device used in
early development boards which is no longer supported in the
XMOS toolchain.

llvm-svn: 83381
2009-10-06 16:01:09 +00:00
Richard Osborne 29e8555056 Default to the xs1b subtarget
llvm-svn: 83380
2009-10-06 15:41:52 +00:00
Duncan Sands 9ed7b16bf3 Introduce and use convenience methods for getting pointer types
where the element is of a basic builtin type.  For example, to get
an i8* use getInt8PtrTy.

llvm-svn: 83379
2009-10-06 15:40:36 +00:00
Jim Grosbach fa21fe7c3d grammar
llvm-svn: 83378
2009-10-06 15:03:44 +00:00
Devang Patel 7d838bb66e Fix cut-n-pasto.
llvm-svn: 83367
2009-10-06 03:15:38 +00:00
Devang Patel eb43b17074 Update processDebugLoc() to handle requests to process debug info, before and after emitting instructions.
llvm-svn: 83364
2009-10-06 03:04:58 +00:00
Devang Patel 051454a16f Update processDebugLoc() so that it can be used to process debug info before and after printing an instruction.
llvm-svn: 83363
2009-10-06 02:19:11 +00:00
Devang Patel 2980a22028 Remove dead code.
llvm-svn: 83362
2009-10-06 02:01:32 +00:00
Devang Patel 8db360da7b Add utility routine to set begin and end labels for DbgScopes.
This will be used by processDebugLoc().

llvm-svn: 83361
2009-10-06 01:50:42 +00:00
Devang Patel 849e59abb2 Remove unintentional function decl.
llvm-svn: 83356
2009-10-06 01:31:35 +00:00
Devang Patel 475d32a987 Add utility routine to collect variable debug info. This is not yet used.
llvm-svn: 83355
2009-10-06 01:26:37 +00:00
Jeffrey Yasskin e97fe329e9 Fix http://llvm.org/PR5116 by rolling back r60822. This passes `make unittests
check-lit` on both x86-64 Linux and x86-32 Darwin.

llvm-svn: 83353
2009-10-06 00:35:55 +00:00
Devang Patel bb802206d2 Set default location for the function if it is not already set.
This code is not  yet enabled.

llvm-svn: 83349
2009-10-06 00:09:08 +00:00
Devang Patel d859d86538 Existence of a compile unit for input source file is a good indicator to check debug info's presence in a module.
llvm-svn: 83348
2009-10-06 00:03:14 +00:00
Devang Patel 1c9eef72b4 If subprogram die is not available then construct new one.
This can happen if debug info is processed lazily.

llvm-svn: 83347
2009-10-05 23:59:00 +00:00
Jeffrey Yasskin ce133e5225 Add a test for http://llvm.org/PR3043.
llvm-svn: 83346
2009-10-05 23:51:08 +00:00
Devang Patel 4c420eca41 Adjust context for the global variables that are not at file scope, e.g.
void foo() { static int bar = 42; }
Here, foo's DIE is parent of bar's DIE.

llvm-svn: 83344
2009-10-05 23:40:42 +00:00
Devang Patel 4144a82154 Set address while constructing DIE.
llvm-svn: 83343
2009-10-05 23:22:08 +00:00
Edward O'Callaghan 655314ef95 CMake misses a check for sbrk on NetBSD.
llvm-svn: 83341
2009-10-05 23:05:32 +00:00
Evan Phoenix 44e5dbcaf0 Extend ConstantFolding to understand signed overflow variants
llvm-svn: 83338
2009-10-05 22:53:52 +00:00
Jim Grosbach 2dfb5da6bb In Thumb1, the register scavenger is not always able to use an emergency
spill slot. When frame references are via the frame pointer, they will be
negative, but Thumb1 load/store instructions only allow positive immediate
offsets. Instead, Thumb1 will spill to R12.

llvm-svn: 83336
2009-10-05 22:30:23 +00:00
Evan Phoenix b6defa0994 First test commit
llvm-svn: 83334
2009-10-05 22:29:11 +00:00
Torok Edwin c5b8846891 Don't treat malloc calls with non-matching prototype as malloc.
Fixes second part of PR5130, miscompilation in FreeBSD kernel, where malloc takes 3 params,
and *does* initialize memory.

llvm-svn: 83324
2009-10-05 21:15:43 +00:00
Edward O'Callaghan 50d75a6099 No newline at end of files.
llvm-svn: 83318
2009-10-05 18:43:19 +00:00
Devang Patel 2089d16140 Gracefully handle various scopes while recording source line info.
llvm-svn: 83317
2009-10-05 18:03:19 +00:00
Dan Gohman e525d9ddc0 Remove an unnnecessary LLVMContext argument in
ConstantFoldLoadThroughGEPConstantExpr.

llvm-svn: 83311
2009-10-05 16:36:26 +00:00
Dan Gohman 238cf49812 Use Use::operator= instead of Use::set, for consistency.
llvm-svn: 83310
2009-10-05 16:31:55 +00:00
Dan Gohman 2728569a38 Remove explicit enum integer values. They don't appear to be needed, and
they make it less convenient to add new entries.

llvm-svn: 83308
2009-10-05 15:52:08 +00:00
Dan Gohman 774149a878 Add RIP to GR64_NOREX. This fixed a MachineVerifier error when RIP
is used in an operand which requires GR64_NOREX.

llvm-svn: 83307
2009-10-05 15:42:08 +00:00
Dan Gohman 5d36b9c447 Fix a name in a comment.
llvm-svn: 83306
2009-10-05 15:23:17 +00:00
Chris Lattner b1fe4b1f0c callgraph changes came after the 2.6 branch.
llvm-svn: 83299
2009-10-05 07:07:29 +00:00
Chris Lattner fdd8790718 strength reduce a ton of type equality tests to check the typeid (Through
the new predicates I added) instead of going through a context and doing a
pointer comparison.  Besides being cheaper, this allows a smart compiler
to turn the if sequence into a switch.

llvm-svn: 83297
2009-10-05 05:54:46 +00:00
Chris Lattner 3a2e503e33 add more type predicates.
llvm-svn: 83296
2009-10-05 05:48:40 +00:00
Chris Lattner 59d939894b teach the optimizer how to constant fold uadd/usub intrinsics.
llvm-svn: 83295
2009-10-05 05:26:04 +00:00
Chris Lattner 351534f9b1 simplify this code a bunch.
llvm-svn: 83294
2009-10-05 05:06:24 +00:00
Chris Lattner cc1cfda9ea add some helper functions.
llvm-svn: 83293
2009-10-05 05:05:57 +00:00
Chris Lattner 9ca7c0913a code simplifications.
llvm-svn: 83292
2009-10-05 05:00:35 +00:00
Evan Cheng ef716b04b3 Move implicit and paralle to a separate codegen specific section.
llvm-svn: 83291
2009-10-05 02:51:06 +00:00
Chris Lattner 463716d559 instcombine shouldn't delete all null checks for mallocs.
This fixes PR5130.

llvm-svn: 83290
2009-10-05 02:47:47 +00:00
Chris Lattner ff00c3562a stop MachineFunctionPass from claiming that it preserves LoopDependence info,
which causes dependence info to be linked into lli.

llvm-svn: 83289
2009-10-05 02:35:05 +00:00
Chris Lattner cb08fb7b83 remove llvm-db: it is completely broken and if anyone wants to do a debugger,
they should not base it on llvm-db (which not following almost any "best practices").

llvm-svn: 83288
2009-10-05 02:29:51 +00:00
Chris Lattner 4002c8eeaa add some completely unformated and probably incoherent notes about things
I saw while reading all the commits between the 2.5 and 2.6 release branches.

llvm-svn: 83287
2009-10-05 02:12:39 +00:00
Owen Anderson b5049bebb3 Do away with the strange use of BitVectors in SSI, and just use normal sets. This makes the code much more C++/LLVM-ish.
llvm-svn: 83286
2009-10-04 18:49:55 +00:00
Jakob Stoklund Olesen 63c733faf9 Whitespace and formatting.
llvm-svn: 83285
2009-10-04 18:18:39 +00:00
Jakob Stoklund Olesen befc8539d2 Remove trailing whitespace from build output.
llvm-svn: 83284
2009-10-04 17:54:36 +00:00
Owen Anderson 286feb16a9 Fix a typo in the comment.
llvm-svn: 83283
2009-10-04 17:52:13 +00:00
Owen Anderson a62bf10651 SSI needs to require DT and DF transitively, since it uses them outside of its runOnFunction.
Similarly, it can be marked setPreservesAll, since it does no work in its runOnFunction.

llvm-svn: 83282
2009-10-04 17:47:39 +00:00
Oscar Fuentes cfd4ec0226 CMake: remove .so file extension from library names when building
dependency info.

Patch by Peter Collingbourne!

llvm-svn: 83275
2009-10-04 06:24:57 +00:00
Evan Cheng bb4ed2394b Allow -inline-threshold override default threshold even if compiling to optimize for size.
llvm-svn: 83274
2009-10-04 06:13:54 +00:00
Evan Cheng cd4c17aeaf Rename enum NumOccurrences to NumOccurrencesFlag since there is a member named NumOccurrences.
llvm-svn: 83273
2009-10-04 05:25:42 +00:00
Nick Lewycky ae4617c974 Requires element types in a constant initializer to match the element types of
of the constant. This reverts r6544 and r7428.

llvm-svn: 83270
2009-10-03 19:30:43 +00:00
Bob Wilson d76b9b766c Add a comment to describe letters used in multiclass name suffixes.
llvm-svn: 83257
2009-10-03 04:44:16 +00:00
Bob Wilson a9abf57409 Fix encoding problem for VMLS instruction.
Thanks to Johnny Chen for pointing this out!

llvm-svn: 83256
2009-10-03 04:41:21 +00:00
Lang Hames a7780905e7 Oops. Renamed remaining MachineInstrIndex references.
llvm-svn: 83255
2009-10-03 04:31:31 +00:00
Lang Hames 920301ecc5 Renamed MachineInstrIndex to LiveIndex.
llvm-svn: 83254
2009-10-03 04:21:37 +00:00
Benjamin Kramer 8de74bbbd8 Try to fix unit test linking on linux ...
llvm-svn: 83252
2009-10-02 19:52:33 +00:00
Benjamin Kramer f01ee30328 MingW build fixes
- MingW needs -lpsapi (in ${LIBS}) linked after -lLLVMSystem.
  Noticed by Ronald Pijnacker!

- Some parts of the System library must be build with exceptions on windows.
  Based on a patch by Jay Foad!

llvm-svn: 83251
2009-10-02 19:36:31 +00:00
Benjamin Kramer 3b008a3a65 Fix a use-after-free in post-ra-scheduling.
MI->addOperand invalidates references to it's operands, avoid touching
the operand after a new one was added.

llvm-svn: 83249
2009-10-02 15:59:52 +00:00
Torok Edwin b8de092f18 Fix make rule when objdir is inside srcdir.
llvm-svn: 83243
2009-10-02 09:30:03 +00:00
Evan Cheng 32a47ea7b6 getFunctionAlignment should return log2 alignment.
llvm-svn: 83242
2009-10-02 06:57:25 +00:00
Evan Cheng 4ad726b4be Fix tests.
llvm-svn: 83241
2009-10-02 06:53:57 +00:00
Evan Cheng 9079fa2d27 Fix test.
llvm-svn: 83240
2009-10-02 06:50:50 +00:00
Evan Cheng b5796a59c4 C++ member functions must be 2 byte aligned per ABI.
llvm-svn: 83239
2009-10-02 06:07:47 +00:00
Evan Cheng b659dff4eb Forgot about ARM::tPUSH. It also has a new writeback operand.
llvm-svn: 83237
2009-10-02 05:03:07 +00:00
Evan Cheng 2dcee28a61 Move load / store multiple before post-alloc scheduling.
llvm-svn: 83236
2009-10-02 04:57:15 +00:00
Evan Cheng 4b40bfd835 Test case for aligned attribute on function declaration.
llvm-svn: 83234
2009-10-02 04:45:37 +00:00
David Goodwin d725159d9d All callee-saved registers are live-out of a return block.
llvm-svn: 83223
2009-10-01 23:28:47 +00:00
David Goodwin 1cc6dd97da Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.
llvm-svn: 83218
2009-10-01 22:19:57 +00:00
Mike Stump 70cb67fcf4 Expand api out in the usual inserter way, though, I do have a
question, can we get rid of the BasicBlock versions of all inserters
and use Head == 0 to indicate the old case when GetInsertBlock == 0?

llvm-svn: 83216
2009-10-01 22:08:58 +00:00
David Goodwin 9a051a5922 Restore the -post-RA-scheduler flag as an override for the target specification. Remove -mattr for setting PostRAScheduler enable and instead use CPU string.
llvm-svn: 83215
2009-10-01 21:46:35 +00:00
Evan Cheng 6f012d83f2 ARM::tPOP and tPOP_RET each has an extra writeback operand now.
llvm-svn: 83214
2009-10-01 20:54:53 +00:00
Jim Grosbach 7dbc2652b9 remove trailing whitespace
llvm-svn: 83213
2009-10-01 20:45:06 +00:00
Devang Patel 75cc16c0f2 Add support to extract lexical scope information from DebugLoc attached with an machine instruction.
This is not yet enabled.

llvm-svn: 83210
2009-10-01 20:31:14 +00:00
David Goodwin be3039e776 Use MachineFrameInfo.getPristineRegs() to determine which callee-saved registers are available for anti-dependency breaking. Some cleanup.
llvm-svn: 83208
2009-10-01 19:45:32 +00:00
Devang Patel 787f94c28d Record first and last instruction of a scope in DbgScope.
llvm-svn: 83207
2009-10-01 18:25:23 +00:00
Dan Gohman 8cf7907ba4 Don't use identifiers that start with an underscore followed
by a capital letter, which invokes undefined behavior.

llvm-svn: 83206
2009-10-01 17:39:52 +00:00
Douglas Gregor f99626ed11 Teach CMake to look for bidirectional_iterator, iterator, forward_iterator, uint64_t, and u_int64_t, from Yonggang Luo
llvm-svn: 83203
2009-10-01 17:25:36 +00:00
Evan Cheng 4fb2891396 Observe hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. Do not change
operands of instructions with these properties while breaking anti-dep.

llvm-svn: 83198
2009-10-01 08:26:23 +00:00
Evan Cheng 1b2b64f618 Add hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq flags to ld / st multiple,
ld / st pairs, etc.

llvm-svn: 83197
2009-10-01 08:22:27 +00:00
Evan Cheng 46668e09be Add instruction flags: hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. When
set, these flags indicate the instructions source / def operands have special
register allocation requirement that are not captured in their register classes.
Post-allocation passes (e.g. post-alloc scheduler) should not change their
allocations. e.g. ARM::LDRD require the two definitions to be allocated
even / odd register pair.

llvm-svn: 83196
2009-10-01 08:21:18 +00:00
Douglas Gregor d846fbf20d Remove GVNPRE.cpp from the CMake makefile
llvm-svn: 83194
2009-10-01 05:30:05 +00:00
Chris Lattner 5f3cc06cd2 remove the GVNPRE pass. It has been subsumed by the GVN pass.
Ok'd by Owen.

llvm-svn: 83193
2009-10-01 02:18:36 +00:00
Evan Cheng 4bcd523acb Update ARM JIT emitter to account for ld/st multiple changes.
llvm-svn: 83192
2009-10-01 01:39:21 +00:00
Evan Cheng 3bbc6c3ae6 Change ld/st multiples to explicitly model the writeback to base register. This fixes most of the -ldstopti-before-sched2 regressions.
llvm-svn: 83191
2009-10-01 01:33:39 +00:00
Devang Patel 34986f12e6 Add another MDNode into DebugLocTuple. This will be used to keep track of inlined functions.
llvm-svn: 83190
2009-10-01 01:15:28 +00:00
Devang Patel 4dbca6dfd4 If location info is attached with an instruction then keep track of alloca slots used by a variable. This info will be used by AsmPrinter to emit debug info for variables.
llvm-svn: 83189
2009-10-01 01:03:26 +00:00
Devang Patel e0709cfc92 Use MachineInstr as an processDebugLoc() argument.
This will allow processDebugLoc() to handle scopes for DWARF debug info. 

llvm-svn: 83183
2009-09-30 23:12:50 +00:00
Devang Patel 3256c751f5 Use MDNode * directly as an RecordSourceLine() argument.
llvm-svn: 83182
2009-09-30 22:51:28 +00:00
Devang Patel 5c13c2d392 Remove dead code.
llvm-svn: 83181
2009-09-30 22:43:52 +00:00
Devang Patel a49be76f43 Add isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.
llvm-svn: 83180
2009-09-30 22:34:41 +00:00
Bob Wilson b2120755a2 Use OutStreamer.SwitchSection instead of writing out textual section directives.
Add a new TargetLoweringObjectFileMachO::getConstTextCoalSection method to
get access to that section.

llvm-svn: 83178
2009-09-30 22:25:37 +00:00
Bob Wilson b633d7a665 Add a new virtual EmitStartOfAsmFile method to the AsmPrinter and use this
to emit target-specific things at the beginning of the asm output.  This
fixes a problem for PPC, where the text sections are not being kept together
as expected.  The base class doInitialization code calls DW->BeginModule()
which emits a bunch of DWARF section directives.  The PPC doInitialization
code then emits all the TEXT section directives, with the intention that they
will be kept together. But as I understand it, the Darwin assembler treats
the default TEXT section as a special case and moves it to the beginning of
the file, which means that all those DWARF sections are in the middle of
the text.  With this change, the EmitStartOfAsmFile hook is called before
the DWARF section directives are emitted, so that all the PPC text section
directives come out right at the beginning of the file.

llvm-svn: 83176
2009-09-30 22:06:26 +00:00
Bob Wilson 64c8d5a004 Fix a comment typo.
llvm-svn: 83174
2009-09-30 21:44:42 +00:00
Devang Patel 48575e3f2e Check for null MDNode element while printing comment.
llvm-svn: 83172
2009-09-30 21:26:51 +00:00
Bob Wilson 53904987ae Fix a comment.
llvm-svn: 83171
2009-09-30 21:26:13 +00:00
Bob Wilson 699702e0a8 The AsmPrinter base class contains a DwarfWriter member, so there's no need
for derived AsmPrinters to add another one.  In some cases, fixing this
removes the need to override the doInitialization method.

llvm-svn: 83170
2009-09-30 21:24:45 +00:00
Jeffrey Yasskin 8ce67f83bc Assert that ConstantArrays are created with correctly-typed elements.
llvm-svn: 83168
2009-09-30 21:08:08 +00:00
Dan Gohman ea0bb8f555 Fix this code so that it doesn't try to iterate through a std::vector
while calling changeImmediateDominator, which removes elements from the
vector. This fixes PR5097.

llvm-svn: 83166
2009-09-30 20:54:16 +00:00
Reid Kleckner cea8dab1d1 Silence comparison always false warning in -Asserts mode.
llvm-svn: 83164
2009-09-30 20:43:07 +00:00
Jim Grosbach c87197784a Add additional assert() to verify no extraneous use of a scavenged register.
llvm-svn: 83163
2009-09-30 20:35:36 +00:00
Devang Patel 711ab5b8ec Print tag name for MDNodes that are used to encode debug info.
llvm-svn: 83160
2009-09-30 20:16:54 +00:00
Reid Kleckner 8ff5c19ebd Fix integer overflow in instruction scheduling. This can happen if we have
basic blocks that are so long that their size overflows a short.

Also assert that overflow does not happen in the future, as requested by Evan.

This fixes PR4401.

llvm-svn: 83159
2009-09-30 20:15:38 +00:00
Devang Patel 7ba3c0906b Silence unused variable warning.
llvm-svn: 83151
2009-09-30 17:13:41 +00:00
Jim Grosbach a2fe1a6811 Clarify comment phrasing.
llvm-svn: 83148
2009-09-30 15:23:38 +00:00
Evan Cheng ce5a8ca3ef Add a option which would move ld/st multiple pass before post-alloc scheduling.
llvm-svn: 83145
2009-09-30 08:53:01 +00:00
Evan Cheng f305ead1cc Add a target hook to add pre- post-regalloc scheduling passes.
llvm-svn: 83144
2009-09-30 08:49:50 +00:00
Evan Cheng 3ea1ba7739 Forgot this test earlier.
llvm-svn: 83143
2009-09-30 08:41:27 +00:00
Chris Lattner d6248143fa add macruby, fix a validation problem.
llvm-svn: 83142
2009-09-30 06:27:22 +00:00
Nick Lewycky 6d59690c3e Fix compile error as debug interface changed.
By the way, this code is buggy. You can't keep a map<MDNode *, something>
because the MDNode may be destroyed and reused for something else.

llvm-svn: 83141
2009-09-30 04:50:26 +00:00
Jim Grosbach 882f4c11ed replace TRI->isVirtualRegister() with TargetRegisterInfo::isVirtualRegister()
per customary usage

llvm-svn: 83137
2009-09-30 01:47:59 +00:00
Jim Grosbach 70ce8a03b1 When checking whether we need to reserve a register for the scavenger,
the size of the saved frame pointer needs to be taken into account.

llvm-svn: 83136
2009-09-30 01:43:29 +00:00
Jim Grosbach bcad0c8421 Add "isBarrier = 1" to return instructions.
Patch by Sylvere Teissier.

llvm-svn: 83135
2009-09-30 01:35:11 +00:00
Jim Grosbach cdd3e35005 fix compiler warning
llvm-svn: 83132
2009-09-30 00:37:40 +00:00
David Goodwin 8dc2f6fefa Remove regression that requires post-RA scheduling from a target that does not use that scheduler.
llvm-svn: 83128
2009-09-30 00:23:57 +00:00
Bob Wilson 20e5f5ed79 For Darwin, emit all the text section directives together before the dwarf
section directives.  This causes the assembler to put the text sections at
the beginning of the object file, which helps work around a limitation of the
Darwin ARM relocations.  Radar 7255355.

llvm-svn: 83127
2009-09-30 00:23:42 +00:00
Devang Patel c2105298cc Simplify.
llvm-svn: 83123
2009-09-30 00:14:40 +00:00
David Goodwin 17199b56b0 Remove -post-RA-schedule flag and add a TargetSubtarget method to enable post-register-allocation scheduling. By default it is off. For ARM, enable/disable with -mattr=+/-postrasched. Enable by default for cortex-a8.
llvm-svn: 83122
2009-09-30 00:10:16 +00:00
Douglas Gregor aa0beea9a1 Forward-declare ValueSymbolTable so that SymbolTableListTraits.h can be parsed by itself
llvm-svn: 83121
2009-09-30 00:08:25 +00:00
Mike Stump 14cf8ecf0b Add a way for a frontend to generate more complex dwarf location
information.  This allows arbitrary code involving DW_OP_plus_uconst
and DW_OP_deref.  The scheme allows for easy extention to include,
any, or all of the DW_OP_ opcodes.  I thought about just exposing all
of them, but, wasn't sure if people wanted the dwarf opcodes exposed
in the api.  Is that a layering violation?

With this scheme, the entire existing block scheme used by llvm-gcc
can be switched over to the new scheme.  I think that would be
cleaner, as then the compiler specific bits are not present in llvm
proper.  Before the old code can be yanked however, similar code in
clang would have to be removed.

Next up, more testing.

llvm-svn: 83120
2009-09-30 00:08:22 +00:00
Jim Grosbach fa6847f099 minor cleanup and add clarifying comment
llvm-svn: 83117
2009-09-29 23:17:20 +00:00
Devang Patel 7b4d52b170 Lookup handler name only when assertions are enabled.
llvm-svn: 83114
2009-09-29 22:05:52 +00:00
Devang Patel b4034364d6 Add removeMD().
llvm-svn: 83107
2009-09-29 20:42:25 +00:00
Devang Patel 5bf7a49fd7 Only one custom meadata of each kind can be attached with an instruction.
llvm-svn: 83105
2009-09-29 20:30:57 +00:00
Jim Grosbach 3ea3fe6594 Additional check for regno==0
llvm-svn: 83103
2009-09-29 20:11:10 +00:00
Devang Patel 561977940c Use assertion instead of early exit to catch malformed custom metadata store.
llvm-svn: 83102
2009-09-29 20:01:19 +00:00
Devang Patel 5d58383ea9 Remove unnecessary cast.
llvm-svn: 83100
2009-09-29 19:56:13 +00:00