Rafael Espindola [Mon, 23 Jun 2014 14:22:55 +0000 (14:22 +0000)]
Remove a temporary hack.
Amusingly this survived a lot longer than the CFI transition. We don't even
support non-cfi assemblers any more.
llvm-svn: 211498
Ulrich Weigand [Mon, 23 Jun 2014 14:15:53 +0000 (14:15 +0000)]
[PowerPC] Refactor getMinCallFrameSize / getMinCallArgumentsSize
As of r211495, the only remaining users of getMinCallFrameSize are in
core ABI code (LowerFormalParameter / LowerCall). This is actually a
good thing, since the details of the parameter save area are ABI specific.
With the new ELFv2 ABI in particular, the rules defining the size of the
save area will become significantly more complex, so it wouldn't make
sense to implement those outside ABI code that has all required
information.
In preparation, this patch eliminates the getMinCallFrameSize (and
associated getMinCallArgumentsSize) routines, and inlines them into all
callers. Note that since nearly all call arguments are constant, this
allows simplifying the inlined copies to a single line everywhere.
No change in generate code expected.
llvm-svn: 211497
Jeroen Ketema [Mon, 23 Jun 2014 14:15:39 +0000 (14:15 +0000)]
Protect functions taking double by #ifdef cl_khr_fp64
Also change the order of the functions to be consistent with
the order in the header files.
llvm-svn: 211496
Ulrich Weigand [Mon, 23 Jun 2014 13:47:52 +0000 (13:47 +0000)]
[PowerPC] Allow stack frames without parameter save area
The PPCFrameLowering::determineFrameLayout routine currently ensures
that every function that allocates a stack frame provides space for the
parameter save area (via PPCFrameLowering::getMinCallFrameSize).
This is actually not necessary. There may be functions that never call
another routine but still allocate a frame; those do not require the
parameter save area. In the future, with the ELFv2 ABI, even some
routines that do call other functions do not need to allocate the
parameter save area.
While it is not a bug to allocate the parameter area when it is not
needed, it is better to avoid it to save stack space.
Note that when any particular function call requires the parameter save
area, this space will already have been included by ABI code in the size
the CALLSEQ_START insn is annotated with, and therefore included in the
size returned by MFI->getMaxCallFrameSize().
This means that determineFrameLayout simply does not need to care about
the parameter save area. (It still needs to ensure that every frame
provides the linkage area.) This is implemented by this patch.
Note that this exposed a bug in the new fast-isel code where the parameter
area was *not* included in the CALLSEQ_START size; this is also fixed.
A couple of test cases needed to be adapted for the new (smaller) stack
frame size those tests now see.
llvm-svn: 211495
Ulrich Weigand [Mon, 23 Jun 2014 13:21:43 +0000 (13:21 +0000)]
[PowerPC] Fix IsDarwin arg in PPCFrameLowering:: calls
As remarked in the commit message to r211493, in several places
throughout the 64-bit SVR4 ABI code there are calls to
PPCFrameLowering::getLinkageSize and getMinCallFrameSize
using an incorrect IsDarwin argument of "true".
(Some of those were made explicit by the above refactoring patch, others
have been there all along.)
This patch fixes those places to pass "false" for IsDarwin.
No change in generated code expected.
llvm-svn: 211494
Ulrich Weigand [Mon, 23 Jun 2014 13:08:27 +0000 (13:08 +0000)]
[PowerPC] Refactor setMinReservedArea and CalculateParameterAndLinkageAreaSize
The PPCISelLowering.cpp routines PPCTargetLowering::setMinReservedArea and
CalculateParameterAndLinkageAreaSize are currently used as subroutines
from both 64-bit SVR4 and Darwin ABI code.
However, the two ABIs are already quite different w.r.t. AltiVec
conventions, and they will become more different when the ELFv2 ABI is
supported. Also, in general it seems better to disentangle ABI support
routines for different ABIs to avoid accidentally affecting one ABI when
intending to change only the other.
(Actually, the current code strictly speaking already contains a bug:
these routines call PPCFrameLowering::getMinCallFrameSize and
PPCFrameLowering::getLinkageSize with the IsDarwin parameter set to
"true" even on 64-bit SVR4. This bug currently has no adverse effect
since those routines always return the same for 64-bit SVR4 and 64-bit
Darwin, but it still seems wrong ... I'll fix this in a follow-up
commit shortly.)
To remove this code sharing, I'm simply inlining both routines into all
call sites (there are just two each, one for 64-bit SVR4 and one for
Darwin), and simplifying due to constant parameters where possible.
A small piece of code that *does* make sense to share is refactored into
the new routine EnsureStackAlignment, now also called from 32-bit SVR4
ABI code.
No change in generated code is expected.
llvm-svn: 211493
Ulrich Weigand [Mon, 23 Jun 2014 12:36:34 +0000 (12:36 +0000)]
[PowerPC] Fix on-stack AltiVec arguments with 64-bit SVR4
Current 64-bit SVR4 code seems to have some remnants of Darwin code
in AltiVec argument handing. This had the effect that AltiVec arguments
(or subsequent arguments) were not correctly placed in the parameter area
in some cases.
The correct behaviour with the 64-bit SVR4 ABI is:
- All AltiVec arguments take up space in the parameter area, just like
any other arguments, whether vararg or not.
- They are always 16-byte aligned, skipping a parameter area doubleword
(and the associated GPR, if any), if necessary.
This patch implements the correct behaviour and adds a test case.
(Verified against GCC behaviour via the ABI compat test suite.)
llvm-svn: 211492
Simon Atanasyan [Mon, 23 Jun 2014 12:28:11 +0000 (12:28 +0000)]
[Mips] Make rel-dynamic-03.test test case independent from external input files.
llvm-svn: 211491
Tim Northover [Mon, 23 Jun 2014 09:20:02 +0000 (09:20 +0000)]
ARM: mark UBFX as not allowing PC.
Strictly, it's unpredictable. But we don't quite model that yet and an error is
better than ignoring the issue. This one somehow got left out before though.
rdar://problem/
15997748
llvm-svn: 211490
Alexey Bataev [Mon, 23 Jun 2014 08:21:53 +0000 (08:21 +0000)]
[OPENMP] Reformatting and code improvement.
llvm-svn: 211489
Daniel Jasper [Mon, 23 Jun 2014 07:36:25 +0000 (07:36 +0000)]
clang-format: [proto] Add required space before absolute references.
llvm-svn: 211488
Daniel Jasper [Mon, 23 Jun 2014 07:36:18 +0000 (07:36 +0000)]
clang-format: Fix corner case in pointer/reference detection.
llvm-svn: 211487
David Majnemer [Mon, 23 Jun 2014 02:17:16 +0000 (02:17 +0000)]
MC: Cleanup parseMSInlineAsm
Utilize range based for-loops to simplify some code.
Use insert() instead of a loop for simplicity/efficiency.
No functionality change.
llvm-svn: 211486
David Majnemer [Mon, 23 Jun 2014 02:16:41 +0000 (02:16 +0000)]
Parse: Simplify construction of the clobber list
This avoids going over the clobber list twice.
No functionality change.
llvm-svn: 211485
David Majnemer [Mon, 23 Jun 2014 02:16:38 +0000 (02:16 +0000)]
StaticAnalyzer: Switch a loop to a range-based for
Merely a code simplification, no functionality change.
llvm-svn: 211484
David Majnemer [Mon, 23 Jun 2014 02:16:34 +0000 (02:16 +0000)]
AST: Add ranges for AsmStmt's inputs and outputs
No functionality change.
llvm-svn: 211483
Alp Toker [Sun, 22 Jun 2014 23:28:54 +0000 (23:28 +0000)]
cindex.py: remove obsolete workaround and FIXME
clang_getCursorSpelling() doesn't assert on non-declarations any more and the
behaviour is covered by c-index tests.
Passes nosetests.
llvm-svn: 211482
Saleem Abdulrasool [Sun, 22 Jun 2014 22:25:01 +0000 (22:25 +0000)]
MC: adjust text section flags for WoA
Correct the section flags for code built for Windows on ARM with
`-ffunction-sections`. Windows on ARM uses solely Thumb-2 instructions, and
indicates that the function is thumb by placing it in a text section that has
IMAGE_SCN_MEM_16BIT flag set.
When we encounter a .section directive, a new section is constructed. This may
be a text segment. In order to identify that we need the additional flag,
expose the target triple through the ObjectFileInfo as this information is lost
otherwise.
Since any modern ARM targeting environment on Windows would be Thumb-2 (Windows
ARM NT or Windows Embedded Compact), introducing a new flag to indicate the
section attribute seems to be a bit overkill. Simply depend on the target
triple. Since there is one location that this information is currently needed,
creating a target specific assembly parser and delegating the parsing of section
switches also feels a bit heavy handed. If it turns out that this information
ends up changing additional behaviour, then it may be worth considering that
alternative.
llvm-svn: 211481
NAKAMURA Takumi [Sun, 22 Jun 2014 22:00:56 +0000 (22:00 +0000)]
Revert r211399, "Generate native unwind info on Win64"
It broke Legacy JIT Tests on x86_64-{mingw32|msvc}, aka Windows x64.
llvm-svn: 211480
Alp Toker [Sun, 22 Jun 2014 21:58:33 +0000 (21:58 +0000)]
DiagnosticIDs: use diagnostic severities to simplify extension handling
llvm-svn: 211479
Jan Vesely [Sun, 22 Jun 2014 21:43:01 +0000 (21:43 +0000)]
R600: Use LowerSDIVREM for i64 node replace
v2: move div/rem node replacement to R600ISelLowering
make lowerSDIVREM protected
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 211478
Jan Vesely [Sun, 22 Jun 2014 21:43:00 +0000 (21:43 +0000)]
R600: Implement custom SDIVREM.
Instead of separate SDIV/SREM. SDIV used UDIV which in turn used UDIVREM anyway.
SREM used SDIV(UDIV->UDIVREM)+MUL+SUB, using UDIVREM directly is more efficient.
v2: Don't use all caps names
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 211477
Jan Vesely [Sun, 22 Jun 2014 21:42:58 +0000 (21:42 +0000)]
R600: Add udivrem test
v2: move < %s to the end of the line
space after ;
add v4i32 test
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 211476
Alp Toker [Sun, 22 Jun 2014 21:16:50 +0000 (21:16 +0000)]
Fix the category name for hash-warnings and hash-errors
llvm-svn: 211475
Justin Bogner [Sun, 22 Jun 2014 20:35:10 +0000 (20:35 +0000)]
Driver: Skip the -ivfsoverlay argument in driver crash diags
llvm-svn: 211474
David Majnemer [Sun, 22 Jun 2014 19:05:33 +0000 (19:05 +0000)]
Revert "Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp."
This reverts commit r211467 which reverted r211408,r211410, it caused
crashes in test/SemaCXX/undefined-internal.cpp for i686-win32 targets.
llvm-svn: 211473
Filipe Cabecinhas [Sun, 22 Jun 2014 17:21:37 +0000 (17:21 +0000)]
Fix PR20087 by using the source index when changing the vector load
llvm-svn: 211472
Richard Smith [Sun, 22 Jun 2014 16:00:05 +0000 (16:00 +0000)]
[cxx_status] Minor wording tweaks.
llvm-svn: 211471
Richard Smith [Sun, 22 Jun 2014 15:56:23 +0000 (15:56 +0000)]
[cxx_status] Be a bit more precise.
llvm-svn: 211470
Richard Smith [Sun, 22 Jun 2014 15:54:54 +0000 (15:54 +0000)]
Fix dead link.
llvm-svn: 211469
Sylvestre Ledru [Sun, 22 Jun 2014 13:18:53 +0000 (13:18 +0000)]
Remove useless declaration
llvm-svn: 211468
NAKAMURA Takumi [Sun, 22 Jun 2014 12:42:29 +0000 (12:42 +0000)]
Revert r211402 (and r211408,r211410), "CodeGen: Refactor dynamic_cast and typeid" It crashes msvc codegen in clang/test/SemaCXX/undefined-internal.cpp.
It is reproducible with:
$ clang -cc1 -triple i686-win32 -emit-llvm-only clang/test/SemaCXX/undefined-internal.cpp
llvm-svn: 211467
NAKAMURA Takumi [Sun, 22 Jun 2014 12:35:39 +0000 (12:35 +0000)]
Introduce a Lit feature "debug_frame" and apply it to llvm/test/MC/ELF/cfi-version.ll.
.debug_frame is not emitted for targeting Windows x64.
llvm-svn: 211466
Benjamin Kramer [Sun, 22 Jun 2014 12:22:04 +0000 (12:22 +0000)]
Add a description to the test from r211433 explaining why it's written that way.
llvm-svn: 211465
Benjamin Kramer [Sun, 22 Jun 2014 12:16:35 +0000 (12:16 +0000)]
Remove unused diagnostic and diagnostic group.
llvm-svn: 211464
Simon Atanasyan [Sun, 22 Jun 2014 11:58:08 +0000 (11:58 +0000)]
[Mips] Make rel-dynamic-01.test test case independent from external input files.
llvm-svn: 211463
Alp Toker [Sun, 22 Jun 2014 10:08:06 +0000 (10:08 +0000)]
TextDiagnosticPrinter: use the mapped level for remark flag computation
Custom diagnostics don't have a builtin class so this wouldn't have worked.
Reduces surface area of remark-related changes.
No test coverage.
llvm-svn: 211462
Alp Toker [Sun, 22 Jun 2014 04:31:15 +0000 (04:31 +0000)]
Enable WindowsToolChain on all native Windows builds
Make binaries built by MSVC, mingw and clang functionally equivalent. The
checks are trivially performed at runtime to eliminate functional differences
between supported configurations that used to be hard-coded.
llvm-svn: 211461
Arnold Schwaighofer [Sun, 22 Jun 2014 03:38:59 +0000 (03:38 +0000)]
LoopVectorizer: Fix a dominance issue
The induction variables start value needs to be defined before we branch
(overflow check) to the scalar preheader where we used it.
llvm-svn: 211460
Alp Toker [Sun, 22 Jun 2014 03:27:52 +0000 (03:27 +0000)]
WindowsToolChain: decouple build environment from the toolchain
Don't try to find the MSVC version that the binaries were built with. Doing so
defeats testing by causing invalid test passes on the build servers.
Whichever Visual Studio (or clang-cl.exe) edition was used to build the clang
package, it's strictly orthogonal and has no relation to software versions
available on the user's PC.
llvm-svn: 211459
Alp Toker [Sun, 22 Jun 2014 03:27:45 +0000 (03:27 +0000)]
Make WindowsToolChain portable
De-conditionalize as much as possible so we can start to fix this code.
No change in functionality.
llvm-svn: 211458
Stepan Dyatkovskiy [Sun, 22 Jun 2014 01:53:30 +0000 (01:53 +0000)]
MergeFunctions Pass, removed DenseMap helpers.
Patch removes rest part of code related to old implementation.
This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).
This one was the final patch.
llvm-svn: 211457
Stepan Dyatkovskiy [Sun, 22 Jun 2014 00:57:09 +0000 (00:57 +0000)]
MergeFunctions Pass, updated header comments.
Added short description for new comparison algorithm, that introduces
total ordering among functions set.
This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).
llvm-svn: 211456
Weiming Zhao [Sun, 22 Jun 2014 00:33:44 +0000 (00:33 +0000)]
Report error for non-zero data in .bss
User may initialize a var with non-zero value and specify .bss section.
E.g. : int a __attribute__((section(".bss"))) = 2;
This patch converts an assertion to error report for better user
experience.
Differential Revision: http://reviews.llvm.org/D4199
llvm-svn: 211455
Sylvestre Ledru [Sat, 21 Jun 2014 23:51:07 +0000 (23:51 +0000)]
Remove useless call
llvm-svn: 211454
Jordan Rose [Sat, 21 Jun 2014 23:50:40 +0000 (23:50 +0000)]
[analyzer] Check for NULL passed to CFAutorelease.
Patch by Sean McBride, tests adjusted by me.
llvm-svn: 211453
Sylvestre Ledru [Sat, 21 Jun 2014 23:48:45 +0000 (23:48 +0000)]
Simplify the code (variable bValid is not really interesting)
llvm-svn: 211452
Sylvestre Ledru [Sat, 21 Jun 2014 23:47:20 +0000 (23:47 +0000)]
Remove useless declaration
llvm-svn: 211451
Alp Toker [Sat, 21 Jun 2014 23:33:00 +0000 (23:33 +0000)]
Track changes from clang r211448.
llvm-svn: 211450
Alp Toker [Sat, 21 Jun 2014 23:32:05 +0000 (23:32 +0000)]
Make MS i128 suffix test from r211446 more robust
We want to catch both negative and positive failure conditions.
llvm-svn: 211449
Alp Toker [Sat, 21 Jun 2014 23:31:59 +0000 (23:31 +0000)]
DiagnosticRenderer: emit basic notes as real diagnostics
Fixes terminal column wrapping and vestigial 'note:' prefixes that would appear
when using emitBasicNote().
llvm-svn: 211448
Alp Toker [Sat, 21 Jun 2014 23:31:52 +0000 (23:31 +0000)]
TextDiagnostic: print remark level diagnostics in bold too
The purpose of bolding these is to make them visually distinct from
continuations (supplemental note diagnostics). Therefore, the bolding applies
to all severities _including_ remarks -- it's not in any way an indicator of
priority. Also simplify and comment.
No tests.
llvm-svn: 211447
David Majnemer [Sat, 21 Jun 2014 22:49:50 +0000 (22:49 +0000)]
The i128 suffix isn't always available.
This Lexer test unconditionally used the i128 integer literal suffix.
This suffix is only available to targets that have 128-bit arithmetic
support.
llvm-svn: 211446
Stepan Dyatkovskiy [Sat, 21 Jun 2014 20:54:36 +0000 (20:54 +0000)]
MergeFunctions Pass, FnSet has been replaced with FnTree.
Patch activates new implementation.
So from now, merging process should take time O(N*log(N)).
Where N size of module (we are free to measure it in
functions or in instructions). Internally FnTree represents
binary tree. So every lookup operation takes O(log(N)) time.
It is still not the last patch in series, we also have to
clean-up pass from old code, and update pass comments.
This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).
llvm-svn: 211445
Stepan Dyatkovskiy [Sat, 21 Jun 2014 20:13:24 +0000 (20:13 +0000)]
MergeFunctions Pass, removed unused methods from old implementation.
Patch removed next old FunctionComparator methods:
* enumerate
* isEquivalentOperation
* isEquivalentGEP
* isEquivalentType
This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).
llvm-svn: 211444
Stepan Dyatkovskiy [Sat, 21 Jun 2014 19:07:51 +0000 (19:07 +0000)]
MergeFunctions, doSanityCheck: fixed body comments.
llvm-svn: 211443
Stepan Dyatkovskiy [Sat, 21 Jun 2014 18:58:11 +0000 (18:58 +0000)]
MergeFunctions Pass, introduced sanity check, that checks order relation,
introduced among functions set.
This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).
llvm-svn: 211442
David Majnemer [Sat, 21 Jun 2014 18:46:07 +0000 (18:46 +0000)]
Lex: Use the correct types for MS integer suffixes
Something went wrong with r211426, it is an older version of this code
and should not have been committed. It was reverted with r211434.
Original commit message:
We didn't properly implement support for the sized integer suffixes.
Suffixes like i16 were essentially ignored instead of mapping them to
the appropriately sized integer type.
This fixes PR20008.
Differential Revision: http://reviews.llvm.org/D4132
llvm-svn: 211441
Yabin Hu [Sat, 21 Jun 2014 18:35:33 +0000 (18:35 +0000)]
Add "Yabin Hu" to CREDITS.txt
llvm-svn: 211440
Argyrios Kyrtzidis [Sat, 21 Jun 2014 18:28:44 +0000 (18:28 +0000)]
[test] Add '-target' option to fix bot failure.
llvm-svn: 211439
Argyrios Kyrtzidis [Sat, 21 Jun 2014 18:16:40 +0000 (18:16 +0000)]
[PCH] Remove the BackingIvarReferencedInAccessor field from DECL_OBJC_IVAR abbreviation record.
Patch by Yiding Jia!
llvm-svn: 211438
Stepan Dyatkovskiy [Sat, 21 Jun 2014 17:55:51 +0000 (17:55 +0000)]
MergeFunctions Pass, introduced total ordering among top-level comparison
methods.
Patch changes return type of FunctionComparator::compare() and
FunctionComparator::compare(const BasicBlock*, const BasicBlock*)
methods from bool (equal or not) to {-1, 0, 1} (less, equal, great).
This patch belongs to patch series that improves MergeFunctions
performance time from O(N*N) to O(N*log(N)).
llvm-svn: 211437
Benjamin Kramer [Sat, 21 Jun 2014 13:46:25 +0000 (13:46 +0000)]
LoopUnrollRuntime: Check for overflow in the trip count calculation.
Fixes PR19823.
llvm-svn: 211436
Benjamin Kramer [Sat, 21 Jun 2014 12:56:42 +0000 (12:56 +0000)]
Legalizer: Add support for splitting insert_subvectors.
We handle this by spilling the whole thing to the stack and doing the
insertion as a store.
PR19492. This happens in real code because the vectorizer creates v2i128 when AVX is enabled.
llvm-svn: 211435
Rafael Espindola [Sat, 21 Jun 2014 12:39:25 +0000 (12:39 +0000)]
Revert "Lex: Use the correct types for MS integer suffixes"
This reverts commit r211426.
This broke the arm bots. The crash can be reproduced on X86 by running.
./bin/clang -cc1 -fsyntax-only -verify -fms-extensions ~/llvm/clang/test/Lexer/ms-extensions.c -triple arm-linux
llvm-svn: 211434
Benjamin Kramer [Sat, 21 Jun 2014 11:47:18 +0000 (11:47 +0000)]
SCEVExpander: Fold constant PHIs harder. The logic below only understands proper IVs.
PR20093.
llvm-svn: 211433
Jeroen Ketema [Sat, 21 Jun 2014 09:20:31 +0000 (09:20 +0000)]
Fix breakage after r211259
While we are here introduce the proper headers for the error code.
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211432
Simon Atanasyan [Sat, 21 Jun 2014 08:36:12 +0000 (08:36 +0000)]
[Mips] Remove redundant checking from the RelocationPass::isDynamic() function.
No functional changes.
llvm-svn: 211431
Richard Trieu [Sat, 21 Jun 2014 02:43:02 +0000 (02:43 +0000)]
Add back functionality removed in r210497.
Instead of asserting, output a message stating that a null pointer was found.
llvm-svn: 211430
Dmitry Vyukov [Sat, 21 Jun 2014 02:10:17 +0000 (02:10 +0000)]
tsan: fix code formatting
llvm-svn: 211429
Saleem Abdulrasool [Sat, 21 Jun 2014 01:41:21 +0000 (01:41 +0000)]
builtins: assembly routines are not static
Storage Class 3 is static storage. These symbols need to be marked as external
(storage class 2) so that they can be referenced. Note that this external is
not the same as ELF "external" visibility, which is indicated by DLL Storage
Class (i.e. __declspec(dllexport) or __declspec(dllimport)).
llvm-svn: 211428
Andrea Di Biagio [Sat, 21 Jun 2014 01:31:15 +0000 (01:31 +0000)]
[X86] Add ISel patterns to select SSE3/AVX ADDSUB instructions.
This patch adds ISel patterns to select SSE3/AVX ADDSUB instructions
from a sequence of "vadd + vsub + blend".
Example:
///
typedef float float4 __attribute__((ext_vector_type(4)));
float4 foo(float4 A, float4 B) {
float4 X = A - B;
float4 Y = A + B;
return (float4){X[0], Y[1], X[2], Y[3]};
}
///
Before this patch, (with flag -mcpu=corei7) llc produced the following
assembly sequence:
movaps %xmm0, %xmm2
addps %xmm1, %xmm2
subps %xmm1, %xmm0
blendps $10, %xmm2, %xmm0
With this patch, we now get a single
addsubps %xmm1, %xmm0
llvm-svn: 211427
David Majnemer [Sat, 21 Jun 2014 00:51:59 +0000 (00:51 +0000)]
Lex: Use the correct types for MS integer suffixes
We didn't properly implement support for the sized integer suffixes.
Suffixes like i16 were essentially ignored instead of mapping them to
the appropriately sized integer type.
This fixes PR20008.
Differential Revision: http://reviews.llvm.org/D4132
llvm-svn: 211426
Todd Fiala [Sat, 21 Jun 2014 00:48:09 +0000 (00:48 +0000)]
Fix a gdbremote bug in _M/_m stub support detection.
When a stub reported $#00 (unsupported) for _M and _m
packets, the unsupported response was not handled and
the client then marked the _M/_m commands as definitely
supported. However, they would always fail, preventing
lldb's fallback InferiorCallMmap-based allocation strategy
from being used to attempt to allocate memory in the inferior
process space.
llvm-svn: 211425
Zachary Turner [Sat, 21 Jun 2014 00:24:51 +0000 (00:24 +0000)]
Fix the MinGW builder. Apparently std::call_once and
std::recursive_mutex are not available on MinGW and breaks the
builder. Revert to using a function local static and sys::Mutex
just to get the tree green until we figure out a better solution.
llvm-svn: 211424
Rafael Espindola [Fri, 20 Jun 2014 23:54:32 +0000 (23:54 +0000)]
Always use a temp symbol for CIE.
Fixes pr19185.
llvm-svn: 211423
Dmitry Vyukov [Fri, 20 Jun 2014 23:22:31 +0000 (23:22 +0000)]
tsan: fix windows build script
llvm-svn: 211422
Justin Bogner [Fri, 20 Jun 2014 22:59:50 +0000 (22:59 +0000)]
Driver: In crashdumps with -fmodule, dump the module dependencies
llvm-svn: 211421
Saleem Abdulrasool [Fri, 20 Jun 2014 22:58:35 +0000 (22:58 +0000)]
Driver: enhance MSC version compatibility
The version information for Visual Studio is spread over multiple variables.
The newer Windows SDK has started making use of some of the extended versioning
variables that were previously undefined. Enhance our compatibility definitions
for these cases.
_MSC_VER is defined to be the Major * 100 + Minor. _MSC_FULL_VER is defined to
be Major *
10000000 + Minor * 100000 + Build. And _MSC_BUILD is the build
revision of the compiler.
Extend the -fmsc-version option in a compatible manner. If the value is the
previous form of MMmm, then we assume that the build number is 0. Otherwise, a
specific build number may be passed by using the form MMmmbbbbb. Due to
bitwidth limitations of the option, it is currently not possible to define a
revision value.
The version information can be passed as either the decimal encoded value
(_MSC_FULL_VER or _MSC_VER) or as a dot-delimited value.
The change to the TextDiagnostic is to deal with the updated encoding of the
version information.
llvm-svn: 211420
Dmitry Vyukov [Fri, 20 Jun 2014 22:53:43 +0000 (22:53 +0000)]
tsan: add Go build script for freebsd
llvm-svn: 211419
Dmitry Vyukov [Fri, 20 Jun 2014 22:51:18 +0000 (22:51 +0000)]
tsan: port to freebsd
llvm-svn: 211418
Dmitry Vyukov [Fri, 20 Jun 2014 22:49:41 +0000 (22:49 +0000)]
tsan: fix freebsd build
freebsd does not have /proc/self/environ
llvm-svn: 211417
Rafael Espindola [Fri, 20 Jun 2014 22:40:55 +0000 (22:40 +0000)]
Use compact unwind for the iOS simulator.
Another step in fixing pr19185.
llvm-svn: 211416
Rafael Espindola [Fri, 20 Jun 2014 22:37:01 +0000 (22:37 +0000)]
Use a helper function and clang-format.
No functionality change.
llvm-svn: 211415
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 22:36:09 +0000 (22:36 +0000)]
Support: ScaledNumber: Fix inconsistent test names
llvm-svn: 211414
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 22:33:40 +0000 (22:33 +0000)]
Support: Write ScaledNumbers::getLg{,Floor,Ceiling}()
llvm-svn: 211413
Rafael Espindola [Fri, 20 Jun 2014 22:30:31 +0000 (22:30 +0000)]
Delete dead code.
The compact unwind info is only used by code that knows it is supported.
llvm-svn: 211412
Justin Bogner [Fri, 20 Jun 2014 22:16:00 +0000 (22:16 +0000)]
Driver: Record that we're in crashdump and push flags to ConstructJob
It's more flexible and arguably better layering to set flags to modify
compiling for diagnostics in the CC1 job themselves, rather than
tweaking the driver flags and letting them propagate.
There is one visible change this causes: crash report files will now
get preprocessed names (.i and friends).
llvm-svn: 211411
David Majnemer [Fri, 20 Jun 2014 22:08:59 +0000 (22:08 +0000)]
CodeGen: Fix test to work with assertions as well
llvm-svn: 211410
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 21:47:47 +0000 (21:47 +0000)]
Support: Write ScaledNumber::getQuotient() and getProduct()
llvm-svn: 211409
David Majnemer [Fri, 20 Jun 2014 21:44:39 +0000 (21:44 +0000)]
CodeGen: typeid/dynamic_cast tests don't need asserts
These tests relied on information that was only available for clang
builds that included asserts. Fix these tests to lift that restriction.
llvm-svn: 211408
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 21:44:36 +0000 (21:44 +0000)]
Support: Cleanup ScaledNumber::getAdjusted() doc
llvm-svn: 211407
Duncan P. N. Exon Smith [Fri, 20 Jun 2014 21:43:20 +0000 (21:43 +0000)]
Support: Mark end of namespaces
This convinces clang-format to leave a newline.
llvm-svn: 211406
Kevin Enderby [Fri, 20 Jun 2014 21:29:27 +0000 (21:29 +0000)]
Fix some double printing of filenames for archives in llvm-nm when
the tool is given multiple files. Also fix the same issue with Mach-O
universal files. And fix the newline spacing to separate the output
in these cases.
llvm-svn: 211405
Rafael Espindola [Fri, 20 Jun 2014 21:15:27 +0000 (21:15 +0000)]
Don't produce eh_frame relocations when targeting the IOS simulator.
First step for fixing pr19185.
llvm-svn: 211404
Justin Bogner [Fri, 20 Jun 2014 21:12:53 +0000 (21:12 +0000)]
Driver: Remove some superfluous calls to Arg->claim()
Args.getLastArg() claims the Arg it returns, so calling claim on these
results is unnecessary.
llvm-svn: 211403
David Majnemer [Fri, 20 Jun 2014 21:11:00 +0000 (21:11 +0000)]
CodeGen: Refactor dynamic_cast and typeid
This refactors the emission of dynamic_cast and typeid expressions so
that ABI specific knowledge lives in appropriate places. There are
quite a few benefits for having the two implementations share a common
core like sharing logic for optimization opportunities.
While we are at it, clean up the tests.
llvm-svn: 211402
Zachary Turner [Fri, 20 Jun 2014 21:07:14 +0000 (21:07 +0000)]
Revert "Replace Execution Engine's mutex with std::recursive_mutex."
This reverts commit
1f502bd9d7d2c1f98ad93a09ffe435e11a95aedd, due to
GCC / MinGW's lack of support for C++11 threading.
It's possible this will go back in after we come up with a
reasonable solution.
llvm-svn: 211401
Greg Clayton [Fri, 20 Jun 2014 20:41:07 +0000 (20:41 +0000)]
Fixed the "log enable gdb-remote packets" to support dumping the binary memory read packet ('x') by printing out the binary data correctly using only printable characters and removing the 0x7d escapes so the memory is readable in the packet output.
llvm-svn: 211400
Reid Kleckner [Fri, 20 Jun 2014 20:35:47 +0000 (20:35 +0000)]
Generate native unwind info on Win64
This patch enables LLVM to emit Win64-native unwind info rather than
DWARF CFI. It handles all corner cases (I hope), including stack
realignment.
Because the unwind info is not flexible enough to describe stack frames
with a gap of unknown size in the middle, such as the one caused by
stack realignment, I modified register spilling code to place all spills
into the fixed frame slots, so that they can be accessed relative to the
frame pointer.
Patch by Vadim Chugunov!
Reviewed By: rnk
Differential Revision: http://reviews.llvm.org/D4081
llvm-svn: 211399