Chandler Carruth [Wed, 11 Mar 2015 21:34:33 +0000 (21:34 +0000)]
Fix a comparison function to actually be a SWO so that it conforms to
the spec required by std::sort and friends.
Ordering things this way also dramatically simplifies the code as
short-circuit ensures we can skip all of the negative tests.
I've left one FIXME where we're establishing a fairly arbitrary
ordering. Previously, the function compared all types as equal except
for the ones it explicitly handled, but it didn't delegate correctly to
the atomflags when doing so, and so it would fail to be a SWO. The two
possible fixes are to stop comparing the atom flags entirely, or to
establish some arbitrary ordering of the types.
Since it was pure luck which ordering of unequal types we ended up with
previously (the caller was std::sort, not std::stable_sort) I chose to
make the ordering explicit and guaranteed. This seems like the best
conservative approach as I suspect we would want to switch to
stable_sort otherwise in order to have deterministic output.
Differential Revision: http://reviews.llvm.org/D8266
llvm-svn: 231968
Frederic Riss [Wed, 11 Mar 2015 21:17:41 +0000 (21:17 +0000)]
Revert "[dsymutil] Gather function ranges during DIE selection."
This reverts commit r231957.
IntervalMap currently doesn't support keys more aligned than host pointers
and I've been using it with uint64_t keys. This asserts on some 32bits
systems.
Revert while I work on an IntervalMap generalization.
llvm-svn: 231967
Robert Flack [Wed, 11 Mar 2015 21:14:22 +0000 (21:14 +0000)]
Initialize ProcessGDBRemoteLog for LLGS to fix remote platform logging
This was previously initialized by ProcessGDBRemote::Initialize but lldb-server does not contain ProcessGDBRemote anymore so this needs to be initialized directly.
Differential Revision: http://reviews.llvm.org/D8186
llvm-svn: 231966
Joerg Sonnenberger [Wed, 11 Mar 2015 21:13:56 +0000 (21:13 +0000)]
Refactor float to integer conversion to share the same code.
80bit Intel/PPC long double is excluded due to lacking support
for the abstraction. Consistently provide saturation logic.
Extend to long double on 128bit IEEE extended platforms.
Initial patch with test cases from GuanHong Liu.
Reviewed by Steve Canon.
Differential Revision: http://reviews.llvm.org/D2804
llvm-svn: 231965
Robert Flack [Wed, 11 Mar 2015 20:35:05 +0000 (20:35 +0000)]
Reduce the number of components initialized for LLGS further.
In http://reviews.llvm.org/D7880 the initialization for LLGS was separated out so that LLGS could initialize only the components it needs to. This further reduces the set of components initialized for LLGS.
Differential Revision: http://reviews.llvm.org/D8112
llvm-svn: 231964
Jozef Kolek [Wed, 11 Mar 2015 20:28:31 +0000 (20:28 +0000)]
[mips][microMIPS] Make usage of NOT16 by code generator
Differential Revision: http://reviews.llvm.org/D7748
llvm-svn: 231963
Sanjay Patel [Wed, 11 Mar 2015 20:12:07 +0000 (20:12 +0000)]
add CHECK-LABELs for better reliability
llvm-svn: 231962
Rafael Espindola [Wed, 11 Mar 2015 19:58:37 +0000 (19:58 +0000)]
Put jump tables in unique sections on COFF.
If a function is going in an unique section (because of -ffunction-sections
for example), putting a jump table in .rodata will keep .rodata alive and
that will keep alive any other function that also has a jump table.
Instead, put the jump table in a unique section that is associated with the
function.
llvm-svn: 231961
Hal Finkel [Wed, 11 Mar 2015 19:14:15 +0000 (19:14 +0000)]
[PowerPC] ABI support for the QPX vector instruction set
Support for the QPX vector instruction set, used on the IBM BG/Q supercomputer,
has recently been added to the LLVM PowerPC backend. This vector instruction
set requires some ABI modifications because the ABI on the BG/Q expects
<4 x double> vectors to be provided with 32-byte stack alignment, and to be
handled as native vector types (similar to how Altivec vectors are handled on
mainline PPC systems). I've named this ABI variant elfv1-qpx, have made this
the default ABI when QPX is supported, and have updated the ABI handling code
to provide QPX vectors with the correct stack alignment and associated
register-assignment logic.
llvm-svn: 231960
Tim Northover [Wed, 11 Mar 2015 18:54:22 +0000 (18:54 +0000)]
ARM: simplify and extend byval handling
The main issue being fixed here is that APCS targets handling a "byval align N"
parameter with N > 4 were miscounting what objects were where on the stack,
leading to FrameLowering setting the frame pointer incorrectly and clobbering
the stack.
But byval handling had grown over many years, and had multiple layers of cruft
trying to compensate for each other and calculate padding correctly. This only
really needs to be done once, in the HandleByVal function. Elsewhere should
just do what it's told by that call.
I also stripped out unnecessary APCS/AAPCS distinctions (now that Clang emits
byvals with the correct C ABI alignment), which simplified HandleByVal.
rdar://
20095672
llvm-svn: 231959
Frederic Riss [Wed, 11 Mar 2015 18:46:01 +0000 (18:46 +0000)]
[dsymutil] Add missing headers.
No build failure, found by code inspection.
llvm-svn: 231958
Frederic Riss [Wed, 11 Mar 2015 18:45:59 +0000 (18:45 +0000)]
[dsymutil] Gather function ranges during DIE selection.
Gather the function ranges [low_pc, high_pc) during DIE selection and
store them along with the offset to apply to them to get the linked
addresses.
This is just the data collection part, it comes with no tests. That
information will be used in multiple followup commits to perform the
relocation of line tables and range sections among other things, and
these commits will add tests.
llvm-svn: 231957
Frederic Riss [Wed, 11 Mar 2015 18:45:57 +0000 (18:45 +0000)]
[dsymutil] Small clang-format patch.
llvm-svn: 231956
Frederic Riss [Wed, 11 Mar 2015 18:45:52 +0000 (18:45 +0000)]
[dsymutil] Correctly clone address attributes.
DW_AT_low_pc on functions is taken care of by the relocation processing, but
DW_AT_high_pc and DW_AT_low_pc on other lexical scopes need special handling.
llvm-svn: 231955
Eric Christopher [Wed, 11 Mar 2015 18:43:21 +0000 (18:43 +0000)]
Remove the need to cache the subtarget in the R600 TargetRegisterInfo
classes.
llvm-svn: 231954
David Majnemer [Wed, 11 Mar 2015 18:38:51 +0000 (18:38 +0000)]
MS ABI: Mark 'throw' as implemented in the compatibility doc
llvm-svn: 231953
David Majnemer [Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)]
MS ABI: Implement copy-ctor closures, finish implementing throw
This adds support for copy-constructor closures. These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.
Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.
Differential Revision: http://reviews.llvm.org/D8225
llvm-svn: 231952
Eric Christopher [Wed, 11 Mar 2015 18:34:58 +0000 (18:34 +0000)]
Have getRegPressureSetLimit take a MachineFunction so that a
we can inspect the subtarget and function when computing values.
llvm-svn: 231951
Richard Smith [Wed, 11 Mar 2015 18:21:02 +0000 (18:21 +0000)]
[modules] When merging the pattern of a class template definition into a prior
definition, be sure to update the definition data on all declarations, not just
the canonical one, since the pattern might not be in the list of pending
definitions (if it used to be canonical itself).
One-line fix by me; reduced testcase by Daniel Jasper!
llvm-svn: 231950
Oleksiy Vyalov [Wed, 11 Mar 2015 18:13:37 +0000 (18:13 +0000)]
Pass a process full executable path within "name" response field.
http://reviews.llvm.org/D8239
llvm-svn: 231949
David Majnemer [Wed, 11 Mar 2015 18:03:05 +0000 (18:03 +0000)]
InstCombine: Don't fold call bitcast into args if callee is byval
This fixes a bug reported here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20150309/265341.html
llvm-svn: 231948
Timur Iskhodzhanov [Wed, 11 Mar 2015 17:47:10 +0000 (17:47 +0000)]
[ASan/Win] Fix a CHECK failure when an exception is thrown from a callback passed to QueueUserWorkItem
llvm-svn: 231947
Kit Barton [Wed, 11 Mar 2015 17:43:43 +0000 (17:43 +0000)]
Updated with list of possible improvements we are tracking internally
llvm-svn: 231946
Juergen Ributzka [Wed, 11 Mar 2015 17:29:03 +0000 (17:29 +0000)]
Add the "vbroadcasti128" instruction back.
This is a follow-up to r231182. This adds the "vbroadcasti128" instruction
back, but without the intrinsic mapping. Also add a test to check the
instriction encoding.
This is related to rdar://problem/
18742778.
llvm-svn: 231945
Anastasia Stulova [Wed, 11 Mar 2015 17:26:37 +0000 (17:26 +0000)]
Reverted OpenCL2.0 atomic type commits r231932, r231935
(caused undesirable update of -std flag to use _Atomic)
llvm-svn: 231942
Gabor Horvath [Wed, 11 Mar 2015 17:25:22 +0000 (17:25 +0000)]
[clang-tidy] Static Analyzer checker configuration options pass-through.
Reviewed by: Alexander Kornienko
Differential Revision: http://reviews.llvm.org/D8164
llvm-svn: 231941
Jonathan Roelofs [Wed, 11 Mar 2015 17:00:28 +0000 (17:00 +0000)]
Fix ctype_byname<wchar_t>::do_is() mask checking.... again
This basically reverts the revert in r216508, and fixes a few more cases while
I'm at it. Reading my commit message on that commit again, I think it's bupkis.
http://reviews.llvm.org/D8237
llvm-svn: 231940
Fariborz Jahanian [Wed, 11 Mar 2015 16:59:48 +0000 (16:59 +0000)]
revert r231700 (designated initializer patch) which broke
several projects. rdar://
20120666.
llvm-svn: 231939
Alexander Kornienko [Wed, 11 Mar 2015 16:47:27 +0000 (16:47 +0000)]
[clang-tidy] Clean up misc-use-override warning. NFC
llvm-svn: 231938
Ed Schouten [Wed, 11 Mar 2015 16:39:36 +0000 (16:39 +0000)]
Disable cat*() on CloudABI. Also make tiny cleanups.
On a new platform that I am working on
(https://github.com/NuxiNL/cloudlibc) I am not implementing the
cat{open,close,gets}() API, just like Android, Newlib, etc.
Instead of adding yet another operating system name to the #ifs,
introduce _LIBCPP_HAS_CATOPEN in include/__config. Also adjust the code
to only pull in nl_types.h when _LIBCPP_HAS_CATOPEN is set. We only
needed this header for the cat*() API.
Differential Revision: http://reviews.llvm.org/D8163
Reviewed by: marshall
llvm-svn: 231937
Zachary Turner [Wed, 11 Mar 2015 16:26:46 +0000 (16:26 +0000)]
Add a CODE_OWNERS.txt file to LLDB.
llvm-svn: 231936
Anastasia Stulova [Wed, 11 Mar 2015 16:23:10 +0000 (16:23 +0000)]
OpenCL: CL2.0 atomic type diagnostics
Added restictions for atomic type usage from OpenCL C Spec Section 6.13.11.8
llvm-svn: 231935
Derek Schuff [Wed, 11 Mar 2015 16:16:09 +0000 (16:16 +0000)]
Make NaCl's use of .init_array for static constructors match Linux
Summary:
The generic ELF TargetObjectFile defaults to .ctors, but Linux's
defaults to .init_array by calling InitializeELF with the value of
UseInitArray from TargetMachine. Make NaCl's behavior match.
Reviewers: jvoung
Differential Revision: http://reviews.llvm.org/D8240
llvm-svn: 231934
Benjamin Kramer [Wed, 11 Mar 2015 16:09:02 +0000 (16:09 +0000)]
Wrap in __MINGW32__ to avoid warnings from msvc.
llvm-svn: 231933
Anastasia Stulova [Wed, 11 Mar 2015 15:57:53 +0000 (15:57 +0000)]
OpenCL: CL2.0 atomic types
OpenCL C Spec v2.0 Section 6.13.11
- Made c11 _Atomic being accepted only for c11 compilations
- Implemented CL2.0 atomics by aliasing them to the corresponding c11 atomic types using implicit typedef
- Added diagnostics for atomics Khronos extension enabling
llvm-svn: 231932
Kit Barton [Wed, 11 Mar 2015 15:57:19 +0000 (15:57 +0000)]
Add builtins for the 64-bit vector integer arithmetic instructions added in POWER8.
These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959.
Phabricator review: http://reviews.llvm.org/D8041
llvm-svn: 231931
Benjamin Kramer [Wed, 11 Mar 2015 15:53:24 +0000 (15:53 +0000)]
Add missing namespace specifier for MSVC.
llvm-svn: 231930
Benjamin Kramer [Wed, 11 Mar 2015 15:41:15 +0000 (15:41 +0000)]
RtlCaptureContext is absent from the mingw32 headers, provide a prototype.
llvm-svn: 231929
Meador Inge [Wed, 11 Mar 2015 15:34:44 +0000 (15:34 +0000)]
LinkerScript: Add parsing of the MEMORY command
This patch implements parsing of the GNU ld MEMORY command [1].
The command and the memory block definitions are parsed as
specified (including the slightly strange "o" and "l" keywords).
Evaluation will be added at a later point in time.
[1] https://sourceware.org/binutils/docs-2.25/ld/MEMORY.html
llvm-svn: 231928
Sanjay Patel [Wed, 11 Mar 2015 15:12:32 +0000 (15:12 +0000)]
Inliner should not add callgraph edges for intrinsic calls (PR22857)
The CallGraphNode function "addCalledFunction()" asserts that edges are not to intrinsics.
This patch makes sure that the Inliner does not add such an edge to the callgraph.
Fix for clang crash by assertion: https://llvm.org/bugs/show_bug.cgi?id=22857
Differential Revision: http://reviews.llvm.org/D8231
llvm-svn: 231927
Daniel Jasper [Wed, 11 Mar 2015 14:58:38 +0000 (14:58 +0000)]
clang-format: Recognize the .ts (TypeScript) extension as JavaScript.
Patch by Martin Probst. Thank you.
llvm-svn: 231926
Greg Bedwell [Wed, 11 Mar 2015 14:57:48 +0000 (14:57 +0000)]
Revert "[CMake] Don't pass in MSVC warning flags as definitions"
reverting while I investigate why it broke the sanitizer-windows build.
This reverts commit r231924.
llvm-svn: 231925
Greg Bedwell [Wed, 11 Mar 2015 14:26:29 +0000 (14:26 +0000)]
[CMake] Don't pass in MSVC warning flags as definitions
NFC currently but required as a prerequisite for using
the Microsoft resource compiler in conjunction with
CMake's ninja generator, which knows how to filter flags
appropriately, but not definitions.
Differential Revision: http://reviews.llvm.org/D8188
llvm-svn: 231924
Benjamin Kramer [Wed, 11 Mar 2015 13:55:41 +0000 (13:55 +0000)]
Prefer pipes over temporary files in a feeble attempt to stabilize this test on windows.
llvm-svn: 231923
Tamas Berghammer [Wed, 11 Mar 2015 13:51:07 +0000 (13:51 +0000)]
Refactor GdbRemote test cases to support remote platforms
Previously these test cases execute lldb-server on the host and run the
tests against it even if a remote platform was specified. With this CL
these tests always test the communication with an lldb-server instance
running on the target.
Differential revision: http://reviews.llvm.org/D8202
llvm-svn: 231922
Dan Liew [Wed, 11 Mar 2015 13:34:49 +0000 (13:34 +0000)]
Fix too short title underline reported by build-bot.
llvm-svn: 231921
Daniel Jasper [Wed, 11 Mar 2015 12:59:49 +0000 (12:59 +0000)]
clang-format: Fix incorrect && recognition.
Before:
if (a &&(b = c)) ..
After:
if (a && (b = c)) ..
llvm-svn: 231920
Rafael Espindola [Wed, 11 Mar 2015 12:48:24 +0000 (12:48 +0000)]
Relax CHECK to match mips syntax.
llvm-svn: 231919
Ilia K [Wed, 11 Mar 2015 12:28:48 +0000 (12:28 +0000)]
Move MiInterpreterExecTestCase to test/tools/lldb-mi/interpreter folder (MI)
llvm-svn: 231918
Ilia K [Wed, 11 Mar 2015 11:24:10 +0000 (11:24 +0000)]
Fix build on Windows (PATH_MAX was undefined) after r231858
llvm-svn: 231917
Elena Demikhovsky [Wed, 11 Mar 2015 10:25:42 +0000 (10:25 +0000)]
AVX-512: Added SKX forms of shift instructions.
Added rotation instructions, encoding only.
Added encoding tests for all these forms.
llvm-svn: 231916
Pavel Labath [Wed, 11 Mar 2015 09:53:42 +0000 (09:53 +0000)]
Fix bug in ProcessGDBRemote
Summary:
ProcessGDBRemote::AsyncThread nuked its own thread handle upon exiting. This prevented the main
thread from joining it correctly in StopAsyncThread. I address this by moving the Reset() call to
StopAsyncThread, after the join.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D8218
llvm-svn: 231915
Ed Schouten [Wed, 11 Mar 2015 08:48:55 +0000 (08:48 +0000)]
Enable security checks for arc4random() on CloudABI as well.
CloudABI also supports the arc4random() function. We can enable compiler
warnings for rand(), random() and *rand48() on this system as well.
llvm-svn: 231914
Ed Schouten [Wed, 11 Mar 2015 08:46:01 +0000 (08:46 +0000)]
Fix up default header paths for CloudABI.
CloudABI is a pure cross compilation target. This means that we should
not add /usr/include and /usr/local/include. Instead, headers are stored
in $sysroot/$triple/include.
The method of going back to the sysroot (by using "../../..") is also
used in this function for some of the other environments (e.g., MinGW).
llvm-svn: 231913
Ed Schouten [Wed, 11 Mar 2015 08:42:46 +0000 (08:42 +0000)]
Add target information for CloudABI on x86-64.
CloudABI can be identified by the __CloudABI__ preprocessor definition. The
system uses ELF executables.
CloudABI uses Unicode 7.0.0 for the encoding of wchar_t. As Unicode 7.0.0 is
synchronized with ISO/IEC 10646:2012 (released on 2012-06-01),
__STDC_ISO_10646__ is defined as 201206L.
llvm-svn: 231912
Justin Bogner [Wed, 11 Mar 2015 08:17:25 +0000 (08:17 +0000)]
Now that r231902's test is executed, make it actually pass
As of r231908, the test I added in r231902 actually gets run - but I'd
checked in a stale version of the input so it didn't pass. Fix the
input and un-xfail the test.
llvm-svn: 231911
Owen Anderson [Wed, 11 Mar 2015 06:57:30 +0000 (06:57 +0000)]
Fix another verifier crash where a GC intrinsic would look at the internals of another intrinsic in order to verify itself.
This causes a crash if the referenced intrinsic was malformed. In this case, we
would already have reported an error on the referenced intrinsic, but then
crashed on the second one when it tried to introspect the first without
error checking.
llvm-svn: 231910
David Majnemer [Wed, 11 Mar 2015 06:45:39 +0000 (06:45 +0000)]
Sema: Properly track mangling number/name for linkage for using decls
Using declarations which are aliases to struct types have their name
used as the struct type's name for linkage purposes. Otherwise, make
sure to give an anonymous struct defined inside a using declaration a
mangling number to disambiguate it from other anonymous structs in the
same context.
This fixes PR22809.
llvm-svn: 231909
Daniel Jasper [Wed, 11 Mar 2015 06:44:51 +0000 (06:44 +0000)]
Make test added in r231902 actually be executed.
There were also errors in the CHECK line which I fixed and the test
doesn't actually pass as the "100" is in the wrong line. Not sure
whether this is a test failure or a coverage failure so making the test
XFAIL for now.
llvm-svn: 231908
Daniel Jasper [Wed, 11 Mar 2015 06:01:01 +0000 (06:01 +0000)]
Prevent test from accessing files.
llvm-svn: 231907
Davide Italiano [Wed, 11 Mar 2015 05:31:07 +0000 (05:31 +0000)]
Garbage collect an unused class in Atoms.h
This will be replaced by a more generic class to handle
all the default symbols in an executable, e.g. __init_array.
Differential Revision: http://reviews.llvm.org/D8234
Reviewed by: shankare
llvm-svn: 231906
Alexey Bataev [Wed, 11 Mar 2015 04:48:56 +0000 (04:48 +0000)]
[OPENMP] Fix for ExprWithCleanups in 'omp atomic' constructs.
This patch allows using of ExprWithCleanups expressions and other complex expressions in 'omp atomic' construct
Differential Revision: http://reviews.llvm.org/D8200
llvm-svn: 231905
Rafael Espindola [Wed, 11 Mar 2015 04:20:31 +0000 (04:20 +0000)]
Don't print labels that on ELF are never used.
llvm-svn: 231904
NAKAMURA Takumi [Wed, 11 Mar 2015 03:51:40 +0000 (03:51 +0000)]
CGOpenMPRuntime.h: Fix an incorrect \param on emitTaskOutlinedFunction(). [-Wdocumentation]
llvm-svn: 231903
Justin Bogner [Wed, 11 Mar 2015 02:30:51 +0000 (02:30 +0000)]
InstrProf: Teach llvm-cov to handle universal binaries when given -arch
llvm-svn: 231902
Richard Smith [Wed, 11 Mar 2015 01:44:51 +0000 (01:44 +0000)]
[modules] Avoid accidentally completing the redeclaration chain when updating
all the existing declarations of a record-like entity with a pointer to its
definition.
llvm-svn: 231901
Richard Smith [Wed, 11 Mar 2015 01:09:01 +0000 (01:09 +0000)]
Fix test to specify an Itanium triple.
llvm-svn: 231900
Rafael Espindola [Wed, 11 Mar 2015 01:08:32 +0000 (01:08 +0000)]
Relax label CHECK to mach COFF syntax.
Should fix the cygwin bots.
I added a cygwin specific test that would have caught this on Linux.
llvm-svn: 231899
Rafael Espindola [Wed, 11 Mar 2015 00:51:37 +0000 (00:51 +0000)]
Print section start labels when first switching to the section.
This is less brittle and avoids polluting the start of the file with every
debug section.
llvm-svn: 231898
Dan Albert [Wed, 11 Mar 2015 00:51:06 +0000 (00:51 +0000)]
Move Android to the builtin rune table.
llvm-svn: 231897
Lang Hames [Wed, 11 Mar 2015 00:43:26 +0000 (00:43 +0000)]
[Orc][MCJIT][RuntimeDyld] Re-apply r231726 and r231724 with fix suggested by
Dave Blaikie. Thanks Dave!
llvm-svn: 231896
Rafael Espindola [Wed, 11 Mar 2015 00:28:59 +0000 (00:28 +0000)]
Remove a bugus test.
This was using the driver to test LLVM.
I checked that disabling the code path that the test was testing causes
llvm tests to fail.
llvm-svn: 231895
Chandler Carruth [Wed, 11 Mar 2015 00:19:01 +0000 (00:19 +0000)]
Fix a grammar issue I introduced.
llvm-svn: 231894
Chandler Carruth [Wed, 11 Mar 2015 00:15:44 +0000 (00:15 +0000)]
Inspired by r231891, use gender neutral pronouns in the places I've
found in LLVM.
llvm-svn: 231893
Richard Smith [Wed, 11 Mar 2015 00:12:17 +0000 (00:12 +0000)]
For PR22870: produce an error rather than asserting if a designated initializer appears in a signature.
llvm-svn: 231892
Nico Weber [Wed, 11 Mar 2015 00:05:26 +0000 (00:05 +0000)]
Gender-neutralize a comment.
llvm-svn: 231891
Richard Smith [Wed, 11 Mar 2015 00:00:51 +0000 (00:00 +0000)]
[modules] Fix iterator invalidation issue with names being added to a module
while we're writing out the identifier table.
llvm-svn: 231890
Andrew Kaylor [Tue, 10 Mar 2015 23:55:38 +0000 (23:55 +0000)]
Fix Value dangling reference debug output
llvm-svn: 231889
Eric Christopher [Tue, 10 Mar 2015 23:46:01 +0000 (23:46 +0000)]
Have TargetRegisterInfo::getLargestLegalSuperClass take a
MachineFunction argument so that it can look up the subtarget
rather than using a cached one in some Targets.
llvm-svn: 231888
Eric Christopher [Tue, 10 Mar 2015 23:45:55 +0000 (23:45 +0000)]
Remove subtarget dependence from HexagonRegisterInfo.
llvm-svn: 231887
Rafael Espindola [Tue, 10 Mar 2015 23:44:12 +0000 (23:44 +0000)]
Split test in two to handle building without x86.
llvm-svn: 231886
Jason Molenda [Tue, 10 Mar 2015 23:34:52 +0000 (23:34 +0000)]
If the user specifies a kernel binary that isn't correct for the current
kernel debug session, instead of issuing a warning (which on one ever
sees), drop the user-specified kernel binary Module from the target and
try to discover the correct one dynamically.
<rdar://problem/
19450329>
llvm-svn: 231885
Zachary Turner [Tue, 10 Mar 2015 23:22:25 +0000 (23:22 +0000)]
Update build instructions / coding conventions.
This improves the instructions for checking out LLDB, adds
more links to LLVM instructions, and more explicitly calls out
when we differ from the style guide.
Also updates the clang-format configuration file to correctly
reflect a 120 column limit.
Reviewed by: Jim Ingham
Differential Revision: http://reviews.llvm.org/D8222
llvm-svn: 231884
Eric Christopher [Tue, 10 Mar 2015 23:22:04 +0000 (23:22 +0000)]
Remove dead code.
llvm-svn: 231883
Rafael Espindola [Tue, 10 Mar 2015 23:06:32 +0000 (23:06 +0000)]
Add missing section symbol to COFF's .debug_types.dwo.
Should bring the cygwin bots back.
I added a triple to the test that was failing so that it would have failed
on Linux.
llvm-svn: 231882
Philip Reames [Tue, 10 Mar 2015 22:52:37 +0000 (22:52 +0000)]
If a conditional branch jumps to the same target, remove the condition
Given that large parts of inst combine is restricted to instructions which have one use, getting rid of a use on the condition can help the effectiveness of the optimizer. Also, it allows the condition to potentially be deleted by instcombine rather than waiting for another pass.
I noticed this completely by accident in another test case. It's not anything that actually came from a real workload.
p.s. We should probably do the same thing for switch instructions.
Differential Revision: http://reviews.llvm.org/D8220
llvm-svn: 231881
Paul Robinson [Tue, 10 Mar 2015 22:44:45 +0000 (22:44 +0000)]
Emit correct linkage-name attribute based on DWARF version.
There are still 4 tests that check for DW_AT_MIPS_linkage_name,
because they specify DWARF 2 or 3 in the module metadata. So, I didn't
create an explicit version-based test for the attribute.
Differential Revision: http://reviews.llvm.org/D8227
llvm-svn: 231880
Philip Reames [Tue, 10 Mar 2015 22:43:20 +0000 (22:43 +0000)]
Infer known bits from dominating conditions
This patch adds limited support in ValueTracking for inferring known bits of a value from conditional expressions which must be true to reach the instruction we're trying to optimize. At this time, the feature is off by default. Once landed, I'm hoping for feedback from others on both profitability and compile time impact.
Forms of conditional value propagation have been tried in LLVM before and have failed due to compile time problems. In an attempt to side step that, this patch only considers conditions where the edge leaving the branch dominates the context instruction. It does not attempt full dataflow. Even with that restriction, it handles many interesting cases:
* Early exits from functions
* Early exits from loops (for context instructions in the loop and after the check)
* Conditions which control entry into loops, including multi-version loops (such as those produced during vectorization, IRCE, loop unswitch, etc..)
Possible applications include optimizing using information provided by constructs such as: preconditions, assumptions, null checks, & range checks.
This patch implements two approaches to the problem that need further benchmarking. Approach 1 is to directly walk the dominator tree looking for interesting conditions. Approach 2 is to inspect other uses of the value being queried for interesting comparisons. From initial benchmarking, it appears that Approach 2 is faster than Approach 1, but this needs to be further validated.
Differential Revision: http://reviews.llvm.org/D7708
llvm-svn: 231879
Tobias Grosser [Tue, 10 Mar 2015 22:35:43 +0000 (22:35 +0000)]
Assert in isl expression builder if id can not be found [NFC]
llvm-svn: 231865
Dan Albert [Tue, 10 Mar 2015 22:31:49 +0000 (22:31 +0000)]
Copy data files to the remote runner.
Summary:
The data files for any given test will be in the same directory as the
source with a file name that matches *.dat. To make these available to
tests running remotely (such as over adb or ssh), copy them into the
test's remote working directory.
Note that we will perform more copies than we actually need. The data
files in the directory may only be used by one of the tests, but will
be copied for all tests in the same directory.
This patch also moves the remote test binary into the working
directory (previously it was only invoked from the working directory
rather than existing in it).
Reviewers: EricWF, jroelofs
Reviewed By: jroelofs
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8118
llvm-svn: 231864
Anton Yartsev [Tue, 10 Mar 2015 22:24:21 +0000 (22:24 +0000)]
[analyzer] Make getCheckIfTracked() return either leak or regular checker.
llvm-svn: 231863
Eric Christopher [Tue, 10 Mar 2015 22:03:27 +0000 (22:03 +0000)]
Update clang for llvm r231861.
llvm-svn: 231862
Eric Christopher [Tue, 10 Mar 2015 22:03:14 +0000 (22:03 +0000)]
Remove the use of the subtarget in MCCodeEmitter creation and
update all ports accordingly. Required a couple of small rewrites
in handling subtarget features during creation in PPC.
llvm-svn: 231861
Rafael Espindola [Tue, 10 Mar 2015 22:00:25 +0000 (22:00 +0000)]
Create symbols marking the start of a section earlier.
This lets us pass the symbol to the constructor and avoid the mutable field.
This also opens the way for outputting the symbol only when needed, instead
of outputting them at the start of the file.
llvm-svn: 231859
Ilia K [Tue, 10 Mar 2015 21:59:55 +0000 (21:59 +0000)]
Add =shlibs-added/=shlibs-removed notifications (MI)
Summary:
This patch adds =shlibs-added/=shlibs-removed notifications in lldb-mi. In more detail:
# Add Target::ModulesDidLoad/ModulesDidUnload notifications
# Improve Target::TargetEventData:
## Refactoring
## Move it back to include/lldb/Target/Target.h
## Add Target::{GetModuleListFromEvent,GetModuleList}; Add Target::m_module_list
# Add SBModule::{GetSymbolVendorMainFileSpec,GetObjectFileHeaderAddress}
# Add SBTarget::{EventIsTaretEvent,GetTargetFromEvent,GetNumModulesFromEvent,GetModuleAtIndexFromEvent}
All tests pass on OS X.
Reviewers: abidh, zturner, jingham, clayborg
Reviewed By: clayborg
Subscribers: jingham, zturner, lldb-commits, clayborg, abidh
Differential Revision: http://reviews.llvm.org/D8201
llvm-svn: 231858
Eric Christopher [Tue, 10 Mar 2015 21:57:34 +0000 (21:57 +0000)]
Remove createAMDGPUMCCodeEmitter and instead just register the correct
MCCodeEmitter creation routine based on TargetMachine since the only
64-bit R600 gpus are part of the GCN target.
llvm-svn: 231856
Quentin Colombet [Tue, 10 Mar 2015 21:48:15 +0000 (21:48 +0000)]
[CodeGenPrepare] Refine the cost model provided by the promotion helper.
- Use TargetLowering to check for the actual cost of each extension.
- Provide a factorized method to check for the cost of an extension:
TargetLowering::isExtFree.
- Provide a virtual method TargetLowering::isExtFreeImpl for targets to be able
to tune the cost of non-free extensions.
This refactoring offers a better granularity to model what really happens on
different targets.
No performance changes and very few code differences.
Part of <rdar://problem/
19267165>
llvm-svn: 231855
Adam Nemet [Tue, 10 Mar 2015 21:47:39 +0000 (21:47 +0000)]
[LoopAccesses] Add debug message to indicate the result of the analysis
The debug message was pretty confusing here. It only reported the
situation with memchecks without the result of the dependence analysis.
Now it prints whether the loop is safe from the POV of the dependence
analysis and if yes, whether we need memchecks.
llvm-svn: 231854
Rafael Espindola [Tue, 10 Mar 2015 21:35:16 +0000 (21:35 +0000)]
Move a non-trivial virtual function out of line.
llvm-svn: 231853
Eric Fiselier [Tue, 10 Mar 2015 21:32:53 +0000 (21:32 +0000)]
Remove unneeded const_cast in readPointerHelper. Pointed out by jroelofs
llvm-svn: 231852