Rafael Espindola [Thu, 19 Jun 2014 22:14:12 +0000 (22:14 +0000)]
Set missing options in LTOCodeGenerator::setTargetOptions.
Patch by Tom Roeder, I just added the test.
llvm-svn: 211317
Kevin Enderby [Thu, 19 Jun 2014 22:03:18 +0000 (22:03 +0000)]
Change the output of llvm-nm and llvm-size for Mach-O universal files (aka
fat files) to print “ (for architecture XYZ)” for fat files with more than
one architecture to be like what the darwin tools do for fat files.
Also clean up the Mach-O printing of archive membernames in llvm-nm to use
the darwin form of "libx.a(foo.o)".
llvm-svn: 211316
Rafael Espindola [Thu, 19 Jun 2014 21:14:13 +0000 (21:14 +0000)]
Use lib/LTO directly in the gold plugin.
The tools/lto API is not the best choice for implementing a gold plugin. Among
other issues:
* It is an stable ABI. Old errors stay and we have to be really careful
before adding new features.
* It has to support two fairly different linkers: gold and ld64.
* We end up with a plugin that depends on a shared lib, something quiet
unusual in LLVM land.
* It hides LLVM. For some features in the gold plugin it would be really
nice to be able to just get a Module or a GlobalValue.
This change is intended to be a very direct translation from the C API. It
will just enable other fixes and cleanups.
Tested with a LTO bootstrap on linux.
llvm-svn: 211315
Eric Christopher [Thu, 19 Jun 2014 21:03:04 +0000 (21:03 +0000)]
Add a new subtarget hook for whether or not we'd like to enable
the atomic load linked expander pass to run for a particular
subtarget. This requires a check of the subtarget and so save
the TargetMachine rather than only TargetLoweringInfo and update
all callers.
llvm-svn: 211314
Joerg Sonnenberger [Thu, 19 Jun 2014 20:34:03 +0000 (20:34 +0000)]
Provide mul for IEEE quad. From GuanHong Liu.
Differential Revision: http://reviews.llvm.org/D2799
llvm-svn: 211313
Joerg Sonnenberger [Thu, 19 Jun 2014 20:24:49 +0000 (20:24 +0000)]
Provide add and sub for IEEE quad. From GuanHong Liu.
Differential Revision: http://reviews.llvm.org/D2798
llvm-svn: 211312
Zachary Turner [Thu, 19 Jun 2014 20:20:03 +0000 (20:20 +0000)]
Include Threading.h instead of forward declaring a function.
Previously this led to a circular header dependency, but a recent
change has since removed this dependency, so the correct fix is
to simply include the header rather than forward declare.
llvm-svn: 211311
Justin Bogner [Thu, 19 Jun 2014 20:18:00 +0000 (20:18 +0000)]
test: Just check the VFS when testing module-dependency-dump
Checking the filesystem seems to be a bit unreliable. Limit the tests
to the VFS map for now.
llvm-svn: 211310
David Blaikie [Thu, 19 Jun 2014 20:08:56 +0000 (20:08 +0000)]
Add StringMap::insert(pair) consistent with the standard associative container concept.
Patch by Agustín Bergé.
llvm-svn: 211309
Eric Christopher [Thu, 19 Jun 2014 20:00:13 +0000 (20:00 +0000)]
Since we're using DW_AT_string rather than DW_AT_strp for debug_info
for assembly files we can't depend on the offset within the section
after a string since it could be different between producers etc.
Relax these tests accordingly.
llvm-svn: 211308
Eric Christopher [Thu, 19 Jun 2014 20:00:09 +0000 (20:00 +0000)]
Fix up a few formatting issues.
llvm-svn: 211307
Justin Bogner [Thu, 19 Jun 2014 19:49:28 +0000 (19:49 +0000)]
Frontend: Fix a typo
llvm-svn: 211306
Rafael Espindola [Thu, 19 Jun 2014 19:45:25 +0000 (19:45 +0000)]
Remove an incorrect fixme.
dynamic-no-pic is just another output type. If gnu ld gets support for MachO,
it should also add something like LDPO_DYN_NO_PIC to the plugin interface.
llvm-svn: 211305
Alp Toker [Thu, 19 Jun 2014 19:41:26 +0000 (19:41 +0000)]
Fix typos
llvm-svn: 211304
Justin Bogner [Thu, 19 Jun 2014 19:36:03 +0000 (19:36 +0000)]
Frontend: Add a CC1 flag to dump module dependencies to a directory
This adds the -module-dependency-dir to clang -cc1, which specifies a
directory to copy all of a module's dependencies into in a form
suitable to be used as a VFS using -ivfsoverlay with the generated
vfs.yaml.
This is useful for crashdumps that involve modules, so that the module
dependencies will be intact when a crash report script is used to
reproduce a problem on another machine.
We currently encode the absolute path to the dump directory, due to
limitations in the VFS system. Until we can handle relative paths in
the VFS, users of the VFS map may need to run a simple search and
replace in the file.
llvm-svn: 211303
Justin Bogner [Thu, 19 Jun 2014 19:35:39 +0000 (19:35 +0000)]
Support: Add llvm::sys::fs::copy_file
A function to copy one file's contents to another.
llvm-svn: 211302
David Greene [Thu, 19 Jun 2014 19:31:11 +0000 (19:31 +0000)]
Remove bogus configure check
Configure creates makefiles, so it doesn't make sense to check for
them to see if we can configure.
llvm-svn: 211301
David Greene [Thu, 19 Jun 2014 19:31:09 +0000 (19:31 +0000)]
Add option to keep flavor out of the install directory
Sometimes we want to install things in "standard" locations and the
flavor directories interfere with that. Add an option to keep them
out of the install path.
llvm-svn: 211300
David Greene [Thu, 19 Jun 2014 19:31:05 +0000 (19:31 +0000)]
Turn of -Werror by default
Don't build with -Werror unless asked to.
llvm-svn: 211299
Eric Christopher [Thu, 19 Jun 2014 19:26:42 +0000 (19:26 +0000)]
Fix this test a little harder - use llc_dwarf to make sure we don't
try to execute it on windows.
llvm-svn: 211298
Alp Toker [Thu, 19 Jun 2014 19:25:49 +0000 (19:25 +0000)]
Remove unused includes following r211294
llvm-svn: 211297
John Wolfe [Thu, 19 Jun 2014 19:21:53 +0000 (19:21 +0000)]
Test commit: Correct type in two comments.
llvm-svn: 211296
Yaron Keren [Thu, 19 Jun 2014 19:12:02 +0000 (19:12 +0000)]
Fixed formatting.
llvm-svn: 211295
Rafael Espindola [Thu, 19 Jun 2014 19:11:22 +0000 (19:11 +0000)]
Use the c++ APIs.
No functionality change.
llvm-svn: 211294
Eric Christopher [Thu, 19 Jun 2014 18:36:15 +0000 (18:36 +0000)]
Relax this test a bit, we don't need the full contents of the
frame section to match, just the version for this test.
llvm-svn: 211293
Eli Bendersky [Thu, 19 Jun 2014 18:30:15 +0000 (18:30 +0000)]
Fix PR20069: bad loop pragma arguments crash FE
This patch fixes a crash when handling malformed arguments to loop pragmas such
as: "#pragma clang loop vectorize(()". Essentially any argument which is not an
identifier or constant resulted in a crash. This patch also changes a couple of
the error messages which weren't quite correct. New behavior with this patch vs
old behavior:
#pragma clang loop vectorize(1)
OLD: error: missing keyword; expected 'enable' or 'disable'
NEW: error: invalid argument; expected 'enable' or 'disable'
#pragma clang loop vectorize()
OLD: error: expected ')'
NEW: error: missing argument to loop pragma 'vectorize'
#pragma clang loop vectorize_width(bad)
OLD: error: missing value; expected a positive integer value
NEW: error: invalid argument; expected a positive integer value
#pragma clang loop vectorize(bad)
OLD: invalid keyword 'bad'; expected 'enable' or 'disable'
NEW: error: invalid argument; expected 'enable' or 'disable'
http://reviews.llvm.org/D4197
Patch by Mark Heffernan
llvm-svn: 211292
David Blaikie [Thu, 19 Jun 2014 18:26:28 +0000 (18:26 +0000)]
Remove use of removed function, llvm_stop_multithreading
llvm-svn: 211291
David Blaikie [Thu, 19 Jun 2014 18:26:26 +0000 (18:26 +0000)]
Remove circular header reference in Threading.h/Mutex.h
llvm-svn: 211290
Jim Ingham [Thu, 19 Jun 2014 18:25:51 +0000 (18:25 +0000)]
Switch over to using object_getClass to get the class of an object. Previously we were
directly accessing the isa pointer of a class object to get its meta-class, but the isa
pointers are not simple pointers on arm64, so this would cause the stepping to fail.
object_getClass does whatever magic needs doing in this case.
<rdar://problem/
17239690>
llvm-svn: 211289
Zachary Turner [Thu, 19 Jun 2014 18:25:06 +0000 (18:25 +0000)]
Fix build on non-Windows platforms.
llvm-svn: 211288
Zachary Turner [Thu, 19 Jun 2014 18:18:23 +0000 (18:18 +0000)]
Remove support for LLVM runtime multi-threading.
After a number of previous small iterations, the functions
llvm_start_multithreaded() and llvm_stop_multithreaded() have
been reduced essentially to no-ops. This change removes them
entirely.
Reviewed by: rnk, dblaikie
Differential Revision: http://reviews.llvm.org/D4216
llvm-svn: 211287
Eli Bendersky [Thu, 19 Jun 2014 18:12:44 +0000 (18:12 +0000)]
Document unroll and unroll_count directives.
Extend the documentation for "#pragma clang loop" hints to include the unroll
and unroll_count directives.
Patch by Mark Heffernan [http://reviews.llvm.org/D4198]
llvm-svn: 211286
Zachary Turner [Thu, 19 Jun 2014 18:03:56 +0000 (18:03 +0000)]
Don't call llvm_start_multithreaded() during init. As of LLVM
revision r211277, this function is essentially a no-op.
llvm-svn: 211285
David Blaikie [Thu, 19 Jun 2014 17:59:14 +0000 (17:59 +0000)]
DebugInfo: Fission: Ensure the address pool entries for location lists are emitted.
The address pool was being emitted before location lists. The latter
could add more entries to the pool which would be lost/never emitted.
llvm-svn: 211284
Todd Fiala [Thu, 19 Jun 2014 17:35:40 +0000 (17:35 +0000)]
Fixed up gdb-remote auxv regex issues with binary data.
Fixes two causes for https://github.com/tfiala/lldb/issues/7.
1. Ensures the inferior program has started executing, by printing
a message on output first thing (per the "message:" command line arg)
and waiting for that text to arrive before doing any checks related
to auxv support.
2. Fixes up auxv-related regex patterns to be compiled with the Python
re.MULTILINE and re.DOTALL options. The multiline is needed because
the binary data can include what look like newlines when interpreted
as text, and the DOTALL is needed to have the (.*) content portion match
newlines.
Added interrupt packet helper methods to add interrupt test sequence
packets and parse the results from them.
llvm-svn: 211283
Alp Toker [Thu, 19 Jun 2014 17:15:36 +0000 (17:15 +0000)]
MCNullStreamer: assign file IDs to resolve crashes and errors
Use the MCStreamer base implementations for file ID tracking instead of
overriding them as no-ops.
Avoids assertions when streaming Dwarf debug info, and fixes ASM parsing of loc
and file directives.
llvm-svn: 211282
Jingyue Wu [Thu, 19 Jun 2014 16:50:16 +0000 (16:50 +0000)]
[ValueTracking] Extend range metadata to call/invoke
Summary:
With this patch, range metadata can be added to call/invoke including
IntrinsicInst. Previously, it could only be added to load.
Rename computeKnownBitsLoad to computeKnownBitsFromRangeMetadata because
range metadata is not only used by load.
Update the language reference to reflect this change.
Test Plan:
Add several tests in range-2.ll to confirm the verifier is happy with
having range metadata on call/invoke.
Add two tests in AddOverFlow.ll to confirm annotating range metadata to
call/invoke can benefit InstCombine.
Reviewers: meheff, nlewycky, reames, hfinkel, eliben
Reviewed By: eliben
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D4187
llvm-svn: 211281
Tobias Grosser [Thu, 19 Jun 2014 16:45:04 +0000 (16:45 +0000)]
Update for ScopStmt iterator name change in LLVM r210927
Contributed-by: Yabin Hu <yabin.hwu@gmail.com>
llvm-svn: 211280
Oliver Stannard [Thu, 19 Jun 2014 16:35:19 +0000 (16:35 +0000)]
Tests for r211273
llvm-svn: 211279
Johannes Doerfert [Thu, 19 Jun 2014 16:19:32 +0000 (16:19 +0000)]
Fix build
See r210927 and r210847
llvm-svn: 211278
Zachary Turner [Thu, 19 Jun 2014 16:17:42 +0000 (16:17 +0000)]
Kill the LLVM global lock.
This patch removes the LLVM global lock, and updates all existing
users of the global lock to use their own mutex. None of the
existing users of the global lock were protecting code that was
mutually exclusive with any of the other users of the global
lock, so its purpose was not being met.
Reviewed by: rnk
Differential Revision: http://reviews.llvm.org/D4142
llvm-svn: 211277
Oliver Stannard [Thu, 19 Jun 2014 16:10:21 +0000 (16:10 +0000)]
Improve robustness of tests for module flags metadata
Fix clang tests to not break if the ID numbers of module flags metadata
nodes change.
llvm-svn: 211276
Oliver Stannard [Thu, 19 Jun 2014 15:52:37 +0000 (15:52 +0000)]
Emit DWARF info for all code section in an assembly file
Currently, when using llvm as an assembler, DWARF debug information is only
generated for the .text section. This patch modifies this so that DWARF info
is emitted for all executable sections.
llvm-svn: 211273
Oliver Stannard [Thu, 19 Jun 2014 15:39:33 +0000 (15:39 +0000)]
Emit DWARF3 call frame information when DWARF3+ debug info is requested
Currently, llvm always emits a DWARF CIE with a version of 1, even when emitting
DWARF 3 or 4, which both support CIE version 3. This patch makes it emit the
newer CIE version when we are emitting DWARF 3 or 4. This will not reduce
compatibility, as we already emit other DWARF3/4 features, and is worth doing as
the DWARF3 spec removed some ambiguities in the interpretation of call frame
information.
It also fixes a minor bug where the "return address" field of the CIE was
encoded as a ULEB128, which is only valid when the CIE version is 3. There are
no test changes for this, because (as far as I can tell) none of the platforms
that we test have a return address register with a DWARF register number >127.
llvm-svn: 211272
Matheus Almeida [Thu, 19 Jun 2014 15:08:04 +0000 (15:08 +0000)]
[mips] Implementation of dli.
Patch by David Chisnall
His work was sponsored by: DARPA, AFRL
Some small modifications to the original patch: we now error if
it's not possible to expand an instruction (mips-expansions-bad.s has some
examples). Added some comments to the expansions.
llvm-svn: 211271
Argyrios Kyrtzidis [Thu, 19 Jun 2014 14:45:16 +0000 (14:45 +0000)]
Fix assertion hit or bogus compiler error in cases when instantiating ObjC property accesses used with overloaded binary operators.
rdar://
17153478
llvm-svn: 211270
Matheus Almeida [Thu, 19 Jun 2014 14:39:14 +0000 (14:39 +0000)]
[mips] Small update to the logic behind the expansion of assembly pseudo instructions.
Summary:
The functions that do the expansion now return false on success and true otherwise. This is so
we can catch some errors during the expansion (e.g.: immediate too large). The next patch adds some test cases.
Reviewers: vmedic
Reviewed By: vmedic
Differential Revision: http://reviews.llvm.org/D4214
llvm-svn: 211269
Dinesh Dwivedi [Thu, 19 Jun 2014 14:11:53 +0000 (14:11 +0000)]
Updated comments as suggested by Rafael. Thanks.
llvm-svn: 211268
Richard Smith [Thu, 19 Jun 2014 11:42:00 +0000 (11:42 +0000)]
[c++1z] Implement N3994: a range-based for loop can declare a variable with super-terse notation
for (x : range) { ... }
which is equivalent to
for (auto &&x : range) { ... }
llvm-svn: 211267
Dinesh Dwivedi [Thu, 19 Jun 2014 10:36:52 +0000 (10:36 +0000)]
Added instruction combine to transform few more negative values addition to subtraction (Part 1)
This patch enables transforms for following patterns.
(x + (~(y & c) + 1) --> x - (y & c)
(x + (~((y >> z) & c) + 1) --> x - ((y>>z) & c)
Differential Revision: http://reviews.llvm.org/D3733
llvm-svn: 211266
Andrea Di Biagio [Thu, 19 Jun 2014 10:29:41 +0000 (10:29 +0000)]
[X86] Teach how to combine horizontal binop even in the presence of undefs.
Before this change, the backend was unable to fold a build_vector dag
node with UNDEF operands into a single horizontal add/sub.
This patch teaches how to combine a build_vector with UNDEF operands into a
horizontal add/sub when possible. The algorithm conservatively avoids to combine
a build_vector with only a single non-UNDEF operand.
Added test haddsub-undef.ll to verify that we correctly fold horizontal binop
even in the presence of UNDEFs.
llvm-svn: 211265
Evgeniy Stepanov [Thu, 19 Jun 2014 10:19:57 +0000 (10:19 +0000)]
[sanitizer] Intercept pthread_*attr_get*.
This is a resubmit of r211166 reverted due to osx breakage.
llvm-svn: 211264
Simon Atanasyan [Thu, 19 Jun 2014 10:18:58 +0000 (10:18 +0000)]
[Mips] Make r26-1.test test case independent from external input files.
llvm-svn: 211263
Alexey Bataev [Thu, 19 Jun 2014 09:13:45 +0000 (09:13 +0000)]
[OPENMP] Improved diagnostic messages for vars with the predetermined data sharing attributes and reformatting
llvm-svn: 211262
Dinesh Dwivedi [Thu, 19 Jun 2014 08:29:18 +0000 (08:29 +0000)]
Refactored and updated SimplifyUsingDistributiveLaws() to
* Find factorization opportunities using identity values.
* Find factorization opportunities by treating shl(X, C) as mul (X, shl(C))
* Keep NSW flag while simplifying instruction using factorization.
This fixes PR19263.
Differential Revision: http://reviews.llvm.org/D3799
llvm-svn: 211261
Alp Toker [Thu, 19 Jun 2014 07:25:25 +0000 (07:25 +0000)]
CommandLine: bail out when options get multiply registered
These errors are strictly unrecoverable and indicate serious issues such as
conflicting option names or an incorrectly linked LLVM distribution.
With this change, the errors actually get detected so tests don't pass
silently.
llvm-svn: 211260
Alp Toker [Thu, 19 Jun 2014 07:25:18 +0000 (07:25 +0000)]
Remove OwningPtr.h and associated tests
llvm::OwningPtr is superseded by std::unique_ptr.
llvm-svn: 211259
David Majnemer [Thu, 19 Jun 2014 07:14:33 +0000 (07:14 +0000)]
InstCombine: Stop two transforms dueling
InstCombineMulDivRem has:
// Canonicalize (X+C1)*CI -> X*CI+C1*CI.
InstCombineAddSub has:
// W*X + Y*Z --> W * (X+Z) iff W == Y
These two transforms could fight with each other if C1*CI would not fold
away to something simpler than a ConstantExpr mul.
The InstCombineMulDivRem transform only acted on ConstantInts until
r199602 when it was changed to operate on all Constants in order to
let it fire on ConstantVectors.
To fix this, make this transform more careful by checking to see if we
actually folded away C1*CI.
This fixes PR20079.
llvm-svn: 211258
Eric Christopher [Thu, 19 Jun 2014 06:22:08 +0000 (06:22 +0000)]
Move -dwarf-version to an MC level command line option so it's
used by all of the MC level tools and codegen. Fix up all uses
in the compiler to use this and set it on the context accordingly.
llvm-svn: 211257
Eric Christopher [Thu, 19 Jun 2014 06:22:05 +0000 (06:22 +0000)]
Remove unnecessary include.
llvm-svn: 211256
Eric Christopher [Thu, 19 Jun 2014 06:22:01 +0000 (06:22 +0000)]
80-column fixups.
llvm-svn: 211255
Craig Topper [Thu, 19 Jun 2014 06:10:58 +0000 (06:10 +0000)]
Convert some assert(0) to llvm_unreachable or fold an 'if' condition into the assert.
llvm-svn: 211254
Matt Arsenault [Thu, 19 Jun 2014 04:24:43 +0000 (04:24 +0000)]
R600: Add a few tests I forgot to add.
These belong with r210827
llvm-svn: 211253
Nick Lewycky [Thu, 19 Jun 2014 03:51:46 +0000 (03:51 +0000)]
Move optimization of some cases of (A & C1)|(B & C2) from instcombine to instsimplify. Patch by Rahul Jain, plus some last minute changes by me -- you can blame me for any bugs.
llvm-svn: 211252
Nick Lewycky [Thu, 19 Jun 2014 03:35:49 +0000 (03:35 +0000)]
Make instsimplify's analysis of icmp eq/ne use computeKnownBits to determine whether the icmp is always true or false. Patch by Suyog Sarda!
llvm-svn: 211251
Nick Lewycky [Thu, 19 Jun 2014 03:28:28 +0000 (03:28 +0000)]
Remove redundant code in InstCombineShift, no functionality change because instsimplify already does this and instcombine calls instsimplify a few lines above. Patch by Suyog Sarda!
llvm-svn: 211250
David Majnemer [Thu, 19 Jun 2014 01:25:43 +0000 (01:25 +0000)]
MS asm: Properly handle quoted symbol names
We would get confused by '@' characters in symbol names, we would
mistake the text following them for the variant kind.
When an identifier a string, the variant kind will never show up inside
of it. Instead, check to see if there is a variant following the
string.
This fixes PR19965.
llvm-svn: 211249
Reid Kleckner [Thu, 19 Jun 2014 01:23:22 +0000 (01:23 +0000)]
DiagnoseUnknownTypename always emits a diagnostic and returns true
Make it return void and delete the dead code in the parser that handled
the case where it might return false. This has been dead since 2010
when John deleted Action.h.
llvm-svn: 211248
Matt Arsenault [Thu, 19 Jun 2014 01:19:19 +0000 (01:19 +0000)]
R600/SI: Add intrinsics for various math instructions.
These will be used for custom lowering and for library
implementations of various math functions, so it's useful
to expose these as builtins.
llvm-svn: 211247
David Blaikie [Thu, 19 Jun 2014 01:09:49 +0000 (01:09 +0000)]
Fix breakage from r211244 by using LLVM_EXPLICIT to avoid using explicit operators under MSVC where they're not supported.
llvm-svn: 211246
David Blaikie [Thu, 19 Jun 2014 00:43:19 +0000 (00:43 +0000)]
Unbreak the build after r211244.
These operator overloads were unneeded (once the const correctness in
PooledStringPtr was corrected) and inefficient (since the strings are
pooled the pointers can just be compared for equality instead of doing
strcmp).
llvm-svn: 211245
Nikola Smiljanic [Thu, 19 Jun 2014 00:26:49 +0000 (00:26 +0000)]
PR10140 - StringPool's PooledStringPtr has non-const operator== causing bad OR-result.
Mark conversion operator explicit and const qualify comparison operators.
llvm-svn: 211244
Fariborz Jahanian [Wed, 18 Jun 2014 23:52:49 +0000 (23:52 +0000)]
Objective-C ARC. Allow conversion of (void*) pointers to
retainable ObjC pointers without requiring a bridge-cast
in the context of pointer comparison as this is in effect
a +0 context. // rdar://
16627903
llvm-svn: 211243
Jim Ingham [Wed, 18 Jun 2014 23:40:13 +0000 (23:40 +0000)]
Actually make a real scoped locker rather than constructing one that gets immediately thrown away...
llvm-svn: 211242
Jason Molenda [Wed, 18 Jun 2014 23:32:53 +0000 (23:32 +0000)]
Add a lock in the UnwindTable class so two Targets won't try
to modify the same UnwindTable object simultaneously. Fix
HistoryThread and HistoryUnwind's mutex lock acqusition to
retain the lock for the duration of the operation instead of
releasing the temporary immediately.
<rdar://problem/
17055023>
llvm-svn: 211241
David Majnemer [Wed, 18 Jun 2014 23:26:25 +0000 (23:26 +0000)]
Sema: Static redeclaration after extern declarations is a Microsoft Extension
CL permits static redeclarations to follow extern declarations. The
storage specifier on the latter declaration has no effect.
This fixes PR20034.
Differential Revision: http://reviews.llvm.org/D4149
llvm-svn: 211238
Fariborz Jahanian [Wed, 18 Jun 2014 23:22:38 +0000 (23:22 +0000)]
Objective-C. Revert my patch in r211234.
llvm-svn: 211237
Johannes Doerfert [Wed, 18 Jun 2014 23:08:14 +0000 (23:08 +0000)]
Missing reduction detection test cases
llvm-svn: 211235
Fariborz Jahanian [Wed, 18 Jun 2014 22:50:40 +0000 (22:50 +0000)]
Objective-C ARC. Allow conversion of (void*) pointers to
retainable ObjC pointers without requiring a bridge-cast
by recognizing this as a +0 context. // rdar://
16627903
llvm-svn: 211234
Eric Christopher [Wed, 18 Jun 2014 22:48:09 +0000 (22:48 +0000)]
Move ARMJITInfo off of the TargetMachine and down onto the subtarget.
This required untangling a mess of headers that included around.
This a recommit of r210953 with a fix for the removed accessor
for JITInfo.
llvm-svn: 211233
Matt Arsenault [Wed, 18 Jun 2014 22:11:03 +0000 (22:11 +0000)]
Use stdint macros for specifying size of constants
llvm-svn: 211231
Kevin Enderby [Wed, 18 Jun 2014 22:04:40 +0000 (22:04 +0000)]
Teach llvm-size to know about Mach-O universal files (aka fat files) and
fat files containing archives.
Also fix a bug in MachOUniversalBinary::ObjectForArch::ObjectForArch()
where it needed a >= when comparing the Index with the number of
objects in a fat file. As the index starts at 0.
llvm-svn: 211230
Matt Arsenault [Wed, 18 Jun 2014 22:03:45 +0000 (22:03 +0000)]
R600: Handle fnearbyint
The difference from rint isn't really relevant here,
so treat them as equivalent. OpenCL doesn't have nearbyint,
so this is sort of pointless other than for completeness.
llvm-svn: 211229
Marek Olsak [Wed, 18 Jun 2014 22:00:29 +0000 (22:00 +0000)]
R600/SI: add gather4 and getlod intrinsics (v3)
This contains all the previous patches + getlod support on top of it.
It doesn't use SDNodes anymore, so it's quite small.
It also adds v16i8 to SReg_128, which is used for the sampler descriptor.
Reviewed-by: Tom Stellard
llvm-svn: 211228
Saleem Abdulrasool [Wed, 18 Jun 2014 21:48:44 +0000 (21:48 +0000)]
tests: relax ms-intrinsics test
Relax the tests to allow for differences between release and debug builds. This
should fix the buildbots.
Thanks to Benjamin Kramer and Eric Christo for their invaluable tip that this
was release build specific issue.
llvm-svn: 211227
Matt Arsenault [Wed, 18 Jun 2014 21:40:43 +0000 (21:40 +0000)]
Use LL suffix for literal that should be 64-bits.
This hopefully fixes Windows
llvm-svn: 211225
Reid Kleckner [Wed, 18 Jun 2014 21:34:36 +0000 (21:34 +0000)]
Relax the cl-inputs.c test a little bit in case link.exe is on PATH
llvm-svn: 211224
Warren Hunt [Wed, 18 Jun 2014 21:15:55 +0000 (21:15 +0000)]
[MS-ABI] Implement typeid
This patch enables clang to generate calls to __RTtypeid when lowering
typeid on win32 targets. Test cases are included.
llvm-svn: 211223
Rafael Espindola [Wed, 18 Jun 2014 21:14:57 +0000 (21:14 +0000)]
Add a symbols() range and use a range loop.
llvm-svn: 211222
Rafael Espindola [Wed, 18 Jun 2014 21:08:17 +0000 (21:08 +0000)]
Simplify code.
We can delete the objects earlier now that we are copying the names to a buffer.
llvm-svn: 211221
Saleem Abdulrasool [Wed, 18 Jun 2014 20:57:32 +0000 (20:57 +0000)]
MC: do not add comment string to the AsmToken in AsmLexer::LexLineComment
Fixes macros with varargs if the macro instantiation has a trailing comment.
Patch by Janne Grunau!
llvm-svn: 211219
Saleem Abdulrasool [Wed, 18 Jun 2014 20:57:28 +0000 (20:57 +0000)]
MCAsmParser: full support for gas' '.if{cond} expression' directives
Patch by Janne Grunau!
llvm-svn: 211218
Saleem Abdulrasool [Wed, 18 Jun 2014 20:51:10 +0000 (20:51 +0000)]
CodeGen: improve ms instrincics support
Add support for _InterlockedCompareExchangePointer, _InterlockExchangePointer,
_InterlockExchange. These are available as a compiler intrinsic on ARM and x86.
These are used directly by the Windows SDK headers without use of the intrin
header.
llvm-svn: 211216
Fariborz Jahanian [Wed, 18 Jun 2014 20:49:02 +0000 (20:49 +0000)]
Objective-C. Check for integer overflow in Objective-C's
boxed expression. // rdar://
16417427
llvm-svn: 211215
Zachary Turner [Wed, 18 Jun 2014 20:17:35 +0000 (20:17 +0000)]
Replace Execution Engine's mutex with std::recursive_mutex.
This change has a bit of a trickle down effect due to the fact that
there are a number of derived implementations of ExecutionEngine,
and that the mutex is not tightly encapsulated so is used by other
classes directly.
Reviewed by: rnk
Differential Revision: http://reviews.llvm.org/D4196
llvm-svn: 211214
Rafael Espindola [Wed, 18 Jun 2014 20:07:35 +0000 (20:07 +0000)]
Revert a C API difference that I incorrectly introduced.
LLVMGetBitcodeModuleInContext should not take ownership on error. I will
try to localize this odd api requirement, but this should get the bots green.
llvm-svn: 211213
Greg Clayton [Wed, 18 Jun 2014 19:55:34 +0000 (19:55 +0000)]
Don't allow multiple line entries with the same address to exist sequentially.
The compiler, when JIT'ing code, can emit illegal DWARF line tables (address is line table sequences must increase). This changes fixes that issue by replacing previous line entries whose start address is the same with the new line entry to avoid having multiple line entries with the same address. Since the address range of lines entries is determined by the delta between the current and next line entry, this shouldn't cause any issues.
llvm-svn: 211212
Jeroen Ketema [Wed, 18 Jun 2014 19:42:23 +0000 (19:42 +0000)]
Add pown
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211211
Jeroen Ketema [Wed, 18 Jun 2014 19:37:34 +0000 (19:37 +0000)]
Add missing undefs
Reviewed-by: Tom Stellard <tom@stellard.net>
llvm-svn: 211210
Jordan Rose [Wed, 18 Jun 2014 19:23:30 +0000 (19:23 +0000)]
[analyzer] Don't create new PostStmt nodes if we don't have to.
Doing this caused us to mistakenly think we'd seen a particular state before
when we actually hadn't, which resulted in false negatives. Credit to
Rafael Auler for discovering this issue!
llvm-svn: 211209