Commit Graph

38797 Commits

Author SHA1 Message Date
Tanya Lattner
0561f78a14 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
2008-05-08 21:54:20 +00:00
Chris Lattner
38818b072f store can't read from memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50869 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 21:47:43 +00:00
Mikhail Glushenkov
194a78f149 Add -E and -S options
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50868 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 20:02:36 +00:00
Mikhail Glushenkov
21607fa63c 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
2008-05-08 20:02:03 +00:00
Chris Lattner
76e2e4a2bc 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
2008-05-08 18:26:56 +00:00
Gordon Henriksen
a8a118b68f 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
2008-05-08 17:46:35 +00:00
Chris Lattner
2539e33893 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
2008-05-08 17:37:37 +00:00
Chris Lattner
0ef546e639 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
2008-05-08 17:20:30 +00:00
Chris Lattner
d96288a2ff 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
2008-05-08 17:16:51 +00:00
Devang Patel
d7266d484a Check linkage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50851 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 15:08:39 +00:00
Duncan Sands
43b30a8287 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
2008-05-08 12:33:11 +00:00
Chris Lattner
8c073c04bc new testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50841 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08 04:55:51 +00:00
Chris Lattner
268e7d7a94 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
2008-05-08 04:54:43 +00:00
Evan Cheng
7e2ff77ef0 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
2008-05-08 00:57:18 +00:00
Evan Cheng
687bcb2be0 Add nounwind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50837 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 22:59:08 +00:00
Anton Korobeynikov
0b12ecf6ff Turn StripPointerCast() into a method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50836 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 22:54:15 +00:00
Mikhail Glushenkov
4561ab5d81 Use Doxygen-style comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50833 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 21:50:19 +00:00
Ted Kremenek
1fd2e6d84e 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
2008-05-07 20:04:18 +00:00
Chris Lattner
029840c935 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
2008-05-07 19:53:05 +00:00
Ted Kremenek
fdedd5397d 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
2008-05-07 19:22:36 +00:00
Duncan Sands
671fa97a4b 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
2008-05-07 19:11:09 +00:00
Ted Kremenek
fbd15899b3 Guard for empty strings in CStrInCStrNoCase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50823 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 18:49:31 +00:00
Ted Kremenek
6925f5074f Added CStrInCStrNoCase, a portable implementation of strcasestr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50821 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 18:35:46 +00:00
Chris Lattner
14852f27e7 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
2008-05-07 18:21:13 +00:00
Nick Lewycky
094aa6ce47 Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50805 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-07 06:39:04 +00:00
Evan Cheng
7ebc06bfd8 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
2008-05-07 00:49:28 +00:00
Dan Gohman
42ac929ed9 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
2008-05-07 00:35:55 +00:00
Bill Wendling
69cedcbcec 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
2008-05-07 00:00:34 +00:00
Owen Anderson
77a895e599 Disable loop deletion until the release branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50787 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 23:56:34 +00:00
Bill Wendling
12f33baa8a Removing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50786 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 23:56:22 +00:00
Bill Wendling
ef02b815cb 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
2008-05-06 23:30:02 +00:00
Steve Naroff
bec41b8db3 Update a couple VC++ project files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50780 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 23:14:34 +00:00
Anton Korobeynikov
70e616fa0b 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
2008-05-06 23:09:29 +00:00
Anton Korobeynikov
149a315369 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
2008-05-06 22:52:54 +00:00
Anton Korobeynikov
b04adddd50 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
2008-05-06 22:52:30 +00:00
Owen Anderson
f092b64a49 Testcase for r50770.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50771 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 21:01:34 +00:00
Owen Anderson
8b23bb792e 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
2008-05-06 20:55:16 +00:00
Gordon Henriksen
919852b0e6 Improve documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50768 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 19:17:01 +00:00
Mikhail Glushenkov
e0ff9ae91e 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
2008-05-06 18:18:58 +00:00
Mikhail Glushenkov
29063554d0 Add new edge property combinator: weight.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50765 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:18:20 +00:00
Mikhail Glushenkov
6a6cd729aa 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
2008-05-06 18:17:42 +00:00
Mikhail Glushenkov
77ddce97ad 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
2008-05-06 18:17:19 +00:00
Mikhail Glushenkov
be86712de8 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
2008-05-06 18:16:52 +00:00
Mikhail Glushenkov
2e9e0c2951 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
2008-05-06 18:16:20 +00:00
Mikhail Glushenkov
4c11a62d69 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
2008-05-06 18:15:35 +00:00
Mikhail Glushenkov
76b1b24dc8 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
2008-05-06 18:15:12 +00:00
Mikhail Glushenkov
bb8b58dcf3 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
2008-05-06 18:14:24 +00:00
Mikhail Glushenkov
d83038c960 Remove the UnpackValues() function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50756 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:13:45 +00:00
Mikhail Glushenkov
978d498e40 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
2008-05-06 18:13:00 +00:00
Mikhail Glushenkov
895820da24 Naming fix: LLVMCCConfigurationEmitter -> LLVMCConfigurationEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50754 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-06 18:12:03 +00:00