Andrey Churbanov [Fri, 16 Jan 2015 12:54:51 +0000 (12:54 +0000)]
cleanup changes of building for Intel(R) Many Integrated Core Architecture
llvm-svn: 226271
Evgeniy Stepanov [Fri, 16 Jan 2015 12:08:32 +0000 (12:08 +0000)]
[asan] More verbose output from one of the tests.
Trying to debug a buildbot-only failure.
llvm-svn: 226270
Toma Tabacu [Fri, 16 Jan 2015 10:45:15 +0000 (10:45 +0000)]
[mips] Remove a redundant semicolon and add space before curly brackets. NFC.
llvm-svn: 226269
Evgeniy Stepanov [Fri, 16 Jan 2015 10:30:53 +0000 (10:30 +0000)]
[asan] Fix asan_options-include test.
Wrong include order.
llvm-svn: 226268
Evgeniy Stepanov [Fri, 16 Jan 2015 10:20:49 +0000 (10:20 +0000)]
[sanitizer] Fix bashism in check_lint.sh.
llvm-svn: 226267
Evgeniy Stepanov [Fri, 16 Jan 2015 10:09:56 +0000 (10:09 +0000)]
[sanitizer] Cleanup linter temporary files.
llvm-svn: 226266
Simon Atanasyan [Fri, 16 Jan 2015 09:40:21 +0000 (09:40 +0000)]
[ELF] Remove TargetHandler and DefaultTargetHandler constructors
These classes contain only abstract virtual functions. Explicit
constructors are redundant.
llvm-svn: 226265
Simon Pilgrim [Fri, 16 Jan 2015 09:32:54 +0000 (09:32 +0000)]
[X86] Refactored stack memory folding tests to explicitly force register spilling
The current 'big vectors' stack folded reload testing pattern is very bulky and makes it difficult to test all instructions as big vectors will tend to use only the ymm instruction implementations.
This patch changes the tests to use a nop call that lists explicit xmm registers as sideeffects, with this we can force a partial register spill of the relevant registers and then check that the reload is correctly folded. The asm generated only adds the forced spill, a nop instruction and a couple of extra labels (a fraction of the current approach).
More exhaustive tests will follow shortly, I've added some extra tests (the xmm versions of some of the existing folding tests) as a starting point.
Differential Revision: http://reviews.llvm.org/D6932
llvm-svn: 226264
Evgeniy Stepanov [Fri, 16 Jan 2015 09:32:31 +0000 (09:32 +0000)]
[sanitizer] Fix compiler warning in the flag parser code.
llvm-svn: 226263
Simon Atanasyan [Fri, 16 Jan 2015 08:58:14 +0000 (08:58 +0000)]
[ELF] Remove unused class field
No functional changes.
llvm-svn: 226262
Simon Atanasyan [Fri, 16 Jan 2015 08:58:09 +0000 (08:58 +0000)]
[ELF] s/_context/_ctx/ and clang-format the code
No functional changes.
llvm-svn: 226261
Simon Atanasyan [Fri, 16 Jan 2015 08:58:03 +0000 (08:58 +0000)]
[ELF] Make the unhandledReferenceType() protected method
No functional changes.
llvm-svn: 226260
Simon Atanasyan [Fri, 16 Jan 2015 08:57:58 +0000 (08:57 +0000)]
[ELF] Make `TargetRelocationHandler` a regular non-template class
This class defines a relocation handler interface. The interface does
not depend on the template argument so the argument is redundant.
llvm-svn: 226259
Simon Atanasyan [Fri, 16 Jan 2015 08:57:45 +0000 (08:57 +0000)]
[PPC] Remove redundant `virtual` keyword
No functional changes.
llvm-svn: 226258
Simon Atanasyan [Fri, 16 Jan 2015 08:57:39 +0000 (08:57 +0000)]
[PPC] Remove unused class field PPCTargetRelocationHandler::_ppcTargetLayout
No functional changes.
llvm-svn: 226257
Simon Atanasyan [Fri, 16 Jan 2015 08:57:33 +0000 (08:57 +0000)]
[Mips] Use ELFLinkingContext class instead of MipsLinkingContext where possible
No functional changes.
llvm-svn: 226256
Simon Atanasyan [Fri, 16 Jan 2015 08:57:26 +0000 (08:57 +0000)]
[Mips] Make MipsLinkingContext owner of MipsELFFlagsMerger
That reduce class dependencies and simplify the code a bit.
No functional changes.
llvm-svn: 226255
Simon Atanasyan [Fri, 16 Jan 2015 08:57:17 +0000 (08:57 +0000)]
[Mips] Remove redundant namespace names
No functional changes.
llvm-svn: 226254
Simon Atanasyan [Fri, 16 Jan 2015 08:57:08 +0000 (08:57 +0000)]
[Mips] Allow linking object files with MIPS32 and MIPS64 instructions
If object files satisfy O32 ABI they can be linked together even if some
of them contains MIPS64 or MIPS64R2 instructions.
llvm-svn: 226253
Timur Iskhodzhanov [Fri, 16 Jan 2015 08:38:45 +0000 (08:38 +0000)]
Revert r226242 - Revert Revert Don't create new comdats in CodeGen
This breaks AddressSanitizer (ninja check-asan) on Windows
llvm-svn: 226251
Alexey Bataev [Fri, 16 Jan 2015 07:11:33 +0000 (07:11 +0000)]
[OPENMP] Fixed data-sharing attributes processing for variables with global
storage.
This fix allows to use non-constant global variables, static local variables and static data
members in data-sharing attribute clauses in parallel and task regions.
llvm-svn: 226250
Vince Harron [Fri, 16 Jan 2015 06:47:43 +0000 (06:47 +0000)]
minor refactoring to remove unneeded/unspecific header files
Differential review: http://reviews.llvm.org/D6919
llvm-svn: 226249
Filipe Cabecinhas [Fri, 16 Jan 2015 04:54:12 +0000 (04:54 +0000)]
Use report_fatal_error instead of llvm_unreachable, so we don't crash on user input
llvm-svn: 226248
Hal Finkel [Fri, 16 Jan 2015 04:40:58 +0000 (04:40 +0000)]
[PowerPC] Adjust PatchPoints for ppc64le
Bill Schmidt pointed out that some adjustments would be needed to properly
support powerpc64le (using the ELF V2 ABI). For one thing, R11 is not available
as a scratch register, so we need to use R12. R12 is also available under ELF
V1, so to maintain consistency, I flipped the order to make R12 the first
scratch register in the array under both ABIs.
llvm-svn: 226247
Saleem Abdulrasool [Fri, 16 Jan 2015 04:14:33 +0000 (04:14 +0000)]
PE/COFF: use dyn_cast for the check of the target
The target may be a synthetic symbol like __ImageBase. cast_or_null will ensure
that the atom is a DefinedAtom, which is not guaranteed, which was the original
reason for the cast_or_null. Switch this to dyn_cast, which should enable
building of executables for WoA. Unfortunately, the issue of missing base
relocations still needs to be investigated.
llvm-svn: 226246
Mehdi Amini [Fri, 16 Jan 2015 03:00:58 +0000 (03:00 +0000)]
Fix Reassociate handling of constant in presence of undef float
http://reviews.llvm.org/D6993
llvm-svn: 226245
Jason Molenda [Fri, 16 Jan 2015 02:31:35 +0000 (02:31 +0000)]
Fixes to DNBArchImpl in debugserver to correctly get/set
the register state when debugging AArch32 programs (armv7
programs running on an armv8 processor). Most notably,
there is no "fpscr" register in the register context -
there is an fpsr and an fpcr.
Also fix a bug where the floating point values could not
be written in armv7 processes.
<rdar://problem/
18977767>
llvm-svn: 226244
Dan Albert [Fri, 16 Jan 2015 02:27:17 +0000 (02:27 +0000)]
Remove triple detection from cmake.
This isn't actually used for anything, and is broken on Darwin
(currently causing build failures now that the triple is passed to aid
cross compiling). Rather than fix unused code, just remove it.
llvm-svn: 226243
Rafael Espindola [Fri, 16 Jan 2015 02:22:55 +0000 (02:22 +0000)]
Revert "Revert Don't create new comdats in CodeGen"
This reverts commit r226173, adding r226038 back.
No change in this commit, but clang was changed to also produce trivial comdats for
costructors, destructors and vtables when needed.
Original message:
Don't create new comdats in CodeGen.
This patch stops the implicit creation of comdats during codegen.
Clang now sets the comdat explicitly when it is required. With this patch clang and gcc
now produce the same result in pr19848.
llvm-svn: 226242
Kevin Enderby [Fri, 16 Jan 2015 02:08:11 +0000 (02:08 +0000)]
Work around to get the build bot clang-cmake-armv7-a15-full green by
removing the macho-archive-headers.test added with r226228 that it is
failing on for now while I try to figure out what is going on.
llvm-svn: 226241
Dan Albert [Fri, 16 Jan 2015 01:10:09 +0000 (01:10 +0000)]
LIBCXXABI_TARGET_TRIPLE won't always be set.
Fixes issue with r226235. Build configuration difference between
libc++ and libc++abi.
llvm-svn: 226240
Kevin Enderby [Fri, 16 Jan 2015 01:09:54 +0000 (01:09 +0000)]
Another attempt to fix the build bot clang-cmake-armv7-a15-full failing on
the macho-archive-headers.test added with r226228.
llvm-svn: 226239
Sanjoy Das [Fri, 16 Jan 2015 01:03:22 +0000 (01:03 +0000)]
Add a new pass "inductive range check elimination"
IRCE eliminates range checks of the form
0 <= A * I + B < Length
by splitting a loop's iteration space into three segments in a way
that the check is completely redundant in the middle segment. As an
example, IRCE will convert
len = < known positive >
for (i = 0; i < n; i++) {
if (0 <= i && i < len) {
do_something();
} else {
throw_out_of_bounds();
}
}
to
len = < known positive >
limit = smin(n, len)
// no first segment
for (i = 0; i < limit; i++) {
if (0 <= i && i < len) { // this check is fully redundant
do_something();
} else {
throw_out_of_bounds();
}
}
for (i = limit; i < n; i++) {
if (0 <= i && i < len) {
do_something();
} else {
throw_out_of_bounds();
}
}
IRCE can deal with multiple range checks in the same loop (it takes
the intersection of the ranges that will make each of them redundant
individually).
Currently IRCE does not do any profitability analysis. That is a
TODO.
Please note that the status of this pass is *experimental*, and it is
not part of any default pass pipeline. Having said that, I will love
to get feedback and general input from people interested in trying
this out.
This pass was originally r226201. It was reverted because it used C++
features not supported by MSVC 2012.
Differential Revision: http://reviews.llvm.org/D6693
llvm-svn: 226238
Dan Albert [Fri, 16 Jan 2015 00:55:15 +0000 (00:55 +0000)]
[libc++] Add support for cross compiling.
Reviewers: EricWF, jroelofs
Reviewed By: jroelofs
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6990
llvm-svn: 226237
Rui Ueyama [Fri, 16 Jan 2015 00:55:01 +0000 (00:55 +0000)]
Use std::recursive_mutex instead of llvm's SmartMutex.
llvm-svn: 226236
Dan Albert [Fri, 16 Jan 2015 00:52:11 +0000 (00:52 +0000)]
[libc++abi] Add support for cross compiling.
Reviewers: EricWF, jroelofs
Reviewed By: jroelofs
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6991
llvm-svn: 226235
Vince Harron [Fri, 16 Jan 2015 00:47:08 +0000 (00:47 +0000)]
Add Socket::Get[Remote/Local]IpAddress and unit tests
Differential Revision: http://reviews.llvm.org/D6917
llvm-svn: 226234
Nico Weber [Fri, 16 Jan 2015 00:35:05 +0000 (00:35 +0000)]
Give lldb a clean null build.
`ninja lldb` used to always run "echo -n", which on OS X results in literally
echoing "-n" to the screen. Just remove the command from add_custom_target,
then it only adds an alias and `ninja lldb` now reports "no work to do".
Other than that, no intended behavior change.
llvm-svn: 226233
Kevin Enderby [Fri, 16 Jan 2015 00:27:31 +0000 (00:27 +0000)]
This should fix the build bot clang-cmake-armv7-a15-full failing on
the macho-archive-headers.test added with r226228.
llvm-svn: 226232
Jason Molenda [Fri, 16 Jan 2015 00:27:25 +0000 (00:27 +0000)]
Add comment regarding which i386 registers are non-volatile instead of
just pointing to the standard document regarding this.
llvm-svn: 226231
Matt Arsenault [Thu, 15 Jan 2015 23:58:35 +0000 (23:58 +0000)]
R600/SI: Add patterns for v_cvt_{flr|rpi}_i32_f32
llvm-svn: 226230
Filipe Cabecinhas [Thu, 15 Jan 2015 23:50:44 +0000 (23:50 +0000)]
Fix edge case when Start overflowed in 32 bit mode
llvm-svn: 226229
Kevin Enderby [Thu, 15 Jan 2015 23:19:11 +0000 (23:19 +0000)]
Add the option, -archive-headers, used with -macho to print the Mach-O archive headers to llvm-objdump.
llvm-svn: 226228
Rafael Espindola [Thu, 15 Jan 2015 23:18:01 +0000 (23:18 +0000)]
Use a trivial comdat for C++ tables.
This produces comdats for vtables, typeinfo, typeinfo names, and vtts.
When combined with llvm not producing implicit comdats, not doing this would
cause code bloat on ELF and link errors on COFF.
llvm-svn: 226227
Matt Arsenault [Thu, 15 Jan 2015 23:17:03 +0000 (23:17 +0000)]
R600/SI: Fix trailing comma with modifiers
Instructions with 1 operand can still use source modifiers,
so make sure we don't print an extra comma afterwards.
llvm-svn: 226226
Rui Ueyama [Thu, 15 Jan 2015 23:15:09 +0000 (23:15 +0000)]
Simplify.
llvm-svn: 226225
Colin LeMahieu [Thu, 15 Jan 2015 23:10:29 +0000 (23:10 +0000)]
[Hexagon] Adding new-value store and bit reverse instructions.
llvm-svn: 226224
Jonathan Roelofs [Thu, 15 Jan 2015 23:04:37 +0000 (23:04 +0000)]
Print out environment in lit notes
llvm-svn: 226223
Filipe Cabecinhas [Thu, 15 Jan 2015 23:04:15 +0000 (23:04 +0000)]
Remove the slashes so they don't fail in some Windows setups
llvm-svn: 226222
Zachary Turner [Thu, 15 Jan 2015 22:54:08 +0000 (22:54 +0000)]
Some fixes for thread stepping on Windows.
This hooks up the changes necessary to set the trap flag on the
CPU and properly manage the process and thread's resume state
and private state so that the ThreadPlan does its thing.
Stepping still doesn't work as of this change, because there are
some issues with stack frames where it doesn't update the thread's
frame list correctly when it breaks inside of a function, but
I will try to fix that separately.
llvm-svn: 226221
Zachary Turner [Thu, 15 Jan 2015 22:53:44 +0000 (22:53 +0000)]
During source manager test, write back the file using binary mode.
On Windows, opening with "w" opens it as text instead of binary.
This causes translation of newline characters, so that "\n" turns
into "\r\n", which in turn leads to git detecting that the file
has changed and wanting to commit it.
llvm-svn: 226220
Filipe Cabecinhas [Thu, 15 Jan 2015 22:52:38 +0000 (22:52 +0000)]
Report fatal errors instead of segfaulting/asserting on a few invalid accesses while reading MachO files.
Summary:
Shift an older “invalid file” test to get a consistent naming for these tests.
Bugs found by afl-fuzz
Reviewers: rafael
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6945
llvm-svn: 226219
Greg Clayton [Thu, 15 Jan 2015 22:52:17 +0000 (22:52 +0000)]
Fixed the regex test case after recent modifications to the "help" command output.
<rdar://problem/
18527567>
llvm-svn: 226218
Lang Hames [Thu, 15 Jan 2015 22:33:30 +0000 (22:33 +0000)]
[Object] Add SF_Exported flag. This flag will be set on all symbols that would
be exported from a dylib if their containing object file were linked into one.
No test case: No command line tools query this flag, and there are no Object
unit tests.
llvm-svn: 226217
Sanjoy Das [Thu, 15 Jan 2015 22:18:10 +0000 (22:18 +0000)]
Revert r226201 (Add a new pass "inductive range check elimination")
The change used C++11 features not supported by MSVC 2012. I will fix
the change to use things supported MSVC 2012 and recommit shortly.
llvm-svn: 226216
David Majnemer [Thu, 15 Jan 2015 21:55:16 +0000 (21:55 +0000)]
InductiveRangeCheckElimination: Remove extra ';'
This silences a GCC warning.
llvm-svn: 226215
Andrew Kaylor [Thu, 15 Jan 2015 21:50:53 +0000 (21:50 +0000)]
Fixing pedantic build warnings.
llvm-svn: 226214
Rafael Espindola [Thu, 15 Jan 2015 21:36:08 +0000 (21:36 +0000)]
Use a trivial comdat for inline ctor/dtor when not using C5/D5.
When combined with llvm not producing implicit comdats, not doing this would
cause code bloat on ELF and link errors on COFF.
llvm-svn: 226211
Colin LeMahieu [Thu, 15 Jan 2015 21:35:49 +0000 (21:35 +0000)]
[Hexagon] Fix 226206 by uncommenting required pattern and changing patterns for simple load-extends.
llvm-svn: 226210
Hal Finkel [Thu, 15 Jan 2015 21:22:22 +0000 (21:22 +0000)]
[PowerPC] Add a target option for invariant function descriptors
The PPC backend will now assume that PPC64 ELFv1 function descriptors are
invariant. This must be true for well-defined C/C++ code, but I'm providing an
option to disable this assumption in case someone's JIT-engine needs it.
llvm-svn: 226209
Hans Wennborg [Thu, 15 Jan 2015 21:18:30 +0000 (21:18 +0000)]
Warn about dllexported explicit class template instantiation declarations (PR22035)
Clang would previously become confused and crash here.
It does not make a lot of sense to export these, so warning seems appropriate.
MSVC will export some member functions for this kind of specializations, whereas
MinGW ignores the dllexport-edness. The latter behaviour seems better.
Differential Revision: http://reviews.llvm.org/D6984
llvm-svn: 226208
Hal Finkel [Thu, 15 Jan 2015 21:17:34 +0000 (21:17 +0000)]
[PowerPC] Loosen ELFv1 PPC64 func descriptor loads for indirect calls
Function pointers under PPC64 ELFv1 (which is used on PPC64/Linux on the
POWER7, A2 and earlier cores) are really pointers to a function descriptor, a
structure with three pointers: the actual pointer to the code to which to jump,
the pointer to the TOC needed by the callee, and an environment pointer. We
used to chain these loads, and make them opaque to the rest of the optimizer,
so that they'd always occur directly before the call. This is not necessary,
and in fact, highly suboptimal on embedded cores. Once the function pointer is
known, the loads can be performed ahead of time; in fact, they can be hoisted
out of loops.
Now these function descriptors are almost always generated by the linker, and
thus the contents of the descriptors are invariant. As a result, by default,
we'll mark the associated loads as invariant (allowing them to be hoisted out
of loops). I've added a target feature to turn this off, however, just in case
someone needs that option (constructing an on-stack descriptor, casting it to a
function pointer, and then calling it cannot be well-defined C/C++ code, but I
can imagine some JIT-compilation system doing so).
Consider this simple test:
$ cat call.c
typedef void (*fp)();
void bar(fp x) {
for (int i = 0; i <
1600000000; ++i)
x();
}
$ cat main.c
typedef void (*fp)();
void bar(fp x);
void foo() {}
int main() {
bar(foo);
}
On the PPC A2 (the BG/Q supercomputer), marking the function-descriptor loads
as invariant brings the execution time down to ~8 seconds from ~32 seconds with
the loads in the loop.
The difference on the POWER7 is smaller. Compiling with:
gcc -std=c99 -O3 -mcpu=native call.c main.c : ~6 seconds [this is 4.8.2]
clang -O3 -mcpu=native call.c main.c : ~5.3 seconds
clang -O3 -mcpu=native call.c main.c -mno-invariant-function-descriptors : ~4 seconds
(looks like we'd benefit from additional loop unrolling here, as a first
guess, because this is faster with the extra loads)
The -mno-invariant-function-descriptors will be added to Clang shortly.
llvm-svn: 226207
Colin LeMahieu [Thu, 15 Jan 2015 21:07:52 +0000 (21:07 +0000)]
[Hexagon] Updating indexed load-extend patterns and changing test to new expected output.
llvm-svn: 226206
Rui Ueyama [Thu, 15 Jan 2015 21:05:00 +0000 (21:05 +0000)]
Add "explicit".
llvm-svn: 226205
Vince Harron [Thu, 15 Jan 2015 20:57:01 +0000 (20:57 +0000)]
UriParser - fixed potential buffer overrun
Switched from ::strtoul to StringConvert::ToUInt32
Changed port output parameter to be -1 if port is unspecified
llvm-svn: 226204
Hal Finkel [Thu, 15 Jan 2015 20:48:38 +0000 (20:48 +0000)]
[asan] Loosen test for upcoming ppc64 change
This test casts 0x4 to a function pointer and calls it. Unfortunately, the
faulting address may not exactly be 0x4 on PPC64 ELFv1 systems. The LLVM PPC
backend used to always generate the loads "in order", so we'd fault at 0x4
anyway. However, at upcoming change to loosen that ordering, and we'll pick a
different order on some targets. As a result, as explained in the comment, we
need to allow for certain nearby addresses as well.
llvm-svn: 226202
Sanjoy Das [Thu, 15 Jan 2015 20:45:46 +0000 (20:45 +0000)]
Add a new pass "inductive range check elimination"
IRCE eliminates range checks of the form
0 <= A * I + B < Length
by splitting a loop's iteration space into three segments in a way
that the check is completely redundant in the middle segment. As an
example, IRCE will convert
len = < known positive >
for (i = 0; i < n; i++) {
if (0 <= i && i < len) {
do_something();
} else {
throw_out_of_bounds();
}
}
to
len = < known positive >
limit = smin(n, len)
// no first segment
for (i = 0; i < limit; i++) {
if (0 <= i && i < len) { // this check is fully redundant
do_something();
} else {
throw_out_of_bounds();
}
}
for (i = limit; i < n; i++) {
if (0 <= i && i < len) {
do_something();
} else {
throw_out_of_bounds();
}
}
IRCE can deal with multiple range checks in the same loop (it takes
the intersection of the ranges that will make each of them redundant
individually).
Currently IRCE does not do any profitability analysis. That is a
TODO.
Please note that the status of this pass is *experimental*, and it is
not part of any default pass pipeline. Having said that, I will love
to get feedback and general input from people interested in trying
this out.
Differential Revision: http://reviews.llvm.org/D6693
llvm-svn: 226201
Hal Finkel [Thu, 15 Jan 2015 20:32:09 +0000 (20:32 +0000)]
Revert "r226086 - Revert "r226071 - [RegisterCoalescer] Remove copies to reserved registers""
Reapply r226071 with fixes. Two fixes:
1. We need to manually remove the old and create the new 'deaf defs'
associated with physical register definitions when we move the definition of
the physical register from the copy point to the point of the original vreg def.
This problem was picked up by the machinstr verifier, and could trigger a
verification failure on test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll, so I've
turned on the verifier in the tests.
2. When moving the def point of the phys reg up, we need to make sure that it
is neither defined nor read in between the two instructions. We don't, however,
extend the live ranges of phys reg defs to cover uses, so just checking for
live-range overlap between the pair interval and the phys reg aliases won't
pick up reads. As a result, we manually iterate over the range and check for
reads.
A test soon to be committed to the PowerPC backend will test this change.
Original commit message:
[RegisterCoalescer] Remove copies to reserved registers
This allows the RegisterCoalescer to join "non-flipped" range pairs with a
physical destination register -- which allows the RegisterCoalescer to remove
copies like this:
<vreg> = something (maybe a load, for example)
... (things that don't use PHYSREG)
PHYSREG = COPY <vreg>
(with all of the restrictions normally applied by the RegisterCoalescer: having
compatible register classes, etc. )
Previously, the RegisterCoalescer handled only the opposite case (copying
*from* a physical register). I don't handle the problem fully here, but try to
get the common case where there is only one use of <vreg> (the COPY).
An upcoming commit to the PowerPC backend will make this pattern much more
common on PPC64/ELF systems.
llvm-svn: 226200
Vince Harron [Thu, 15 Jan 2015 20:08:35 +0000 (20:08 +0000)]
Moved Args::StringToXIntYZ to StringConvert::ToXIntYZ
The refactor was motivated by some comments that Greg made
http://reviews.llvm.org/D6918
and also to break a dependency cascade that caused functions linking
in string->int conversion functions to pull in most of lldb
llvm-svn: 226199
Philip Reames [Thu, 15 Jan 2015 19:49:25 +0000 (19:49 +0000)]
Style cleanup of old gc.root lowering code
Use static functions for helpers rather than static member functions. a) this changes the linking (minor at best), and b) this makes it obvious no object state is involved.
llvm-svn: 226198
Matt Arsenault [Thu, 15 Jan 2015 19:39:42 +0000 (19:39 +0000)]
R600/SI: Improve fpext / fptrunc test coverage
llvm-svn: 226197
Philip Reames [Thu, 15 Jan 2015 19:39:17 +0000 (19:39 +0000)]
clang-format GCStrategy.cpp & GCRootLowering.cpp (NFC)
llvm-svn: 226196
Philip Reames [Thu, 15 Jan 2015 19:29:42 +0000 (19:29 +0000)]
Split GCStrategy.cpp into two files (NFC)
This preparation for an update to http://reviews.llvm.org/D6811. GCStrategy.cpp will hopefully be moving into IR/, where as the lowering logic needs to stay in CodeGen/
llvm-svn: 226195
Colin LeMahieu [Thu, 15 Jan 2015 19:28:32 +0000 (19:28 +0000)]
[Hexagon] Removing old versions of vsplice, valign, cl0, ct0 and updating references to new versions.
llvm-svn: 226194
Dan Albert [Thu, 15 Jan 2015 18:56:45 +0000 (18:56 +0000)]
Use set() instead of option() for string option.
Fixes issue in r226185.
llvm-svn: 226192
Marek Olsak [Thu, 15 Jan 2015 18:43:06 +0000 (18:43 +0000)]
R600/SI: Unify VOP2 instructions which are VOP3-only on VI
This removes some duplicated classes and definitions.
These instructions are defined:
_e32 // pseudo
_e32_si
_e64 // pseudo
_e64_si
_e64_vi
llvm-svn: 226191
Marek Olsak [Thu, 15 Jan 2015 18:43:01 +0000 (18:43 +0000)]
R600/SI: Use 64-bit encoding by default for opcodes that are VOP3-only on VI
llvm-svn: 226190
Marek Olsak [Thu, 15 Jan 2015 18:42:55 +0000 (18:42 +0000)]
R600/SI: Add V_READLANE_B32 and V_WRITELANE_B32 for VI
These are VOP3-only on VI.
The new multiclass doesn't define VOP3 versions of VOP2 instructions.
llvm-svn: 226189
Marek Olsak [Thu, 15 Jan 2015 18:42:51 +0000 (18:42 +0000)]
R600/SI: Don't shrink instructions whose e32 encoding doesn't exist
v2: modify hasVALU32BitEncoding instead
v3: - add pseudoToMCOpcode helper to AMDGPUInstInfo, which is used by both
hasVALU32BitEncoding and AMDGPUMCInstLower::lower
- report an error if a pseudo can't be lowered
llvm-svn: 226188
Marek Olsak [Thu, 15 Jan 2015 18:42:44 +0000 (18:42 +0000)]
R600/SI: Add common class VOPAnyCommon
llvm-svn: 226187
Marek Olsak [Thu, 15 Jan 2015 18:42:40 +0000 (18:42 +0000)]
R600/SI: Don't select SI-only VOP3 opcodes on VI
llvm-svn: 226186
Dan Albert [Thu, 15 Jan 2015 18:35:04 +0000 (18:35 +0000)]
Add a cmake option for LIT configuration variant.
llvm-svn: 226185
Colin LeMahieu [Thu, 15 Jan 2015 18:16:00 +0000 (18:16 +0000)]
[Hexagon] Adding vmux instruction. Removing old transfer instructions and updating references.
llvm-svn: 226184
Ramkumar Ramachandra [Thu, 15 Jan 2015 18:10:44 +0000 (18:10 +0000)]
statepoint tests: use statepoint-example gc
Mechanical conversion of statepoint tests to use the example-statepoint
gc.
llvm-svn: 226183
Joerg Sonnenberger [Thu, 15 Jan 2015 17:59:02 +0000 (17:59 +0000)]
Support @PLT loads on 32bit x86.
llvm-svn: 226182
Nico Weber [Thu, 15 Jan 2015 17:55:24 +0000 (17:55 +0000)]
Fix a -Wnull-conversion warning.
llvm-svn: 226181
Nico Weber [Thu, 15 Jan 2015 17:51:05 +0000 (17:51 +0000)]
Fix build after clang r226128.
llvm-svn: 226180
Colin LeMahieu [Thu, 15 Jan 2015 17:28:14 +0000 (17:28 +0000)]
[Hexagon] Deleting old float comparison instruction and updating references to new ones.
llvm-svn: 226179
Nathan Sidwell [Thu, 15 Jan 2015 16:45:53 +0000 (16:45 +0000)]
PR 20146
reject CV void return type on C definitions per 6.9.1/3
llvm-svn: 226178
Evgeniy Stepanov [Thu, 15 Jan 2015 16:31:22 +0000 (16:31 +0000)]
[sanitizer] Restore -fno-lto accidentally removed in r226169.
llvm-svn: 226177
Colin LeMahieu [Thu, 15 Jan 2015 16:30:07 +0000 (16:30 +0000)]
[Hexagon] Replacing old fadd/fsub instructions and updating references.
llvm-svn: 226176
Evgeniy Stepanov [Thu, 15 Jan 2015 16:26:59 +0000 (16:26 +0000)]
[sanitizer] Implement include= option.
Allows loading sanitizer options from file.
llvm-svn: 226175
Jonathan Roelofs [Thu, 15 Jan 2015 16:18:13 +0000 (16:18 +0000)]
Refactor configure_link_flags for modularity. NFC
llvm-svn: 226174
Timur Iskhodzhanov [Thu, 15 Jan 2015 16:14:34 +0000 (16:14 +0000)]
Revert Don't create new comdats in CodeGen
It breaks AddressSanitizer on Windows.
llvm-svn: 226173
Alexander Kornienko [Thu, 15 Jan 2015 15:46:58 +0000 (15:46 +0000)]
clang-tidy: 'size' call that could be replaced with 'empty' on STL containers
We are porting some of the checkers at a company we developed to the Clang Tidy
infrastructure. We would like to open source the checkers that may be useful
for the community as well. This patch is the first checker that is being ported
to Clang Tidy. We also added fix-it hints, and applied them to LLVM:
http://reviews.llvm.org/D6924
The code compiled and the unit tests are passed after the fixits was applied.
The documentation of the checker:
/// The emptiness of a container should be checked using the empty method
/// instead of the size method. It is not guaranteed that size is a
/// constant-time function, and it is generally more efficient and also shows
/// clearer intent to use empty. Furthermore some containers may implement the
/// empty method but not implement the size method. Using empty whenever
/// possible makes it easier to switch to another container in the future.
It also uses some custom ASTMatchers. In case you find them useful I can submit
them as separate patches to clang. I will apply your suggestions to this patch.
http://reviews.llvm.org/D6925
Patch by Gábor Horváth!
llvm-svn: 226172
Daniel Sanders [Thu, 15 Jan 2015 15:41:03 +0000 (15:41 +0000)]
[mips] Fix a typo in the compare patterns for MIPS32r6/MIPS64r6.
Summary: The patterns intended for the SETLE node were actually matching the SETLT node.
Reviewers: atanasyan, sstankovic, vmedic
Reviewed By: vmedic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D6997
llvm-svn: 226171
Vasileios Kalintiris [Thu, 15 Jan 2015 15:36:04 +0000 (15:36 +0000)]
Fix the C-API MCJIT test for 32-bit big endian machines.
Avoid using unions for storing the return value from
LLVMGetGlobalValueAddress() and LLVMGetFunctionAddress() and accessing it as
a pointer through another pointer member. This causes problems on 32-bit big
endian machines since the pointer gets the higher part of the return value of
the aforementioned functions.
llvm-svn: 226170
Evgeniy Stepanov [Thu, 15 Jan 2015 15:13:43 +0000 (15:13 +0000)]
[sanitizer] Flag parser rewrite.
The new parser is a lot stricter about syntax, reports unrecognized
flags, and will make it easier to implemented some of the planned features.
llvm-svn: 226169
Evgeniy Stepanov [Thu, 15 Jan 2015 15:00:49 +0000 (15:00 +0000)]
[lsan] Fix a typo in a test.
llvm-svn: 226168
Evgeniy Stepanov [Thu, 15 Jan 2015 14:27:38 +0000 (14:27 +0000)]
Fix compilation of compiler_rt against libunwind.
libunwind defines _Unwind_GetLanguageSpecificData as returning long
instead of (uint8_t *).
llvm-svn: 226167