oota-llvm.git
16 years agoadd support for pattern matching 'neg'
Chris Lattner [Fri, 9 May 2008 05:20:27 +0000 (05:20 +0000)]
add support for pattern matching 'neg'

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

16 years agoImplement PR2298. This transforms:
Chris Lattner [Fri, 9 May 2008 05:19:28 +0000 (05:19 +0000)]
Implement PR2298.  This transforms:
   ~x < ~y --> y < x
   -x == -y --> x == y

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

16 years agorestore doxygen comment.
Chris Lattner [Fri, 9 May 2008 04:43:13 +0000 (04:43 +0000)]
restore doxygen comment.

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

16 years ago<rdar://problem/5917641> use getMemBufferCopy if supplied buffer is not already zero...
Nick Kledzik [Fri, 9 May 2008 01:09:59 +0000 (01:09 +0000)]
<rdar://problem/5917641> use getMemBufferCopy if supplied buffer is not already zero terminated

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

16 years agoCheck for validity of aliasee pointer before dereference.
Anton Korobeynikov [Thu, 8 May 2008 23:11:06 +0000 (23:11 +0000)]
Check for validity of aliasee pointer before dereference.

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

16 years agoUse movq to move low half of XMM register and zero-extend the rest.
Evan Cheng [Thu, 8 May 2008 22:35:02 +0000 (22:35 +0000)]
Use movq to move low half of XMM register and zero-extend the rest.

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

16 years agoconservatively say that volatile stores read memory.
Chris Lattner [Thu, 8 May 2008 21:58:49 +0000 (21:58 +0000)]
conservatively say that volatile stores read memory.

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

16 years agoRevertin 50867 since it was breaking the build.
Tanya Lattner [Thu, 8 May 2008 21:54:20 +0000 (21:54 +0000)]
Revertin 50867 since it was breaking the build.

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

16 years agostore can't read from memory.
Chris Lattner [Thu, 8 May 2008 21:47:43 +0000 (21:47 +0000)]
store can't read from memory.

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

16 years agoAdd -E and -S options
Mikhail Glushenkov [Thu, 8 May 2008 20:02:36 +0000 (20:02 +0000)]
Add -E and -S options

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

16 years agoA small refactoring (extract method) + some comment fixes.
Mikhail Glushenkov [Thu, 8 May 2008 20:02:03 +0000 (20:02 +0000)]
A small refactoring (extract method) + some comment fixes.

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

16 years agoRemove dead return. Thanks to Bill for the review!
Chris Lattner [Thu, 8 May 2008 18:26:56 +0000 (18:26 +0000)]
Remove dead return.  Thanks to Bill for the review!

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

16 years agoImprove pass documentation and comments.
Gordon Henriksen [Thu, 8 May 2008 17:46:35 +0000 (17:46 +0000)]
Improve pass documentation and comments.

Patch by Matthijs Kooijman!

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

16 years agoMore than just loads can read from memory: readonly calls like strlen
Chris Lattner [Thu, 8 May 2008 17:37:37 +0000 (17:37 +0000)]
More than just loads can read from memory: readonly calls like strlen
also need to be checked for memory modifying instructions before we
can sink them.  THis fixes the second half of PR2297.

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

16 years agoMake instcombine's DSE respect loads as well as stores. It is not safe to
Chris Lattner [Thu, 8 May 2008 17:20:30 +0000 (17:20 +0000)]
Make instcombine's DSE respect loads as well as stores.  It is not safe to
delete the first store in:

store x -> p
load p
store y -> p

This is for PR2297.

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

16 years agoadd a new Instruction::mayReadFromMemory predicate, make
Chris Lattner [Thu, 8 May 2008 17:16:51 +0000 (17:16 +0000)]
add a new Instruction::mayReadFromMemory predicate, make
Instruction::mayWriteToMemory stronger for invokes.

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

16 years agoCheck linkage.
Devang Patel [Thu, 8 May 2008 15:08:39 +0000 (15:08 +0000)]
Check linkage.

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

16 years agoGet exception handling working again on 64 bit
Duncan Sands [Thu, 8 May 2008 12:33:11 +0000 (12:33 +0000)]
Get exception handling working again on 64 bit
Darwin.  This is a hack of course, but it does
at least look at the right thing: gotpcrel means
that this is already an offset, so an explicit
offset is not needed (and wrong).  I think this
is good enough for the moment: Anton is working
on something better.

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

16 years agonew testcase.
Chris Lattner [Thu, 8 May 2008 04:55:51 +0000 (04:55 +0000)]
new testcase.

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

16 years agoAdd support for constant folding the 'offsetof' pattern even if the
Chris Lattner [Thu, 8 May 2008 04:54:43 +0000 (04:54 +0000)]
Add support for constant folding the 'offsetof' pattern even if the
base is not zero.  This fixes test/C++Frontend/2008-05-07-CrazyOffsetOf.cpp

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

16 years agoHandle vector move / load which zero the destination register top bits (i.e. movd...
Evan Cheng [Thu, 8 May 2008 00:57:18 +0000 (00:57 +0000)]
Handle vector move / load which zero the destination register top bits (i.e. movd, movq, movss (addr), movsd (addr)) with X86 specific dag combine.

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

16 years agoAdd nounwind.
Evan Cheng [Wed, 7 May 2008 22:59:08 +0000 (22:59 +0000)]
Add nounwind.

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

16 years agoTurn StripPointerCast() into a method
Anton Korobeynikov [Wed, 7 May 2008 22:54:15 +0000 (22:54 +0000)]
Turn StripPointerCast() into a method

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

16 years agoUse Doxygen-style comments.
Mikhail Glushenkov [Wed, 7 May 2008 21:50:19 +0000 (21:50 +0000)]
Use Doxygen-style comments.

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

16 years agoMake the interface of CStrInCStrNoCase be the same as strcasestr.
Ted Kremenek [Wed, 7 May 2008 20:04:18 +0000 (20:04 +0000)]
Make the interface of CStrInCStrNoCase be the same as strcasestr.

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

16 years agoAdd a new LibCallAliasAnalysis pass, which is parameterized
Chris Lattner [Wed, 7 May 2008 19:53:05 +0000 (19:53 +0000)]
Add a new LibCallAliasAnalysis pass, which is parameterized
by an instance of LibCallInfo to provide mod/ref info of
standard library functions.  This is powerful enough to
say that 'sqrt' is readonly except that it modifies errno,
or that "printf doesn't store to memory unless the %n
constraint is present" etc.

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

16 years agoFix some serious logical errors in CStrInCStrNoCase pointed out by Bill.
Ted Kremenek [Wed, 7 May 2008 19:22:36 +0000 (19:22 +0000)]
Fix some serious logical errors in CStrInCStrNoCase pointed out by Bill.

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

16 years agoOutput correct exception handling and frame info
Duncan Sands [Wed, 7 May 2008 19:11:09 +0000 (19:11 +0000)]
Output correct exception handling and frame info
on x86-64 linux.  This causes no regressions on
32 bit linux and 32 bit ppc.  More tests pass
on 64 bit ppc with no regressions.  I didn't
turn on eh on 64 bit linux because the intrinsics
needed to compile the eh runtime aren't done
yet.  But if you turn it on and link with the
mainline runtime then eh seems to work fine
on x86-64 linux with this patch.  Thanks to
Dale for testing.  The main point of the patch
is that if you output that some object is
encoded using 4 bytes you had better not output
8 bytes for it: the patch makes everything
consistent.

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

16 years agoGuard for empty strings in CStrInCStrNoCase.
Ted Kremenek [Wed, 7 May 2008 18:49:31 +0000 (18:49 +0000)]
Guard for empty strings in CStrInCStrNoCase.

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

16 years agoAdded CStrInCStrNoCase, a portable implementation of strcasestr.
Ted Kremenek [Wed, 7 May 2008 18:35:46 +0000 (18:35 +0000)]
Added CStrInCStrNoCase, a portable implementation of strcasestr.

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

16 years agoAdd a new interface for describing the behavior of library calls. This
Chris Lattner [Wed, 7 May 2008 18:21:13 +0000 (18:21 +0000)]
Add a new interface for describing the behavior of library calls.  This
Currently is sufficient to describe mod/ref behavior but will hopefully
eventually be extended for other purposes.

This isn't used by anything yet.

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

16 years agoTypo.
Nick Lewycky [Wed, 7 May 2008 06:39:04 +0000 (06:39 +0000)]
Typo.

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

16 years agoYet another nasty spiller bug.
Evan Cheng [Wed, 7 May 2008 00:49:28 +0000 (00:49 +0000)]
Yet another nasty spiller bug.
%ecx = op
store %cl<kill>, (addr)
(addr) = op %al

It's not safe to unfold the last operand and eliminate store even though %cl is marked kill. It's a sub-register use which means one of its super-register(s) may be used below.

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

16 years agoFix a bug in the ComputeMaskedBits logic for multiply.
Dan Gohman [Wed, 7 May 2008 00:35:55 +0000 (00:35 +0000)]
Fix a bug in the ComputeMaskedBits logic for multiply.

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

16 years agoMake the use of the "noinline" attribute conditional on using GCC.
Bill Wendling [Wed, 7 May 2008 00:00:34 +0000 (00:00 +0000)]
Make the use of the "noinline" attribute conditional on using GCC.

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

16 years agoDisable loop deletion until the release branch.
Owen Anderson [Tue, 6 May 2008 23:56:34 +0000 (23:56 +0000)]
Disable loop deletion until the release branch.

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

16 years agoRemoving.
Bill Wendling [Tue, 6 May 2008 23:56:22 +0000 (23:56 +0000)]
Removing.

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

16 years agoWorkaround for a compiler bug (see <rdar://problem/5852746>). Once that bug is
Bill Wendling [Tue, 6 May 2008 23:30:02 +0000 (23:30 +0000)]
Workaround for a compiler bug (see <rdar://problem/5852746>). Once that bug is
fixed, revert this patch.

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

16 years agoUpdate a couple VC++ project files.
Steve Naroff [Tue, 6 May 2008 23:14:34 +0000 (23:14 +0000)]
Update a couple VC++ project files.

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

16 years agoUse target triple in tests, not 'realign-stack=0' option. Per request.
Anton Korobeynikov [Tue, 6 May 2008 23:09:29 +0000 (23:09 +0000)]
Use target triple in tests, not 'realign-stack=0' option. Per request.

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

16 years agoIf weak GlobalVariable was bitcast'ed to different type during linking
Anton Korobeynikov [Tue, 6 May 2008 22:52:54 +0000 (22:52 +0000)]
If weak GlobalVariable was bitcast'ed to different type during linking
we will need to strip all casts for intializer lookup.

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

16 years agoMake StripPointerCast a common function (should we mak it method of Value instead?)
Anton Korobeynikov [Tue, 6 May 2008 22:52:30 +0000 (22:52 +0000)]
Make StripPointerCast a common function (should we mak it method of Value instead?)

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

16 years agoTestcase for r50770.
Owen Anderson [Tue, 6 May 2008 21:01:34 +0000 (21:01 +0000)]
Testcase for r50770.

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

16 years agoWe need to update PHIs containing the exiting block, not the exit block. We really...
Owen Anderson [Tue, 6 May 2008 20:55:16 +0000 (20:55 +0000)]
We need to update PHIs containing the exiting block, not the exit block.  We really should come up with better names for these.

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

16 years agoImprove documentation.
Gordon Henriksen [Tue, 6 May 2008 19:17:01 +0000 (19:17 +0000)]
Improve documentation.

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

16 years agoChange from llvm::SmallSet<std::string> to llvm::StringMap<char>.
Mikhail Glushenkov [Tue, 6 May 2008 18:18:58 +0000 (18:18 +0000)]
Change from llvm::SmallSet<std::string> to llvm::StringMap<char>.

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

16 years agoAdd new edge property combinator: weight.
Mikhail Glushenkov [Tue, 6 May 2008 18:18:20 +0000 (18:18 +0000)]
Add new edge property combinator: weight.

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

16 years agoAdd a help string for the -c option
Mikhail Glushenkov [Tue, 6 May 2008 18:17:42 +0000 (18:17 +0000)]
Add a help string for the -c option

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

16 years agoUpdate documentation to reflect the current state of affairs.
Mikhail Glushenkov [Tue, 6 May 2008 18:17:19 +0000 (18:17 +0000)]
Update documentation to reflect the current state of affairs.

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

16 years agoSome cosmetic changes (change some comments, move code around a bit).
Mikhail Glushenkov [Tue, 6 May 2008 18:16:52 +0000 (18:16 +0000)]
Some cosmetic changes (change some comments, move code around a bit).

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

16 years agoMove test files around a bit - fixes the reported number of test cases.
Mikhail Glushenkov [Tue, 6 May 2008 18:16:20 +0000 (18:16 +0000)]
Move test files around a bit - fixes the reported number of test cases.

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

16 years agoRefactoring: split the function CompilationGraph::Build() into two parts.
Mikhail Glushenkov [Tue, 6 May 2008 18:15:35 +0000 (18:15 +0000)]
Refactoring: split the function CompilationGraph::Build() into two parts.

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

16 years agoUse edge weights to choose the right linker based on input language names.
Mikhail Glushenkov [Tue, 6 May 2008 18:15:12 +0000 (18:15 +0000)]
Use edge weights to choose the right linker based on input language names.

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

16 years agoAdd weights to graph edges. Choose between edges based on their weight.
Mikhail Glushenkov [Tue, 6 May 2008 18:14:24 +0000 (18:14 +0000)]
Add weights to graph edges. Choose between edges based on their weight.

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

16 years agoRemove the UnpackValues() function.
Mikhail Glushenkov [Tue, 6 May 2008 18:13:45 +0000 (18:13 +0000)]
Remove the UnpackValues() function.

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

16 years agoAdd a --linker command-line option, make all tests pass.
Mikhail Glushenkov [Tue, 6 May 2008 18:13:00 +0000 (18:13 +0000)]
Add a --linker command-line option, make all tests pass.

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

16 years agoNaming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
Mikhail Glushenkov [Tue, 6 May 2008 18:12:03 +0000 (18:12 +0000)]
Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.

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

16 years agoAdd two (currently failing) tests.
Mikhail Glushenkov [Tue, 6 May 2008 18:11:21 +0000 (18:11 +0000)]
Add two (currently failing) tests.

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

16 years agoAdd -x option (like in gcc).
Mikhail Glushenkov [Tue, 6 May 2008 18:10:53 +0000 (18:10 +0000)]
Add -x option (like in gcc).

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

16 years agoTake object file as input and handle files with the same name correctly.
Mikhail Glushenkov [Tue, 6 May 2008 18:10:20 +0000 (18:10 +0000)]
Take object file as input and handle files with the same name correctly.

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

16 years agoRename LLVMCCConfigurationEmitter to LLVMCConfigurationEmitter
Mikhail Glushenkov [Tue, 6 May 2008 18:09:29 +0000 (18:09 +0000)]
Rename LLVMCCConfigurationEmitter to LLVMCConfigurationEmitter

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

16 years agoAdd output redirection, rename namespace llvmcc to namespace llvmc.
Mikhail Glushenkov [Tue, 6 May 2008 18:08:59 +0000 (18:08 +0000)]
Add output redirection, rename namespace llvmcc to namespace llvmc.

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

16 years agoMake AutoGenerated.inc depend also on Tools.td and Common.td
Mikhail Glushenkov [Tue, 6 May 2008 18:08:12 +0000 (18:08 +0000)]
Make AutoGenerated.inc depend also on Tools.td and Common.td

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

16 years agoUtilize topological sort in CompilationGraph::Build().
Mikhail Glushenkov [Tue, 6 May 2008 18:07:48 +0000 (18:07 +0000)]
Utilize topological sort in CompilationGraph::Build().

This makes more interesting graph topologies possible. Currently all tests pass,
but more testing is needed.

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

16 years agoAdd TopologicalSort method to CompilationGraph.
Mikhail Glushenkov [Tue, 6 May 2008 18:07:14 +0000 (18:07 +0000)]
Add TopologicalSort method to CompilationGraph.

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

16 years agoDo not require positional arguments when we're only printing out the graph.
Mikhail Glushenkov [Tue, 6 May 2008 17:44:16 +0000 (17:44 +0000)]
Do not require positional arguments when we're only printing out the graph.

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

16 years agoMake ChooseEdge more generic and use it to choose between different toolchains.
Mikhail Glushenkov [Tue, 6 May 2008 17:28:03 +0000 (17:28 +0000)]
Make ChooseEdge more generic and use it to choose between different toolchains.

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

16 years agoRemove unnecessary argument from PassThroughGraph
Mikhail Glushenkov [Tue, 6 May 2008 17:27:37 +0000 (17:27 +0000)]
Remove unnecessary argument from PassThroughGraph

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

16 years agoSmall output formatting fix.
Mikhail Glushenkov [Tue, 6 May 2008 17:27:15 +0000 (17:27 +0000)]
Small output formatting fix.

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

16 years agoAdd inward edge counters to Nodes; Associate JoinLists with JoinTools.
Mikhail Glushenkov [Tue, 6 May 2008 17:26:53 +0000 (17:26 +0000)]
Add inward edge counters to Nodes; Associate JoinLists with JoinTools.

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

16 years agoEnhancements for --view-graph
Mikhail Glushenkov [Tue, 6 May 2008 17:26:14 +0000 (17:26 +0000)]
Enhancements for --view-graph

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

16 years agoSplit the Build function into two parts.
Mikhail Glushenkov [Tue, 6 May 2008 17:25:51 +0000 (17:25 +0000)]
Split the Build function into two parts.

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

16 years agoMake llvmc return 1 when the compilation fails.
Mikhail Glushenkov [Tue, 6 May 2008 17:25:23 +0000 (17:25 +0000)]
Make llvmc return 1 when the compilation fails.

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

16 years agoFirst small tests for llvmc2.
Mikhail Glushenkov [Tue, 6 May 2008 17:24:54 +0000 (17:24 +0000)]
First small tests for llvmc2.

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

16 years agoReturn const char* instead of std::string in Tool classes
Mikhail Glushenkov [Tue, 6 May 2008 17:24:26 +0000 (17:24 +0000)]
Return const char* instead of std::string in Tool classes

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

16 years agoAdd an ability to choose between different edges based on edge properties.
Mikhail Glushenkov [Tue, 6 May 2008 17:23:50 +0000 (17:23 +0000)]
Add an ability to choose between different edges based on edge properties.

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

16 years agoRefactoring: extract method.
Mikhail Glushenkov [Tue, 6 May 2008 17:23:14 +0000 (17:23 +0000)]
Refactoring: extract method.

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

16 years agoAdd new edge properties: parameter_equals, element_in_list, and.
Mikhail Glushenkov [Tue, 6 May 2008 17:22:47 +0000 (17:22 +0000)]
Add new edge properties: parameter_equals, element_in_list, and.

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

16 years agoImplemented switch_on edge property.
Mikhail Glushenkov [Tue, 6 May 2008 17:22:03 +0000 (17:22 +0000)]
Implemented switch_on edge property.

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

16 years agoCosmetic change: if( -> if (
Mikhail Glushenkov [Tue, 6 May 2008 16:37:33 +0000 (16:37 +0000)]
Cosmetic change: if( -> if (

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

16 years agoRemove ExampleWithOpt.td: this file was merged with Example.td.
Mikhail Glushenkov [Tue, 6 May 2008 16:37:12 +0000 (16:37 +0000)]
Remove ExampleWithOpt.td: this file was merged with Example.td.

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

16 years agoMore work on edge properties. Use Edge classes instead of strings in CompilationGraph.
Mikhail Glushenkov [Tue, 6 May 2008 16:36:50 +0000 (16:36 +0000)]
More work on edge properties. Use Edge classes instead of strings in CompilationGraph.

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

16 years agoOngoing work: add an edge typechecker, rudimentary support for edge properties.
Mikhail Glushenkov [Tue, 6 May 2008 16:36:06 +0000 (16:36 +0000)]
Ongoing work: add an edge typechecker, rudimentary support for edge properties.

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

16 years agoConvert internal representation to use DAG. This gives us more flexibility and enable...
Mikhail Glushenkov [Tue, 6 May 2008 16:35:25 +0000 (16:35 +0000)]
Convert internal representation to use DAG. This gives us more flexibility and enables future improvements.

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

16 years agoSmall const-correctness fix
Mikhail Glushenkov [Tue, 6 May 2008 16:34:39 +0000 (16:34 +0000)]
Small const-correctness fix

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

16 years agoCode reorg
Mikhail Glushenkov [Tue, 6 May 2008 16:34:12 +0000 (16:34 +0000)]
Code reorg

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

16 years agoTestcase for PR2292.
Duncan Sands [Tue, 6 May 2008 14:56:40 +0000 (14:56 +0000)]
Testcase for PR2292.

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

16 years agoRemove tar ball from installed directory.
Bill Wendling [Tue, 6 May 2008 08:33:07 +0000 (08:33 +0000)]
Remove tar ball from installed directory.

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

16 years agoFix PR2287. Darwin passes mmx values in register in 64-mode, not Linux.
Evan Cheng [Tue, 6 May 2008 07:23:50 +0000 (07:23 +0000)]
Fix PR2287. Darwin passes mmx values in register in 64-mode, not Linux.

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

16 years agoFix typo.
Devang Patel [Tue, 6 May 2008 05:40:11 +0000 (05:40 +0000)]
Fix typo.

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

16 years agoFix typo and indentation.
Nick Lewycky [Tue, 6 May 2008 04:03:18 +0000 (04:03 +0000)]
Fix typo and indentation.

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

16 years agoFix renamePathOnDisk on Win32, patch from David Leon. This fixes problems with
Nick Lewycky [Tue, 6 May 2008 03:42:21 +0000 (03:42 +0000)]
Fix renamePathOnDisk on Win32, patch from David Leon. This fixes problems with
llvm-ar being unable to rename files.

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

16 years agofix typo Duncan noticed
Chris Lattner [Tue, 6 May 2008 02:31:18 +0000 (02:31 +0000)]
fix typo Duncan noticed

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

16 years agoMatch things like 'armv5tejl-unknown-linux-gnu' for PR2290
Chris Lattner [Tue, 6 May 2008 02:29:28 +0000 (02:29 +0000)]
Match things like 'armv5tejl-unknown-linux-gnu' for PR2290

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

16 years agoMake several variable declarations static.
Dan Gohman [Tue, 6 May 2008 01:53:16 +0000 (01:53 +0000)]
Make several variable declarations static.

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

16 years agoRemove uses of llvm/System/IncludeFile.h that are no longer needed.
Dan Gohman [Tue, 6 May 2008 01:32:53 +0000 (01:32 +0000)]
Remove uses of llvm/System/IncludeFile.h that are no longer needed.

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

16 years agoInstead of enumerating each opcode that isn't handled that
Dan Gohman [Tue, 6 May 2008 00:53:29 +0000 (00:53 +0000)]
Instead of enumerating each opcode that isn't handled that
ComputeMaskedBits handles, just use a 'default:'. This avoids
TargetLowering's list getting out of date with SelectionDAG's.

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

16 years agoCorrect the value of LowBits in srem and urem handling in
Dan Gohman [Tue, 6 May 2008 00:51:48 +0000 (00:51 +0000)]
Correct the value of LowBits in srem and urem handling in
ComputeMaskedBits.

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

16 years agoFix a broken doxygen comment, and reword it for clarity.
Dan Gohman [Tue, 6 May 2008 00:20:10 +0000 (00:20 +0000)]
Fix a broken doxygen comment, and reword it for clarity.

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

16 years agoEnable dead loop elimination.
Owen Anderson [Mon, 5 May 2008 23:38:07 +0000 (23:38 +0000)]
Enable dead loop elimination.

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