Commit Graph

61134 Commits

Author SHA1 Message Date
Dale Johannesen df1a7f83bf Fix some liveout handling related to tail calls, see comments.
I don't think this ever resulted in problems on x86, but it
would on ARM.

llvm-svn: 105509
2010-06-05 00:30:45 +00:00
Dan Gohman d7910a805d Implement operator== and operator!= for SetVector.
llvm-svn: 105508
2010-06-05 00:26:02 +00:00
Devang Patel 3eed2cf587 test case for r105504.
Radar 8055687.

llvm-svn: 105505
2010-06-04 23:47:41 +00:00
Evan Cheng a03e6f85fe Re-apply 105308 with fix.
llvm-svn: 105502
2010-06-04 23:28:13 +00:00
Dan Gohman 67b4403101 Don't track users of undef values; they aren't interesting for
register pressure.

llvm-svn: 105501
2010-06-04 23:16:05 +00:00
Jim Grosbach a1e08fb256 Make if-conversion ignore dbg_value instructions in its analysis. rdar://7797940
llvm-svn: 105498
2010-06-04 23:01:26 +00:00
Nate Begeman 7090e5be2b Handle multi-vector returns and args.
llvm-svn: 105496
2010-06-04 22:53:30 +00:00
Devang Patel e89b759501 Update docs to reflect new DISubprogram elements.
llvm-svn: 105495
2010-06-04 22:49:55 +00:00
Stuart Hastings 7c015988fe Support for nested functions/classes in debug output. Radar 7424645.
llvm-svn: 105492
2010-06-04 22:36:03 +00:00
Devang Patel 36da24b546 Copy location info for current function argument from dbg.declare if respective store instruction does not have any location info.
llvm-svn: 105490
2010-06-04 22:27:30 +00:00
Nate Begeman 0d081df3f2 Additional fixes to BuiltinsARM.def generator, on to clang codegen.
llvm-svn: 105488
2010-06-04 21:36:00 +00:00
Dale Johannesen 065d6fd537 More tail call removal.
llvm-svn: 105485
2010-06-04 21:14:24 +00:00
Jim Grosbach 50d229e6b3 Skip dbg_value instructions when scanning instructions in register scavenging.
llvm-svn: 105481
2010-06-04 20:18:30 +00:00
Dan Gohman 538b413ccb Fix normalization and de-normalization of non-affine SCEVs.
llvm-svn: 105480
2010-06-04 19:16:34 +00:00
Jakob Stoklund Olesen 864827afb0 Keep track of the call instructions whose clobber lists were skipped during fast
register allocation.

Process all of the clobber lists at the end of the function, marking the
registers as used in MachineRegisterInfo.

This is necessary in case the calls clobber callee-saved registers (sic).

llvm-svn: 105473
2010-06-04 18:08:29 +00:00
Dale Johannesen d1b9311afa More thoroughly disable tails calls by default.
8060143, although this doesn't fix the real problem with tail call.

llvm-svn: 105472
2010-06-04 18:04:24 +00:00
Jim Grosbach 3548803f62 Another fix to prevent debug info from affecting codegen. rdar://7797940
llvm-svn: 105470
2010-06-04 17:57:34 +00:00
Nate Begeman 878bdccea6 Progress on generating BuiltinsARM.def, still some duplicates to work out.
llvm-svn: 105461
2010-06-04 07:11:25 +00:00
Nate Begeman 1ca8dba557 BuiltinsARM.def emitter, still needs a substantial bit of tweaking to lighten the load on clang.
llvm-svn: 105456
2010-06-04 01:26:15 +00:00
Jim Grosbach 4e5e6a8973 more dbg_value adjustments so debug info doesn't affect codegen
llvm-svn: 105454
2010-06-04 01:23:30 +00:00
Mon P Wang 622cdd2297 Fixed a bug during widening where we would avoid legalizing a node. When we
replace an OpA with a widened OpB, it is possible to get new uses of OpA due to CSE
when recursively updating nodes.  Since OpA has been processed, the new uses are
not examined again.  The patch checks if this occurred and it it did, updates the
new uses of OpA to use OpB.

llvm-svn: 105453
2010-06-04 01:20:10 +00:00
Dale Johannesen b3780b1103 Remove more tail calls.
llvm-svn: 105450
2010-06-04 01:01:24 +00:00
Dale Johannesen e7b392dca9 Remove a tail call, and move some CHECKs to the
functions where they belong.

llvm-svn: 105449
2010-06-04 01:01:04 +00:00
Nate Begeman 03d6e4961c Mangle __builtin_neon_* names appropriately.
Add skeleton of support for emitting the list of prototypes for BuiltinsARM.def

llvm-svn: 105443
2010-06-04 00:21:41 +00:00
Dan Gohman ae8bb42f5b No need to special-case structs here; structs are first-class now.
llvm-svn: 105442
2010-06-04 00:18:06 +00:00
Jim Grosbach 1bcdf32d22 fix typo
llvm-svn: 105441
2010-06-04 00:15:00 +00:00
Dan Gohman 8fdda8a655 This test doesn't need the ssp attribute.
llvm-svn: 105440
2010-06-04 00:14:48 +00:00
Bob Wilson d8a9a04739 For NEON vectors with 32- or 64-bit elements, select BUILD_VECTORs and
VECTOR_SHUFFLEs to REG_SEQUENCE instructions.  The standard ISD::BUILD_VECTOR
node corresponds closely to REG_SEQUENCE but I couldn't use it here because
its operands do not get legalized.  That is pretty awful, but I guess it
makes sense for other targets.  Instead, I have added an ARM-specific version
of BUILD_VECTOR that will have its operands properly legalized.
This fixes the rest of Radar 7872877.

llvm-svn: 105439
2010-06-04 00:04:02 +00:00
Dale Johannesen e288fee959 Remove tail call. A tail call version will follow.
llvm-svn: 105438
2010-06-04 00:03:37 +00:00
Bob Wilson a733daf18c Add some missing checks in TwoAddressInstructionPass::CoalesceExtSubRegs.
Check that all the instructions are in the same basic block, that the
EXTRACT_SUBREGs write to the same subregs that are being extracted, and that
the source and destination registers are in the same regclass.  Some of
these constraints can be relaxed with a bit more work.  Jakob suggested
that the loop that checks for subregs when NewSubIdx != 0 should use the
"nodbg" iterator, so I made that change here, too.

llvm-svn: 105437
2010-06-03 23:53:58 +00:00
Jim Grosbach 01edd68225 Cleanup 80-column and trim trailing whitespace
llvm-svn: 105435
2010-06-03 23:49:57 +00:00
Jim Grosbach b30b81edb6 Teach the ARM load-store optimizer to deal with dbg_value instructions.
llvm-svn: 105427
2010-06-03 22:41:15 +00:00
Dale Johannesen 9f71f7f70c Remove tail call to preserve this test. A tail
call version will follow.

llvm-svn: 105422
2010-06-03 21:57:48 +00:00
Dale Johannesen 41528aeb0b Make this test not use tail calls. A tail call
version will follow.

llvm-svn: 105419
2010-06-03 21:53:01 +00:00
Nate Begeman 64b76bd4f7 Add some additional capabilities to the neon emitter
llvm-svn: 105416
2010-06-03 21:35:22 +00:00
Rafael Espindola 8fb957e5cb Add a emit-llvm option to the plugin and make the path argument to also-emit-llvm optional.
llvm-svn: 105414
2010-06-03 21:11:20 +00:00
Dale Johannesen d679ff7330 Early implementation of tail call for ARM.
A temporary flag -arm-tail-calls defaults to off,
so there is no functional change by default.
Intrepid users may try this; simple cases work
but there are bugs.

llvm-svn: 105413
2010-06-03 21:09:53 +00:00
Dan Gohman d83e3e7750 Fix SimplifyDemandedBits' AssertZext logic to demand all the bits. It
needs to demand the high bits because it's asserting that they're zero.

llvm-svn: 105406
2010-06-03 20:21:33 +00:00
Bob Wilson 30093b5d8b Revert 105308.
llvm-svn: 105399
2010-06-03 18:28:31 +00:00
Nick Lewycky ca4180c92a Perfer !string.empty() over string != "".
llvm-svn: 105397
2010-06-03 17:13:23 +00:00
Benjamin Kramer 9f4ab44fe4 Forgot to update the most important part of the gtest modifications readme.
llvm-svn: 105396
2010-06-03 17:11:49 +00:00
Nick Lewycky 0ac5e2205c Whitespace cleanup.
llvm-svn: 105395
2010-06-03 17:10:17 +00:00
Benjamin Kramer 7cd082a7a3 Disable pthread support in googletest if llvm was configured without threads.
llvm-svn: 105390
2010-06-03 15:17:04 +00:00
Rafael Espindola 00121827b2 Don't preserve all symbols in a .so and instead trust gold to know what is
needed. The result is that now we are able to drop unnecessary symbol from
shared libraries.

llvm-svn: 105389
2010-06-03 14:45:44 +00:00
Bill Wendling f82aea634c Machine sink could potentially sink instructions into a block where the physical
registers it defines then interfere with an existing preg live range.

For instance, if we had something like these machine instructions:

BB#0
  ... = imul ... EFLAGS<imp-def,dead>
  test ..., EFLAGS<imp-def>
  jcc BB#2 EFLAGS<imp-use>

BB#1
  ... ; fallthrough to BB#2

BB#2
  ... ; No code that defines EFLAGS
  jcc ... EFLAGS<imp-use>

Machine sink will come along, see that imul implicitly defines EFLAGS, but
because it's "dead", it assumes that it can move imul into BB#2. But when it
does, imul's "dead" imp-def of EFLAGS is raised from the dead (a zombie) and
messes up the condition code for the jump (and pretty much anything else which
relies upon it being correct).

The solution is to know which pregs are live going into a basic block. However,
that information isn't calculated at this point. Nor does the LiveVariables pass
take into account non-allocatable physical registers. In lieu of this, we do a
*very* conservative pass through the basic block to determine if a preg is live
coming out of it.

llvm-svn: 105387
2010-06-03 07:54:20 +00:00
Benjamin Kramer 1add5f378d Turns out gtest still prefers the system <tr1/tuple> over it's own
implementation. Force the internal one to unbreak clang selfhost on linux.

llvm-svn: 105386
2010-06-03 07:51:58 +00:00
Eric Christopher b0e1a458ce Add first pass at darwin tls compiler support.
llvm-svn: 105381
2010-06-03 04:07:48 +00:00
Nate Begeman 11d56c55c4 arm_neon.h now makes it through clang and generates appropriate code for those functions which can use
generic vector operators rather than __builtin_neon_*

llvm-svn: 105380
2010-06-03 04:04:09 +00:00
Eric Christopher f67fe3b1e8 One underscore, not two.
llvm-svn: 105379
2010-06-03 04:02:59 +00:00
Eli Friedman dbbbf73c96 Implement expansion in type legalization for add/sub with overflow. The
expansion is the same as that used by LegalizeDAG.

The resulting code sucks in terms of performance/codesize on x86-32 for a
64-bit operation; I haven't looked into whether different expansions might be
better in general.

llvm-svn: 105378
2010-06-03 03:49:50 +00:00