Chaoren Lin [Wed, 5 Aug 2015 17:42:44 +0000 (17:42 +0000)]
Allow sysroot and python to be specified for Android build.
llvm-svn: 244072
Alex Lorenz [Wed, 5 Aug 2015 17:41:17 +0000 (17:41 +0000)]
MIR Serialization: Serialize the 'debug-use' register operand flag.
llvm-svn: 244071
Chris Bieneman [Wed, 5 Aug 2015 17:38:12 +0000 (17:38 +0000)]
[CMake] First pass at adding support for clang bootstrap builds to CMake
Summary:
This patch adds a new CLANG_ENABLE_BOOTSTRAP option to CMake which adds targets for building a stage2 bootstrap compiler. The targets are:
bootstrap-configure
bootstrap-build
bootstrap (same as bootstrap-configure and bootstrap-build)
bootstrap-install
bootstrap-check-llvm
bootstrap-check-clang
bootstrap-check-all
If you are using 3.3.
20150708 or greater it utilizes the ninja USES_TERMINAL_* settings on the external project so that the output is properly buffered.
Reviewers: bogner, chandlerc
Subscribers: filcab, cfe-commits
Differential Revision: http://reviews.llvm.org/D11743
llvm-svn: 244070
Chaoren Lin [Wed, 5 Aug 2015 17:36:54 +0000 (17:36 +0000)]
Flush stderr on dosep status update for Windows.
llvm-svn: 244069
Alex Lorenz [Wed, 5 Aug 2015 17:35:55 +0000 (17:35 +0000)]
MIR Parser: Simplify the handling of quoted tokens. NFC.
The machine instructions lexer should not expose the difference between quoted
and unquoted tokens to the parser.
llvm-svn: 244068
Chad Rosier [Wed, 5 Aug 2015 17:35:34 +0000 (17:35 +0000)]
[AArch64] Register AArch64DeadRegisterDefinition pass with LLVM pass manager.
llvm-svn: 244067
Argyrios Kyrtzidis [Wed, 5 Aug 2015 17:23:59 +0000 (17:23 +0000)]
[test/Index] Update libclang tests to use libclang for creating PCH files.
This is consistent and tests the primary configuration we want to test, libclang
creating and consuming PCH files.
llvm-svn: 244066
Chandler Carruth [Wed, 5 Aug 2015 17:07:33 +0000 (17:07 +0000)]
Fix a tiny bug in -no-canonical-prefixes that somehow we have never
noticed until now.
The code for setting up the driver's InstalledDir didn't respect
-no-canonical-prefixes. Because of this, there are a few places in the
driver where we would unexpectedly form absolute paths, notably when
searching for and finding GCC installations to use, etc. The fix is
straightforward, and I've added this path to '-v' both so we can test it
sanely and so that it will be substantially more obvious the next time
someone has to debug something here.
Note that there is another bug that we don't actually *canonicalize* the
installed directory! I don't really want to fix that because I don't
have a realistic way to test the usage of this mode. I suspect that
folks using the shared module cache would care about getting this right
though, and so they might want to address it. I've left the appropriate
FIXMEs so that it is clear what to change, and I've updated the test
code to make it clear what is happening here.
llvm-svn: 244065
James Y Knight [Wed, 5 Aug 2015 17:00:30 +0000 (17:00 +0000)]
[Sparc] Fix disassembly of popc instruction.
And add tests.
Patch by David Wiberg!
llvm-svn: 244064
James Y Knight [Wed, 5 Aug 2015 16:57:36 +0000 (16:57 +0000)]
Add missing atomic libcall support.
Support for emitting libcalls for __atomic_fetch_nand and
__atomic_{add,sub,and,or,xor,nand}_fetch was missing; add it, and some
test cases.
Differential Revision: http://reviews.llvm.org/D10847
llvm-svn: 244063
Matt Arsenault [Wed, 5 Aug 2015 16:42:57 +0000 (16:42 +0000)]
AMDGPU/SI: Remove EXECReg
For the same reasons as the other physical registers.
llvm-svn: 244062
Matt Arsenault [Wed, 5 Aug 2015 16:42:54 +0000 (16:42 +0000)]
AMDGPU: Remove SCCReg.
These should be handled as a physical register rather
than a virtual register class with one member.
llvm-svn: 244061
Chad Rosier [Wed, 5 Aug 2015 16:12:10 +0000 (16:12 +0000)]
[AArch64] Register (existing) AArch64BranchRelaxation pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.
llvm-svn: 244060
Steven Wu [Wed, 5 Aug 2015 15:36:38 +0000 (15:36 +0000)]
Force the MachO generated for Darwin to have VERSION_MIN load command
On Darwin, it is required to stamp the object file with VERSION_MIN load
command. This commit will provide a VERSRION_MIN load command to the
MachO file that doesn't specify the version itself by inferring from
Target Triple.
llvm-svn: 244059
Hans Wennborg [Wed, 5 Aug 2015 15:36:07 +0000 (15:36 +0000)]
test-release.sh: Fix naming of OpenMP runtime tarball
llvm-svn: 244058
Chad Rosier [Wed, 5 Aug 2015 15:32:23 +0000 (15:32 +0000)]
[AArch64] Make the naming of the Address Type Promotion pass consistent.
llvm-svn: 244057
Chad Rosier [Wed, 5 Aug 2015 15:18:58 +0000 (15:18 +0000)]
[AArch64] Register (existing) AArch64AdvSIMDScalar pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.
IIRC, this pass is off by default, but it's still helpful when debugging.
llvm-svn: 244056
Adhemerval Zanella [Wed, 5 Aug 2015 15:17:59 +0000 (15:17 +0000)]
[tsan] Enable tsan for aarch64
This patch enabled TSAN for aarch64 with 39-bit VMA layout. As defined by
tsan_platform.h the layout used is:
0000 4000 00 - 0200 0000 00: main binary
2000 0000 00 - 4000 0000 00: shadow memory
4000 0000 00 - 5000 0000 00: metainfo
5000 0000 00 - 6000 0000 00: -
6000 0000 00 - 6200 0000 00: traces
6200 0000 00 - 7d00 0000 00: -
7d00 0000 00 - 7e00 0000 00: heap
7e00 0000 00 - 7fff ffff ff: modules and main thread stack
Which gives it about 8GB for main binary, 4GB for heap and 8GB for
modules and main thread stack.
Most of tests are passing, with the exception of:
* ignore_lib0, ignore_lib1, ignore_lib3 due a kernel limitation for
no support to make mmap page non-executable.
* longjmp tests due missing specialized assembly routines.
These tests are xfail for now.
The only tsan issue still showing is:
rtl/TsanRtlTest/Posix.ThreadLocalAccesses
Which still required further investigation. The test is disable for
aarch64 for now.
llvm-svn: 244055
Adhemerval Zanella [Wed, 5 Aug 2015 15:13:33 +0000 (15:13 +0000)]
[asan] Enable asan for aarch64
This patch enables asan for aarch64/linux. It marks it as 'unstable-release',
since some tests are failing due either kernel missing support of non-executable
pages in mmap or environment instability (infinite loop in juno reference
boards).
It sets decorate_proc_maps test to require stable-release, since the test expects
the shadow memory to not be executable and the support for aarch64 is only
added recently by Linux (
da141706aea52c1a9 - 4.0).
It also XFAIL static_tls test for aarch64 linker may omit the __tls_get_addr call
as a TLS optimization.
llvm-svn: 244054
Sanjay Patel [Wed, 5 Aug 2015 15:12:03 +0000 (15:12 +0000)]
revert r243687: enable fast-math-flag propagation to DAG nodes
We can't propagate FMF partially without breaking DAG-level CSE. We either need to
relax CSE to account for mismatched FMF as a temporary work-around or fully propagate
FMF throughout the DAG.
Surprisingly, there are no existing regression tests for this, but here's an example:
define float @fmf(float %a, float %b) {
%mul1 = fmul fast float %a, %b
%nega = fsub fast float 0.0, %a
%mul2 = fmul fast float %nega, %b
%abx2 = fsub fast float %mul1, %mul2
ret float %abx2
}
$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=0
...
vmulss %xmm1, %xmm0, %xmm0
vaddss %xmm0, %xmm0, %xmm0
retq
$ llc -o - badflags.ll -march=x86-64 -mattr=fma -enable-unsafe-fp-math -enable-fmf-dag=1
...
vmulss %xmm1, %xmm0, %xmm2
vfmadd213ss %xmm2, %xmm1, %xmm0 <--- failed to recognize that (a * b) was already calculated
retq
llvm-svn: 244053
Douglas Katzman [Wed, 5 Aug 2015 15:08:54 +0000 (15:08 +0000)]
[SHAVE] uppercase the CHECK prefixes in 'lit' tests. NFC
llvm-svn: 244052
Douglas Katzman [Wed, 5 Aug 2015 15:08:53 +0000 (15:08 +0000)]
Delete trailing whitespace
llvm-svn: 244051
Rafael Espindola [Wed, 5 Aug 2015 15:08:40 +0000 (15:08 +0000)]
Add bare minimum to get a working i386 linux program.
llvm-svn: 244050
Chad Rosier [Wed, 5 Aug 2015 14:52:01 +0000 (14:52 +0000)]
Officially end my reign as owner of the driver.
llvm-svn: 244049
Chad Rosier [Wed, 5 Aug 2015 14:48:44 +0000 (14:48 +0000)]
Make this less error prone by using a #define. NFC.
llvm-svn: 244048
Marshall Clow [Wed, 5 Aug 2015 14:36:42 +0000 (14:36 +0000)]
Update some links so that they don't point at the (private) WG21 Wiki
llvm-svn: 244047
Chad Rosier [Wed, 5 Aug 2015 14:22:53 +0000 (14:22 +0000)]
[AArch64] Register (existing) AArch64ExpandPseudo pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.
llvm-svn: 244046
Benjamin Kramer [Wed, 5 Aug 2015 14:16:44 +0000 (14:16 +0000)]
[AA] Use CallSite cast idiom. No functionality change.
llvm-svn: 244045
Benjamin Kramer [Wed, 5 Aug 2015 14:16:38 +0000 (14:16 +0000)]
[YAMLTraits] Use StringRef::copy. No functionality change.
llvm-svn: 244044
Benjamin Kramer [Wed, 5 Aug 2015 14:16:28 +0000 (14:16 +0000)]
[IR] Simplify code with ArrayRef::copy. No functionality change.
llvm-svn: 244043
Rafael Espindola [Wed, 5 Aug 2015 13:55:34 +0000 (13:55 +0000)]
For now we only have on Chunk type. Simplify.
The others we have in sight are
* common symbols.
* entries in SHF_MERGE sections.
They will have a substantially different treatment. It is not clear if it is
worth it putting them all in a single list just to dispatch based on the kind on
the other side.
I hope to implement common symbols soon, and then we will be in a position
to have a concrete discussion. For now this is simpler for the the implemented
features.
llvm-svn: 244042
Chad Rosier [Wed, 5 Aug 2015 13:44:51 +0000 (13:44 +0000)]
[AArch64] Register (existing) AArch64LoadStoreOpt pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to
dump IR around this pass.
This is the AArch64 version of r243052.
llvm-svn: 244041
Rafael Espindola [Wed, 5 Aug 2015 13:26:54 +0000 (13:26 +0000)]
Delete dead code.
llvm-svn: 244040
Sylvestre Ledru [Wed, 5 Aug 2015 12:46:53 +0000 (12:46 +0000)]
Bug 24332 - Fix the build of lldb under GNU/Linux when using autotools
Reviewers: loladiro, jingham, emaste, zturner, brucem
Subscribers: tberghammer, danalbert, srhines, zturner, lldb-commits
Differential Revision: http://reviews.llvm.org/D11717
llvm-svn: 244039
Chad Rosier [Wed, 5 Aug 2015 12:40:13 +0000 (12:40 +0000)]
Update comment. NFC.
llvm-svn: 244038
Rafael Espindola [Wed, 5 Aug 2015 12:14:51 +0000 (12:14 +0000)]
Rename asm tests to .s. NFC.
llvm-svn: 244037
Aaron Ballman [Wed, 5 Aug 2015 12:11:30 +0000 (12:11 +0000)]
Add AST matchers for narrowing constructors that are default, copy, or move constructors, as well as functionality to determine whether a ctor initializer is a base initializer.
llvm-svn: 244036
Rafael Espindola [Wed, 5 Aug 2015 12:03:34 +0000 (12:03 +0000)]
lld elf2: Diagnose trying to mix incompatible files.
This is also a step in instantiating the writer with the correct template
argument.
llvm-svn: 244035
Andrey Churbanov [Wed, 5 Aug 2015 12:00:07 +0000 (12:00 +0000)]
D11156: Fix comments by eliminating possible trademark conflicts
llvm-svn: 244034
Rafael Espindola [Wed, 5 Aug 2015 11:55:52 +0000 (11:55 +0000)]
Use ELFOSABI_NONE. This matches both bfd ld and gold.
llvm-svn: 244033
Rafael Espindola [Wed, 5 Aug 2015 11:53:59 +0000 (11:53 +0000)]
Drop unnecessary static_cast.
ELFT::TargetEndianness already has the correct type.
llvm-svn: 244032
Andrey Churbanov [Wed, 5 Aug 2015 11:23:10 +0000 (11:23 +0000)]
D11301: Remove the __kmp_invoke_microtask() that relies on libffi
llvm-svn: 244031
Andrey Churbanov [Wed, 5 Aug 2015 11:12:45 +0000 (11:12 +0000)]
D11159: Fixing the stack offset functionality
llvm-svn: 244030
Artyom Skrobov [Wed, 5 Aug 2015 11:02:14 +0000 (11:02 +0000)]
ARMISelDAGToDAG.cpp had this self-contradictory code:
return StringSwitch<int>(Flags)
.Case("g", 0x1)
.Case("nzcvq", 0x2)
.Case("nzcvqg", 0x3)
.Default(-1);
...
// The _g and _nzcvqg versions are only valid if the DSP extension is
// available.
if (!Subtarget->hasThumb2DSP() && (Mask & 0x2))
return -1;
ARMARM confirms that the comment is right, and the code was wrong.
llvm-svn: 244029
Benjamin Kramer [Wed, 5 Aug 2015 09:40:49 +0000 (09:40 +0000)]
[AST] ArrayRefize template param list info setters. No functionality change intended.
llvm-svn: 244028
Benjamin Kramer [Wed, 5 Aug 2015 09:40:35 +0000 (09:40 +0000)]
[AST] ArrayRefize BlockDecl::setCaptures. No functionality change intended.
llvm-svn: 244027
Benjamin Kramer [Wed, 5 Aug 2015 09:40:22 +0000 (09:40 +0000)]
[AST] ArrayRefize template argument packs. No functionality change intended.
llvm-svn: 244026
Benjamin Kramer [Wed, 5 Aug 2015 09:40:04 +0000 (09:40 +0000)]
[Comments] Replace custom ArrayRef copying with ArrayRef::copy. NFC.
llvm-svn: 244025
Benjamin Kramer [Wed, 5 Aug 2015 09:39:57 +0000 (09:39 +0000)]
[Parse] ArrayRefize PragmaLoopHintInfo. No functionality change.
llvm-svn: 244024
Benjamin Kramer [Wed, 5 Aug 2015 09:39:41 +0000 (09:39 +0000)]
[ArrayRefTest] Work around a GCC 4.8 internal compiler error.
llvm-svn: 244023
Simon Pilgrim [Wed, 5 Aug 2015 08:21:38 +0000 (08:21 +0000)]
[InstCombine] Added more specific SSE2/AVX2 vector shift tests.
llvm-svn: 244022
Simon Pilgrim [Wed, 5 Aug 2015 08:18:00 +0000 (08:18 +0000)]
Fixed line endings.
llvm-svn: 244021
Hal Finkel [Wed, 5 Aug 2015 07:45:28 +0000 (07:45 +0000)]
[MachineCombiner] Don't use the opcode-only form of computeInstrLatency
In r242277, I updated the MachineCombiner to work with itineraries, but I
missed a call that is scheduling-model-only (the opcode-only form of
computeInstrLatency). Using the form that takes an MI* allows this to work with
itineraries (and should be NFC for subtargets with scheduling models).
llvm-svn: 244020
Davide Italiano [Wed, 5 Aug 2015 07:18:31 +0000 (07:18 +0000)]
[llvm-objdump] Call exit(1) on error, i.e. fail early.
Previously we kept going on partly corrupted input, which might result
in garbage being printed, or even worse, random crashes.
Rafael mentioned that this is the GNU behavior as well, but after some
discussion we both agreed it's probably better to emit a reasonable
error message and exit. As a side-effect of this commit, now we don't
rely on global state for error codes anymore. objdump was the last tool
in the toolchain which needed to be converted. Hopefully the old behavior
won't sneak into the tree again.
llvm-svn: 244019
Filipe Cabecinhas [Wed, 5 Aug 2015 06:19:26 +0000 (06:19 +0000)]
Don't repeat function names in comments. NFC.
llvm-svn: 244018
NAKAMURA Takumi [Wed, 5 Aug 2015 06:11:23 +0000 (06:11 +0000)]
unittests/ADT/ArrayRefTest.cpp: Suppress r243995 on g++-4.8 for now to unbreak bots.
For example of mingw-w64-g++-4.8.1,
llvm/unittests/ADT/ArrayRefTest.cpp: In member function 'virtual void {anonymous}::ArrayRefTest_AllocatorCopy_Test::TestBody()':
llvm/unittests/ADT/ArrayRefTest.cpp:56:40: internal compiler error: in count_type_elements, at expr.c:5523
} Array3Src[] = {{"hello"}, {"world"}};
^
Please submit a full bug report,
with preprocessed source if appropriate.
llvm-svn: 244017
NAKAMURA Takumi [Wed, 5 Aug 2015 06:11:08 +0000 (06:11 +0000)]
Windows/COM.inc: Fix emacs mode in the first line.
llvm-svn: 244016
Eric Christopher [Wed, 5 Aug 2015 05:32:22 +0000 (05:32 +0000)]
Temporarily revert r244012 while we see if it's really necessary.
Add a comment explaining the current theory as to why we'd need
the -lole32 on the link line.
llvm-svn: 244015
Eric Christopher [Wed, 5 Aug 2015 04:50:46 +0000 (04:50 +0000)]
Remove autoconf checks for sigsetjmp and siglongjmp as they appear to
be unused.
llvm-svn: 244014
Eric Christopher [Wed, 5 Aug 2015 04:50:43 +0000 (04:50 +0000)]
Remove the apparently unused rand48 configure checks and associated m4.
llvm-svn: 244013
Eric Christopher [Wed, 5 Aug 2015 04:50:40 +0000 (04:50 +0000)]
Remove obsolete configure check for libole32 as we don't appear to use
it anymore.
llvm-svn: 244012
Eric Christopher [Wed, 5 Aug 2015 04:50:37 +0000 (04:50 +0000)]
Remove the unused header check for utime.h.
llvm-svn: 244011
Tanya Lattner [Wed, 5 Aug 2015 04:19:04 +0000 (04:19 +0000)]
Update links to lists.llvm.org.
llvm-svn: 244009
Tanya Lattner [Wed, 5 Aug 2015 04:04:09 +0000 (04:04 +0000)]
Update to lists.llvm.org
llvm-svn: 244008
Tanya Lattner [Wed, 5 Aug 2015 04:03:05 +0000 (04:03 +0000)]
Update to new lists.llvm.org
llvm-svn: 244007
Tanya Lattner [Wed, 5 Aug 2015 04:02:43 +0000 (04:02 +0000)]
Update to new lists.llvm.org
llvm-svn: 244006
Tanya Lattner [Wed, 5 Aug 2015 04:01:47 +0000 (04:01 +0000)]
Update to new lists.llvm.org
llvm-svn: 244005
Tanya Lattner [Wed, 5 Aug 2015 04:01:26 +0000 (04:01 +0000)]
Update to new lists.llvm.org
llvm-svn: 244004
Tanya Lattner [Wed, 5 Aug 2015 03:59:14 +0000 (03:59 +0000)]
Update references to lists.llvm.org
llvm-svn: 244003
Tanya Lattner [Wed, 5 Aug 2015 03:58:00 +0000 (03:58 +0000)]
Update references to new lists.llvm.org mailing lists.
llvm-svn: 244002
Tanya Lattner [Wed, 5 Aug 2015 03:56:44 +0000 (03:56 +0000)]
Update references to new lists.llvm.org mailing lists.
llvm-svn: 244001
Tanya Lattner [Wed, 5 Aug 2015 03:55:23 +0000 (03:55 +0000)]
Update mailing list references to lists.llvm.org
llvm-svn: 244000
Tanya Lattner [Wed, 5 Aug 2015 03:51:17 +0000 (03:51 +0000)]
Rename all references to old mailing lists to new lists.llvm.org address.
llvm-svn: 243999
Yaron Keren [Tue, 4 Aug 2015 15:57:04 +0000 (15:57 +0000)]
Avoid passing nullptr to std::equal.
As documented in the LLVM Coding Standards, indeed MSVC incorrectly asserts
on this in Debug mode. This happens when building clang with Visual C++ and
-triple i686-pc-windows-gnu on these clang regression tests:
clang/test/CodeGen/2011-03-08-ZeroFieldUnionInitializer.c
clang/test/CodeGen/empty-union-init.c
llvm-svn: 243996
Benjamin Kramer [Tue, 4 Aug 2015 15:52:56 +0000 (15:52 +0000)]
[ArrayRef] Make copy use std::uninitialized_copy.
std::copy does not work for non-trivially copyable classes when we're
copying into uninitialized memory.
llvm-svn: 243995
Sanjay Patel [Tue, 4 Aug 2015 15:49:57 +0000 (15:49 +0000)]
wrap OptSize and MinSize attributes for easier and consistent access (NFCI)
Create wrapper methods in the Function class for the OptimizeForSize and MinSize
attributes. We want to hide the logic of "or'ing" them together when optimizing
just for size (-Os).
Currently, we are not consistent about this and rely on a front-end to always set
OptimizeForSize (-Os) if MinSize (-Oz) is on. Thus, there are 18 FIXME changes here
that should be added as follow-on patches with regression tests.
This patch is NFC-intended: it just replaces existing direct accesses of the attributes
by the equivalent wrapper call.
Differential Revision: http://reviews.llvm.org/D11734
llvm-svn: 243994
Rafael Espindola [Tue, 4 Aug 2015 15:45:54 +0000 (15:45 +0000)]
Create ObjectFile with the correct endian and word size.
The writer is still hard coded to 64 bits le, but with this we can test for
invalid ELF files.
llvm-svn: 243993
Benjamin Kramer [Tue, 4 Aug 2015 15:38:49 +0000 (15:38 +0000)]
[CodeGen] Fold memcpy into SmallVector initializer. No functionality change.
llvm-svn: 243992
Hal Finkel [Tue, 4 Aug 2015 15:29:00 +0000 (15:29 +0000)]
[RuntimeDyld] Adapt PPC64 relocations to PPC32
Begin adapting some of the implemented PPC64 relocations for PPC32 (with a
test case).
Patch by Pierre-Andre Saulais!
llvm-svn: 243991
Sanjay Patel [Tue, 4 Aug 2015 15:21:56 +0000 (15:21 +0000)]
[x86] machine combiner reassociation: mark EFLAGS operand as 'dead'
In the commentary for D11660, I wasn't sure if it was alright to create new
integer machine instructions without also creating the implicit EFLAGS operand.
From what I can see, the implicit operand is always created by the MachineInstrBuilder
based on the instruction type, so we don't have to do that explicitly. However, in
reviewing the debug output, I noticed that the operand was not marked as 'dead'.
The machine combiner should do that to preserve future optimization opportunities
that may be checking for that dead EFLAGS operand themselves.
Differential Revision: http://reviews.llvm.org/D11696
llvm-svn: 243990
Benjamin Kramer [Tue, 4 Aug 2015 15:18:16 +0000 (15:18 +0000)]
[Sema] Add a crazy test case for r243987
It's not valid code (maybe it can be made valid, but I'm not sure how).
To trigger the crash fixed in r243987 requires a friend function with
more than four template parameter lists. With this test we have at least
some coverage.
llvm-svn: 243989
Rafael Espindola [Tue, 4 Aug 2015 15:06:36 +0000 (15:06 +0000)]
Use make_unique. NFC.
llvm-svn: 243988
Benjamin Kramer [Tue, 4 Aug 2015 14:46:06 +0000 (14:46 +0000)]
[Sema] Allocate SmallVector to the right size.
SmallVector::set_size does not reallocate the vector. Sadly I have no
idea how to test this. The vector never has more than one member in all
of the regression tests.
Found by inspection.
llvm-svn: 243987
Vasileios Kalintiris [Tue, 4 Aug 2015 14:35:50 +0000 (14:35 +0000)]
[mips][FastISel] Disable code generation for unsupported targets through FastISel.
Summary:
Previously, we would check whether the target is supported or not, only in
fastSelectInstruction(). This means that 64-bit targets could use FastISel too.
We fix this by checking every overridden method of the FastISel class and
by falling back to SelectionDAG if the target isn't supported. This change
should have been committed along with r243638, but somehow I missed it.
Reviewers: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11755
llvm-svn: 243986
Rafael Espindola [Tue, 4 Aug 2015 14:29:01 +0000 (14:29 +0000)]
The SymbolTable doesn't need to be a template.
It was already using just code that is common to all object files.
llvm-svn: 243985
Vasileios Kalintiris [Tue, 4 Aug 2015 14:26:35 +0000 (14:26 +0000)]
Revert r229675 - [mips] Avoid redundant sign extension of the result of binary bitwise instructions.
It introduced two regressions on 64-bit big-endian targets running under N32
(MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4, and
MultiSource/Applications/kimwitu++/kc) The issue is that on 64-bit targets
comparisons such as BEQ compare the whole GPR64 but incorrectly tell the
instruction selector that they operate on GPR32's. This leads to the
elimination of i32->i64 extensions that are actually required by
comparisons to work correctly.
There's currently a patch under review that fixes this problem.
llvm-svn: 243984
Rafael Espindola [Tue, 4 Aug 2015 14:08:11 +0000 (14:08 +0000)]
Remove a silly return.
llvm-svn: 243983
Rafael Espindola [Tue, 4 Aug 2015 14:00:56 +0000 (14:00 +0000)]
This function never returns null, don't check it.
llvm-svn: 243982
Tobias Grosser [Tue, 4 Aug 2015 13:54:20 +0000 (13:54 +0000)]
Optionally model read-only scalars
Even though read-only accesses to scalars outside of a scop do not need to be
modeled to derive valid transformations or to generate valid sequential code,
but information about them is useful when we considering memory footprint
analysis and/or kernel offloading.
llvm-svn: 243981
Rafael Espindola [Tue, 4 Aug 2015 13:39:30 +0000 (13:39 +0000)]
Remove SymbolTable::getChunks.
When we were using a std::sort over all the chunks we needed to put them in a
single storage.
Now that we just iterate over them and use a map to find the output section,
we can avoid allocating the temporary storage.
llvm-svn: 243980
Benjamin Kramer [Tue, 4 Aug 2015 13:34:50 +0000 (13:34 +0000)]
[AST] Really allocate a SmallVector to the right size.
set_size only resets the end pointer and asserts if it is used to grow
the buffer. This would crash when mangling a float with more than 80 bits,
add a test with a ppc double double (128 bits).
Found by inspection.
llvm-svn: 243979
Bruce Mitchener [Tue, 4 Aug 2015 13:25:23 +0000 (13:25 +0000)]
[lldb-mi] Fix non-OS X builds.
llvm-svn: 243978
Duncan P. N. Exon Smith [Tue, 4 Aug 2015 13:24:26 +0000 (13:24 +0000)]
Fix 80-column
llvm-svn: 243977
Duncan P. N. Exon Smith [Tue, 4 Aug 2015 13:23:30 +0000 (13:23 +0000)]
Linker: Fix ASan failure from r243961
r243883 and r243961 made a use-after-free far more likely:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/6041/steps/check-llvm%20asan/logs/stdio
Unresolved nodes get inserted into the `Cycles` array. If they later
get resolved through RAUW, we need to update the reference. It's
interesting that this never hit before (maybe an asan-ified clang
bootstrap with `-flto -g` would have hit it, but I admit I haven't tried
anything quite that crazy).
llvm-svn: 243976
Bruce Mitchener [Tue, 4 Aug 2015 13:12:31 +0000 (13:12 +0000)]
[lldb-mi] Simplify MICmnMIOutOfBandRecord implementation.
Summary:
* Remove extraneous members that were just storing temporary
values.
* OutOfBand_e parameters don't need to be const as they are
scalars.
* Switch from a map with CMIUtilString values to using a mapping
function. This uses a switch statement which will generate
a warning if a new result class is added.
* Make BuildAsyncRecord a static function rather than a private
member function so that we can construct the result text
correctly and avoid having extra stuff in the header.
Reviewers: abidh, ki.stfu
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11751
llvm-svn: 243975
Benjamin Kramer [Tue, 4 Aug 2015 12:59:41 +0000 (12:59 +0000)]
[AST] Simplify code by letting ArrayRef do the copying.
No functionality change intended.
llvm-svn: 243974
Benjamin Kramer [Tue, 4 Aug 2015 12:34:30 +0000 (12:34 +0000)]
[CodeGen] Don't write into a SmallVector's uninitialized memory.
That's just ugly and not needed in this case. No functionality change.
llvm-svn: 243973
Benjamin Kramer [Tue, 4 Aug 2015 12:34:23 +0000 (12:34 +0000)]
[ASTContext] Add a templated convenience wrapper for Allocate.
This brings ASTContext closer to LLVM's Allocator concept. Ideally we
would just derive ASTContext from llvm::AllocatorBase, but that does
not work because ASTContext's allocator is mutable and we allocate using
const ASTContext& everywhere.
llvm-svn: 243972
Tobias Grosser [Tue, 4 Aug 2015 11:49:39 +0000 (11:49 +0000)]
Run ScopInfo after the ScopViewers
This change is required to see the detected scops even in cases where there is
no other ScopInfo user after the ScopViewers. Before this change, when
running with -polly-optimizer=none -polly-code-generator=none detected scops
have not been shown.
llvm-svn: 243971
Benjamin Kramer [Tue, 4 Aug 2015 11:27:08 +0000 (11:27 +0000)]
[FileManager] Use StringRef::copy to store canonical paths.
No functional change intended.
llvm-svn: 243970