Evgeniy Stepanov [Fri, 7 Nov 2014 12:03:07 +0000 (12:03 +0000)]
[sanitizer] Never remove the last frame off the stack trace.
It can only make it worse.
llvm-svn: 221520
Daniel Sanders [Fri, 7 Nov 2014 12:02:59 +0000 (12:02 +0000)]
[mips] Remove MipsCC::getRegVT(). NFC
Summary: It's no longer used.
Reviewers: vmedic, theraven
Reviewed By: theraven
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6112
llvm-svn: 221519
Daniel Sanders [Fri, 7 Nov 2014 11:43:49 +0000 (11:43 +0000)]
[mips] Remove MipsCC::analyzeCallOperands in favour of CCState::AnalyzeCallOperands. NFC
Summary:
In addition to the usual f128 workaround, it was also necessary to provide
a means of accessing ArgListEntry::IsFixed.
Reviewers: theraven, vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6111
llvm-svn: 221518
Daniel Sanders [Fri, 7 Nov 2014 11:10:48 +0000 (11:10 +0000)]
[mips] Move SpecialCallingConv to MipsCCState and use it from tablegen-erated code. NFC
Summary:
In the long run, it should probably become a calling convention in its own
right but for now just move it out of
MipsISelLowering::analyzeCallOperands() so that we can drop this function
in favour of CCState::AnalyzeCallOperands().
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6085
llvm-svn: 221517
Daniel Sanders [Fri, 7 Nov 2014 10:45:16 +0000 (10:45 +0000)]
[mips] Removed IsVarArg from MipsISelLowering::analyzeCallOperands(). NFC.
Summary:
CCState objects already carry this information in their isVarArg() method.
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6084
llvm-svn: 221516
Renato Golin [Fri, 7 Nov 2014 10:30:53 +0000 (10:30 +0000)]
Move ARM failure from FIXME to XFAIL
llvm-svn: 221515
Jay Foad [Fri, 7 Nov 2014 09:08:39 +0000 (09:08 +0000)]
llvm-symbolizer: teach it about PowerPC64 ELF function descriptors
Summary:
Teach llvm-symbolizer about PowerPC64 ELF function descriptors. Symbols in the .opd section point to function descriptors, the first word of which is a pointer to the real function. For the purposes of symbolizing we pretend that the symbol points directly to the function.
This is enough to get decent function names in stack traces for unoptimized binaries, which fixes the sanitizer print-stack-trace test on PowerPC64 Linux.
Reviewers: kcc, willschm, samsonov
Reviewed By: samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6110
llvm-svn: 221514
David Majnemer [Fri, 7 Nov 2014 08:54:19 +0000 (08:54 +0000)]
SCCP: overdefined calls cannot become constant
We would attempt to fold away a call instruction which had been marked
overdefined. However, it's not valid to transition to constant from
overdefined.
This fixes PR21512.
llvm-svn: 221513
Johannes Doerfert [Fri, 7 Nov 2014 08:31:31 +0000 (08:31 +0000)]
[Refactor][NFC] Generalize the creation of ScopArrayInfo objects.
Differential Revision: http://reviews.llvm.org/D6031
llvm-svn: 221512
David Majnemer [Fri, 7 Nov 2014 07:26:38 +0000 (07:26 +0000)]
CodeGen, Itanium: Properly dllimport RTTI data
We would blindly assume that RTTI data should have the same linkage as
the vtable because we didn't think the RTTI data was external. This
oversight stemmed because we didn't take dllimport into account.
This fixes PR21512.
llvm-svn: 221511
Justin Hibbits [Fri, 7 Nov 2014 04:46:10 +0000 (04:46 +0000)]
Add Position-independent Code model Module API.
Summary:
This makes PIC levels a Module flag attribute, which can be queried by the
backend. The flag is named `PIC Level`, and can have a value of:
0 - Backend-default
1 - Small-model (-fpic)
2 - Large-model (-fPIC)
These match the `-pic-level' command line argument for clang, and the value of the
preprocessor macro `__PIC__'.
Test Plan:
New flags tests specific for the 'PIC Level' module flag.
Tests to be added as part of a future commit for PowerPC, which will use this new API.
Reviewers: rafael, echristo
Reviewed By: rafael, echristo
Subscribers: rafael, llvm-commits
Differential Revision: http://reviews.llvm.org/D5882
llvm-svn: 221510
Rafael Espindola [Fri, 7 Nov 2014 04:24:12 +0000 (04:24 +0000)]
Use llvm::StringRefMemoryObject NFC.
llvm-svn: 221509
Rui Ueyama [Fri, 7 Nov 2014 02:54:52 +0000 (02:54 +0000)]
Fix Mach-O unit tests breakage on Windows
Mach-O normalized file reader assumes that the entire file is aligned
to a large boundary. If the in-memory file is not aligned properly, it will
abort with an assertion failure in read32/read64. This patch forces the
in-memory file for the unit test to be aligned at 64-byte boundary.
I found these tests are failing on Windows, but theoretically they could
fail on other platform.
llvm-svn: 221508
Ahmed Bougacha [Fri, 7 Nov 2014 02:50:00 +0000 (02:50 +0000)]
[AArch64] Keep flags on condition vreg when instantiating a CB branch.
Reversing a CB* instruction used to drop the flags on the condition. On the
included testcase, this lead to a read from an undefined vreg.
Using addOperand keeps the flags, here <undef>.
Differential Revision: http://reviews.llvm.org/D6159
llvm-svn: 221507
Rui Ueyama [Fri, 7 Nov 2014 01:51:00 +0000 (01:51 +0000)]
Disable a Mach-O test on Windows that depends on Unix path separator.
llvm-svn: 221506
Rui Ueyama [Fri, 7 Nov 2014 01:45:32 +0000 (01:45 +0000)]
Add missing -target triple to ELF tests.
llvm-svn: 221505
Rui Ueyama [Fri, 7 Nov 2014 01:30:49 +0000 (01:30 +0000)]
XFAIL elf/demangle.test on Windows.
Because LLD on that platform can't demangle symbols.
llvm-svn: 221504
Rafael Espindola [Fri, 7 Nov 2014 01:09:51 +0000 (01:09 +0000)]
Use a StringRefMemoryObject. NFC.
llvm-svn: 221503
Rafael Espindola [Fri, 7 Nov 2014 00:52:15 +0000 (00:52 +0000)]
Use StringRefMemoryObject. NFC.
llvm-svn: 221502
David Majnemer [Fri, 7 Nov 2014 00:31:14 +0000 (00:31 +0000)]
LoopVectorize: Don't assume pointees are sized
A pointer's pointee might not be sized: the pointee could be a function.
Report this as IK_NoInduction when calculating isInductionVariable.
This fixes PR21508.
llvm-svn: 221501
Rui Ueyama [Thu, 6 Nov 2014 23:50:48 +0000 (23:50 +0000)]
[PECOFF] Improve subsystem inference
If /subsystem option is not given, the linker needs to infer the
subsystem based on the entry point symbol. If it fails to infer
that, the linker should error out on it.
LLD was almost correct, but it would fail to infer the subsystem
if the entry point is specified with /entry. This is because the
subsystem inference was coupled with the entry point function
searching (if no entry point name is specified, the linker needs
to find the right entry name).
This patch makes the subsystem inference an independent pass to
fix the issue. Now, as long as an entry point function is defined,
LLD can infer the subsystem no matter how it resolved the entry
point.
I don't think scanning all the defined symbols is fast, although
it shouldn't be that slow. The file class there does not provide
any easy way to find an atom by name, so this is what we can do
at this moment. I'd like to revisit this later to make it more
efficient.
llvm-svn: 221499
David Majnemer [Thu, 6 Nov 2014 23:23:30 +0000 (23:23 +0000)]
InstCombine: Rely on cmpxchg's return code when it's strong
Comparing the result of a cmpxchg instruction can be replaced with an
extractvalue of the cmpxchg success indicator.
llvm-svn: 221498
Rafael Espindola [Thu, 6 Nov 2014 23:16:57 +0000 (23:16 +0000)]
Remove unused variable. NFC.
llvm-svn: 221497
Greg Clayton [Thu, 6 Nov 2014 22:59:28 +0000 (22:59 +0000)]
Fixes so tests compile and run remotely.
Fixes include:
- dont set or change LDFLAGS, but set LD_EXTRAS instead
- fix compilation errors for iOS based builds with objective C code
- fix test cases to create classes instead of relying on classes from AppKit
- rename things where it makes sense
llvm-svn: 221496
Rafael Espindola [Thu, 6 Nov 2014 22:57:10 +0000 (22:57 +0000)]
Don't repeat names in comments. NFC.
llvm-svn: 221495
Greg Clayton [Thu, 6 Nov 2014 22:56:56 +0000 (22:56 +0000)]
Changed program to go along with the previous commit to allow this test to be run remotely via lldb-platform.
llvm-svn: 221494
Greg Clayton [Thu, 6 Nov 2014 22:56:15 +0000 (22:56 +0000)]
Fix the test to not have to run the binary separately first to get the golden output, use the process STDOUT instead.
This helps this test be able to be run remotely.
llvm-svn: 221493
Greg Clayton [Thu, 6 Nov 2014 22:55:09 +0000 (22:55 +0000)]
Make sure stderr is filtered out in case xcodebuild or xcrun print errors when getting the SDK path and use xcrun to find the SDK path.
llvm-svn: 221492
Simon Atanasyan [Thu, 6 Nov 2014 22:46:24 +0000 (22:46 +0000)]
[ELF][yaml2obj] Handle additional MIPS specific st_other field flags
The ELF symbol `st_other` field might contain additional flags besides
visibility ones. This patch implements support for some MIPS specific
flags.
llvm-svn: 221491
Rafael Espindola [Thu, 6 Nov 2014 22:39:16 +0000 (22:39 +0000)]
Factor out call to push_back. NFC.
llvm-svn: 221490
Simon Pilgrim [Thu, 6 Nov 2014 22:15:41 +0000 (22:15 +0000)]
[X86][SSE] Vector integer/float conversion memory folding (cvttps2dq / cvttpd2dq)
Fixed an issue with the (v)cvttps2dq and (v)cvttpd2dq instructions being incorrectly put in the 2 source operand folding tables instead of the 1 source operand and added the missing SSE/AVX versions.
Also added missing (v)cvtps2dq and (v)cvtpd2dq instructions to the folding tables.
Differential Revision: http://reviews.llvm.org/D6001
llvm-svn: 221489
Ahmed Bougacha [Thu, 6 Nov 2014 22:04:15 +0000 (22:04 +0000)]
[X86] Add VFMADDSUB cases for the 213->231 custom inserter.
Also add tests for vfmadd/vfmsub.
llvm-svn: 221488
Ahmed Bougacha [Thu, 6 Nov 2014 21:58:11 +0000 (21:58 +0000)]
[X86] Add missing FMA3 VFMADDSUB in the emitter.
Also reuse the fma4 intrinsic test to cover fma3 instructions too.
llvm-svn: 221487
Enrico Granata [Thu, 6 Nov 2014 21:55:30 +0000 (21:55 +0000)]
This is a large, but clearical, commit that enables the C++ formatters to take on the additional TypeSummaryOptions argument. It is still not used for anything, but it is now there. Adding support for this extra argument to Python formatters will follow suit
llvm-svn: 221486
David Majnemer [Thu, 6 Nov 2014 21:46:55 +0000 (21:46 +0000)]
Object, COFF: Don't consider AuxFunctionDefinition for getSymbolSize
mingw lies about the size of a function's AuxFunctionDefinition. Ignore
the field and rely on our heuristic to determine the symbol's size.
llvm-svn: 221485
Ahmed Bougacha [Thu, 6 Nov 2014 21:46:23 +0000 (21:46 +0000)]
[X86] Split FMA4 RM tests into a separate file. NFC.
While there, remove useless comments.
llvm-svn: 221484
Tobias Grosser [Thu, 6 Nov 2014 21:25:54 +0000 (21:25 +0000)]
Fix formatting
llvm-svn: 221483
Enrico Granata [Thu, 6 Nov 2014 21:23:20 +0000 (21:23 +0000)]
Introduce the notion of "type summary options" as flags that can be passed down to individual summary formatters to alter their behavior in a formatter-dependent way
Two flags are introduced:
- preferred display language (as in, ObjC vs. C++)
- summary capping (as in, should a limit be put to the amount of data retrieved)
The meaning - if any - of these options is for individual formatters to establish
The topic of a subsequent commit will be to actually wire these through to individual data formatters
llvm-svn: 221482
Frederic Riss [Thu, 6 Nov 2014 21:12:06 +0000 (21:12 +0000)]
Return a DIDescriptor from CGDebugInfo::getDeclarationOrDefinition...
... instead of a DIScope that might wrap something that's not actually
a DIScope (eg. a DIGlobalVariable);
llvm-svn: 221481
Rafael Espindola [Thu, 6 Nov 2014 20:01:34 +0000 (20:01 +0000)]
Base check on the section name, not the variable name.
The variable is private, so the name should not be relied on. Also, the
linker uses the sections, so asan should too when trying to avoid causing
the linker problems.
llvm-svn: 221480
Tobias Grosser [Thu, 6 Nov 2014 19:35:21 +0000 (19:35 +0000)]
Explicitly annotate loops we want to run thread-parallel
We introduces a new flag -polly-parallel and use it to annotate the for-nodes in
the isl ast that we want to execute thread parallel (e.g., using OpenMP). We
previously already emmitted openmp annotations, but we did this for various
kinds of parallel loops, including some which we can not run in parallel.
With this patch we now have three annotations:
1) #pragma known-parallel [reduction]
2) #pragma omp for
3) #pragma simd
meaning:
1) loop has no loop carried dependences
2) loop will be executed thread-parallel
3) loop can possibly be vectorized
This patch introduces 1) and reduces the use of 2) to only the cases where we
will actually generate thread parallel code.
It is in preparation of openmp code generation in our isl backend.
Legacy:
- We also have a command line option -enable-polly-openmp. This option controls
the OpenMP code generation in CLooG. It will become an alias of
-polly-parallel after the CLooG code generation has been dropped.
http://reviews.llvm.org/D6142
llvm-svn: 221479
Nick Kledzik [Thu, 6 Nov 2014 19:33:59 +0000 (19:33 +0000)]
remove unneeded { }
llvm-svn: 221478
Nick Kledzik [Thu, 6 Nov 2014 19:33:57 +0000 (19:33 +0000)]
[mach-o] Add support for -force_load option
The darwin linker has two ways to force all members of an archive to be loaded.
The -all_load option applies to all static libraries. The -force_load takes
a path to a library and just that library's members are force loaded.
llvm-svn: 221477
Sean Callanan [Thu, 6 Nov 2014 19:26:10 +0000 (19:26 +0000)]
Handle types from the runtime that conform to
protocols.
<rdar://problem/
18883778>
llvm-svn: 221476
Lang Hames [Thu, 6 Nov 2014 19:24:18 +0000 (19:24 +0000)]
[RegAlloc] Remove reference to the trivial spiller in test case.
This test case was never actually testing the trivial spiller: the -spiller
option has not been hooked up for a while now.
llvm-svn: 221475
Lang Hames [Thu, 6 Nov 2014 19:12:38 +0000 (19:12 +0000)]
[RegAlloc] Kill off the trivial spiller - nobody is using it any more.
llvm-svn: 221474
Kevin Enderby [Thu, 6 Nov 2014 19:12:28 +0000 (19:12 +0000)]
[mach-o] Update test case to work with latest llvm-objdump output for ARM thumb
code. Same basic change that was done in r218429 for ARM code.
Where the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler is now
plumbed in with r221470 from the llvm trunk.
llvm-svn: 221473
Michael Liao [Thu, 6 Nov 2014 19:05:57 +0000 (19:05 +0000)]
Indentation fixes
llvm-svn: 221472
Frederic Riss [Thu, 6 Nov 2014 19:00:47 +0000 (19:00 +0000)]
Try to appease MSVC buildbots after r221466.
llvm-svn: 221471
Kevin Enderby [Thu, 6 Nov 2014 19:00:13 +0000 (19:00 +0000)]
Plumb in the ARM thumb symbolizer in llvm-objdump’s Mach-O disassembler and
add the code and test cases for 32-bit ARM symbolizer.
Also fixed the printing of data in code as it was not using the table correctly
and needed to fix one of the test cases too.
This will break lld’s test/mach-o/arm-interworking-movw.yaml till the tweak
for that is made. Which I’ll be committing immediately after this commit.
llvm-svn: 221470
Alexey Samsonov [Thu, 6 Nov 2014 18:43:45 +0000 (18:43 +0000)]
[Sanitizer] Introduce "stack_trace_format" runtime flag.
This flag can be used to specify the format of stack frames - user
can now provide a string with placeholders, which should be printed
for each stack frame with placeholders replaced with actual data.
For example "%p" will be replaced by PC, "%s" will be replaced by
the source file name etc.
"DEFAULT" value enforces default stack trace format currently used in
all the sanitizers except TSan.
This change also implements __sanitizer_print_stack_trace interface
function in TSan.
llvm-svn: 221469
Greg Clayton [Thu, 6 Nov 2014 18:39:39 +0000 (18:39 +0000)]
Pick better floating point numbers (ones that can be exactly represented) in floating point instead of something that can't to avoid test suite failures on different devices and architectures.
<rdar://problem/
18826900>
llvm-svn: 221468
Shawn Best [Thu, 6 Nov 2014 17:52:15 +0000 (17:52 +0000)]
fixed minor code indenting reviews.llvm.org/D6127
llvm-svn: 221467
Frederic Riss [Thu, 6 Nov 2014 17:46:55 +0000 (17:46 +0000)]
Change DIBuilder::createImportedDeclaration from taking a DIScope to a DIDescriptor.
Imported declarations can be DIGlobalVariables which aren't a DIScope. Today
clang (unknowingly I believe) shoehorns these into a DIScope and it all works
just because we never access the fields.
llvm-svn: 221466
Colin LeMahieu [Thu, 6 Nov 2014 17:05:51 +0000 (17:05 +0000)]
[Hexagon] Adding basic Hexagon ELF object emitter.
llvm-svn: 221465
Eli Bendersky [Thu, 6 Nov 2014 17:05:49 +0000 (17:05 +0000)]
Clean up NVPTXLowerStructArgs.cpp. NFC
* Remove unnecessary const_casts and C-style casts
* Simplify attribute access code
* Simplify ArrayRef creation
* 80-col and clang-format
llvm-svn: 221464
Daniel Sanders [Thu, 6 Nov 2014 16:48:57 +0000 (16:48 +0000)]
[mips] Removed IsSoftFloat from MipsISelLowering::analyzeCallOperands(). NFC
Summary:
It isn't used anymore.
Depends on D6081
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6083
llvm-svn: 221463
Chad Rosier [Thu, 6 Nov 2014 16:46:37 +0000 (16:46 +0000)]
[Reassociate] Don't reassociate when mixing regular and fast-math FP
instructions. Inlining might cause such cases and it's not valid to
reassociate floating-point instructions without the unsafe algebra flag.
Patch by Mehdi Amini <mehdi_amini@apple.com>!
llvm-svn: 221462
Daniel Sanders [Thu, 6 Nov 2014 16:36:30 +0000 (16:36 +0000)]
[mips] Removed MipsISelLowering::analyzeFormalArguments() in favour of CCState::AnalyzeFormalArguments()
Summary:
As with returns, we must be able to identify f128 arguments despite them
being lowered away. We do this with a pre-analyze step that builds a
vector and then we use this vector from the tablegen-erated code.
Reviewers: vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6081
llvm-svn: 221461
Eric Fiselier [Thu, 6 Nov 2014 15:26:20 +0000 (15:26 +0000)]
Add support for UNSUPPORTED tag to lit
llvm-svn: 221460
Rafael Espindola [Thu, 6 Nov 2014 15:05:51 +0000 (15:05 +0000)]
Use FileCheck in a few tests.
llvm-svn: 221459
Charlie Turner [Thu, 6 Nov 2014 14:59:30 +0000 (14:59 +0000)]
Remove references to the cortex-a9-mp CPU.
This CPU definition is redundant. The Cortex-A9 is defined as
supporting multiprocessing extensions. Remove references to this CPU.
This CPU was recently removed from LLVM. See http://reviews.llvm.org/D6057
Change-Id: I62ae7cc656fcae54fbaefc4b6976e77e694a8678
llvm-svn: 221458
Will Schmidt [Thu, 6 Nov 2014 14:58:06 +0000 (14:58 +0000)]
Use GET_CURRENT_FRAME() to calculate the memory layout for power. This works
for both PPC64 Big and Little endian modes, so also eliminates the need for
the BIG_ENDIAN/LITTLE_ENDIAN #ifdeffery.
By trial and error, it also looks like the kPPC64_ShadowOffset64 value is
valid using (1ULL << 41) for both BE and LE, so that #if/#elif/#endif block
has also been simplified.
Differential Revision: http://reviews.llvm.org/D6044
llvm-svn: 221457
Rafael Espindola [Thu, 6 Nov 2014 14:39:49 +0000 (14:39 +0000)]
Compute the correct jump table entries on 32 bit windows.
On 32 bit windows we use label differences and .set does not suppress
rolocations, a combination that was not used before r220256.
This fixes PR21497.
llvm-svn: 221456
Andrea Di Biagio [Thu, 6 Nov 2014 14:36:45 +0000 (14:36 +0000)]
[X86] When commuting SSE immediate blend, make sure that the new blend mask is a valid imm8.
Example:
define <4 x i32> @test(<4 x i32> %a, <4 x i32> %b) {
%shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 4, i32 5, i32 6, i32 3>
ret <4 x i32> %shuffle
}
Before llc (-mattr=+sse4.1), produced the following assembly instruction:
pblendw $
4294967103, %xmm1, %xmm0
After
pblendw $63, %xmm1, %xmm0
llvm-svn: 221455
Aaron Ballman [Thu, 6 Nov 2014 14:32:30 +0000 (14:32 +0000)]
Fixing some -Wcast-qual warnings; NFC.
llvm-svn: 221454
Toma Tabacu [Thu, 6 Nov 2014 14:25:42 +0000 (14:25 +0000)]
[mips] Tolerate the use of the %z inline asm operand modifier with non-immediates.
Summary:
Currently, we give an error if %z is used with non-immediates, instead of continuing as if the %z isn't there.
For example, you use the %z operand modifier along with the "Jr" constraints ("r" makes the operand a register, and "J" makes it an immediate, but only if its value is 0).
In this case, you want the compiler to print "$0" if the inline asm input operand turns out to be an immediate zero and you want it to print the register containing the operand, if it's not.
We give an error in the latter case, and we shouldn't (GCC also doesn't).
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6023
llvm-svn: 221453
Deepak Panickal [Thu, 6 Nov 2014 13:42:49 +0000 (13:42 +0000)]
Fix lldb-mi warnings so that it builds when --enable-werror is set.
llvm-svn: 221452
Rafael Espindola [Thu, 6 Nov 2014 13:30:38 +0000 (13:30 +0000)]
Don't manually insert L prefixes.
Simply marking the symbol private conveys the desire to hide them to LLVM.
llvm-svn: 221451
Sasa Stankovic [Thu, 6 Nov 2014 13:20:12 +0000 (13:20 +0000)]
[mips] Add the following MIPS options that control gp-relative addressing of
small data items: -mgpopt, -mlocal-sdata, -mextern-sdata. Implement gp-relative
addressing for constants.
Differential Revision: http://reviews.llvm.org/D4903
llvm-svn: 221450
Andrea Di Biagio [Thu, 6 Nov 2014 12:08:57 +0000 (12:08 +0000)]
[X86] Slightly refactor default features for AMD bdver cpus (NFC). Also add missing checks to test for target features.
This patch simplifies how default target features are set for AMD bdver2
and bdver1. In particular, method 'getDefaultFeatures' now implements a
fallthrough from case 'CK_BDVER2' to case 'CK_BDVER1'.
That is because 'bdver2' has the same features available in bdver1 plus
BMI, FMA, F16C and TBM.
This patch also adds missing checks for predefined macros in test
predefined-arch-macros.c. In the case of BTVER2, the test now also checks
for F16C, BMI and PCLMUL. In the case of BDVER3 and BDVER4, the test now
also checks for the presence of FSGSBASE.
Differential Revision: http://reviews.llvm.org/D6134
llvm-svn: 221449
Alexey Bataev [Thu, 6 Nov 2014 10:10:50 +0000 (10:10 +0000)]
Fix for exception specification mismatch in explicit instantiation.
According to C++ standard if an exception-specification is specified in an explicit instantiation directive, it shall be compatible with the exception-specifications of other declarations of that function. This patch adds checks for this.
Differential Revision: http://reviews.llvm.org/D5822
llvm-svn: 221448
Toma Tabacu [Thu, 6 Nov 2014 10:02:45 +0000 (10:02 +0000)]
[mips] Improve error/warning messages and testing for the .cpload assembler directive.
Summary:
Improved warning message when using .cpload inside a reorder section and added an error message for using .cpload with Mips16 enabled.
Modified the tests to fit with the changes mentioned above, added a test-case for the N32 ABI in cpload.s and did some reformatting to make the tests easier to read.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D5465
llvm-svn: 221447
Daniel Sanders [Thu, 6 Nov 2014 09:53:05 +0000 (09:53 +0000)]
[JIT] Fix more missing endian conversions (opcodes for AArch64, ARM, and Mips stub functions, and ARM target in general)
Summary:
Fixed all of the missing endian conversions that Lang Hames and I identified in
RuntimeDyldMachOARM.h.
Fixed the opcode emission in RuntimeDyldImpl::createStubFunction() for AArch64,
ARM, Mips when the host endian doesn't match the target endian.
PowerPC will need changing if it's opcodes are affected by endianness but I've
left this for now since I'm unsure if this is the case and it's the only path
that specifies the target endian.
This patch fixes MachO_ARM_PIC_relocations.s on a big-endian Mips host. This
is the last of the known issues on this host.
Reviewers: lhames
Reviewed By: lhames
Subscribers: aemerson, llvm-commits
Differential Revision: http://reviews.llvm.org/D6130
llvm-svn: 221446
David Majnemer [Thu, 6 Nov 2014 08:55:23 +0000 (08:55 +0000)]
UBSan: Teach isDerivedFromAtOffset and findBaseAtOffset about vbases
When the __virtual_mask is set, __offset_flags >> __offset_shift yields
an offset into the vtable. Dereferencing this vtable slot gets us the
vbase offset.
Adjust a test case to verify that this, in fact, works.
Differential Revision: http://reviews.llvm.org/D6074
llvm-svn: 221445
David Majnemer [Thu, 6 Nov 2014 08:10:41 +0000 (08:10 +0000)]
Object, COFF: Infer symbol sizes from adjacent symbols
Use the position of the subsequent symbol in the object file to infer
the size of it's predecessor. I hope to eventually remove whatever COFF
specific details from this little algorithm so that we can unify this
logic with what Mach-O does.
llvm-svn: 221444
David Majnemer [Thu, 6 Nov 2014 08:10:37 +0000 (08:10 +0000)]
X86, MC: Tidy up some whitespace in GetRelocType
No functionality change intended.
llvm-svn: 221443
Simon Atanasyan [Thu, 6 Nov 2014 07:07:29 +0000 (07:07 +0000)]
[Mips] Take into account that PIC code is inherently CPIC
Follow-up to r221439.
llvm-svn: 221442
Justin Bogner [Thu, 6 Nov 2014 06:55:02 +0000 (06:55 +0000)]
GCOV: Make sure that function idents in the .gcda and .gcno match
When generating gcov compatible profiling, we sometimes skip emitting
data for functions for one reason or another. However, this was
emitting different function IDs in the .gcno and .gcda files, because
the .gcno case was using the loop index before skipping functions and
the .gcda the array index after. This resulted in completely invalid
gcov data.
This fixes the problem by making the .gcno loop track the ID
separately from the loop index.
llvm-svn: 221441
Simon Atanasyan [Thu, 6 Nov 2014 06:28:40 +0000 (06:28 +0000)]
[Mips] Follow-up to r221439. Include header to fix build on Windows.
llvm-svn: 221440
Simon Atanasyan [Thu, 6 Nov 2014 05:53:10 +0000 (05:53 +0000)]
[Mips] Check ELF flags to prevent linking of incompatible files
1. The path checks ELF header flags to prevent linking of incompatible files.
For example we do not allow to link files with different ABI, -mnan
flags, some combination of target CPU etc.
2. The patch merge ELF header flags from input object files to put their
combination to the generated file. For example, if some input files
have EF_MIPS_NOREORDER flag we need to put this flag to the output
file header.
I use the `parseFile()` (not `canParse()`) method because in case of
recognition of incorrect input flags combination we should show detailed
error message and stop the linking process and should not try to use
another `Reader`.
llvm-svn: 221439
Simon Atanasyan [Thu, 6 Nov 2014 05:52:54 +0000 (05:52 +0000)]
[Mips] Fix ELF flags for the non-PIC object file used in the test
No functional changes.
llvm-svn: 221438
Craig Topper [Thu, 6 Nov 2014 05:52:19 +0000 (05:52 +0000)]
[X86] Use fallthroughs to reduce the number of calls to setFeatureEnabled for different CPUs.
llvm-svn: 221437
Rafael Espindola [Thu, 6 Nov 2014 05:01:21 +0000 (05:01 +0000)]
Add three other sections when L symbols are allowed.
llvm-svn: 221436
Rafael Espindola [Thu, 6 Nov 2014 04:56:05 +0000 (04:56 +0000)]
Use FileCheck.
llvm-svn: 221435
Rafael Espindola [Thu, 6 Nov 2014 04:48:05 +0000 (04:48 +0000)]
Delete dead test.
llvm-svn: 221434
Shankar Easwaran [Thu, 6 Nov 2014 03:03:58 +0000 (03:03 +0000)]
[ELF] Remove llvm::Twine usage
llvm-svn: 221433
Nick Kledzik [Thu, 6 Nov 2014 03:03:42 +0000 (03:03 +0000)]
[mach-o] Add support for -S option
The darwin linker does not process dwarf debug info. Instead it produces a
"debug map" in the output file which points back to the original .o files for
anything that wants debug info (e.g. debugger).
The -S option means "don't add a debug map". lld for mach-o currently does
not generate the debug map, so there is nothing to do when this option is used.
But we need to process the option to get existing projects building.
llvm-svn: 221432
Rafael Espindola [Thu, 6 Nov 2014 02:42:03 +0000 (02:42 +0000)]
Allow L symbols in no_dead_strip sections.
If a section cannot be dead stripped, it is safe to use L symbols, since
the linker will keep all of it in the end.
llvm-svn: 221431
Shankar Easwaran [Thu, 6 Nov 2014 02:35:42 +0000 (02:35 +0000)]
[ELF] Remove includes that are not used
llvm-svn: 221430
Quentin Colombet [Thu, 6 Nov 2014 02:25:03 +0000 (02:25 +0000)]
[X86] Lower VSELECT into SHRUNKBLEND when we shrink the bits used into the
condition to match a blend.
This prevents optimizations that work on VSELECT to perform invalid
transformations. Indeed, the optimized condition does not match the vector
boolean content that is expected and bad things may happen.
This patch yields the exact same code on the whole test-suite + specs (-O3 and
-O3 -march=core-avx2), it improves one test case (vector-blend.ll) and fixes a
bug reduced in vselect-avx.ll.
<rdar://problem/
18819506>
llvm-svn: 221429
Shankar Easwaran [Thu, 6 Nov 2014 02:03:40 +0000 (02:03 +0000)]
[ELF] Use llvm::Twine
llvm-svn: 221428
Shankar Easwaran [Thu, 6 Nov 2014 02:03:38 +0000 (02:03 +0000)]
[ELF] Implement isLittleEndian for all architectures
llvm-svn: 221427
Shankar Easwaran [Thu, 6 Nov 2014 02:03:35 +0000 (02:03 +0000)]
[ELF] Use std::find_if instead
llvm-svn: 221426
Nick Kledzik [Thu, 6 Nov 2014 01:14:12 +0000 (01:14 +0000)]
[mach-o] remove extra leading underscore on __bss and __got
llvm-svn: 221425
Nick Kledzik [Thu, 6 Nov 2014 01:14:09 +0000 (01:14 +0000)]
[mach-o] Add support for interposing tuples section
Darwin uses two-level-namespace lookup for symbols which means the static
linker records where each symbol must be found at runtime. Thus defining a
symbol in a dylib loaded earlier will not effect where symbols needed by
later dylibs will be found. Instead overriding is done through a section
of type S_INTERPOSING which contains tuples of <interposer, interposee>.
llvm-svn: 221424
Rui Ueyama [Thu, 6 Nov 2014 01:14:02 +0000 (01:14 +0000)]
[PECOFF] Add a comment for SECREL relocation.
llvm-svn: 221423
Matt Arsenault [Thu, 6 Nov 2014 01:13:27 +0000 (01:13 +0000)]
Remove unnecessary .c_str() when implicitly converting to Twine
llvm-svn: 221422
Nick Kledzik [Thu, 6 Nov 2014 01:09:13 +0000 (01:09 +0000)]
[mach-o] Add support for interposing tuples section
Darwin uses two-level-namespace lookup for symbols which means the static
linker records where each symbol must be found at runtime. Thus defining a
symbol in a dylib loaded earlier will not effect where symbols needed by
later dylibs will be found. Instead overriding is done through a section
of type S_INTERPOSING which contains tuples of <interposer, interposee>.
llvm-svn: 221421
Rui Ueyama [Thu, 6 Nov 2014 01:03:23 +0000 (01:03 +0000)]
[PECOFF] Fix SECREL relocations.
SECREL relocation's value is the offset to the beginning of the section.
Because of the off-by-one error, if a SECREL relocation target is at the
beginning of a section, it got wrong value.
Added a test that would have caught this.
llvm-svn: 221420