Commit Graph

34382 Commits

Author SHA1 Message Date
Johnny Chen 466231ab92 Add encoding bits for some Thumb instructions. Plus explicitly set the top two
bytes of Inst to 0x0000 for the benefit of the Thumb decoder.

llvm-svn: 91496
2009-12-16 02:32:54 +00:00
Evan Cheng 1be6286028 Re-enable 91381 with fixes.
llvm-svn: 91489
2009-12-16 00:53:11 +00:00
Chris Lattner 177be32334 revert my strstr optimization, I'm told it breaks x86-64 bootstrap.
Will reapply with a fix when I get a chance.

llvm-svn: 91486
2009-12-16 00:46:02 +00:00
Dale Johannesen 56f041406d Do better with physical reg operands (typically, from inline asm)
in local register allocator.  If a reg-reg copy has a phys reg
input and a virt reg output, and this is the last use of the phys
reg, assign the phys reg to the virt reg.  If a reg-reg copy has
a phys reg output and we need to reload its spilled input, reload
it directly into the phys reg than passing it through another reg.

Following 76208, there is sometimes no dependency between the def of
a phys reg and its use; this creates a window where that phys reg
can be used for spilling (this is true in linear scan also).  This
is bad and needs to be fixed a better way, although 76208 works too
well in practice to be reverted.  However, there should normally be
no spilling within inline asm blocks.  The patch here goes a long way
towards making this actually be true.

llvm-svn: 91485
2009-12-16 00:29:41 +00:00
John McCall 826ca5630e Every anonymous namespace is different. Caught by clang++.
llvm-svn: 91481
2009-12-16 00:15:28 +00:00
John McCall 323c30c5f4 Explicit template instantiations must happen in the template's immediately
enclosing namespace.  Caught by clang++.

llvm-svn: 91480
2009-12-16 00:13:24 +00:00
Bill Wendling 2d5967d005 Helpful comment added. Some code cleanup. No functional change.
llvm-svn: 91479
2009-12-16 00:08:36 +00:00
Bill Wendling 3766491eee Initialize uninitialized variables.
llvm-svn: 91477
2009-12-16 00:01:27 +00:00
Bill Wendling 776ef4dd32 Initialize uninitialized variables.
llvm-svn: 91475
2009-12-16 00:00:18 +00:00
Jeffrey Yasskin e0d8e14e11 Change indirect-globals to use a dedicated allocIndirectGV. This lets us
remove start/finishGVStub and the BufferState helper class from the
MachineCodeEmitter interface.  It has the side-effect of not setting the
indirect global writable and then executable on ARM, but that shouldn't be
necessary.

llvm-svn: 91464
2009-12-15 22:42:46 +00:00
Bob Wilson e44756d7c2 Reapply 91184 with fixes and an addition to the testcase to cover the problem
found last time.  Instead of trying to modify the IR while iterating over it,
I've change it to keep a list of WeakVH references to dead instructions, and
then delete those instructions later.  I also added some special case code to
detect and handle the situation when both operands of a memcpy intrinsic are
referencing the same alloca.

llvm-svn: 91459
2009-12-15 22:00:51 +00:00
Chris Lattner a3aef788ec Fix GetConstantStringInfo to not look into MDString (it works on
real data, not metadata) and fix DbgInfoPrinter to not abuse
GetConstantStringInfo.

llvm-svn: 91444
2009-12-15 19:34:20 +00:00
Devang Patel 1f4690c624 Add support to emit debug info for C++ namespaces.
llvm-svn: 91440
2009-12-15 19:16:48 +00:00
Chris Lattner 26ab363361 optimize strstr, PR5783
llvm-svn: 91438
2009-12-15 19:14:40 +00:00
Johnny Chen c28e629c2d Added encoding bits for the Thumb ISA. Initial checkin.
llvm-svn: 91434
2009-12-15 17:24:14 +00:00
Dan Gohman 265ce318b8 Delete an unused function.
llvm-svn: 91432
2009-12-15 16:30:09 +00:00
Chris Lattner 24aba42d04 add some other xforms that should be done as part of PR5783
llvm-svn: 91428
2009-12-15 09:05:13 +00:00
Chris Lattner 45d040bd85 Remove isPod() from DenseMapInfo, splitting it out to its own
isPodLike type trait.  This is a generally useful type trait for
more than just DenseMap, and we really care about whether something
acts like a pod, not whether it really is a pod.

llvm-svn: 91421
2009-12-15 07:26:43 +00:00
Evan Cheng b3032962ef Fix an encoding bug.
llvm-svn: 91417
2009-12-15 06:49:02 +00:00
Kenneth Uildriks 792f0913ee For fastcc on x86, let ECX be used as a return register after EAX and EDX
llvm-svn: 91410
2009-12-15 03:27:52 +00:00
Evan Cheng fcb5453dc7 Disable 91381 for now. It's miscompiling ARMISelDAG2DAG.cpp.
llvm-svn: 91405
2009-12-15 03:07:11 +00:00
Evan Cheng 852c486946 Make 91378 more conservative.
1. Only perform (zext (shl (zext x), y)) -> (shl (zext x), y) when y is a constant. This makes sure it remove at least one zest.
2. If the shift is a left shift, make sure the original shift cannot shift out bits.

llvm-svn: 91399
2009-12-15 03:00:32 +00:00
John McCall 4ea24f19f5 You can't use typedefs to declare template member specializations, and
clang enforces it.

llvm-svn: 91397
2009-12-15 02:35:24 +00:00
Bill Wendling 07beddceb7 Initial work on disabling the scheduler. This is a work in progress, and this
stuff isn't used just yet.

We want to model the GCC `-fno-schedule-insns' and `-fno-schedule-insns2'
flags. The hypothesis is that the people who use these flags know what they are
doing, and have hand-optimized the C code to reduce latencies and other
conflicts.

The idea behind our scheme to turn off scheduling is to create a map "on the
side" during DAG generation. It will order the nodes by how they appeared in the
code. This map is then used during scheduling to get the ordering.

llvm-svn: 91392
2009-12-15 01:54:51 +00:00
Evan Cheng 45430bbfaa Tail duplication should zap a copy it inserted for SSA update if the copy is the only use of its source.
llvm-svn: 91390
2009-12-15 01:44:10 +00:00
Evan Cheng 0e8b9e32d1 Use sbb x, x to materialize carry bit in a GPR. The result is all one's or all zero's.
llvm-svn: 91381
2009-12-15 00:53:42 +00:00
Evan Cheng d1521ef40c Fold (zext (and x, cst)) -> (and (zext x), cst).
llvm-svn: 91380
2009-12-15 00:52:11 +00:00
Evan Cheng ca7c690d3b Propagate zest through logical shift.
llvm-svn: 91378
2009-12-15 00:41:36 +00:00
Eric Christopher d5218331f7 Formatting.
llvm-svn: 91377
2009-12-15 00:40:55 +00:00
Bill Wendling e8a525a196 Revert these. They may have been causing 483_xalancbmk to fail:
$ svn merge -c -91161 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91161 into '.':
U    lib/CodeGen/BranchFolding.cpp
U    lib/CodeGen/MachineBasicBlock.cpp
$ svn merge -c -91113 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91113 into '.':
G    lib/CodeGen/MachineBasicBlock.cpp
$ svn merge -c -91101 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91101 into '.':
U    include/llvm/CodeGen/MachineBasicBlock.h
G    lib/CodeGen/MachineBasicBlock.cpp
$ svn merge -c -91092 https://llvm.org/svn/llvm-project/llvm/trunk
--- Reverse-merging r91092 into '.':
G    include/llvm/CodeGen/MachineBasicBlock.h
G    lib/CodeGen/MachineBasicBlock.cpp

llvm-svn: 91376
2009-12-15 00:39:24 +00:00
Jim Grosbach ea8f6e31a0 nand atomic requires opposite operand ordering
llvm-svn: 91371
2009-12-15 00:12:35 +00:00
Dan Gohman cecad35728 Fix integer cast code to handle vector types.
llvm-svn: 91362
2009-12-14 23:40:38 +00:00
Dan Gohman 6453a4e2ab Fix this to properly clear the FastISel debug location. Thanks to
Bill for spotting this!

llvm-svn: 91355
2009-12-14 23:08:09 +00:00
Johnny Chen bee6f16fed Add encoding bits "let Inst{11-4} = 0b00000000;" to BR_JTr to disambiguate
between BR_JTr and STREXD.

llvm-svn: 91339
2009-12-14 21:51:34 +00:00
Bill Wendling 1bdf5d6f75 The CIE says that the LSDA point in the FDE section is an "sdata4". That's fine,
but we need it to actually be 4-bytes in the FDE.

llvm-svn: 91337
2009-12-14 21:49:44 +00:00
Jim Grosbach 3974a80307 v6 sync insn copy/paste error
llvm-svn: 91333
2009-12-14 21:33:32 +00:00
Jim Grosbach 3c4f04112a Add ARMv6 memory and sync barrier instructions
llvm-svn: 91329
2009-12-14 21:24:16 +00:00
Johnny Chen acba3b0ae2 Fixed encoding bits typo of ldrexd/strexd.
llvm-svn: 91327
2009-12-14 21:01:46 +00:00
Jim Grosbach 57ccc19617 Thumb2 atomic operations
llvm-svn: 91321
2009-12-14 20:14:59 +00:00
Dan Gohman 1cfbfc86cf Move several function bodies which are rarely inlined out of line.
llvm-svn: 91319
2009-12-14 19:43:09 +00:00
Chris Lattner 726e452ccb fix an obvious bug found by clang++ and collapse a redundant if.
Here's the diagnostic from clang:

/Volumes/Data/dgregor/Projects/llvm/lib/Target/CppBackend/CPPBackend.cpp:989:23: warning: 'gv' is always NULL in this context
        printConstant(gv);
                      ^
1 diagnostic generated.

llvm-svn: 91318
2009-12-14 19:34:32 +00:00
Dan Gohman fd5de58ec1 Micro-optimize these functions in the case where they are not inlined.
llvm-svn: 91316
2009-12-14 19:32:31 +00:00
Jim Grosbach fed3d088ce correct selection requirements for thumb2 vs. arm versions of the barrier intrinsics
llvm-svn: 91313
2009-12-14 19:24:11 +00:00
Jim Grosbach 20ac87de13 add Thumb2 atomic and memory barrier instruction definitions
llvm-svn: 91310
2009-12-14 18:56:47 +00:00
Jim Grosbach 3cdb555e0f whitespace
llvm-svn: 91307
2009-12-14 18:36:32 +00:00
Jim Grosbach 5e0d2a2df6 ARM memory barrier instructions are not predicable
llvm-svn: 91305
2009-12-14 18:31:20 +00:00
Dan Gohman 2a07fd94f1 Clear the Processed set when it is no longer used, and clear the
IVUses list in releaseMemory().

llvm-svn: 91296
2009-12-14 17:35:17 +00:00
Dan Gohman fbeec7270c Fix a thinko; isNotAlreadyContainedIn had a built-in negative, so the
condition was inverted when the code was converted to contains().

llvm-svn: 91295
2009-12-14 17:31:01 +00:00
Dan Gohman 416d5b7361 Remove unnecessary #includes.
llvm-svn: 91293
2009-12-14 17:19:06 +00:00
Dan Gohman 163fb26927 Instead of having a ScalarEvolution pointer member in BasedUser, just pass
the ScalarEvolution pointer into the functions which need it.

llvm-svn: 91289
2009-12-14 17:12:51 +00:00