Commit Graph

123873 Commits

Author SHA1 Message Date
Enrico Granata 332b0b9a2f Fixing a problem with the NSSet summary provider; plus, providing a further optimization to the whole Cocoa formatters infrastructure
llvm-svn: 152423
2012-03-09 19:04:53 +00:00
Gregory Szorc 3a08300585 [llvm.py] Make ObjectFile destructor work
Previous code had a double free in MemoryBuffer. The tests now pass.

llvm-svn: 152422
2012-03-09 18:56:33 +00:00
Dan Gohman 500b598c5c When identifying exit nodes for the reverse-CFG reverse-post-order
traversal, consider nodes for which the only successors are backedges
which the traversal is ignoring to be exit nodes. This fixes a problem
where the bottom-up traversal was failing to visit split blocks along
split loop backedges. This fixes rdar://10989035.

llvm-svn: 152421
2012-03-09 18:50:52 +00:00
Fariborz Jahanian c8a322a407 lldb support: under debugger support flag, when sending message
to forward class, and assigning to an 'id' type var, message
sends default to 'id'. // rdar"//10988847

llvm-svn: 152420
2012-03-09 18:47:16 +00:00
Daniel Dunbar 62ee6417ac [AST/Sema/libclang] Replace getSourceRange().getBegin() with getLocStart().
- getSourceRange().getBegin() is about as awesome a pattern as .copy().size().

I already killed the hot paths so this doesn't seem to impact performance on my
tests-of-the-day, but it is a much more sensible (and shorter) pattern.

llvm-svn: 152419
2012-03-09 18:35:03 +00:00
Daniel Dunbar ddb83c7194 [AST/Sema] Add {CXXBaseSpecifier,Declarator,DeclSpec,TypeLoc,UnqualifiedId}::getLoc{Start,End}.
llvm-svn: 152418
2012-03-09 18:34:54 +00:00
Howard Hinnant 3bfc622bdb Enable / silence -Wunused-parameter.
llvm-svn: 152415
2012-03-09 18:01:37 +00:00
Kevin Enderby 014e1cde5f Fix the x86 disassembler to at least print the lock prefix if it is the first
prefix.  Added a FIXME to remind us this still does not work when it is not the
first prefix.

llvm-svn: 152414
2012-03-09 17:52:49 +00:00
Daniel Dunbar 3618cb7b6b [Support] Drop verbose _ATTRIBUTE from LLVM_ATTRIBUTE_{READONLY,READNONE} macro
names.

llvm-svn: 152413
2012-03-09 16:30:33 +00:00
Daniel Dunbar cdf295c532 [AST] Define a few more key getLocStart() implementations.
- This cuts the # of getSourceRange calls by 60% on
   OGF/NSBezierPath-OAExtensions.m.

llvm-svn: 152412
2012-03-09 15:39:24 +00:00
Daniel Dunbar b0ab5e9f5c [AST] Reimplement Stmt::getLoc{Start,End} to dispatch to subclass overloads.
- getSourceRange() can be very expensive, we should try to avoid it if at all possible.

In conjunction with the previous commit I measured a ~2% speedup on 403.gcc/combine.c and a 3% speedup on OmniGroupFrameworks/NSBezierPath-OAExtensions.m.

llvm-svn: 152411
2012-03-09 15:39:19 +00:00
Daniel Dunbar b507f27185 [AST] Add {DeclRefExpr,MemberExpr,ImplicitCastExpr}::{getLocStart,getLocEnd} methods.
- There are probably a lot more of these worth adding, but these are a start at hitting some of the exprs for which getSourceRange().getBegin() is a poor substitute for getLocStart().

llvm-svn: 152410
2012-03-09 15:39:15 +00:00
Daniel Dunbar d863d31f4b [AST] Add DeclaratioName::getLoc{Start,End} for consistency.
llvm-svn: 152409
2012-03-09 15:39:11 +00:00
Daniel Dunbar 7b93f636e0 [Basic] Rename LangOptions::NoInline to NoInlineDefine, to make things a bit
more obvious.

llvm-svn: 152408
2012-03-09 15:39:08 +00:00
NAKAMURA Takumi c72fdf4490 TableGen/CodeEmitterGen.cpp: Fix an expression of generating bitmask.
~0U might be i32 on 32-bit hosts, then (uint64_t)~0U might not be expected as (i64)0xFFFFFFFF_FFFFFFFF, but as (i64)0x00000000_FFFFFFFF.

llvm-svn: 152407
2012-03-09 14:52:44 +00:00
NAKAMURA Takumi aebd3da46d test/MC/X86/lit.local.cfg: Fix up to detect 'X86' in targets.
llvm-svn: 152406
2012-03-09 14:52:38 +00:00
Duncan Sands cca89124a2 Eliminate switch cases that can never match, for example removes all
negative switch cases if the branch condition is known to be positive.
Inspired by a recent improvement to GCC's VRP.

llvm-svn: 152405
2012-03-09 13:45:18 +00:00
Benjamin Kramer 1f5568c55f Harden test for 32 bit platforms, where size_t is unsigned int (not unsigned long).
llvm-svn: 152404
2012-03-09 13:17:27 +00:00
Hans Wennborg aa8c61cf94 -Wformat-non-iso: warn about positional arguments (pr12017)
This renames the -Wformat-non-standard flag to -Wformat-non-iso,
rewords the current warnings a bit (pointing out that a format string
is not supported by ISO C rather than being "non standard"),
and adds a warning about positional arguments.

llvm-svn: 152403
2012-03-09 10:10:54 +00:00
Richard Smith 29e9595bd7 Fix statement printing for raw and template user-defined literals.
llvm-svn: 152401
2012-03-09 10:10:02 +00:00
Anton Korobeynikov f32638d77c Add support for r600 (AMD GPUs HD2XXX - HD6XXX) target triplet.
Patch by Tom Stellard!

llvm-svn: 152400
2012-03-09 10:09:36 +00:00
Nick Lewycky fea3e00e09 Factor out the analysis of addition and subtraction in ComputeMaskedBits. Reuse
it to analyze extractvalue(llvm.[us](add|sub).with.overflow.*) intrinsics!

llvm-svn: 152398
2012-03-09 09:23:50 +00:00
Gregory Szorc c04bbd27af [llvm.py] Initial skeleton for Python LLVM bindings
This contains a semi-functional skeleton for the implementation of the
LLVM bindings for Python.

The API for the Object.h interface is roughly designed but not
implemented. MemoryBufferRef is implemented and actually appears to
work!

The ObjectFile unit test fails with a segmentation fault because the
LLVM library isn't being properly initialized. The build system doesn't
know about this code yet, so no alerts should fire.

llvm-svn: 152397
2012-03-09 09:07:35 +00:00
Richard Smith 5023188315 User-defined literals are done.
llvm-svn: 152396
2012-03-09 08:41:27 +00:00
Richard Smith c1b0565a26 Literal operator suffixes and regular names live in separate namespaces.
llvm-svn: 152395
2012-03-09 08:37:16 +00:00
Richard Smith 768ceccc75 Literal operators can't have default arguments.
llvm-svn: 152394
2012-03-09 08:16:22 +00:00
Andrew Trick edfe2ec429 misched: handle scheduling region boundaries nicely.
llvm-svn: 152393
2012-03-09 08:02:51 +00:00
Richard Smith bcc22fc4e1 Support for raw and template forms of numeric user-defined literals,
and lots of tidying up.

llvm-svn: 152392
2012-03-09 08:00:36 +00:00
Craig Topper 2dac962864 Use uint16_t to store opcodes in static tables in X86 backend.
llvm-svn: 152391
2012-03-09 07:45:21 +00:00
Ahmed Charles 1662013a43 Fix undefined behavior in the Mips backend.
llvm-svn: 152390
2012-03-09 06:36:45 +00:00
Michael J. Spencer e753cbc685 Fix MSVC incompatibilities.
llvm-svn: 152389
2012-03-09 05:27:43 +00:00
Michael J. Spencer b5ef4df359 StringRef is not null terminated.
llvm-svn: 152388
2012-03-09 05:27:20 +00:00
Michael J. Spencer 9f91f958b1 Use llvm/Support/DataTypes instead of stdint.h
llvm-svn: 152387
2012-03-09 05:27:11 +00:00
Michael J. Spencer 4ff3c79998 Use nullptr instead of NULL, and remove use of VLA.
llvm-svn: 152386
2012-03-09 05:26:55 +00:00
Greg Clayton 2bf10c3766 Bumping Xcode project versions for lldb-126 and debugserver-176.
llvm-svn: 152384
2012-03-09 04:31:41 +00:00
Greg Clayton b5225c863c Bumping Xcode project versions for lldb-126 and debugserver-176.
llvm-svn: 152383
2012-03-09 04:31:35 +00:00
Andrew Trick 8c207e47c1 misched interface: rename Begin/End to RegionBegin/RegionEnd since they are not private.
llvm-svn: 152382
2012-03-09 04:29:02 +00:00
Greg Clayton f3bb3e472f <rdar://problem/11016907>
Get function boundaries from the LC_FUNCTION_STARTS load command. This helps to determine symbol sizes and also allows us to be able to debug stripped binaries.

If you have a stack backtrace that goes through a function that has been stripped from the symbol table, the variables for any functions above that stack frame will most likely be incorrect. It can also affect our ability to step in/out/through of a function.

llvm-svn: 152381
2012-03-09 04:26:05 +00:00
Greg Clayton efbc7d2356 <rdar://problem/11016922>
Don't show variable values in Xcode when they are out of scope. This allows Xcode to step a lot faster when there are many variables in the variables view.

llvm-svn: 152380
2012-03-09 04:23:44 +00:00
Greg Clayton 8f15c829bf Remove a debug binary from the scheme.
llvm-svn: 152379
2012-03-09 04:22:55 +00:00
John McCall 1d0003ee32 Remove accidental binary commit.
llvm-svn: 152378
2012-03-09 04:18:33 +00:00
Daniel Dunbar c647587aa3 [AST] Memoize ASTContext::getTypeInfo().
- On -emit-llvm-only of 403.gcc/combine.c, for example, we make 160k calls to
   getTypeInfo but only ever deal with 680 some distinct types.

I saw these speedups (user time):
  403.gcc/combine.c -- 3.1%
  OmniGroupFrameworks/NSBezierPath-OAExtensions.m -- 3.6%
  JavaScriptCore/Interpreter.cpp -- 1.4%
which seems pretty sweet.

I ran some histograms on those compiles and we end up doing a ton of
getTypeInfo() on 'char' and 'int'. I tried splitting out a fast path for builtin
types, but this wasn't a win. Still kinda seems like we could be doing better
here.

llvm-svn: 152377
2012-03-09 04:12:54 +00:00
Jim Ingham 564d8bc255 First stage of implementing step by "run to next branch". Doesn't work yet, is turned off.
<rdar://problem/10975912>

llvm-svn: 152376
2012-03-09 04:10:47 +00:00
John McCall ef42902816 Perform l2r conversions on delete operands before doing
type-analysis;  otherwise, we just completely do the
wrong thing for placeholders.

llvm-svn: 152375
2012-03-09 04:08:29 +00:00
Andrew Trick 1c0ec45b67 misched comments
llvm-svn: 152374
2012-03-09 03:46:42 +00:00
Andrew Trick a21daf7f5b revert 152356: verify misched changes using -misched=shuffle.
llvm-svn: 152373
2012-03-09 03:46:39 +00:00
Eli Friedman 1c8d2ca829 Make sure we update the static local decl address map when we are forced to rebuild a global because of the initializer. <rdar://problem/10957867>.
llvm-svn: 152372
2012-03-09 03:27:46 +00:00
Enrico Granata 9d60f60760 Changed ValueObject to use a dedicated ChildrenManager class to store its children, instead of an std::vector
This solves an issue where a ValueObject was getting a wrong children count (usually, a huge value) and trying to resize the vector of children to fit that many ValueObject*

Added a loop detection algorithm to the synthetic children provider for std::list

Added a few more checks to the synthetic children provider for std::vector

Both std::list and std::vector's synthetic children providers now cache the count of children instead of recomputing it every time
std::map has a field that stores the count, so there is little need to cache it on our side

llvm-svn: 152371
2012-03-09 03:09:58 +00:00
Eli Friedman effcd47eef Make sure constant emission handles initializer lists with strings correctly. Part of <rdar://problem/10957867>.
llvm-svn: 152370
2012-03-09 03:06:56 +00:00
Chandler Carruth 1bb80affe8 Fix a silly restriction on the fast-path for hash_combine_range. This
caused several clients to select the slow variation. =[ This is extra
annoying because we don't have any realistic way of testing this -- by
design, these two functions *must* compute the same value.

Found while inspecting the output of some benchmarks I'm working on.

llvm-svn: 152369
2012-03-09 02:49:38 +00:00