Commit Graph

135914 Commits

Author SHA1 Message Date
Matt Beaumont-Gay abf836cffa Fix -Wunused-value to not warn on expressions that have unresolved lookups due
to dependent arguments.

llvm-svn: 166468
2012-10-23 06:15:26 +00:00
Nadav Rotem 58df27cb2e Add a comment which explains why the assert fired and how to fix it.
llvm-svn: 166467
2012-10-23 04:35:40 +00:00
Argyrios Kyrtzidis 118fafa301 [libclang] Add an environment variable to disable thread background priotity, for testing
llvm-svn: 166466
2012-10-23 04:09:38 +00:00
Jason Molenda 7cd5e831e5 Change how the UnwindAssemblyInstEmulation class tracks the setup of
the function's prologue instructions so we can re-instate that prologue
if we hit an early return mid-function.  Add some additional heuristics
to differentiate between prologue and epilogue instruction sequences.

This fixes the specific problem of correctly unwinding through a function
which has an epilogue one instruction after the last prologue setup
instruction has completed.
<rdar://problem/12091139> 

llvm-svn: 166465
2012-10-23 03:08:31 +00:00
Jason Molenda a7dcb33716 Clean up help/usage messages for kdp-remote / gdb-remote a little bit.
llvm-svn: 166464
2012-10-23 03:05:16 +00:00
Eli Friedman d5d136be5b [ms-inline-asm] Add handling for errors coming out of the backend.
llvm-svn: 166463
2012-10-23 02:43:30 +00:00
Enrico Granata db8142b8e8 Fixing a compiler warning about has_children being used before being initialized
llvm-svn: 166462
2012-10-23 02:07:54 +00:00
Rafael Espindola e2a9e90c88 Don't try to use inreg with 0 sized structs. Thanks to Eli for reporting the
regression.

llvm-svn: 166461
2012-10-23 02:04:01 +00:00
Greg Clayton 4a792072ce <rdar://problem/12493007>
Added a new API call to help efficiently determine if a SBValue could have children:

     bool
     SBValue::MightHaveChildren ();
     
This is inteneded to be used bui GUI programs that need to show if a SBValue needs a disclosure triangle when displaying a hierarchical type in a tree view without having to complete the type (by calling SBValue::GetNumChildren()) as completing the type is expensive.

llvm-svn: 166460
2012-10-23 01:50:10 +00:00
Reed Kotler 164bb37c7b implement setXX patterns
llvm-svn: 166459
2012-10-23 01:35:48 +00:00
Michael J. Spencer 7ccb6d9f8a [Options] Fix two options I mistransformed.
llvm-svn: 166458
2012-10-23 01:25:21 +00:00
Sean Callanan d94773972c Improved support for language types as command
options:

- added help ("help language") listing the
  possible options;

- added the possibility of synonyms for language
  names, in this case "ObjC" for "Objective-C";
  and

- made matching against language names case
  insensitive.

This should improve discoverability.

<rdar://problem/12552359>

llvm-svn: 166457
2012-10-23 00:50:09 +00:00
Julien Lerouge a302b6d95e Fix typo.
llvm-svn: 166456
2012-10-23 00:38:15 +00:00
Richard Smith 2ddcbab8ff Ugly ugly hack for libstdc++-4.6 and libstdc++-4.7 compatibility. These
libraries have an incorrect definition of std::common_type (inherited from a
bug in the standard -- see LWG issue 2141), whereby they produce reference
types when they should not.

If we instantiate a typedef named std::common_type<...>::type, which is defined
in a system header as decltype(... ? ... : ...), and the decltype produces a
reference type, convert it to the non-reference type. (This doesn't affect any
LWG2141-conforming implementation of common_type, such as libc++'s, because the
default implementation of common_type<...>::type isn't supposed to produce a
reference type.)

This is horrible. I'm really sorry. :( Better ideas appreciated!

llvm-svn: 166455
2012-10-23 00:32:41 +00:00
Julien Lerouge d7fa5e420d Explain why DenseMap is still used here instead of MapVector.
llvm-svn: 166454
2012-10-23 00:23:46 +00:00
Enrico Granata bc08ab450a <rdar://problem/12500212> Test case for the new plugin feature
llvm-svn: 166453
2012-10-23 00:09:02 +00:00
Douglas Gregor c2d984c823 Handle implicitly-included PCH files the same way as
implicitly-included PTH files during initialization, delaying the
mapping down to the "original source file" until after later in the
initialization process.

llvm-svn: 166452
2012-10-22 23:59:45 +00:00
Eli Friedman 0f4871d487 [ms-inline-asm] Implement _emit directive (which is roughly equivalent to .byte).
<rdar://problem/12470345>.

llvm-svn: 166451
2012-10-22 23:58:19 +00:00
Sean Callanan ec979baef7 Added support for zero-length arrays at the end
of structures, and added a testcase.

<rdar://problem/12551591>

llvm-svn: 166450
2012-10-22 23:56:48 +00:00
Douglas Gregor 4b29c16eec Allow clients of the AST reader to specify what kinds of AST load
failures they know how to tolerate, e.g., out-of-date input files or
configuration/version mismatches. Suppress the corresponding
diagnostics if the client can handle it.

No clients actually use this functionality, yet.

llvm-svn: 166449
2012-10-22 23:51:00 +00:00
Bill Wendling 12cda50f1f When a block ends in an indirect branch, add its successors to the machine basic block.
The CFG of the machine function needs to know that the targets of the indirect
branch are successors to the indirect branch.
<rdar://problem/12529625>

llvm-svn: 166448
2012-10-22 23:30:04 +00:00
Douglas Gregor 4750b77ea1 Collapse ASTReader::ReadSLocEntryRecord() into its only caller,
ReadSLocEntry(). No functionality change.

llvm-svn: 166447
2012-10-22 22:53:10 +00:00
Douglas Gregor c9ad5fb604 Distinguish the various kinds of AST file loading failures:
file corruption, compiler version mismatch, target/language
configuration mismatch, out-of-date AST file. No functionality change
yet.

llvm-svn: 166446
2012-10-22 22:50:17 +00:00
Kevin Enderby 62183c4e18 Add support for annotated disassembly output for X86 and arm.
Per the October 12, 2012 Proposal for annotated disassembly output sent out by
Jim Grosbach this set of changes implements this for X86 and arm.  The llvm-mc
tool now has a -mdis option to produced the marked up disassembly and a couple
of small example test cases have been added.

rdar://11764962

llvm-svn: 166445
2012-10-22 22:31:46 +00:00
Michael J. Spencer 929fccd476 [Options] Add prefixes to options.
Each option has a set of prefixes. When matching an argument such as
-funroll-loops. First the leading - is removed as it is a prefix. Then
a lower_bound search for "funroll-loops" is done against the option table by
option name. From there each option prefix + option name combination is tested
against the argument.

This allows us to support Microsoft style options where both / and - are valid
prefixes. It also simplifies the cases we already have where options come in
both - and -- forms. Almost every option for gnu-ld happens to have this form.

llvm-svn: 166444
2012-10-22 22:13:48 +00:00
Enrico Granata dbeb0f0e0c Proper copyright notice
llvm-svn: 166443
2012-10-22 22:03:16 +00:00
NAKAMURA Takumi 395a574ea2 ASTReader.cpp: Fix a warning. [-Wunused-variable]
llvm-svn: 166442
2012-10-22 21:50:39 +00:00
Eli Friedman 01e4d5937a Testcase change for r166440.
llvm-svn: 166441
2012-10-22 20:50:45 +00:00
Eli Friedman 15e9b33678 [ms-inline asm] Don't rewrite out parts of an inline-asm skipped by .if 0 and friends.
It's unnecessary and makes the generated assembly less faithful to the original source.

llvm-svn: 166440
2012-10-22 20:50:25 +00:00
Greg Clayton e4c1ef55ce <rdar://problem/12524810>
Fixed a crasher where if an invalid SBTarget was passed to:

lldb::addr_t
SBAddress::GetLoadAddress (const SBTarget &target) const;

We would crash.

llvm-svn: 166439
2012-10-22 20:49:35 +00:00
Richard Trieu da031982b8 Fix for PR13334. This prevents crashes that result from badly formed
expressions involving __has_include

llvm-svn: 166438
2012-10-22 20:28:48 +00:00
Chad Rosier 5bca3f9b8e [ms-inline asm] Add the isOffsetOf() function.
Part of rdar://12470317

llvm-svn: 166436
2012-10-22 19:50:35 +00:00
Julien Lerouge 8cf84fa4e2 Iterating over a DenseMap<std::pair<BasicBlock*, unsigned>, PHINode*> is not
deterministic, replace it with a DenseMap<std::pair<unsigned, unsigned>,
PHINode*> (we already have a map from BasicBlock to unsigned).

<rdar://problem/12541389>

llvm-svn: 166435
2012-10-22 19:43:56 +00:00
Chad Rosier f7000f8c5b [ms-inline asm] Test case for r166433.
llvm-svn: 166434
2012-10-22 19:43:17 +00:00
Chad Rosier c14ed95da4 [ms-inline asm] Add support for parsing the offset operator. Callback for
CodeGen in the front-end not implemented yet.
rdar://12470317

llvm-svn: 166433
2012-10-22 19:42:52 +00:00
Enrico Granata f71a839999 <rdar://problem/12479701> Use the plain pydoc pager to work around Python help() pagination conflicts with our I/O management
llvm-svn: 166432
2012-10-22 19:09:28 +00:00
Daniel Dunbar d9debab629 Fix pre-commit refacto failure.
llvm-svn: 166431
2012-10-22 18:56:43 +00:00
Daniel Dunbar f7124da497 driver/Darwin: Follow up to last patch, M-class CPUs are AAPCS but not EABI.
llvm-svn: 166430
2012-10-22 18:51:13 +00:00
Douglas Gregor 3120d2c389 Eliminate the redundancy between source-file information in the source
manager block and input-file information in the control block. The
source manager entries now point back into the control block. Input
files are now lazily deserialized (if validation is disabled). Reduces
Cocoa's PCH by the ~70k I added when I introduced the redundancy in
r166251.

llvm-svn: 166429
2012-10-22 18:42:04 +00:00
Daniel Dunbar 5f18f6e4d6 driver/Darwin: Default to AAPCS for M-class CPUs.
- This is an assumption that is currently hardwired into the backend, we need
   to do this in order for the frontend and backend to agree.

llvm-svn: 166428
2012-10-22 18:30:51 +00:00
Nadav Rotem 1c7fc71e69 Don't crash if the load/store pointer is not a GEP.
Fix by Shivarama Rao <Shivarama.Rao@amd.com>

llvm-svn: 166427
2012-10-22 18:27:56 +00:00
Enrico Granata e3e91517ff <rdar://problem/12437442>
Given our implementation of ValueObjects we could have a scenario where a ValueObject has a dynamic type of Foo* at one point, and then its dynamic type changes to Bar*
If Bar* has synthetic children enabled, by the time we figure that out, our public API is already vending SBValues wrapping a DynamicVO, instead of a SyntheticVO and there was
no trivial way for us to change the SP inside an SBValue on the fly
This checkin reimplements SBValue in terms of a wrapper, ValueImpl, that allows this substitutions on-the-fly by overriding GetSP() to do The Right Thing (TM)
As an additional bonus, GetNonSyntheticValue() now works, and we can get rid of the ForceDisableSyntheticChildren idiom in ScriptInterpreterPython
Lastly, this checkin makes sure the synthetic VOs get the correct m_value and m_data from their parents (prevented summaries from working in some cases)

llvm-svn: 166426
2012-10-22 18:18:36 +00:00
Nadav Rotem 2f758cf8ba Add a testcase for the previous commit.
llvm-svn: 166425
2012-10-22 18:16:55 +00:00
Argyrios Kyrtzidis 54ff5e81a1 Revert r166407 because it caused analyzer tests to crash and broke self-host bots.
llvm-svn: 166424
2012-10-22 18:16:14 +00:00
Hal Finkel 931c52b84c BBVectorize should ignore unreachable blocks.
Unreachable blocks can have invalid instructions. For example,
jump threading can produce self-referential instructions in
unreachable blocks. Also, we should not be spending time
optimizing unreachable code. Fixes PR14133.

llvm-svn: 166423
2012-10-22 18:00:55 +00:00
Nadav Rotem dbf4783634 Add the "ForceSizeOpt" attribute.
Patch by Quentin Colombet <qcolombet@apple.com>

Original description:
"""
The attached patch is the first step to have a better control on Oz related optimizations.
The Oz optimization level focuses on code size, thus I propose to add an attribute called ForceSizeOpt.
"""

llvm-svn: 166422
2012-10-22 17:33:31 +00:00
Daniel Jasper 632aea92a5 Implement hasParent()-matcher.
llvm-svn: 166421
2012-10-22 16:26:51 +00:00
Greg Clayton 7bc31332b8 <rdar://problem/12473003>
Allow type searches to specify a type keyword when searching for type. Currently supported type keywords are: struct, class, union, enum, and typedef.

So now you can search for types with a string like "struct foo".

llvm-svn: 166420
2012-10-22 16:19:56 +00:00
Nadav Rotem f17cd27362 Rename a variable.
llvm-svn: 166410
2012-10-22 04:53:05 +00:00
Nadav Rotem 03011f1393 Vectorizer: optimize the generation of selects. If the condition is uniform, generate a scalar-cond select (i1 as selector).
llvm-svn: 166409
2012-10-22 04:38:00 +00:00