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
Lang Hames [Thu, 6 Nov 2014 00:31:04 +0000 (00:31 +0000)]
[Docs][JIT] Update the clang++ invocation lines in the kaleidoscope docs.
The old examples had missing/incorrect flags that were causing failures on newer
versions of clang and the tutorial code.
llvm-svn: 221419
Tobias Grosser [Thu, 6 Nov 2014 00:27:01 +0000 (00:27 +0000)]
Extract SCEV generation into subfunction
This makes the code more readable and will be reused in subsequent OpenMP
patches.
llvm-svn: 221418
Fariborz Jahanian [Wed, 5 Nov 2014 23:58:55 +0000 (23:58 +0000)]
Patch for small addition to availability attribute.
This is to accept "NA" in place of vesion number for availability
attribute. Used on introduced=NA to mean unavailable
and deprecated=NA to mean nothing (not deprecated).
rdar://
18804883
llvm-svn: 221417
Greg Clayton [Wed, 5 Nov 2014 23:56:37 +0000 (23:56 +0000)]
Fixed the C++ method name class to be a bit more picky about what it identifies as a C++ method.
This was done by using regular expressions on any basename we find to ensure it is valid.
This fixed setting breakpoints by name with values like '[J]com.robovm.debug.server.apps.SleepLoop.startingUp()V'. This was previously triggering the C++ method name class to identify the string as C++ with a basename of '[J]com.robovm.debug.server.apps.SleepLoop.startingUp' which was obviously incorrect.
The changes also fixed errors in templated function names like "void foo<int>(...)" where "void foo<int>" was being identified incorrectly as the basename. We also handle more C++ operators correctly now.
llvm-svn: 221416
Reid Kleckner [Wed, 5 Nov 2014 23:51:45 +0000 (23:51 +0000)]
cmake: Only export targets in the standalone build
Trying to fix bots that didn't like the fact that I exported targets
that depended on LLVM without exporting targets from LLVM.
llvm-svn: 221415
Nick Kledzik [Wed, 5 Nov 2014 23:40:04 +0000 (23:40 +0000)]
Fix shadowed variable warning
llvm-svn: 221414
Reid Kleckner [Wed, 5 Nov 2014 23:23:18 +0000 (23:23 +0000)]
cmake: Make the LLDB standalone build work for me
This allows me to generate a Visual Studio solution that builds LLDB if
you have standalone builds of LLVM and Clang lying around.
Unfortunately, you have to pass *four* CMake variables in, but it means
you don't have to take the extra step of installing Clang and LLVM to
some package prefix.
Hopefully this will generate a more usable XCode project too.
llvm-svn: 221413
David Majnemer [Wed, 5 Nov 2014 23:22:41 +0000 (23:22 +0000)]
MachO: Remove an unused variable from processSection
The local variable `cfi` became dead in r220730 when it's use was
obviated; it was replaced with a call to read32.
No functionality change intended.
llvm-svn: 221412
Reid Kleckner [Wed, 5 Nov 2014 23:14:59 +0000 (23:14 +0000)]
Make it easier to build against a pre-built Clang package with CMake
Installing <prefix>/share/clang/cmake/ClangConfig.cmake makes CMake's
builtin find_package() utility work with Clang. This also allows
downstream consumers of Clang to statically link against libraries like
clangAST and have that pull in dependencies like clangBasic and
LLVMSupport.
See the CMake docs on packages:
http://www.cmake.org/cmake/help/v3.0/manual/cmake-packages.7.html
llvm-svn: 221411
DeLesley Hutchins [Wed, 5 Nov 2014 23:09:28 +0000 (23:09 +0000)]
Thread Safety Analysis: move warnings on range-based for loops out of beta
and into -Wthread-safety.
llvm-svn: 221410
Alexey Samsonov [Wed, 5 Nov 2014 22:44:36 +0000 (22:44 +0000)]
[Sanitizer] Introduce generic stack frame rendering machinery
Summary:
This commit introduces function __sanitizer::RenderFrame()
that allows to render the contents of AddressInfo (essentially, symbolized stack frame)
using the custom format string. This function can be used to
implement stack frame formatting for both ThreadSanitizer and
generic StackTrace::Print(), used in another places. This paves the
way towards allowing user to control the format of stack frames,
obtaining them in any format he desires, and/or enforcing the consistent
output from all sanitizers.
Test Plan: compiler-rt test suite
Reviewers: kcc
Reviewed By: kcc
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6140
llvm-svn: 221409
Petar Jovanovic [Wed, 5 Nov 2014 22:42:31 +0000 (22:42 +0000)]
[mips64] Fix MIPS64 exception personality encoding
Remove dynamic relocations of __gxx_personality_v0 from the .eh_frame.
The MIPS64 follow-up of the MIPS32 fix (rL209907).
Patch by Vladimir Stefanovic.
Differential Revision: http://reviews.llvm.org/D6141
llvm-svn: 221408
Simon Pilgrim [Wed, 5 Nov 2014 22:28:25 +0000 (22:28 +0000)]
[X86][SSE] Vector integer to float conversion memory folding
Added missing memory folding for the (V)CVTDQ2PS instructions - we can safely fold these (but not the (V)CVTDQ2PD versions which have a register/memory size discrepancy in the source operand). I've added a test case demonstrating that stack folding now works.
Differential Revision: http://reviews.llvm.org/D5981
llvm-svn: 221407
Sean Silva [Wed, 5 Nov 2014 22:17:18 +0000 (22:17 +0000)]
[docs] Document usage of Inputs/ for extra test files.
llvm-svn: 221406
Zachary Turner [Wed, 5 Nov 2014 22:16:28 +0000 (22:16 +0000)]
Decouple ProcessWindows from the Windows debug driver thread.
In the llgs world, ProcessWindows will eventually go away and
we'll implement a different protocol. This patch decouples
ProcessWindows from the core debug loop so that this transition
will not be more difficult than it needs to be.
llvm-svn: 221405
Fariborz Jahanian [Wed, 5 Nov 2014 21:50:22 +0000 (21:50 +0000)]
This patch fixes a crash after rebuilding call AST of
an __unknown_anytype(...). In this case, we rebuild the
vararg function type specially to convert the call expression
to something that IRGen can handle. However, FunctionDecl
as rebuilt in RebuildUnknownAnyExpr::resolveDecl is bogus and
results in crash when accessing its params later on. This
patch fixes the crash by rebuilding the FunctionDecl to match
its new resolved type. rdar://
15297105.
John McCall, please review post-commit.
llvm-svn: 221404
Sean Silva [Wed, 5 Nov 2014 21:33:34 +0000 (21:33 +0000)]
[Linker] Add some test coverage for llvm.ident merging
llvm-svn: 221403
Enrico Granata [Wed, 5 Nov 2014 21:31:57 +0000 (21:31 +0000)]
Allow inline test case to register actually useful teardown hooks by allowing a hook to be passed back the test instance, were it not to be already bound to self. Use this ability to make the reversal of escape-non-printables a teardown hook for added reliability of the testing logic
llvm-svn: 221402
Michael Ilseman [Wed, 5 Nov 2014 21:28:24 +0000 (21:28 +0000)]
Fix heap-use-after-free bug in expandSDiv when the operands are
constants, as discovered by ASAN.
Patch by Mehdi Amini!
llvm-svn: 221401
Sean Callanan [Wed, 5 Nov 2014 21:24:27 +0000 (21:24 +0000)]
Fixed the Objective-C stripped ivar test to ensure
that we load debug information properly. If we don't
explicitly add-dsym, sometimes Spotlight will help out
and tell us about the dSYM but we shouldn't be relying
on that. Thanks to Jim for catching this.
<rdar://problem/
16424661>
llvm-svn: 221400
Enrico Granata [Wed, 5 Nov 2014 21:20:48 +0000 (21:20 +0000)]
Add a setting escape-non-printables that drives whether the StringPrinter should or should not escape sequences such as \t, \n, .. and generally any non-printing character
The recent StringPrinter changes made this behavior the default, and the setting defaults to yes
If you want to change this behavior and see non-printables unescaped (e.g. "a\tb" as "a b"), set it to false
Fixes rdar://
12969594
llvm-svn: 221399
Eric Fiselier [Wed, 5 Nov 2014 21:20:10 +0000 (21:20 +0000)]
Fix rvalue bug in __has_operator_addressof
llvm-svn: 221398
Simon Atanasyan [Wed, 5 Nov 2014 21:09:53 +0000 (21:09 +0000)]
[ELF] Use getVisibility() function to access st_other field
The st_other field can contains not only visibility flag so we should
retrieve a visibility flag using a bit-mask.
llvm-svn: 221397
Steven Wu [Wed, 5 Nov 2014 21:02:55 +0000 (21:02 +0000)]
Remove obsolete ARM intrinsics vclz and vcnt
Both of the intrinsics get autoupgraded to target independent
intrinsics.
llvm-svn: 221396
Eric Fiselier [Wed, 5 Nov 2014 20:59:18 +0000 (20:59 +0000)]
Fix operator & detection trait to check for free function overloads as well
llvm-svn: 221395
Tobias Grosser [Wed, 5 Nov 2014 20:48:56 +0000 (20:48 +0000)]
BlockGenerator: Recompute values from SCEV before handing back the original values
This patch moves the SCEV based (re)generation of values before the checking for
scop-constant terms. It enables us to provide SCEV based replacements, which
are necessary to correctly generate OpenMP subfunctions when using the SCEV
based code generation.
When recomputing a new value for a value used in the code of the original scop,
we previously directly returned the same original value for all scop-constant
expressions without even trying to regenerate these values using our SCEV
expression. This is correct when the newly generated code remains fully in the
same function, however in case we want to outline parts of the newly generated
scop into subfunctions, this approach means we do not have any opportunity to
update these values in the SCEV based code generation. (In the non-SCEV based
code generation, we can provide such updates through the GlobalMap). To ensure
we have this opportunity, we first try to regenerate scalar terms with our SCEV
builder and will only return scop-constant expressions if SCEV based code
generation was not possible.
This change should not affect the results of the existing code generation
passes. It only impacts the upcoming OpenMP based code generation.
This commit also adds a test case. This test case passes before and after this
commit. It was added to ensure test coverage for the changed code.
llvm-svn: 221393
Simon Atanasyan [Wed, 5 Nov 2014 20:47:35 +0000 (20:47 +0000)]
Add accessor to get 'visibility' part of st_other field
This new `getVisibility()` function will also be used in the LLD code.
llvm-svn: 221392
Reid Kleckner [Wed, 5 Nov 2014 20:30:55 +0000 (20:30 +0000)]
cmake: Conditionalize CodeGen's dependency on intrinsics_gen
Custom targets in cmake cannot be exported, and this dependency is only
needed in the combined build to ensure that Intrinsics.gen is created
before compiling CodeGen. In the standalone, all of LLVM is build first.
llvm-svn: 221391
Derek Schuff [Wed, 5 Nov 2014 20:02:05 +0000 (20:02 +0000)]
Fix test breakage from r221386
llvm-svn: 221389
Tobias Grosser [Wed, 5 Nov 2014 19:46:04 +0000 (19:46 +0000)]
BlockGenerator: inline lookupAvailableValue into getValue [NFC]
There was no good reason why this code was split accross two functions.
In subsequent changes we will change the order in which values are looked up.
Doing so would make the split into two functions even more arbitrary.
We also slightly improve the documentation.
llvm-svn: 221388
Matt Arsenault [Wed, 5 Nov 2014 19:35:00 +0000 (19:35 +0000)]
R600/SI: Fix omod display for VOP3b
llvm-svn: 221387
Derek Schuff [Wed, 5 Nov 2014 19:27:21 +0000 (19:27 +0000)]
[x86 fast-isel] Materialize allocas with the correct-sized lea for ILP32
Summary:
X86FastISel::fastMaterializeAlloca was incorrectly conditioning its
opcode selection on subtarget bitness rather than pointer size.
Differential Revision: http://reviews.llvm.org/D6136
llvm-svn: 221386