Commit Graph

45251 Commits

Author SHA1 Message Date
Chris Lattner 9ff58d7caf Fix PR2020 by recovering by defining an anonymous enum, instead of recovering
by filling in the body of a union with enum constants.

llvm-svn: 53069
2008-07-03 03:30:58 +00:00
Dan Gohman b261292917 Reapply r52988, "Simplify addRegisterKilled and addRegisterDead." The
254.gap failure was not due to this mod.

llvm-svn: 53068
2008-07-03 01:18:51 +00:00
Dan Gohman 99e6237ba7 Use operator new instead of new char[].
llvm-svn: 53067
2008-07-03 00:59:36 +00:00
Dan Gohman 7722f791f6 Use operator new instead of new char[].
llvm-svn: 53066
2008-07-03 00:53:09 +00:00
Dan Gohman f3c4d7f877 Avoid unnecessarily copying APInt objects.
llvm-svn: 53065
2008-07-03 00:52:03 +00:00
Dan Gohman 4c6db53a36 Correct a comment.
llvm-svn: 53064
2008-07-03 00:51:05 +00:00
Evan Cheng 9f8b66f3f1 Use std::replace instead of std::find and push_back.
llvm-svn: 53063
2008-07-03 00:28:27 +00:00
Devang Patel 7dcfff392a Undo previous patch. It is not that simple to fix dom info here.
llvm-svn: 53062
2008-07-03 00:08:13 +00:00
Evan Cheng 7a265d83bf - Add LiveVariables::replaceKillInstruction. This does a subset of instructionChanged. That is, it only update the VarInfo.kills if the new instruction is known to have the correct dead and kill markers.
- CommuteInstruction copies kill / dead markers over to new instruction. So use replaceKillInstruction instead.

llvm-svn: 53061
2008-07-03 00:07:19 +00:00
Evan Cheng c939f45fe7 commuteInstruction should preserve dead markers.
llvm-svn: 53060
2008-07-03 00:04:51 +00:00
Owen Anderson 30cc028e4a Make LiveVariables even more optional, by making it optional in the call to TargetInstrInfo::convertToThreeAddressInstruction
Also, if LV isn't around, then TwoAddr doesn't need to be updating flags, since they won't have been set in the first place.

llvm-svn: 53058
2008-07-02 23:41:07 +00:00
Dan Gohman 22e9707480 Replace a few uses of SelectionDAG::getTargetNode with
SelectionDAG::SelectNodeTo in the instruction selector. This
updates existing nodes in place instead of creating new ones.

Go back to selecting ISD::DBG_LABEL nodes into
TargetInstrInfo::DBG_LABEL nodes instead of leaving them
unselected, now that SelectNodeTo allows us to update them
in place.

llvm-svn: 53057
2008-07-02 23:23:19 +00:00
Ted Kremenek 80025c257f Update test case with new clang arguments.
llvm-svn: 53056
2008-07-02 23:18:57 +00:00
Ted Kremenek e6b2fa5029 Update test case: simply running "clang -checker-simple" doesn't invoke the dead store checker anymore. We need "-warn-dead-stores" as well.
llvm-svn: 53055
2008-07-02 23:18:22 +00:00
Ted Kremenek c7efb536d5 Unify the code path for the Dead Stores checker to always use the BugReporter interface.
llvm-svn: 53054
2008-07-02 23:16:33 +00:00
Ted Kremenek f1f17555bd ccc-analyzer now dispatches the options "-checker-cfref" and "-warn-dead-stores" to clang instead of just "-checker-cfref".
llvm-svn: 53053
2008-07-02 23:16:10 +00:00
Devang Patel 5adfcb5783 Preserve dom info while simplifing loop after the unswitch.
llvm-svn: 53052
2008-07-02 22:58:54 +00:00
Eric Christopher 30f1d3f0db Add a couple more helper functions to deal with
creating global constant strings and pointers
to global constant strings.

llvm-svn: 53051
2008-07-02 22:57:59 +00:00
Dan Gohman 1b46bfecfe Revert r52988. It broke 254.gap on x86-64.
llvm-svn: 53050
2008-07-02 22:12:55 +00:00
Owen Anderson 8c10c2482a TwoAddressInstructionPass doesn't really require LiveVariables, it just needs to update it if it's already around.
llvm-svn: 53049
2008-07-02 21:28:58 +00:00
Ted Kremenek b1d0118a1a Refactored some of the BugReporter interface so that data such as the ASTContext&, PathDiagnosticClient*, can be provided by an external source.
Split BugReporter into BugReporter and GRBugReporter so checkers not based on GRExprEngine can still use the BugReporter mechanism.

llvm-svn: 53048
2008-07-02 21:24:01 +00:00
Chuck Rose III 6d161f1fd3 VStudio x64 build fixes. Looks like the x64 projects got out of date and this brings them up to code. I've built the project with these new vcproj files for win32 and x64 both debug and release.
llvm-svn: 53047
2008-07-02 21:02:51 +00:00
Ted Kremenek 125d4a3b2d GRExprEngine now expects the LiveVariables information to be provided by its creator.
This allows an optimization in AnalysisConsumer where the same LiveVariables information is used between multiple analyses.

llvm-svn: 53046
2008-07-02 20:13:38 +00:00
Owen Anderson abfd3a8162 Use ADCE instead of just DCE. ADCE will better clean up after jump threading,
for instance.

llvm-svn: 53045
2008-07-02 18:42:07 +00:00
Owen Anderson 488b89f608 Use df_ext_iterator to capture the reachable set without allocating an extra set.
Also, move large sets and vectors out of instance variables and onto the stack,
and give them more reasonable sizes.

llvm-svn: 53044
2008-07-02 18:41:09 +00:00
Ted Kremenek d8ca1f6dd9 Added version of CheckDeadStores that accepts a client-provided LiveVariables object.
Modified the DeadStores logic in AnalysisConsumer.cpp to use the LiveVariables object created by the AnalysisManager.

llvm-svn: 53043
2008-07-02 18:39:20 +00:00
Ted Kremenek c3b30340d9 Added method "HandleTranslationUnit" to ASTConsumer. This is called by ParseAST when all of the ASTs in a translation unit have been built.
llvm-svn: 53042
2008-07-02 18:32:45 +00:00
Ted Kremenek f992cfb4ab Moved logic for -dump-cfg and -view-cfg into AnalysisConsumer.
Renamed -dump-cfg to -cfg-dump, and -view-cfg to -cfg-view.  This naming better matches the same options for asts (e.g. -ast-dump).

llvm-svn: 53041
2008-07-02 18:23:21 +00:00
Owen Anderson 6acc782dad Avoid a redundant call.
llvm-svn: 53040
2008-07-02 18:15:31 +00:00
Ted Kremenek bdbe6130f4 Move -dump-live-variables logic to AnalysisConsumer.
llvm-svn: 53039
2008-07-02 18:11:29 +00:00
Owen Anderson 323b5755a6 Add support to ADCE for pruning unreachable blocks. This addresses the final
part of PR2509.

llvm-svn: 53038
2008-07-02 18:05:19 +00:00
Mon P Wang 2cf56ce269 Make the default min align of CreateStackTemporary to be 1
llvm-svn: 53036
2008-07-02 17:50:10 +00:00
Duncan Sands 739a0548c4 Add a new getMergeValues method that does not need
to be passed the list of value types, and use this
where appropriate.  Inappropriate places are where
the value type list is already known and may be
long, in which case the existing method is more
efficient.

llvm-svn: 53035
2008-07-02 17:40:58 +00:00
Owen Anderson 9edcf24da9 Use DenseSet rather than SmallPtrSet for the alive set. Using SmallPtrSet
with a huge "size" parameter is actually quite inefficient.

llvm-svn: 53034
2008-07-02 17:32:04 +00:00
Owen Anderson 286d0c40c3 Have DenseSet::insert return a bool indicating whether the insertion succeeded or not.
llvm-svn: 53033
2008-07-02 17:29:59 +00:00
Owen Anderson b22a640fe4 A better fix for PR2503 that doesn't pessimize GVN in the presence of unreachable blocks.
llvm-svn: 53032
2008-07-02 17:20:16 +00:00
Mon P Wang 4b7c1acf26 Fixed problem in EmitStackConvert where the source and target type
have different alignment by creating a stack slot with the max
alignment of source and target type.

llvm-svn: 53031
2008-07-02 17:07:12 +00:00
Chris Lattner 6b2c4f6143 instead of aborting on shifts of i1, just implicitly fold them.
The dag combiner can produce a shift of i1 when folding icmp i1's.

llvm-svn: 53030
2008-07-02 17:01:57 +00:00
Ted Kremenek 71ac83246f Migrate CheckerConsumer diagnostics to the new AnalysisConsumer interface.
Remove CheckerConsumer.

llvm-svn: 53029
2008-07-02 16:49:11 +00:00
Ted Kremenek becec2cbbc Move logic for "-checker-simple" to the new AnalysisConsumer interface.
llvm-svn: 53028
2008-07-02 16:35:50 +00:00
Chris Lattner 5cc931d409 add a description of what sema and parser mean, add C++ style casts.
llvm-svn: 53027
2008-07-02 16:28:43 +00:00
Ted Kremenek 494e98d0e5 Fix typo in test case.
llvm-svn: 53024
2008-07-02 15:28:06 +00:00
Argyrios Kyrtzidis 1b1a711eb3 Add note that most of C++ is not supported.
llvm-svn: 53023
2008-07-02 15:10:46 +00:00
Argyrios Kyrtzidis c8619b5b15 Set CSS defaults for tables.
llvm-svn: 53022
2008-07-02 14:42:28 +00:00
Argyrios Kyrtzidis fd2012b04d Drop 'C++' from the features; suggestion by Holger Schurig.
llvm-svn: 53020
2008-07-02 14:16:29 +00:00
Matthijs Kooijman a5d95540f5 Update link to testing guide to use the new title.
llvm-svn: 53018
2008-07-02 13:54:58 +00:00
Argyrios Kyrtzidis d2082befe5 Fix the page title.
llvm-svn: 53017
2008-07-02 13:44:11 +00:00
Gabor Greif dedda503cb minor tweaks, escape < and >
llvm-svn: 53016
2008-07-02 12:34:47 +00:00
Gabor Greif a5cb073c5c add two popular c++ features
llvm-svn: 53015
2008-07-02 12:31:13 +00:00
Gabor Greif 731d70b2d6 add c++ status link
llvm-svn: 53014
2008-07-02 12:18:17 +00:00