Commit Graph

55543 Commits

Author SHA1 Message Date
Chris Lattner
dc5138d81f remove use of SmallVector from Path::makeUnique. Path::makeUnique
is not used by anything performance sensitive, so just use std::string.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91528 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 08:40:44 +00:00
Chris Lattner
e4b0cd2856 eliminate an extraneous use of SmallVector in a case where
a fixed size buffer is perfectly fine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91527 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 08:35:54 +00:00
Chris Lattner
99ea87a48a factor out the grow() method for all pod implementations into one
common function.  It is still an inline method, which will be fixed next.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91526 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 08:34:40 +00:00
Victor Hernandez
6bc2b8b215 Use different name for argument and field
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91524 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 08:10:57 +00:00
Chris Lattner
2676f18312 pull destroy_range and uninitialized_copy up to the
SmallVectorTemplateBase class, which allows us to statically
dispatch on isPodLike instead of dynamically.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 08:09:23 +00:00
Chris Lattner
e6e55d7959 sink most of the meat in smallvector back from SmallVectorTemplateCommon
down into SmallVectorImpl.  This requires sprinking a ton of this->'s in,
but gives us a place to factor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91522 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 08:05:48 +00:00
Nick Lewycky
0588bcef8d Make this test pass on Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91521 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 07:35:25 +00:00
Chris Lattner
de576fa579 substantial refactoring of SmallVector, now most code is in SmallVectorTemplateCommon,
and there is a new SmallVectorTemplateBase class in between it and SmallVectorImpl.
SmallVectorTemplateBase can be specialized based on isPodLike.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 06:55:45 +00:00
Victor Hernandez
57c0f20601 MDNodes that refer to an instruction are local to a function; in that case, explicitly keep track of the function they are local to
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91497 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 02:52:09 +00:00
Johnny Chen
bbc71b2904 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 02:32:54 +00:00
Devang Patel
978b75ee50 XFAIL on ppc-darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91495 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 02:11:38 +00:00
Evan Cheng
2e489c4f9d Re-enable 91381 with fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91489 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 00:53:11 +00:00
Chris Lattner
0001517d9d revert my strstr optimization, I'm told it breaks x86-64 bootstrap.
Will reapply with a fix when I get a chance.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 00:46:02 +00:00
Dale Johannesen
fc49bd2447 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91485 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 00:29:41 +00:00
John McCall
bd13cb911c Every anonymous namespace is different. Caught by clang++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 00:15:28 +00:00
John McCall
f32616e0bd Explicit template instantiations must happen in the template's immediately
enclosing namespace.  Caught by clang++.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 00:13:24 +00:00
Bill Wendling
c70d331151 Helpful comment added. Some code cleanup. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 00:08:36 +00:00
Bill Wendling
fe586b3e38 Initialize uninitialized variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91477 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 00:01:27 +00:00
Bill Wendling
408e9d166a Initialize uninitialized variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91475 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-16 00:00:18 +00:00
Jeffrey Yasskin
32d7e6ebde 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91464 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 22:42:46 +00:00
Bill Wendling
6be413dd64 Some command lines don't like numbers with leading zeros. Remove them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91463 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 22:42:19 +00:00
Bob Wilson
970eaf2520 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 22:00:51 +00:00
Daniel Dunbar
99ea6898e1 lit: Improve error when gtest discovery fails.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91458 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 22:00:37 +00:00
Dan Gohman
9b03da6824 Revert 90628, which was incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91448 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 20:21:44 +00:00
Chris Lattner
524528e614 Fix GetConstantStringInfo to not look into MDString (it works on
real data, not metadata) and fix DbgInfoPrinter to not abuse
GetConstantStringInfo.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91444 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 19:34:20 +00:00
Jim Grosbach
f0a4fad995 whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91442 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 19:28:13 +00:00
Devang Patel
6404e4e795 Add support to emit debug info for C++ namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91440 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 19:16:48 +00:00
Chris Lattner
ad6b1fdaf9 optimize strstr, PR5783
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91438 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 19:14:40 +00:00
Johnny Chen
d68e119c0f Added encoding bits for the Thumb ISA. Initial checkin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91434 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 17:24:14 +00:00
Dan Gohman
a0cefcfcac Delete an unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91432 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 16:30:09 +00:00
Chris Lattner
099b41f342 add some other xforms that should be done as part of PR5783
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91428 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 09:05:13 +00:00
Chris Lattner
4a5129c700 a few improvements:
1. Use std::equal instead of reinventing it.
2. don't run dtors in destroy_range if element is pod-like.
3. Use isPodLike to decide between memcpy/uninitialized_copy 
   instead of is_class.  isPodLike is more generous in some cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91427 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 08:34:01 +00:00
Chris Lattner
10aaf05c30 hoist the begin/end/capacity members and a few trivial methods
up into the non-templated SmallVectorBase class.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91426 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 08:29:22 +00:00
Chris Lattner
dc2e570411 improve isPodLike to know that all non-class types are pod.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91425 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 07:40:44 +00:00
Chris Lattner
729a8acc9f Lang verified that SlotIndex is "pod like" even though it isn't a pod.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91423 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 07:27:58 +00:00
Chris Lattner
4bbf4ee149 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91421 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 07:26:43 +00:00
Mikhail Glushenkov
f8bc1e4b27 Convert llvmc tests to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91420 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 07:21:14 +00:00
Mikhail Glushenkov
545f96814b Support hook invocation from 'append_cmd'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91419 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 07:20:50 +00:00
Evan Cheng
dba6cac0d4 Fix an encoding bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91417 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 06:49:02 +00:00
Chris Lattner
96c7ae5e97 add an ALWAYS_INLINE macro, which does the obvious thing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91416 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 06:14:33 +00:00
Kenneth Uildriks
76df3f398c For fastcc on x86, let ECX be used as a return register after EAX and EDX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91410 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:27:52 +00:00
John McCall
eb751d8c2d Names from dependent base classes are not found by unqualified lookup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91407 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:10:26 +00:00
Evan Cheng
d7760a4905 Disable 91381 for now. It's miscompiling ARMISelDAG2DAG.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91405 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:07:11 +00:00
Mikhail Glushenkov
e4ac23a0ff Validate the generated C++ code in llvmc tests.
Checks that the code generated by 'tblgen --emit-llvmc' can be actually
compiled. Also fixes two bugs found in this way:

- forward_transformed_value didn't work with non-list arguments
- cl::ZeroOrOne is now called cl::Optional

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:04:52 +00:00
Mikhail Glushenkov
b5fab402d0 Pipe 'grep' output to 'count'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91403 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:04:14 +00:00
Mikhail Glushenkov
abf2d986c9 Allow $CALL(Hook, '$INFILE') for non-join tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91402 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:04:02 +00:00
Mikhail Glushenkov
68d475ad90 Small documentation update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91401 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:03:37 +00:00
Evan Cheng
9818c043d2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91399 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 03:00:32 +00:00
John McCall
bc8858c3b0 You can't use typedefs to declare template member specializations, and
clang enforces it.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91397 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 02:35:24 +00:00
Bill Wendling
614407a9d2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91392 91177308-0d34-0410-b5e6-96231b3b80d8
2009-12-15 01:54:51 +00:00