Commit Graph

36702 Commits

Author SHA1 Message Date
Chris Lattner ccc1b69a52 explain why not vector<bool>
llvm-svn: 42324
2007-09-25 22:37:50 +00:00
Evan Cheng 5321fa44f4 Missing load / store folding entries.
llvm-svn: 42323
2007-09-25 22:10:43 +00:00
Anton Korobeynikov 90910745bb Partly revert invalid r41774
llvm-svn: 42322
2007-09-25 21:52:30 +00:00
Ted Kremenek 39fc60f280 Moved "DataflowSolver.h" to the "include/" subtree. Adjusted client
code that uses the solver to reflect the new location.

Created "FlowSensitive" subdirectory in include/clang/Analysis to hold
header files relating to flow-sensitive analyses.  Moved
"DataflowValues.h" into this subdirectory.

llvm-svn: 42320
2007-09-25 21:00:24 +00:00
Fariborz Jahanian e2017c1d1d Patch to make ObjcImplementationDecl derived from TypeDecl and supprt legacy
objective-c code with no @interface declaration.

llvm-svn: 42319
2007-09-25 21:00:20 +00:00
Bill Wendling 982d57da39 Grammar fix.
llvm-svn: 42318
2007-09-25 20:45:10 +00:00
Ted Kremenek 9c3fe8d2e8 Fixed broken English in comment.
llvm-svn: 42317
2007-09-25 20:37:28 +00:00
Dan Gohman 57211c5550 More explicit keywords.
llvm-svn: 42316
2007-09-25 20:27:06 +00:00
Duncan Sands 384f4bd878 Add a newline to the end of this file.
llvm-svn: 42314
2007-09-25 20:08:48 +00:00
Dan Gohman 06919e8ef2 Fix a typo in a comment.
llvm-svn: 42313
2007-09-25 19:37:26 +00:00
Evan Cheng 8ee1ecfc50 New style x87 cmp instructions.
llvm-svn: 42312
2007-09-25 19:08:02 +00:00
Fariborz Jahanian bfe13c566c This patch introduces a new class to keep track of class implementation info. It also adds more
semantic checks for class and protocol declarations. Test cases are good indications of kind of 
checking being done in this patch.

llvm-svn: 42311
2007-09-25 18:38:09 +00:00
Ted Kremenek 558be36672 Added "CheckASTConsumer", a function that generalizes
"CheckDiagnostics" (used for -parse-ast-check) to check the
diagnostics of any ASTConsumer.

Reimplemented CheckDiagnostics to use CheckASTConsumer instead.

Added driver option -warn-dead-stores-check, which checks the
diagnostics generated by the DeadStores checker.  This is implemented
using CheckASTConsumer.111

llvm-svn: 42310
2007-09-25 18:37:20 +00:00
Devang Patel 7bba386f72 Handle multiple induction variables.
This fixes PR714.

llvm-svn: 42309
2007-09-25 18:24:48 +00:00
Dan Gohman 31599685c7 When both x/y and x%y are needed (x and y both scalar integer), compute
both results with a single div or idiv instruction. This uses new X86ISD
nodes for DIV and IDIV which are introduced during the legalize phase
so that the SelectionDAG's CSE can automatically eliminate redundant
computations.

llvm-svn: 42308
2007-09-25 18:23:27 +00:00
Ted Kremenek 2826f6e63f Changed command line options "-check-dead-stores" and
"-check-uninit-values" to "-warn-dead-stores" and
"-warn-uninit-values"

llvm-svn: 42307
2007-09-25 18:05:45 +00:00
Devang Patel 440d13b55b Do not reserve DOM check for GetElementPtrInst.
llvm-svn: 42306
2007-09-25 17:55:50 +00:00
Ted Kremenek 2af52eb454 Comment formatting changes. No real content changes.
llvm-svn: 42305
2007-09-25 17:53:38 +00:00
Ted Kremenek 67f6ea19d7 Minor comment changes.
llvm-svn: 42304
2007-09-25 17:51:05 +00:00
Dale Johannesen 97d4bf2c41 Some tests for APFloat conversions.
llvm-svn: 42303
2007-09-25 17:50:55 +00:00
Evan Cheng 6cb71f7fe0 Forgot to check in the changes. Fix test case so it doesn't break with any scheduling changes.
llvm-svn: 42302
2007-09-25 17:47:38 +00:00
Ted Kremenek 9716d61923 Removed "EverKilled" class in DeadStores checker; it is no longer used.
llvm-svn: 42301
2007-09-25 17:47:04 +00:00
Devang Patel 5e1651d270 doh..
llvm-svn: 42300
2007-09-25 17:43:08 +00:00
Devang Patel 87d7e8ebcb Add transformation to update loop interation space. Now,
for (i=A; i<N; i++) {
  if (i < X && i > Y)
    do_something();
}

is transformed into

U=min(N,X); L=max(A,Y);
for (i=L;i<U;i++)
  do_somethihg();                            

llvm-svn: 42299
2007-09-25 17:31:19 +00:00
Dale Johannesen 4f55d9fe0f Fix long double<->shorter FP type conversions
of zero, infinity, and NaNs.

llvm-svn: 42298
2007-09-25 17:25:00 +00:00
Dan Gohman 5e1a428344 Move the setOperationAction(ISD::DEBUG_LOC, MVT::Other, Expand) and
the check to see if the assembler supports .loc from X86TargetLowering
into the superclass TargetLowering.

llvm-svn: 42297
2007-09-25 15:10:49 +00:00
Duncan Sands 4a229e908a Fix spelling.
llvm-svn: 42296
2007-09-25 13:53:22 +00:00
Hartmut Kaiser c173edd271 Updated VC++ build system
llvm-svn: 42295
2007-09-25 13:08:03 +00:00
Duncan Sands 734b861299 Add missing end-of-file newlines.
llvm-svn: 42294
2007-09-25 07:10:01 +00:00
Ted Kremenek ad8bce02f0 Further refactored DataflowSolver. Now most code for the solver is shared
between forward and backward analyses, with trait classes being used
to implement the key differences in operations/functionality.

Converted the LiveVariables analysis to use the generic DataflowSolver.  This,
along with removing some extra functionality that was not needed, reduced
the code for LiveVariables by over half.

Modified Driver code to handle the updated interface to LiveVariables.

Modified the DeadStores checker to handle the update interface to
LiveVariables.

Updated DataflowValues (generic ADT to store dataflow values) to also
store values for blocks.  This is used by DeadStores.  Updated some comments.

llvm-svn: 42293
2007-09-25 04:31:27 +00:00
Ted Kremenek 7e839f10cf Added extra "constness" to parameter.
llvm-svn: 42292
2007-09-25 04:30:51 +00:00
Chris Lattner 70d1faa17d use the right rounding mode.
llvm-svn: 42291
2007-09-25 04:29:44 +00:00
Ted Kremenek ce5568f568 Added PersistentMap, an ADT that implements a map data structure that
is persistent.  Adds/removals to a PersistentMap do not result in
a map being modified, but a new map being created.  This will be useful
for path-sensitive analyses.  

The current implementation mainly makes copies to implement this
functionality.  If the map turns out to be extensively used, this
implementation will be replaced with a more efficient one that uses
data sharing (see comments in PersistentMap.h for more information).

llvm-svn: 42290
2007-09-25 04:26:20 +00:00
Owen Anderson 5d913aa357 Fill in the sections about my contributions.
llvm-svn: 42286
2007-09-25 02:10:58 +00:00
Evan Cheng e95f391ef1 Added support for new condition code modeling scheme (i.e. physical register dependency). These are a bunch of instructions that are duplicated so the x86 backend can support both the old and new schemes at the same time. They will be deleted after
all the kinks are worked out.

llvm-svn: 42285
2007-09-25 01:57:46 +00:00
Evan Cheng 5924bf7d3b Added major new capabilities to scheduler (only BURR for now) to support physical register dependency. The BURR scheduler can now backtrace and duplicate instructions in order to avoid "expensive / impossible to copy" values (e.g. status flag EFLAGS for x86) from being clobbered.
llvm-svn: 42284
2007-09-25 01:54:36 +00:00
Evan Cheng 8a7dec736d New temporary option -new-cc-modeling-scheme to test the new cc modeling scheme.
llvm-svn: 42283
2007-09-25 01:50:04 +00:00
Evan Cheng 43686dad3d Rename keyword "modify" -> "implicit".
llvm-svn: 42282
2007-09-25 01:48:59 +00:00
Dale Johannesen 0241bb57b2 When mixing SSE and x87 codegen, it's possible to
have situations where an SSE instruction turns into
multiple blocks, with the live range of an x87
register crossing them.  To do this correctly make
sure we examine all blocks when inserting
FP_REG_KILL.  PR 1697.  (This was exposed by my
fix for PR 1681, but the same thing could happen
mixing x87 long double with SSE.)

llvm-svn: 42281
2007-09-24 22:52:39 +00:00
Bill Wendling d40e795c19 Don't execute dump unless NDEBUG isn't defined.
llvm-svn: 42280
2007-09-24 22:43:48 +00:00
Daniel Berlin c82c9f078a Comment fixups
llvm-svn: 42279
2007-09-24 22:20:45 +00:00
Dan Gohman 1b2156fcae Add support on x86 for having Legalize lower ISD::LOCATION to ISD::DEBUG_LOC
instead of ISD::LABEL with a manual .debug_line entry when the assembler
supports .file and .loc directives.

llvm-svn: 42278
2007-09-24 21:54:14 +00:00
Dan Gohman 3165699e4b Don't emit .debug_line header data if there aren't any lines to put in it,
such as will happen when .loc directives are used.

llvm-svn: 42277
2007-09-24 21:43:52 +00:00
Dan Gohman 9b00c07be5 Move the Asm->EOL() call for EmitDebugARanges outside the #ifdef for
consistency with the other currently empty sections.

llvm-svn: 42276
2007-09-24 21:36:21 +00:00
Dan Gohman 0baf84b2e1 Add support for emitting .file directives to set up file numbers for
use with .loc directives.

llvm-svn: 42275
2007-09-24 21:32:18 +00:00
Dan Gohman 0cc9d1b93b Merge hasDotLoc and hasDotFile into hasDotLocAndDotFile since .loc and .file
aren't really usable without each other. 

llvm-svn: 42274
2007-09-24 21:09:53 +00:00
Dale Johannesen 5026f4ba93 float->int conversion rounds toward 0. Duh.
Fixes PR1698.

llvm-svn: 42273
2007-09-24 21:06:09 +00:00
Dan Gohman bd8331da87 Add a routine for emitting .file directives, for setting up
file numbers to use with .loc directives.

llvm-svn: 42272
2007-09-24 20:58:13 +00:00
Bruno Cardoso Lopes 6d5ada23db Added "LoadEffective" pattern to handle stack locations.
Fixed some comments

llvm-svn: 42271
2007-09-24 20:15:11 +00:00
Devang Patel 9e30e1a3be Do not promote null values because it may be unsafe to do so.
llvm-svn: 42270
2007-09-24 20:02:42 +00:00