summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Also transform "a < b" to "(b - a) > 0" in the constraint manager.Jordan Rose2013-03-232-15/+61
| | | | | | | | | | | | We can support the full range of comparison operations between two locations by canonicalizing them as subtraction, as in the previous commit. This won't work (well) if either location includes an offset, or (again) if the comparisons are not consistent about which region comes first. <rdar://problem/13239003> llvm-svn: 177803
* Add reverseComparisonOp and negateComparisonOp to BinaryOperator.Jordan Rose2013-03-233-46/+32
| | | | | | ...and adopt them in the analyzer. llvm-svn: 177802
* [analyzer] Translate "a != b" to "(b - a) != 0" in the constraint manager.Jordan Rose2013-03-234-23/+101
| | | | | | | | | | | | | | | | | | | | | | | Canonicalizing these two forms allows us to better model containers like std::vector, which use "m_start != m_finish" to implement empty() but "m_finish - m_start" to implement size(). The analyzer should have a consistent interpretation of these two symbolic expressions, even though it's not properly reasoning about either one yet. The other unfortunate thing is that while the size() expression will only ever be written "m_finish - m_start", the comparison may be written "m_finish == m_start" or "m_start == m_finish". Right now the analyzer does not attempt to canonicalize those two expressions, since it doesn't know which length expression to pick. Doing this correctly will probably require implementing unary minus as a new SymExpr kind (<rdar://problem/12351075>). For now, the analyzer inverts the order of arguments in the comparison to build the subtraction, on the assumption that "begin() != end()" is written more often than "end() != begin()". This is purely speculation. <rdar://problem/13239003> llvm-svn: 177801
* [analyzer] Use SymExprs to represent '<loc> - <loc>' and '<loc> == <loc>'.Jordan Rose2013-03-232-17/+34
| | | | | | | | | | We just treat this as opaque symbols, but even that allows us to handle simple cases where the same condition is tested twice. This is very common in the STL, which means that any project using the STL gets spurious errors. Part of <rdar://problem/13239003>. llvm-svn: 177800
* <rdar://problem/13315663>Enrico Granata2013-03-231-9/+32
| | | | | | | | commands of the form frame variable -f c-string foo where foo is an arbitrary pointer (e.g. void*) now do the right thing, i.e. they deref the pointer and try to get a c-string at the pointed address instead of dumping the pointer bytes as a string. the old behavior is used as a fallback if things don’t go well llvm-svn: 177799
* Cloog: Add virtual destructor to silence gcc warningTobias Grosser2013-03-231-0/+1
| | | | | | | | | This silences the following warning: 'polly::ClastVisitor' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor] llvm-svn: 177798
* documentation parsing: when providing code completion commentFariborz Jahanian2013-03-232-2/+29
| | | | | | | for a getter used in property-dot syntax, if geter has its own comment use it. // rdar://12791315 llvm-svn: 177797
* clang-format: Many more filesTobias Grosser2013-03-2346-1339/+1156
| | | | | | | | | | | | | After this commit, polly is clang-format clean. This can be tested with 'ninja polly-check-format'. Updates to clang-format may change this, but the differences will hopefully be both small and general improvements to the formatting. We currently have some not very nice formatting for a couple of items, DEBUG() stmts for example. I believe the benefit of being clang-format clean outweights the not perfect layout of this code. llvm-svn: 177796
* cmake: Do not clang-format check the externally imported json libraryTobias Grosser2013-03-231-0/+2
| | | | llvm-svn: 177795
* If there are multiple uses of an Objective-CSean Callanan2013-03-231-8/+12
| | | | | | | | | class symbol in the same expression, handle all of them instead of just the first one. <rdar://problem/13440133> llvm-svn: 177794
* Only get the script interpreter if we find scripting resources in the symbol ↵Greg Clayton2013-03-231-13/+13
| | | | | | file. This helps us avoid initializing python when it isn't needed. llvm-svn: 177793
* Don't need to resolve the .o file path.Greg Clayton2013-03-231-1/+1
| | | | llvm-svn: 177792
* Make sure the "Release" builds link against the "Release" LLDB.framework and ↵Greg Clayton2013-03-233-21/+30
| | | | | | also output the results to /dev/stdout when no outfile is supplied. llvm-svn: 177791
* Change debugserver to open the socket it listensJason Molenda2013-03-233-10/+22
| | | | | | | | | | | | | | | to in INADDR_LOOPBACK mode by default ("localhost only") instead of INADDR_ANY ("accept connections from any system"). Add a new command line argument to debugserver, --open-connection or -H which will enable the previous behavior. It would be used if you were doing two-system debugging, with lldb running on one system and debugserver running on the other. But it is a less common workflow and should not be the default. <rdar://problem/12583284> llvm-svn: 177790
* [analyzer] Warn when a nil key or value are passed to NSMutableDictionary ↵Anna Zaks2013-03-232-22/+136
| | | | | | and ensure it works with subscripting. llvm-svn: 177789
* [analyzer] Correct the stale comment.Anna Zaks2013-03-231-3/+3
| | | | llvm-svn: 177788
* RegisterPasses: clang-formatTobias Grosser2013-03-231-76/+61
| | | | llvm-svn: 177787
* Instvarsimplify: clang-formatTobias Grosser2013-03-231-269/+278
| | | | | | | Even though we will soon get rid of this pass, we reformat it on the way to make polly clang-format clean. llvm-svn: 177786
* IndependentBlocks: clang-format and remove includesTobias Grosser2013-03-231-59/+52
| | | | llvm-svn: 177785
* Build and install .syms files alongside sanitizer runtimes. These are used toRichard Smith2013-03-239-7/+24
| | | | | | | specify which symbols are exported to DSOs when the sanitizer is statically linked into a binary. llvm-svn: 177784
* If a .syms file is available alongside a sanitizer runtime, pass it to theRichard Smith2013-03-2313-9/+33
| | | | | | | | linker via --dynamic-list instead of using --export-dynamic. This reduces the size of the dynamic symbol table, and thus of the binary (in some cases by up to ~30%). llvm-svn: 177783
* DeadCodeElimination: clang-format and commentTobias Grosser2013-03-231-23/+22
| | | | llvm-svn: 177782
* CodePreparation: Comment and format the file properlyTobias Grosser2013-03-231-72/+70
| | | | llvm-svn: 177781
* Fix comparison of mixed signednessHal Finkel2013-03-231-1/+1
| | | | | | | | | | | 177774 broke the lld-x86_64-darwin11 builder; error: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') for (SI = 0; SI < Scavenged.size(); ++SI) ~~ ^ ~~~~~~~~~~~~~~~~ Fix this by making SI also unsigned. llvm-svn: 177780
* Fix a little fallout from the changes in r174757 where we wouldJason Molenda2013-03-231-9/+0
| | | | | | | | skip every other float/double/long double as we extracted data from a buffer. <rdar://problem/13485062> llvm-svn: 177779
* [docs] Slight reword for precision.Sean Silva2013-03-221-1/+1
| | | | | | | | The new wording cannot be construed as suggesting the use of SmallVectorImpl<T> as e.g. a class member (just because the class happens to be in an interface). llvm-svn: 177778
* codegen: properly instantiate SCEVs to the place where they are usedTobias Grosser2013-03-223-33/+61
| | | | | | | | | | | | | | | | | | | | Given the following code for (i = 0; i < 10; i++) { ; } S: A[i] = 0 When code generating S using scev based code generation, we need to retrieve the scev of 'i' at the location of 'S'. If we do not do this the scev that we obtain will be expressed as {0,+,1}_for and will reference loop iterators that do not surround 'S' and that we consequently do not know how to code generate. What we really want is the scev to be instantiated to the value of 'i' after the loop. This value is {10} and it can be code generated without troubles. llvm-svn: 177777
* Don't bother calling Reserve on the vector unless we have entries to be added.Jason Molenda2013-03-221-1/+2
| | | | llvm-svn: 177776
* [docs] Document usage of SmallVectorImpl in interfaces.Sean Silva2013-03-221-0/+27
| | | | llvm-svn: 177775
* Allow the register scavenger to spill multiple registersHal Finkel2013-03-2210-43/+84
| | | | | | | | | | | | | | | | | | This patch lets the register scavenger make use of multiple spill slots in order to guarantee that it will be able to provide multiple registers simultaneously. To support this, the RS's API has changed slightly: setScavengingFrameIndex / getScavengingFrameIndex have been replaced by addScavengingFrameIndex / isScavengingFrameIndex / getScavengingFrameIndices. In forthcoming commits, the PowerPC backend will use this capability in order to implement the spilling of condition registers, and some special-purpose registers, without relying on r0 being reserved. In some cases, spilling these registers requires two GPRs: one for addressing and one to hold the value being transferred. llvm-svn: 177774
* Add a Reserve method to RangeVector and RangeDataVector. Have theJason Molenda2013-03-222-2/+16
| | | | | | | | DWARFCallFrameInfo method which returns a RangeVector pre-size the vector based on the number of entries it will be adding insted of growing the vector as items are added. llvm-svn: 177773
* Support in AAEvaluator to print alias queries of loads/stores with TBAA tags.Manman Ren2013-03-222-0/+176
| | | | | | | | | Add "evaluate-tbaa" to print alias queries of loads/stores. Alias queries between pointers do not include TBAA tags. Add testing case for "placement new". TBAA currently says NoAlias. llvm-svn: 177772
* ScopInfo: do not call getCanonicalInductionVariable for SCEVCodegenSebastian Pop2013-03-221-5/+7
| | | | llvm-svn: 177771
* Kill every call to @clang.arc.use in the ARC contract phase.John McCall2013-03-226-3/+33
| | | | llvm-svn: 177769
* Use RequireCompleteType() instead of isIncompleteType().Bill Wendling2013-03-222-2/+11
| | | | | | | | | | | | isIncompleteType() returns true or false for template types depending on whether the type is instantiated yet. In this context, that's arbitrary. The better way to check for a complete type is RequireCompleteType(). Thanks to Eli Friedman for noticing this! <rdar://problem/12700799> llvm-svn: 177768
* Add test case for PR 12921.Ted Kremenek2013-03-221-0/+19
| | | | llvm-svn: 177767
* <rdar://problem/13479539> Only rebuild the global module cache when we're ↵Douglas Gregor2013-03-221-1/+2
| | | | | | | | allowed to. This eliminates excessive rebuilds of the global module cache. llvm-svn: 177766
* Revert "[analyzer] Break cycles (optionally) when trimming an ExplodedGraph."Jordan Rose2013-03-223-24/+4
| | | | | | | | | | | | | | The algorithm used here was ridiculously slow when a potential back-edge pointed to a node that already had a lot of successors. The previous commit makes this feature unnecessary anyway. This reverts r177468 / f4cf6b10f863b9bc716a09b2b2a8c497dcc6aa9b. Conflicts: lib/StaticAnalyzer/Core/BugReporter.cpp llvm-svn: 177765
* [analyzer] Use a forward BFS instead of a reverse BFS to find shortest paths.Jordan Rose2013-03-221-150/+93
| | | | | | | | | | | | | | | | | | | | | | | | | For a given bug equivalence class, we'd like to emit the report with the shortest path. So far to do this we've been trimming the ExplodedGraph to only contain relevant nodes, then doing a reverse BFS (starting at all the error nodes) to find the shortest paths from the root. However, this is fairly expensive when we are suppressing many bug reports in the same equivalence class. r177468-9 tried to solve this problem by breaking cycles during graph trimming, then updating the BFS priorities after each suppressed report instead of recomputing the whole thing. However, breaking cycles is not a cheap operation because an analysis graph minus cycles is still a DAG, not a tree. This fix changes the algorithm to do a single forward BFS (starting from the root) and to use that to choose the report with the shortest path by looking at the error nodes with the lowest BFS priorities. This was Anna's idea, and has the added advantage of requiring no update step: we can just pick the error node with the next lowest priority to produce the next bug report. <rdar://problem/13474689> llvm-svn: 177764
* [analyzer] Fix test to actually test what was intended.Jordan Rose2013-03-221-2/+2
| | | | llvm-svn: 177763
* [analyzer] Fix ExprEngine::ViewGraph to handle C++ initializers.Jordan Rose2013-03-222-40/+59
| | | | | | Debugging aid only, no functionality change. llvm-svn: 177762
* [PCH/Modules] De/Serialize MacroInfos separately than MacroDirectives.Argyrios Kyrtzidis2013-03-2210-336/+600
| | | | | | | | | -Serialize the macro directives history into its own section -Get rid of the macro updates section -When de/serializing an identifier from a module, associate only one macro per submodule that defined+exported it. llvm-svn: 177761
* [modules] When a MacroInfo object is deserialized, allocate and store its ↵Argyrios Kyrtzidis2013-03-225-2/+43
| | | | | | submodule ID. llvm-svn: 177760
* Added option parsing to the lldb_perf_clang performance test.Greg Clayton2013-03-221-9/+225
| | | | llvm-svn: 177759
* Update test. There may be multiple catches, but those will be cleaned up.Bill Wendling2013-03-221-0/+5
| | | | llvm-svn: 177758
* Add all clauses when merging the landing pads. Duplicates will be handled ↵Bill Wendling2013-03-221-24/+14
| | | | | | later on. llvm-svn: 177757
* Swap the DIFile in DILexicalBlockFile out for the raw name/directory pairDavid Blaikie2013-03-223-11/+1
| | | | | | This is the last change in transitioning all DIScopes to have a common prefix. llvm-svn: 177756
* Test cleanup with respect to use of deprecated tmpnam function. Also ↵Howard Hinnant2013-03-2225-184/+205
| | | | | | Windows port for these tests to use _tempnam. The bulk of this patch was donated anonymously. I've tested it on OS X and accept responsibility for it. If I've broken anyone's platform by switching from tmpnam to mktemp for the generation of temporary file names, just let me know. Should be easy to fix in test/support/platform_support.h llvm-svn: 177755
* reorder the fields in DILexicalBlockFile to match the common prefix for DIScopesDavid Blaikie2013-03-223-23/+29
| | | | llvm-svn: 177754
* [ms-cxxabi] Implement member data pointers for non-dynamic classesReid Kleckner2013-03-224-10/+181
| | | | | | | | | | | | | | | | | | | | Summary: For non-dynamic classes (no virtual bases), member data pointers are simple offsets from the base of the record. Dynamic classes use an aggregate for member data pointers and are therefore currently unsupported. Unlike Itanium, the ms ABI uses 0 to represent null for polymorphic classes. Non-polymorphic classes use -1 like Itanium, since 0 is a valid field offset. Reviewers: rjmccall CC: timurrrr, cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D558 llvm-svn: 177753
OpenPOWER on IntegriCloud