Rafael Espindola [Wed, 9 Mar 2016 00:31:06 +0000 (00:31 +0000)]
Assume GV is not null for now.
It will come back when we add support for inline asm in .bc files.
llvm-svn: 262972
Richard Smith [Wed, 9 Mar 2016 00:12:38 +0000 (00:12 +0000)]
Readd testcase accidentally removed in r262888.
llvm-svn: 262971
Siva Chandra [Wed, 9 Mar 2016 00:02:00 +0000 (00:02 +0000)]
[TestRegisterVariables] Adjust compiler range in expected failure decorator.
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D17972
llvm-svn: 262970
Davide Italiano [Tue, 8 Mar 2016 23:58:08 +0000 (23:58 +0000)]
[Modules] Modernize, use range-based loops.
llvm-svn: 262969
Sean Silva [Tue, 8 Mar 2016 23:50:56 +0000 (23:50 +0000)]
[lto] Don't add variables with private linkage to the symbol table.
Summary:
This causes the issue in PR26872 to go away now that we aren't creating
symbols for the string literals, but that may just be concealing a
deeper problem, so best to keep that PR open.
Reviewers: rafael
Subscribers: Bigcheese, llvm-commits, joker.eph
Differential Revision: http://reviews.llvm.org/D17971
llvm-svn: 262968
Richard Smith [Tue, 8 Mar 2016 23:17:35 +0000 (23:17 +0000)]
Fix crash in access check for aggregate initialization of base classes. It's
not obvious how to access-check these, so pick a conservative rule until we get
feedback from CWG.
llvm-svn: 262966
Richard Smith [Tue, 8 Mar 2016 23:16:16 +0000 (23:16 +0000)]
Fix -Werror build.
llvm-svn: 262965
Tim Northover [Tue, 8 Mar 2016 23:10:58 +0000 (23:10 +0000)]
AArch64: remove tests of intrinsics completely duplicated elsewhere.
llvm-svn: 262964
Richard Smith [Tue, 8 Mar 2016 22:17:41 +0000 (22:17 +0000)]
P0017R1: In C++1z, an aggregate class can have (public non-virtual) base classes; these are initialized as if they were data members.
llvm-svn: 262963
Zachary Turner [Tue, 8 Mar 2016 21:42:24 +0000 (21:42 +0000)]
[llvm-pdbdump] Dump line table information.
This patch adds the -lines command line option which will dump
source/line information for each compiland and source file.
llvm-svn: 262962
Sanjay Patel [Tue, 8 Mar 2016 21:41:13 +0000 (21:41 +0000)]
fix typo; NFC
llvm-svn: 262961
Aaron Ballman [Tue, 8 Mar 2016 21:31:32 +0000 (21:31 +0000)]
Silence duplicate diagnostics because parsing of a standards-based attribute triggers parsing diagnostics that may also be picked up during semantic analysis.
llvm-svn: 262960
Enrico Granata [Tue, 8 Mar 2016 21:29:49 +0000 (21:29 +0000)]
Add CommandAlias.cpp to CMakeLists
llvm-svn: 262959
Enrico Granata [Tue, 8 Mar 2016 21:23:30 +0000 (21:23 +0000)]
Move CommandAlias to its own file; also
Store std::unique_ptr<CommandAlias> instead of instances
llvm-svn: 262958
Rafael Espindola [Tue, 8 Mar 2016 21:17:31 +0000 (21:17 +0000)]
Remove an unnecessary hack.
It doesn't look like anything is depending on using local dynamic tls
relocations with preemptable symbols.
llvm-svn: 262957
Sanjay Patel [Tue, 8 Mar 2016 20:53:48 +0000 (20:53 +0000)]
use range-based for loop; NFCI
llvm-svn: 262956
Rafael Espindola [Tue, 8 Mar 2016 20:24:36 +0000 (20:24 +0000)]
Delete isTlsDynRel.
It was a badly specified hack for when a tls relocation should be
propagated to the dynamic relocation table.
This replaces it with a not as bad hack of saying that a local dynamic
tls relocation is never preempted.
I will try to remove even that second hack in the next patch.
llvm-svn: 262955
Rafael Espindola [Tue, 8 Mar 2016 19:51:58 +0000 (19:51 +0000)]
Use defined hidden symbols for out of range tests.
When the symbol can be preempted the error is not entirely accurate.
This just makes upcoming patches more readable.
llvm-svn: 262954
Sanjay Patel [Tue, 8 Mar 2016 19:07:42 +0000 (19:07 +0000)]
fix variable name; NFC
llvm-svn: 262953
Sanjay Patel [Tue, 8 Mar 2016 19:06:12 +0000 (19:06 +0000)]
use range-based loop; NFCI
llvm-svn: 262952
Hans Wennborg [Tue, 8 Mar 2016 19:01:15 +0000 (19:01 +0000)]
Add self to CODE_OWNERS
Apparently this makes my email address easier to find.
llvm-svn: 262951
Sean Callanan [Tue, 8 Mar 2016 18:58:48 +0000 (18:58 +0000)]
Made self.expect() errors a little more readable in the testsuite.
self.expect() had two problems:
- If there was a substrs argument, then it overwrote the variable containing
the command to run with the last substr. That meant nonsense command text in
testsuite errors.
- The actual output is not printed, which makes fixing testsuite failures a bit
annoying (you end up having to use the -tv arguments to dotest).
This fixes both of these issues. We could do even better, pretty-printing the
criteria for "correct" output, but this at least makes dealing with errors a bit
better.
llvm-svn: 262950
Saleem Abdulrasool [Tue, 8 Mar 2016 18:56:00 +0000 (18:56 +0000)]
cmake: include what you use
Add a missing include. This is important in the case HandleLLVMOptions is
included prior to the missing CheckCXXSourceCompiles or CheckCXXCompilerFlag
which includes CheckCXXSourceCompiles.
llvm-svn: 262949
Chris Bieneman [Tue, 8 Mar 2016 18:43:28 +0000 (18:43 +0000)]
[CMake] Refactor add_llvm_implicit_projects to be reusable
This adds llvm_add_implicit_projects which takes a project name and is wrapped by add_llvm_implicit_projects.
llvm-svn: 262948
Adrian Prantl [Tue, 8 Mar 2016 18:35:09 +0000 (18:35 +0000)]
Support floating point values in 128-bit SSE vector registers
The System-V x86_64 ABI requires floating point values to be passed
in 128-but SSE vector registers (xmm0, ...). When printing such a
variable this currently yields an <invalid load address>.
This patch makes LLDB's DWARF expression evaluator accept 128-bit
registers as scalars. It also relaxes the check that the size of the
result of the DWARF expression be equal to the size of the variable to a
greater-than. DWARF defers to the ABI how smaller values are being placed
in a larger register.
Implementation note: I found the code in Value::SetContext() that changes
the m_value_type after the fact to be questionable. I added a sanity check
that the Value's memory buffer has indeed been written to (this is
necessary, because we may have a scalar value in a vector register), but
really I feel like this is the wrong place to be setting it.
Reviewed by Greg Clayton.
http://reviews.llvm.org/D17897
rdar://problem/
24944340
llvm-svn: 262947
Chad Rosier [Tue, 8 Mar 2016 17:33:34 +0000 (17:33 +0000)]
[AArch64] Disable the MI scheduler to turn bots green after r262942.
llvm-svn: 262944
Quentin Colombet [Tue, 8 Mar 2016 17:29:11 +0000 (17:29 +0000)]
Revert r262759 and r262760.
The fix consisting in using the library call for atomic compare and swap when
the instruction is not safe to use may be incorrect. Indeed the library call may
not exist on all platform. In other words, we need a better fix!
llvm-svn: 262943
Chad Rosier [Tue, 8 Mar 2016 17:16:38 +0000 (17:16 +0000)]
[AArch64] Add MMOs to unscaled pairs.
Test to be committed in follow up commit, per discussion in D17097.
http://reviews.llvm.org/D17097
llvm-svn: 262942
Rafael Espindola [Tue, 8 Mar 2016 17:13:12 +0000 (17:13 +0000)]
Revert "ELF: Add /lib and /usr/lib as default search paths."
It was causing errors like
/lib/libc.so.6 is incompatible with elf_x86_64
when linking on Fedora.
Every system has different default paths. It seems better to just trust
the driver to pass the correct -L options.
This reverts commit 262910.
llvm-svn: 262941
Sanjay Patel [Tue, 8 Mar 2016 17:12:32 +0000 (17:12 +0000)]
rangify, fix function names; NFCI
llvm-svn: 262940
Krzysztof Parzyszek [Tue, 8 Mar 2016 16:54:20 +0000 (16:54 +0000)]
Invoke DAG postprocessing in the post-RA scheduler
This was inadvertently omitted from r262774, which added the mutation
interface.
llvm-svn: 262939
Aaron Ballman [Tue, 8 Mar 2016 16:34:37 +0000 (16:34 +0000)]
Turning on the /bigobj flag for two more files that will not link with MSVC 2015 Win64 Debug due to the section limit.
llvm-svn: 262938
Sanjay Patel [Tue, 8 Mar 2016 16:26:39 +0000 (16:26 +0000)]
don't repeat function names in documentation comments; NFC
llvm-svn: 262937
Artyom Skrobov [Tue, 8 Mar 2016 16:23:54 +0000 (16:23 +0000)]
[ARM] Simplify ARMInstr*.td by getting rid of identity PatFrags (NFC)
Reviewers: t.p.northover, grosbach, resistor
Subscribers: aemerson, rengolin, llvm-commits
Differential Revision: http://reviews.llvm.org/D17636
llvm-svn: 262936
Hans Wennborg [Tue, 8 Mar 2016 16:21:41 +0000 (16:21 +0000)]
Revert r262599 "[X86][SSE] Improve vector ZERO_EXTEND by combining to ZERO_EXTEND_VECTOR_INREG"
This caused PR26870.
llvm-svn: 262935
Manuel Klimek [Tue, 8 Mar 2016 16:17:48 +0000 (16:17 +0000)]
Fix problem with uninitilialized bool found by asan.
llvm-svn: 262934
Mike Spertus [Tue, 8 Mar 2016 16:14:23 +0000 (16:14 +0000)]
Add Visual Studio native visualizers for several Clang types
This is one of a series of changes to improve the MSVC visualization of Clang types.
This one focuses on Record and SubstTemplateTypeParmType meaning that, for example,
a TemplateArgumentLoc no longer displays incomprehensibly in the locals window as
{Argument={DeclArg={Kind=1 QT=0x033acb00 D=0xcccccccc {DeclType=???}}...
but instead much more usefully as
Type template parameter: SubstTemplateTypeParm: {Identifier (("T"))} => Record, {Identifier (("A"))}
Additional types and improvements will be made in subsequent commits
llvm-svn: 262933
Marshall Clow [Tue, 8 Mar 2016 15:45:06 +0000 (15:45 +0000)]
Remove a couple tabs that crept in
llvm-svn: 262932
Marshall Clow [Tue, 8 Mar 2016 15:44:30 +0000 (15:44 +0000)]
Implement P0272R1: Give 'std::string' a non-const '.data()' member function
llvm-svn: 262931
Krzysztof Parzyszek [Tue, 8 Mar 2016 15:33:51 +0000 (15:33 +0000)]
Add DAG mutation interface to the DFA packetizer
llvm-svn: 262930
Igor Breger [Tue, 8 Mar 2016 15:21:25 +0000 (15:21 +0000)]
AVX512: Add extract_subvector patterns v8i1->v4i1 , v4i1->v2i1.
Differential Revision: http://reviews.llvm.org/D17953
llvm-svn: 262929
Marshall Clow [Tue, 8 Mar 2016 15:12:52 +0000 (15:12 +0000)]
Implement P0253R1: Fixing a design mistake in the searchers interface.
llvm-svn: 262928
Filipe Cabecinhas [Tue, 8 Mar 2016 14:22:13 +0000 (14:22 +0000)]
[Fix r262788] Fix missed prototype with the old llvm* name.
llvm-svn: 262927
Benjamin Kramer [Tue, 8 Mar 2016 14:02:46 +0000 (14:02 +0000)]
[gold] Avoid assertion failures when taking a pointer to an empty vector.
llvm-svn: 262926
Tamas Berghammer [Tue, 8 Mar 2016 13:33:14 +0000 (13:33 +0000)]
Fix log in Broadcaster causing a crash
llvm-svn: 262925
Filipe Cabecinhas [Tue, 8 Mar 2016 11:49:24 +0000 (11:49 +0000)]
[llvm-config] Get rid of code related to the Makefile builds
Summary: I left --build-system for backwards compat, in case there are scripts using it. Feel free to ask for its removal too.
Reviewers: chapuni, tstellarAMD
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17886
llvm-svn: 262924
Tamas Berghammer [Tue, 8 Mar 2016 11:43:56 +0000 (11:43 +0000)]
Try to fix windows build after rL262863
llvm-svn: 262923
Kevin Funk [Tue, 8 Mar 2016 10:34:23 +0000 (10:34 +0000)]
Bump libclang API version after r262318
llvm-svn: 262922
Duncan P. N. Exon Smith [Tue, 8 Mar 2016 10:28:52 +0000 (10:28 +0000)]
Sema: Methods in unavailable classes are unavailable
Similar to the template cases in r262050, when a C++ method in an
unavailable struct/class calls unavailable API, don't diagnose an error.
I.e., this case was failing:
void foo() __attribute__((unavailable));
struct __attribute__((unavailable)) A {
void bar() { foo(); }
};
Since A is unavailable, A::bar is allowed to call foo. However, we were
emitting a diagnostic here. This commit checks up the context chain
from A::bar, in a manner inspired by SemaDeclAttr.cpp:isDeclUnavailable.
I expected to find other related issues but failed to trigger them:
- I wondered if DeclBase::getAvailability should check for
`TemplateDecl` instead of `FunctionTemplateDecl`, but I couldn't find
a way to trigger this. I left behind a few extra tests to make sure
we don't regress.
- I wondered if Sema::isFunctionConsideredUnavailable should be
symmetric, checking up the context chain of the callee (this commit
only checks up the context chain of the caller). However, I couldn't
think of a testcase that didn't require first referencing the
unavailable type; this, we already diagnose.
rdar://problem/
25030656
llvm-svn: 262921
Ewan Crawford [Tue, 8 Mar 2016 10:03:23 +0000 (10:03 +0000)]
Use c_str() instead of GetCString() to fix build
llvm-svn: 262920
Simon Pilgrim [Tue, 8 Mar 2016 09:17:12 +0000 (09:17 +0000)]
[X86] Regenerated vector float extension tests
llvm-svn: 262919
Junmo Park [Tue, 8 Mar 2016 07:42:12 +0000 (07:42 +0000)]
Remove pr25342 test-case.
This commit removes pr25342 for reverting r262670 clearly.
llvm-svn: 262918
Tobias Grosser [Tue, 8 Mar 2016 07:34:58 +0000 (07:34 +0000)]
Also clang-format *.c run-time library files
llvm-svn: 262917
Junmo Park [Tue, 8 Mar 2016 07:09:46 +0000 (07:09 +0000)]
Revert "[InstCombine] Combine A->B->A BitCast"
This reverts commit r262670 due to compile failure.
llvm-svn: 262916
Duncan P. N. Exon Smith [Tue, 8 Mar 2016 06:12:54 +0000 (06:12 +0000)]
Sema: Treat 'strict' availability flag like unavailable
This is a follow-up to r261512, which made the 'strict' availability
attribute flag behave like 'unavailable'. However, that fix was
insufficient. The following case would (erroneously) error when the
deployment target was older than 10.9:
struct __attribute__((availability(macosx,strict,introduced=10.9))) A;
__attribute__((availability(macosx,strict,introduced=10.9))) void f(A*);
The use of A* in the argument list for f is valid here, since f and A
have the same availability.
The fix is to return AR_Unavailable from DeclBase::getAvailability
instead of AR_NotYetIntroduced. This also reverts the special handling
added in r261163, instead relying on the well-tested logic for
AR_Unavailable.
rdar://problem/
23791325
llvm-svn: 262915
Enrico Granata [Tue, 8 Mar 2016 05:59:47 +0000 (05:59 +0000)]
This is actually a FileSpec, so use .GetCString() instead
llvm-svn: 262914
Enrico Granata [Tue, 8 Mar 2016 05:57:52 +0000 (05:57 +0000)]
Use .c_str() here to unbreak the Linux build
llvm-svn: 262913
Enrico Granata [Tue, 8 Mar 2016 05:37:15 +0000 (05:37 +0000)]
A few more improvements on the way to the command alias refactoring
- move alias help generation to CommandAlias, out of CommandInterpreter
- make alias creation use argument strings instead of OptionArgVectorSP; the former is a more reasonable currency than the latter
- remove m_is_alias from CommandObject, it wasn't actually being used
llvm-svn: 262912
Rui Ueyama [Tue, 8 Mar 2016 04:06:29 +0000 (04:06 +0000)]
ELF: Rename NoInhibitExec -> NoinhibitExec.
The variables corresponding to command line options are named mechanically.
Because the option for the variable is -noinhibit-exec and not -no-inhibit-exec,
it should be name this way.
llvm-svn: 262911
Rui Ueyama [Tue, 8 Mar 2016 04:06:27 +0000 (04:06 +0000)]
ELF: Add /lib and /usr/lib as default search paths.
GNU ld and gold have these paths as default search paths.
If you don't want these directories, pass -nostdlib.
llvm-svn: 262910
Enrico Granata [Tue, 8 Mar 2016 03:56:12 +0000 (03:56 +0000)]
Turn GetAliasOptions() into GetAlias()
Eventually, there will be more things that CommandAlias contains, and I don't want accessors for each of them on the CommandIntepreter
Eventually, we also won't pass around copies of CommandAlias, but that's for a later patch
llvm-svn: 262909
Justin Bogner [Tue, 8 Mar 2016 03:51:58 +0000 (03:51 +0000)]
SelectionDAG: Appease the bots that don't like my union
Should fix the breakage in r262902.
llvm-svn: 262908
Peter Collingbourne [Tue, 8 Mar 2016 03:50:36 +0000 (03:50 +0000)]
Fix evaluation order. Spotted by Alexander Riccio!
llvm-svn: 262907
Kit Barton [Tue, 8 Mar 2016 03:49:13 +0000 (03:49 +0000)]
[Power9] Implement new vsx instructions: load, store instructions for vector and scalar
We follow the comments mentioned in http://reviews.llvm.org/D16842#344378 to
implement this new patch.
This patch implements the following vsx instructions:
Vector load/store:
lxv lxvx lxvb16x lxvl lxvll lxvh8x lxvwsx
stxv stxvb16x stxvh8x stxvl stxvll stxvx
Scalar load/store:
lxsd lxssp lxsibzx lxsihzx
stxsd stxssp stxsibx stxsihx
21 instructions
Phabricator: http://reviews.llvm.org/D16919
llvm-svn: 262906
Enrico Granata [Tue, 8 Mar 2016 03:48:41 +0000 (03:48 +0000)]
Attempt to fix the Ubuntu buildbot by making FindLongestCommandWord a free template function in lldb_private
llvm-svn: 262905
Jason Molenda [Tue, 8 Mar 2016 03:24:13 +0000 (03:24 +0000)]
Unbreak linux build broken by r262901
llvm-svn: 262904
Dan Gohman [Tue, 8 Mar 2016 03:18:12 +0000 (03:18 +0000)]
[WebAssembly] Update for spec change from tableswitch to br_table.
Also note that the operand order changed; the default label is now listed
after the regular labels.
llvm-svn: 262903
Justin Bogner [Tue, 8 Mar 2016 03:14:29 +0000 (03:14 +0000)]
Re-apply "SelectionDAG: Store SDNode operands in an ArrayRecycler"
This re-applies r262886 with a fix for 32 bit platforms that have 8 byte
pointer alignment, effectively reverting r262892.
Original Message:
Currently some SDNode operands are malloc'd, some are stored inline in
subclasses of SDNode, and some are thrown into a BumpPtrAllocator.
This scheme is complex, inconsistent, and makes refactoring SDNodes
fairly difficult.
Instead, we can allocate all of the operands using an ArrayRecycler
that wraps a BumpPtrAllocator. This keeps the cache locality when
iterating operands, improves locality when iterating SDNodes without
looking at operands, and vastly simplifies the ownership semantics.
It also means we stop overallocating SDNodes by 2-3x and will make it
simpler to fix the rampant undefined behaviour we have in how we
mutate SDNodes from one kind to another (See llvm.org/pr26808).
This is NFC other than the changes in memory behaviour, and I ran some
LNT tests to make sure this didn't hurt compile time. Not many tests
changed: there were a couple of 1-2% regressions reported, but there
were more improvements (of up to 4%) than regressions.
llvm-svn: 262902
Enrico Granata [Tue, 8 Mar 2016 03:00:27 +0000 (03:00 +0000)]
Move ProcessAliasOptionsArgs to be a static on CommandAlias; it wasn't using any instance data on the CommandInterpreter anyway
This small step removes one piece of alias machinery from the CommandInterpreter into the CommandAlias
llvm-svn: 262901
Enrico Granata [Tue, 8 Mar 2016 02:49:15 +0000 (02:49 +0000)]
Change the way command aliases are stored. Go from a model where a map holds the alias -> underlying command binding and another map holds the alias -> options, to a model where one single map holds the alias -> (all useful data) combination
Right now, obviously, this is just the pair of (CommandObjectSP,OptionArgVectorSP), so NFC
This is step one of a larger - and tricky - refactoring which will turn command aliases into interesting objects instead of passive storage that the command interpreter does smart things to
This refactoring, in turn, will allow us to do interesting things with aliases, such as intelligent and customizable help
llvm-svn: 262900
Quentin Colombet [Tue, 8 Mar 2016 02:00:43 +0000 (02:00 +0000)]
[MIR] Change the token name for '<' and '>' to be consitent with the LLVM IR parser.
Thanks to Ahmed Bougacha for noticing!
llvm-svn: 262899
Quentin Colombet [Tue, 8 Mar 2016 01:48:08 +0000 (01:48 +0000)]
[AArch64][GlobalISel] Add a test case for the IRTranslator.
llvm-svn: 262898
Quentin Colombet [Tue, 8 Mar 2016 01:45:36 +0000 (01:45 +0000)]
[AArch64] Initialize GlobalISel as part of the target initialization.
llvm-svn: 262897
Quentin Colombet [Tue, 8 Mar 2016 01:38:55 +0000 (01:38 +0000)]
[GlobalISel] Introduce initializer method to support start/stop-after features.
llvm-svn: 262896
Ekaterina Romanova [Tue, 8 Mar 2016 01:36:59 +0000 (01:36 +0000)]
Add doxygen comments to bmiintrin.h's intrinsics.
The doxygen comments are automatically generated based on Sony's intrinsics document.
I got an OK from Eric Christopher to commit doxygen comments without prior code review upstream.
llvm-svn: 262895
Anna Zaks [Tue, 8 Mar 2016 01:21:51 +0000 (01:21 +0000)]
[analyzer] Fix missed leak from MSVC specific allocation functions
Add the wide character strdup variants (wcsdup, _wcsdup) and the MSVC
version of alloca (_alloca) and other differently named function used
by the Malloc checker.
A patch by Alexander Riccio!
Differential Revision: http://reviews.llvm.org/D17688
llvm-svn: 262894
Quentin Colombet [Tue, 8 Mar 2016 01:17:03 +0000 (01:17 +0000)]
[MIR] Teach the parser/printer that generic virtual registers do not need a register class.
llvm-svn: 262893
Justin Bogner [Tue, 8 Mar 2016 01:07:03 +0000 (01:07 +0000)]
Revert "SelectionDAG: Store SDNode operands in an ArrayRecycler"
Looks like the largest SDNode is different between 32 and 64 bit now,
so this is breaking 32 bit bots. Reverting while I figure out a fix.
This reverts r262886.
llvm-svn: 262892
Richard Smith [Tue, 8 Mar 2016 00:59:44 +0000 (00:59 +0000)]
A couple more UB fixes for C++14 sized deallocation.
llvm-svn: 262891
Quentin Colombet [Tue, 8 Mar 2016 00:57:31 +0000 (00:57 +0000)]
[MIR] Teach the parser how to parse complex types of generic machine instructions.
By complex types, I mean aggregate or vector types.
llvm-svn: 262890
Richard Smith [Tue, 8 Mar 2016 00:45:37 +0000 (00:45 +0000)]
Use class="svn" for features with SVN status.
llvm-svn: 262889
Richard Smith [Tue, 8 Mar 2016 00:44:49 +0000 (00:44 +0000)]
Move [[nodiscard]] tests into test/CXX tree.
llvm-svn: 262888
Richard Smith [Tue, 8 Mar 2016 00:40:32 +0000 (00:40 +0000)]
Define __has_cpp_attribute(fallthrough) to a more reasonable value. (What year is it?!)
llvm-svn: 262887
Justin Bogner [Tue, 8 Mar 2016 00:39:51 +0000 (00:39 +0000)]
SelectionDAG: Store SDNode operands in an ArrayRecycler
Currently some SDNode operands are malloc'd, some are stored inline in
subclasses of SDNode, and some are thrown into a BumpPtrAllocator.
This scheme is complex, inconsistent, and makes refactoring SDNodes
fairly difficult.
Instead, we can allocate all of the operands using an ArrayRecycler
that wraps a BumpPtrAllocator. This keeps the cache locality when
iterating operands, improves locality when iterating SDNodes without
looking at operands, and vastly simplifies the ownership semantics.
It also means we stop overallocating SDNodes by 2-3x and will make it
simpler to fix the rampant undefined behaviour we have in how we
mutate SDNodes from one kind to another (See llvm.org/pr26808).
This is NFC other than the changes in memory behaviour, and I ran some
LNT tests to make sure this didn't hurt compile time. Not many tests
changed: there were a couple of 1-2% regressions reported, but there
were more improvements (of up to 4%) than regressions.
llvm-svn: 262886
Quentin Colombet [Tue, 8 Mar 2016 00:38:01 +0000 (00:38 +0000)]
[MIR] Teach the printer how to print complex types for generic machine instructions.
Before this change, we would get the type definition in the middle
of the instruction.
E.g., %0(48) = G_ADD %struct_alias = type { i32, i16 } %edi, %edi
Now, we have just the expected type name:
%0(48) = G_ADD %struct_alias %edi, %edi
llvm-svn: 262885
Quentin Colombet [Tue, 8 Mar 2016 00:37:07 +0000 (00:37 +0000)]
[AsmParser] Expose an API to parse a string starting with a type.
Without actually parsing a type it is difficult to perdict where
the type definition ends. In other words, instead of expecting
the user of the parser API to hand over only the relevant bits
of the string being parsed, take the whole string, parse the type,
and get back the number of characters that have been read.
This will be used by the MIR testing infrastructure.
llvm-svn: 262884
Easwaran Raman [Tue, 8 Mar 2016 00:36:35 +0000 (00:36 +0000)]
Revert revisions 262636, 262643, 262679, and 262682.
llvm-svn: 262883
Richard Smith [Tue, 8 Mar 2016 00:34:49 +0000 (00:34 +0000)]
Add accidentally forgotten testcase from r262881.
llvm-svn: 262882
Richard Smith [Tue, 8 Mar 2016 00:32:55 +0000 (00:32 +0000)]
P0188R1: add support for standard [[fallthrough]] attribute. This is almost
exactly the same as clang's existing [[clang::fallthrough]] attribute, which
has been updated to have the same semantics. The one significant difference
is that [[fallthrough]] is ill-formed if it's not used immediately before a
switch label (even when -Wimplicit-fallthrough is disabled). To support that,
we now build a CFG of any function that uses a '[[fallthrough]];' statement
to check.
In passing, fix some bugs with our support for statement attributes -- in
particular, diagnose their use on declarations, rather than asserting.
llvm-svn: 262881
Quentin Colombet [Tue, 8 Mar 2016 00:29:15 +0000 (00:29 +0000)]
[MIR] Print the type of generic machine instructions.
llvm-svn: 262880
Quentin Colombet [Tue, 8 Mar 2016 00:20:48 +0000 (00:20 +0000)]
[MIR] Teach the mir parser about types on generic machine instructions.
llvm-svn: 262879
Quentin Colombet [Tue, 8 Mar 2016 00:03:40 +0000 (00:03 +0000)]
[lit] Teach lit about global-isel requirement.
llvm-svn: 262878
Quentin Colombet [Tue, 8 Mar 2016 00:02:50 +0000 (00:02 +0000)]
[llvm-config] Teach llvm-config about global-isel.
llvm-config can know tell whether or not a build has been configured to support
global-isel.
Use '--has-global-isel' for that.
llvm-svn: 262877
Anna Zaks [Mon, 7 Mar 2016 23:16:23 +0000 (23:16 +0000)]
[tsan] Add support for pointer typed atomic stores, loads, and cmpxchg
TSan instrumentation functions for atomic stores, loads, and cmpxchg work on
integer value types. This patch adds casts before calling TSan instrumentation
functions in cases where the value is a pointer.
Differential Revision: http://reviews.llvm.org/D17833
llvm-svn: 262876
Sanjay Patel [Mon, 7 Mar 2016 23:13:06 +0000 (23:13 +0000)]
[x86] add test to show missing optimization
This should make it clearer how this proposed patch:
http://reviews.llvm.org/D11393
...will change codegen.
llvm-svn: 262875
Sanjay Patel [Mon, 7 Mar 2016 22:53:23 +0000 (22:53 +0000)]
[x86] simplify test and tighten checks
I noticed this test as part of:
http://reviews.llvm.org/D11393
...which is confusing enough as-is.
Let's show the exact codegen, so the changes will be more obvious.
llvm-svn: 262874
Quentin Colombet [Mon, 7 Mar 2016 22:47:23 +0000 (22:47 +0000)]
[MachineInstr] Get rid of some GlobalISel ifdefs.
Now the type API is always available, but when global-isel is not
built the implementation does nothing.
Note: The implementation free of ifdefs is WIP and tracked here in PR26576.
llvm-svn: 262873
Aaron Ballman [Mon, 7 Mar 2016 22:44:55 +0000 (22:44 +0000)]
Implement support for [[nodiscard]] in C++1z that is based off existing support for warn_unused_result, and treat it as an extension pre-C++1z. This also means extending the existing warn_unused_result attribute so that it can be placed on an enum as well as a class.
llvm-svn: 262872
Marshall Clow [Mon, 7 Mar 2016 22:43:49 +0000 (22:43 +0000)]
Implement P0025R0: 'An algorithm to clamp a value between a pair of boundary values' for C++17
llvm-svn: 262871
Amaury Sechet [Mon, 7 Mar 2016 22:40:07 +0000 (22:40 +0000)]
Remove unused import in Orc C API
Summary: It is not used.
Reviewers: lhames
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D17251
llvm-svn: 262870