Commit Graph

178587 Commits

Author SHA1 Message Date
Nico Weber 3c2b2ae7a7 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
2014-07-16 23:53:37 +00:00
David Blaikie 1326975496 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
2014-07-16 23:52:46 +00:00
David Blaikie 13690037ff Revert "Stuff"
This reverts commit r213210.

Accidental commit.

llvm-svn: 213212
2014-07-16 23:26:17 +00:00
David Blaikie 204f2e500a 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
2014-07-16 23:25:44 +00:00
David Blaikie 11572dc91e Stuff
llvm-svn: 213210
2014-07-16 23:25:37 +00:00
Jingyue Wu 0bdc027e31 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
2014-07-16 23:25:00 +00:00
Hal Finkel 3e49fda0d4 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
2014-07-16 22:44:54 +00:00
Sanjay Patel d3bbfa1cb6 Fixed formatting, removed bug reference, renamed testcase
Thanks to Duncan Exon Smith for reviewing and cleanup suggestions. 

llvm-svn: 213205
2014-07-16 22:40:28 +00:00
Juergen Ributzka 618ce3e85e [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
2014-07-16 22:20:51 +00:00
Lang Hames 8b20530689 [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
2014-07-16 22:02:20 +00:00
Richard Smith 5332411cd7 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
2014-07-16 21:33:43 +00:00
Hal Finkel c8491d3d83 Fix a typo in the inalloca description
llvm-svn: 213200
2014-07-16 21:22:46 +00:00
Greg Clayton a1bce2ef1a 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
2014-07-16 21:16:27 +00:00
Arthur Marble 31fb6f4730 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
2014-07-16 21:16:16 +00:00
Sanjay Patel ab60d04363 trivial fix for PR20314
Make sure that the AddrInst is an Instruction.

llvm-svn: 213197
2014-07-16 21:08:10 +00:00
Greg Clayton 0fdd3ae54d ^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
2014-07-16 21:05:41 +00:00
Nick Kledzik 9185115abb Update .gitignore to ignore hidden MacOSX Finder droppings
llvm-svn: 213195
2014-07-16 21:01:17 +00:00
Zachary Turner 4041116579 Fix some warnings in the Windows build.
llvm-svn: 213194
2014-07-16 20:28:24 +00:00
Aaron Ballman 173361e7e0 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
2014-07-16 20:28:10 +00:00
Fariborz Jahanian 1e7facdf20 Objective-C. Modify text of documentation for objc_runtime_name
attribute.

llvm-svn: 213192
2014-07-16 20:24:55 +00:00
Aaron Ballman 80f1529c6d 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
2014-07-16 20:21:50 +00:00
Sanjay Patel 6360441f99 Remove Atom references in description.
Any CPU can run this pass.

llvm-svn: 213190
2014-07-16 20:18:49 +00:00
Manuel Jacob 405fb18213 Utilize CastInst::CreatePointerBitCastOrAddrSpaceCast here.
llvm-svn: 213189
2014-07-16 20:13:45 +00:00
Chris Bieneman df4b763be5 [RegisterCoalescer] Moving the RegisterCoalescer subtarget hook onto the TargetRegisterInfo instead of the TargetSubtargetInfo.
llvm-svn: 213188
2014-07-16 20:13:31 +00:00
Nick Kledzik 2458bec7e7 [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
2014-07-16 19:49:02 +00:00
Justin Holewinski ac451066f4 [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
2014-07-16 19:45:35 +00:00
Fariborz Jahanian a2e5deb86d Objective-C. Changes per A. Ballman's comment
for my last patch. // rdar://17631257

llvm-svn: 213185
2014-07-16 19:44:34 +00:00
Arthur Marble d12f4e7823 Remove whitespace from test commit.
llvm-svn: 213184
2014-07-16 19:10:36 +00:00
Todd Fiala 17096d7669 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
2014-07-16 19:03:16 +00:00
Arthur Marble 722214402a Test commit.
llvm-svn: 213182
2014-07-16 19:02:11 +00:00
Zachary Turner 0152e73a73 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
2014-07-16 18:53:18 +00:00
Reid Kleckner c8604f65d3 Add the --target option to clang-cl and use it to fix a test.
llvm-svn: 213180
2014-07-16 18:31:25 +00:00
Hans Wennborg 8250735bb0 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
2014-07-16 18:20:35 +00:00
Serge Pavlov 9f81d6a482 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
2014-07-16 18:18:13 +00:00
Alexey Samsonov 62a8e0639b CHECK-LABEL-ize one test
llvm-svn: 213177
2014-07-16 18:11:31 +00:00
Kevin Enderby 77b968e1e1 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
2014-07-16 17:38:26 +00:00
Simon Atanasyan 9988e3afcc [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
2014-07-16 17:34:54 +00:00
David Blaikie 07557be68f Remove unnecessary/redundant std::move
(run returns unique_ptr by value already)

llvm-svn: 213174
2014-07-16 17:09:21 +00:00
Alp Toker 40a93aec8c Track clang r213171
The clang rewriter is now a core facility.

llvm-svn: 213173
2014-07-16 16:50:34 +00:00
Alp Toker e208dfc2af Track clang r213171
The clang rewriter is now a core facility.

llvm-svn: 213172
2014-07-16 16:50:17 +00:00
Alp Toker 0621cb2e7d 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
2014-07-16 16:48:33 +00:00
Hans Wennborg db829de6d6 clang-cl: expand test coverage for "core" options
llvm-svn: 213170
2014-07-16 16:29:00 +00:00
Chris Bieneman 80a866a316 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
2014-07-16 16:27:31 +00:00
Justin Holewinski 3e037d98e6 [NVPTX] Rename registers %fl -> %fd and %rl -> %rd
This matches the internal behavior of NVIDIA tools like libnvvm.

llvm-svn: 213168
2014-07-16 16:26:58 +00:00
Fariborz Jahanian 451b92ab6a 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
2014-07-16 16:16:04 +00:00
Todd Fiala f9ad21d22a 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
2014-07-16 16:15:42 +00:00
Hans Wennborg a6c062b283 Expand the wildcard expansion test to also cover '?'
llvm-svn: 213165
2014-07-16 16:14:09 +00:00
Hans Wennborg 8a7c47ff97 clang-cl: make sure we still parse -fms-version= after r213119
The CoreOption flag got lost in the changes.

llvm-svn: 213164
2014-07-16 16:03:56 +00:00
Marshall Clow f52c88f015 Correctly implement LWG 2049; std::is_destructible.
llvm-svn: 213163
2014-07-16 15:51:50 +00:00
Tim Northover 7f3e11e7c0 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
2014-07-16 15:37:24 +00:00