Commit Graph

159122 Commits

Author SHA1 Message Date
Aaron Ballman 3cab3740b6 Silencing an MSVC warning.
llvm-svn: 192042
2013-10-05 19:41:41 +00:00
Benjamin Kramer 7200a46c17 Emit a better error when running out of registers on inline asm.
The most likely case where this error happens is when the user specifies
too many register operands. Don't make it look like an internal LLVM bug
when we can see that the error is coming from an inline asm instruction.
For other instructions we keep the "ran out of registers" error.

llvm-svn: 192041
2013-10-05 19:33:37 +00:00
Craig Topper 9a9468ee02 Remove underscores from TBM instruction names for consistency with other instruction naming.
llvm-svn: 192040
2013-10-05 19:27:26 +00:00
Craig Topper 52196640a2 Remove unneeded TBM intrinsics. The arithmetic/logical operation patterns are sufficient.
llvm-svn: 192039
2013-10-05 19:22:59 +00:00
Marshall Clow de9320aa2b Implement LWG issue 2275 'forward_as_tuple should be constexpr'
llvm-svn: 192038
2013-10-05 18:46:37 +00:00
Craig Topper 80bd135e7a Add an additional pattern for BLCI since opt can turn (not (add x, 1)) into (sub -2, x).
llvm-svn: 192037
2013-10-05 17:17:53 +00:00
Craig Topper d335c9da22 Use logical/arithmetic operations instead of builtins in tbmintrin.h. This way we can remove the intrinsic support from the backend.
llvm-svn: 192036
2013-10-05 17:08:42 +00:00
Rafael Espindola ac4ad25a00 Remove some really nasty uses of hasRawTextSupport.
When MC was first added, targets could use hasRawTextSupport to keep features
working before they were added to the MC interface.

The design goal of MC is to provide an uniform api for printing assembly and
object files. Short of relaxations and other corner cases, a object file is
just another representation of the assembly.

It was never the intention that targets would keep doing things like

if (hasRawTextSupport())
  Set flags in one way.
else
  Set flags in another way.

When they do that they create two code paths and the object file is no longer
just another representation of the assembly. This also then requires testing
with llc -filetype=obj, which is extremelly brittle.

This patch removes some of these hacks by replacing them with smaller ones.
The ARM flag setting is trivial, so I just moved it to the constructor. For
Mips, the patch adds two temporary hack directives that allow the assembly
to represent the same things as the object file was already able to.

The hope is that the mips developers will replace the hack directives with
the same ones that gas uses and drop the -print-hack-directives flag.

I will also try to implement a target streamer interface, so that we can
move this out of the common code.

In summary, for any new work, two rules of the thumb are
  * Don't use "llc -filetype=obj" in tests.
  * Don't add calls to hasRawTextSupport.

llvm-svn: 192035
2013-10-05 16:42:21 +00:00
Simon Atanasyan a0d895733b Remove unused param from Linux::computeSysRoot().
llvm-svn: 192034
2013-10-05 14:37:55 +00:00
Edwin Vane 9e5b0da062 clang-modernize: Fix clang-apply-replacements invocation bug
The command-line for clang-apply-replacements was being mangled due to an
uninitialized variable. gasp! Now fixed.

llvm-svn: 192033
2013-10-05 13:31:31 +00:00
Edwin Vane c0f00b79f7 clang-modernize: Apply replacements using clang-apply-replacements
Summary:
The clang-apply-replacements process is now invoked to apply
replacements between applying transforms. This resulted in a massive
simplification of the tool:
- FileOverrides class no longer needed.
- Change tracking and code formatting no longer needed.
- No more dependency on libclangApplyReplacements.
- Final syntax check is easier to do directly now than with a separate
  header/source pair.

Replacement handling stuff abstracted into a new header/source pair to
de-clutter ClangModernize.cpp somewhat.

Tests updated.

Differential Revision: http://llvm-reviews.chandlerc.com/D1836

llvm-svn: 192032
2013-10-05 12:15:58 +00:00
Benjamin Kramer c83946f7f5 lli: Plug leaks in the remote target external implementation.
llvm-svn: 192031
2013-10-05 11:53:20 +00:00
Benjamin Kramer 3c529ca930 Sema: Cleanup redundant variable NumArgsToCheck
Patch by Daniel Marjamäki!

llvm-svn: 192030
2013-10-05 10:03:01 +00:00
Jiangning Liu b96ebac02b Implement aarch64 neon instruction set AdvSIMD (Across).
llvm-svn: 192029
2013-10-05 08:22:55 +00:00
Jiangning Liu ad242fbb71 Implement aarch64 neon instruction set AdvSIMD (Across).
llvm-svn: 192028
2013-10-05 08:22:10 +00:00
Alp Toker 1dc02a360d Remove unused Sema::DelayedDestructorExceptionSpecs
This was a leftover from r160847.

llvm-svn: 192027
2013-10-05 06:50:51 +00:00
Craig Topper a1bbc323fa Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon.
llvm-svn: 192026
2013-10-05 05:38:16 +00:00
Rafael Espindola aff49df0fe Convert test to FileCheck.
llvm-svn: 192025
2013-10-05 02:58:36 +00:00
Jason Molenda 27148b3d37 Fix a few errors found when building lldb with newer versions of clang.
<rdar://problem/15148224> 

llvm-svn: 192024
2013-10-05 02:52:22 +00:00
Venkatraman Govindaraju ece63dbd0d [Sparc] Use correct alignment while loading/storing fp128 values.
llvm-svn: 192023
2013-10-05 02:29:47 +00:00
Andrew Kaylor b2c1ee2a96 Updating XFAILs for recent GOT tests
llvm-svn: 192022
2013-10-05 01:56:50 +00:00
Andrew Kaylor 4968ca50e8 Adding tests for multiple GOTs with MCJIT
llvm-svn: 192021
2013-10-05 01:53:19 +00:00
Andrew Kaylor 480dcb3ee7 Adding multiple GOT handling to RuntimeDyldELF
Patch by Ashok Thirumurthi

llvm-svn: 192020
2013-10-05 01:52:09 +00:00
Manman Ren c174ea9ac8 Debug Info: update testing cases when the derived-from field of a
DW_TAG_pointer_type is updated to use DITypeRef.

Paired commit with r192018.

llvm-svn: 192019
2013-10-05 01:43:22 +00:00
Manman Ren b3388601fb Debug Info: In DIBuilder, the derived-from field of a DW_TAG_pointer_type
is updated to use DITypeRef.

Move isUnsignedDIType and getOriginalTypeSize from DebugInfo.h to be static
helper functions in DwarfCompileUnit. We already have a static helper function
"isTypeSigned" in DwarfCompileUnit, and a pointer to DwarfDebug is added to
resolve the derived-from field. All three functions need to go across link
for derived-from fields, so we need to get hold of a type identifier map.

A pointer to DwarfDebug is also added to DbgVariable in order to resolve the
derived-from field.

Debug info verifier is updated to check a derived-from field is a TypeRef.
Verifier will not go across link for derived-from fields, in debug info finder,
we go across the link to add derived-from fields to types.

Function getDICompositeType is only used by dragonegg and since dragonegg does
not generate identifier for types, we use an empty map to resolve the
derived-from field.

When printing a derived-from field, we use DITypeRef::getName to either return
the type identifier or getName of the DIType.

A paired commit at clang is required due to changes to DIBuilder.

llvm-svn: 192018
2013-10-05 01:43:03 +00:00
Eric Christopher 3264a48a45 Reorganize some member variables and update a comment.
llvm-svn: 192017
2013-10-05 00:39:55 +00:00
Eric Christopher 87b9c49c72 Fix one comment and update another. Slightly reformat.
llvm-svn: 192016
2013-10-05 00:32:34 +00:00
Venkatraman Govindaraju 30781deb1c [Sparc] Respect hasHardQuad parameter correctly when lowering SINT_TO_FP with fp128 operand.
llvm-svn: 192015
2013-10-05 00:31:41 +00:00
Eric Christopher 9e429ae779 Add a resolve method on CompileUnit that forwards to DwarfDebug.
llvm-svn: 192014
2013-10-05 00:27:02 +00:00
Enrico Granata 938d1d67e8 Cleaner way to work around the lack of delegating constructors on some versions of GCC
llvm-svn: 192013
2013-10-05 00:20:27 +00:00
Howard Hinnant 68a2610520 G M: Remove unneeded warnings in buildit that are hindering porting.
llvm-svn: 192012
2013-10-05 00:13:31 +00:00
Adrian Prantl f01b562a15 Debug info: Don't crash in SelectionDAGISel when a vreg that is being
pointed to by a dbg_value belonging to a function argument is eliminated
during instruction selection.
rdar://problem/15094721.

llvm-svn: 192011
2013-10-05 00:08:27 +00:00
Howard Hinnant 4e07b5b955 G M: Attached is a patch for libcxx's cmake file.
I've changed it so we don't set highest level warnings (all) for MSVC when building projects using cmake and instead leave the default. That's /W4 on my machine and seems to be ok.
 
With all warnings on for msvc, we see literally thousands of warnings. 99.99% aren't relevant and just obscure the ones that are.
I think the user can still override things if they want something different from the command line when using cmake.

llvm-svn: 192010
2013-10-05 00:07:35 +00:00
Eric Christopher fa205cad7c Make a bunch of CompileUnit member functions private.
llvm-svn: 192009
2013-10-05 00:05:51 +00:00
Enrico Granata 1c127dfbbe <rdar://problem/15154623>
Several CF* data formatters were in the AppKit category
This puts them back where they belong, i.e. in category CoreFoundation

llvm-svn: 192008
2013-10-05 00:03:07 +00:00
Howard Hinnant a942f2ffd7 G M: The attached patch is for libcxx's new.cpp and __config files. The patch's intent is to make new.cpp compile using MS's cl.exe compiler without changing the meaning of anything for any other compiler.
The issue this patch seeks to address is that MS's compiler (cl.exe) doesn't support the __attribute__((__weak__)) or __atribute__((__visibility__("default")) syntax; so a solution must be found where cl.exe doesn't see this syntax.

This patch seeks to solve this problem by changing code patterned like this:
__attribute__((__weak__, __visibility__("default")))
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { /*snip*/; return p; }

to code like this:
_LIBCPP_WEAK
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { return p; }

Howard:  Thanks for all the comments regarding the default visibility
tag on the definition.  I agree it isn't needed, and that there are lots
of other places where it is missing.  That being said, I'm not wanting
to rock the boat on that issue right now.  So I've added it back to the
definition via _LIBCPP_FUNC_VIS.  A later pass dedicated just to this
issue can bring things in to a consistent state one way or the other. 
Note that we do not want to have the exact same attributes on the
declaration and defintion in this case.  The declaration should not be
marked weak, whereas the definition should (which is what G M's patch
did). I've fully tested on OS X to ensure that the resultant attribute
syntax actually works.

llvm-svn: 192007
2013-10-04 23:56:37 +00:00
Venkatraman Govindaraju 84f1523cac [Sparc] Correct the floating point conditional code mapping in GetOppositeBranchCondition().
llvm-svn: 192006
2013-10-04 23:54:30 +00:00
David Blaikie 93ff1eb5fb Minor formatting/comment rewording/etc.
llvm-svn: 192005
2013-10-04 23:52:02 +00:00
Eric Christopher fe3ae44179 Remove odd use of this.
llvm-svn: 192004
2013-10-04 23:49:31 +00:00
Eric Christopher f0388b7b39 Reformat some odd formattings.
llvm-svn: 192003
2013-10-04 23:49:29 +00:00
Eric Christopher 08f7c8f1fe Tighten up some type arguments to functions. Where we expect a
scope, pass a scope.

llvm-svn: 192002
2013-10-04 23:49:26 +00:00
Hal Finkel f5a3eaea55 UpdatePHINodes in BasicBlockUtils should not crash on duplicate predecessors
UpdatePHINodes has an optimization to reuse an existing PHI node, where it
first deletes all of its entries and then replaces them. Unfortunately, in the
case where we had duplicate predecessors (which are allowed so long as the
associated PHI entries have the same value), the loop removing the existing PHI
entries from the to-be-reused PHI would assert (if that PHI was not the one
which had the duplicates).

llvm-svn: 192001
2013-10-04 23:41:05 +00:00
David Blaikie 41369b5f41 Remove some dead code.
llvm-svn: 192000
2013-10-04 23:37:30 +00:00
Eric Christopher fc917c6208 Pull this out for a bit of readability.
llvm-svn: 191999
2013-10-04 23:35:30 +00:00
David Blaikie fac5612ab0 Simplify setting of DIE tag for type DIEs by setting it in one* place.
* two actually due to some weird template thing... investigating that.

llvm-svn: 191998
2013-10-04 23:21:16 +00:00
Eric Christopher 53a3e69cfe Reformat.
llvm-svn: 191997
2013-10-04 23:15:52 +00:00
Enrico Granata a29cb0bada <rdar://problem/12042982>
This radar extends the notion of one-liner summaries to automagically apply in a few interesting cases

More specifically, this checkin changes the printout of ValueObjects to print on one-line (as if type summary add -c had been applied) iff:
this ValueObject does not have a summary
its children have no synthetic children
its children are not a non-empty base class without a summary
its children do not have a summary that asks for children to show up
the aggregate length of all the names of all the children is <= 50 characters
you did not ask to see the types during a printout
your pointer depth is 0

This is meant to simplify the way LLDB shows data on screen for small structs and similarly compact data types (e.g. std::pair<int,int> anyone?)

Feedback is especially welcome on how the feature feels and corner cases where we should apply this printout and don't (or viceversa, we are applying it when we shouldn't be)

llvm-svn: 191996
2013-10-04 23:14:13 +00:00
Eric Christopher 1f4f5d7b84 Formatting.
llvm-svn: 191995
2013-10-04 23:06:14 +00:00
Eric Christopher baf3816283 Prune includes.
llvm-svn: 191994
2013-10-04 22:54:28 +00:00
Jack Carter 215527449d forgot to remove this file as well
llvm-svn: 191993
2013-10-04 22:54:05 +00:00