Simon Pilgrim [Tue, 24 Feb 2015 21:46:23 +0000 (21:46 +0000)]
Added test case for PR22678 (check CONCAT_VECTORS DAG combiner pass doesn't introduce illegal types)
llvm-svn: 230386
Jacques Pienaar [Tue, 24 Feb 2015 21:45:33 +0000 (21:45 +0000)]
CUDA: Add option to allow host device functions to call host functions
Commiting code from review http://reviews.llvm.org/D7841
llvm-svn: 230385
Richard Smith [Tue, 24 Feb 2015 21:44:43 +0000 (21:44 +0000)]
PR22673 again: diagnose use of the used decl, not the found decl. This is also
wrong (DiagnoseUseOfDecl should take both), but it's more consistent with what
we do in other places.
llvm-svn: 230384
Justin Bogner [Tue, 24 Feb 2015 21:42:42 +0000 (21:42 +0000)]
InstrProf: Test for appropriate linkage of the profiling structures
This test checks that the symbols instrprof creates have appropriate
linkage. The tests already exist in clang in a slightly different form
from before we sunk profile generation into an LLVM pass, but that's
an awkward place for them now. I'll remove/simplify the clang versions
shortly.
llvm-svn: 230383
Zachary Turner [Tue, 24 Feb 2015 21:28:01 +0000 (21:28 +0000)]
Revert "[CMake] Change lldbAPI to be a CMake OBJECT library."
This reverts commit r230380. It causes CMake to fail on certain
machines with an error about needing to use string(STRIP_GENEX).
llvm-svn: 230382
Richard Smith [Tue, 24 Feb 2015 21:16:19 +0000 (21:16 +0000)]
PR22673: Don't forget to check a constructor for deletedness when we use it to
implicitly construct a temporary in a reference binding.
llvm-svn: 230381
Zachary Turner [Tue, 24 Feb 2015 20:58:39 +0000 (20:58 +0000)]
[CMake] Change lldbAPI to be a CMake OBJECT library.
An OBJECT library is a special type of CMake library that produces
no archive, has no link interface, and no link inputs. It is like
a regular archive, just without the physical output. To link
against an OBJECT library, you reference it in the *source* file
list of a library using the special syntax $<TARGET_OBJECTS:lldbAPI>.
This will cause every object file to be passed to the linker
independently, as opposed to a single archive being passed to the
linker.
This is *extremely* important on Windows. lldbAPI exports all of the
SB classes using __declspec(dllexport). Unfortunately for technical
reasons it is not possible (well, extremely difficult) to get the
linker to propagate a __declspec(dllexport) attribute from a symbol
in an object file in an archive to a DLL that links against that
archive. The solution to this is for the DLL to link the object files
directly. So lldbAPI must be an OBJECT library.
This fixes an issue that has been present since the duplicated
lldbAPI file lists were removed, which would cause linker failures.
As a side effect, this also makes LLDB_DISABLE_PYTHON=1 work again
on Windows, which was previously totally broken.
llvm-svn: 230380
Zachary Turner [Tue, 24 Feb 2015 20:58:24 +0000 (20:58 +0000)]
[CMake] Don't automatically copy python27.dll.
This is generating problems when you have built both debug and
release python. For now I just want to get CMake to work, I
will work on a more robust fix later. In the meantime you may
need to copy python27(_d).dll manually to ninja\bin after
building.
llvm-svn: 230379
Andrew Kaylor [Tue, 24 Feb 2015 20:49:35 +0000 (20:49 +0000)]
Fixing eol-style
llvm-svn: 230378
Richard Smith [Tue, 24 Feb 2015 20:41:36 +0000 (20:41 +0000)]
Add test that we reject invocations of deleted constructors. One of these
constructs is not rejected by should be; that's PR22673.
llvm-svn: 230370
Hans Wennborg [Tue, 24 Feb 2015 20:36:40 +0000 (20:36 +0000)]
ReleaseNotes: add notes about VS2014 Update 4 requirement
llvm-svn: 230363
Reid Kleckner [Tue, 24 Feb 2015 20:29:40 +0000 (20:29 +0000)]
MS extensions: Properly diagnose address of MS property decl
Summary: Fixes PR22671.
Reviewers: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7863
llvm-svn: 230362
Arch D. Robison [Tue, 24 Feb 2015 20:11:49 +0000 (20:11 +0000)]
Fix typo: qual -> equal
llvm-svn: 230361
Jonathan Roelofs [Tue, 24 Feb 2015 20:09:29 +0000 (20:09 +0000)]
Add .fpu directives to ARM unwind save & restore functions.
TODO: The iwmmx register save & restore functions still need the same treatment.
I didn't do that in this patch because the integrated assembler has a bug
where it refuses to build them on -march=armv6-m, even with
.march armv5t
.arm
in front of those functions.
This should fix PR22384.
http://reviews.llvm.org/D7258
llvm-svn: 230360
Philip Reames [Tue, 24 Feb 2015 19:44:46 +0000 (19:44 +0000)]
Starting to cleanup the garbage collection documentation
In this change:
- Put the getting started section first
- Create a dedicated section to document the built in collector strategies
- Move discuss of ShadowStack into new section
- Add placeholders for erlang, ocaml, and statepoint-example collectors
There will be many more changes following. I plan on full integrating the documentation for gc.statepoint and gc.root. I want to make it much clearer on how to get started and what users should expect in terms of effort.
llvm-svn: 230359
Eric Christopher [Tue, 24 Feb 2015 19:11:00 +0000 (19:11 +0000)]
Revert:
Author: Simon Pilgrim <llvm-dev@redking.me.uk>
Date: Mon Feb 23 23:04:28 2015 +0000
Fix based on post-commit comment on D7816 & rL230177 - BUILD_VECTOR operand truncation was using the the BV's output scalar type instead of the input type.
and
Author: Simon Pilgrim <llvm-dev@redking.me.uk>
Date: Sun Feb 22 18:17:28 2015 +0000
[DagCombiner] Generalized BuildVector Vector Concatenation
The CONCAT_VECTORS combiner pass can transform the concat of two BUILD_VECTOR nodes into a single BUILD_VECTOR node.
This patch generalises this to support any number of BUILD_VECTOR nodes, and also permits UNDEF nodes to be included as well.
This was noticed as AVX vec128 -> vec256 canonicalization sometimes creates a CONCAT_VECTOR with a real vec128 lower and an vec128 UNDEF upper.
Differential Revision: http://reviews.llvm.org/D7816
as the root cause of PR22678 which is causing an assertion inside the DAG combiner.
I'll follow up to the main thread as well.
llvm-svn: 230358
Eric Christopher [Tue, 24 Feb 2015 19:10:57 +0000 (19:10 +0000)]
Rename UpdateRegAllocHint to match style guidelines.
llvm-svn: 230357
Kostya Serebryany [Tue, 24 Feb 2015 18:52:38 +0000 (18:52 +0000)]
[asan] fix odr-violation.cc test to always use slow unwinding (hopefully fixes the ARM bot)
llvm-svn: 230356
Matthias Braun [Tue, 24 Feb 2015 18:52:04 +0000 (18:52 +0000)]
AArch64: Relax assert about large shift sizes.
The reason why these large shift sizes happen is because OpaqueConstants
currently inhibit alot of DAG combining, but that has to be addressed in
another commit (like the proposal in D6946).
Differential Revision: http://reviews.llvm.org/D6940
llvm-svn: 230355
Matthias Braun [Tue, 24 Feb 2015 18:52:01 +0000 (18:52 +0000)]
DAGCombiner: Move variable definitions closer to use; NFC
llvm-svn: 230354
Matthias Braun [Tue, 24 Feb 2015 18:51:59 +0000 (18:51 +0000)]
DAGCombiner: Move variable declaration closer to definiion; NFC
llvm-svn: 230353
Tom Stellard [Tue, 24 Feb 2015 17:59:19 +0000 (17:59 +0000)]
R600/SI: Remove isel mubuf legalization
We legalize mubuf instructions post-instruction selection, so this
code is no longer needed.
llvm-svn: 230352
Ilia K [Tue, 24 Feb 2015 17:54:34 +0000 (17:54 +0000)]
Add comment in MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_local back and revert expecting string.
llvm-svn: 230351
Tim Northover [Tue, 24 Feb 2015 17:22:40 +0000 (17:22 +0000)]
ARM: Simplify PCS handling.
The backend should now be able to handle all AAPCS rules based on argument
type, which means Clang no longer has to duplicate the register-counting logic
and the CodeGen can be significantly simplified.
llvm-svn: 230349
Tim Northover [Tue, 24 Feb 2015 17:22:34 +0000 (17:22 +0000)]
ARM: treat [N x i32] and [N x i64] as AAPCS composite types
The logic is almost there already, with our special homogeneous aggregate
handling. Tweaking it like this allows front-ends to emit AAPCS compliant code
without ever having to count registers or add discarded padding arguments.
Only arrays of i32 and i64 are needed to model AAPCS rules, but I decided to
apply the logic to all integer arrays for more consistency.
llvm-svn: 230348
Hafiz Abid Qadeer [Tue, 24 Feb 2015 17:20:43 +0000 (17:20 +0000)]
Adjust an lldb-mi test to fix failure on Linux.
llvm-svn: 230347
Hafiz Abid Qadeer [Tue, 24 Feb 2015 17:08:20 +0000 (17:08 +0000)]
Remove redundant code from lldb-mi.
Summary:
After recent changes, some code has become redundant. This revision tries to remove
the un-used code and tidy up the rest.
Following 4 files have been removed. I have updated CMake files and checked that it builds
fine on Linux and Windows. Can somebody update the xcode related file accordingly?
tools/lldb-mi/MICmnStreamStdinLinux.cpp
tools/lldb-mi/MICmnStreamStdinLinux.h
tools/lldb-mi/MICmnStreamStdinWindows.cpp
tools/lldb-mi/MICmnStreamStdinWindows.h
Reviewers: clayborg, ki.stfu
Reviewed By: clayborg, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D7834
llvm-svn: 230345
Timur Iskhodzhanov [Tue, 24 Feb 2015 17:07:22 +0000 (17:07 +0000)]
[ASan/Win] Add support for sanitizer allocator hooks, __asan_default_options and __asan_on_error
llvm-svn: 230344
Tobias Grosser [Tue, 24 Feb 2015 16:39:46 +0000 (16:39 +0000)]
Revert "Raising minimum required CMake version to 2.8.12.2."
This reverts commit r230062.
Debian stable (wheezy) ships still with cmake 2.8.9.
The commit broke my LLVM/Polly buildbot, to my knowledge our only Linux+cmake
buildbot.
llvm-svn: 230343
Sanjay Patel [Tue, 24 Feb 2015 16:26:02 +0000 (16:26 +0000)]
simplify control flow; NFC
llvm-svn: 230342
Hans Wennborg [Tue, 24 Feb 2015 16:19:29 +0000 (16:19 +0000)]
Revert r230280: "Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap"
This caused PR22674, failing this assert:
Instructions.h:2281: llvm::Value* llvm::PHINode::getOperand(unsigned int) const: Assertion `i_nocapture < OperandTraits<PHINode>::operands(this) && "getOperand() out of range!"' failed.
llvm-svn: 230341
Johannes Doerfert [Tue, 24 Feb 2015 16:16:32 +0000 (16:16 +0000)]
Allow non-affine control flow -- Code Generation
This is the code generation for region statements that are created
when non-affine control flow was present in the input. A new
generator, similar to the block or vector generator, for regions is
used to traverse and copy the region statement and to adjust the
control flow inside the new region in the end.
llvm-svn: 230340
Michael Kuperstein [Tue, 24 Feb 2015 16:13:16 +0000 (16:13 +0000)]
[x32] Mark RBX as reserved when EBX is the base pointer.
This should have gone into r230334.
llvm-svn: 230339
Sanjay Patel [Tue, 24 Feb 2015 16:11:05 +0000 (16:11 +0000)]
fix typo in comment; NFC
llvm-svn: 230338
Johannes Doerfert [Tue, 24 Feb 2015 16:02:16 +0000 (16:02 +0000)]
Omit a default argument
llvm-svn: 230337
Johannes Doerfert [Tue, 24 Feb 2015 16:00:41 +0000 (16:00 +0000)]
[FIX] Silence warning
llvm-svn: 230336
Johannes Doerfert [Tue, 24 Feb 2015 16:00:29 +0000 (16:00 +0000)]
[FIX] Some comments
llvm-svn: 230335
Michael Kuperstein [Tue, 24 Feb 2015 15:27:13 +0000 (15:27 +0000)]
[x32] x32 should use ebx as the base pointer.
This fixes the original issue in PR22655, but not the secondary one.
llvm-svn: 230334
Michael Wong [Tue, 24 Feb 2015 13:34:20 +0000 (13:34 +0000)]
Commit patch for PR19649. Set the correct sign of wide character for literals based on underlying type of wchar_t.
Reviewed:
http://reviews.llvm.org/D7559
Patch by Rachel Craig; Test cases by Hubert Tong.
llvm-svn: 230333
Hal Finkel [Tue, 24 Feb 2015 12:59:47 +0000 (12:59 +0000)]
[SDAG] Handle LowerOperation returning its input consistently
For almost all node types, if the target requested custom lowering, and
LowerOperation returned its input, we'd treat the original node as legal. This
did not work, however, for many loads and stores, because they follow
slightly different code paths, and we did not account for the possibility of
LowerOperation returning its input at those call sites.
I think that we now handle this consistently everywhere. At the call sites in
LegalizeDAG, we used to assert in this case, so there's no functional change
for any existing code there. For the call sites in LegalizeVectorOps, this
really only affects whether or not we set Changed = true, but I think makes the
semantics clearer.
No test case here, but it will be covered by an upcoming PowerPC commit adding
QPX support.
llvm-svn: 230332
Alexey Bataev [Tue, 24 Feb 2015 12:55:09 +0000 (12:55 +0000)]
[OPENMP] Update codegen for 'omp flush' directive.
__kmpc_omp_flush() runtime library now has only one argument and is not a vararg
anymore. This update makes the codegen compatible with these changes.
llvm-svn: 230331
Marshall Clow [Tue, 24 Feb 2015 12:46:39 +0000 (12:46 +0000)]
Make the forward declaration for array swap have the same inline/visibility attributes as the definition. Thanks to Steven Wu for the catch.
llvm-svn: 230330
Johannes Doerfert [Tue, 24 Feb 2015 12:00:50 +0000 (12:00 +0000)]
Allow non-affine control flow -- SCoP Modeling
This allows us to model non-affine regions in the SCoP representation.
SCoP statements can now describe either basic blocks or non-affine
regions. In the latter case all accesses in the region are accumulated
for the statement and write accesses, except in the entry, have to be
marked as may-write.
Differential Revision: http://reviews.llvm.org/D7846
llvm-svn: 230329
Johannes Doerfert [Tue, 24 Feb 2015 11:58:30 +0000 (11:58 +0000)]
Add ScalarEvolution bounds to non-affine access functions
llvm-svn: 230328
Toma Tabacu [Tue, 24 Feb 2015 11:52:19 +0000 (11:52 +0000)]
[mips] Reformat some TableGen definitions. NFC.
Summary: Separated some instruction and pseudo-instruction definitions from InstAlias definitions, added banner for pseudo-instructions and removed a redundant whitespace from a pseudo-instruction definition. No functional change.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7552
llvm-svn: 230327
Johannes Doerfert [Tue, 24 Feb 2015 11:46:18 +0000 (11:46 +0000)]
[FIX] Create single exiting block
llvm-svn: 230326
Johannes Doerfert [Tue, 24 Feb 2015 11:45:21 +0000 (11:45 +0000)]
Allow non-affine control flow -- SCoP Detection
With this patch we allow the SCoP detection to detect regions as SCoPs
which have non-affine control flow inside. All non-affine regions are
tracked and later accessible to the ScopInfo.
As there is no real difference, non-affine branches as well as
floating point branches are covered (and both called non-affine
control flow). However, the detection is restricted to
overapproximate only loop free regions.
llvm-svn: 230325
Renato Golin [Tue, 24 Feb 2015 11:38:41 +0000 (11:38 +0000)]
Allow sanitizer to work with "old" kernel headers
Sanitizers work on ancient kernels and were depending on types existing.
When those types were removed, the sanitizer build broke. See bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59009 for more information.
This patch fixes it by isolating the need for those types only when the
feature is actually needed, thus allowing one to compile the kernel with
or without that change, irrespective of its version.
Patch by Christophe Lyon.
llvm-svn: 230324
Kuba Brecka [Tue, 24 Feb 2015 11:12:44 +0000 (11:12 +0000)]
Try to unbreak sanitizer-x86_64-linux-autoconf after r230318
The buildbot failed to build with
error: variable ‘enable_fp’ set but not used [-Werror=unused-but-set-variable]
let's add a `(void)enable_fp;`.
llvm-svn: 230323
Eric Fiselier [Tue, 24 Feb 2015 10:52:07 +0000 (10:52 +0000)]
Remove XFAIL on string view test for apples clang compiler. Thanks to Marshall for the fix
llvm-svn: 230322
Ilia K [Tue, 24 Feb 2015 10:40:45 +0000 (10:40 +0000)]
Add -exec-abort command (MI); Don't exit on eStateExited
Summary:
Add -exec-abort command + test.
Also, I had fixed an error, when lldb-mi exits on eStateExited. With current patch we can re-run target:
```
-file-exec-and-symbols hello
^done
-exec-run
^running
*stopped,reason="breakpoint-hit"...
-exec-abort
^done
*stopped,reason="exited-normally"... <- program exits
-exec-run <- run again
^running
*stopped,reason="breakpoint-hit"...
```
All tests pass on OS X.
Reviewers: zturner, emaste, abidh, clayborg
Reviewed By: abidh, clayborg
Subscribers: lldb-commits, emaste, zturner, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D7794
llvm-svn: 230321
Ilia K [Tue, 24 Feb 2015 10:34:34 +0000 (10:34 +0000)]
Fix MiSignalTestCase.test_lldbmi_stopped_when_stopatentry_xxx tests after r230237
llvm-svn: 230320
Tamas Berghammer [Tue, 24 Feb 2015 10:23:39 +0000 (10:23 +0000)]
Create ScopedTimeout class for GDBRemoteCommunication
This new class makes it easier to change the timeout of a
GDBRemoteCommunication instance for a short time and then restore it to
its original value.
Differential revision: http://reviews.llvm.org/D7826
llvm-svn: 230319
Kuba Brecka [Tue, 24 Feb 2015 10:10:25 +0000 (10:10 +0000)]
Fix the ASan ioctl.cc test when using COMPILER_RT_DEBUG=On
In debug mode (COMPILER_RT_DEBUG=On), we still build with -fomit-frame-pointer and wrap_ioctl doesn't set up a proper stack frame. In release mode it does, because ioctl_common_pre gets inlined into wrap_ioctl and it uses the COMMON_INTERCEPTOR_READ_RANGE macro which in the end calls GET_CURRENT_FRAME and that forces the compiler to generate a stack frame for the function.
Not having a proper stack frame breaks the unwinder. This patch forces to generate a frame pointer (via ENABLE_FRAME_POINTER macro).
Reviewed at http://reviews.llvm.org/D7815
llvm-svn: 230318
Kuba Brecka [Tue, 24 Feb 2015 09:47:33 +0000 (09:47 +0000)]
Fix alloca_instruments_all_paddings.cc test to work under higher -O levels (compiler-rt part)
When AddressSanitizer only a single dynamic alloca and no static allocas, due to an early exit from FunctionStackPoisoner::poisonStack we forget to unpoison the dynamic alloca. This patch fixes that.
Reviewed at http://reviews.llvm.org/D7810
llvm-svn: 230317
Kuba Brecka [Tue, 24 Feb 2015 09:47:05 +0000 (09:47 +0000)]
Fix alloca_instruments_all_paddings.cc test to work under higher -O levels (llvm part)
When AddressSanitizer only a single dynamic alloca and no static allocas, due to an early exit from FunctionStackPoisoner::poisonStack we forget to unpoison the dynamic alloca. This patch fixes that.
Reviewed at http://reviews.llvm.org/D7810
llvm-svn: 230316
Michael Kuperstein [Tue, 24 Feb 2015 09:35:58 +0000 (09:35 +0000)]
[WinX86_64 ABI] Treat C99 _Complex as a struct
MSVC does not support C99 _Complex.
ICC, however, does support it on windows x86_64, and treats it, for purposes of parameter passing, as equivalent to a struct containing two fields (for the real and imaginary part).
Differential Revision: http://reviews.llvm.org/D7825
llvm-svn: 230315
Manuel Klimek [Tue, 24 Feb 2015 09:06:28 +0000 (09:06 +0000)]
Fix codegen for virtual methods that are (re-) exported from multiple modules.
Fixes multiple crashes where a non-canonical decl would be used as key
in a lookup.
llvm-svn: 230314
Craig Topper [Tue, 24 Feb 2015 08:02:13 +0000 (08:02 +0000)]
[X86] Remove the AbsMem32 type from the assembly parser. Only really need the 16-bit version which will automatically get prioritized over AbsMem.
llvm-svn: 230313
Vince Harron [Tue, 24 Feb 2015 05:24:12 +0000 (05:24 +0000)]
Fix typo that breaks FileSystem::IsLocal
llvm-svn: 230312
Vince Harron [Tue, 24 Feb 2015 05:14:49 +0000 (05:14 +0000)]
Compile fix for FileSystem::IsLocal on Linux
llvm-svn: 230311
Adrian Prantl [Tue, 24 Feb 2015 05:14:37 +0000 (05:14 +0000)]
Revert "Add clangCodeGen.a to the tools that need it after the clang module"
llvm-svn: 230310
Adrian Prantl [Tue, 24 Feb 2015 05:14:17 +0000 (05:14 +0000)]
Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."
This reverts commit r230305.
Off to fix another round of missing dependencies on various platforms.
llvm-svn: 230309
Ben Langmuir [Tue, 24 Feb 2015 04:58:15 +0000 (04:58 +0000)]
Don't load Framework module.map files when searching subdirectories
This would cause frameworks to have spurious "redefinition" errors if
they had both a (legacy) "module.map" and a (new) "module.modulemap" file and we
happened to do a sub-directory search in that directory using a
non-framework include path (e.g. -Ifoo/ -Ffoo/). For migration
purposes it's very handy that the compiler will prefer the new spelling
of the filename and not look at the old one if it doesn't need to.
llvm-svn: 230308
Adrian Prantl [Tue, 24 Feb 2015 04:49:13 +0000 (04:49 +0000)]
Fix typo s/bitcodewriter/bitwriter
llvm-svn: 230307
Adrian Prantl [Tue, 24 Feb 2015 04:26:29 +0000 (04:26 +0000)]
Add clangCodeGen.a to the tools that need it after the clang module
format change.
llvm-svn: 230306
Adrian Prantl [Tue, 24 Feb 2015 04:25:59 +0000 (04:25 +0000)]
Wrap clang module files in a Mach-O, ELF, or COFF container.
This is a necessary prerequisite for debugging with modules.
The .pcm files become containers that hold the serialized AST which allows
us to store debug information in the module file that can be shared by all
object files that were built importing the module.
rdar://problem/
19104245
This reapplies r230044 with a fixed configure+make build and updated
dependencies. Take 3.
llvm-svn: 230305
Justin Bogner [Tue, 24 Feb 2015 04:13:56 +0000 (04:13 +0000)]
InstrProf: Make sure counts in lambdas don't escape to the parent scope
When generating coverage maps, we were traversing the body as if it
were part of the parent function, but this doesn't make sense since
we're currently counting lambdas as separate functions.
llvm-svn: 230304
Richard Smith [Tue, 24 Feb 2015 03:30:14 +0000 (03:30 +0000)]
[modules] Properly check whether a declaration is std::initializer_list. This
bug is not actually modules-specific, but it's a little tricky to tickle it
outside of modules builds, so submitting with the reduced testcase I have.
llvm-svn: 230303
Jason Molenda [Tue, 24 Feb 2015 03:21:38 +0000 (03:21 +0000)]
Move the copy phases for the xpcservices bundles from the "LLDB"
target to the "desktop" target. They aren't used for iOS builds.
llvm-svn: 230302
Richard Smith [Tue, 24 Feb 2015 02:44:23 +0000 (02:44 +0000)]
[modules] Ensure we've imported all declarations of a template before
attempting to lazily deserialize its specializations; otherwise, there might be
pending specializations that we don't know about yet.
llvm-svn: 230301
Reed Kotler [Tue, 24 Feb 2015 02:36:45 +0000 (02:36 +0000)]
Beginning of alloca implementation for Mips fast-isel
Summary: Begin to add various address modes; including alloca.
Test Plan: Make sure there are no regressions in test-suite at O0/02 in mips32r1/r2
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: echristo, rfuhler, llvm-commits
Differential Revision: http://reviews.llvm.org/D6426
llvm-svn: 230300
Enrico Granata [Tue, 24 Feb 2015 02:11:06 +0000 (02:11 +0000)]
Update LLDB to read a newer format of Objective-C class information from the dyld shared cache
Also, since most of the time the lack of such information is a serious problem that hinders productive debugging, emit an actual user visible warning when this occurs (once per process)
Fixes rdar://
19898507
llvm-svn: 230299
JF Bastien [Tue, 24 Feb 2015 01:59:38 +0000 (01:59 +0000)]
Reword ELAST warning
Summary:
GCC emits a pretty amusing warning when there are apostrophes in a #warning:
```warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix]```
Reword the warning to avoid this, and be more consistent with other warnings in libc++.
Reviewers: danalbert
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7818
llvm-svn: 230298
Bob Wilson [Tue, 24 Feb 2015 01:37:31 +0000 (01:37 +0000)]
Fix handling of negative offsets for AddrModeT2_i8s4 in rewriteT2FrameIndex.
This is a follow up to r230233 to fix something that I noticed by
inspection. The AddrModeT2_i8s4 addressing mode does not support
negative offsets. I spent a good chunk of the day trying to come up with
a testcase for this but was not successful. This addressing mode is used
to spill and restore GPRPair registers in Thumb2 code and that does not
happen often. We also make very limited used of negative offsets when
lowering frame indexes. I am going ahead with the change anyway, because
I am pretty confident that it is correct. I also added a missing assertion
to check that the low bits of the scaled offset are zero.
llvm-svn: 230297
Richard Smith [Tue, 24 Feb 2015 01:23:23 +0000 (01:23 +0000)]
Refactor *TemplateDecl::addSpecialization to reduce duplication and add some
more asserts.
llvm-svn: 230296
Peter Collingbourne [Tue, 24 Feb 2015 01:12:53 +0000 (01:12 +0000)]
CodeGenModule::EmitVTableBitSetEntries: Add check for identical bit set entries.
No two elements of this array should be the same, but the standard library
may pass the same element as both arguments to this function.
llvm-svn: 230293
Dmitri Gribenko [Tue, 24 Feb 2015 01:06:22 +0000 (01:06 +0000)]
Restore the libc++ definition of max_align_t on Apple platforms
Clang has introduced ::max_align_t in stddef.h in r201729, but libc++ was
already defining std::max_align_t on Darwin because there was none in the
global namespace. After that Clang commit though, libc++ started defining
std::max_align_t to be a typedef for ::max_align_t, which has a different
definition. This changed the ABI. This commit restores the previous
definition.
rdar://
19919394 rdar://
18557982
llvm-svn: 230292
Sanjoy Das [Tue, 24 Feb 2015 01:02:42 +0000 (01:02 +0000)]
Fix bug 22641
The bug was a result of getPreStartForExtend interpreting nsw/nuw
flags on an add recurrence more strongly than is legal. {S,+,X}<nsw>
implies S+X is nsw only if the backedge of the loop is taken at least
once.
NOTE: I had accidentally committed an unrelated change with the commit
message of this change in r230275 (r230275 was reverted in r230279).
This is the correct change for this commit message.
Differential Revision: http://reviews.llvm.org/D7808
llvm-svn: 230291
Manman Ren [Tue, 24 Feb 2015 00:45:56 +0000 (00:45 +0000)]
[LTO API] add lto_codegen_set_module to set the destination module.
When debugging LTO issues with ld64, we use -save-temps to save the merged
optimized bitcode file, then invoke ld64 again on the single bitcode file to
speed up debugging code generation passes and ld64 stuff after code generation.
llvm linking a single bitcode file via lto_codegen_add_module will generate a
different bitcode file from the single input. With the newly-added
lto_codegen_set_module, we can make sure the destination module is the same as
the input.
lto_codegen_set_module will transfer the ownship of the module to code
generator.
rdar://
19024554
llvm-svn: 230290
Adam Nemet [Tue, 24 Feb 2015 00:41:59 +0000 (00:41 +0000)]
[LoopAccesses] LAA::getInfo to use const reference for stride parameter
And other required const-correctness fixes to make this work.
llvm-svn: 230289
Alexey Samsonov [Tue, 24 Feb 2015 00:37:27 +0000 (00:37 +0000)]
[ASan] Disable strict init-order checking if dlopen() is called.
Revise the fix to https://code.google.com/p/address-sanitizer/issues/detail?id=178:
always disable strict init-order checking the first time dlopen() is
called: at this point shared library is allowed to access globals
defined in the main executable, as they are guaranteed to be
initialized. Revise the test cases:
* simplify init-order-dlopen.cc test case: make it Linux-specific
(there's no strict init-order checking on other platforms anyway),
and single-threaded.
* reinforce init-order-pthread-create.cc test case: make sure that
init-order checker would produce a false positive unless we
turn it off at the moment we call pthread_create().
llvm-svn: 230288
David Majnemer [Tue, 24 Feb 2015 00:11:32 +0000 (00:11 +0000)]
X86: Only use 'lea' in Win64 epilogues if a frame pointer exists
We can only use 'add' in epilogues, 'lea' is not permitted unless we've
established a frame pointer in the prologue.
llvm-svn: 230286
Sanjoy Das [Tue, 24 Feb 2015 00:08:41 +0000 (00:08 +0000)]
New instcombine rule: max(~a,~b) -> ~min(a, b)
This case is interesting because ScalarEvolutionExpander lowers min(a,
b) as ~max(~a,~b). I think the profitability heuristics can be made
more clever/aggressive, but this is a start.
Differential Revision: http://reviews.llvm.org/D7821
llvm-svn: 230285
Greg Clayton [Mon, 23 Feb 2015 23:47:09 +0000 (23:47 +0000)]
Avoid crashing by not mmap'ing files on network mounted file systems.
This is implemented by making a new FileSystem function:
bool
FileSystem::IsLocal(const FileSpec &spec)
Then using this in a new function:
DataBufferSP
FileSpec::MemoryMapFileContentsIfLocal(off_t file_offset, size_t file_size) const;
This function only mmaps data if the file is a local file since that means we can reliably page in data. We were experiencing crashes where people would use debug info files on network mounted file systems and that mount would go away and cause the next access to a page that wasn't paged in to crash LLDB.
We now avoid this by just copying the data into a heap buffer and keeping a permanent copy to avoid the crash. Updated all previous users of FileSpec::MemoryMapFileContentsIfLocal() in ObjectFile subclasses over to use the new FileSpec::MemoryMapFileContentsIfLocal() function.
<rdar://problem/
19470249>
llvm-svn: 230283
Sanjoy Das [Mon, 23 Feb 2015 23:22:58 +0000 (23:22 +0000)]
Bugfix: SCEVExpander incorrectly marks increment operations as no-wrap
When emitting the increment operation, SCEVExpander marks the
operation as nuw or nsw based on the flags on the preincrement SCEV.
This is incorrect because, for instance, it is possible that {-6,+,1}
is <nuw> while {-6,+,1}+1 = {-5,+,1} is not.
This change teaches SCEV to mark the increment as nuw/nsw only if it
can explicitly prove that the increment operation won't overflow.
Apart from the attached test case, another (more realistic) manifestation
of the bug can be seen in Transforms/IndVarSimplify/pr20680.ll.
NOTE: this change was landed with an incorrect commit message in
rL230275 and was reverted for that reason in rL230279. This commit
message is the correct one.
Differential Revision: http://reviews.llvm.org/D7778
llvm-svn: 230280
Sanjoy Das [Mon, 23 Feb 2015 23:13:22 +0000 (23:13 +0000)]
Revert 230275.
230275 got committed with an incorrect commit message due to a mixup
on my side. Will re-land in a few moments with the correct commit
message.
llvm-svn: 230279
Simon Pilgrim [Mon, 23 Feb 2015 23:04:28 +0000 (23:04 +0000)]
Fix based on post-commit comment on D7816 & rL230177 - BUILD_VECTOR operand truncation was using the the BV's output scalar type instead of the input type.
llvm-svn: 230278
Andrea Di Biagio [Mon, 23 Feb 2015 22:59:02 +0000 (22:59 +0000)]
[X86] Teach how to custom lower double-to-half conversions under fast-math.
This patch teaches the backend how to expand a double-half conversion into
a double-float conversion immediately followed by a float-half conversion.
We do this only under fast-math, and if float-half conversions are legal
for the target.
Added test CodeGen/X86/fastmath-float-half-conversion.ll
Differential Revision: http://reviews.llvm.org/D7832
llvm-svn: 230276
Sanjoy Das [Mon, 23 Feb 2015 22:55:13 +0000 (22:55 +0000)]
Fix bug 22641
The bug was a result of getPreStartForExtend interpreting nsw/nuw
flags on an add recurrence more strongly than is legal. {S,+,X}<nsw>
implies S+X is nsw only if the backedge of the loop is taken at least
once.
Differential Revision: http://reviews.llvm.org/D7808
llvm-svn: 230275
Justin Bogner [Mon, 23 Feb 2015 22:36:28 +0000 (22:36 +0000)]
Revert "Improve declaration / expression disambiguation around ptr-operators, and use"
This seems to break mixing function-style and c-style casts, and is
breaking bootstrapping llvm.
This reverts r230261.
llvm-svn: 230274
Shankar Easwaran [Mon, 23 Feb 2015 22:32:12 +0000 (22:32 +0000)]
[ELF] Create a map from Reference to Symbol.
In LLD's model, symbol is a property of the node (atom) and not a property of
edge (reference). Prior to this patch, we stored the symbol in the reference.
From post-commit comments, it seemed better to create a map from the reference
to the symbol instead and use this mapping wherever desired.
Address comments from Ruiu/Simon Atanasyan.
llvm-svn: 230273
Dmitri Gribenko [Mon, 23 Feb 2015 22:08:10 +0000 (22:08 +0000)]
Fix copy-paste errors in the test
llvm-svn: 230272
Rafael Espindola [Mon, 23 Feb 2015 21:51:06 +0000 (21:51 +0000)]
Fix invalid cast.
Fixes PR22525.
Patch by Ben Longbons with testcase by me.
llvm-svn: 230271
David Majnemer [Mon, 23 Feb 2015 21:50:30 +0000 (21:50 +0000)]
X86: Use a smaller 'mov' instruction for stack probe calls
Prologue emission, in some cases, requires calls to a stack probe helper
function. The amount of stack to probe is passed as a register
argument in the Win64 ABI but the instruction sequence used is
pessimistic: it assumes that the number of bytes to probe is greater
than 4 GB.
Instead, select a more appropriate opcode depending on the number of
bytes we are going to probe.
llvm-svn: 230270
David Majnemer [Mon, 23 Feb 2015 21:50:27 +0000 (21:50 +0000)]
X86: Use 'mov' instead of 'lea' in Win64 SEH prologues when possible
'mov' and 'lea' are equivalent when the displacement applied with 'lea'
is zero. However, 'mov' should encode smaller.
llvm-svn: 230269
David Majnemer [Mon, 23 Feb 2015 21:50:25 +0000 (21:50 +0000)]
X86: Explain why we cannot use a 'mov' in a Win64 epilogue
llvm-svn: 230268
David Majnemer [Mon, 23 Feb 2015 21:50:18 +0000 (21:50 +0000)]
X86: Consistently use 'epilogue' instead of 'epilog'
llvm-svn: 230267
Chaoren Lin [Mon, 23 Feb 2015 21:48:42 +0000 (21:48 +0000)]
Newline after usage string for lldb-server.
llvm-svn: 230266
Sanjay Patel [Mon, 23 Feb 2015 21:32:09 +0000 (21:32 +0000)]
add newline for easier reading; NFC
llvm-svn: 230265