Commit Graph

61664 Commits

Author SHA1 Message Date
Dan Gohman 31167c61d5 Minor code simplification.
llvm-svn: 74240
2009-06-26 00:26:03 +00:00
Evan Cheng cf661fc12a These are done / no longer applicable.
llvm-svn: 74239
2009-06-26 00:25:27 +00:00
Ted Kremenek 18e1caa6bf Unbreak build.
llvm-svn: 74238
2009-06-26 00:25:05 +00:00
Evan Cheng 5bf9011c2d Mark a bunch of instructions commutable.
llvm-svn: 74237
2009-06-26 00:19:44 +00:00
Evan Cheng 9643ba8123 tst is also commutable.
llvm-svn: 74236
2009-06-26 00:19:07 +00:00
Owen Anderson b99db00b64 Committed the wrong version in my last commit.
llvm-svn: 74235
2009-06-26 00:17:05 +00:00
Owen Anderson 1efcb40c0f Privatize a static variable.
llvm-svn: 74234
2009-06-26 00:15:27 +00:00
Ted Kremenek 27433af0ee Add missing header file.
llvm-svn: 74233
2009-06-26 00:15:05 +00:00
Douglas Gregor 4adbc6d947 Implicit instantiation for function template specializations.
For a FunctionDecl that has been instantiated due to template argument
deduction, we now store the primary template from which it was
instantiated and the deduced template arguments. From this
information, we can instantiate the body of the function template.

llvm-svn: 74232
2009-06-26 00:10:03 +00:00
Ted Kremenek 4ac764d72e Remove orphaned header file.
llvm-svn: 74231
2009-06-26 00:08:20 +00:00
Owen Anderson b74e84793d Guards for the compiler driver plugin list.
llvm-svn: 74230
2009-06-26 00:06:28 +00:00
Ted Kremenek 1642bdaaa5 Introduce a new concept to the static analyzer: SValuator.
GRTransferFuncs had the conflated role of both constructing SVals (symbolic
expressions) as well as handling checker-specific logic. Now SValuator has the
role of constructing SVals from expressions and GRTransferFuncs just handles
checker-specific logic. The motivation is by separating these two concepts we
will be able to much more easily create richer constraint-generating logic
without coupling it to the main checker transfer function logic.

We now have one implementation of SValuator: SimpleSValuator.

SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals
(which is removed in this patch). This includes the logic for EvalBinOp,
EvalCast, etc. Because SValuator has a narrower role than the old
GRTransferFuncs, the interfaces are much simpler, and so is the implementation
of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of
SVal-related logic in GRSimpleVals and cleaned it up while moving it over to
SimpleSValuator.

As a consequence of removing GRSimpleVals, there is no longer a
'-checker-simple' option. The '-checker-cfref' did everything that option did
but also ran the retain/release checker. Of course a user may not always wish to
run the retain/release checker, nor do we wish core analysis logic buried in the
checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp
to separate out these pieces into the core analysis engine.

llvm-svn: 74229
2009-06-26 00:05:51 +00:00
Evan Cheng 97727a61f9 Select ADC, SBC, and RSC instead of the ADCS, SBCS, and RSCS when the carry bit def is not used.
llvm-svn: 74228
2009-06-25 23:34:10 +00:00
Owen Anderson 76cfd205ff Support thread-local pretty stack traces.
llvm-svn: 74227
2009-06-25 23:31:33 +00:00
Owen Anderson eba6e65291 Add support for const thread locals.
llvm-svn: 74226
2009-06-25 23:31:18 +00:00
Owen Anderson eb51111851 Fix typo in assertion.
llvm-svn: 74225
2009-06-25 23:28:28 +00:00
Nate Begeman 8b68d6fb83 OpenCL 1.0 Support: support "bool, true, false" tokens when compiling for OpenCL
llvm-svn: 74224
2009-06-25 23:25:15 +00:00
David Goodwin 16f357cccf Use MVN for ~t2_so_imm immediates.
llvm-svn: 74223
2009-06-25 23:11:21 +00:00
Owen Anderson 1154983b9c Add a configure test for pthread_getspecific, and use it when building ThreadLocal.
llvm-svn: 74222
2009-06-25 23:10:26 +00:00
Nate Begeman f2911667d8 Write/Read new Language Options
llvm-svn: 74221
2009-06-25 23:01:11 +00:00
Nate Begeman 9d90579b6d PCH support for OpenCL language options
llvm-svn: 74220
2009-06-25 22:57:40 +00:00
David Goodwin e85169cd1b Add Def/Use of CPSR for Thumb-1 instructions.
llvm-svn: 74219
2009-06-25 22:49:55 +00:00
Daniel Dunbar 4a5a561a24 MC: Parse .org directives.
llvm-svn: 74218
2009-06-25 22:44:51 +00:00
Nate Begeman 95f48a5d87 OpenCL 1.0 patch 2/N: Language options & file extension
llvm-svn: 74217
2009-06-25 22:43:10 +00:00
Fariborz Jahanian a158e018d4 Test case for my last patch.
llvm-svn: 74216
2009-06-25 22:40:36 +00:00
Devang Patel 0c044ecdb0 Simplify.
llvm-svn: 74215
2009-06-25 22:36:02 +00:00
Argyrios Kyrtzidis 02f3e84c5b Check that index-test uses an up-to-date AST file.
llvm-svn: 74214
2009-06-25 22:15:12 +00:00
Douglas Gregor ad3f2fcf43 Improved semantic analysis and AST respresentation for function
templates.

For example, this now type-checks (but does not instantiate the body
of deref<int>):

  template<typename T> T& deref(T* t) { return *t; }

  void test(int *ip) {
    int &ir = deref(ip);
  }

Specific changes/additions:
  * Template argument deduction from a call to a function template.
  * Instantiation of a function template specializations (just the
  declarations) from the template arguments deduced from a call.
  * FunctionTemplateDecls are stored directly in declaration contexts
  and found via name lookup (all forms), rather than finding the
  FunctionDecl and then realizing it is a template. This is
  responsible for most of the churn, since some of the core
  declaration matching and lookup code assumes that all functions are
  FunctionDecls.

llvm-svn: 74213
2009-06-25 22:08:12 +00:00
Evan Cheng 7e687191fd Unbreak mingw build. Patch by Viktor Kutuzov.
llvm-svn: 74212
2009-06-25 22:04:44 +00:00
Bill Wendling 722c6e1b70 Don't grep the -debug output. This isn't the way to test changes.
llvm-svn: 74211
2009-06-25 21:59:32 +00:00
Owen Anderson bc17dc6ed4 Update cmake build files.
llvm-svn: 74210
2009-06-25 21:58:34 +00:00
Owen Anderson f17f6f06fa Add a class for supporting platform independent thread-local storage.
Windows people, please double-check/patch this.

llvm-svn: 74209
2009-06-25 21:58:01 +00:00
Daniel Dunbar 2d2ee150eb MC: Parse .set and assignments.
llvm-svn: 74208
2009-06-25 21:56:11 +00:00
Argyrios Kyrtzidis bf61749b47 Add some comments and clean-up some leftover code.
llvm-svn: 74207
2009-06-25 21:54:50 +00:00
Chris Lattner a4194b1082 down with unwind info :)
llvm-svn: 74206
2009-06-25 21:48:17 +00:00
Fariborz Jahanian 41f792735f Patch to diagnose and Mark use of implicit default assignment operator.
llvm-svn: 74205
2009-06-25 21:45:19 +00:00
Chris Lattner b3586b6e73 add targetflags to jump tables and constant pool entries.
llvm-svn: 74204
2009-06-25 21:35:31 +00:00
Chris Lattner 8e34f98d72 allow setting target operand flags on TargetGlobalAddress nodes.
llvm-svn: 74203
2009-06-25 21:21:14 +00:00
Nate Begeman 0359e12208 OpenCL 1.0 Support, patch 1/N: upper case swizzle operator and hex element index.
llvm-svn: 74202
2009-06-25 21:06:09 +00:00
Daniel Dunbar 188e87fa21 MC: Truncate values when printing, to keep 'as' happy.
llvm-svn: 74201
2009-06-25 21:03:18 +00:00
Evan Cheng c7ea8df67e ISD::ADDE / ISD::SUBE updates the carry bit so they should isle to ADCS and SBCS / RSCS.
llvm-svn: 74200
2009-06-25 20:59:23 +00:00
Chris Lattner af5dbfc6f8 start bringing targetoperand flags into isel, first up, ExternalSymbol.
llvm-svn: 74199
2009-06-25 18:45:50 +00:00
Argyrios Kyrtzidis 92772215af Introduce tools/index-test.
This tool will be the test bed for indexing related operations. It basically reads PCH files passed by the command line and performs various operations.

Currently it can accept a file:line:column which resolves to a declaration/statement and displays some information about them.

llvm-svn: 74198
2009-06-25 18:22:52 +00:00
Argyrios Kyrtzidis 7c59162edd Introduce the ResolveLocationInAST function which takes an ASTContext and a SourceLocation and it resolves it into a <Decl*, Stmt*> pair.
Decl* is the declaration associated with this source location and Stmt* is the statement/expression that the location points to.
If the location does not point to a statement node, Stmt* is null.

ResolveLocationInAST (along with converting a file:line:column triplet to a SourceLocation) will be useful for an IDE client and for clang's test suite.

llvm-svn: 74197
2009-06-25 18:22:41 +00:00
Argyrios Kyrtzidis 55c34113e4 Handle PCHReader::IgnorePCH, it gets returned for when the file does not exist.
llvm-svn: 74196
2009-06-25 18:22:30 +00:00
Argyrios Kyrtzidis 16eecc4245 Set the end range location of a FunctionDecl to the right paren.
llvm-svn: 74195
2009-06-25 18:22:24 +00:00
Argyrios Kyrtzidis 0e5ecbda69 Fix column checking for SourceManager::getLocation().
llvm-svn: 74194
2009-06-25 18:22:16 +00:00
Mikhail Glushenkov 269884ead5 Better error message.
llvm-svn: 74193
2009-06-25 18:21:34 +00:00
Mikhail Glushenkov 2b4a7dc1dc Regenerate.
llvm-svn: 74192
2009-06-25 18:21:10 +00:00
Mikhail Glushenkov d1d21a1ce9 Update documentation.
llvm-svn: 74191
2009-06-25 18:20:44 +00:00