Commit Graph

115793 Commits

Author SHA1 Message Date
Owen Anderson e245af65fa Add relocation iterators to the libObject C API.
llvm-svn: 143107
2011-10-27 17:15:47 +00:00
Benjamin Kramer 2aed4393b8 BlockFrequency: Use a smarter overflow check.
This trades one 64 bit div for one 64 bit mul and some arithmetic.

llvm-svn: 143106
2011-10-27 16:38:50 +00:00
Howard Hinnant 9563a09cee Windows port work by Ruben Van Boxem
llvm-svn: 143105
2011-10-27 16:24:42 +00:00
Howard Hinnant 0176bc6cf5 Fixed bug in __independent_bits_engine found by Nick (from stackoverflow)
llvm-svn: 143104
2011-10-27 16:12:10 +00:00
Bob Wilson 1455ce27e4 Revert Duncan's r143028 expression folding which appears to be the culprit
behind a compile failure on 483.xalancbmk.

llvm-svn: 143102
2011-10-27 15:47:25 +00:00
Benjamin Kramer 9d415787ab LLLexer: Factor hex char parsing.
llvm-svn: 143101
2011-10-27 14:08:01 +00:00
Douglas Gregor 935bc7a214 Make the loading of information attached to an IdentifierInfo from an
AST file more lazy, so that we don't eagerly load that information for
all known identifiers each time a new AST file is loaded. The eager
reloading made some sense in the context of precompiled headers, since
very few identifiers were defined before PCH load time. With modules,
however, a huge amount of code can get parsed before we see an
@import, so laziness becomes important here.

The approach taken to make this information lazy is fairly simple:
when we load a new AST file, we mark all of the existing identifiers
as being out-of-date. Whenever we want to access information that may
come from an AST (e.g., whether the identifier has a macro definition,
or what top-level declarations have that name), we check the
out-of-date bit and, if it's set, ask the AST reader to update the
IdentifierInfo from the AST files. The update is a merge, and we now
take care to merge declarations before/after imports with declarations
from multiple imports.

The results of this optimization are fairly dramatic. On a small
application that brings in 14 non-trivial modules, this takes modules
from being > 3x slower than a "perfect" PCH file down to 30% slower
for a full rebuild. A partial rebuild (where the PCH file or modules
can be re-used) is down to 7% slower. Making the PCH file just a
little imperfect (e.g., adding two smallish modules used by a bunch of
.m files that aren't in the PCH file) tips the scales in favor of the
modules approach, with 24% faster partial rebuilds.

This is just a first step; the lazy scheme could possibly be improved
by adding versioning, so we don't search into modules we already
searched. Moreover, we'll need similar lazy schemes for all of the
other lookup data structures, such as DeclContexts.

llvm-svn: 143100
2011-10-27 09:33:13 +00:00
Hans Wennborg 27541dbe1a Teach format string analysis that "%zu" means size_t.
The code had it backwards, thinking size_t was signed, and using that for "%zd".

Also let the analysis get the types for (u)intmax_t while we are at it.

llvm-svn: 143099
2011-10-27 08:29:09 +00:00
Nick Lewycky b25abd1a54 Move these test from checking assembly to checking LLVM IR. Should fix fallout
from r143097.

llvm-svn: 143098
2011-10-27 07:11:43 +00:00
Nick Lewycky d59c0cac6c Teach our Dwarf emission to use the string pool.
llvm-svn: 143097
2011-10-27 06:44:11 +00:00
Sean Callanan 7f9be0fdc1 Liberalized the "id" check a little; now "id" can
be found in namespaces.

llvm-svn: 143096
2011-10-27 02:10:28 +00:00
Eli Friedman e9e356ad6b Don't crash on 128-bit sdiv by constant. Found by inspection.
llvm-svn: 143095
2011-10-27 02:06:39 +00:00
Sean Callanan fb40b0d4b5 Disabled lookups for the Objective-C builtin type "id;"
the compiler should pick this type up automatically.

llvm-svn: 143094
2011-10-27 02:06:03 +00:00
Eli Friedman 73beaf7bbc It is not safe to sink an alloca into a stacksave/stackrestore pair, so don't do that. <rdar://problem/10352360>
llvm-svn: 143093
2011-10-27 01:33:51 +00:00
Greg Clayton 04b78e9f20 Updated the grossly out of date status page.
llvm-svn: 143092
2011-10-27 01:33:27 +00:00
Anna Zaks 71fe3b45ec [analyzer] Optimize by not generating empty transitions in CheckerContext
Go not generate a new transition by addTransition methods if nothing changed.

llvm-svn: 143091
2011-10-27 00:59:32 +00:00
Anna Zaks 0ec04bf738 [analyzer] Move enqueueEndOfFunction into CoreEngine.
llvm-svn: 143090
2011-10-27 00:59:28 +00:00
Anna Zaks b1d3d96872 [analyzer] Make CoreEngine responsible for enqueueing Stmt Nodes.
Enqueue the nodes generated as the result of processing a statement
inside the Core Engine. This makes sure ExpEngine does not access
CoreEngine's private members and is more concise.

llvm-svn: 143089
2011-10-27 00:59:23 +00:00
Argyrios Kyrtzidis 67f914dc97 Make use of the parameter in Sema::ActOnObjCTemporaryExitContainerContext.
llvm-svn: 143088
2011-10-27 00:53:06 +00:00
Johnny Chen 09e87a6622 Add display of min and max samples to Stopwatch's string representation.
llvm-svn: 143087
2011-10-27 00:32:03 +00:00
Chad Rosier d24e7e1d9b A branch predicated on a constant can just FastEmit an unconditional branch.
llvm-svn: 143086
2011-10-27 00:21:16 +00:00
Argyrios Kyrtzidis a9aabf7d51 Fix crash on an @interface nested inside @implementation, rdar://10336158
llvm-svn: 143085
2011-10-27 00:09:34 +00:00
Argyrios Kyrtzidis f26b12ada0 For the "'@end' is missing in implementation context" point at the location of '@'.
llvm-svn: 143084
2011-10-27 00:09:29 +00:00
Sean Callanan 7ba9636f0a Added an extra parameter to the object-checker
functions in the Objective-C language runtime
that is set to the selector that is being passed
to the object.

llvm-svn: 143083
2011-10-27 00:02:05 +00:00
Fariborz Jahanian 3249a1e862 Do not warn when weak-import attribute is applied to enum
decl. in Darwin due to certain projects requirement. 
// rdar://10277579

llvm-svn: 143082
2011-10-26 23:59:12 +00:00
Lang Hames 58dba012b6 Rename NonScalarIntSafe to something more appropriate.
llvm-svn: 143080
2011-10-26 23:50:43 +00:00
Chad Rosier a486f44733 Add a TODO comment. FastISel works by parsing each basic block from the bottom
up.  Thus, improving the support for compares is goodness because it increases
the number of terminator instructions we can handle.  This creates many more 
opportunities for target specific fast-isel.

llvm-svn: 143079
2011-10-26 23:34:37 +00:00
Chad Rosier 78127d31f3 Factor a little more code into EmitCmp, which should have been done in the first
place.  No functional change intended.

llvm-svn: 143078
2011-10-26 23:25:44 +00:00
Douglas Gregor 7c81c70b03 Disalbe more Microsoft-specific stuff.
llvm-svn: 143077
2011-10-26 23:19:04 +00:00
Chad Rosier eafbf3faa9 Use EmitCmp in SelectBranch. No functional change intended.
llvm-svn: 143076
2011-10-26 23:17:28 +00:00
Johnny Chen 66d362e9bf Establish a baseline for bench.py score by using a fixed lldb executable as the
inferior program for the lldb debugger to operate on.  The fixed lldb executable
corresponds to r142902.

Plus some minor modifications to the test benchmark to conform to way bench.py
is meant to be invoked.

llvm-svn: 143075
2011-10-26 22:58:02 +00:00
Nick Lewycky 654f5ce812 Reflow lines, fix comments for doxygen style, fix whitespace. No functionality
change.

llvm-svn: 143074
2011-10-26 22:55:33 +00:00
Bill Wendling a2ae87bef2 Add include-what-you-use to the External Projects list.
llvm-svn: 143073
2011-10-26 22:55:18 +00:00
Chad Rosier 59a201950b Factor out an EmitCmp function that can be used by both SelectCmp and
SelectBranch.  No functional change intended.

llvm-svn: 143072
2011-10-26 22:47:55 +00:00
Jim Grosbach 6485a7991d Trailing whitespace.
llvm-svn: 143071
2011-10-26 22:44:41 +00:00
Jim Grosbach 61fdba048f Thumb2 ldr pc-relative encoding fixes.
We were parsing label references to the i12 encoding, which isn't right.
They need to go to the pci variant instead.

More of rdar://10348687

llvm-svn: 143068
2011-10-26 22:22:01 +00:00
Rafael Espindola f5a15529a7 Run test with -verify-machineinstrs.
Patch by Sanjoy Das.

llvm-svn: 143066
2011-10-26 21:20:26 +00:00
Sean Callanan d2cb626ac1 Extended the IR interpreter to handle the variables
"_cmd", "this", and "self".  These variables are handled
differently from all other external variables used by
the expression.  Other variables are used indirectly
through the $__lldb_arg operand; only _cmd, this, and
self are passed directly through the ABI.

There are two modifications:

 - I added a function to ClangExpressionDeclMap that
   retrives the value of one of these variables by name;
   and

 - I made IRInterpreter fetch these values when needed,
   and ensured that the proper level of indirection is
   used.

llvm-svn: 143065
2011-10-26 21:20:00 +00:00
Rafael Espindola b3285224cd Fixes an issue reported by -verify-machineinstrs.
Patch by Sanjoy Das.

llvm-svn: 143064
2011-10-26 21:16:41 +00:00
Jim Grosbach 4e380354a9 ARM parse parenthesized expressions for label references.
Partial fix for rdar://10348687.

llvm-svn: 143063
2011-10-26 21:14:08 +00:00
Rafael Espindola 66393c127d This commit introduces two fake instructions MORESTACK_RET and
MORESTACK_RET_RESTORE_R10; which are lowered to a RET and a RET
followed by a MOV respectively.  Having a fake instruction prevents
the verifier from seeing a MachineBasicBlock end with a
non-terminator (MOV).  It also prevents the rather eccentric case of a
MachineBasicBlock ending with RET but having successors nevertheless.

Patch by Sanjoy Das.

llvm-svn: 143062
2011-10-26 21:12:27 +00:00
Anna Zaks c9abbe2b3e [analyzer] Add getLocationContext to CheckerContext
CheckerContext::getPredecessor is only used to get to the LocationContext
half of the times.

llvm-svn: 143061
2011-10-26 21:06:44 +00:00
Anna Zaks 6b1c21268d [analyzer] Remove EmitBasicReport form CheckerContext.
The path sensitive checkers should use EmitBasicReport, which provides the
node information.

llvm-svn: 143060
2011-10-26 21:06:39 +00:00
Anna Zaks da4c8d6811 [analyzer] Rename generateNode -> addTransition in CheckerContext
Also document addTransition methods.

llvm-svn: 143059
2011-10-26 21:06:34 +00:00
Anna Zaks 1b73ea342c [analyzer] Remove forward declarations of GenericNodeBuilder
llvm-svn: 143058
2011-10-26 21:06:25 +00:00
Anna Zaks b31d0143dd [analyzer] GenericNodeBuilder -> NodeBuilder.
Remove GenericNodeBuilder and use a class inherited from NodeBuilder instead.

llvm-svn: 143057
2011-10-26 21:06:22 +00:00
Greg Clayton 63f8cc6aca Fixed the display of OSTypes (the four character codes).
llvm-svn: 143056
2011-10-26 21:01:16 +00:00
Lang Hames c47e283430 Make sure short memsets on ARM lower to stores, even when optimizing for size.
llvm-svn: 143055
2011-10-26 20:56:52 +00:00
Duncan Sands ba286d7c73 The maximum power of 2 dividing a power of 2 is itself. This occurs
in 403.gcc and was spotted by my super-optimizer.

llvm-svn: 143054
2011-10-26 20:55:21 +00:00
Fariborz Jahanian b005070b83 Objective-c: fix an ir-gen crash where objc messag returns a _Complex
value and ABI requires return slot to be passed as first
argument to message sent. // rdar://10331109

llvm-svn: 143053
2011-10-26 20:53:59 +00:00