Commit Graph

135489 Commits

Author SHA1 Message Date
Chandler Carruth 482c61787c Speculatively harden the conversion logic. I have no idea if this will
help the dragonegg builders, and no test case at this point, but this
was one dimly plausible case I spotted by inspection. Hopefully will get
a testcase from those bots soon-ish, and will tidy this up with proper
testing.

llvm-svn: 165869
2012-10-13 10:49:30 +00:00
Benjamin Kramer d6b9362fc2 X86: Promote i8 cmov when both operands are coming from truncates of the same width.
X86 doesn't have i8 cmovs so isel would emit a branch. Emitting branches at this
level is often not a good idea because it's too late for many optimizations to
kick in. This solution doesn't add any extensions (truncs are free) and tries
to avoid introducing partial register stalls by filtering direct copyfromregs.

I'm seeing a ~10% speedup on reading a random .png file with libpng15 via
graphicsmagick on x86_64/westmere, but YMMV depending on the microarchitecture.

llvm-svn: 165868
2012-10-13 10:39:49 +00:00
Chandler Carruth 0fb8a7787e Silence a warning in -assert builds.
llvm-svn: 165867
2012-10-13 05:09:27 +00:00
Jordan Rose 690c063b73 [analyzer] Remove the "direct bindings only" Environment lookup.
This was only used by OSAtomicChecker and makes it more
difficult to update values for expressions that the environment
may look through instead (it's not the same as IgnoreParens).
With this gone, we can have bindExpr bind to the inner
expression that getSVal will find.

Groundwork for <rdar://problem/12137950>

llvm-svn: 165866
2012-10-13 05:05:20 +00:00
Jordan Rose 88b690dd2e [analyzer] Remove unneeded 'inlineCall' checker callback.
I believe the removed assert in CheckerManager says it best:

	InlineCall is a special hacky callback to allow intrusive
	evaluation of the call (which simulates inlining). It is
	currently only used by OSAtomicChecker and should go away
	at some point.

OSAtomicChecker has gone away; inlineCall can now go away as well!

llvm-svn: 165865
2012-10-13 05:05:13 +00:00
Chandler Carruth 891fec0b56 Clean up how we rewrite loads and stores to the whole alloca. When these
are single value types, the load and store should be directly based upon
the alloca and then bitcasting can fix the type as needed afterward.
This might in theory improve some of the IR coming out of SROA, but
I don't expect big changes yet and don't have any test cases on hand.
This is really just a cleanup/refactoring patch. The next patch will
cause this code path to be hit a lot more, actually get SROA to promote
more allocas and include several more test cases.

llvm-svn: 165864
2012-10-13 02:41:05 +00:00
Chandler Carruth eea8a48218 Fix the bootstrap of CompilerRT with host compilers that don't support
emulating 128-bit arithmetic on 32-bit x86 targets. This should get the
bootstrap back for GCC 4.6 at least.

Suggestions on better ways to do the detection here are welcome...

llvm-svn: 165863
2012-10-13 02:30:10 +00:00
Greg Clayton f402f78eb7 Make sure we always use lldb::tid_t for thread IDs so we don't truncate a 64 bit thread ID.
llvm-svn: 165862
2012-10-13 02:11:55 +00:00
Greg Clayton 998255bfe8 <rdar://problem/12491387>
I added the ability for a process plug-in to implement custom commands. All the lldb_private::Process plug-in has to do is override:

virtual CommandObject *
GetPluginCommandObject();

This object returned should be a multi-word command that vends LLDB commands. There is a sample implementation in ProcessGDBRemote that is hollowed out. It is intended to be used for sending a custom packet, though the body of the command execute function has yet to be implemented! 

llvm-svn: 165861
2012-10-13 02:07:45 +00:00
Argyrios Kyrtzidis 88db3171dd Don't neglect to "return *this".
llvm-svn: 165860
2012-10-13 02:03:45 +00:00
Chad Rosier ce17b0f5b8 Update for r165858.
llvm-svn: 165859
2012-10-13 00:26:22 +00:00
Chad Rosier 4996355592 [ms-inline asm] Remove the MatchInstruction() function. Previously, this was
the interface between the front-end and the MC layer when parsing inline
assembly.  Unfortunately, this is too deep into the parsing stack. Specifically,
we're unable to handle target-independent assembly (i.e., assembly directives,
labels, etc.).  Note the MatchAndEmitInstruction() isn't the correct
abstraction either.  I'll be exposing target-independent hooks shortly, so this
is really just a cleanup.

llvm-svn: 165858
2012-10-13 00:26:04 +00:00
Greg Clayton eaafa732df <rdar://problem/12490588>
From SBType, we can now get a lldb::BasicType enumeration out of an existing type.

llvm-svn: 165857
2012-10-13 00:20:27 +00:00
Greg Clayton 01db0c6823 Provide an SSL context ref in case SLL is needed for communication.
llvm-svn: 165856
2012-10-13 00:18:18 +00:00
Andrew Kaylor 4732872bd2 Check section type rather than assuming it's code when emitting sections while processing relocations.
llvm-svn: 165854
2012-10-12 23:53:16 +00:00
Manman Ren 7e48b252e7 ARM: tail-call inside a function where part of a byval argument is on caller's
local frame causes problem.

For example:
void f(StructToPass s) {
  g(&s, sizeof(s));
}
will cause problem with tail-call since part of s is passed via registers and
saved in f's local frame. When g tries to access s, part of s may be corrupted
since f's local frame is popped out before the tail-call.

The current fix is to disable tail-call if getVarArgsRegSaveSize is not 0 for
the caller. This is a conservative approach, if we can prove the address of
s or part of s is not taken and passed to g, it should be okay to perform
tail-call.

rdar://12442472

llvm-svn: 165853
2012-10-12 23:39:43 +00:00
Greg Clayton ea561dcffb <rdar://problem/12490558>
SBProcess::SetSelectedThreadByID() had a "uint32_t tid" parameter which would truncate 64 bit thread IDs (lldb::tid_t is 64 bit).

llvm-svn: 165852
2012-10-12 23:32:11 +00:00
Chad Rosier aac08d2c3d [ms-inline asm] Remove a bunch of parsing code from the front-end.
llvm-svn: 165851
2012-10-12 23:32:10 +00:00
Eli Friedman d13b41e32a Add TargetInfo for r600.
Patch by Tom Stellard.

llvm-svn: 165850
2012-10-12 23:32:00 +00:00
Eli Friedman 9ee2d04753 Make -mms-bitfields behave consistently.
Patch by Jeremiah Zanin.

llvm-svn: 165849
2012-10-12 23:29:20 +00:00
Greg Clayton b556c9b9db <rdar://problem/12489931>
Memory write wasn't working (assert was firing) when writing memory.

llvm-svn: 165848
2012-10-12 23:24:05 +00:00
Chad Rosier 4453e8453e [ms-inline asm] Capitalize per coding standard.
llvm-svn: 165847
2012-10-12 23:09:25 +00:00
Jakob Stoklund Olesen 5ac781c576 Fix buildbots: -misched=shuffle is only available in +Asserts builds.
llvm-svn: 165846
2012-10-12 23:01:33 +00:00
Jim Grosbach 30af442a84 ARM: Mark VSELECT as 'expand'.
The backend already pattern matches to form VBSL when it can. We may want to
teach it to use the vbsl intrinsics at some point to prevent machine licm from
mucking with this, but using the Expand is completely correct.

http://llvm.org/bugs/show_bug.cgi?id=13831
http://llvm.org/bugs/show_bug.cgi?id=13961

Patch by Peter Couperus <peter.couperus@st.com>.

llvm-svn: 165845
2012-10-12 22:59:21 +00:00
Richard Smith 7247b23efc -fcatch-undefined-behavior: Runtime library support for trapping conversions to or
from a floating-point type where the source value is not in the range of
representable values of the destination type.

llvm-svn: 165844
2012-10-12 22:57:15 +00:00
Richard Smith f9a1e4ab7d -fcatch-undefined-behavior: Trap undefined behavior due to conversions to or
from a floating-point type where the source value is not in the range of
representable values of the destination type.

llvm-svn: 165843
2012-10-12 22:57:06 +00:00
Ted Kremenek be4008472d Move assertion to not crash tests.
llvm-svn: 165842
2012-10-12 22:56:45 +00:00
Ted Kremenek 26a3661a10 Silence static analyzer issue by documenting that in this context
that a DeclRefExpr can never return a null decl.  We possibly should
hoist this into getDecl() itself.

llvm-svn: 165841
2012-10-12 22:56:42 +00:00
Ted Kremenek b045b01840 Silence null dereference warnings by documenting context-specific
invariants using assertions.

llvm-svn: 165840
2012-10-12 22:56:40 +00:00
Ted Kremenek 639a17a229 Further harden checking that scan-view isn't serving up pages outside
the server root.

llvm-svn: 165839
2012-10-12 22:56:38 +00:00
Ted Kremenek d0b9770399 Fix potential crash in ObjCContainersChecker by properly validating
the number of arguments.

llvm-svn: 165838
2012-10-12 22:56:36 +00:00
Ted Kremenek bd1d7fa460 Silence dead store warning. It is conceptually possible we will
add more code that references SourceFile, so removing the dead store
doesn't seem appropriate for the long term.

llvm-svn: 165837
2012-10-12 22:56:33 +00:00
Ted Kremenek b9f7aa46dd Fix potential null deference in CFG printer.
llvm-svn: 165836
2012-10-12 22:56:31 +00:00
Ted Kremenek 451c4d51ae Remove dead store.
llvm-svn: 165835
2012-10-12 22:56:26 +00:00
Chad Rosier 7d1ec922ff Update for r165833.
llvm-svn: 165834
2012-10-12 22:53:52 +00:00
Chad Rosier 2f480a8a50 [ms-inline asm] Use the new API introduced in r165830 in lieu of the
MapAndConstraints vector.  Also remove the unused Kind argument.

llvm-svn: 165833
2012-10-12 22:53:36 +00:00
Eli Friedman 8e23642cd1 Fix -ast-print for uses of operator->.
Patch by Grzegorz Jablonski.

llvm-svn: 165832
2012-10-12 22:45:14 +00:00
Chad Rosier f05e3bda17 [ms-inline asm] Add a few data members and member functions to the
MCParsedAsmOperand class in support of ms-style inline assembly.

llvm-svn: 165830
2012-10-12 22:15:11 +00:00
DeLesley Hutchins 6c6e8599bd Fix warnings introduced by r165826.
llvm-svn: 165829
2012-10-12 21:49:04 +00:00
Bob Wilson 06d112d2e9 Use MACOSX_DEPLOYMENT_TARGET when it is set. <rdar://problem/12433905>
llvm-svn: 165828
2012-10-12 21:48:14 +00:00
Andrew Kaylor 0fad4fff01 Correcting enum values mentioned in comments.
Patch by Ashok Thirumurthi.

llvm-svn: 165827
2012-10-12 21:47:49 +00:00
DeLesley Hutchins 2d0881b577 Thread-safety analysis: support multiple thread-safety attributes on
declarations.

llvm-svn: 165826
2012-10-12 21:38:12 +00:00
Chad Rosier 941faac455 [ms-inline asm] Remove a bunch of parsing code from the front-end, which will be
reimplemented in the AsmParser where it belongs.

llvm-svn: 165825
2012-10-12 21:37:00 +00:00
Jakob Stoklund Olesen 1a87a29d08 Use a transposed algorithm for handleMove().
Completely update one interval at a time instead of collecting live
range fragments to be updated. This avoids building data structures,
except for a single SmallPtrSet of updated intervals.

Also share code between handleMove() and handleMoveIntoBundle().

Add support for moving dead defs across other live values in the
interval. The MI scheduler can do that.

llvm-svn: 165824
2012-10-12 21:31:57 +00:00
Sean Callanan 9a97f8fad3 Fixed build problems with LLDB on Mac OS X,
specifically related to the deployment settings.
Also some minor alphabetization.

<rdar://problem/12433905>

llvm-svn: 165823
2012-10-12 21:31:06 +00:00
Douglas Gregor b70f443777 Add missing header from 165821
llvm-svn: 165822
2012-10-12 21:17:34 +00:00
Douglas Gregor 056396ae8c Sanitize the names of modules determined based on the names of headers
or directories, to make sure that they are identifiers that are not
keywords in any dialect. Fixes <rdar://problem/12489495>.

llvm-svn: 165821
2012-10-12 21:15:50 +00:00
Greg Clayton 25177af7a4 Make SBDeclaration.h a public header in the LLDB.framework.
llvm-svn: 165820
2012-10-12 20:31:06 +00:00
Bill Schmidt 7adee6f90e Remove XFAIL,fix test
llvm-svn: 165819
2012-10-12 20:16:26 +00:00
Bill Schmidt 2cf801ab9e XFAIL pending further investigation
llvm-svn: 165818
2012-10-12 20:07:31 +00:00