Commit Graph

59897 Commits

Author SHA1 Message Date
Daniel Dunbar 29f36b4c9a Silence a Release-Asserts warning.
llvm-svn: 72013
2009-05-18 16:48:48 +00:00
Dan Gohman 14d1339579 Rename UseTy to AccessTy, for consistency with getAccessType, and to
avoid ambiguity with the word "use" in IVStrideUse.

llvm-svn: 72012
2009-05-18 16:45:28 +00:00
Daniel Dunbar a8c1658619 Silence Release-Asserts warnings.
llvm-svn: 72011
2009-05-18 16:43:04 +00:00
Dan Gohman 6350296efc Teach ScalarEvolution to recognize x^-1 in the case where non-demanded
bits have been stripped out by instcombine.

llvm-svn: 72010
2009-05-18 16:29:04 +00:00
Dan Gohman d277a1ed49 Delete a redundant 'else'.
llvm-svn: 72009
2009-05-18 16:17:44 +00:00
Dan Gohman 9cf09f8291 Fix ScalarEvolution::isLoopGuardedByCond to accept a null Loop*, for
consistency with other routines that use a null Loop* to mean code
not contained by any loop.

llvm-svn: 72008
2009-05-18 16:03:58 +00:00
Dan Gohman 4fc3668a92 Minor code cleanups. Do more of the work before the if statements
instead of within their controlling expressions.

llvm-svn: 72007
2009-05-18 15:58:39 +00:00
Dan Gohman d33f36e23b Add assertion checks to the SCEV operator creation methods to catch
type mismatches.

llvm-svn: 72006
2009-05-18 15:44:58 +00:00
Dan Gohman 8c77f1a275 Make ScalarEvolution::isLoopGuardedByCond work even when the edge
entering a loop is a non-split critical edge.

llvm-svn: 72004
2009-05-18 15:36:09 +00:00
Dan Gohman ba7f6d8276 Add an isOne() utility function to ScalarEvolution, similar to isZero()
and similar to ConstantInt's isOne().

llvm-svn: 72003
2009-05-18 15:22:39 +00:00
Dan Gohman b81dd48fd2 Add nounwind to a few tests.
llvm-svn: 72002
2009-05-18 15:16:49 +00:00
Eli Friedman e6eb2edb50 Fix for PR2386: distinguish between insertion and replacements in the
delta tree.

The issue is roughly a conflict in ReplaceText between two kinds of 
uses. One, it should be possible to replace a replacement: for example, the
ObjC rewriter calls ReplaceStmt for an expression, then replaces the resulting
expression with another expression.  Two, it should be possible to 
replace text that already has text inserted before it: for example, the 
HTML rewriter inserts a bunch of tags at the beginning of the line, then 
tries to escape the first character on the line.  This patch 
distinguishes the two cases by storing the deltas separately; 
essentially, replacements and insertions no longer interfere with 
each other.

Another possibility would be to add some sort of flag to ReplaceText, but
this seems a bit more intuitive and flexible.

There are a few downsides to the current solution: one is that there isn't
any way to remove/replace an insertion without touching additional
surrounding text; if such an operation turns out to be useful, an
additional method or flag can be added.  Another is that an insertion 
and replacing a string of length zero are distinct operations; I'm not 
sure how to resolve this, or whether it will be confusing in practice.

This is relatively sensitive code, so please test and tell me if 
anything breaks.

llvm-svn: 72000
2009-05-18 13:56:52 +00:00
Eli Friedman a97f07f22d Tweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
It doesn't matter for piped input, but it's annoying when typing at the 
console.

llvm-svn: 71998
2009-05-18 08:44:04 +00:00
Eli Friedman cc89325969 Remove tabs.
llvm-svn: 71997
2009-05-18 07:48:06 +00:00
Eli Friedman 174c310967 Remove unused parameter.
llvm-svn: 71996
2009-05-18 07:39:39 +00:00
Daniel Dunbar 5d8165435d Fix a compile warning.
llvm-svn: 71993
2009-05-18 03:44:24 +00:00
Eli Friedman 07cdffc295 Add some comments to ASTConsumers.h describing what the different
ASTConsumers actually do.

llvm-svn: 71992
2009-05-18 01:16:21 +00:00
Lang Hames 4030d8122d Prevented reg0 from being added to MBB live-in set, which was causing issues
for PostRAScheduler. 

llvm-svn: 71991
2009-05-17 23:50:36 +00:00
Anders Carlsson ee13926fbe Make ActOnWhileStmt take a FullExprArg for the condition expr.
llvm-svn: 71990
2009-05-17 21:22:26 +00:00
Anders Carlsson 24824e5009 Make ActOnExprStmt take a FullExprArg.
llvm-svn: 71989
2009-05-17 21:11:30 +00:00
Anders Carlsson 0e70d84e29 Fix instantiate-function-1.cpp.
llvm-svn: 71988
2009-05-17 19:43:12 +00:00
Jakob Stoklund Olesen 1c3da3a94b Rename MachineVerifier pass to avoid command line collision.
llvm-svn: 71987
2009-05-17 19:37:14 +00:00
Duncan Sands c5161d4b83 Check that the gcc front-end is not doing inlining
when not doing unit-at-a-time.

llvm-svn: 71986
2009-05-17 19:37:02 +00:00
Anders Carlsson cdf1ca1cf4 Fix DISABLE_SMART_POINTERS build.
llvm-svn: 71984
2009-05-17 19:34:11 +00:00
Anders Carlsson 85a307dffb Implement Sema::ActOnFinishFullExpr and create a CXXExprWithTemporaries node if necessary.
llvm-svn: 71983
2009-05-17 18:41:29 +00:00
Anders Carlsson 5262746c28 Add the FullExprArg wrapper and use it for if statement conditions.
llvm-svn: 71982
2009-05-17 18:26:53 +00:00
Anders Carlsson 23ca0b4869 Add support for converting member pointer types to LLVM types. Also mangle pointer to member functions correctly and add tests.
llvm-svn: 71981
2009-05-17 17:41:20 +00:00
Fariborz Jahanian 078cd52297 This patch fixes two bugs in the GNU Objective-C runtime implementation. One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed). The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly.
Patch by David Chisnall.

llvm-svn: 71980
2009-05-17 16:49:27 +00:00
Anders Carlsson 9303134cef Add FIXME about not using MemberExpr nodes when the base type is a dependent type.
llvm-svn: 71979
2009-05-17 16:28:18 +00:00
Anton Korobeynikov 6de08cd093 Mark rotl/rotr as expand. This generates pretty ugly code, but this is better than nothing.
llvm-svn: 71976
2009-05-17 10:16:28 +00:00
Anton Korobeynikov 6b5523aec2 Typo
llvm-svn: 71975
2009-05-17 10:15:22 +00:00
Bill Wendling e9353d7d6f Formatting. Some updating of data structures. More work needs to be done to update the examples.
llvm-svn: 71974
2009-05-17 05:52:39 +00:00
Owen Anderson 33c346b807 Significantly improve Atomic.h by pulling in code from libatomic_ops by HP. This is a little outdated, but reasonably complete.
llvm-svn: 71973
2009-05-17 04:57:54 +00:00
Anders Carlsson 32440a0f48 Use the Itanium ABI for member pointers. Add a missing 'break' statement and a test case
llvm-svn: 71972
2009-05-17 02:06:04 +00:00
Eli Friedman 8f1d33e218 A couple of tweaks to make -ast-print produce code that's closer to
valid C code.

llvm-svn: 71971
2009-05-17 01:05:34 +00:00
Anders Carlsson 3c01271e93 Rewrite PureVirtualMethodCollector to use the overridden methods. Fixes <rdar://problem/6854087>
llvm-svn: 71970
2009-05-17 00:00:05 +00:00
Anders Carlsson 776a1403ed Add OldMD to the list of methods NewMD overrides
llvm-svn: 71969
2009-05-16 23:59:08 +00:00
Anders Carlsson 36d87e179a Add setters/getters to CXXMethodDecl so it can keep track of which virtual member functions it overrides (if any)
llvm-svn: 71968
2009-05-16 23:58:37 +00:00
Eli Friedman 15af3ee6a9 Make the RAII extension warning silencing for __extension__ a bit
narrower, so it doesn't catch expresions that aren't sub-expressions of
__extension__ operator.

llvm-svn: 71967
2009-05-16 23:40:44 +00:00
Eli Friedman 678d3bac03 Targets without long long should reduce the size of intmax_t
accordingly.

llvm-svn: 71966
2009-05-16 23:30:57 +00:00
Eli Friedman ce7f900b3b Refactor address-of-void extension a bit so that it's more obviously
correct.  No functionality change, as far as I know.

llvm-svn: 71965
2009-05-16 23:27:50 +00:00
Eli Friedman c3dcdd0980 A few minor updates to the user manual.
llvm-svn: 71964
2009-05-16 23:17:30 +00:00
Anders Carlsson 7bf3c4227d Fix another case where the extern-ness of extern "C" wasn't being captured.
This makes me think that we should make hasExternalStorage perform this check...

llvm-svn: 71962
2009-05-16 22:05:23 +00:00
Anders Carlsson 5b53576fe4 Don't return member pointer types for static member functions. Fixes 6879261.
llvm-svn: 71961
2009-05-16 21:43:42 +00:00
Eli Friedman b529b01985 PR3942: Don't warn on unsigned overflow in preprocessor expressions.
llvm-svn: 71960
2009-05-16 21:24:10 +00:00
Owen Anderson 48371650b6 Remove the volatile marker from the cas_flag typedef, fixing some warnings.
It's now the client's resposibility to add it in when needed

llvm-svn: 71959
2009-05-16 21:08:25 +00:00
Anders Carlsson d3a69ceaaf extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.
llvm-svn: 71957
2009-05-16 21:02:39 +00:00
Anders Carlsson 524d5a4f5a Improve checking of member expressions where the base type is a dependent type.
llvm-svn: 71956
2009-05-16 20:31:20 +00:00
Daniel Dunbar f39ea8535b Update test case; I'm confused why this wasn't failing on the buildbot
though?

llvm-svn: 71955
2009-05-16 19:30:01 +00:00
Sebastian Redl 45be55d181 Test case for previous commit. Explicit instantiation does the trick. (Thanks, Anders.)
llvm-svn: 71954
2009-05-16 18:59:35 +00:00