summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix the objective C object validator that I broke. When we have ObjC runtimeGreg Clayton2011-01-171-1/+1
| | | | | | | | V2 and we only have gdb_class_getClass, then make sure the isa isn't NULL before trying to call gdb_class_getClass otherwise we end up deadlocking the objective C runtime. llvm-svn: 123615
* Added missing source files.Greg Clayton2011-01-172-0/+296
| | | | llvm-svn: 123614
* A few of the issue I have been trying to track down and fix have been due toGreg Clayton2011-01-1743-671/+1282
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the way LLDB lazily gets complete definitions for types within the debug info. When we run across a class/struct/union definition in the DWARF, we will only parse the full definition if we need to. This works fine for top level types that are assigned directly to variables and arguments, but when we have a variable with a class, lets say "A" for this example, that has a member: "B *m_b". Initially we don't need to hunt down a definition for this class unless we are ever asked to do something with it ("expr m_b->getDecl()" for example). With my previous approach to lazy type completion, we would be able to take a "A *a" and get a complete type for it, but we wouldn't be able to then do an "a->m_b->getDecl()" unless we always expanded all types within a class prior to handing out the type. Expanding everything is very costly and it would be great if there were a better way. A few months ago I worked with the llvm/clang folks to have the ExternalASTSource class be able to complete classes if there weren't completed yet: class ExternalASTSource { .... virtual void CompleteType (clang::TagDecl *Tag); virtual void CompleteType (clang::ObjCInterfaceDecl *Class); }; This was great, because we can now have the class that is producing the AST (SymbolFileDWARF and SymbolFileDWARFDebugMap) sign up as external AST sources and the object that creates the forward declaration types can now also complete them anywhere within the clang type system. This patch makes a few major changes: - lldb_private::Module classes now own the AST context. Previously the TypeList objects did. - The DWARF parsers now sign up as an external AST sources so they can complete types. - All of the pure clang type system wrapper code we have in LLDB (ClangASTContext, ClangASTType, and more) can now be iterating through children of any type, and if a class/union/struct type (clang::RecordType or ObjC interface) is found that is incomplete, we can ask the AST to get the definition. - The SymbolFileDWARFDebugMap class now will create and use a single AST that all child SymbolFileDWARF classes will share (much like what happens when we have a complete linked DWARF for an executable). We will need to modify some of the ClangUserExpression code to take more advantage of this completion ability in the near future. Meanwhile we should be better off now that we can be accessing any children of variables through pointers and always be able to resolve the clang type if needed. llvm-svn: 123613
* Remove dead code.Anders Carlsson2011-01-171-5/+0
| | | | llvm-svn: 123612
* Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct.Anders Carlsson2011-01-176-11/+96
| | | | | | | Enforce C++[class.mem]p8: A virt-specifier-seq shall contain at most one of each virt-specifier. llvm-svn: 123611
* Suppress warning "switch statement contains 'default' but no 'case' labels" ↵Francois Pichet2011-01-171-0/+1
| | | | | | on MSVC. llvm-svn: 123610
* Eliminate the use of dominance frontiers in PromoteMemToReg. In addition toCameron Zwarich2011-01-174-62/+122
| | | | | | | | | | | | | eliminating a potentially quadratic data structure, this also gives a 17% speedup when running -scalarrepl on test-suite + SPEC2000 + SPEC2006. My initial experiment gave a greater speedup around 25%, but I moved the dominator tree level computation from dominator tree construction to PromoteMemToReg. Since this approach to computing IDFs has a much lower overhead than the old code using precomputed DFs, it is worth looking at using this new code for the second scalarrepl pass as well. llvm-svn: 123609
* Remove a c++ file test I inadvertently added in Sema last week. Francois Pichet2011-01-172-13/+12
| | | | llvm-svn: 123608
* Revert r123600.Francois Pichet2011-01-171-1/+1
| | | | llvm-svn: 123607
* Begin work on supporting "N3206: Override control: Eliminating Attributes", fromAnders Carlsson2011-01-164-1/+64
| | | | | | | | | http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm This lands support for parsing virt-specifier-seq after member functions, including the contextual keywords 'final', and 'override'. The keywords are not yet used for anything. llvm-svn: 123606
* UnRevert "Revert "Archive: Replace all internal uses of PathV1 with PathV2. ↵Michael J. Spencer2011-01-162-38/+39
| | | | | | The external API still uses PathV1."" llvm-svn: 123605
* Fix rename.Michael J. Spencer2011-01-161-2/+11
| | | | llvm-svn: 123604
* Fix a bug where the -Wmissing-noreturn would always treat constructors with ↵Anders Carlsson2011-01-162-0/+23
| | | | | | base or member initializers as noreturn. llvm-svn: 123603
* Add AnalysisContext::dumpCFG.Anders Carlsson2011-01-162-1/+7
| | | | llvm-svn: 123602
* Test for lazy value info's ability to prove the absense of NULLs in pointers.Nick Lewycky2011-01-161-0/+103
| | | | llvm-svn: 123601
* Downgrade ext_enumerator_too_large from ExtWarn to Extension in Microsoft ↵Francois Pichet2011-01-161-1/+1
| | | | | | mode. Otherwise you can warnings flooding trying to selfhost clang with fms-extensions because of "unsigned int" -> "signed int" enumerator conversion. llvm-svn: 123600
* Make everyone happy this time.Michael J. Spencer2011-01-161-1/+1
| | | | llvm-svn: 123599
* Provide instruction sizes for ARMv5 variants of MUL instructions.Anton Korobeynikov2011-01-161-29/+30
| | | | | | This fixes PR8987 llvm-svn: 123598
* Update README.txt to remove the DAE enhancement.Anders Carlsson2011-01-161-23/+0
| | | | llvm-svn: 123597
* Teach DAE to look for functions whose arguments are unused, and change all ↵Anders Carlsson2011-01-162-2/+88
| | | | | | callers to pass in an undefvalue instead. llvm-svn: 123596
* UnRevert "Revert the archive part of "Support/PathV2: Add identify_magic.""Michael J. Spencer2011-01-162-6/+7
| | | | | | This reverts commit dd103021a889a986a181ce36ed7b0e8dc9b645e1. llvm-svn: 123595
* Try and fix this test. For some reason llvm-ar thinks that the file exists whenMichael J. Spencer2011-01-161-0/+1
| | | | | | | it shouldn't, but I have no way to verify that it doesn't actually exist on the buildbot. llvm-svn: 123594
* Revert the archive part of "Support/PathV2: Add identify_magic."Michael J. Spencer2011-01-162-7/+6
| | | | llvm-svn: 123593
* Initial support for a DynamicLoader plugin on Linux.Stephen Wilson2011-01-1612-2/+1425
| | | | | | | | | | | | | | | | | | | | | | | | This patch is enough to have shared objects recognized by LLDB. We can handle position independent executables. We can handle dynamically loaded modules brought in via dlopen. The DYLDRendezvous class provides an interface to a structure present in the address space of ELF-based processes. This structure provides the address of a function which is called by the linker each time a shared object is loaded and unloaded (thus a breakpoint at that address will let LLDB intercept such events), a list of entries describing the currently loaded shared objects, plus a few other things. On Linux, processes are brought up with an auxiliary vector on the stack. One element in this vector contains the (possibly dynamic) entry address of the process. One does not need to walk the stack to find this information as it is also available under /proc/<pid>/auxv. The new AuxVector class provides a convenient read-only view of this auxiliary vector information. We use the dynamic entry address and the address as specified in the object file to compute the actual load address of the inferior image. This strategy works for both normal executables and PIE's. llvm-svn: 123592
* Update tests.Rafael Espindola2011-01-167-26/+26
| | | | llvm-svn: 123591
* tidy up a comment, as suggested by duncanChris Lattner2011-01-161-2/+2
| | | | llvm-svn: 123590
* Only put unnamed_addr constants in mergeable sections. Fixes PR8297.Rafael Espindola2011-01-161-1/+1
| | | | llvm-svn: 123585
* Don't merge two constants if we care about the address of both.Rafael Espindola2011-01-164-23/+105
| | | | | | | | | | | | | | This fixes the original testcase in PR8927. It also causes a clang binary built with a patched clang to increase in size by 0.21%. We can probably get some of the size back by writing a pass that detects that a global never has its pointer compared and adds unnamed_addr to it (maybe extend global opt). It is also possible that there are some other cases clang could add unnamed_addr to. I will investigate extending globalopt next. llvm-svn: 123584
* Make a mandatory call to DestroyThread() in ~LinuxThread().Stephen Wilson2011-01-162-0/+7
| | | | llvm-svn: 123583
* Emit an extension diagnostic for C99 designated initializers that appear in ↵Douglas Gregor2011-01-163-1/+14
| | | | | | C++ code llvm-svn: 123582
* Tweak the partial ordering rules for function templates to prefer aDouglas Gregor2011-01-162-7/+33
| | | | | | | | non-variadic function template over a variadic one. This matches GCC and the intent of the C++0x wording, in a way that I think is likely to be acceptable to the committee. llvm-svn: 123581
* Simplify the construction and destruction of Uses. SimplifyJay Foad2011-01-164-35/+26
| | | | | | User::dropHungOffUses(). llvm-svn: 123580
* Reduce and merge testcases.Owen Anderson2011-01-162-60/+16
| | | | llvm-svn: 123579
* fix PR8514, a bug where the "heroic" transformation of shift/and Chris Lattner2011-01-162-13/+45
| | | | | | | | into and/shift would cause nodes to move around and a dangling pointer to happen. The code tried to avoid this with a HandleSDNode, but got the details wrong. llvm-svn: 123578
* Remove unnecessary specialization OperandTraits<User>.Jay Foad2011-01-161-22/+0
| | | | llvm-svn: 123577
* improve compatibility with GCC: when generating the ".d" filename to useChris Lattner2011-01-161-1/+1
| | | | | | | and the filename has multiple .'s in it, use the last. For example, "foo.bar.cpp" should produce "foo.bar.d" not "foo.d". Patch by Johan Boule in PR8391 llvm-svn: 123576
* Move the implementation of the User class into a new source file,Jay Foad2011-01-165-83/+98
| | | | | | User.cpp. llvm-svn: 123575
* fix PR8932, a case where arg promotion could infinitely promote.Chris Lattner2011-01-162-24/+72
| | | | llvm-svn: 123574
* simplify a littleChris Lattner2011-01-161-7/+3
| | | | llvm-svn: 123573
* add some commentaryChris Lattner2011-01-161-1/+14
| | | | llvm-svn: 123572
* if an alloca is only ever accessed as a unit, and is accessed with ↵Chris Lattner2011-01-162-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | load/store instructions, then don't try to decimate it into its individual pieces. This will just make a mess of the IR and is pointless if none of the elements are individually accessed. This was generating really terrible code for std::bitset (PR8980) because it happens to be lowered by clang as an {[8 x i8]} structure instead of {i64}. The testcase now is optimized to: define i64 @test2(i64 %X) { br label %L2 L2: ; preds = %0 ret i64 %X } before we generated: define i64 @test2(i64 %X) { %sroa.store.elt = lshr i64 %X, 56 %1 = trunc i64 %sroa.store.elt to i8 %sroa.store.elt8 = lshr i64 %X, 48 %2 = trunc i64 %sroa.store.elt8 to i8 %sroa.store.elt9 = lshr i64 %X, 40 %3 = trunc i64 %sroa.store.elt9 to i8 %sroa.store.elt10 = lshr i64 %X, 32 %4 = trunc i64 %sroa.store.elt10 to i8 %sroa.store.elt11 = lshr i64 %X, 24 %5 = trunc i64 %sroa.store.elt11 to i8 %sroa.store.elt12 = lshr i64 %X, 16 %6 = trunc i64 %sroa.store.elt12 to i8 %sroa.store.elt13 = lshr i64 %X, 8 %7 = trunc i64 %sroa.store.elt13 to i8 %8 = trunc i64 %X to i8 br label %L2 L2: ; preds = %0 %9 = zext i8 %1 to i64 %10 = shl i64 %9, 56 %11 = zext i8 %2 to i64 %12 = shl i64 %11, 48 %13 = or i64 %12, %10 %14 = zext i8 %3 to i64 %15 = shl i64 %14, 40 %16 = or i64 %15, %13 %17 = zext i8 %4 to i64 %18 = shl i64 %17, 32 %19 = or i64 %18, %16 %20 = zext i8 %5 to i64 %21 = shl i64 %20, 24 %22 = or i64 %21, %19 %23 = zext i8 %6 to i64 %24 = shl i64 %23, 16 %25 = or i64 %24, %22 %26 = zext i8 %7 to i64 %27 = shl i64 %26, 8 %28 = or i64 %27, %25 %29 = zext i8 %8 to i64 %30 = or i64 %29, %28 ret i64 %30 } In this case, instcombine was able to eliminate the nonsense, but in PR8980 enough PHIs are in play that instcombine backs off. It's better to not generate this stuff in the first place. llvm-svn: 123571
* Use an irbuilder to get some trivial constant folding when doing a storeChris Lattner2011-01-161-21/+17
| | | | | | of a constant. llvm-svn: 123570
* remove a dead check, this was needed before we had an explicit veto on uses ↵Chris Lattner2011-01-161-5/+0
| | | | | | of phis. llvm-svn: 123569
* enhance FoldOpIntoPhi in instcombine to try harder when a phi hasChris Lattner2011-01-163-3/+42
| | | | | | | | multiple uses. In some cases, all the uses are the same operation, so instcombine can go ahead and promote the phi. In the testcase this pushes an add out of the loop. llvm-svn: 123568
* Spill R4 if it's going to be used to restore SP from FP.Evan Cheng2011-01-162-4/+29
| | | | llvm-svn: 123567
* remove the AllowAggressive argument to FoldOpIntoPhi. It is forced to false ↵Chris Lattner2011-01-163-14/+6
| | | | | | | | in the first line of the function because it isn't a good idea, even for compares. llvm-svn: 123566
* more cleanups: use the IR builder.Chris Lattner2011-01-161-38/+39
| | | | llvm-svn: 123565
* tidy up code.Chris Lattner2011-01-161-16/+20
| | | | llvm-svn: 123564
* Improve the safety of my globalopt enhancement by ensuring that the bitcastOwen Anderson2011-01-162-12/+81
| | | | | | of the stored value to the new store type is always. Also, add a testcase. llvm-svn: 123563
* fix PR8983, a broken assertion.Chris Lattner2011-01-162-1/+13
| | | | llvm-svn: 123562
OpenPOWER on IntegriCloud