John McCall
644a4181c9
Implement -Wsign-compare, or at least the actual comparison part of it.
...
Conditional operands are next.
Fixes part of rdar://problem/7289584.
llvm-svn: 86083
2009-11-05 00:40:04 +00:00
Bob Wilson
90d0b82e12
Attempt again to fix buildbot failures: make expected output less specific
...
and compile with -mtriple to specify *-apple-darwin targets.
llvm-svn: 86081
2009-11-05 00:30:35 +00:00
David Goodwin
28ba4f27d1
Correctly add chain dependencies around calls and unknown-side-effect instructions.
...
llvm-svn: 86080
2009-11-05 00:16:44 +00:00
Douglas Gregor
01df946664
Make sure to grab CVR qualifiers from the canonical type. ARGH!
...
llvm-svn: 86079
2009-11-05 00:07:36 +00:00
Victor Hernandez
492ed30a32
Update CreateMalloc so that its callers specify the size to allocate:
...
MallocInst-autoupgrade users use non-TargetData-computed allocation sizes.
Optimization uses use TargetData to compute the allocation size.
Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays.
Extend getMallocType() to support malloc calls that have non-bitcast uses.
Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly.
Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use.
Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use.
Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes.
llvm-svn: 86077
2009-11-05 00:03:03 +00:00
Daniel Dunbar
d0ba0e6108
Kill PreprocessorFactory, which was both morally repugnant and totally unused.
...
llvm-svn: 86076
2009-11-04 23:56:25 +00:00
Edward O'Callaghan
8f40ca3b8f
Fix x86/x64 on Linux, Credit to Rafael Espindola.
...
llvm-svn: 86075
2009-11-04 23:52:51 +00:00
Devang Patel
f05d57283e
While calculating original type size for a derived type, handle type variants encoded as DIDerivedType appropriately.
...
This improves bitfield support.
llvm-svn: 86073
2009-11-04 23:48:00 +00:00
Daniel Dunbar
a5beced60e
Turn if chain into switch.
...
llvm-svn: 86071
2009-11-04 23:41:40 +00:00
Daniel Dunbar
14f00d2e10
Tweak formatting.
...
llvm-svn: 86070
2009-11-04 23:41:27 +00:00
Jim Grosbach
31569240c6
Grammar.
...
llvm-svn: 86068
2009-11-04 23:20:40 +00:00
Chris Lattner
a09062758b
improve DSE when TargetData is not around, based on work by
...
Hans Wennborg!
llvm-svn: 86067
2009-11-04 23:20:12 +00:00
Douglas Gregor
b184f0d32e
When instantiating a MemberExpr, be sure to instantiate the
...
explicitly-specified template arguments, too!
llvm-svn: 86066
2009-11-04 23:20:05 +00:00
John McCall
c90f6d76bd
Comments, formatting. Based on patch by Brandon Pearcy!
...
llvm-svn: 86065
2009-11-04 23:13:52 +00:00
Jim Grosbach
5833df9bde
Now that the memory leak from McCat/08-main has been fixed (86056), re-enable
...
aggressive testing of dynamic stack alignment.
Note that this is off by default, and enabled for LLCBETA nightly results.
llvm-svn: 86064
2009-11-04 23:11:07 +00:00
Chris Lattner
b0966de585
A simple reordering of the definitions in stdint.h and
...
introduces no new function changes. Patch by Ken Dyck!
llvm-svn: 86062
2009-11-04 23:03:18 +00:00
John McCall
e22a04aba9
Diagnose using a field to initialize itself. Patch by Brandon Pearcy!
...
llvm-svn: 86061
2009-11-04 23:02:40 +00:00
Douglas Gregor
41127188ac
When starting a C++ member access expression, make sure to compute the
...
type of the object even when it is dependent. Specifically, this makes
sure that we get the right type for "this->", which is important when
performing name lookup into this scope to determine whether an
identifier or operator-function-id is a template name.
llvm-svn: 86060
2009-11-04 22:49:18 +00:00
Chris Lattner
b689d0c95e
ignore two new -W flags, patch by Tom Jablin!
...
llvm-svn: 86059
2009-11-04 22:47:56 +00:00
Jim Grosbach
2c7fd8f1db
If a function has no stack frame at all, dynamic realignment isn't necessary.
...
llvm-svn: 86057
2009-11-04 22:41:51 +00:00
Jim Grosbach
cc58cc1d56
dynamic stack realignment necessitates scanning the floating point callee-
...
saved instructions even if no stack adjustment for those saves is needed.
llvm-svn: 86056
2009-11-04 22:41:00 +00:00
Douglas Gregor
b082bab69e
Give DeclarationName's operator< a more predictable, useful ordering
...
llvm-svn: 86055
2009-11-04 22:24:30 +00:00
Devang Patel
67f56f08c2
Fix DW_AT_data_member_location for bit-fields. It points to the location of annonymous field that covers respective field.
...
llvm-svn: 86054
2009-11-04 22:06:12 +00:00
John Thompson
f174268a1f
Fixed for running on Windows.
...
llvm-svn: 86053
2009-11-04 21:52:17 +00:00
Douglas Gregor
4d0c38ad95
Fix a little canonical-types issue with non-type template arguments.
...
Fixes PR5349.
llvm-svn: 86052
2009-11-04 21:50:46 +00:00
Bob Wilson
f84f7105f7
Add PowerPC codegen for indirect branches.
...
llvm-svn: 86050
2009-11-04 21:31:18 +00:00
Lang Hames
289b8a2bd9
Handle empty/tombstone keys for LiveIndex more cleanly. Check for index sanity when constructing index list entries.
...
llvm-svn: 86049
2009-11-04 21:24:15 +00:00
Daniel Dunbar
181aaee165
InitializePreprocessor cannot fail.
...
llvm-svn: 86048
2009-11-04 21:13:15 +00:00
Daniel Dunbar
b27ec09a7e
Move -undef flag into PreprocessorInitOptions
...
llvm-svn: 86047
2009-11-04 21:13:02 +00:00
Duncan Sands
d732f396a2
A value is only assigned to errno if NumRead equals -1, so do
...
not reason based on errno if NumRead has a different value.
llvm-svn: 86046
2009-11-04 20:50:23 +00:00
Bob Wilson
e8ca96cf24
Fix broken test.
...
llvm-svn: 86045
2009-11-04 20:04:11 +00:00
Eric Christopher
9196f0c0e8
Add some options to disable various code gen optimizations.
...
llvm-svn: 86044
2009-11-04 19:57:50 +00:00
Devang Patel
5d3fe2fc77
Array element size does not match array size but array is not a bitfield.
...
llvm-svn: 86043
2009-11-04 19:37:40 +00:00
Bob Wilson
16f60b9216
Add test for ARM indirectbr codegen.
...
llvm-svn: 86042
2009-11-04 19:25:34 +00:00
Jakob Stoklund Olesen
c7cfc94bcc
Print out an informative comment for KILL instructions.
...
The KILL pseudo-instruction may survive to the asm printer pass, just like the IMPLICIT_DEF. Print the KILL as a comment instead of just leaving a blank line in the output.
With -asm-verbose=0, a blank line is printed, like IMPLICIT?DEF.
llvm-svn: 86041
2009-11-04 19:24:37 +00:00
Fariborz Jahanian
18bc195473
Add code gen for pointer-to-member function in
...
ctor's initializer. Fixes pr5178.
llvm-svn: 86040
2009-11-04 19:13:37 +00:00
Chris Lattner
762b56fa8c
Fix an iterator invalidation bug that happens when a hashtable
...
resizes in IPSCCP. This fixes PR5394.
llvm-svn: 86036
2009-11-04 18:57:42 +00:00
Douglas Gregor
3552259059
Properly replace (cxxscope, template-id) annotation tokens with a
...
single typename annotation token when backtracing. Fixes PR5350.
llvm-svn: 86034
2009-11-04 18:18:19 +00:00
Fariborz Jahanian
09cc10f9f8
This patch extends CleanupScope to support destruction
...
of array objects on block exit. Patch is by Anders Calrsson.
llvm-svn: 86032
2009-11-04 17:57:40 +00:00
Douglas Gregor
2de8f4149e
Don't try to check the initialization of fields with dependent
...
types. Fixes PR5352.
Fariborz, please review.
llvm-svn: 86031
2009-11-04 17:16:11 +00:00
Douglas Gregor
615ac67fb8
Store the unresolved class type in MemberPointerType's Class field,
...
from Peter Collingbourne!
llvm-svn: 86030
2009-11-04 16:49:01 +00:00
Chris Lattner
b73beb36f5
this test has started failing due to an optimizer change. Clang tests
...
should only look at -O0 IR output not -O3 assembly output. XFAIL it for
now.
llvm-svn: 86029
2009-11-04 16:37:13 +00:00
Douglas Gregor
e7b5f81ba5
Eliminate the "old" ways of parsing operator-function-ids and
...
conversion-function-ids; all clients have moved on to
ParseUnqualifiedId.
llvm-svn: 86028
2009-11-04 16:32:12 +00:00
Douglas Gregor
220f4277bd
Switch parsing of using declarations over to ParseUnqualifiedId.
...
llvm-svn: 86027
2009-11-04 16:30:06 +00:00
Evan Cheng
531045d554
Look for llvm-gcc under /Developer/usr/bin first.
...
llvm-svn: 86023
2009-11-04 08:36:50 +00:00
Evan Cheng
95bdc5d899
RangeIsDefinedByCopyFromReg() should check for subreg_to_reg, insert_subreg,
...
and extract_subreg as a "copy" that defines a valno.
Also fixes a typo. These two issues prevent a simple subreg coalescing from
happening before.
llvm-svn: 86022
2009-11-04 08:33:14 +00:00
Chris Lattner
cb3c64ee3c
move two functions up higher in the file. Delete a useless argument
...
to EmitGEPOffset.
Implement some new transforms for optimizing
subtracts of two pointer to ints into the same vector. This happens
for C++ iterator idioms for example, stringmap takes a const char*
that points to the start and end of a string. Once inlined, we want
the pointer difference to turn back into a length.
This is rdar://7362831.
llvm-svn: 86021
2009-11-04 08:05:20 +00:00
Chris Lattner
e3cdf2ed3b
filecheckize this test.
...
llvm-svn: 86020
2009-11-04 07:57:05 +00:00
Evan Cheng
c63943018f
The .n suffix must go after the predicate.
...
llvm-svn: 86019
2009-11-04 07:38:48 +00:00
John McCall
4c98fd8953
Preserve type source information in sizeof/alignof expressions, and pass it
...
through to indexing.
llvm-svn: 86018
2009-11-04 07:28:41 +00:00