summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Teach libc++ to check for libc++abi and use its features if they're available.Richard Smith2012-07-111-8/+11
| | | | llvm-svn: 160038
* Refactor the DAG Legalizer by extracting the legalization ofNadav Rotem2012-07-111-422/+434
| | | | | | | Load and Store nodes into their own functions. No functional change. llvm-svn: 160037
* Only apply the SETCC+SITOFP -> SELECTCC optimization when the SETCC returns ↵Owen Anderson2012-07-111-1/+2
| | | | | | | | an MVT::i1, i.e. before type legalization. This is a speculative fix for a problem on Mips reported by Akira Hatanaka. llvm-svn: 160036
* Don't process #pragma visibility during instantiation. The visibility of theRafael Espindola2012-07-112-1/+15
| | | | | | | instantiation depends on the template, its arguments and parameters, but not where it is instantiated. llvm-svn: 160034
* The end of a block doesn't necessarily need a line table entry unlessEric Christopher2012-07-113-6/+24
| | | | | | | | | | there's something going on there. Remove the unconditional line entry and only add one if we're emitting cleanups (any other statements would be handled normally). Fixes rdar://9199234 llvm-svn: 160033
* FileCheck-ize.Eric Christopher2012-07-111-3/+4
| | | | llvm-svn: 160032
* Lower RETURNADDR node in Mips backend.Akira Hatanaka2012-07-114-5/+54
| | | | | | Patch by Sasa Stankovic. llvm-svn: 160031
* [analyzer] Add debug.DumpCalls, which prints out any CallEvents it sees.Jordan Rose2012-07-104-2/+55
| | | | | | | | | | This is probably not so useful yet because it is not path-sensitive, though it does try to show inlining with indentation. This also adds a dump() method to CallEvent, which should be useful for debugging. llvm-svn: 160030
* [analyzer] Guard against C++ member functions that look like system functions.Jordan Rose2012-07-106-43/+87
| | | | | | | | | C++ method calls and C function calls both appear as CallExprs in the AST. This was causing crashes for an object that had a 'free' method. <rdar://problem/11822244> llvm-svn: 160029
* Mips specific inline asm operand modifier 'L'.Jack Carter2012-07-102-15/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Low order register of a double word register operand. Operands are defined by the name of the variable they are marked with in the inline assembler code. This is a way to specify that the operand just refers to the low order register for that variable. It is the opposite of modifier 'D' which specifies the high order register. Example: main() { long long ll_input = 0x1111222233334444LL; long long ll_val = 3; int i_result = 0; __asm__ __volatile__( "or %0, %L1, %2" : "=r" (i_result) : "r" (ll_input), "r" (ll_val)); } Which results in: lui $2, %hi(_gp_disp) addiu $2, $2, %lo(_gp_disp) addiu $sp, $sp, -8 addu $2, $2, $25 sw $2, 0($sp) lui $2, 13107 ori $3, $2, 17476 <-- Low 32 bits of ll_input lui $2, 4369 ori $4, $2, 8738 <-- High 32 bits of ll_input addiu $5, $zero, 3 <-- Low 32 bits of ll_val addiu $2, $zero, 0 <-- High 32 bits of ll_val #APP or $3, $4, $5 <-- or i_result, high 32 ll_input, low 32 of ll_val #NO_APP addiu $sp, $sp, 8 jr $ra If not direction is done for the long long for 32 bit variables results in using the low 32 bits as ll_val shows. There is an existing bug if 'L' or 'D' is used for the destination register for 32 bit long longs in that the target value will be updated incorrectly for the non-specified part unless explicitly set within the inline asm code. llvm-svn: 160028
* Require and preserve LoopInfo for early if-conversion.Jakob Stoklund Olesen2012-07-101-0/+17
| | | | | | It will surely be needed by heuristics. llvm-svn: 160027
* Teach the LiveInterval::join function to use the fast merge algorithm,Chandler Carruth2012-07-102-15/+18
| | | | | | | | | | | generalizing its implementation sufficiently to support this value number scenario as well. This cuts out another significant performance hit in large functions (over 10k basic blocks, etc), especially those with "natural" CFG structures. llvm-svn: 160026
* Run early if-conversion in domtree post-order.Jakob Stoklund Olesen2012-07-101-49/+60
| | | | | | | | | | | This ordering allows nested if-conversion without using a work list, and it makes it possible to update the dominator tree on the fly as well. Any erased basic blocks will always be dominated by the current post-order position, so the domtree can be pruned without invalidating the iterator. llvm-svn: 160025
* Fix crash when constant-evaluating a CXXConstructExpr representingRichard Smith2012-07-102-8/+17
| | | | | | | value-initialization for an array of class type with a trivial default constructor. llvm-svn: 160024
* [analyzer] Construct stack variables directly in their VarDecl.Jordan Rose2012-07-104-39/+80
| | | | | | | | Also contains a number of tweaks to inlining that are necessary for constructors and destructors. (I have this enabled on a private branch, but it is very much unstable.) llvm-svn: 160023
* [analyzer] Use CallEvent for building inlined stack frames.Jordan Rose2012-07-109-148/+148
| | | | | | | | | | In order to accomplish this, we now build the callee's stack frame as part of the CallEnter node, rather than the subsequent BlockEdge node. This should not have any effect on perceived behavior or diagnostics. This makes it safe to re-enable inlining of member overloaded operators. llvm-svn: 160022
* [analyzer] Make CallEnter, CallExitBegin, and CallExitEnd not be StmtPointsJordan Rose2012-07-109-56/+102
| | | | | | | These ProgramPoints are used in inlining calls, and not all calls have associated statements anymore. llvm-svn: 160021
* [analyzer] Add a CXXDestructorCall CallEvent.Jordan Rose2012-07-105-24/+64
| | | | | | | | While this work is still fairly tentative (destructors are still left out of the CFG by default), we now handle destructors in the same way as any other calls, instead of just automatically trying to inline them. llvm-svn: 160020
* [analyzer] Add new PreImplicitCall and PostImplicitCall ProgramPoints.Jordan Rose2012-07-109-52/+150
| | | | | | | | | | | | | | | | | These are currently unused, but are intended to be used in lieu of PreStmt and PostStmt when the call is implicit (e.g. an automatic object destructor). This also modifies the Data1 field of ProgramPoints to allow storing any pointer-sized value, as opposed to only aligned pointers. This is necessary to store SourceLocations. There is currently no BugReporter support for these; they should be skipped over in any diagnostic output. This commit also tags checkers that currently rely on function calls only occurring at StmtPoints. llvm-svn: 160019
* Thread safety analysis: impove handling of trylock expressions.DeLesley Hutchins2012-07-102-3/+167
| | | | llvm-svn: 160018
* 80-column violations and whitespace.Chad Rosier2012-07-101-13/+15
| | | | llvm-svn: 160017
* Fixed a hang which causes LLDB to enter an infiniteSean Callanan2012-07-101-4/+37
| | | | | | | | | | | | | loop if "memory read" is run with the -t option and the type name contains a keyword like "struct" that isn't followed by a space. Now if a keyword isn't followed by a space we continue searching after it, instead of at the beginning of the type name. Also optimized the code to not call strlen() on a fixed set of statically-declared constant strings. llvm-svn: 160016
* Add more matchers and do cleanups.Daniel Jasper2012-07-105-358/+884
| | | | | | | | Reviewers: klimek Differential Revision: http://ec2-50-18-127-156.us-west-1.compute.amazonaws.com/D2 llvm-svn: 160013
* Turning the interpreter mutex into a static global to avoid a potential ↵Enrico Granata2012-07-101-2/+2
| | | | | | leak. Might need to be turned back into a pointer if it causes issues with the destructor chain. llvm-svn: 160012
* Move [get|set]BasePtrStackAdjustment() from MachineFrameInfo toChad Rosier2012-07-103-19/+19
| | | | | | | X86MachineFunctionInfo as this is currently only used by X86. If this ever becomes an issue on another arch (e.g., ARM) then we can hoist it back out. llvm-svn: 160009
* <rdar://problem/11751427> Fixing an issue where multiple threads could ↵Enrico Granata2012-07-101-0/+10
| | | | | | concurrently try and initialize Python and cause crashes llvm-svn: 160008
* Add newline.Chad Rosier2012-07-101-1/+1
| | | | llvm-svn: 160006
* Add test case accidentally omitted from r160002.Chad Rosier2012-07-101-0/+242
| | | | llvm-svn: 160004
* Add support for dynamic stack realignment in the presence of dynamic allocas onChad Rosier2012-07-107-19/+139
| | | | | | | | | | | | | X86. Basically, this is a reapplication of r158087 with a few fixes. Specifically, (1) the stack pointer is restored from the base pointer before popping callee-saved registers and (2) in obscure cases (see comments in patch) we must cache the value of the original stack adjustment in the prologue and apply it in the epilogue. rdar://11496434 llvm-svn: 160002
* Disable death tests on platforms which don't support them.Benjamin Kramer2012-07-101-0/+2
| | | | llvm-svn: 160000
* Adds support for auto-detection of compilation databases, looking in a ↵Arnaud A. de Grandmaison2012-07-104-13/+56
| | | | | | directory and all its parents. llvm-svn: 159998
* Improve r159256 following Chandler's comments:Axel Naumann2012-07-102-11/+10
| | | | | | Implement UniqueFileContainer::erase(), camelCase, add comment on future optimizations of the cache versus de-optimizations of invalidations. llvm-svn: 159997
* [analyzer] Remove redundant check (scalar type is a superset of integer)Anna Zaks2012-07-101-2/+1
| | | | | | PR13319 Reported by Jozsef Mihalicza. llvm-svn: 159996
* Clear diagnostic counts after processing the diagnostics.Axel Naumann2012-07-101-0/+3
| | | | | | The consumer might see multiple input files (e.g. for cling) and since r159977 the count is maintained across input files. llvm-svn: 159995
* Fix a bug where I didn't test for an empty range before inspecting theChandler Carruth2012-07-101-1/+2
| | | | | | | | | | | | | | | back of it. I don't have anything even remotely close to a test case for this. It only broke two build bots, both of them doing bootstrap builds, one of them a dragonegg bootstrap. It doesn't break for me when I bootstrap either. It doesn't reproduce every time or on many machines during the bootstrap. Many thanks to Duncan Sands who got the exact command (and stage of the bootstrap) which failed on the dragonegg bootstrap and managed to get it to trigger under valgrind with debug symbols. The fix was then found by inspection. llvm-svn: 159993
* Fixes the MSVC build.Manuel Klimek2012-07-104-0/+14
| | | | llvm-svn: 159992
* Improve the loading of load-anyext vectors by allowing the codegen to loadNadav Rotem2012-07-105-40/+73
| | | | | | | | | multiple scalars and insert them into a vector. Next, we shuffle the elements into the correct places, as before. Also fix a small dagcombine bug in SimplifyBinOpWithSameOpcodeHands, when the migration of bitcasts happened too late in the SelectionDAG process. llvm-svn: 159991
* Adds support for auto-detection of compilation databasesManuel Klimek2012-07-1014-32/+88
| | | | | | | | | | from a source file and changes clang-check to make use of this. This makes clang-check just work on in-tree builds, and allows easy setup via a symlink per source directory to make clang-check work without any extra configuration. llvm-svn: 159990
* Fix instruction description of VMOV (between two ARM core registers and two ↵Richard Barton2012-07-104-9/+49
| | | | | | single-precision resiters) (and do it properly this time! llvm-svn: 159989
* [Sanitizer] fix CMake buildAlexey Samsonov2012-07-103-2/+3
| | | | llvm-svn: 159988
* Update the docs with specifics about escaping of compile commands.Manuel Klimek2012-07-101-1/+3
| | | | llvm-svn: 159987
* [ASan] move flags description to separate header, add comments about them.Alexey Samsonov2012-07-104-47/+102
| | | | llvm-svn: 159985
* Reverse assembler/disassembler operand order for gather instructions.Craig Topper2012-07-103-52/+27
| | | | llvm-svn: 159983
* Add an efficient merge operation to LiveInterval and use it to avoidChandler Carruth2012-07-102-32/+135
| | | | | | | | | | | quadratic behavior when performing pathological merges. Fixes the core element of PR12652. There is only one user of addRangeFrom left: join. I'm hoping to refactor further in a future patch and have join use this merge operation as well. llvm-svn: 159982
* Teach LiveIntervals how to verify themselves and start using it in someChandler Carruth2012-07-102-0/+42
| | | | | | | | | | of the trick merge routines. This adds a layer of testing that was necessary when implementing more efficient (and complex) merge logic for this datastructure. No functionality changed here. llvm-svn: 159981
* Jordan points out that this was incorrect: clang should recover fromChris Lattner2012-07-101-2/+1
| | | | | | | | *errors* with fixits on them by following the recovery advised by the fixit, but if it is a fixit on a warning, then obviously the AST should be for the code as-written. llvm-svn: 159980
* Allow -verify directives to specify a min and max count, not just "+".Jordan Rose2012-07-103-27/+71
| | | | | | | | | | | void f(); // expected-note 0+ {{previous declaration is here}} void g(); // expected-note 0-1 {{previous declaration is here}} The old "+" syntax is still an alias for "1+", and single numbers still work. Patch by Andy Gibbs! llvm-svn: 159979
* Allow line numbers on -verify directives.Jordan Rose2012-07-104-60/+110
| | | | | | | | | | | // expected-warning@10 {{some text}} The line number may be absolute (as above), or relative to the current line by prefixing the number with either '+' or '-'. Patch by Andy Gibbs! llvm-svn: 159978
* Clean up VerifyDiagnosticsConsumer in preparation for upcoming enhancements.Jordan Rose2012-07-102-75/+75
| | | | | | Patch by Andy Gibbs! llvm-svn: 159977
* Properly update the FormattedArgs vector when the template type diffing fallsRichard Trieu2012-07-103-1/+13
| | | | | | back to regular type printing. llvm-svn: 159976
OpenPOWER on IntegriCloud