Commit Graph

115483 Commits

Author SHA1 Message Date
Cameron Zwarich 057fbb1a10 The element insertion code in scalar replacement doesn't handle incorrect
element types, even though the element extraction code does. It is surprising
that this bug has been here for so long. Fixes <rdar://problem/10318778>.

llvm-svn: 142740
2011-10-23 07:02:10 +00:00
Ted Kremenek 142adc492b [analyzer] Remove LocationContext creation methods from AnalysisManager, and change clients to use AnalysisContext instead.
WIP to remove/reduce ExprEngine's usage of AnalysisManager.

llvm-svn: 142739
2011-10-23 02:31:52 +00:00
Craig Topper e94d277db8 Add X86 MULX instruction for disassembler.
llvm-svn: 142738
2011-10-23 00:33:32 +00:00
Craig Topper 7412aa9886 Remove some duplicate specifying of neverHasSideEffects and mayLoad from X86 multiply instructions.
llvm-svn: 142737
2011-10-22 23:13:53 +00:00
Nick Lewycky 52340ac5f8 Oops! Fix test I forgot to submit as part of r142735.
llvm-svn: 142736
2011-10-22 22:07:31 +00:00
Nick Lewycky 32f8051d66 A non-escaping malloc in the entry block is not unlike an alloca. Do dead-store
elimination on them too.

llvm-svn: 142735
2011-10-22 21:59:35 +00:00
Bob Wilson 02d5fe29ab Fix a typo that completely broke the expansion of complex arguments.
llvm-svn: 142734
2011-10-22 21:42:34 +00:00
Richard Smith 2d4063412c Refactor vector constant expression evaluation to return bool like all the other
const expression evaluation subclasses, and remove some APValue copying and
malloc traffic in the process.

llvm-svn: 142733
2011-10-22 21:10:00 +00:00
Howard Hinnant e4383379ae More windows port work by Ruben Van Boxem
llvm-svn: 142732
2011-10-22 20:59:45 +00:00
Nick Lewycky a6674c7fc9 Make SCEV's brute force analysis stronger in two ways. Firstly, we should be
able to constant fold load instructions where the argument is a constant.
Second, we should be able to watch multiple PHI nodes through the loop; this
patch only supports PHIs in loop headers, more can be done here.

With this patch, we now constant evaluate:
  static const int arr[] = {1, 2, 3, 4, 5};
  int test() {
    int sum = 0;
    for (int i = 0; i < 5; ++i) sum += arr[i];
    return sum;
  }

llvm-svn: 142731
2011-10-22 19:58:20 +00:00
Benjamin Kramer e35328c878 Remove obsolete debugging macro, make helper static.
llvm-svn: 142730
2011-10-22 19:16:39 +00:00
Nadav Rotem aa6fab2484 Fix a typo.w
llvm-svn: 142729
2011-10-22 18:44:51 +00:00
Jim Grosbach dfc072d452 Minor updates.
llvm-svn: 142728
2011-10-22 18:17:32 +00:00
Nadav Rotem 9f5ca0ba7d Added my name to CREDITS.TXT
llvm-svn: 142727
2011-10-22 17:51:04 +00:00
Benjamin Kramer 0d6d098841 Move various generated tables into read-only memory, fixing up const correctness along the way.
llvm-svn: 142726
2011-10-22 16:50:00 +00:00
Benjamin Kramer e889bb14f3 Pack struct better.
llvm-svn: 142725
2011-10-22 15:40:28 +00:00
Nadav Rotem e649d66552 Fix pr11193.
SHL inserts zeros from the right, thus even when the original
sign_extend_inreg value was of 1-bit, we need to sra.

llvm-svn: 142724
2011-10-22 12:39:25 +00:00
NAKAMURA Takumi 084e45bc37 test/Driver/debug.c: Mark this as "REQUIRES: shell".
Former RUN line does not make sense on Win32 hosts.
Win32 hosts would not be expected to set appropriate $PWD.

Latter RUN line might be made valid if PathV2::is_absolute("/foo") would be true. Unfortunately, "/foo" should not be treated as absolute path on Win32.

FYI, on mingw32 with MSYS bash (it has 'shell' feature);
Former) $PWD is set as "X:/hogehoge/test/Driver"
Latter) PWD=/foo sets "X:/root/to/msys/foo" to $PWD.

llvm-svn: 142721
2011-10-22 11:28:32 +00:00
NAKAMURA Takumi b5e6fa2949 lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts.
llvm-svn: 142720
2011-10-22 10:25:25 +00:00
Greg Clayton 607ddc571e Bumped versions for lldb-81 and debugserver-146.
llvm-svn: 142718
2011-10-22 03:38:38 +00:00
Greg Clayton f0705c8b90 Added template support when parsing DWARF into types. We can now use STL
classes in the expression parser.

llvm-svn: 142717
2011-10-22 03:33:13 +00:00
Ted Kremenek 33ba99566f Only emit implicit constant conversion truncation warnings in reachable code. Apparently this is what GCC does, and some code depends on this. Fixes <rdar://problem/10321089>.
llvm-svn: 142716
2011-10-22 02:37:33 +00:00
Jason Molenda a98d106d49 Document nexti, show some shorter versions of long lldb
commands.

llvm-svn: 142715
2011-10-22 02:31:42 +00:00
Ted Kremenek 4b4c51c323 Refactor ThreadSafety to use PostOrderCFGView instead of its own copy (of TopologicallySortedCFG).
llvm-svn: 142714
2011-10-22 02:14:27 +00:00
Ted Kremenek 5abde7cd5e Pull TopologicallySortedCFG out of LiveVariables into its own analysis: PostOrderCFGView.
llvm-svn: 142713
2011-10-22 02:14:23 +00:00
Sean Callanan a76eadd8bb Made the expression parser handle persistent variables
correctly even after the process has quit.

llvm-svn: 142712
2011-10-22 01:58:08 +00:00
Fariborz Jahanian e96f9c816b Fixes a minor hick up to my last patch.
llvm-svn: 142711
2011-10-22 01:56:45 +00:00
Jason Molenda bc7748b7d3 Add "display" and "undisplay" aliases for target stop-hook add/delete.
A patina of gdb's "display" command, intended mostly for simply monitoring
a variable as you step through source code.  Formatters do not work, e.g.
display/x $pc does not work.

llvm-svn: 142710
2011-10-22 01:30:52 +00:00
Fariborz Jahanian 512a4cc967 objc: private methods can have their attributes, no diagnostic is required.
None private methods if their implementation have attribute, they must exactly 
match those in their declarations. // rdar://10271563

llvm-svn: 142709
2011-10-22 01:21:15 +00:00
Johnny Chen b8da426285 Add bench.py as a driver script to run some benchmarks on lldb.
Add benchmarks for expression evaluations (TestExpressionCmd.py) and disassembly (TestDoAttachThenDisassembly.py).

An example:
[17:45:55] johnny:/Volumes/data/lldb/svn/trunk/test $ ./bench.py 2>&1 | grep -P '^lldb.*benchmark:'
lldb startup delay (create fresh target) benchmark: Avg: 0.104274 (Laps: 30, Total Elapsed Time: 3.128214)
lldb startup delay (set first breakpoint) benchmark: Avg: 0.102216 (Laps: 30, Total Elapsed Time: 3.066470)
lldb frame variable benchmark: Avg: 1.649162 (Laps: 20, Total Elapsed Time: 32.983245)
lldb stepping benchmark: Avg: 0.104409 (Laps: 50, Total Elapsed Time: 5.220461)
lldb expr cmd benchmark: Avg: 0.206774 (Laps: 25, Total Elapsed Time: 5.169350)
lldb disassembly benchmark: Avg: 0.089086 (Laps: 10, Total Elapsed Time: 0.890859)

llvm-svn: 142708
2011-10-22 00:57:05 +00:00
Jason Molenda f385f12e17 Add "stepi" as an alias for thread step-inst in addition to "si".
Add "nexti" an "ni" as aliases for thread step-inst-over.

llvm-svn: 142707
2011-10-22 00:47:41 +00:00
Bill Wendling 94e6643fce The different flavors of ARM have different valid subsets of registers. Check
that the set of callee-saved registers is correct for the specific platform.
<rdar://problem/10313708> & ctor_dtor_count & ctor_dtor_count-2

llvm-svn: 142706
2011-10-22 00:29:28 +00:00
Akira Hatanaka c12a271b55 Make changes necessary for N32/64 ABI conformance.
- Size of long double is 16 bytes for both N32 and N64.
- Size of pointers and long is 8 bytes for N64.

llvm-svn: 142705
2011-10-22 00:07:27 +00:00
Jim Grosbach 11c0b347c6 Assembly parsing for 4-register sequential variant of VLD2.
llvm-svn: 142704
2011-10-21 23:58:57 +00:00
Douglas Gregor 3fa37c5be5 XFAIL test on Windows
llvm-svn: 142703
2011-10-21 23:57:02 +00:00
Sean Callanan 2e2b8b844c Enabled dedicated debugger support in Clang, meaning
that Objective-C methods returning types incompatible
with "id" can be properly cast.

llvm-svn: 142702
2011-10-21 23:40:00 +00:00
Douglas Gregor c3afe1f8af More speculative test tweaking
llvm-svn: 142701
2011-10-21 23:37:41 +00:00
Eric Christopher 4b4beb2fe7 Fix PR11073 by adding the argument type information to the decl we construct
for the function type. Update a testcase accordingly.

Patch initially by Anders Waldenborg!

llvm-svn: 142700
2011-10-21 23:30:10 +00:00
Douglas Gregor 0a92de06f0 Switch tests from grep to FileCheck
llvm-svn: 142699
2011-10-21 23:20:41 +00:00
Greg Clayton 7c6d7b83c1 Fixed a missing quote.
llvm-svn: 142698
2011-10-21 23:04:20 +00:00
Eli Friedman faaf2731f6 Add tests for CodeGen types in MS ABI. Based on patch by r4start.
llvm-svn: 142697
2011-10-21 23:03:08 +00:00
Argyrios Kyrtzidis 6a59897d50 [PCH] When serializing Stmts, keep track of when sub statements are referenced again and
in such a case just write out a reference of a previously serialized Stmt, instead
of serializing it all over again.

This saves memory + space + [de]serializing time, and avoids blowing up memory
with pathological cases. rdar://10293911

llvm-svn: 142696
2011-10-21 23:02:28 +00:00
Argyrios Kyrtzidis d4590a5d5f Don't try to set the "array filler" in a InitListExpr twice.
llvm-svn: 142695
2011-10-21 23:02:22 +00:00
Eli Friedman 43114f9084 More ASTRecordLayout changes for MS ABI; based on patch by r4start.
llvm-svn: 142694
2011-10-21 22:49:56 +00:00
Fariborz Jahanian 47f9a73f51 c++: support gcc's application of weak attribute on
class declaration which forces any such class and any 
class that inherits from such a class to have their 
typeinfo symbols be marked as weak.
// rdar://10246395
A    test/CodeGenCXX/weak-extern-typeinfo.cpp
M    lib/Sema/SemaDeclCXX.cpp
M    lib/Sema/SemaDeclAttr.cpp
M    lib/CodeGen/CGRTTI.cpp

llvm-svn: 142693
2011-10-21 22:27:12 +00:00
Nick Lewycky 197ca87e7e Doug reports that this test is still failing. Try applying Benjamin Kramer's
suggestion!

llvm-svn: 142692
2011-10-21 22:21:24 +00:00
Jim Grosbach 118b38cbf1 Assembly parsing for 2-register sequential variant of VLD2.
llvm-svn: 142691
2011-10-21 22:21:10 +00:00
Sean Callanan b226916528 Implemented an extension to the namespace map that
permits a namespace map to be created and populated
when the namespace is imported, not just when it is
requested via FindExternalVisibleDecls().

llvm-svn: 142690
2011-10-21 22:18:07 +00:00
Bill Wendling b1c430886b Make sure that the landing pads themselves have no PHI instructions in them.
The assumption in the back-end is that PHIs are not allowed at the start of the
landing pad block for SjLj exceptions.
<rdar://problem/10313708>

llvm-svn: 142689
2011-10-21 22:08:56 +00:00
Greg Clayton 596ed24e43 If a process plug-in was specified by name, always let the plug-in get used.
llvm-svn: 142688
2011-10-21 21:41:45 +00:00