summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a copy/paste error in a comment.Jim Ingham2011-08-031-1/+1
| | | | llvm-svn: 136754
* When rewriting a call to a K&R function to lead to a well-prototypedJohn McCall2011-08-032-1/+33
| | | | | | | function, be sure to drop parameter attributes when dropping their associated arguments. Patch by Aaron Landwehr! llvm-svn: 136753
* Fix logical error when detecting lifetime intrinsics.Nick Lewycky2011-08-032-33/+45
| | | | | | | | | Don't replace a gep/bitcast with 'undef' because that will form a "free(undef)" which in turn means "unreachable". What we wanted was a no-op. Instead, analyze the whole tree and look for all the instructions we need to delete first, then delete them second, not relying on the use_list to stay consistent. llvm-svn: 136752
* Replace the 'UnwindInst' check with a check for 'ResumeInst', which also exitsBill Wendling2011-08-031-1/+1
| | | | | | the function, because the UnwindInst is going away. llvm-svn: 136751
* ScopInfo: Do not use >"< in statement names.Tobias Grosser2011-08-031-0/+1
| | | | | | Signed-off-by: Tobias Grosser <tobias@grosser.es> llvm-svn: 136750
* Dependences: Fix memory corruption.Tobias Grosser2011-08-031-5/+5
| | | | | Signed-off-by: Tobias Grosser <tobias@grosser.es> llvm-svn: 136749
* A couple fixes for preprocessor expressions:Eli Friedman2011-08-034-10/+32
| | | | | | | | | | | 1. Be more tolerant of comments in -CC (comment-preserving) mode. We were missing a few cases. 2. Make sure to expand the second FOO in "#if defined FOO FOO". (See also r97253, which addressed the case of "#if defined(FOO FOO".) Fixes PR10286. llvm-svn: 136748
* Fixed an issue where StackFrame::GetValueForVariableExpressionPath(...)Greg Clayton2011-08-022-1/+35
| | | | | | | | | | | | | was previously using the entire frame variable list instead of using the in scope variable list. I added a new function to a stack frame: lldb::VariableListSP StackFrame::GetInScopeVariableList (bool get_file_globals); This gets only variables that are in scope and they will be ordered such that the variables from the current scope are first. llvm-svn: 136745
* Change CommandObjectTargetModulesAdd to set the return statusJason Molenda2011-08-021-0/+1
| | | | | | object on successful adding of a module. llvm-svn: 136744
* bug fix in SBValue::CreateValueFromAddress() where using the resulting VO as ↵Enrico Granata2011-08-024-6/+8
| | | | | | a pointer would crash LLDB ; minor improvements in dynamic formatters lookup llvm-svn: 136743
* Use the precomputed def presence in RAGreedy::calcSpillCost.Jakob Stoklund Olesen2011-08-021-11/+2
| | | | llvm-svn: 136742
* Inform SpillPlacement about blocks with defs.Jakob Stoklund Olesen2011-08-021-0/+1
| | | | | | This information is not used for anything yet. llvm-svn: 136741
* Add the real benchmarks comparing lldb against gdb for repeated expression ↵Johnny Chen2011-08-024-26/+117
| | | | | | | | | | | | | | | | | | | evaluations. Modify lldbbench.py so that lldbtest.line_number() utility function is available to BenchBase client as just line_number(), and modify lldbtest.py so that self.lldbExec (the full path for the 'lldb' executable) is available to BenchBase client as well. An example run of the test case on my MacBook Pro running Lion: 1: test_compare_lldb_to_gdb (TestRepeatedExprs.RepeatedExprsCase) Test repeated expressions with lldb vs. gdb. ... lldb_avg: 0.204339 gdb_avg: 0.205721 lldb_avg/gdb_avg: 0.993284 ok llvm-svn: 136740
* Rename {First,Last}Use to {First,Last}Instr.Jakob Stoklund Olesen2011-08-023-43/+45
| | | | | | | With a 'FirstDef' field right there, it is very confusing that FirstUse refers to an instruction that may be a def. llvm-svn: 136739
* lldb doesn't need the edis dylib any more.Evan Cheng2011-08-021-1/+0
| | | | llvm-svn: 136738
* ARM backend support for atomicrmw and cmpxchg with non-monotonic ordering. ↵Eli Friedman2011-08-021-47/+77
| | | | | | Not especially pretty, but seems to work well enough. If this looks okay, I'll put together similar patches for Mips, PPC, and Alpha. llvm-svn: 136737
* Add a BlockInfo::FirstDef field.Jakob Stoklund Olesen2011-08-022-1/+15
| | | | | | | | | | | This is either an invalid SlotIndex, or valno->def for the first value defined inside the block. PHI values are not counted as defined inside the block. The FirstDef field will be used when estimating the cost of spilling around a block. llvm-svn: 136736
* Delete BlockInfo::LiveThrough. It wasn't used any more.Jakob Stoklund Olesen2011-08-022-4/+0
| | | | llvm-svn: 136735
* Implements alignment for long long and double types in va_arg on ARM AAPCS.Rafael Espindola2011-08-022-1/+43
| | | | | | Patch by Jim (Ningjie) Chen. llvm-svn: 136734
* Fixed a bug in which the DWARF reader did not distinguishSean Callanan2011-08-025-3/+108
| | | | | | | | | | | | | appropriately between C++ static methods and non-static methods. This bug made it impossible to call most static methods, either because Clang did not recognize that a method could be called without providing a "this" parameter, or because Clang did not properly mangle the name of the method when searching for it in the target. Also added a testcase. llvm-svn: 136733
* Teach InstCombine that lifetime intrincs aren't a real user on the result of aNick Lewycky2011-08-022-12/+48
| | | | | | malloc call. llvm-svn: 136732
* Extend the SpillPlacement interface with two new features.Jakob Stoklund Olesen2011-08-022-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | The PrefBoth constraint is used for blocks that ideally want a live-in value both on the stack and in a register. This would be used by a block that has a use before interference forces a spill. Secondly, add the ChangesValue flag to BlockConstraint. This tells SpillPlacement if a live-in value on the stack can be reused as a live-out stack value for free. If the block redefines the virtual register, a spill would be required for that. This extra information will be used by SpillPlacement to more accurately calculate spill costs when a value can exist both on the stack and in a register. The simplest example is a basic block that reads the virtual register, but doesn't change its value. Spilling around such a block requires a reload, but no spill in the block. The spiller already knows this, but the spill placer doesn't. That can sometimes lead to suboptimal regions. llvm-svn: 136731
* Add the documentation for the 'landingpad' instruction. Improve the 'invoke'Bill Wendling2011-08-021-4/+90
| | | | | | instruction's documentation to reference the landingpad and resume instructions. llvm-svn: 136729
* Update for LLVM change in PassManagerBuilder.Rafael Espindola2011-08-021-1/+5
| | | | llvm-svn: 136728
* Move methods in PassManagerBuilder offline.Rafael Espindola2011-08-026-236/+281
| | | | llvm-svn: 136727
* move PassManagerBuilder.h to IPO. This is a non intuitive place to put it,Rafael Espindola2011-08-025-5/+5
| | | | | | | but it solves a layering violation since things in Support are not supposed to use things in Transforms. llvm-svn: 136726
* disable array bounds overflow warning for cases where an array Chris Lattner2011-08-022-7/+20
| | | | | | | | | | | | | has a single element. This disables the warning in cases where there is a clear bug, but this is really rare (who uses arrays with one element?) and it also silences a large class of false positive issues with C89 code that is using tail padding in structs. A better version of this patch would detect when an array is in a tail position in a struct, but at least patch fixes the huge false positives that are hitting postgres and other code. llvm-svn: 136724
* Add new atomic instructions to SCCP. No functional change, but stops debug ↵Eli Friedman2011-08-021-0/+2
| | | | | | spam. llvm-svn: 136723
* Lifetime intrinsics on undef are dead.Nick Lewycky2011-08-022-4/+19
| | | | llvm-svn: 136722
* Update the default bug report url in autoconf.Chad Rosier2011-08-021-2/+2
| | | | llvm-svn: 136721
* Patch by David Forsythe to build lldb on FreeBSD!Johnny Chen2011-08-0216-12/+752
| | | | | | | | | | | | | | | | | | I did not take the patch for ClangExpressionParser.cpp since there was a recent change by Peter for the same line. Feel free to disagree. :-) Reference: ---------------------------------------------------------------------- r136580 | pcc | 2011-07-30 15:42:24 -0700 (Sat, 30 Jul 2011) | 3 lines Add reloc arg to standard JIT createJIT() Fixes non-__APPLE__ build. Patch by Matt Johnson! ---------------------------------------------------------------------- Also, I ignore the part of the patch to remove the RegisterContextDarwin*.h/.cpp. llvm-svn: 136720
* Fix cmake for r136702 (at least for the most part). Chandler has been kind Chad Rosier2011-08-023-2/+8
| | | | | | | enough to offer to investigate the underlying issue. Thanks to Doug for his assistance as well. llvm-svn: 136719
* no need to count the terminators.Chris Lattner2011-08-021-9/+9
| | | | llvm-svn: 136718
* objective-c rewrite: Fixes rewriting of objective-c collectionFariborz Jahanian2011-08-022-1/+37
| | | | | | statement inside a block. // rdar://9878420 llvm-svn: 136717
* Assume .cfi_startproc is the first thing in a function. If the function isRafael Espindola2011-08-023-8/+36
| | | | | | | | | externally visable, create a local symbol to use in the CFE. If not, use the function label itself. Fixes PR10420. llvm-svn: 136716
* Remove libEnhancedDisassembly.dylibGreg Clayton2011-08-021-32/+1
| | | | llvm-svn: 136713
* Don't create a ridiculous EXTRACT_ELEMENT. PR10563.Eli Friedman2011-08-022-3/+2
| | | | | | The testcase looks extremely fragile, so I'm adding an assertion which should catch any cases like this. llvm-svn: 136711
* Temporarily revert parts of r136702 to make cmake builds happy.Chad Rosier2011-08-023-8/+2
| | | | | | Someone with more cmake experience want to throw me a bone? :) llvm-svn: 136709
* Change the hashing function for DeclContext lookup within an AST fileDouglas Gregor2011-08-026-149/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | by eliminating the type ID from constructor, destructor, and conversion function names. There are several reasons for this change: - A given type (say, int*) isn't guaranteed to have a single, unique type ID within a chain of PCH files. Hence, we could end up hashing based on the wrong type ID, causing name lookup to fail. - The mapping from types back to type IDs required one DenseMap entry for every type that was ever deserialized, which was an unacceptable cost to support just the name lookup of constructors, destructors, and conversion functions. Plus, this mapping could never actually work with chained or multiple PCH, based on the first bullet. Once we have eliminated the type from the hash function, these problems go away, as does my horrible "reverse type remap" hack, which was doomed from the start (see bullet #1 above) and far too complicated. However, note that removing the type from the hash function means that all constructors, destructors, and conversion functions have the same hash key, so I've updated the caller to double-check that the declarations found have the appropriate name. llvm-svn: 136708
* Fix the broken encodings for the VFP vmov.f32 and vmov.f64 instructions, as ↵Owen Anderson2011-08-021-6/+8
| | | | | | well as the comments that explain them incorrectly. llvm-svn: 136707
* [analyzer] Drastically simplify ExprEngine::VisitInitListExpr() by assuming ↵Ted Kremenek2011-08-021-71/+16
| | | | | | all initializer expressions have already been evaluated. llvm-svn: 136706
* Tidy up. 80 columns.Jim Grosbach2011-08-021-8/+10
| | | | llvm-svn: 136705
* ARM: rename addrmode7 to addr_offset_none.Jim Grosbach2011-08-022-15/+16
| | | | | | Use a more descriptive name so the code is more self-documenting. llvm-svn: 136704
* PR10566: Make sure codegen for deleting an pointer to an incomplete type ↵Eli Friedman2011-08-022-4/+6
| | | | | | actually works. llvm-svn: 136703
* When the compiler crashes, the compiler driver now produces diagnostic Chad Rosier2011-08-0213-19/+175
| | | | | | | | | information including the fully preprocessed source file(s) and command line arguments. The developer is asked to attach this diagnostic information to a bug report. rdar://9575623 llvm-svn: 136702
* Following up the earlier refactoring/cleanup work by fixing up how we manage ↵Jonathan D. Turner2011-08-023-20/+42
| | | | | | the virtual files the ASTReader has to handle. Specifically, this occurs when the reader is reading AST files that were created in memory and not written to disk. For example, when a user creates a chained PCH using command line flags. These virtual files are stored in MemoryBuffers in ChainIncludeSource.cpp, and then read back in by the ASTReader. This patch moves the management of these buffers into the ModuleManager, so that it becomes the authority on where these buffers are located. llvm-svn: 136697
* Fixed a bug where a variable could not be formatted in a summary if its ↵Enrico Granata2011-08-0220-93/+546
| | | | | | | | | | | | | datatype already had a custom format Fixed a bug where Objective-C variables coming out of the expression parser could crash the Python synthetic providers: - expression parser output has a "frozen data" component, which is a byte-exact copy of the value (in host memory), if trying to read into memory based on the host address, LLDB would crash. we are now passing the correct (target) pointer to the Python code Objective-C "id" variables are now formatted according to their dynamic type, if the -d option to frame variable is used: - Code based on the Objective-C 2.0 runtime is used to obtain this information without running code on the target llvm-svn: 136695
* KeychainAPI checker: only check the paths on which the allocator function ↵Anna Zaks2011-08-023-3/+15
| | | | | | returned noErr. (+ minor cleanup) llvm-svn: 136694
* Implement a proper local -> global type ID remapping scheme in the ASTDouglas Gregor2011-08-025-49/+139
| | | | | | | | | | | | | | | | | | | | | | reader. This scheme permits an AST file to be loaded with its type IDs shifted anywhere in the type ID space. At present, the type indices are still allocated in the same boring way they always have been, just by adding up the number of types in each PCH file within the chain. However, I've done testing with this patch by randomly sliding the base indices at load time, to ensure that remapping is occurring as expected. I may eventually formalize this in some testing flag, but loading multiple (non-chained) AST files at once will eventually exercise the same code. There is one known problem with this patch, which involves name lookup of operator names (e.g., "x.operator int*()") in cases where multiple PCH files in the chain. The hash function itself depends on having a stable type ID, which doesn't happen with chained PCH and *certainly* doesn't happen when sliding type IDs around. We'll need another approach. I'll tackle that next. llvm-svn: 136693
* Comment out the PPC relocation offset adjustment. It must be done differently.Roman Divacky2011-08-021-0/+4
| | | | | | This unbreaks some tests. llvm-svn: 136692
OpenPOWER on IntegriCloud