summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Only mark remainder intervals as RS_Spill after per-block splitting.Jakob Stoklund Olesen2011-08-051-2/+12
| | | | | | | | | | The local ranges created get to stay in the RS_New stage, just like for local and region splitting. This gives tryLocalSplit a bit more freedom the first time it sees one of these new local ranges. llvm-svn: 137001
* Static Analyzer: Add a convinience API. Add comment.Anna Zaks2011-08-052-0/+7
| | | | llvm-svn: 137000
* This is an overhaul of the expression parser codeSean Callanan2011-08-0516-52/+418
| | | | | | | | | | | | | | | | | | | | | | | | | | | that detects what context the current expression is meant to execute in. LLDB now properly consults the method declaration in the debug information rather than trying to hunt down the "this" or "self" pointer by name, which can be misleading. Other fixes include: - LLDB now properly detects that it is inside an inlined C++ member function. - LLDB now allows access to non-const members when in const code. - The functions in SymbolFile that locate the DeclContext containing a DIE have been renamed to reflect what they actually do. I have added new functions that find the DeclContext for the DIE itself. I have also introduced testcases for C++ and Objective-C. llvm-svn: 136999
* Revert 136984 and 136927.Ted Kremenek2011-08-055-211/+5
| | | | llvm-svn: 136998
* Perform array bounds checking in more situations and properly handle specialKaelyn Uhrain2011-08-056-39/+146
| | | | | | | | | | | | | | | | case situations with the unary operators & and *. Also extend the array bounds checking to work with pointer arithmetic; the pointer arithemtic checking can be turned on using -Warray-bounds-pointer-arithmetic. The changes to where CheckArrayAccess gets called is based on some trial & error and a bunch of digging through source code and gdb backtraces in order to have the check performed under as many situations as possible (such as for variable initializers, arguments to function calls, and within conditional in addition to the simpler cases of the operands to binary and unary operator) while not being called--and triggering warnings--more than once for a given ArraySubscriptExpr. llvm-svn: 136997
* Remember to update LiveDebugVariables after per-block splitting.Jakob Stoklund Olesen2011-08-051-1/+5
| | | | llvm-svn: 136996
* Add workaround for built va list (and other builtins) so that running ↵Jonathan D. Turner2011-08-051-81/+84
| | | | | | ReadAST multiple times does not immediately throw an error. llvm-svn: 136995
* Extract per-block splitting into its own method.Jakob Stoklund Olesen2011-08-051-23/+36
| | | | | | No functional change. llvm-svn: 136994
* Delete getMultiUseBlocks and splitSingleBlocks.Jakob Stoklund Olesen2011-08-052-38/+0
| | | | | | | These functions are no longer used, and they are easily replaced with a loop calling shouldSplitSingleBlock and splitSingleBlock. llvm-svn: 136993
* Also use shouldSplitSingleBlock() in the fallback splitting mode.Jakob Stoklund Olesen2011-08-051-8/+18
| | | | | | | Drop the use of SplitAnalysis::getMultiUseBlocks, there is no need to go through a SmallPtrSet any more. llvm-svn: 136992
* Add support for using anonymous bitfields (e.g., int : 0) to enforce alignment.Chad Rosier2011-08-052-36/+162
| | | | | | | | | | | | | | | This fixes cases where the anonymous bitfield is followed by a bitfield member. E.g., struct t4 { char foo; long : 0; char bar : 1; }; rdar://9859156 llvm-svn: 136991
* On second thought, add the IsValid() method to SBTypeList, making it similar ↵Johnny Chen2011-08-054-4/+14
| | | | | | | | to SBSymbolContextList and SBValueList. Modify the test suite accordingly. llvm-svn: 136990
* Split around single instructions to enable register class inflation.Jakob Stoklund Olesen2011-08-053-1/+35
| | | | | | | | | | | | | Normally, we don't create a live range for a single instruction in a basic block, the spiller does that anyway. However, when splitting a live range that belongs to a proper register sub-class, inserting these extra COPY instructions completely remove the constraints from the remainder interval, and it may be allocated from the larger super-class. The spiller will mop up these small live ranges if we end up spilling anyway. It calls them snippets. llvm-svn: 136989
* Wire up -import-module to run ReadAST for each module loaded.Jonathan D. Turner2011-08-053-1/+37
| | | | llvm-svn: 136987
* ARM load instruction shifted register index operands.Jim Grosbach2011-08-052-7/+16
| | | | | | Parsing and encoding for shifted index operands for load instructions. llvm-svn: 136986
* Fixed test suite failure of test_SBTypeList().Johnny Chen2011-08-051-1/+4
| | | | | | | | SBTypeList does not have IsValid() method defined. It's always valid in a sense. So the Python's truth value testing in turn delegates to __len__() method, which is defined for SBTypeList, and returns 0. llvm-svn: 136985
* Make test/SemaObjC/qualified-protocol-method-conflicts.m always fail and ↵Ted Kremenek2011-08-051-0/+5
| | | | | | mark it XFAIL. This is a stop gap until the output of the test is deterministic. llvm-svn: 136984
* Add SBType.GetBasicType() to the test scenario.Johnny Chen2011-08-052-0/+82
| | | | | | Add docstring for SBType, too. llvm-svn: 136983
* ARM indexed load assembly parsing and encoding.Jim Grosbach2011-08-053-13/+67
| | | | | | | More parsing support for indexed loads. Fix pre-indexed with writeback parsing for register offsets and handle basic post-indexed offsets. llvm-svn: 136982
* Detect proper register sub-classes.Jakob Stoklund Olesen2011-08-052-2/+18
| | | | | | | | | | | | | | | | | Some instructions require restricted register classes, but most of the time that doesn't affect register allocation. For example, some instructions don't work with the stack pointer, but that is a reserved register anyway. Sometimes it matters, GR32_ABCD only has 4 allocatable registers. For such a proper sub-class, the register allocator should try to enable register class inflation since that makes more registers available for allocation. Make sure only legal super-classes are considered. For example, tGPR is not a proper sub-class in Thumb mode, but in ARM mode it is. llvm-svn: 136981
* Fixed issues for iOS debugging where if a device hasGreg Clayton2011-08-055-31/+50
| | | | | | | | | a native architecture that doesn't match the universal slice that is being used for all executables, we weren't correctly descending through the platform architectures and resolving the binaries. llvm-svn: 136980
* Add docstring & example usage for SBTypeList.Johnny Chen2011-08-051-0/+31
| | | | llvm-svn: 136979
* ARM refactor indexed store instructions.Jim Grosbach2011-08-055-75/+150
| | | | | | | | | | Refactor STR[B] pre and post indexed instructions to use addressing modes for memory operands, which is necessary for assembly parsing and is more consistent with the rest of the memory instruction definitions. Make some incremental progress on refactoring away the mega-operand addrmode2 along the way, which is nice. llvm-svn: 136978
* Add ARM LDR parsing tests.Jim Grosbach2011-08-051-0/+26
| | | | llvm-svn: 136977
* Fix indentation and remove the private section of SBTypeList.Johnny Chen2011-08-051-58/+54
| | | | | | SWIG doesn't care about the private section of class SBTypeList. llvm-svn: 136976
* o modify-python-lldb.py:Johnny Chen2011-08-055-2/+176
| | | | | | | | | | | | | | | Add the rich comparison methods (__eq__, __ne__) to SBType, too. o lldbtest.py: Add debug utility method TestBase.DebugSBType(). o test/python_api/type: Add tests for exercising SBType/SBTypeList API, including the SBTarget.FindTypes(type_name) API which returns a SBTypeList matching the type_name. llvm-svn: 136975
* Fix liveness computations in BranchFolding.Jakob Stoklund Olesen2011-08-051-13/+16
| | | | | | | | | | | | | | | | | | | | | | | The old code would look at kills and defs in one pass over the instruction operands, causing problems with this code: %R0<def>, %CPSR<def,dead> = tLSLri %R5<kill>, 2, pred:14, pred:%noreg %R0<def>, %CPSR<def,dead> = tADDrr %R4<kill>, %R0<kill>, pred:14, %pred:%noreg The last instruction kills and redefines %R0, so it is still live after the instruction. This caused a register scavenger crash when compiling 483.xalancbmk for armv6. I am not including a test case because it requires too much bad luck to expose this old bug. First you need to convince the register allocator to use %R0 twice on the tADDrr instruction, then you have to convince BranchFolding to do something that causes it to run the register scavenger on he bad block. <rdar://problem/9898200> llvm-svn: 136973
* Let attribute((cdecl)) and company override -mrtd default calling convention.Roman Divacky2011-08-052-2/+2
| | | | llvm-svn: 136971
* ARM simplify the postidx_reg operand encoding.Jim Grosbach2011-08-054-11/+14
| | | | | | | The immediate portion of the operand is just a boolean (the 'U' bit indicating add vs. subtract). Treat it as such. llvm-svn: 136969
* ARM use a dedicated printer for postidx_reg operands.Jim Grosbach2011-08-053-1/+11
| | | | llvm-svn: 136968
* Flesh out the -Warray-bounds detection of C89 tail-padded one-elementChandler Carruth2011-08-053-13/+58
| | | | | | | | | | | | | | | | | | | | | | | | | arrays. This now suppresses the warning only in the case of a one-element array as the last field in a struct where the array size is a literal '1' rather than any macro expansion or template parameter. This doesn't distinguish between the language standard in use to allow code which dates from C89 era to compile without the warning even in C99 and C++ builds. We could add a separate warning (under a different flag) with fixit hints to switch to a flexible array, but its not clear that this would be desirable. Much of the code using this idiom is striving for maximum portability. Tests were also fleshed out a bit, and the diagnostic itself tweaked to be more pretty w.r.t. single elment arrays. This is more ugly than I would like due to APInt's not being supported by the diagnostic rendering engine. A pseudo-patch for this was proposed by Nicola Gigante, but I reworked it both for several correctness issues and for code style. Sorry this was so long in coming. llvm-svn: 136965
* Finally getting around to re-working this to more accurately white-listChandler Carruth2011-08-051-8/+22
| | | | | | | | | 1-element character arrays which are serving as flexible arrays. This is the initial step, which is to restrict the 1-element array whitelist to arrays that are member declarations. I'll refine it from here based on the proposed patch. llvm-svn: 136964
* Fixed FieldDecl source range.Abramo Bagnara2011-08-052-2/+8
| | | | llvm-svn: 136963
* Add missing register constraint for some VLD3/VLD4 pseudo instructions.Bob Wilson2011-08-051-1/+2
| | | | | | <rdar://problem/9878189> llvm-svn: 136962
* Change the this -W flag to 'return-stack-address'.Chandler Carruth2011-08-051-5/+5
| | | | | | | | ~or~ Paint the bikeshed green. llvm-svn: 136959
* The recently introduced SBTypeList is also iterable.Johnny Chen2011-08-051-2/+3
| | | | | | | This patch takes some time because the old Python constructor pattern was not a valid one, and breaks with SBTypeList's __init__ signature. Oops. llvm-svn: 136958
* Option --regex (-x) now also works for synthetic children:Enrico Granata2011-08-055-297/+442
| | | | | | | - Added a test case in python-synth Minor code improvements in categories, making them ready for adding new element types llvm-svn: 136957
* Silence unused variable warnings in release builds.Chandler Carruth2011-08-051-0/+2
| | | | llvm-svn: 136956
* Output to /dev/null, not "0"Matt Beaumont-Gay2011-08-051-1/+1
| | | | llvm-svn: 136955
* Fix http://llvm.org/bugs/show_bug.cgi?id=10583\n - test for 1 and 2 byte ↵Jason W Kim2011-08-051-15/+11
| | | | | | fixups to be added llvm-svn: 136954
* Temporarily revert r135528 which distinguishes between two copies of oneChandler Carruth2011-08-054-28/+3
| | | | | | | | | | | | | | | | | | | inlined variable, based on the discussion in PR10542. This explodes the runtime of several passes down the pipeline due to a large number of "copies" remaining live across a large function. This only shows up with both debug and opt, but when it does it creates a many-minute compile when self-hosting LLVM+Clang. There are several other cases that show these types of regressions. All of this is tracked in PR10542, and progress is being made on fixing the issue. Once its addressed, the re-instated, but until then this restores the performance for self-hosting and other opt+debug builds. Devang, let me know if this causes any trouble, or impedes fixing it in any way, and thanks for working on this! llvm-svn: 136953
* KeychainAPI checker: Generate an error on double allocation. Pull out ↵Anna Zaks2011-08-052-17/+54
| | | | | | getAsPointeeMemoryRegion so that it could be reused. llvm-svn: 136952
* Complete Host::Backtrace prototype. Fixes Linux build.Peter Collingbourne2011-08-051-0/+1
| | | | llvm-svn: 136951
* Extend memset/memcpy/memmove checking to include memcmpMatt Beaumont-Gay2011-08-053-11/+31
| | | | llvm-svn: 136950
* The continue label in an ARC for-in loop should not involveJohn McCall2011-08-052-1/+25
| | | | | | releasing the collection. llvm-svn: 136949
* Have the typo correction in DiagnoseEmptyLookup properly handle templateKaelyn Uhrain2011-08-054-14/+16
| | | | | | functions when performing function overload resolution. llvm-svn: 136948
* Remove expectedFailure decorator for test_SBType, which does not take an ↵Johnny Chen2011-08-052-30/+15
| | | | | | | | | empty constructor after the recent changes. And remove expectedFailure decorator for test_SBTypeMember, which no longer exists after the recent changes, replace it with test_SBTypeList. llvm-svn: 136947
* objc rewriter: Fixes a rewriting of implicit casting of an integralFariborz Jahanian2011-08-042-1/+22
| | | | | | argument to bool. // rdar://9899834 llvm-svn: 136946
* fixed a potential memory leak ; small improvement in the formatters lookup ↵Enrico Granata2011-08-043-10/+22
| | | | | | algorithm llvm-svn: 136945
* More whitespace and naming fixup. No functionality change.Chad Rosier2011-08-043-11/+11
| | | | llvm-svn: 136944
OpenPOWER on IntegriCloud