Commit Graph

69496 Commits

Author SHA1 Message Date
Devang Patel
551e112e99 Encode long double.
llvm-svn: 83912
2009-10-12 22:28:31 +00:00
Douglas Gregor
ca027af608 Permit explicit specialization of member functions of class templates
that are declarations (rather than definitions). Also, be sure to set
the access specifiers properly when instantiating the declarations of
member function templates.

llvm-svn: 83911
2009-10-12 22:27:17 +00:00
John McCall
e724ae92a8 More appropriate API usage.
llvm-svn: 83910
2009-10-12 22:25:59 +00:00
Evan Cheng
f815861591 Make licm debug message readable.
llvm-svn: 83908
2009-10-12 22:25:23 +00:00
John McCall
d5707abdfd Implement -Wparentheses: warn about using assignments in contexts that require
conditions.  Add a fixit to insert the parentheses.  Also fix a very minor
possible memory leak in 'for' conditions.

Fixes PR 4876 and rdar://problem/7289172

llvm-svn: 83907
2009-10-12 21:59:07 +00:00
Bob Wilson
3250e7769f Change CreateNewWater method to return NewMBB by reference.
llvm-svn: 83905
2009-10-12 21:39:43 +00:00
Douglas Gregor
2210c9cd6e Test explicit specializations of static data members that are declarations, not definitions
llvm-svn: 83904
2009-10-12 21:37:59 +00:00
Bob Wilson
cc121aa750 Last week, ARMConstantIslandPass was failing to converge for the
MultiSource/Benchmarks/MiBench/automotive-susan test.  The failure has
since been masked by an unrelated change (just randomly), so I don't have
a testcase for this now.  Radar 7291928.

The situation where this happened is that a constant pool entry (CPE) was
placed at a lower address than the load that referenced it.  There were in
fact 2 CPEs placed at adjacent addresses and referenced by 2 loads that were
close together in the code.  The distance from the loads to the CPEs was
right at the limit of what they could handle, so that only one of the CPEs
could be placed within range.  On every iteration, the first CPE was found
to be out of range, causing a new CPE to be inserted.  The second CPE had
been in range but the newly inserted entry pushed it too far away.  Thus the
second CPE was also replaced by a new entry, which in turn pushed the first
CPE out of range.  Etc.

Judging from some comments in the code, the initial implementation of this
pass did not support CPEs placed _before_ their references.  In the case
where the CPE is placed at a higher address, the key to making the algorithm
terminate is that new CPEs are only inserted at the end of a group of adjacent
CPEs.  This is implemented by removing a basic block from the "WaterList"
once it has been used, and then adding the newly inserted CPE block to the
list so that the next insertion will come after it.  This avoids the ping-pong
effect where CPEs are repeatedly moved to the beginning of a group of
adjacent CPEs.  This does not work when going backwards, however, because the
entries at the end of an adjacent group of CPEs are closer than the CPEs
earlier in the group.

To make this pass terminate, we need to maintain a property that changes can
only happen in some sort of monotonic fashion.  The fix used here is to require
that the CPE for a particular constant pool load can only move to lower
addresses.  This is a very simple change to the code and should not cause
any significant degradation in the results.

llvm-svn: 83902
2009-10-12 21:23:15 +00:00
Douglas Gregor
a2fe1fe208 Yet another test for explicit specialization, this one involving linkage
llvm-svn: 83901
2009-10-12 21:21:22 +00:00
Anders Carlsson
1d116976b4 Store the key function of a record decl inside CGRecordLayout.
llvm-svn: 83900
2009-10-12 21:16:22 +00:00
Ted Kremenek
289ae4f454 Use a BumpPtrAllocator to allocate all aspects of CFG, including CFGBlocks, successor and predecessor vectors, etc.
Speedup: when doing 'clang-cc -analyze -dump-cfg' (without actual printing, just
CFG building) on the amalgamated SQLite source (all of SQLite in one source
file), runtime reduced by 9%.

This fixes: <rdar://problem/7250745>

llvm-svn: 83899
2009-10-12 20:55:07 +00:00
Mike Stump
b9a9a7c0ad Fixup windows include paths. Patch by John Thompson.
llvm-svn: 83898
2009-10-12 20:50:45 +00:00
Bob Wilson
e4adae267e Another minor clean-up.
llvm-svn: 83897
2009-10-12 20:45:53 +00:00
Douglas Gregor
1fc79dda69 More tests for explicit template specialization
llvm-svn: 83896
2009-10-12 20:45:50 +00:00
Chris Lattner
bf43817408 allow this testcase to pass with recent changes. The test hasn't been
producing any stores at all for a long time, but ".store." was in some
IR instruction names until recently.  This removal caused the test to
start failing.  Just make it reject any stores.

llvm-svn: 83895
2009-10-12 20:42:35 +00:00
Bob Wilson
196bf32ab0 Remove redundant parameter.
llvm-svn: 83894
2009-10-12 20:37:23 +00:00
Douglas Gregor
00bb0cbfa5 Add test for last commit
llvm-svn: 83893
2009-10-12 20:23:10 +00:00
Douglas Gregor
06db9f50a2 Diagnose the declaration of explicit specializations after an implicit
instantiation has already been required. To do so, keep track of the
point of instantiation for anything that can be instantiated.

llvm-svn: 83890
2009-10-12 20:18:28 +00:00
Fariborz Jahanian
e7196431c1 Handle built-in unary operators when reporting ambiguities.
wip - To prune excessive reporting.

llvm-svn: 83889
2009-10-12 20:11:40 +00:00
Anders Carlsson
bcee4a7b6b Fix test.
llvm-svn: 83888
2009-10-12 20:06:34 +00:00
Anders Carlsson
a1b54fdbe1 Even more devirtualization cleverness.
llvm-svn: 83886
2009-10-12 19:59:15 +00:00
Ted Kremenek
a81b3256a4 Allow BumpVectorContext to conditionally own the underlying BumpPtrAllocator.
llvm-svn: 83884
2009-10-12 19:54:17 +00:00
Anders Carlsson
2a01709204 More devirtualization improvements.
llvm-svn: 83883
2009-10-12 19:51:33 +00:00
Anders Carlsson
b61301f353 Devirtualize calls on temporaries. A().f() for example.
llvm-svn: 83882
2009-10-12 19:45:47 +00:00
Anders Carlsson
d7432dfb0a Factor out devirtualization checking into a separate function and make it handle references correctly.
llvm-svn: 83880
2009-10-12 19:41:04 +00:00
Bob Wilson
3a7326e705 Use early exit to reduce indentation.
llvm-svn: 83874
2009-10-12 19:04:03 +00:00
Bob Wilson
3af34312d4 Change to return a value by reference.
llvm-svn: 83873
2009-10-12 19:01:12 +00:00
Bob Wilson
c7a3cf4066 Add a typedef for an iterator.
llvm-svn: 83872
2009-10-12 18:52:13 +00:00
Dale Johannesen
06243d7bf2 Revert the kludge in 76703. I got a clean
bootstrap of FSF-style PPC, so there is some
reason to believe the original bug (which was
never analyzed) has been fixed, probably by
82266.

llvm-svn: 83871
2009-10-12 18:49:00 +00:00
Dale Johannesen
4c9f0e8f53 Fix warning.
llvm-svn: 83870
2009-10-12 18:45:32 +00:00
Fariborz Jahanian
65694b413d Use CanQualType (instead of QualType) to store collection of visible
canonical conversion types.

llvm-svn: 83869
2009-10-12 18:36:50 +00:00
Chris Lattner
6208bc171a fix validation error pointed out by gabor (and the w3c :)
llvm-svn: 83868
2009-10-12 18:33:33 +00:00
Chris Lattner
7c6e0f22ad Improve bugpoint doc, patch by Timo Lindfors!
llvm-svn: 83865
2009-10-12 18:12:47 +00:00
Fariborz Jahanian
574de2c5a4 If built-in operators could not be selected because of ambiguity in
user-defined type conversions, issue list of ambiguites in addition 
to the diagnostic. So, clang now issues the following:

b.cpp:19:19: error: left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'struct C1'
        int i = c1->*pmf;
                ~~^
b.cpp:19:19: note: because of ambiguity in conversion of 'struct C1' to 'struct E *'
b.cpp:5:5: note: candidate function
    operator E*();
    ^
b.cpp:11:5: note: candidate function
    operator E*();
    ^

llvm-svn: 83862
2009-10-12 17:51:19 +00:00
Jeffrey Yasskin
406ac811ab Fix http://llvm.org/PR5160, to let CallbackVHs modify other ValueHandles on the
same Value without breaking things.

llvm-svn: 83861
2009-10-12 17:43:32 +00:00
Gabor Greif
001d74c312 another bunch of <tt>s
llvm-svn: 83860
2009-10-12 16:50:25 +00:00
Dan Gohman
32eed95a78 Remove a redundant member variable.
llvm-svn: 83857
2009-10-12 16:44:10 +00:00
Dan Gohman
a8bacea11b Delete some obsolete declarations.
llvm-svn: 83856
2009-10-12 16:43:44 +00:00
Axel Naumann
a7e200e6f7 Don't install Makefiles nor tablegen input in include/.
Fix exclusion of .tmp, which in turn enables installation of $(PROJ_OBJ_ROOT)/tools/clang/include/*.inc.

llvm-svn: 83855
2009-10-12 16:42:18 +00:00
Gabor Greif
af28f0be41 even more <tt>s
llvm-svn: 83854
2009-10-12 16:40:25 +00:00
Dan Gohman
a698d7ac3c Don't forget to mark RAX as live-out of the function when arranging for
it to hold the address of an sret return value, for x86-64 ABI purposes.

Also, fix the test that was originally intended to test this to actually
test it, using FileCheck.

llvm-svn: 83853
2009-10-12 16:36:12 +00:00
Gabor Greif
a80c5df3ea more typewriter face
llvm-svn: 83852
2009-10-12 16:27:44 +00:00
Gabor Greif
1a093f3022 fix three validation errors, I leave the fourth to sabre :-)
llvm-svn: 83851
2009-10-12 16:13:36 +00:00
Gabor Greif
aa9b0ba7db set some options in typewriter font
llvm-svn: 83850
2009-10-12 16:08:52 +00:00
Benjamin Kramer
0f4203861f Documentation: Perform automated correction of common typos.
llvm-svn: 83849
2009-10-12 14:46:08 +00:00
Torok Edwin
7630f105a1 Fix typo, patch from Timo Juhani Lindfors.
llvm-svn: 83848
2009-10-12 13:37:29 +00:00
Edward O'Callaghan
e4ab8eacf7 Typo in AddGnuCPlusPlusIncludePaths.
llvm-svn: 83847
2009-10-12 12:02:47 +00:00
Benjamin Kramer
258c7fa33a Eliminate some redundant llvm-as calls.
llvm-svn: 83837
2009-10-12 09:31:55 +00:00
Edward O'Callaghan
1c591f74c7 Missing CHECK: lines makes test exit abnormally.
llvm-svn: 83835
2009-10-12 09:01:26 +00:00
Edward O'Callaghan
8720e8c8f3 FileCheck not CheckFile, oops.
llvm-svn: 83834
2009-10-12 08:51:28 +00:00