1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

43703 Commits

Author SHA1 Message Date
Dan Gohman
88a0d4277d Fix the comment for lltok::backslash.
llvm-svn: 61949
2009-01-08 22:18:13 +00:00
Dan Gohman
831bc48415 Fix the path to llvm/Assembly/Parser.h in a comment.
llvm-svn: 61948
2009-01-08 22:17:05 +00:00
Dan Gohman
a3b6f1c02d Correct the form of the atomic opcode names in a comment.
llvm-svn: 61947
2009-01-08 22:14:50 +00:00
Dale Johannesen
4c25cb12ea 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.

llvm-svn: 61946
2009-01-08 21:45:23 +00:00
Duncan Sands
51e12762d5 Use mayBeOverridden here, in anticipation of the
day when more linkage types will be handled.

llvm-svn: 61944
2009-01-08 20:55:49 +00:00
Chris Lattner
5a8a2b046d 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.

llvm-svn: 61934
2009-01-08 19:28:38 +00:00
Chris Lattner
e16e141b70 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()
                                      ^
llvm-svn: 61933
2009-01-08 19:05:36 +00:00
Chris Lattner
456f75a745 remove some exclusions that don't exist anymore.
llvm-svn: 61932
2009-01-08 19:02:03 +00:00
Chris Lattner
853f4978ea this testcase is huge and hasn't regressed ever, I don't think it is worth keeping.
llvm-svn: 61931
2009-01-08 19:01:45 +00:00
Devang Patel
97863f513c Add DebugInfo based APIs to record source line info.
llvm-svn: 61928
2009-01-08 17:19:22 +00:00
Misha Brukman
ae1566f744 * Moved author attribution to CREDITS.TXT
* Removed trailing whitespace

llvm-svn: 61927
2009-01-08 16:40:25 +00:00
Misha Brukman
cada42bb4e * Alphabetized #includes
* Removed trailing whitespace

llvm-svn: 61926
2009-01-08 15:50:22 +00:00
Bill Wendling
282eca1712 Some generic clean-ups. Also make the StringMapEntryInitializer specialization apply only to the tests that are actually testing it.
llvm-svn: 61923
2009-01-08 09:31:36 +00:00
Bill Wendling
71f808dfa2 * 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.

llvm-svn: 61922
2009-01-08 08:26:46 +00:00
Chris Lattner
759c4201e9 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.

llvm-svn: 61921
2009-01-08 07:58:23 +00:00
Bill Wendling
e6c3d21d3c 80-column violation fix.
llvm-svn: 61919
2009-01-08 07:35:39 +00:00
Chris Lattner
fe3e114d7a add some more crazy strlen and memcpy stuff I noticed in spec.
llvm-svn: 61918
2009-01-08 07:34:55 +00:00
Chris Lattner
304f33297f add some notes about strlen craziness in eon.
llvm-svn: 61917
2009-01-08 06:52:57 +00:00
Misha Brukman
83a92e0e1e Remove extra blank line and space.
llvm-svn: 61916
2009-01-08 06:11:51 +00:00
Chris Lattner
60a03a2f36 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).

llvm-svn: 61915
2009-01-08 05:42:05 +00:00
Misha Brukman
4044287626 * Added unittests for StringMap
* Fixed but in StringMap::clear()
* Removed trailing whitespace

Original patch by Talin.

llvm-svn: 61914
2009-01-08 04:48:20 +00:00
Devang Patel
3125e21ae4 Add APIs to record regions and variables.
Again, shamelessly copied from MMI.

llvm-svn: 61912
2009-01-08 02:49:34 +00:00
Devang Patel
0db006ea38 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.

llvm-svn: 61908
2009-01-08 02:33:41 +00:00
Misha Brukman
c6d4c08346 * Fixed spelling of "sentinel"
* Removed trailing whitespace

llvm-svn: 61907
2009-01-08 02:21:23 +00:00
Misha Brukman
abc60e4b7d Use VIM's built-in shorthand for whitespace in regex.
llvm-svn: 61906
2009-01-08 02:17:30 +00:00
Misha Brukman
8399c15510 Be sure to ignore the end-of-line character when considering trailing
whitespace.

llvm-svn: 61905
2009-01-08 02:16:13 +00:00
Misha Brukman
69aa9d73f0 Removed trailing whitespace.
llvm-svn: 61904
2009-01-08 02:11:55 +00:00
Bob Wilson
4a5897fc16 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.

llvm-svn: 61903
2009-01-08 01:56:06 +00:00
Oscar Fuentes
b7928f1380 CMake: removed lib/VMCore/DebugInfoBuilder.cpp.
llvm-svn: 61900
2009-01-08 00:18:52 +00:00
Bob Wilson
1d703391e7 Assert that VectorType::getTruncatedElementVectorType is not used with
odd bit-width vector elements.  Add a check in the verifier for this also.

llvm-svn: 61899
2009-01-07 23:44:27 +00:00
Chris Lattner
0e3c4e89eb remove DebugInfoBuilder, it has been subsumed by Analysis/DebugInfo.h
llvm-svn: 61898
2009-01-07 23:25:06 +00:00
Misha Brukman
6338af14f6 Fix off-by-one error in traversing an array; this fixes a test.
The error was reported by gcc-4.3.0 during compilation.

llvm-svn: 61896
2009-01-07 23:07:29 +00:00
Gabor Greif
e3326b1e14 revert to functionally equivalent formulation
llvm-svn: 61895
2009-01-07 23:07:22 +00:00
Gabor Greif
31343a0b10 use the obvious getters
llvm-svn: 61893
2009-01-07 22:39:29 +00:00
Dan Gohman
3579548f68 Remove redundant 'else's. No functionality change.
llvm-svn: 61891
2009-01-07 22:30:55 +00:00
Dan Gohman
ea82309aa7 Add empty() methods for register def lists.
llvm-svn: 61890
2009-01-07 22:28:56 +00:00
Misha Brukman
c3fe8ccf6d Minor cleanup for unittest:
* Fixed {copy,assignment} constructor test names
* s/EXPECT_EQ(true, ...)/ASSERT_TRUE(...)/

Patch by Talin.

llvm-svn: 61883
2009-01-07 21:13:53 +00:00
Duncan Sands
3571fbfba8 Whitespace - correct formatting.
llvm-svn: 61879
2009-01-07 20:01:06 +00:00
Duncan Sands
a254acd1d3 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.

llvm-svn: 61876
2009-01-07 19:39:06 +00:00
Oscar Fuentes
b37acd2804 CMake: replace `rm' with portable invocations of cmake.
Based on a bug report by Yonggang Luo.

llvm-svn: 61875
2009-01-07 19:24:44 +00:00
Duncan Sands
ec12740e7a Reorder these.
llvm-svn: 61873
2009-01-07 19:17:02 +00:00
Duncan Sands
2a797fc19a Use a switch rather than a sequence of "isa" tests.
llvm-svn: 61872
2009-01-07 19:10:21 +00:00
Duncan Sands
de5d7e1415 The verifier checks that the aliasee is not null.
llvm-svn: 61870
2009-01-07 18:45:53 +00:00
Chris Lattner
8adf14ea21 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.

llvm-svn: 61853
2009-01-07 08:11:13 +00:00
Chris Lattner
794f7e91f4 Factor a bunch of code out into a helper method.
llvm-svn: 61852
2009-01-07 07:18:45 +00:00
Chris Lattner
1a9f7818cd use continue to simplify code and reduce nesting, no functionality
change.

llvm-svn: 61851
2009-01-07 06:39:58 +00:00
Chris Lattner
f4d53950be Get TargetData once up front and cache as an ivar instead of
requerying it all over the place.

llvm-svn: 61850
2009-01-07 06:34:28 +00:00
Chris Lattner
c7b8b2a16d Use the hasAllZeroIndices predicate to simplify some
code, no functionality change.

llvm-svn: 61849
2009-01-07 06:25:07 +00:00
Evan Cheng
a70ecc2f51 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.

llvm-svn: 61847
2009-01-07 02:08:57 +00:00
Chris Lattner
f6de7aa2c9 add a testcase.
llvm-svn: 61845
2009-01-07 01:48:08 +00:00