Sameer Sahasrabuddhe [Thu, 4 Dec 2014 05:30:58 +0000 (05:30 +0000)]
Always emit kernel arg info for SPIR.
http://llvm.org/bugs/show_bug.cgi?id=21555
Currently, kernel argument metadata is omitted unless the
"-cl-kernel-arg-info" option is specified. But the SPIR 1.2 spec
requires that all metadata except kernel_arg_name should always be
emitted, and kernel_arg_name is only emitted when
"-cl-kernel-arg-info" is specified.
Patch ported by Ryan Burn from the Khronos SPIR generator.
https://github.com/KhronosGroup/SPIR
llvm-svn: 223340
Michael Liao [Thu, 4 Dec 2014 05:20:33 +0000 (05:20 +0000)]
[X86] Clean up whitespace as well as minor coding style
llvm-svn: 223339
Saleem Abdulrasool [Thu, 4 Dec 2014 04:52:37 +0000 (04:52 +0000)]
CodeGen: refactor ARM builtin handling
Create a helper function to construct a value for the ARM hint intrinsic
rather than inling the construction. In order to avoid the use of the sentinel
value, inline the use of intrinsic instruction retrieval. NFC.
llvm-svn: 223338
Rafael Espindola [Thu, 4 Dec 2014 04:33:32 +0000 (04:33 +0000)]
Revert "Add missing test dependency and use a more canonical target name."
This reverts commit r223336.
NAKAMURA Takumi did the same thing in r223332!
Sorry about the noise.
llvm-svn: 223337
Rafael Espindola [Thu, 4 Dec 2014 04:30:56 +0000 (04:30 +0000)]
Add missing test dependency and use a more canonical target name.
llvm-svn: 223336
Colin LeMahieu [Thu, 4 Dec 2014 04:28:38 +0000 (04:28 +0000)]
[Hexagon] Adding lit exception if Hexagon isn't built.
llvm-svn: 223335
Colin LeMahieu [Thu, 4 Dec 2014 03:41:21 +0000 (03:41 +0000)]
[Hexagon] Marking some instructions as CodeGenOnly=0 and adding disassembly tests.
llvm-svn: 223334
Hans Wennborg [Thu, 4 Dec 2014 01:59:58 +0000 (01:59 +0000)]
CMake: try to actually fix the regexes for setting HOST_LINK_VERSION this time (PR21268)
The regex should not accept an empty version number.
The previous attempt at r223106 failed, and the build was still erroring:
CMake Error at tools/clang/CMakeLists.txt:269 (string):
string sub-command REGEX, mode REPLACE regex "[^0-9]*([0-9.]*).*" matched
an empty string.
llvm-svn: 223333
NAKAMURA Takumi [Thu, 4 Dec 2014 01:34:11 +0000 (01:34 +0000)]
Introduce "llvm-ranlib" as a name of targets since Object/archive-symtab.test requires llvm-ranlib.
llvm-svn: 223332
NAKAMURA Takumi [Thu, 4 Dec 2014 01:27:53 +0000 (01:27 +0000)]
Sort by alphabetical order.
llvm-svn: 223331
Rui Ueyama [Thu, 4 Dec 2014 01:09:06 +0000 (01:09 +0000)]
Rewrite InputGraph's Group
The aim of this patch is to reduce the excessive abstraction from
the InputGraph. We found that even a simple thing, such as sorting
input files (Mach-O) or adding a new file to the input file list
(PE/COFF), is nearly impossible with the InputGraph abstraction,
because it hides too much information behind it. As a result,
we invented complex interactions between components (e.g.
notifyProgress() mechanism) and tricky code to work around that
limitation. There were many occasions that we needed to write
awkward code.
This patch is a first step to make it cleaner. As a first step,
this removes Group class from the InputGraph. The grouping feature
is now directly handled by the Resolver. notifyProgress is removed
since we no longer need that. I could have cleaned it up even more,
but in order to keep the patch minimum, I focused on Group.
SimpleFileNode class, a container of File objects, is now limited
to have only one File. We shold have done this earlier.
We used to allow putting multiple File objects to FileNode.
Although SimpleFileNode usually has only one file, the Driver class
actually used that capability. I modified the Driver class a bit,
so that one FileNode is created for each input File.
We should now probably remove SimpleFileNode and directly store
File objects to the InputGraph in some way, because a container
that can contain only one object is useless. This is a TODO.
Mach-O input files are now sorted before they are passe to the
Resolver. DarwinInputGraph class is no longer needed, so removed.
PECOFF still has hacky code to add a new file to the input file list.
This will be cleaned up in another patch.
llvm-svn: 223330
Michael Liao [Thu, 4 Dec 2014 00:56:38 +0000 (00:56 +0000)]
[X86] Restore X86 base pointer after call to llvm.eh.sjlj.setjmp
Commit on
- This patch fixes the bug described in
http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-May/062343.html
The fix allocates an extra slot just below the GPRs and stores the base pointer
there. This is done only for functions containing llvm.eh.sjlj.setjmp that also
need a base pointer. Because code containing llvm.eh.sjlj.setjmp saves all of
the callee-save GPRs in the prologue, the offset to the extra slot can be
computed before prologue generation runs.
Impact at run-time on affected functions is::
- One extra store in the prologue, The store saves the base pointer.
- One extra load after a llvm.eh.sjlj.setjmp. The load restores the base pointer.
Because the extra slot is just above a gap between frame-pointer-relative and
base-pointer-relative chunks of memory, there is no impact on other offset
calculations other than ensuring there is room for the extra slot.
http://reviews.llvm.org/D6388
Patch by Arch Robison <arch.robison@intel.com>
llvm-svn: 223329
Hal Finkel [Thu, 4 Dec 2014 00:46:20 +0000 (00:46 +0000)]
[PowerPC] 'cc' should be an alias only to 'cr0'
We had mistakenly believed that GCC's 'cc' referred to the entire
condition-code register (cr0 through cr7) -- and implemented this in r205630 to
fix PR19326, but 'cc' is actually an alias only to 'cr0'. This is causing LLVM
to clobber too much with legacy code with inline asm using the 'cc' clobber.
Fixes PR21451.
llvm-svn: 223328
Philip Reames [Thu, 4 Dec 2014 00:45:23 +0000 (00:45 +0000)]
Minor typo and link fixes for Statepoint documentation
llvm-svn: 223327
Rui Ueyama [Thu, 4 Dec 2014 00:31:34 +0000 (00:31 +0000)]
[PECOFF] Improve compatibility of /export option.
llvm-svn: 223326
NAKAMURA Takumi [Thu, 4 Dec 2014 00:26:39 +0000 (00:26 +0000)]
HexagonMCInst.h: Qualify constants explicitly to appease msc17.
llvm-svn: 223325
Rafael Espindola [Thu, 4 Dec 2014 00:23:58 +0000 (00:23 +0000)]
For copy, cmake needs the full path to llvm-ar.
This should fix the windows build.
llvm-svn: 223324
Matt Arsenault [Thu, 4 Dec 2014 00:06:57 +0000 (00:06 +0000)]
Allow target to specify prefix for labels
Use the MCAsmInfo instead of the DataLayout, and allow
specifying a custom prefix for labels specifically. HSAIL
requires that labels begin with @, but global symbols with &.
llvm-svn: 223323
Philip Reames [Thu, 4 Dec 2014 00:01:48 +0000 (00:01 +0000)]
A few more checks for gc.statepoints in the Verifier
This is simply a grab bag of unrelated checks:
- A statepoint call can't be marked readonly or readnone
- We don't currently support inline asm or varadic target functions. Both could be supported, but don't currently work.
- I forgot to check that the number of call arguments actually matched the wrapped callee in my previous change. Included here.
llvm-svn: 223322
Rafael Espindola [Thu, 4 Dec 2014 00:00:36 +0000 (00:00 +0000)]
Add missing dependency on llvm-ar. Should hopefully fix the bots.
llvm-svn: 223321
Reid Kleckner [Wed, 3 Dec 2014 23:52:26 +0000 (23:52 +0000)]
Add test for __umulh
llvm-svn: 223319
Hal Finkel [Wed, 3 Dec 2014 23:40:13 +0000 (23:40 +0000)]
[PowerPC] Fix inline asm memory operands not to use r0
On PowerPC, inline asm memory operands might be expanded as 0($r), where $r is
a register containing the address. As a result, this register cannot be r0, and
we need to enforce this register subclass constraint to prevent miscompiling
the code (we'd get this constraint for free with the usual instruction
definitions, but that scheme has no knowledge of how we end up printing inline
asm memory operands, and so here we need to do it 'by hand'). We can accomplish
this within the current address-mode selection framework by introducing an
explicit COPY_TO_REGCLASS node.
Fixes PR21443.
llvm-svn: 223318
Quentin Colombet [Wed, 3 Dec 2014 23:38:08 +0000 (23:38 +0000)]
[RegAllocFast] Handle implicit definitions conservatively.
Prior to this commit, physical registers defined implicitly were considered free
right after their definition, i.e.. like dead definitions. Therefore, their uses
had to immediately follow their definitions, otherwise the related register may
be reused to allocate a virtual register.
This commit fixes this assumption by keeping implicit definitions alive until
they are actually used. The downside is that if the implicit definition was dead
(and not marked at such), we block an otherwise available register. This is
however conservatively correct and makes the fast register allocator much more
robust in particular regarding the scheduling of the instructions.
Fixes PR21700.
llvm-svn: 223317
Reid Kleckner [Wed, 3 Dec 2014 23:36:14 +0000 (23:36 +0000)]
Implement __umulh with __int128 arithmetic
Use the same approach as _umul128, but just return the high half.
llvm-svn: 223316
Rafael Espindola [Wed, 3 Dec 2014 23:29:34 +0000 (23:29 +0000)]
This reverts commit r223306 and r223277.
The code is using uninitialized memory and failing on linux.
llvm-svn: 223315
Kostya Serebryany [Wed, 3 Dec 2014 23:29:14 +0000 (23:29 +0000)]
[msan] allow -fsanitize-coverage=N together with -fsanitize=memory, compiler-rt part
llvm-svn: 223314
Kostya Serebryany [Wed, 3 Dec 2014 23:28:26 +0000 (23:28 +0000)]
[msan] allow -fsanitize-coverage=N together with -fsanitize=memory, llvm part
llvm-svn: 223312
Kostya Serebryany [Wed, 3 Dec 2014 23:27:45 +0000 (23:27 +0000)]
[msan] allow -fsanitize-coverage=N together with -fsanitize=memory, clang part
llvm-svn: 223311
Jacques Pienaar [Wed, 3 Dec 2014 23:21:02 +0000 (23:21 +0000)]
Test commit.
llvm-svn: 223310
Rafael Espindola [Wed, 3 Dec 2014 23:17:24 +0000 (23:17 +0000)]
Make llvm-ar a real build target and install it.
llvm-svn: 223309
Zachary Turner [Wed, 3 Dec 2014 23:15:14 +0000 (23:15 +0000)]
Improve the comments on PutSTDIN, GetSTDOUT, and GetSTDERR.
Differential Revision: http://reviews.llvm.org/D6513
llvm-svn: 223308
Chris Matthews [Wed, 3 Dec 2014 23:01:35 +0000 (23:01 +0000)]
Add a test-case for lit xunit output
llvm-svn: 223307
Kevin Enderby [Wed, 3 Dec 2014 23:00:16 +0000 (23:00 +0000)]
Move tests for llvm-objdump for universal files to X86 directory to fix build bots.
llvm-svn: 223306
Chris Matthews [Wed, 3 Dec 2014 22:59:15 +0000 (22:59 +0000)]
Don't allow test-suite names with . in them in xml output
llvm-svn: 223305
Rafael Espindola [Wed, 3 Dec 2014 22:36:37 +0000 (22:36 +0000)]
Split the set of identified struct types into opaque and non-opaque ones.
The non-opaque part can be structurally uniqued. To keep this to just
a hash lookup, we don't try to unique cyclic types.
Also change the type mapping algorithm to be optimistic about a type
not being recursive and only create a new type when proven to be wrong.
This is not as strong as trying to speculate that we can keep the source
type, but is simpler (no speculation to revert) and more powerfull
than what we had before (we don't copy non-recursive types at least).
I initially wrote this to try to replace the name based type merging.
It is not strong enough to replace it, but is is a useful addition.
With this patch the number of named struct types is a clang lto bootstrap goes
from 49674 to 15986.
llvm-svn: 223278
Kevin Enderby [Wed, 3 Dec 2014 22:29:40 +0000 (22:29 +0000)]
Add support to llvm-objdump for Mach-O universal files and archives with -macho.
llvm-svn: 223277
Sanjay Patel [Wed, 3 Dec 2014 22:28:05 +0000 (22:28 +0000)]
fix typos, grammar, formatting; NFC
llvm-svn: 223276
Philip Reames [Wed, 3 Dec 2014 22:23:24 +0000 (22:23 +0000)]
Strength Verifier checks around the types involved in a statepoint
Add checks that the types in a gc.statepoint sequence match the wrapper callee and that relocating a pointer doesn't change it's type.
llvm-svn: 223275
Matthias Braun [Wed, 3 Dec 2014 22:10:39 +0000 (22:10 +0000)]
correct spelling, NFC
llvm-svn: 223274
Zachary Turner [Wed, 3 Dec 2014 22:04:31 +0000 (22:04 +0000)]
Manually call ModulesDidLoad when the executable is loaded.
This is a temporary workaround to get deferred breakpoint
resolution working until Bug 21720 is addressed. Even with this
workaround, it will only resolve deferred breakpoints in the
executable module, and not in a shared library.
llvm-svn: 223273
Zachary Turner [Wed, 3 Dec 2014 22:04:18 +0000 (22:04 +0000)]
Correctly shutdown when DoDestroy is called with an active exception.
Previously if we got a DoDestroy while stopped at a breakpoint, we
would detach and then say the process had exited. This is completely
wrong, as it resulted in the python script incorrectly assuming that
the process had actually exited and trying to delete the image, when
in fact it had done no such thing.
The fix employed here is that when we get a DoDestroy, we do 3 steps:
1) initiate a termination sequence on the process
2) If we were stopped handling an exception of any kind, mask it and
let the program resume, causing the program to see the termination
request and exit on its own.
3) Let the program exit normally, and close all of our handles before
returning control back to DoDestroy.
This fixes Bug 21722 and Bug 21723.
llvm-svn: 223272
Reid Kleckner [Wed, 3 Dec 2014 21:53:36 +0000 (21:53 +0000)]
CUDA host device code with two code paths
Summary:
Allow CUDA host device functions with two code paths using __CUDA_ARCH__
to differentiate between code path being compiled.
For example:
__host__ __device__ void host_device_function(void) {
#ifdef __CUDA_ARCH__
device_only_function();
#else
host_only_function();
#endif
}
Patch by Jacques Pienaar.
Reviewed By: rnk
Differential Revision: http://reviews.llvm.org/D6457
llvm-svn: 223271
Matthias Braun [Wed, 3 Dec 2014 21:46:33 +0000 (21:46 +0000)]
[SimplifyLibCalls] Improve double->float shrinking to consider constants
This allows cases like float x; fmin(1.0, x); to be optimized to fminf(1.0f, x);
rdar://
19049359
Differential Revision: http://reviews.llvm.org/D6496
llvm-svn: 223270
Matthias Braun [Wed, 3 Dec 2014 21:46:29 +0000 (21:46 +0000)]
[SimplifyLibCalls] Enable double to float shrinking for copysign
rdar://
19049359
Differential Revision: http://reviews.llvm.org/D6495
llvm-svn: 223269
Colin LeMahieu [Wed, 3 Dec 2014 21:40:25 +0000 (21:40 +0000)]
[Hexagon] Converting member InstrDesc to static variable.
llvm-svn: 223268
Reid Kleckner [Wed, 3 Dec 2014 21:00:21 +0000 (21:00 +0000)]
Cast vtable address points to i32 (...)** to enable more globalopt
We currently use i32 (...)** as the type of the vptr field in the LLVM
struct type. LLVM's GlobalOpt prefers any bitcasts to be on the side of
the data being stored rather than on the pointer being stored to.
Reviewers: majnemer
Differential Revision: http://reviews.llvm.org/D5916
llvm-svn: 223267
Richard Smith [Wed, 3 Dec 2014 21:00:20 +0000 (21:00 +0000)]
Teach EvaluatedExprVisitor that the condition and unselected branches of a
_Generic expression are unevaluated.
llvm-svn: 223266
Nico Weber [Wed, 3 Dec 2014 20:58:23 +0000 (20:58 +0000)]
Fix grammar-o.
llvm-svn: 223265
Colin LeMahieu [Wed, 3 Dec 2014 20:23:22 +0000 (20:23 +0000)]
[Hexagon] Converting subclass members to an implicit operand.
llvm-svn: 223264
David Blaikie [Wed, 3 Dec 2014 19:58:49 +0000 (19:58 +0000)]
range-for some things
llvm-svn: 223263
David Blaikie [Wed, 3 Dec 2014 19:58:48 +0000 (19:58 +0000)]
Simplify CodeGenRegBank::inferMatchingSuperRegClass & its caller by passing an iterator rather than index
llvm-svn: 223262
David Blaikie [Wed, 3 Dec 2014 19:58:45 +0000 (19:58 +0000)]
Simplify ownership of RegClasses by using list<CodeGenRegisterClass> instead of vector<CodeGenRegisterClass*>
This complicates a few algorithms due to not having random access, but
not by a huge degree I don't think (open to debate/design
discussion/etc).
llvm-svn: 223261
David Blaikie [Wed, 3 Dec 2014 19:58:41 +0000 (19:58 +0000)]
Range-for some stuff related to RegClasses, and comment cases where range-for isn't suitable.
llvm-svn: 223260
Philip Reames [Wed, 3 Dec 2014 19:53:15 +0000 (19:53 +0000)]
Make the Verifier more strict about gc.statepoints
The recently added documentation for statepoints claimed that we checked the parameters of the various intrinsics for validity. This patch adds the code to actually do so. I also removed a couple of redundant checks for conditions which are checked elsewhere in the Verifier and simplified the logic using the helper functions from Statepoint.h.
llvm-svn: 223259
Hans Wennborg [Wed, 3 Dec 2014 19:05:42 +0000 (19:05 +0000)]
ASan CMakeLists.txt: fix bad indent; NFC
llvm-svn: 223258
Will Schmidt [Wed, 3 Dec 2014 18:46:30 +0000 (18:46 +0000)]
Add TableGen info for Power8.
This is based on the Power7 version, with units added and renamed to match P8.
Differential Revision: http://reviews.llvm.org/D6358
llvm-svn: 223257
Roman Divacky [Wed, 3 Dec 2014 18:39:44 +0000 (18:39 +0000)]
Change the name to be in style.
llvm-svn: 223255
Matt Arsenault [Wed, 3 Dec 2014 18:35:11 +0000 (18:35 +0000)]
Fix sphinx error from Statepoints.rst
It was complaining it wasn't included in any toctree
llvm-svn: 223254
Tom Stellard [Wed, 3 Dec 2014 18:27:08 +0000 (18:27 +0000)]
R600/SI: Move SIInsertWaits into AMDGPUPassConfig::addPreSched2()
This pass needs to be run after PrologEpilogInserter, because
that pass may inserter spill code which reads or writes memory.
llvm-svn: 223253
Tom Stellard [Wed, 3 Dec 2014 18:27:05 +0000 (18:27 +0000)]
R600/SI: Don't run SI passes on R600 subtargets
llvm-svn: 223252
Oleksiy Vyalov [Wed, 3 Dec 2014 18:19:16 +0000 (18:19 +0000)]
Use timeout when reading debugserver's port from a named pipe.
http://reviews.llvm.org/D6490
llvm-svn: 223251
Alexander Kornienko [Wed, 3 Dec 2014 17:53:03 +0000 (17:53 +0000)]
Make ArgumentsAdjuster an std::function (clang-tools-extra part of D6505).
Reviewers: klimek
Reviewed By: klimek
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D6506
llvm-svn: 223249
Alexander Kornienko [Wed, 3 Dec 2014 17:53:02 +0000 (17:53 +0000)]
Make ArgumentsAdjuster an std::function.
Reviewers: klimek
Reviewed By: klimek
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D6505
llvm-svn: 223248
Tim Northover [Wed, 3 Dec 2014 17:49:26 +0000 (17:49 +0000)]
AArch64: fix wrong-endian parameter passing.
The blocked arguments code didn't take account of the hacks needed to support
it.
llvm-svn: 223247
Colin LeMahieu [Wed, 3 Dec 2014 17:36:39 +0000 (17:36 +0000)]
[NFC] Fixing pendantic warning extra semicolons.
llvm-svn: 223246
Colin LeMahieu [Wed, 3 Dec 2014 17:35:39 +0000 (17:35 +0000)]
[Hexagon] [NFC] Moving function implementations out of header. Clang-formatting files.
llvm-svn: 223245
Nick Lewycky [Wed, 3 Dec 2014 17:32:44 +0000 (17:32 +0000)]
Fix test to use the right metadata node (reapply r223239 plus a fix) and also to use the correct path to the GCNO file.
llvm-svn: 223244
Colin LeMahieu [Wed, 3 Dec 2014 17:31:43 +0000 (17:31 +0000)]
[Hexagon] [NFC] Renaming *packetStart to *packetBegin
llvm-svn: 223243
Jonathan Roelofs [Wed, 3 Dec 2014 17:04:52 +0000 (17:04 +0000)]
Fix isThreadModelSupported()'s comment. NFC
llvm-svn: 223241
Alexander Potapenko [Wed, 3 Dec 2014 16:03:08 +0000 (16:03 +0000)]
Revert r223239, which broke some bots.
llvm-svn: 223240
Alexander Potapenko [Wed, 3 Dec 2014 15:15:58 +0000 (15:15 +0000)]
Fix the metadata number used by llvm.gcov to match the number of the inserted metadata node.
llvm-svn: 223239
Aaron Ballman [Wed, 3 Dec 2014 14:44:16 +0000 (14:44 +0000)]
Silencing several "multiple copy constructors" warnings from MSVC; NFC.
llvm-svn: 223238
Aaron Ballman [Wed, 3 Dec 2014 14:39:58 +0000 (14:39 +0000)]
Silencing a 32-bit implicit conversion warning in MSVC; NFC.
llvm-svn: 223237
Evgeniy Stepanov [Wed, 3 Dec 2014 14:15:53 +0000 (14:15 +0000)]
msan] Add compile-time checks for missing origins.
This change makes MemorySanitizer instrumentation a bit more strict
about instructions that have no origin id assigned to them.
This would have caught the bug that was fixed in r222918.
This is re-commit of r222997, reverted in r223211, with 3 more
missing origins added.
llvm-svn: 223236
Alexander Kornienko [Wed, 3 Dec 2014 14:03:03 +0000 (14:03 +0000)]
[clang-tidy] Update help messages and docs.
Fixed incorrect examples of configuration, clarified the usage of -dump-config.
llvm-svn: 223235
Daniel Jasper [Wed, 3 Dec 2014 14:02:59 +0000 (14:02 +0000)]
clang-format: Fix fake parentheses placement with comments.
Before:
return (a > b
// comment1
// comment2
|| c);
After:
return (a > b
// comment1
// comment2
|| c);
llvm-svn: 223234
Evgeniy Stepanov [Wed, 3 Dec 2014 13:58:40 +0000 (13:58 +0000)]
[msan] Change the way origin ids are built.
Previously, all origin ids were "chained" origins, i.e values of
ChainedOriginDepot. This added a level of indirection for simple
stack and heap allocation, which were represented as chains of
length 1. This costs both RAM and CPU, but provides a joined 2**29
origin id space. It also made function (any instrumented function)
entry non-async-signal-safe, but that does not really matter because
memory stores in track-origins=2 mode are not async-signal-safe anyway.
With this change, the type of the origin is encoded in origin id.
See comment in msan_origin.h for more details. This reduces chained and stack
origin id range to 2**28 each, but leaves extra 2**31 for heap origins.
This change should not have any user-visible effects.
llvm-svn: 223233
Alexander Kornienko [Wed, 3 Dec 2014 13:48:46 +0000 (13:48 +0000)]
[clang-tidy] Make a test independent of the default check set.
llvm-svn: 223232
Evgeniy Stepanov [Wed, 3 Dec 2014 13:35:41 +0000 (13:35 +0000)]
[asan] Fix stale_stack_leak.cc test in ASan-UAR mode.
This test does an intentional use-after-return, but this is not the focus of
the test, so ignore it.
llvm-svn: 223230
Evgeniy Stepanov [Wed, 3 Dec 2014 13:26:56 +0000 (13:26 +0000)]
[msan] Add one more test for the handling of stack origins.
llvm-svn: 223229
Daniel Jasper [Wed, 3 Dec 2014 13:20:49 +0000 (13:20 +0000)]
clang-format: Fix expression parser not closing stuff at end of stmt.
Uncovered by a Java test case:
Before:
public some.package.Type someFunction( // comment
int parameter) {}
After:
public some.package.Type someFunction( // comment
int parameter) {}
llvm-svn: 223228
Hafiz Abid Qadeer [Wed, 3 Dec 2014 12:48:19 +0000 (12:48 +0000)]
Remove unnecessary changes committed in r223222.
There were 2 different patches in discussion. One using ioctl
and other using select. We decided to use the ioctl but committed
code also have some changes which were only needed for 'select'.
This patch removes them.
llvm-svn: 223227
Evgeniy Stepanov [Wed, 3 Dec 2014 12:11:33 +0000 (12:11 +0000)]
[msan] Re-enable one test.
It has been fixed a long time ago.
llvm-svn: 223226
Alexey Bataev [Wed, 3 Dec 2014 12:11:24 +0000 (12:11 +0000)]
[OPENMP] Code formatting and improvement, no functional changes.
llvm-svn: 223225
Erik Eckstein [Wed, 3 Dec 2014 10:39:15 +0000 (10:39 +0000)]
InstCombine: simplify signed range checks
Try to convert two compares of a signed range check into a single unsigned compare.
Examples:
(icmp sge x, 0) & (icmp slt x, n) --> icmp ult x, n
(icmp slt x, 0) | (icmp sgt x, n) --> icmp ugt x, n
llvm-svn: 223224
Hafiz Abid Qadeer [Wed, 3 Dec 2014 10:23:06 +0000 (10:23 +0000)]
Fix a hang on OSX while executing -exec-run.
Now we wait for input to become available before blocking in fgets.
More details on problem can be found in
http://lists.cs.uiuc.edu/pipermail/lldb-commits/Week-of-Mon-
20141201/014290.html
Patch from dawn@burble.org.
llvm-svn: 223222
Hal Finkel [Wed, 3 Dec 2014 09:37:50 +0000 (09:37 +0000)]
[PowerPC] Print all inline-asm consts as signed numbers
Almost all immediates in PowerPC assembly (both 32-bit and 64-bit) are signed
numbers, and it is important that we print them as such. To make sure that
happens, we change PPCTargetLowering::LowerAsmOperandForConstraint so that it
does all intermediate checks on a signed-extended int64_t value, and then
creates the resulting target constant using MVT::i64. This will ensure that all
negative values are printed as negative values (mirroring what is done in other
backends to achieve the same sign-extension effect).
This came up in the context of inline assembly like this:
"add%I2 %0,%0,%2", ..., "Ir"(-1ll)
where we used to print:
addi 3,3,
4294967295
and gcc would print:
addi 3,3,-1
and gas accepts both forms, but our builtin assembler (correctly) does not. Now
we print -1 like gcc does.
While here, I replaced a bunch of custom integer checks with isInt<16> and
friends from MathExtras.h.
Thanks to Paul Hargrove for the bug report.
llvm-svn: 223220
Hal Finkel [Wed, 3 Dec 2014 08:19:17 +0000 (08:19 +0000)]
Preserve LD_LIBRARY_PATH when using the 'env' command
In many Linux environments (and similar), just-built applications won't run
correctly without making use of the current LD_LIBRARY_PATH environmental
variable in order to find dynamic libraries. Propagate it through the 'env'
command (hopefully this works on all platforms).
llvm-svn: 223219
Charlie Turner [Wed, 3 Dec 2014 08:12:26 +0000 (08:12 +0000)]
Emit ABI_FP_rounding attribute.
LLVM understands a -enable-sign-dependent-rounding-fp-math codegen option. When
the user has specified this option, the Tag_ABI_FP_rounding attribute should be
emitted with value 1. This option currently does not appear to disable
transformations and optimizations that assume default floating point rounding
behavior, AFAICT, but the intention should be recorded in the build attributes,
regardless of what the compiler actually does with the intention.
Change-Id: If838578df3dc652b6f2796b8d152545674bcb30e
llvm-svn: 223218
Charlie Turner [Wed, 3 Dec 2014 07:59:50 +0000 (07:59 +0000)]
Add tests for default value of Tag_ABI_FP_rounding.
Change-Id: I051866d073fc6ce87ce3e693a3762da6d81f4393
llvm-svn: 223217
Benjamin Poulain [Wed, 3 Dec 2014 07:32:36 +0000 (07:32 +0000)]
Fix a typo in the documentation of LTO
Fix defininitions->definitions.
Reviewed by David Blaikie.
llvm-svn: 223216
Rafael Espindola [Wed, 3 Dec 2014 07:18:23 +0000 (07:18 +0000)]
Ask the module for its the identified types.
When lazy reading a module, the types used in a function will not be visible to
a TypeFinder until the body is read.
This patch fixes that by asking the module for its identified struct types.
If a materializer is present, the module asks it. If not, it uses a TypeFinder.
This fixes pr21374.
I will be the first to say that this is ugly, but it was the best I could find.
Some of the options I looked at:
* Asking the LLVMContext. This could be made to work for gold, but not currently
for ld64. ld64 will load multiple modules into a single context before merging
them. This causes us to see types from future merges. Unfortunately,
MappedTypes is not just a cache when it comes to opaque types. Once the
mapping has been made, we have to remember it for as long as the key may
be used. This would mean moving MappedTypes to the Linker class and having
to drop the Linker::LinkModules static methods, which are visible from C.
* Adding an option to ignore function bodies in the TypeFinder. This would
fix the PR by picking the worst result. It would work, but unfortunately
we are currently quite dependent on the upfront type merging. I will
try to reduce our dependency, but it is not clear that we will be able
to get rid of it for now.
The only clean solution I could think of is making the Module own the types.
This would have other advantages, but it is a much bigger change. I will
propose it, but it is nice to have this fixed while that is discussed.
With the gold plugin, this patch takes the number of types in the LTO clang
binary from 52817 to 49669.
llvm-svn: 223215
Duncan P. N. Exon Smith [Wed, 3 Dec 2014 05:53:24 +0000 (05:53 +0000)]
ADT: Rename argument in emplace_back_impl
Rename a functor argument in r223201 from `emplace` to `construct` to
reduce confusion.
llvm-svn: 223212
Nick Lewycky [Wed, 3 Dec 2014 05:47:00 +0000 (05:47 +0000)]
Revert r222997. The newly added compile-time checks are finding missing origins, testcase is being reduced and a PR will be posted shortly.
llvm-svn: 223211
Duncan P. N. Exon Smith [Wed, 3 Dec 2014 05:41:20 +0000 (05:41 +0000)]
LoopVectorize: Remove unnecessary RAUW
Remove an unnecessary `MDNode::replaceAllUsesWith()`. In the preceding
line, `TheLoop->setLoopID()` visits all backedges and sets the new loop
ID. This sufficiently updates the loop metadata.
Metadata RAUW is going away as part of PR21532.
llvm-svn: 223210
Kaelyn Takata [Wed, 3 Dec 2014 05:30:54 +0000 (05:30 +0000)]
Handle delayed corrections in a couple more error paths in ParsePostfixExpressionSuffix.
llvm-svn: 223209
Matt Arsenault [Wed, 3 Dec 2014 05:22:39 +0000 (05:22 +0000)]
R600/SI: Fix SIFixSGPRCopies for copies to physical registers
This shows up when operands required to be passed in VCC are copied
to.
llvm-svn: 223208
Matt Arsenault [Wed, 3 Dec 2014 05:22:38 +0000 (05:22 +0000)]
R600/SI: Remove incorrect assertion
This can be a COPY to a physical register, such as VCC
llvm-svn: 223207
Matt Arsenault [Wed, 3 Dec 2014 05:22:35 +0000 (05:22 +0000)]
R600/SI: Remove i1 pseudo VALU ops
Select i1 logical ops directly to 64-bit SALU instructions.
Vector i1 values are always really in SGPRs, with each
bit for each item in the wave. This saves about 4 instructions
when and/or/xoring any condition, and also helps write conditions
that need to be passed in vcc.
This should work correctly now that the SGPR live range
fixing pass works. More work is needed to eliminate the VReg_1
pseudo regclass and possibly the entire SILowerI1Copies pass.
llvm-svn: 223206
Matt Arsenault [Wed, 3 Dec 2014 05:22:32 +0000 (05:22 +0000)]
R600/SI: Fix suspicious indexing
The loop is over the operands of an instruction, and checks the
register with the sub reg index of the dest register. This probably
meant to be checking the sub reg index of the same operand.
llvm-svn: 223205