Commit Graph

142636 Commits

Author SHA1 Message Date
Jyotsna Verma d6eda1c227 Add appropriate TSFlags to the instructions that must be always extended.
llvm-svn: 174186
2013-02-01 15:54:43 +00:00
Bill Schmidt b02158d474 Add check for @foo
llvm-svn: 174185
2013-02-01 15:52:51 +00:00
Dmitry Vyukov 1fab680c1b tsan: catch races on fd in more cases
llvm-svn: 174184
2013-02-01 15:52:35 +00:00
Bill Schmidt 3e439e4223 Fix a string not seen without asserts
llvm-svn: 174183
2013-02-01 15:41:02 +00:00
Alexander Kornienko 527fa4f24f Fixed segmentation fault when a CFGBlock has NULL successor.
llvm-svn: 174182
2013-02-01 15:39:20 +00:00
Bill Schmidt eb03ae268e Fix PR14881 by implementing conversion rules between int and complex int.
Prior to the patch, Clang does not properly promote types when a complex
integer operand is combined with an integer via a binary operator, or when
one is assigned to the other in either order.  This patch detects when
promotion is needed (and permissible) and generates the necessary code.

The test assmes no target has the same size operands for "char" and
"long long," and that no target performs arithmetic on char operands without
extending them to a larger format first.  If there are any targets for
which this is not the case, they should be XFAILed.

llvm-svn: 174181
2013-02-01 15:34:29 +00:00
Alexey Samsonov 84cf6a4333 [TSan] remove artifacts from gotsan build in 'make clean' command
llvm-svn: 174180
2013-02-01 15:30:36 +00:00
Benjamin Kramer c05aa958b1 InstSimplify: stripAndComputeConstantOffsets can be called with vectors of pointers too.
Prepare it for vectors of pointers and handle simple cases. We don't handle
complicated cases because accumulateConstantOffset bails on pointer vectors.
Fixes selfhost on i386.

llvm-svn: 174179
2013-02-01 15:21:10 +00:00
Shankar Easwaran f23fc86ca8 add proper copyright header
llvm-svn: 174178
2013-02-01 15:05:11 +00:00
Tim Northover 111b6cb37b Remove currently unused register decoder from AArch64.
This should fix a warning when building this backend.

llvm-svn: 174177
2013-02-01 14:55:05 +00:00
Bill Schmidt 102bb32bf7 Revise unit testing for -fno-altivec, -mno-altivec.
As suggested, reverted the end-to-end test and added variations to an
existing Driver test.

llvm-svn: 174176
2013-02-01 14:45:29 +00:00
Dmitry Vyukov 87c6bb9716 tsan: even if races between atomic and plain memory accesses are turned off (report_atomic_races=0),
still report races between atomic accesses and free().

llvm-svn: 174175
2013-02-01 14:41:58 +00:00
Dmitri Gribenko 36a6dd04ef libclang: itroduce cxstring::createEmpty()
llvm-svn: 174174
2013-02-01 14:21:22 +00:00
Dmitri Gribenko f98dfbae94 libclang: introduce cxstring::createNull()
llvm-svn: 174173
2013-02-01 14:13:32 +00:00
Manuel Klimek 191c093af1 Re-design the convenience interfaces on MatchFinder.
First, this implements a match() method on MatchFinder; this allows us
to get rid of the findAll implementation, as findAll is really a special
case of recursive matchers on match.

Instead of findAll, provide a convenience function match() that lets
users iterate easily over the results instead of needing to implement
callbacks.

llvm-svn: 174172
2013-02-01 13:41:35 +00:00
Alexander Kornienko 540bacb1b9 Use const visitors in ASTDumper.
http://llvm-reviews.chandlerc.com/D355
Patch by Philip Craig!

llvm-svn: 174171
2013-02-01 12:35:51 +00:00
Tim Northover e3d4236402 Add explicit triples to AArch64 tests
Only Linux is supported at the moment, and other platforms quickly fault. As a
result these tests would fail on non-Linux hosts. It may be worth making the
tests more generic again as more platforms are supported.

llvm-svn: 174170
2013-02-01 11:40:47 +00:00
Daniel Jasper 83d4e783b0 Hopefully fix windows build due to non-standard pair implementation.
llvm-svn: 174169
2013-02-01 11:28:16 +00:00
Dmitry Vyukov 628df38e95 tsan: say that the memory access is atomic in reports
llvm-svn: 174168
2013-02-01 11:10:53 +00:00
Dmitry Vyukov aa6af4ddd1 tsan: remember 2 stack frames for atomics (caller and atomic itself)
llvm-svn: 174167
2013-02-01 11:01:17 +00:00
Daniel Jasper 4b866274c3 Revamp of the basic layouting algorithm in clang-format.
In order to end up with good solutions, clang-format needs to try
"all" combinations of line breaks, evaluate them and select the
best one. Before, we have done this using a DFS with memoization
and cut-off conditions. However, this approach is very limited
as shown by the huge static initializer in the attachment of
llvm.org/PR14959.

Instead, this new implementation uses a variant of Dijkstra's
algorithm to do a prioritized BFS over the solution space.

Some numbers:
lib/Format/TokenAnnotator.cpp: 1.5s -> 0.15s
Attachment of PR14959: 10min+ (didn't finish) -> 10s

No functional changes intended.

llvm-svn: 174166
2013-02-01 11:00:45 +00:00
Dmitry Vyukov 52f0e4e1a0 tsan: add flag to not report races between atomic and plain memory accesses
llvm-svn: 174165
2013-02-01 10:06:56 +00:00
Dmitry Vyukov 71242b064e tsan: flip is_write bit in shadow to is_read
this makes calculation of interesting predicates faster

llvm-svn: 174164
2013-02-01 10:02:55 +00:00
Dmitry Vyukov ba4291480d tsan: detect races between plain and atomic memory accesses
llvm-svn: 174163
2013-02-01 09:42:06 +00:00
Michael J. Spencer 18950a174e [Docs] Update status :)
llvm-svn: 174162
2013-02-01 09:20:24 +00:00
Michael J. Spencer 08b49bf27e [ELF][x86-64] Fix ifunc and add test.
In an previous commit I managed to completely disable the IRELATIVE relocation
writing code. I also used the wrong addend for the static relocation. Fix both
these issues and add a test. This test is quite brittle because there's no way
to do arithmetic on variables in FileCheck.

llvm-svn: 174161
2013-02-01 09:14:21 +00:00
Richard Smith 9eaab4be04 Fix diagnostic for bad alignas use: it can't be applied to functions.
llvm-svn: 174160
2013-02-01 08:25:07 +00:00
Nick Lewycky 9c7eb1d887 Add a new -Wundefined-inline warning for inline functions which are used but not
defined. Fixes PR14993!

llvm-svn: 174158
2013-02-01 08:13:20 +00:00
Richard Smith 848e1f1960 Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign.
Also support alignas(0), which C++11 and C11 require us to ignore.

llvm-svn: 174157
2013-02-01 08:12:08 +00:00
Nadav Rotem 4349f6963e Revert r174152. The shift amount may overflow and in that case this transformation is illegal.
llvm-svn: 174156
2013-02-01 07:59:33 +00:00
Michael J. Spencer b5d6f5e988 [ELF][x86-64] Implement static relocation model for TLS.
This implements the static relocation model for GOT accesses to TLS.

llvm-svn: 174155
2013-02-01 07:14:14 +00:00
Michael J. Spencer b0ed8e80d8 [ELF][x86-84] Add static TLS support.
llvm-svn: 174154
2013-02-01 07:13:49 +00:00
Sean Callanan fa4fab77d4 Modified the expression parser's class wrapper to
support reporting "this" as a templated class.  The
expression parser wraps expressions in C++ methods
as methods with the signature

$__lldb_class::$__lldb_expr(...)

and previously responded to clang's queries about
$__lldb_class with the type of *this.  This didn't
work if *this was a ClassTemplateSpecializationDecl
because ClassTemplateSpecializationDecls can't be
the result of simple name queries.

Instead what we do now is respond that $__lldb_class
is a typedef and that the target of the typedef is
the (potentially templated) type of *this.  That is
much more robust.

Thanks to John McCall for key insights.

<rdar://problem/10987183>

llvm-svn: 174153
2013-02-01 06:55:48 +00:00
Nadav Rotem 1d584029ae Optimize shift lefts of a constant by a value plus constant into a single shift.
llvm-svn: 174152
2013-02-01 06:45:40 +00:00
Hal Finkel df1e4bfcb2 Add PPC A2Q core and BG/Q preprocessor definitions
The a2q core is the variant of the a2 core used on the BG/Q supercomputers.

llvm-svn: 174151
2013-02-01 05:53:33 +00:00
Michael J. Spencer 3c75665fdd [ELF][x86-64] Add the _GLOBAL_OFFSET_TABLE_ Atom in the correct location.
Now we link against glibc without --noinhibit-exec.

llvm-svn: 174150
2013-02-01 05:36:14 +00:00
Michael J. Spencer c8803d27aa [ELF] Add more absolute atoms. Simplify how they are resolved.
llvm-svn: 174149
2013-02-01 05:36:00 +00:00
Shankar Easwaran 73ef70b50f add hexagon scatter bits and split hexgontargethandler to hexagonrelocationhander
llvm-svn: 174148
2013-02-01 05:26:02 +00:00
John McCall 12cc42aa1b Destroy arrays and ARC fields when throwing out of ctors.
Previously we were only handling non-array fields of class type.

Testcases derived from a patch by WenHan Gu.

llvm-svn: 174146
2013-02-01 05:11:40 +00:00
Douglas Gregor bc0e5c0114 Don't do delayed exception-specification checking on an invalid
class. Fixes <rdar://problem/13017229>.

llvm-svn: 174145
2013-02-01 04:49:10 +00:00
Sean Silva 59e7bd5b5e [docs] Fixup fallout from other grammar fixup.
My "excuse" for not refactoring the grammar here is to not diverge too
far from the grammar in the comments of TGParser.cpp, since I'm not
taking on the quest of majorly refactoring TGParser.cpp at the moment.

One benefit of doing this is that Ideas for refactoring and clarifying
the grammar in this document should translate almost immediately to
beneficial refactorings that can be made to TGParser.cpp.

llvm-svn: 174144
2013-02-01 03:50:20 +00:00
Sean Silva 6868ac4c9c [docs] Add missing colon to TableGen grammar.
Spotted by Eli Bendersky.

llvm-svn: 174143
2013-02-01 03:32:38 +00:00
Andrew Trick 4fe440d45c MachineModel: Inconsequential TableGen SubtargetEmitter fix.
Drive by fix. I noticed some missing logic that might bite future
users. This shouldn't affect the final output on currently modeled
targets.

llvm-svn: 174142
2013-02-01 03:19:54 +00:00
Greg Clayton abb487f57a Make sure a value is returned for Thread::ReturnFromFrame().
llvm-svn: 174141
2013-02-01 02:52:31 +00:00
Bill Schmidt 2fe4c67374 Enable -fno-altivec, -mno-altivec for PowerPC.
Introduces these negation forms explicitly and uses them to control a new
"altivec" target feature for PowerPC.  This allows avoiding generating
Altivec instructions on processors that support Altivec.

The new test case verifies that the Altivec "lvx" instruction is not
used when -fno-altivec is present on the command line.

llvm-svn: 174140
2013-02-01 02:14:03 +00:00
Michael Han af02bbe84f [Sema][Attr]Fix alignment attribute printing.
Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should
only model those appear in source code. Introduce attribute Accessor, and teach TableGen
to generate syntax kind accessors for Align attribute, and use those accessors to decide
if an alignment attribute is a declspec attribute.

llvm-svn: 174133
2013-02-01 01:19:17 +00:00
Bill Wendling c79cdff195 Remove some dead code, improve some asserts, and other assorted changes. No functionality change.
llvm-svn: 174132
2013-02-01 01:04:27 +00:00
Dan Gohman 9631d908b0 Add a comment explaining an unavailable optimization.
llvm-svn: 174131
2013-02-01 00:49:06 +00:00
Bill Wendling 3f9fcd48a4 Remove one of the odious 'Raw' methods.
llvm-svn: 174130
2013-02-01 00:48:14 +00:00
Greg Clayton 13fbb99107 Allow the target to give out the size of the red zone for given ABIs.
A bit of cleanup in the heap module. 

llvm-svn: 174129
2013-02-01 00:47:49 +00:00