Commit Graph

72616 Commits

Author SHA1 Message Date
Evan Cheng b39a9fd3ed Add option -licm-const-load to hoist all loads from constant memory.
llvm-svn: 89477
2009-11-20 19:55:37 +00:00
Douglas Gregor 51c538bee4 Teach FixOverloadedFunctionReference to build new expression ASTs rather
than tweaking existing ASTs, since we were (*gasp*) stomping on ASTs
within templates. I'm glad we found this little stick of TNT early...

llvm-svn: 89475
2009-11-20 19:42:02 +00:00
Jim Grosbach 6c3b71195a The verify() call of CPEIsInRange() isn't right for the assertion check of
constant pool ranges, as CPEIsInRange() makes conservative assumptions about
the potential alignment changes from branch adjustments. The verification,
on the other hand, runs after those branch adjustments are made, so the
effects on alignment are known and already taken into account. The sanity
check in verify should check the range directly instead.

llvm-svn: 89473
2009-11-20 19:37:38 +00:00
Dan Gohman ff20377740 Use stripPointerCasts(). Thanks Duncan!
llvm-svn: 89472
2009-11-20 19:33:16 +00:00
David Goodwin 80a03cc0b1 Remove some old experimental code that is no longer needed. Remove additional, speculative scheduling pass as its cost did not translate into significant performance improvement. Minor tweaks.
llvm-svn: 89471
2009-11-20 19:32:48 +00:00
Jakob Stoklund Olesen b4c14ebfbb More consistent labelling of basic blocks in debug output
llvm-svn: 89470
2009-11-20 18:54:59 +00:00
Mike Stump 4d119e49f9 Add testcases for recent checkins.
llvm-svn: 89469
2009-11-20 18:51:28 +00:00
Dan Gohman a8c144d534 Revert the rule that considers comparisons between two pointers in the
same object to be a non-capture; Duncan pointed out a way that such
a comparison could be a capture.

Make the rule that considers a comparison against null more specific,
and only consider noalias return values compared against null. This
still supports test/Transforms/GVN/nonescaping-malloc.ll, and is not
susceptible to the problem Duncan pointed out with noalias arguments.

llvm-svn: 89468
2009-11-20 17:50:21 +00:00
Anders Carlsson 0a66c26191 Fix lifetime of conditional temporaries. Patch by Victor Zverovich!
llvm-svn: 89467
2009-11-20 17:27:56 +00:00
Daniel Dunbar 9c7efbb996 Fix some codegen tests to include positive checks.
llvm-svn: 89465
2009-11-20 17:23:39 +00:00
Daniel Dunbar 69fd86dd44 Add clang -cc1 parsing of CodeGenOptions.
llvm-svn: 89464
2009-11-20 17:23:30 +00:00
Mikhail Glushenkov 5551c207cd Move the handling of CommaSeparated options into ProvideOption.
Makes '--comma-separated val1,val2' mean the same thing as
'--comma-separated=val1,val2' (that is, 'val1' and 'val2' are not lumped
together as 'val1,val2'). Also declutters the main loop a bit.

llvm-svn: 89463
2009-11-20 17:23:17 +00:00
Daniel Dunbar 8cde1d978f clang-cc: Lift setForcedLangOptions out of options initialization.
llvm-svn: 89462
2009-11-20 16:55:31 +00:00
Ken Dyck 33211d9658 Avoid unwanted expansion in macros that paste together INT<n>_C(v) and
UINT<n>_C(v) macros. 

llvm-svn: 89461
2009-11-20 16:49:10 +00:00
Ken Dyck 8dcc21420b Avoid unwanted expansion in macros that paste together INT<n>_MIN, INT<n>_MAX,
and UINT<n>_MAX defintions.

llvm-svn: 89460
2009-11-20 16:44:38 +00:00
Ken Dyck 764a5f3881 Avoid unwanted macro expansion in macros that paste together int<n>_t and
uint<n>_t definitions.

llvm-svn: 89459
2009-11-20 16:37:35 +00:00
David Chisnall bc8bdea183 Fixed crash when using undefined protocols (GNU runtime).
llvm-svn: 89457
2009-11-20 14:50:59 +00:00
Duncan Sands 9e26aac773 Fix PR5563, an expensive checks failure when running on
tests/Transforms/InstCombine/shufflemask-undef.ll.  If
anyone cares, the use of 2*e here (and the equivalent
all over the place in instcombine) seems wrong, though
harmless: it should really be twice the length of the
input vector.  I think shufflevector used to require
that the mask have the same length as the input, but I
don't think that's true any more.  I don't care enough
about vectors to do anything about this...

llvm-svn: 89456
2009-11-20 13:19:51 +00:00
Benjamin Kramer df5280df05 Add a workaround to silence a bogus g++-4.4 -pedantic warning.
driver.cpp:211: warning: ISO C++ forbids zero-size array 'argv'

llvm-svn: 89455
2009-11-20 11:49:06 +00:00
Duncan Sands cc0a0cb4b7 Fix PR5558, which was caused by a wrong fix for PR3393 (see commit 63048),
which was an expensive checks failure due to a bug in the checking.  This
patch in essence reverts the original fix for PR3393, and refixes it by a
tweak to the way expensive checking is done.

llvm-svn: 89454
2009-11-20 10:45:10 +00:00
Benjamin Kramer 7d875c7e7e Fix typo GCC 4.3 warned about.
llvm-svn: 89453
2009-11-20 10:03:00 +00:00
Benjamin Kramer e986c44a9b Try to work around grep's "Binary file (standard input) matches" complaints seen
on ppc buildbot.

llvm-svn: 89452
2009-11-20 09:53:25 +00:00
Zhongxing Xu adfd1a2e8b no need to cast.
llvm-svn: 89451
2009-11-20 06:14:56 +00:00
Eli Friedman 564048e692 Fix a couple minor memory leaks.
llvm-svn: 89450
2009-11-20 05:53:06 +00:00
Ted Kremenek a4f7c180ae Add simple static analyzer checker to check for sending 'release', 'retain', etc. directly to a class. Fixes <rdar://problem/7252064>.
llvm-svn: 89449
2009-11-20 05:27:05 +00:00
Ted Kremenek c1f161c012 Unused ivar checker: ivars referenced by lexically nested functions should not be flagged as unused. Fixes <rdar://problem/7254495>.
llvm-svn: 89448
2009-11-20 04:31:57 +00:00
Zhongxing Xu 1aec3c0427 No need to pass the state argument explicitly.
llvm-svn: 89447
2009-11-20 04:09:56 +00:00
Zhongxing Xu ab0ae2139a Revert r89437 and add a comment.
llvm-svn: 89446
2009-11-20 03:50:46 +00:00
Daniel Dunbar fa559f46c4 Fix -march= name for x86-64.
llvm-svn: 89445
2009-11-20 02:52:08 +00:00
Dan Gohman 20c8ab655e Fix fast-isel to avoid selecting the return instruction if a
tail call has been encountered.

llvm-svn: 89444
2009-11-20 02:51:26 +00:00
Jim Grosbach fc81352e3f Remove verifySizes() since it's not adding much value.
llvm-svn: 89443
2009-11-20 02:32:06 +00:00
Mike Stump d8d26d06a5 Implement throw d, where d is a class type that requires copy
construction.  WIP.

llvm-svn: 89442
2009-11-20 02:31:07 +00:00
Douglas Gregor 3153da7154 Don't build an explicit conversion to a reference type
llvm-svn: 89441
2009-11-20 02:31:03 +00:00
Evan Cheng bbd50b0f78 Also CSE non-pic load from constant pools.
llvm-svn: 89440
2009-11-20 02:10:27 +00:00
Dan Gohman f4fe57ad90 Add an experimental option to run gep-splitting and no-load GVN
just before codegen.

llvm-svn: 89439
2009-11-20 02:03:44 +00:00
Mike Stump 4d7a07bdaf Handle throw d, where d is a class type but only has a trivial copy
constructor.  WIP.

llvm-svn: 89438
2009-11-20 01:57:39 +00:00
Zhongxing Xu 6d9a942174 It's unnecessary to check for unknown at this point.
llvm-svn: 89437
2009-11-20 01:56:48 +00:00
Daniel Dunbar f7535121a2 Driver: Add parsing for TargetOptions to CompilerInvocation::CreateFromArgs.
llvm-svn: 89435
2009-11-20 01:46:44 +00:00
Dan Gohman 6d919f1613 Simplify this code; it's not necessary to check isIdentifiedObject here
because if the results from getUnderlyingObject match, the values must
be from the same underlying object, even if we don't know what that
object is.

llvm-svn: 89434
2009-11-20 01:34:03 +00:00
Daniel Dunbar c5d28f2ea9 Ignore -Wstrict-overflow={3,4,5} for now.
llvm-svn: 89433
2009-11-20 01:31:27 +00:00
Ted Kremenek a96d02c76b Really fix test case.
llvm-svn: 89430
2009-11-20 01:20:12 +00:00
Ted Kremenek 4b412f51df Fix test case.
llvm-svn: 89429
2009-11-20 01:19:22 +00:00
Jakob Stoklund Olesen 2bbeaa8774 Add MachineBasicBlock::getName, and use it in place of getBasicBlock()->getName.
Fix debug code that assumes getBasicBlock never returns NULL.

llvm-svn: 89428
2009-11-20 01:17:03 +00:00
Dan Gohman 62167b9516 Teach getSmallConstantTripMultiple about Shl operators.
llvm-svn: 89426
2009-11-20 01:09:34 +00:00
Douglas Gregor ee9067c51f When we have a non-dependent expression such as
A::f

that occurs within a non-static member function with a type-dependent
"this", don't consider this to be a case for introduction of an
implicit "(*this)." to refer to a specific member function unless we
know (at template definition time) that A is a base class of *this.

There is some disagreement here between GCC, EDG, and Clang about the
handling of this case. I believe that Clang now has the correct,
literal interpretation of the standard, but have asked for
clarification (c++std-core-15483).

llvm-svn: 89425
2009-11-20 00:59:20 +00:00
Mike Stump d1782cc478 Add suport for throw;. WIP.
llvm-svn: 89424
2009-11-20 00:56:31 +00:00
Evan Cheng 81a2851bcb Fix codegen of conditional move of immediates. We were not making use of the immediate forms of cmov instructions at all.
llvm-svn: 89423
2009-11-20 00:54:03 +00:00
Lang Hames c6e434573c Removed references to LiveStacks from Spiller.* . They're no longer needed.
llvm-svn: 89422
2009-11-20 00:53:30 +00:00
Dan Gohman 91449224e8 Refine the capture tracking rules for comparisons to be more
careful about crazy methods of capturing pointers using comparisons.
Comparisons of identified objects with null in the default address
space are not captures. And, comparisons of two pointers within the
same identified object are not captures.

llvm-svn: 89421
2009-11-20 00:50:47 +00:00
Mike Stump 18fc44dfd3 Fix rtti generation for throws. WIP.
llvm-svn: 89420
2009-11-20 00:43:57 +00:00