Sylvestre Ledru [Thu, 17 Jul 2014 08:39:04 +0000 (08:39 +0000)]
Fix Bug 14061 - scan-build crashes during postprocessing if BUGFILE no longer exists
Experienced with Thunderbird build
Patch by Matti Niemenmaa
llvm-svn: 213235
Benjamin Kramer [Thu, 17 Jul 2014 08:23:24 +0000 (08:23 +0000)]
[clang-tidy] Provide links to the google style guide for checks derived from it.
llvm-svn: 213233
Alexey Bataev [Thu, 17 Jul 2014 07:32:53 +0000 (07:32 +0000)]
[OPENMP] Initial parsing and sema analysis for 'final' clause.
llvm-svn: 213232
Suyog Sarda [Thu, 17 Jul 2014 06:28:15 +0000 (06:28 +0000)]
Move ashr optimization from InstCombineShift to InstSimplify.
Refactor code, no functionality change, test case moved from instcombine to instsimplify.
Differential Revision: http://reviews.llvm.org/D4102
llvm-svn: 213231
Matt Arsenault [Thu, 17 Jul 2014 06:19:06 +0000 (06:19 +0000)]
Use range for
llvm-svn: 213230
Matt Arsenault [Thu, 17 Jul 2014 06:13:41 +0000 (06:13 +0000)]
R600: Short circuit alloca check if address space isn't private.
Skip calling GetUnderlyingObject in cases where it obviously
isn't from an alloca. This should only be a compile time improvement.
llvm-svn: 213229
Suyog Sarda [Thu, 17 Jul 2014 06:09:34 +0000 (06:09 +0000)]
Fix Typo (first commit to test commit access)
llvm-svn: 213228
Eric Fiselier [Thu, 17 Jul 2014 05:53:00 +0000 (05:53 +0000)]
[lit] Add --show-unsupported flag to LIT
llvm-svn: 213227
Eric Fiselier [Thu, 17 Jul 2014 05:31:31 +0000 (05:31 +0000)]
[libcxx] Add <experimental/utility> header for LFTS.
Summary:
This patch adds the `<experimental/utility>` header as specified in the latest draft of the library fundamentals TS.
`<experimental/utility>` only contains `class erased_type`.
This patch also updates the documentation to list the `erased_type` class as "initial implementation complete".
Test Plan:
Three test cases where added:
1. Test that `_LIBCPP_VERSION` is defined.
2. Test that `<utility>` has been included.
3. Test that `erased_type` is in the correct namespace and is constexpr default constructible.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4510
llvm-svn: 213226
Eric Fiselier [Thu, 17 Jul 2014 05:16:18 +0000 (05:16 +0000)]
Change _LIBCXX_CONSTEXPR_AFTER_CXX11 to check for c++14 constexpr rules
llvm-svn: 213225
Richard Smith [Thu, 17 Jul 2014 05:12:35 +0000 (05:12 +0000)]
Track the difference between
-- a constructor list initialization that unpacked an initializer list into
constructor arguments and
-- a list initialization that created as std::initializer_list and passed it
as the first argument to a constructor
in the AST. Use this flag while instantiating templates to provide the right
semantics for the resulting initialization.
llvm-svn: 213224
Eric Fiselier [Thu, 17 Jul 2014 05:10:03 +0000 (05:10 +0000)]
Test commit: Reverting whitespace changes
llvm-svn: 213223
Eric Fiselier [Thu, 17 Jul 2014 05:06:09 +0000 (05:06 +0000)]
Test commit: whitespace change
llvm-svn: 213222
Saleem Abdulrasool [Thu, 17 Jul 2014 03:08:50 +0000 (03:08 +0000)]
MC: make WinEH opcode an opaque value
This makes the opcode an opaque value (unsigned int) rather than the
enumeration. This permits the use of target specific operands.
Split out the generic type into a MCWinEH header and add a supporting
MCWin64EH::Instruction to abstract out the selection of the opcode and
construction of the actual instruction.
llvm-svn: 213221
Nikola Smiljanic [Thu, 17 Jul 2014 01:59:34 +0000 (01:59 +0000)]
Fix FriendDecl source location and range for class templates and function declarations that don't start with 'friend' keyword. Add more unittests.
llvm-svn: 213220
Hal Finkel [Thu, 17 Jul 2014 01:28:25 +0000 (01:28 +0000)]
Improve BasicAA CS-CS queries (redux)
This reverts, "r213024 - Revert r212572 "improve BasicAA CS-CS queries", it
causes PR20303." with a fix for the bug in pr20303. As it turned out, the
relevant code was both wrong and over-conservative (because, as with the code
it replaced, it would return the overall ModRef mask even if just Ref had been
implied by the argument aliasing results). Hopefully, this correctly fixes both
problems.
Thanks to Nick Lewycky for reducing the test case for pr20303 (which I've
cleaned up a little and added in DSE's test directory). The BasicAA test has
also been updated to check for this error.
Original commit message:
BasicAA contains knowledge of certain intrinsics, such as memcpy and memset,
and uses that information to form more-accurate answers to CallSite vs. Loc
ModRef queries. Unfortunately, it did not use this information when answering
CallSite vs. CallSite queries.
Generically, when an intrinsic takes one or more pointers and the intrinsic is
marked only to read/write from its arguments, the offset/size is unknown. As a
result, the generic code that answers CallSite vs. CallSite (and CallSite vs.
Loc) queries in AA uses UnknownSize when forming Locs from an intrinsic's
arguments. While BasicAA's CallSite vs. Loc override could use more-accurate
size information for some intrinsics, it did not do the same for CallSite vs.
CallSite queries.
This change refactors the intrinsic-specific logic in BasicAA into a generic AA
query function: getArgLocation, which is overridden by BasicAA to supply the
intrinsic-specific knowledge, and used by AA's generic implementation. This
allows the intrinsic-specific knowledge to be used by both CallSite vs. Loc and
CallSite vs. CallSite queries, and simplifies the BasicAA implementation.
Currently, only one function, Mac's memset_pattern16, is handled by BasicAA
(all the rest are intrinsics). As a side-effect of this refactoring, BasicAA's
getModRefBehavior override now also returns OnlyAccessesArgumentPointees for
this function (which is an improvement).
llvm-svn: 213219
Sean Callanan [Thu, 17 Jul 2014 01:20:37 +0000 (01:20 +0000)]
Two fixes in the Objective-C language runtime:
- First, when logging, be helpful by printing
the real name of the class;
- Second, up the limit for number of classes
from 16k to 128k, and put in an assertion
(and better error handling when not in a
debug configuration) when we cross that
limit the next time.
<rdar://problem/
17052976>
llvm-svn: 213218
David Majnemer [Thu, 17 Jul 2014 00:55:19 +0000 (00:55 +0000)]
MS ABI: Padding injected between empty vbases doesn't up required align
Only alignment is changed, not required alignment.
llvm-svn: 213217
Rui Ueyama [Thu, 17 Jul 2014 00:22:26 +0000 (00:22 +0000)]
[PECOFF] Set DLL bit in PE header if DLL.
Windows loader can load a DLL without this bit but it wouldn't
call the initializer function in the DLL if the bit is absent.
llvm-svn: 213216
Kuba Brecka [Thu, 17 Jul 2014 00:18:03 +0000 (00:18 +0000)]
[compiler-rt] [asan] Refactor DescribeAddressIfStack to allow reuse for debugging API
Refactoring the DescribeAddressIfStack function in asan_report.cc to be able to reuse it for http://reviews.llvm.org/D4527.
Reviewed at http://reviews.llvm.org/D4545.
llvm-svn: 213215
Nico Weber [Wed, 16 Jul 2014 23:53:37 +0000 (23:53 +0000)]
libcxxabi cmake: Use HandleLLVMOptions.cmake, don't manually add -std=c++11.
No intended behavior change on Linux and Mac OS X. On Windows, having libcxxabi
in one's checkout should now no longer break running cmake. (cl.exe supports
c++11, but doesn't understand a -std= flag.)
llvm-svn: 213214
David Blaikie [Wed, 16 Jul 2014 23:52:46 +0000 (23:52 +0000)]
DebugInfo: Forward HandleTagDeclRequiredDefinition through MultiplexConsumer to fix debug info emission in the presence of plugins.
When plugins are used the Multiplex(AST)Consumer is employed to dispatch
to both the plugin ASTConsumers and the IRGen ASTConsumer. It wasn't
dispatching a critical call for debug info, resulting in plugin users
having a negative debugging experience.
While I'm here, forward a bunch of other missing calls through the
consumer that seem like they should be there.
To test this, use the example plugin (requires plugins and examples) and
split the test case up so that the plugin testing can be done under that
requirement while the non-plugin testing will execute even in builds
that don't include plugin support or examples.
llvm-svn: 213213
David Blaikie [Wed, 16 Jul 2014 23:26:17 +0000 (23:26 +0000)]
Revert "Stuff"
This reverts commit r213210.
Accidental commit.
llvm-svn: 213212
David Blaikie [Wed, 16 Jul 2014 23:25:44 +0000 (23:25 +0000)]
DebugInfo: Ensure the ASTConsumer "HandleTagDeclRequireDefinition" callback path is tested.
By having the two variables 'a' and 'b' in this test in a namespace, the
type was required to be complete before any debug info was ever emitted
(the entire namespace is parsed before the variables were emitted), this
meant that the codepath in which a declaration is emitted, then later on
the type is required to be complete and the debug info must be upgraded
to a definition was not used.
Moving the variables outside a namespace fixes this test coverage bug.
(interestingly, code coverage didn't help here -
HandleTagDeclRequireDefinition is fully covered because it's called even
in cases where the type hasn't been emitted for debug info at all
(further down in CGDebugInfo this no-ops) - so CC wouldn't've helped
catch this test coverage problem)
llvm-svn: 213211
David Blaikie [Wed, 16 Jul 2014 23:25:37 +0000 (23:25 +0000)]
Stuff
llvm-svn: 213210
Jingyue Wu [Wed, 16 Jul 2014 23:25:00 +0000 (23:25 +0000)]
Partially revert r210444 due to performance regression
Summary:
Converting outermost zext(a) to sext(a) causes worse code when the
computation of zext(a) could be reused. For example, after converting
... = array[zext(a)]
... = array[zext(a) + 1]
to
... = array[sext(a)]
... = array[zext(a) + 1],
the program computes sext(a), which is actually unnecessary. I added one
test in split-gep-and-gvn.ll to illustrate this scenario.
Also, with r211281 and r211084, we annotate more "nuw" tags to
computation involving CUDA intrinsics such as threadIdx.x. These
annotations help with splitting GEP a lot, rendering the benefit we get
from this reverted optimization only marginal.
Test Plan: make check-all
Reviewers: eliben, meheff
Reviewed By: meheff
Subscribers: jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D4542
llvm-svn: 213209
Hal Finkel [Wed, 16 Jul 2014 22:44:54 +0000 (22:44 +0000)]
Add basic (noop) CodeGen support for __assume
Clang supports __assume, at least at the semantic level, when MS extensions are
enabled. Unfortunately, trying to actually compile code using __assume would
result in this error:
error: cannot compile this builtin function yet
__assume is an optimizer hint, and can be ignored at the IR level. Until LLVM
supports assumptions at the IR level, a noop lowering is valid, and that is
what is done here.
llvm-svn: 213206
Sanjay Patel [Wed, 16 Jul 2014 22:40:28 +0000 (22:40 +0000)]
Fixed formatting, removed bug reference, renamed testcase
Thanks to Duncan Exon Smith for reviewing and cleanup suggestions.
llvm-svn: 213205
Juergen Ributzka [Wed, 16 Jul 2014 22:20:51 +0000 (22:20 +0000)]
[FastISel] Local values shouldn't be alive across an inline asm call with side effects.
This fixes an issue where a local value is defined before and used after an
inline asm call with side effects.
This fix simply flushes the local value map, which updates the insertion point
for the inline asm call to be above any previously defined local values.
This fixes <rdar://problem/
17694203>
llvm-svn: 213203
Lang Hames [Wed, 16 Jul 2014 22:02:20 +0000 (22:02 +0000)]
[MCJIT] Improve a RuntimeDyldChecker diagnostic.
When a RuntimeDyldChecker test requests an invalid operand for an instruction,
print the decoded instruction to aid diagnosis.
llvm-svn: 213202
Richard Smith [Wed, 16 Jul 2014 21:33:43 +0000 (21:33 +0000)]
When list-initializing an object of class type, if we pick an initializer list
constructor (and pass it an implicitly-generated std::initializer_list object),
be sure to mark the resulting construction as list-initialization. This fixes
an assert in template instantiation where we previously thought we'd got direct
non-list initialization without any parentheses.
llvm-svn: 213201
Hal Finkel [Wed, 16 Jul 2014 21:22:46 +0000 (21:22 +0000)]
Fix a typo in the inalloca description
llvm-svn: 213200
Greg Clayton [Wed, 16 Jul 2014 21:16:27 +0000 (21:16 +0000)]
Modify the EFI KDP debugging to not use any dynamic loader since it does manual dynamic loading itself via python modules.
Also track down the required binary by trying to locate the main executable module through LLDB's symbol and executable file locating code.
<rdar://problem/
16570258>
llvm-svn: 213199
Arthur Marble [Wed, 16 Jul 2014 21:16:16 +0000 (21:16 +0000)]
Typically linker options are protected with -Xlinker or -Wl,
however certain sloppy Makefiles pass -z options directly to
the compiler. This patch enables clang to recognize these
options (because -z is not used by clang itself).
llvm-svn: 213198
Sanjay Patel [Wed, 16 Jul 2014 21:08:10 +0000 (21:08 +0000)]
trivial fix for PR20314
Make sure that the AddrInst is an Instruction.
llvm-svn: 213197
Greg Clayton [Wed, 16 Jul 2014 21:05:41 +0000 (21:05 +0000)]
^C wasn't interrupting an expression during a long evaluation or deadlock.
The problem was that we have an IOHandler thread that services the IOHandler stack. The command interepter is on the top of the stack and it receives a "expression ..." command, and it calls the IOHandlerIsComplete() callback in the command interpereter delegate which runs an expression. This causes the IOHandlerProcessSTDIO to be pushed, but since we are running the code from the IOHandler thread, it won't get run. When CTRL+C is pressed, we do deliver the interrupt to the IOHandlerProcessSTDIO::Interrupt() function, but it was always writing 'i' to the interrupt pipe, even if we weren't actively reading from the debugger input and the pipes. This fix works around the issue by directly issuing the async interrupt to the process if the process is running.
A longer term more correct fix would to be run the IOHandler thread and have it just do the determination of the input and when complete input is received, run the code that handles that input on another thread and syncronize with that other thread to detect when more input is desired. That change is too big to make right now, so this fix will tide us over until we can get there.
<rdar://problem/
16556228>
llvm-svn: 213196
Nick Kledzik [Wed, 16 Jul 2014 21:01:17 +0000 (21:01 +0000)]
Update .gitignore to ignore hidden MacOSX Finder droppings
llvm-svn: 213195
Zachary Turner [Wed, 16 Jul 2014 20:28:24 +0000 (20:28 +0000)]
Fix some warnings in the Windows build.
llvm-svn: 213194
Aaron Ballman [Wed, 16 Jul 2014 20:28:10 +0000 (20:28 +0000)]
Specifying the diagnostic argument through the attribute table generator instead of having to enter it manually as part of the attribute subject list. This only affects attributes appertaining to ObjC interfaces and protocols.
No new tests required as this is covered by existing tests.
llvm-svn: 213193
Fariborz Jahanian [Wed, 16 Jul 2014 20:24:55 +0000 (20:24 +0000)]
Objective-C. Modify text of documentation for objc_runtime_name
attribute.
llvm-svn: 213192
Aaron Ballman [Wed, 16 Jul 2014 20:21:50 +0000 (20:21 +0000)]
Removing a FIXME from the attribute parsing code by now passing along the scope and syntax information for attributes with custom parsing. It turns out not to matter too much because the FIXME wasn't quite true -- none of these attributes have a C++11 spelling. However, it's still a good change (for instance, we may add an attribute with a type arg in the future for which this code now behaves properly).
llvm-svn: 213191
Sanjay Patel [Wed, 16 Jul 2014 20:18:49 +0000 (20:18 +0000)]
Remove Atom references in description.
Any CPU can run this pass.
llvm-svn: 213190
Manuel Jacob [Wed, 16 Jul 2014 20:13:45 +0000 (20:13 +0000)]
Utilize CastInst::CreatePointerBitCastOrAddrSpaceCast here.
llvm-svn: 213189
Chris Bieneman [Wed, 16 Jul 2014 20:13:31 +0000 (20:13 +0000)]
[RegisterCoalescer] Moving the RegisterCoalescer subtarget hook onto the TargetRegisterInfo instead of the TargetSubtargetInfo.
llvm-svn: 213188
Nick Kledzik [Wed, 16 Jul 2014 19:49:02 +0000 (19:49 +0000)]
[mach-o] refactor KindHandler into ArchHandler and simplify passes.
All architecture specific handling is now done in the appropriate
ArchHandler subclass.
The StubsPass and GOTPass have been simplified. All architecture specific
variations in stubs are now encoded in a table which is vended by the
current ArchHandler.
llvm-svn: 213187
Justin Holewinski [Wed, 16 Jul 2014 19:45:35 +0000 (19:45 +0000)]
[NVPTX] Honor alignment on vector loads/stores
We were not considering the stated alignment on vector loads/stores,
leading us to generate vector instructions even when we do not have
sufficient alignment.
Now, for IR like:
%1 = load <4 x float>, <4 x float>* %ptr, align 4
we will generate correct, conservative PTX like:
ld.f32 ... [%ptr]
ld.f32 ... [%ptr+4]
ld.f32 ... [%ptr+8]
ld.f32 ... [%ptr+12]
Or if we have an alignment of 8 (for example), we can
generate code like:
ld.v2.f32 ... [%ptr]
ld.v2.f32 ... [%ptr+8]
llvm-svn: 213186
Fariborz Jahanian [Wed, 16 Jul 2014 19:44:34 +0000 (19:44 +0000)]
Objective-C. Changes per A. Ballman's comment
for my last patch. // rdar://
17631257
llvm-svn: 213185
Arthur Marble [Wed, 16 Jul 2014 19:10:36 +0000 (19:10 +0000)]
Remove whitespace from test commit.
llvm-svn: 213184
Todd Fiala [Wed, 16 Jul 2014 19:03:16 +0000 (19:03 +0000)]
Add Host::MAX_THREAD_NAME_LENGTH constant.
This value gets set to a max uint32_t value when there is no known limit; otherwise,
it is set to a value appropriate for the platform. For the moment, only
Linux, FreeBSD and NetBSD set it to 16. All other platforms set it to
the max uint32_t value.
Modifies the Process private state thread names to fit within a 16-character limit
when the max thread name length is <= 16. These guarantee that the thread names
can be distinguished within the first 16 characters. Prior to this change, those
threads had names in the final dotted name segment that were not distinguishable
within the first 16 characters.
llvm-svn: 213183
Arthur Marble [Wed, 16 Jul 2014 19:02:11 +0000 (19:02 +0000)]
Test commit.
llvm-svn: 213182
Zachary Turner [Wed, 16 Jul 2014 18:53:18 +0000 (18:53 +0000)]
Fix build broken as a result of r213171.
r213171 renames the 'clangRewriteCore' library to 'clangRewrite'.
This change simply updates the makefiles to reference the correct
library name.
llvm-svn: 213181
Reid Kleckner [Wed, 16 Jul 2014 18:31:25 +0000 (18:31 +0000)]
Add the --target option to clang-cl and use it to fix a test.
llvm-svn: 213180
Hans Wennborg [Wed, 16 Jul 2014 18:20:35 +0000 (18:20 +0000)]
Don't use -msse2 in test/Driver/cl-options.c
It's already tested in cl-x86-flags.c, and can only be used
when targeting X86.
llvm-svn: 213179
Serge Pavlov [Wed, 16 Jul 2014 18:18:13 +0000 (18:18 +0000)]
Simplify memory management in NestedNameSpecifierLocBuilder.
With this change the memory of buffer in NestedNameSpecifierLocBuilder
is allocated in one place. It also prevents from allocation of tiny blocks.
llvm-svn: 213178
Alexey Samsonov [Wed, 16 Jul 2014 18:11:31 +0000 (18:11 +0000)]
CHECK-LABEL-ize one test
llvm-svn: 213177
Kevin Enderby [Wed, 16 Jul 2014 17:38:26 +0000 (17:38 +0000)]
Add the "-x" flag to llvm-nm for Mach-O files that prints the fields of a symbol in hex.
(generally use for debugging the tools).  This is same functionality as darwin’s
nm(1) "-x" flag.
llvm-svn: 213176
Simon Atanasyan [Wed, 16 Jul 2014 17:34:54 +0000 (17:34 +0000)]
[Driver][Mips] If CPU name is not provided to the driver explicitly use
multilibs from the FSFS toolchain corresponding to the mips32r2/mips64r2 CPUs.
llvm-svn: 213175
David Blaikie [Wed, 16 Jul 2014 17:09:21 +0000 (17:09 +0000)]
Remove unnecessary/redundant std::move
(run returns unique_ptr by value already)
llvm-svn: 213174
Alp Toker [Wed, 16 Jul 2014 16:50:34 +0000 (16:50 +0000)]
Track clang r213171
The clang rewriter is now a core facility.
llvm-svn: 213173
Alp Toker [Wed, 16 Jul 2014 16:50:17 +0000 (16:50 +0000)]
Track clang r213171
The clang rewriter is now a core facility.
llvm-svn: 213172
Alp Toker [Wed, 16 Jul 2014 16:48:33 +0000 (16:48 +0000)]
Make clang's rewrite engine a core feature
The rewrite facility's footprint is small so it's not worth going to these
lengths to support disabling at configure time, particularly since key compiler
features now depend on it.
Meanwhile the Objective-C rewriters have been moved under the
ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still
potentially worth excluding from lightweight builds.
Tests are now passing with any combination of feature flags. The flags
historically haven't been tested by LLVM's build servers so caveat emptor.
llvm-svn: 213171
Hans Wennborg [Wed, 16 Jul 2014 16:29:00 +0000 (16:29 +0000)]
clang-cl: expand test coverage for "core" options
llvm-svn: 213170
Chris Bieneman [Wed, 16 Jul 2014 16:27:31 +0000 (16:27 +0000)]
Added documentation for SizeMultiplier in the ARM subtarget hook for register coalescing. Also fixed some 80 col violations.
No functional code changes.
llvm-svn: 213169
Justin Holewinski [Wed, 16 Jul 2014 16:26:58 +0000 (16:26 +0000)]
[NVPTX] Rename registers %fl -> %fd and %rl -> %rd
This matches the internal behavior of NVIDIA tools like libnvvm.
llvm-svn: 213168
Fariborz Jahanian [Wed, 16 Jul 2014 16:16:04 +0000 (16:16 +0000)]
Objective-C. Introducing __attribute__((objc_runtime_name("runtimename"))
to be applied to class or protocols. This will direct IRGen
for Objective-C metadata to use the new name in various places
where class and protocol names are needed.
rdar://
17631257
llvm-svn: 213167
Todd Fiala [Wed, 16 Jul 2014 16:15:42 +0000 (16:15 +0000)]
gdb-remote test noise suppression on MacOSX.
This change adds a member to the base test case for gdb-remote that
indicates whether a stub makes two X stop notification reports on kill
commands. This is set to true for debugserver tests.
The test for killing an attached process after it's first stop notification
has been modified to look at that flag and add an extra X packet matcher
so the "unmatched packet warning" doesn't get emitted for the second X on
MacOSX with debugserver.
I also broke those tests out of the monolithic TestLldbGdbServer mega test
case and put it in its own, new TestGdbRemoteKill.py file and test case.
Tested:
Ubuntu 14.04 x86_64, clang-3.5 built lldb, no test failures.
MacOSX 10.9.4, Xcode 6.0 Beta 3 built lldb, no test failures.
llvm-svn: 213166
Hans Wennborg [Wed, 16 Jul 2014 16:14:09 +0000 (16:14 +0000)]
Expand the wildcard expansion test to also cover '?'
llvm-svn: 213165
Hans Wennborg [Wed, 16 Jul 2014 16:03:56 +0000 (16:03 +0000)]
clang-cl: make sure we still parse -fms-version= after r213119
The CoreOption flag got lost in the changes.
llvm-svn: 213164
Marshall Clow [Wed, 16 Jul 2014 15:51:50 +0000 (15:51 +0000)]
Correctly implement LWG 2049; std::is_destructible.
llvm-svn: 213163
Tim Northover [Wed, 16 Jul 2014 15:37:24 +0000 (15:37 +0000)]
CodeGen: don't form illegail EXTLOAD operations.
It turns out that in most cases (the main exception being i1-related
types) once these operations are formed we cannot separate them and
the targets end up having to deal with them whether they want to or
not.
This is not a good situation, and a more reasonable default can be
formed by ackowledging this and having targets leave them as Legal.
Only x86 seems to be affected (other targets don't even try marking
the operation Expand).
Mostly there's no visible change here yet, but it will be useful to
have truly expanded EXTLOADS for MVT::f16 softening support.
llvm-svn: 213162
Tim Northover [Wed, 16 Jul 2014 15:37:08 +0000 (15:37 +0000)]
Convert test to CHECK-LABEL
llvm-svn: 213161
Daniel Sanders [Wed, 16 Jul 2014 15:34:07 +0000 (15:34 +0000)]
[mips][fp64a] Temporarily disable odd-numbered double-precision registers when using the FP64A ABI.
Summary:
A few instructions (mostly cvt.d.w and similar) are causing problems with
-mfp64 and -mno-odd-spreg and it looks like fixing it properly may
take several weeks. In the meantime, let's disable the odd-numbered
double-precision registers so that the generated code is at least valid.
The problem is that instructions like cvt.d.w read from the 32-bit low
subregister of a double-precision FPU register. This often leads to the compiler
to inserting moves to transfer a GPR32 to a FGR32 using mtc1. Such moves
violate the rules against 32-bit writes to odd-numbered FPU registers imposed
by -mno-odd-spreg. By disabling the odd-numbered double-precision registers, it
becomes impossible for the 32-bit low subregister to be odd-numbered.
This fixes numerous test-suite failures when compiling for the FP64A ABI
('-mfp64 -mno-odd-spreg'). There is no LLVM test case because it's difficult to
test that odd-numbered FPU registers are not allocatable. Instead, we depend on
the assembler (GAS and -fintegrated-as) raising errors when the rules are
violated.
Differential Revision: http://reviews.llvm.org/D4532
llvm-svn: 213160
Alp Toker [Wed, 16 Jul 2014 15:12:48 +0000 (15:12 +0000)]
Revert "clang/test/Driver/crash-report.c: This requires rewriter for -frewrite-includes. [PR20321]"
We've decided to make the core rewriter class and PP rewriters mandatory.
They're only a few hundred lines of code in total and not worth supporting as a
distinct build configuration, especially since doing so disables key compiler
features.
This reverts commit r213150.
Revert "clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter."
This reverts commit r213148.
Revert "Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/"
This reverts commit r213146.
llvm-svn: 213159
Todd Fiala [Wed, 16 Jul 2014 15:03:10 +0000 (15:03 +0000)]
Add kalimba as a platform.
This change comprises of additions and some minor changes in order that
"kalimba" is listed as a supported platform and that debugging any
kalimbas results in PlatformKalimba being associated with the target.
The changes are as follows:
* The PlatformKalimba implementation itself
* A tweak to ArchSpec
* .note parsing for Kalimba in ObjectFileELF.cpp
* Plugin registration
* Makefile additions
Change by Matthew Gardiner
Minor tweak for cmake and Xcode by Todd Fiala
Tested:
Ubuntu 14.04 x86_64, clang 3.5-built lldb, all tests pass.
MacOSX 10.9.4, Xcode 6.0 Beta 1-built lldb, all tests pass.
llvm-svn: 213158
Benjamin Kramer [Wed, 16 Jul 2014 14:52:07 +0000 (14:52 +0000)]
[clang-tidy] As a simple heuristic don't emit a swap fixit that would create
negative-sized memsets.
memset(x, -1, 0) is still useless but swapping makes no sense here. Just emit
a warning.
llvm-svn: 213157
Benjamin Kramer [Wed, 16 Jul 2014 14:42:43 +0000 (14:42 +0000)]
[clang-tidy] Also emit a warning for memset(x, 0, 0)
It doesn't make sense to suggest swapping the arguments here but it's
still useless code
llvm-svn: 213156
Benjamin Kramer [Wed, 16 Jul 2014 14:30:19 +0000 (14:30 +0000)]
[clang-tidy] Add a checker for zero-length memset.
If there's memset(x, y, 0) in the code it's most likely a mistake. The
checker suggests a fix-it to swap 'y' and '0'.
I think this has the potential to be promoted into a general clang warning
after some testing in clang-tidy.
Differential Revision: http://reviews.llvm.org/D4535
llvm-svn: 213155
Benjamin Kramer [Wed, 16 Jul 2014 14:16:56 +0000 (14:16 +0000)]
[clang-tidy] Add namespaces checkers.
This change contains of two checkers that warn about
1. anonymous namespaces in header files.
2. 'using namespace' directives everywhere.
Differential Revision: http://reviews.llvm.org/D4523
llvm-svn: 213153
Benjamin Kramer [Wed, 16 Jul 2014 14:14:51 +0000 (14:14 +0000)]
[ASTMatchers] Add a usingDirectiveDecl matcher.
This matches 'using namespace' declarations.
Differential Revision: http://reviews.llvm.org/D4517
llvm-svn: 213152
Timur Iskhodzhanov [Wed, 16 Jul 2014 14:11:02 +0000 (14:11 +0000)]
[ASan/Win] Handle situations when the client app has used DbgHelp before
Reviewed at http://reviews.llvm.org/D4533
llvm-svn: 213151
NAKAMURA Takumi [Wed, 16 Jul 2014 13:42:43 +0000 (13:42 +0000)]
clang/test/Driver/crash-report.c: This requires rewriter for -frewrite-includes. [PR20321]
llvm-svn: 213150
Alexander Kornienko [Wed, 16 Jul 2014 13:38:48 +0000 (13:38 +0000)]
Avoid adding redundant parens.
Reviewers: bkramer
Reviewed By: bkramer
Subscribers: cfe-commits, sbenza
Differential Revision: http://reviews.llvm.org/D4534
llvm-svn: 213149
NAKAMURA Takumi [Wed, 16 Jul 2014 13:36:39 +0000 (13:36 +0000)]
clang/test: Introduce the feature "rewriter" for --enable-clang-rewriter.
llvm-svn: 213148
Alexander Kornienko [Wed, 16 Jul 2014 13:26:51 +0000 (13:26 +0000)]
Added documentation on how clang diagnostics are reported by clang-tidy.
llvm-svn: 213147
NAKAMURA Takumi [Wed, 16 Jul 2014 13:23:13 +0000 (13:23 +0000)]
Move clang/test/Frontend/rewrite-*.c to clang/test/Frontend/Rewriter/
llvm-svn: 213146
NAKAMURA Takumi [Wed, 16 Jul 2014 13:21:58 +0000 (13:21 +0000)]
Trailing linefeed.
llvm-svn: 213145
Timur Iskhodzhanov [Wed, 16 Jul 2014 12:56:47 +0000 (12:56 +0000)]
[ASan] Adjust 'sed' invocation to work on OS X
This is a follow-up to r213053
llvm-svn: 213144
Simon Atanasyan [Wed, 16 Jul 2014 12:29:22 +0000 (12:29 +0000)]
[Driver][Mips] Reduce code duplication - use existing function
getMipsCPUAndABI() to get MIPS ABI name during multi-library selection.
No functional changes.
llvm-svn: 213143
Simon Atanasyan [Wed, 16 Jul 2014 12:29:05 +0000 (12:29 +0000)]
[Driver][Mips] Remove flags which is not used in multi-library selection.
No functional changes.
llvm-svn: 213142
Simon Atanasyan [Wed, 16 Jul 2014 12:24:48 +0000 (12:24 +0000)]
[Driver][Mips] Reduce code duplication. Remove static isMipsNan2008() function.
Use the tools::mips::isNaN2008() routine instead.
llvm-svn: 213141
NAKAMURA Takumi [Wed, 16 Jul 2014 12:05:45 +0000 (12:05 +0000)]
clang/test: Introduce the feature "staticanalyzer" for --enable-clang-static-analyzer.
llvm-svn: 213140
NAKAMURA Takumi [Wed, 16 Jul 2014 12:05:24 +0000 (12:05 +0000)]
clang/test/Sema/warn-documentation-almost-trailing.c: Rewrite checks with @LINE.
llvm-svn: 213139
Daniel Sanders [Wed, 16 Jul 2014 11:52:23 +0000 (11:52 +0000)]
[mips] Correct the invocation of GAS in several cases.
Summary:
As a result of this patch, assembling an empty file with GCC and Clang (using
GAS as the assembler) now produces identical objects.
-mfp32/-mfpxx/-mfp64 now form a trinity of options. -mfpxx is the default
when the triple vendor is 'img' or 'mti', the ABI is O32, and the CPU is
between mips2 and mips32r2/mips64r2 (inclusive).
-mno-shared is always given to the assembler to match the effect of
-mabicalls (currently unimplemented but Clang acts as if it is given).
Similarly, -call_nonpic is always given to match the effect of -mplt (also
unimplemented and acts as if given) except when the ABI is 64 in which case
-mplt has no effect so -KPIC is given instead.
-mhard-float/-msoft-float are now passed on.
-modd-spreg/-mno-odd-spreg are now passed on.
-mno-mips16 is correctly passed on. The assembler option is -no-mips16 not
-mno-mips16
Differential Revision: http://reviews.llvm.org/D4515
llvm-svn: 213138
Andrea Di Biagio [Wed, 16 Jul 2014 11:29:39 +0000 (11:29 +0000)]
[X86] Add a check for 'isMOVHLPSMask' within method 'isShuffleMaskLegal'.
Before this change, method 'isShuffleMaskLegal' didn't know that shuffles
implementing a 'movhlps' operation were perfectly legal for SSE targets.
This patch adds the missing check for 'isMOVHLPSMask' inside method
'isShuffleMaskLegal' to fix the problem.
The reason why it is important to do this is because the DAGCombiner
conservatively avoids combining a pair of shuffles if the resulting shuffle
node has an illegal mask. Before this patch, shuffles with a MOVHLPS mask were
wrongly considered not to be legal. This was the root cause of some poor-code
generation bugs.
llvm-svn: 213137
Alexander Potapenko [Wed, 16 Jul 2014 11:00:16 +0000 (11:00 +0000)]
[ASan] Factor out SymbolizationLoop.process_line() function to let Python
scripts that import asan_symbolize to symbolize their reports line by line.
llvm-svn: 213136
Viktor Kutuzov [Wed, 16 Jul 2014 10:14:01 +0000 (10:14 +0000)]
Add FreeBSD support to the address sanitizer's assign_large_valloc_to_global.cc test case
Differential Revision: http://reviews.llvm.org/D4525
llvm-svn: 213135
Viktor Kutuzov [Wed, 16 Jul 2014 10:05:29 +0000 (10:05 +0000)]
Add FreeBSD support to the address sanitizer's atexit_stats.cc test case
Differential Revision: http://reviews.llvm.org/D4524
llvm-svn: 213134
Benjamin Kramer [Wed, 16 Jul 2014 10:00:14 +0000 (10:00 +0000)]
[clang-tidy] Add a checker that warns on const string & members.
Summary:
Those are considered unsafe and should be replaced with simple pointers or
full copies. It recognizes both std::string and ::string.
Reviewers: alexfh, djasper
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4522
llvm-svn: 213133
Daniel Sanders [Wed, 16 Jul 2014 09:57:54 +0000 (09:57 +0000)]
[mips] Add support for -mfpxx and -mno-fpxx.
Differential Revision: http://reviews.llvm.org/D4464
llvm-svn: 213132
Viktor Kutuzov [Wed, 16 Jul 2014 09:53:00 +0000 (09:53 +0000)]
Remove explicit references to libdl from Asan test cases
Differential Revision: http://reviews.llvm.org/D4499
llvm-svn: 213131