Commit Graph

89404 Commits

Author SHA1 Message Date
Bill Wendling 768d3b510c Add the "isCompare" attribute to the defm instead of each individual instr.
llvm-svn: 111481
2010-08-19 00:05:48 +00:00
Alexis Hunt fa9fd03e2d Remove three spurious semicolons
llvm-svn: 111480
2010-08-19 00:03:05 +00:00
Sebastian Redl 539c506152 Rename pch namespace to serialization.
llvm-svn: 111478
2010-08-18 23:57:32 +00:00
Sebastian Redl 47c369f4ed Rename PCHBitCodes.h -> ASTBitCodes.h
llvm-svn: 111476
2010-08-18 23:57:26 +00:00
Sebastian Redl f164204baa Rename stuff in PCHBitCodes.h
llvm-svn: 111475
2010-08-18 23:57:22 +00:00
Sebastian Redl f5b1346738 Rename the ASTReader header files.
llvm-svn: 111474
2010-08-18 23:57:17 +00:00
Sebastian Redl 3b3c874f68 Rename the ASTReader implementation files.
llvm-svn: 111473
2010-08-18 23:57:11 +00:00
Sebastian Redl d44cd6adba More PCH -> AST renaming.
llvm-svn: 111472
2010-08-18 23:57:06 +00:00
Sebastian Redl 3e31c72497 Rename various classes from PCH to AST.
llvm-svn: 111471
2010-08-18 23:56:56 +00:00
Sebastian Redl 70c751de76 Rename PCHStmtReader -> ASTStmtReader.
llvm-svn: 111470
2010-08-18 23:56:52 +00:00
Sebastian Redl b3298c3bb6 Rename PCHDeclReader -> ASTDeclReader.
llvm-svn: 111469
2010-08-18 23:56:48 +00:00
Jakob Stoklund Olesen 92d57cee61 Don't call Predicate_* in Mips.
llvm-svn: 111468
2010-08-18 23:56:46 +00:00
Sebastian Redl 2c499f6561 Rename PCHReader to ASTReader.
llvm-svn: 111467
2010-08-18 23:56:43 +00:00
Sebastian Redl 1914c6fef8 Rename PCHWriter.h to ASTWriter.h
llvm-svn: 111466
2010-08-18 23:56:37 +00:00
Sebastian Redl d6522cfc6d Rename the ASTWriter implementation files
llvm-svn: 111465
2010-08-18 23:56:31 +00:00
Sebastian Redl 42a0f6a7f2 Do the PCH->AST rename for ASTWriter's implementation parts.
llvm-svn: 111464
2010-08-18 23:56:27 +00:00
Sebastian Redl 55c0ad5772 Rename PCHWriter to ASTWriter
llvm-svn: 111463
2010-08-18 23:56:21 +00:00
Douglas Gregor 4c6ed904bf When creating an ASTUnit by parsing source code, set DisableFree to
false (not true), so that the CompilerInstance will actually free data
structures when it's done. This fixes a major leak with libclang's
in-process code completion.

llvm-svn: 111457
2010-08-18 23:38:21 +00:00
Eric Christopher 8a70781cac Remove extra header.
llvm-svn: 111456
2010-08-18 23:38:16 +00:00
Alexis Hunt dcfba7b35b Generate Attr subclasses with TableGen.
Now all classes derived from Attr are generated from TableGen.
Additionally, Attr* is no longer its own linked list; SmallVectors or
Attr* are used. The accompanying LLVM commit contains the updates to
TableGen necessary for this.

Some other notes about newly-generated attribute classes:

 - The constructor arguments are a SourceLocation and a Context&,
   followed by the attributes arguments in the order that they were
   defined in Attr.td

 - Every argument in Attr.td has an appropriate accessor named getFoo,
   and there are sometimes a few extra ones (such as to get the length
   of a variadic argument).

Additionally, specific_attr_iterator has been introduced, which will
iterate over an AttrVec, but only over attributes of a certain type. It
can be accessed through either Decl::specific_attr_begin/end or
the global functions of the same name.

llvm-svn: 111455
2010-08-18 23:23:40 +00:00
Alexis Hunt 1d2b159882 Finish full attribute class emission for clang.
For more information, see the accompanying clang patch.

llvm-svn: 111454
2010-08-18 23:23:09 +00:00
Jim Grosbach 3ac059369b Add a newline to debug output
llvm-svn: 111453
2010-08-18 23:14:02 +00:00
Chris Lattner 3decde9305 refix PR1143 by making basicaa analyze zexts of indices aggresively,
which I broke with a recent patch.

llvm-svn: 111452
2010-08-18 23:09:49 +00:00
Daniel Dunbar 79acdd9402 libclang: Put clang_reparseTranslationUnit inside a crash recovery context.
llvm-svn: 111451
2010-08-18 23:09:31 +00:00
Evan Cheng 25b6068b8f If any def of a machine-sink candidate has local uses, it's obviously not safe to sink it to a successor block. This bug has been hidden because a later check for critical-edge disable these illegal optimizations. This patch should significantly reduce the amount of time spent on checking dominator information for obviously unsafe sinking.
llvm-svn: 111450
2010-08-18 23:09:25 +00:00
Daniel Dunbar 211a787eaf CrashRecovery: Add #pragma clang __debug handle_crash, useful when debugging
CrashRecovery since it avoids sending a signal which may be intercepted by the
debugger.

llvm-svn: 111449
2010-08-18 23:09:23 +00:00
Daniel Dunbar ec29d712d4 c-index-test: Change -test-load-source-repase to only use remapped files for the
reparse, to allow testing distinct inputs.

llvm-svn: 111448
2010-08-18 23:09:16 +00:00
Douglas Gregor f0708dee83 Fix crasher with IgnoringDiagClient
llvm-svn: 111447
2010-08-18 23:03:13 +00:00
Chris Lattner 26403acef7 GetLinearExpression is only called when TD is non-null, pass as
a reference instead of pointer.

llvm-svn: 111445
2010-08-18 22:52:09 +00:00
Chris Lattner 1b9c38796e rework GEP decomposition to make a new VariableGEPIndex struct instead of
using a pair.  This tidies up the code a bit.  While setting things up, add
a (currently unused) field to keep track of how the value is extended.

llvm-svn: 111444
2010-08-18 22:47:56 +00:00
Jim Grosbach dbfc2ce95d Enable ARM base register reuse to local stack slot allocation. Whenever a new
frame index reference to an object in the local block is seen, check if
it's near enough to any previously allocaated base register to re-use.

rdar://8277890

llvm-svn: 111443
2010-08-18 22:44:49 +00:00
Dan Gohman 492c2ea31e Add a testcase to verify that commands don't crash when they hit
errors on stderr.

llvm-svn: 111440
2010-08-18 22:35:56 +00:00
Douglas Gregor 2dd19f1d5f Simplify the ownership model for DiagnosticClients, which was really
convoluted and a bit leaky. Now, the Diagnostic object owns its
DiagnosticClient.

llvm-svn: 111437
2010-08-18 22:29:43 +00:00
Dan Gohman c825ceefb4 Make raw_fd_ostream consider itself the owner of STDOUT_FILENO when
constructed with an output filename of "-". In particular, allow the
file descriptor to be closed, and close the file descriptor in the
destructor if it hasn't been explicitly closed already, to ensure
that any write errors are detected.

llvm-svn: 111436
2010-08-18 22:26:19 +00:00
Dan Gohman 82656fb0e1 When sending stats output to stdout for grepping, don't emit normal
output to standard output also.

llvm-svn: 111435
2010-08-18 22:22:44 +00:00
Eli Friedman 4f0352f57b Add/update a bunch of svn:ignore properties; get rid of empty folder
lib/Runtime.

llvm-svn: 111434
2010-08-18 22:15:06 +00:00
Chris Lattner 9f7500f57b move gep decomposition out of ValueTracking into BasicAA. The form of
decomposition that it is doing is very basicaa specific and is only used
by basicaa.

Now with less tree breakingness.

llvm-svn: 111433
2010-08-18 22:07:29 +00:00
Dan Gohman 3490ff4002 Tidy.
llvm-svn: 111432
2010-08-18 22:04:43 +00:00
Bill Wendling ad2aa57774 Minor simplification. Gets rid of a needless temporary.
llvm-svn: 111430
2010-08-18 21:32:07 +00:00
Johnny Chen 5a2133909d Simplify the assert matched-string criterion.
llvm-svn: 111429
2010-08-18 21:28:35 +00:00
Douglas Gregor fb640869ed There is no pointer conversion between to similar types (i.e., same
type ignoring cv-qualifiers). These are qualification
conversions. Fixes PR7934.

llvm-svn: 111428
2010-08-18 21:25:30 +00:00
Dan Gohman b37af7de47 Call llvm::remove_fatal_error_handler before deallocating objects
which are used by the error handling functions.

llvm-svn: 111427
2010-08-18 21:23:17 +00:00
Tom Care b9933f365e Added psuedo-constant analysis and integrated it into the false positive reduction stage in IdempotentOperationChecker.
- Renamed IdempotentOperationChecker::isConstant to isConstantOrPseudoConstant to better reflect the function
- Changed IdempotentOperationChecker::PreVisitBinaryOperator to only run 'CanVary' once on undefined assumptions
- Created new PsuedoConstantAnalysis class and added it to AnalysisContext
- Changed IdempotentOperationChecker to exploit the new analysis
- Updated tests with psuedo-constants
- Added check to IdempotentOperationChecker to see if a Decl is const qualified

llvm-svn: 111426
2010-08-18 21:17:24 +00:00
Owen Anderson 80d19f0905 Use ConstantRange to propagate information through value definitions.
llvm-svn: 111425
2010-08-18 21:11:37 +00:00
Dan Gohman 2470818942 When sending stats output to stdout for grepping, don't emit normal
output to standard output also.

llvm-svn: 111401
2010-08-18 20:32:46 +00:00
Jakob Stoklund Olesen e98030ad58 Thinking about it, we don't need MachineDominatorTree after all. The DomValue
map discovers the iterated dominance frontier for free.

llvm-svn: 111400
2010-08-18 20:29:53 +00:00
Dan Gohman 50377a366f Introduce a ScopedFatalErrorHandler class to make it easy to register
fatal error handlers which automatically get unregistered at the end
of a scope.

llvm-svn: 111398
2010-08-18 20:16:39 +00:00
Jakob Stoklund Olesen f4088b022a Revert r111394. It was too aggressive.
We must complete the DFS, otherwise we might miss needed phi-defs, and
prematurely color live ranges with a non-dominating value.

This is not a big deal since we get to color more of the CFG and the next
mapValue call will be faster.

llvm-svn: 111397
2010-08-18 20:06:05 +00:00
Jim Ingham e1be14df1e Some Block:: methods wandered to the end of the file after the BlockList:: methods. I moved them back.
llvm-svn: 111396
2010-08-18 19:29:16 +00:00
John McCall 78fbb61ed7 Contextual arity is a feature of mangling expressions; kill off
mangleCallExpression.  Also, operator names with unknown arity should
be mangled as binary operators;  this is actually covered by an oddly-
positioned sentence in the ABI document.  Fixes PR7891.

llvm-svn: 111395
2010-08-18 19:18:59 +00:00