oota-llvm.git
15 years agoFix the example syntax for named sections.
Dan Gohman [Sun, 11 Jan 2009 00:40:00 +0000 (00:40 +0000)]
Fix the example syntax for named sections.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62033 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis is a dup of pr2659.ll.
Evan Cheng [Sat, 10 Jan 2009 19:06:32 +0000 (19:06 +0000)]
This is a dup of pr2659.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62029 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdding unittests for SmallVector. Test by Talin.
Bill Wendling [Sat, 10 Jan 2009 12:56:31 +0000 (12:56 +0000)]
Adding unittests for SmallVector. Test by Talin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62025 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago80 col violation.
Evan Cheng [Sat, 10 Jan 2009 03:33:22 +0000 (03:33 +0000)]
80 col violation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62024 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReduce initial small vector sizes.
Devang Patel [Sat, 10 Jan 2009 02:42:49 +0000 (02:42 +0000)]
Reduce initial small vector sizes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62023 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix thinko. Create parent scope if parent descriptor is *not* null.
Devang Patel [Sat, 10 Jan 2009 02:34:18 +0000 (02:34 +0000)]
Fix thinko. Create parent scope if parent descriptor is *not* null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62022 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDuplicated node may produce a non-physical register def.
Evan Cheng [Fri, 9 Jan 2009 22:44:02 +0000 (22:44 +0000)]
Duplicated node may produce a non-physical register def.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62015 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test case from PR2659.
Evan Cheng [Fri, 9 Jan 2009 21:01:31 +0000 (21:01 +0000)]
Add test case from PR2659.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62006 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor debug output tweak.
Evan Cheng [Fri, 9 Jan 2009 20:42:34 +0000 (20:42 +0000)]
Minor debug output tweak.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62005 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis has been replaced by llvm/utils/lint/cpp_lint.py, which is more
Misha Brukman [Fri, 9 Jan 2009 19:46:41 +0000 (19:46 +0000)]
This has been replaced by llvm/utils/lint/cpp_lint.py, which is more
comprehensive and can support more complex style analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62002 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved trailing whitespace.
Misha Brukman [Fri, 9 Jan 2009 19:25:42 +0000 (19:25 +0000)]
Removed trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62000 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRequest DwarfWriter. This will be used to handle dbg_* intrinsics.
Devang Patel [Fri, 9 Jan 2009 19:11:50 +0000 (19:11 +0000)]
Request DwarfWriter.  This will be used to handle dbg_* intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61999 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix typo Duncan noticed.
Chris Lattner [Fri, 9 Jan 2009 18:31:39 +0000 (18:31 +0000)]
fix typo Duncan noticed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61997 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR3304
Chris Lattner [Fri, 9 Jan 2009 18:18:43 +0000 (18:18 +0000)]
Fix PR3304

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61995 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved trailing whitespace from Makefiles.
Misha Brukman [Fri, 9 Jan 2009 16:44:42 +0000 (16:44 +0000)]
Removed trailing whitespace from Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61991 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSupport llvmc plugins in out-of-tree projects.
Mikhail Glushenkov [Fri, 9 Jan 2009 16:31:01 +0000 (16:31 +0000)]
Support llvmc plugins in out-of-tree projects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61990 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a --check-graph option to llvmc.
Mikhail Glushenkov [Fri, 9 Jan 2009 16:16:27 +0000 (16:16 +0000)]
Add a --check-graph option to llvmc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61989 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR2659 was fixed by r61847. Add the testcase as a regression test.
Dan Gohman [Fri, 9 Jan 2009 08:16:12 +0000 (08:16 +0000)]
PR2659 was fixed by r61847. Add the testcase as a regression test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61986 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement rdar://6480391, extending of equality icmp's to avoid a truncation.
Chris Lattner [Fri, 9 Jan 2009 07:47:06 +0000 (07:47 +0000)]
Implement rdar://6480391, extending of equality icmp's to avoid a truncation.
I noticed this in the code compiled for a routine using std::map, which produced
this code:
%25 = tail call i32 @memcmp(i8* %24, i8* %23, i32 6) nounwind readonly
%.lobit.i = lshr i32 %25, 31 ; <i32> [#uses=1]
%tmp.i = trunc i32 %.lobit.i to i8 ; <i8> [#uses=1]
%toBool = icmp eq i8 %tmp.i, 0 ; <i1> [#uses=1]
br i1 %toBool, label %bb3, label %bb4
which compiled to:

call L_memcmp$stub
shrl $31, %eax
testb %al, %al
jne LBB1_11 ##

with this change, we compile it to:

call L_memcmp$stub
testl %eax, %eax
js LBB1_11

This triggers all the time in common code, with patters like this:

%169 = and i32 %ply, 1 ; <i32> [#uses=1]
%170 = trunc i32 %169 to i8 ; <i8> [#uses=1]
%toBool = icmp ne i8 %170, 0 ; <i1> [#uses=1]

  %7 = lshr i32 %6, 24 ; <i32> [#uses=1]
%9 = trunc i32 %7 to i8 ; <i8> [#uses=1]
%10 = icmp ne i8 %9, 0 ; <i1> [#uses=1]

etc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61985 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove some old code that looks like a remanant from signed-types days.
Chris Lattner [Fri, 9 Jan 2009 07:10:58 +0000 (07:10 +0000)]
Remove some old code that looks like a remanant from signed-types days.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61984 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR3298, a crash in Jump Threading. Apparently even
Chris Lattner [Fri, 9 Jan 2009 06:08:12 +0000 (06:08 +0000)]
Fix PR3298, a crash in Jump Threading.  Apparently even
jump threading can have bugs, who knew? ;-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61983 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agothis doesn't depend on the gcc early inliner anymore.
Chris Lattner [Fri, 9 Jan 2009 05:49:27 +0000 (05:49 +0000)]
this doesn't depend on the gcc early inliner anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61982 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPR3290 is now fixed.
Chris Lattner [Fri, 9 Jan 2009 05:46:19 +0000 (05:46 +0000)]
PR3290 is now fixed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61981 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix part 3/2 of PR3290, making instcombine zap (gep(bitcast)) when possible.
Chris Lattner [Fri, 9 Jan 2009 05:44:56 +0000 (05:44 +0000)]
Fix part 3/2 of PR3290, making instcombine zap (gep(bitcast)) when possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61980 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agothis test should not run opt -std-compile-opts, it should run
Chris Lattner [Fri, 9 Jan 2009 05:32:00 +0000 (05:32 +0000)]
this test should not run opt -std-compile-opts, it should run
just llc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61979 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a helper method.
Chris Lattner [Fri, 9 Jan 2009 05:27:40 +0000 (05:27 +0000)]
add a helper method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61978 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofit in 80 cols
Chris Lattner [Fri, 9 Jan 2009 04:58:01 +0000 (04:58 +0000)]
fit in 80 cols

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61977 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove some code, check to see if the input to the GEP is a bitcast
Chris Lattner [Fri, 9 Jan 2009 04:53:57 +0000 (04:53 +0000)]
move some code, check to see if the input to the GEP is a bitcast
(which is constant time and cheap) before checking hasAllZeroIndices.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61976 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd load-folding table entries for MOVDQA.
Dan Gohman [Fri, 9 Jan 2009 02:40:34 +0000 (02:40 +0000)]
Add load-folding table entries for MOVDQA.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61972 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhitespace and other minor adjustments to make SSE instructions have
Dan Gohman [Fri, 9 Jan 2009 02:27:34 +0000 (02:27 +0000)]
Whitespace and other minor adjustments to make SSE instructions have
the same formatting as their corresponding SSE2 instructions, for
consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61971 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdjustments to last patch based on review.
Dale Johannesen [Fri, 9 Jan 2009 01:30:11 +0000 (01:30 +0000)]
Adjustments to last patch based on review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61969 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago61949 accidentally introduced an escaped newline. Fix this by making
Dan Gohman [Thu, 8 Jan 2009 23:51:48 +0000 (23:51 +0000)]
61949 accidentally introduced an escaped newline. Fix this by making
the comment a little more verbose.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61959 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoConvert DwarfWriter into a pass.
Devang Patel [Thu, 8 Jan 2009 23:40:34 +0000 (23:40 +0000)]
Convert DwarfWriter into a pass.
Now Users request DwarfWriter through getAnalysisUsage() instead of creating an instance of DwarfWriter object directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61955 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete unnecessary parens around return values.
Dan Gohman [Thu, 8 Jan 2009 22:19:34 +0000 (22:19 +0000)]
Delete unnecessary parens around return values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61950 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the comment for lltok::backslash.
Dan Gohman [Thu, 8 Jan 2009 22:18:13 +0000 (22:18 +0000)]
Fix the comment for lltok::backslash.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61949 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix the path to llvm/Assembly/Parser.h in a comment.
Dan Gohman [Thu, 8 Jan 2009 22:17:05 +0000 (22:17 +0000)]
Fix the path to llvm/Assembly/Parser.h in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61948 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCorrect the form of the atomic opcode names in a comment.
Dan Gohman [Thu, 8 Jan 2009 22:14:50 +0000 (22:14 +0000)]
Correct the form of the atomic opcode names in a comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61947 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDo not inline functions with (dynamic) alloca into
Dale Johannesen [Thu, 8 Jan 2009 21:45:23 +0000 (21:45 +0000)]
Do not inline functions with (dynamic) alloca into
functions that don't already have a (dynamic) alloca.
Dynamic allocas cause inefficient codegen and we shouldn't
propagate this (behavior follows gcc).  Two existing tests
assumed such inlining would be done; they are hacked by
adding an alloca in the caller, preserving the point of
the tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61946 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse mayBeOverridden here, in anticipation of the
Duncan Sands [Thu, 8 Jan 2009 20:55:49 +0000 (20:55 +0000)]
Use mayBeOverridden here, in anticipation of the
day when more linkage types will be handled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61944 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoValueTracker can't assume that an alloca with no specified alignment
Chris Lattner [Thu, 8 Jan 2009 19:28:38 +0000 (19:28 +0000)]
ValueTracker can't assume that an alloca with no specified alignment
will get its preferred alignment.  It has to be careful and cautiously assume
it will just get the ABI alignment.  This prevents instcombine from rounding
up the alignment of a load/store without adjusting the alignment of the alloca.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61934 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoone more crash from PR3281, we now diagnose:
Chris Lattner [Thu, 8 Jan 2009 19:05:36 +0000 (19:05 +0000)]
one more crash from PR3281, we now diagnose:

llvm-as: t.ll:2:39: function may not return opaque type
  %"bwmoyl" = tail call coldcc opaque @g()
                                      ^

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61933 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove some exclusions that don't exist anymore.
Chris Lattner [Thu, 8 Jan 2009 19:02:03 +0000 (19:02 +0000)]
remove some exclusions that don't exist anymore.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61932 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agothis testcase is huge and hasn't regressed ever, I don't think it is worth keeping.
Chris Lattner [Thu, 8 Jan 2009 19:01:45 +0000 (19:01 +0000)]
this testcase is huge and hasn't regressed ever, I don't think it is worth keeping.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61931 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd DebugInfo based APIs to record source line info.
Devang Patel [Thu, 8 Jan 2009 17:19:22 +0000 (17:19 +0000)]
Add DebugInfo based APIs to record source line info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61928 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago* Moved author attribution to CREDITS.TXT
Misha Brukman [Thu, 8 Jan 2009 16:40:25 +0000 (16:40 +0000)]
* Moved author attribution to CREDITS.TXT
* Removed trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61927 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago* Alphabetized #includes
Misha Brukman [Thu, 8 Jan 2009 15:50:22 +0000 (15:50 +0000)]
* Alphabetized #includes
* Removed trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61926 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome generic clean-ups. Also make the StringMapEntryInitializer specialization apply...
Bill Wendling [Thu, 8 Jan 2009 09:31:36 +0000 (09:31 +0000)]
Some generic clean-ups. Also make the StringMapEntryInitializer specialization apply only to the tests that are actually testing it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61923 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago* Don't explicitly cast "0" to "void*". This doesn't work well with specialized
Bill Wendling [Thu, 8 Jan 2009 08:26:46 +0000 (08:26 +0000)]
* Don't explicitly cast "0" to "void*". This doesn't work well with specialized
 StringMapEntryInitializer classes. Leave it for the compiler to figure out what
 the type is and what "0" should be transformed into.

* Un-disable the unit tests which test the StringMapEntryInitializer class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61922 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agothe new scalarrepl changes are optimizing away a temporary alloca in
Chris Lattner [Thu, 8 Jan 2009 07:58:23 +0000 (07:58 +0000)]
the new scalarrepl changes are optimizing away a temporary alloca in
check242, which invalidates this test.  This test is an x86-32 ABI test
that is trying to be run in a target-independent way, which is not going
to work very well.  Just remove the test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61921 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago80-column violation fix.
Bill Wendling [Thu, 8 Jan 2009 07:35:39 +0000 (07:35 +0000)]
80-column violation fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61919 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd some more crazy strlen and memcpy stuff I noticed in spec.
Chris Lattner [Thu, 8 Jan 2009 07:34:55 +0000 (07:34 +0000)]
add some more crazy strlen and memcpy stuff I noticed in spec.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61918 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd some notes about strlen craziness in eon.
Chris Lattner [Thu, 8 Jan 2009 06:52:57 +0000 (06:52 +0000)]
add some notes about strlen craziness in eon.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61917 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove extra blank line and space.
Misha Brukman [Thu, 8 Jan 2009 06:11:51 +0000 (06:11 +0000)]
Remove extra blank line and space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61916 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis implements the second half of the fix for PR3290, handling
Chris Lattner [Thu, 8 Jan 2009 05:42:05 +0000 (05:42 +0000)]
This implements the second half of the fix for PR3290, handling
loads from allocas that cover the entire aggregate.  This handles
some memcpy/byval cases that are produced by llvm-gcc.  This triggers
a few times in kc++ (with std::pair<std::_Rb_tree_const_iterator
<kc::impl_abstract_phylum*>,bool>) and once in 176.gcc (with %struct..0anon).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61915 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago* Added unittests for StringMap
Misha Brukman [Thu, 8 Jan 2009 04:48:20 +0000 (04:48 +0000)]
* Added unittests for StringMap
* Fixed but in StringMap::clear()
* Removed trailing whitespace

Original patch by Talin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61914 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd APIs to record regions and variables.
Devang Patel [Thu, 8 Jan 2009 02:49:34 +0000 (02:49 +0000)]
Add APIs to record regions and variables.
Again, shamelessly copied from MMI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61912 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd APIs to manage scope using DebugInfo interface.
Devang Patel [Thu, 8 Jan 2009 02:33:41 +0000 (02:33 +0000)]
Add APIs to manage scope using DebugInfo interface.
This is a shameless copy of similar APIs from MachineModuleInfo. The copy from MMI will be deleted in near future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61908 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago* Fixed spelling of "sentinel"
Misha Brukman [Thu, 8 Jan 2009 02:21:23 +0000 (02:21 +0000)]
* Fixed spelling of "sentinel"
* Removed trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61907 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse VIM's built-in shorthand for whitespace in regex.
Misha Brukman [Thu, 8 Jan 2009 02:17:30 +0000 (02:17 +0000)]
Use VIM's built-in shorthand for whitespace in regex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61906 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBe sure to ignore the end-of-line character when considering trailing
Misha Brukman [Thu, 8 Jan 2009 02:16:13 +0000 (02:16 +0000)]
Be sure to ignore the end-of-line character when considering trailing
whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61905 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved trailing whitespace.
Misha Brukman [Thu, 8 Jan 2009 02:11:55 +0000 (02:11 +0000)]
Removed trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61904 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix failure messages in Verifier::PerformTypeCheck. The argument numbers
Bob Wilson [Thu, 8 Jan 2009 01:56:06 +0000 (01:56 +0000)]
Fix failure messages in Verifier::PerformTypeCheck.  The argument numbers
passed in to this function changed to support multiple return values,
leading to some incorrect argument numbers in the failure messages.
With this change, the ArgNo values used for return values and parameters are
disjoint, and the new IntrinsicParam function translates those ArgNo values
to strings that can be used in the messages.  This also fixes a few places
where PerformTypeCheck did not return false following calls to CheckFailed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61903 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCMake: removed lib/VMCore/DebugInfoBuilder.cpp.
Oscar Fuentes [Thu, 8 Jan 2009 00:18:52 +0000 (00:18 +0000)]
CMake: removed lib/VMCore/DebugInfoBuilder.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61900 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAssert that VectorType::getTruncatedElementVectorType is not used with
Bob Wilson [Wed, 7 Jan 2009 23:44:27 +0000 (23:44 +0000)]
Assert that VectorType::getTruncatedElementVectorType is not used with
odd bit-width vector elements.  Add a check in the verifier for this also.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61899 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoremove DebugInfoBuilder, it has been subsumed by Analysis/DebugInfo.h
Chris Lattner [Wed, 7 Jan 2009 23:25:06 +0000 (23:25 +0000)]
remove DebugInfoBuilder, it has been subsumed by Analysis/DebugInfo.h

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61898 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix off-by-one error in traversing an array; this fixes a test.
Misha Brukman [Wed, 7 Jan 2009 23:07:29 +0000 (23:07 +0000)]
Fix off-by-one error in traversing an array; this fixes a test.
The error was reported by gcc-4.3.0 during compilation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61896 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorevert to functionally equivalent formulation
Gabor Greif [Wed, 7 Jan 2009 23:07:22 +0000 (23:07 +0000)]
revert to functionally equivalent formulation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61895 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse the obvious getters
Gabor Greif [Wed, 7 Jan 2009 22:39:29 +0000 (22:39 +0000)]
use the obvious getters

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61893 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove redundant 'else's. No functionality change.
Dan Gohman [Wed, 7 Jan 2009 22:30:55 +0000 (22:30 +0000)]
Remove redundant 'else's. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61891 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd empty() methods for register def lists.
Dan Gohman [Wed, 7 Jan 2009 22:28:56 +0000 (22:28 +0000)]
Add empty() methods for register def lists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61890 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor cleanup for unittest:
Misha Brukman [Wed, 7 Jan 2009 21:13:53 +0000 (21:13 +0000)]
Minor cleanup for unittest:
* Fixed {copy,assignment} constructor test names
* s/EXPECT_EQ(true, ...)/ASSERT_TRUE(...)/

Patch by Talin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61883 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhitespace - correct formatting.
Duncan Sands [Wed, 7 Jan 2009 20:01:06 +0000 (20:01 +0000)]
Whitespace - correct formatting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61879 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove alloca tracking from nocapture analysis. Not only
Duncan Sands [Wed, 7 Jan 2009 19:39:06 +0000 (19:39 +0000)]
Remove alloca tracking from nocapture analysis.  Not only
was it not very helpful, it was also wrong!  The problem
is shown in the testcase: the alloca might be passed to
a nocapture callee which dereferences it and returns the
original pointer.  But because it was a nocapture call we
think we don't need to track its uses, but we do.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61876 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCMake: replace `rm' with portable invocations of cmake.
Oscar Fuentes [Wed, 7 Jan 2009 19:24:44 +0000 (19:24 +0000)]
CMake: replace `rm' with portable invocations of cmake.

Based on a bug report by Yonggang Luo.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61875 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoReorder these.
Duncan Sands [Wed, 7 Jan 2009 19:17:02 +0000 (19:17 +0000)]
Reorder these.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61873 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse a switch rather than a sequence of "isa" tests.
Duncan Sands [Wed, 7 Jan 2009 19:10:21 +0000 (19:10 +0000)]
Use a switch rather than a sequence of "isa" tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61872 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe verifier checks that the aliasee is not null.
Duncan Sands [Wed, 7 Jan 2009 18:45:53 +0000 (18:45 +0000)]
The verifier checks that the aliasee is not null.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61870 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement the first half of PR3290: if there is a store of an
Chris Lattner [Wed, 7 Jan 2009 08:11:13 +0000 (08:11 +0000)]
Implement the first half of PR3290: if there is a store of an
integer to a (transitive) bitcast the alloca and if that integer
has the full size of the alloca, then it clobbers the whole thing.
Handle this by extracting pieces out of the stored integer and
filing them away in the SROA'd elements.

This triggers fairly frequently because the CFE uses integers to
pass small structs by value and the inliner exposes these.  For
example, in kimwitu++, I see a bunch of these with i64 stores to
"%struct.std::pair<std::_Rb_tree_const_iterator<kc::impl_abstract_phylum*>,bool>"

In 176.gcc I see a few i32 stores to "%struct..0anon".

In the testcase, this is a difference between compiling test1 to:

_test1:
subl $12, %esp
movl 20(%esp), %eax
movl %eax, 4(%esp)
movl 16(%esp), %eax
movl %eax, (%esp)
movl (%esp), %eax
addl 4(%esp), %eax
addl $12, %esp
ret

vs:

_test1:
movl 8(%esp), %eax
addl 4(%esp), %eax
ret

The second half of this will be to handle loads of the same form.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61853 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFactor a bunch of code out into a helper method.
Chris Lattner [Wed, 7 Jan 2009 07:18:45 +0000 (07:18 +0000)]
Factor a bunch of code out into a helper method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61852 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse continue to simplify code and reduce nesting, no functionality
Chris Lattner [Wed, 7 Jan 2009 06:39:58 +0000 (06:39 +0000)]
use continue to simplify code and reduce nesting, no functionality
change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61851 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGet TargetData once up front and cache as an ivar instead of
Chris Lattner [Wed, 7 Jan 2009 06:34:28 +0000 (06:34 +0000)]
Get TargetData once up front and cache as an ivar instead of
requerying it all over the place.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61850 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse the hasAllZeroIndices predicate to simplify some
Chris Lattner [Wed, 7 Jan 2009 06:25:07 +0000 (06:25 +0000)]
Use the hasAllZeroIndices predicate to simplify some
code, no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61849 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe coalescer does not coalesce a virtual register to a physical register if any...
Evan Cheng [Wed, 7 Jan 2009 02:08:57 +0000 (02:08 +0000)]
The coalescer does not coalesce a virtual register to a physical register if any of the physical register's sub-register live intervals overlaps with the virtual register. This is overly conservative. It prevents a extract_subreg from being coalesced away:

v1024 = EDI  // not killed
      =
      = EDI

One possible solution is for the coalescer to examine the sub-register live intervals in the same manner as the physical register. Another possibility is to examine defs and uses (when needed) of sub-registers. Both solutions are too expensive. For now, look for "short virtual intervals" and scan instructions to look for conflict instead.

This is a small win on x86-64. e.g. It shaves 403.gcc by ~80 instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61847 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd a testcase.
Chris Lattner [Wed, 7 Jan 2009 01:48:08 +0000 (01:48 +0000)]
add a testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61845 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd patterns to match conditional moves with loads folded
Dan Gohman [Wed, 7 Jan 2009 01:00:24 +0000 (01:00 +0000)]
Add patterns to match conditional moves with loads folded
into their left operand, rather than their right. Do this
by commuting the operands and inverting the condition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61842 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd load-folding table entries for cmovno too.
Dan Gohman [Wed, 7 Jan 2009 00:44:53 +0000 (00:44 +0000)]
Add load-folding table entries for cmovno too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61841 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDefine instructions for cmovo and cmovno.
Dan Gohman [Wed, 7 Jan 2009 00:35:10 +0000 (00:35 +0000)]
Define instructions for cmovo and cmovno.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61836 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoX86_COND_C and X86_COND_NC are alternate mnemonics for
Dan Gohman [Wed, 7 Jan 2009 00:15:08 +0000 (00:15 +0000)]
X86_COND_C and X86_COND_NC are alternate mnemonics for
X86_COND_B and X86_COND_AE, respectively.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61835 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove support for type-generic vector intrinsics by teaching TableGen how
Bob Wilson [Wed, 7 Jan 2009 00:09:01 +0000 (00:09 +0000)]
Improve support for type-generic vector intrinsics by teaching TableGen how
to handle LLVMMatchType intrinsic parameters, and by adding new subclasses
of LLVMMatchType to match vector types with integral elements that are
either twice as wide or half as wide as the elements of the matched type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61834 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNow that fold-pcmpeqd-0.ll is effectively testing that scheduling helps
Dan Gohman [Tue, 6 Jan 2009 23:48:10 +0000 (23:48 +0000)]
Now that fold-pcmpeqd-0.ll is effectively testing that scheduling helps
avoid the need for spilling, add a new testcase that tests that the
pcmpeqd used for V_SETALLONES is changed to a constant-pool load as
needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61831 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRevert r42653 and forward-port the code that lets INC64_32r be
Dan Gohman [Tue, 6 Jan 2009 23:34:46 +0000 (23:34 +0000)]
Revert r42653 and forward-port the code that lets INC64_32r be
converted to LEA64_32r in x86's convertToThreeAddress. This
replaces code like this:
   movl  %esi, %edi
   inc   %edi
with this:
   lea   1(%rsi), %edi
which appears to be beneficial.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61830 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCellSPU:
Scott Michel [Tue, 6 Jan 2009 23:10:38 +0000 (23:10 +0000)]
CellSPU:
- Add preliminary support for v2i32; load/store generates the right code but
  there's a lot work to be done to make this vector type operational.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61829 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a bug in ComputeLinearIndex computation handling multi-level
Dan Gohman [Tue, 6 Jan 2009 22:53:52 +0000 (22:53 +0000)]
Fix a bug in ComputeLinearIndex computation handling multi-level
aggregate types. Don't increment the current index after reaching
the end of a struct, as it will already be pointing at
one-past-the end. This fixes PR3288.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61828 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet up DwarfDebug using DebugInfo API.
Devang Patel [Tue, 6 Jan 2009 21:07:30 +0000 (21:07 +0000)]
Set up DwarfDebug using DebugInfo API.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61822 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForgot that this was needed for Linux. This should fix the builds.
Bill Wendling [Tue, 6 Jan 2009 19:13:55 +0000 (19:13 +0000)]
Forgot that this was needed for Linux. This should fix the builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61819 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThe phi construction algorithm used for interval reconstruction is complicated by
Owen Anderson [Tue, 6 Jan 2009 07:53:32 +0000 (07:53 +0000)]
The phi construction algorithm used for interval reconstruction is complicated by
two address instructions.  We need to keep track of things we've processed AS USES
independetly of whether we've processed them as defs.

This fixes all known miscompilations when reconstruction is turned on.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61802 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCellSPU: Update the README
Scott Michel [Tue, 6 Jan 2009 03:51:14 +0000 (03:51 +0000)]
CellSPU: Update the README

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61785 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCellSPU:
Scott Michel [Tue, 6 Jan 2009 03:36:14 +0000 (03:36 +0000)]
CellSPU:
- Fix bugs 3194, 3195: i128 load/stores produce correct code (although, we
  need to ensure that i128 is 16-byte aligned in real life), and 128 zero-
  extends are supported.
- New td file: SPU128InstrInfo.td: this is where all new i128 support should
  be put in the future.
- Continue to hammer on i64 operations and test cases; ensure that the only
  remaining problem will be i64 mul.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61784 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDelete this test; it's a duplicate of 2006-07-03-schedulers.ll.
Dan Gohman [Tue, 6 Jan 2009 01:36:23 +0000 (01:36 +0000)]
Delete this test; it's a duplicate of 2006-07-03-schedulers.ll.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61781 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate these argument lists for the isNormalMemory
Dan Gohman [Tue, 6 Jan 2009 01:28:56 +0000 (01:28 +0000)]
Update these argument lists for the isNormalMemory
argument. This doesn't affect current functionality.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61779 91177308-0d34-0410-b5e6-96231b3b80d8