Bruce Mitchener [Wed, 22 Jul 2015 13:46:32 +0000 (13:46 +0000)]
[lldb-mi tests] Fix typo of sensitive.
llvm-svn: 242900
Hubert Tong [Wed, 22 Jul 2015 13:32:36 +0000 (13:32 +0000)]
[CONCEPTS] Add diagnostics: non-defining function; non-namespace scope
Summary:
Create diagnostic for function concept declaration which is not a
definition.
Create diagnostic for concept declaration which isn't in namespace
scope.
Create associated tests.
Reviewers: rsmith, faisalv, fraggamuffin, hubert.reinterpretcast
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11027
Patch by Nathan Wilson!
llvm-svn: 242899
NAKAMURA Takumi [Wed, 22 Jul 2015 12:38:10 +0000 (12:38 +0000)]
StmtOpenMP.h: Fix a couple of \param(s) in r242785. [-Wdocumentation]
llvm-svn: 242898
Chandler Carruth [Wed, 22 Jul 2015 12:15:33 +0000 (12:15 +0000)]
[PM/AA] Update to reflect the new LLVM API which no longer requires an
AliasAnalysis pointer.
llvm-svn: 242897
Asaf Badouh [Wed, 22 Jul 2015 12:00:43 +0000 (12:00 +0000)]
[X86][AVX512] add reduce/range/scalef/rndScale
include encoding and intrinsics
Differential Revision: http://reviews.llvm.org/D11222
llvm-svn: 242896
Chandler Carruth [Wed, 22 Jul 2015 11:57:28 +0000 (11:57 +0000)]
[GMR] Add a flag to enable GlobalsModRef in the normal compilation
pipeline.
Even before I started improving its runtime, it was already crazy fast
once the call graph exists, and if we can get it to be conservatively
correct, will still likely catch a lot of interesting and useful cases.
So it may well be useful to enable by default.
But more importantly for me, this should make it easier for me to test
that changes aren't breaking it in fundamental ways by enabling it for
normal builds.
llvm-svn: 242895
Benjamin Kramer [Wed, 22 Jul 2015 11:54:19 +0000 (11:54 +0000)]
[dsymutil] Remove extra semicolon. NFC.
llvm-svn: 242894
Chandler Carruth [Wed, 22 Jul 2015 11:47:54 +0000 (11:47 +0000)]
[GMR] Switch from std::set to SmallPtrSet. NFC.
This almost certainly doesn't matter in some deep sense, but std::set is
essentially always going to be slower here. Now the alias query should
be essentially constant time instead of having to chase the set tree
each time.
llvm-svn: 242893
Chandler Carruth [Wed, 22 Jul 2015 11:43:24 +0000 (11:43 +0000)]
[GMR] Only look in the associated allocs map for an underlying value if
it wasn't one of the indirect globals (which clearly cannot be an
allocation function call). Also only do a single lookup into this map
instead of two. NFC.
llvm-svn: 242892
Chandler Carruth [Wed, 22 Jul 2015 11:36:09 +0000 (11:36 +0000)]
[GMR] Switch to a DenseMap and clean up the iteration loop. NFC.
Since we have to iterate this map not that infrequently, we should use
a map that is efficient for iteration. It is also almost certainly much
faster for lookups as well. There is more to do in terms of reducing the
wasted overhead of GMR's runtime though. Not sure how much is worthwhile
though.
The loop improvements should hopefully address the code review that
Duncan gave when he saw this code as I moved it around.
llvm-svn: 242891
Chandler Carruth [Wed, 22 Jul 2015 11:22:29 +0000 (11:22 +0000)]
Fix a -Winconsistent-missing-override failure in the .intel_syntax
patch.
llvm-svn: 242890
Michael Kuperstein [Wed, 22 Jul 2015 11:19:22 +0000 (11:19 +0000)]
Fix test from r242886 to use the right triple.
llvm-svn: 242889
Chandler Carruth [Wed, 22 Jul 2015 11:10:41 +0000 (11:10 +0000)]
[PM/AA] Try to fix libc++ build bots which require the type used in
std::list to be complete by hoisting the entire definition into the
class. Ugly, but hopefully works.
llvm-svn: 242888
Tamas Berghammer [Wed, 22 Jul 2015 11:00:06 +0000 (11:00 +0000)]
XFAIL watchpoint tests on Android arm/aarch64
Differential revision: http://reviews.llvm.org/D11409
llvm-svn: 242887
Michael Kuperstein [Wed, 22 Jul 2015 10:49:44 +0000 (10:49 +0000)]
[X86] Add .intel_syntax noprefix directive to intel-syntax x86 asm output
Patch by: michael.zuckerman@intel.com
Differential Revision: http://reviews.llvm.org/D11223
llvm-svn: 242886
Simon Atanasyan [Wed, 22 Jul 2015 10:32:19 +0000 (10:32 +0000)]
[ELF] Protect write access to the ELFLinkingContext::_cidentSections by a mutex
The _cidentSections container is filled during files parsing so we need to
serialize a concurrent access to it.
llvm-svn: 242885
Michael Kuperstein [Wed, 22 Jul 2015 10:29:29 +0000 (10:29 +0000)]
Fix mem2reg to correctly handle allocas only used in a single block
Currently, a load from an alloca that is used in as single block and is not preceded
by a store is replaced by undef. This is not always correct if the single block is
inside a loop.
Fix the logic so that:
1) If there are no stores in the block, replace the load with an undef, as before.
2) If there is a store (regardless of where it is in the block w.r.t the load), bail
out, and let the rest of mem2reg handle this alloca.
Patch by: gil.rapaport@intel.com
Differential Revision: http://reviews.llvm.org/D11355
llvm-svn: 242884
Kuba Brecka [Wed, 22 Jul 2015 10:25:38 +0000 (10:25 +0000)]
[asan] Improve moving of non-instrumented allocas
In r242510, non-instrumented allocas are now moved into the first basic block. This patch limits that to only move allocas that are present *after* the first instrumented one (i.e. only move allocas up). A testcase was updated to show behavior in these two cases. Without the patch, an alloca could be moved down, and could cause an invalid IR.
Differential Revision: http://reviews.llvm.org/D11339
llvm-svn: 242883
Chandler Carruth [Wed, 22 Jul 2015 09:52:54 +0000 (09:52 +0000)]
[PM/AA] Remove all of the dead AliasAnalysis pointers being threaded
through APIs that are no longer necessary now that the update API has
been removed.
This will make changes to the AA interfaces significantly less
disruptive (I hope). Either way, it seems like a really nice cleanup.
llvm-svn: 242882
Chandler Carruth [Wed, 22 Jul 2015 09:49:59 +0000 (09:49 +0000)]
[PM/AA] Remove the last of the legacy update API from AliasAnalysis as
part of simplifying its interface and usage in preparation for porting
to work with the new pass manager.
Note that this will likely expose that we have dead arguments, members,
and maybe even pass requirements for AA. I'll be cleaning those up in
seperate patches. This just zaps the actual update API.
Differential Revision: http://reviews.llvm.org/D11325
llvm-svn: 242881
Chandler Carruth [Wed, 22 Jul 2015 09:44:54 +0000 (09:44 +0000)]
[PM/AA] Switch to an early-exit. NFC. This was split out of another
change because the diff is *useless*. I assure you, I just switched to
early-return in this function.
Cleanup in preparation for my next commit, as requested in code review!
llvm-svn: 242880
Chandler Carruth [Wed, 22 Jul 2015 09:34:18 +0000 (09:34 +0000)]
[PM/AA] Put the 'final' keyword in the correct place. And actually
succeed at compiling my change before committing it too!
llvm-svn: 242879
Chandler Carruth [Wed, 22 Jul 2015 09:27:58 +0000 (09:27 +0000)]
[PM/AA] Replace the only use of the AliasAnalysis::deleteValue API (in
GlobalsModRef) with CallbackVHs that trigger the same behavior.
This is technically more expensive, but in benchmarking some LTO runs,
it seems unlikely to even be above the noise floor. The only way I was
able to measure the performance of GMR at all was to run nothing else
but this one analysis on a linked clang bitcode file. The call graph
analysis still took 5x more time than GMR, and this change at most made
GMR 2% slower (this is well within the noise, so its hard for me to be
sure that this is an actual change). However, in a real LTO run over the
same bitcode, the GMR run takes so little time that the pass timers
don't measure it.
With this, I can remove the last update API from the AliasAnalysis
interface, but I'll actually remove the interface hook point in
a follow-up commit.
Differential Revision: http://reviews.llvm.org/D11324
llvm-svn: 242878
Elena Demikhovsky [Wed, 22 Jul 2015 08:56:00 +0000 (08:56 +0000)]
AVX-512: Added intrinsics for VCVT* instructions.
All SKX forms. All VCVT instructions for float/double/int/long types.
Differential Revision: http://reviews.llvm.org/D11343
llvm-svn: 242877
Ravitheja Addepally [Wed, 22 Jul 2015 08:41:18 +0000 (08:41 +0000)]
Test commit
llvm-svn: 242876
Pavel Labath [Wed, 22 Jul 2015 08:12:01 +0000 (08:12 +0000)]
Fix warnings found by -Wextra-semi
patch by Eugene Zelenko.
llvm-svn: 242875
Pavel Labath [Wed, 22 Jul 2015 07:58:17 +0000 (07:58 +0000)]
Make stream::operator<< take "const" void *
Summary:
This enables us to avoid casts to "void *" in some cases and avoids a couple of "casts off const
qualifiers" warnings.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11388
llvm-svn: 242874
Chen Li [Wed, 22 Jul 2015 05:26:29 +0000 (05:26 +0000)]
[LoopUnswitch] Code refactoring to separate trivial loop unswitch and non-trivial loop unswitch in processCurrentLoop()
Summary: The current code in LoopUnswtich::processCurrentLoop() mixes trivial loop unswitch and non-trivial loop unswitch together. It goes over all basic blocks in the loop and checks if a condition is trivial or non-trivial unswitch condition. However, trivial unswitch condition can only occur in the loop header basic block (where it controls whether or not the loop does something at all). This refactoring separate trivial loop unswitch and non-trivial loop unswitch. Before going over all basic blocks in the loop, it checks if the loop header contains a trivial unswitch condition. If so, unswitch it. Otherwise, go over all blocks like before but don't check trivial condition any more since they are not possible to be in the other blocks. This code has no functionality change.
Reviewers: meheff, reames, broune
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D11276
llvm-svn: 242873
Eric Fiselier [Wed, 22 Jul 2015 04:37:12 +0000 (04:37 +0000)]
Remove more commented out code. That is what version control is for.
llvm-svn: 242872
Jingyue Wu [Wed, 22 Jul 2015 04:16:52 +0000 (04:16 +0000)]
[BranchFolding] do not iterate the aliases of virtual registers
Summary:
MCRegAliasIterator only works for physical registers. So, do not run it
on virtual registers.
With this issue fixed, we can resurrect the BranchFolding pass in NVPTX
backend.
Reviewers: jholewinski, bkramer
Subscribers: henryhu, meheff, llvm-commits, jholewinski
Differential Revision: http://reviews.llvm.org/D11174
llvm-svn: 242871
Eric Fiselier [Wed, 22 Jul 2015 04:14:38 +0000 (04:14 +0000)]
Cleanup <__functional_03>
<__functional_03> provides the C++03 definitions for std::memfun and
std::function. However the interaction between <functional> and <__functional_03>
is ugly and duplicates code needlessly. This patch cleans up how the two
headers work together.
The major changes are:
- Provide placeholders, is_bind_expression and is_placeholder in <functional>
for both C++03 and C++11.
- Provide bad_function_call, function fwd decl,
__maybe_derive_from_unary_function and __maybe_derive_from_binary_function
in <functional> for both C++03 and C++11.
- Move the <__functional_03> include to the bottom of <functional>. This makes
it easier to see how <__functional_03> interacts with <functional>
- Remove a commented out implementation of bind in C++03. It's never going
to get implemented.
- Mark almost all std::bind tests as unsupported in C++03. std::is_placeholder
works in C++03 and C++11. std::is_bind_expression is provided in C++03 but
always returns false.
llvm-svn: 242870
Chandler Carruth [Wed, 22 Jul 2015 03:32:42 +0000 (03:32 +0000)]
[SROA] Fix a nasty pile of bugs to do with big-endian, different alloca
types and loads, loads or stores widened past the size of an alloca,
etc.
This started off with a bug report about big-endian behavior with
bitfields and loads and stores to a { i32, i24 } struct. An initial
attempt to fix this was sent for review in D10357, but that didn't
really get to the root of the problem.
The core issue was that canConvertValue and convertValue in SROA were
handling different bitwidth integers by doing a zext of the integer. It
wouldn't do a trunc though, only a zext! This would in turn lead SROA to
form an i24 load from an i24 alloca, zext it to i32, and then use it.
This would at least produce the wrong value for big-endian systems.
One of my many false starts here was to correct the computation for
big-endian systems by shifting. But this doesn't actually work because
the original code has a 64-bit store to the entire 8 bytes, and a 32-bit
load of the last 4 bytes, and because the alloc size is 8 bytes, we
can't lose that last (least significant if bigendian) byte! The real
problem here is that we're forming an i24 load in SROA which is actually
not sufficiently wide to load all of the necessary bits here. The source
has an i32 load, and SROA needs to form that as well.
The straightforward way to do this is to disable the zext logic in
canConvertValue and convertValue, forcing us to actually load all
32-bits. This seems like a really good change, but it in turn breaks
several other parts of SROA.
First in the chain of knock-on failures, we had places where we were
doing integer-widening promotion even though some of the integer loads
or stores extended *past the end* of the alloca's memory! There was even
a comment about preventing this, but it only prevented the case where
the type had a different bit size from its store size. So I added checks
to handle the cases where we actually have a widened load or store and
to avoid trying to special integer widening promotion in those cases.
Second, we actually rely on the ability to promote in the face of loads
past the end of an alloca! This is important so that we can (for
example) speculate loads around PHI nodes to do more promotion. The bits
loaded are garbage, but as long as they aren't used and the alignment is
suitable high (which it wasn't in the test case!) this is "fine". And we
can't stop promoting here, lots of things stop working well if we do. So
we need to add specific logic to handle the extension (and truncation)
case, but *only* where that extension or truncation are over bytes that
*are outside the alloca's allocated storage* and thus totally bogus to
load or store.
And of course, once we add back this correct handling of extension or
truncation, we need to correctly handle bigendian systems to avoid
re-introducing the exact bug that started us off on this chain of misery
in the first place, but this time even more subtle as it only happens
along speculated loads atop a PHI node.
I've ported an existing test for PHI speculation to the big-endian test
file and checked that we get that part correct, and I've added several
more interesting big-endian test cases that should help check that we're
getting this correct.
Fun times.
llvm-svn: 242869
Richard Smith [Wed, 22 Jul 2015 02:08:40 +0000 (02:08 +0000)]
[modules] Stop performing PCM lookups for all identifiers when building with C++ modules. Instead, serialize a list of interesting identifiers and mark those ones out of date on module import. Avoiding the identifier lookups here gives a 20-30% speedup in builds with large numbers of modules. No functionality change intended.
llvm-svn: 242868
Enrico Granata [Wed, 22 Jul 2015 02:06:37 +0000 (02:06 +0000)]
Add an Either<T,U> type to lldb_utility which represents a type-safe payload of either one type or another, à la Haskell
llvm-svn: 242867
Dawn Perchik [Wed, 22 Jul 2015 02:01:32 +0000 (02:01 +0000)]
Clean up wording in help for breakpoint --language option.
llvm-svn: 242866
Richard Smith [Wed, 22 Jul 2015 01:30:58 +0000 (01:30 +0000)]
SetVector: add reverse_iterator support.
llvm-svn: 242865
Eric Fiselier [Wed, 22 Jul 2015 01:29:41 +0000 (01:29 +0000)]
Fix initializer list order in <regex> to be correct
llvm-svn: 242864
Richard Smith [Wed, 22 Jul 2015 01:28:05 +0000 (01:28 +0000)]
[modules] Change module manager visitation order to be a bit more stable when
more modules are added: visit modules depth-first rather than breadth-first.
The visitation is still (approximately) oldest-to-newest, and still guarantees
that a module is visited before anything it imports, so modules that are
imported by others sometimes need to jump to a later position in the visitation
order when more modules are loaded, but independent module trees don't
interfere with each other any more.
llvm-svn: 242863
Chaoren Lin [Wed, 22 Jul 2015 01:17:51 +0000 (01:17 +0000)]
Xfail test_dyld_library_path for Android.
Originally, the source for the hidden lib_d and the regular lib_d were the same
file, so we always got the "correct" source for each. Splitting them up in
D11367 exposed a bug of showing the incorrect source file for the hidden lib_d.
llvm-svn: 242862
Eric Fiselier [Wed, 22 Jul 2015 00:33:36 +0000 (00:33 +0000)]
[libcxx] Add support for sanitizers on OS X.
Summary: This patch adds special configuration logic to find the compiler_rt libraries required by sanitizers on OS X. The supported sanitizers are Address and Undefined.
Reviewers: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D11381
llvm-svn: 242858
Davide Italiano [Wed, 22 Jul 2015 00:30:58 +0000 (00:30 +0000)]
[Sema] Diagnose use of declaration correctly.
Before we skipped that for virtual functions not fully qualified (r81507).
This commit basically reverts this to the older behaviour, which seems
more consistent. We now also correctly consider ill-formed calls to deleted
member functions, which were silently passed before in some cases.
The review contains the whole discussion.
PR: 20268
Differential Revision: http://reviews.llvm.org/D11334
llvm-svn: 242857
Bruce Mitchener [Wed, 22 Jul 2015 00:16:02 +0000 (00:16 +0000)]
Fix typos.
Summary: Fix a bunch of typos.
Reviewers: clayborg
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D11386
llvm-svn: 242856
Richard Smith [Tue, 21 Jul 2015 23:54:07 +0000 (23:54 +0000)]
[modules] In C++, stop serializing and deserializing a list of declarations in
the identifier table. This is redundant, since the TU-scope lookups are also
serialized as part of the TU DeclContext, and wasteful in a number of ways. We
still emit the decls for PCH / preamble builds, since for those we want
identical results, not merely semantically equivalent ones.
llvm-svn: 242855
Richard Trieu [Tue, 21 Jul 2015 23:38:30 +0000 (23:38 +0000)]
Change a test to follow the formatting of the rest of the tests in the file.
No functional change.
llvm-svn: 242854
Evgeniy Stepanov [Tue, 21 Jul 2015 23:03:13 +0000 (23:03 +0000)]
[sanitizer] Implement include_if_exists with process name substitution.
include_if_exists=/path/to/sanitizer/options reads flags from the
file if it is present. "%b" in the include file path (for both
variants of the flag) is replaced with the basename of the main
executable.
llvm-svn: 242853
Greg Clayton [Tue, 21 Jul 2015 22:53:51 +0000 (22:53 +0000)]
Improve the performance of DWARFDebugInfo::GetCompileUnitContainingDIE() by using a binary search.
Also switched DWARFDebugInfo::GetCompileUnit() over to using the same kind of binary search instead of using bsearch().
llvm-svn: 242852
Alexey Samsonov [Tue, 21 Jul 2015 22:51:55 +0000 (22:51 +0000)]
[Fuzzer] Rely on $PATH expansion instead of hardcoding paths in tests. NFC.
llvm-svn: 242851
Alexey Samsonov [Tue, 21 Jul 2015 22:51:49 +0000 (22:51 +0000)]
[Fuzzer] Clearly separate regular and DFSan tests. NFC.
llvm-svn: 242850
Daniel Jasper [Tue, 21 Jul 2015 22:51:00 +0000 (22:51 +0000)]
clang-format: Fix unary operator detection in for loops.
Before:
for (;; * a = b) {}
After:
for (;; *a = b) {}
llvm-svn: 242849
Frederic Riss [Tue, 21 Jul 2015 22:41:43 +0000 (22:41 +0000)]
[dsymutil] Implement ODR uniquing for C++ code.
This optimization allows the DWARF linker to reuse definition of
types it has emitted in previous CUs rather than reemitting them
in each CU that references them. The size and link time gains are
huge. For example when linking the DWARF for a debug build of
clang, this generates a ~150M dwarf file instead of a ~700M one
(the numbers date back a bit and must not be totally accurate
these days).
As with all the other parts of the llvm-dsymutil codebase, the
goal is to keep bit-for-bit compatibility with dsymutil-classic.
The code is littered with a lot of FIXMEs that should be
addressed once we can get rid of the compatibilty goal.
llvm-svn: 242847
Aaron Ballman [Tue, 21 Jul 2015 22:33:52 +0000 (22:33 +0000)]
Use range-based for loops; NFC.
llvm-svn: 242846
Alex Lorenz [Tue, 21 Jul 2015 22:28:27 +0000 (22:28 +0000)]
MIR Serialization: Start serializing the CFI operands with .cfi_def_cfa_offset.
This commit begins serialization of the CFI index machine operands by
serializing one kind of CFI instruction - the .cfi_def_cfa_offset instruction.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242845
Dawn Perchik [Tue, 21 Jul 2015 22:05:07 +0000 (22:05 +0000)]
Add support for specifying a language to use when parsing breakpoints.
Target and breakpoints options were added:
breakpoint set --language lang --name func
settings set target.language pascal
These specify the Language to use when interpreting the breakpoint's
expression (note: currently only implemented for breakpoints on
identifiers). If the breakpoint language is not set, the target.language
setting is used.
This support is required by Pascal, for example, to set breakpoint at 'ns.foo'
for function 'foo' in namespace 'ns'.
Tests on the language were also added to Module::PrepareForFunctionNameLookup
for efficiency.
Reviewed by: clayborg
Subscribers: jingham, lldb-commits
Differential Revision: http://reviews.llvm.org/D11119
llvm-svn: 242844
Nick Lewycky [Tue, 21 Jul 2015 21:56:26 +0000 (21:56 +0000)]
Fix a performance problem in memcpyopt by removing a linear scan over ranges when inserting a new range. No functionality change intended. Patch by Anthony Pesch!
llvm-svn: 242843
Jingyue Wu [Tue, 21 Jul 2015 21:50:39 +0000 (21:50 +0000)]
[MDA] change BlockScanLimit into a command line option.
Summary:
In the benchmark (https://github.com/vetter/shoc) we are researching,
the duplicated load is not eliminated because MemoryDependenceAnalysis
hit the BlockScanLimit. This patch change it into a command line option
instead of a hardcoded value.
Patched by Xuetian Weng.
Test Plan: test/Analysis/MemoryDependenceAnalysis/memdep-block-scan-limit.ll
Reviewers: jingyue, reames
Subscribers: reames, llvm-commits
Differential Revision: http://reviews.llvm.org/D11366
llvm-svn: 242842
Tim Northover [Tue, 21 Jul 2015 21:47:33 +0000 (21:47 +0000)]
ARM: actually define __ARM_ARCH_7S__ for the armv7s slice
We ended up with the wrong predefine after the recent TargetParser shuffle, and
I accidentally solidified it with a test. This should fix it.
llvm-svn: 242841
Bruno Cardoso Lopes [Tue, 21 Jul 2015 21:45:42 +0000 (21:45 +0000)]
[AsmPrinter] Check for valid constants in handleIndirectSymViaGOTPCRel
Check whether BaseCst is valid before extracting a GlobalValue.
This fixes PR24163.
Patch by David Majnemer.
llvm-svn: 242840
Michael J. Spencer [Tue, 21 Jul 2015 21:40:33 +0000 (21:40 +0000)]
[Object][ELF] Handle files with no section header string table.
llvm-svn: 242839
Bill Schmidt [Tue, 21 Jul 2015 21:40:17 +0000 (21:40 +0000)]
[PPC64LE] More vector swap optimization TLC
This makes one substantive change and a few stylistic changes to the
VSX swap optimization pass.
The substantive change is to permit LXSDX and LXSSPX instructions to
participate in swap optimization computations. The previous change to
insert a swap following a SUBREG_TO_REG widening operation makes this
almost trivial.
I experimented with also permitting STXSDX and STXSSPX instructions.
This can be done using similar techniques: we could insert a swap
prior to a narrowing COPY operation, and then permit these stores to
participate. I prototyped this, but discovered that the pattern of a
narrowing COPY followed by an STXSDX does not occur in any of our
test-suite code. So instead, I added commentary indicating that this
could be done.
Other TLC:
- I changed SH_COPYSCALAR to SH_COPYWIDEN to more clearly indicate
the direction of the copy.
- I factored the insertion of swap instructions into a separate
function.
Finally, I added a new test case to check that the scalar-to-vector
loads are working properly with swap optimization.
llvm-svn: 242838
Alex Lorenz [Tue, 21 Jul 2015 21:23:08 +0000 (21:23 +0000)]
MIR Parser: Reuse the function 'lexName' when lexing global value tokens. NFC.
This commit refactors the function 'maybeLexGlobalValue' so that now it reuses
the function 'lexName' when lexing a named global value token.
llvm-svn: 242837
Aaron Ballman [Tue, 21 Jul 2015 21:18:29 +0000 (21:18 +0000)]
Use a range-based for loop; NFC.
llvm-svn: 242836
Aaron Ballman [Tue, 21 Jul 2015 21:07:11 +0000 (21:07 +0000)]
Replace some uses of Self.Context with the local variable C; NFC.
llvm-svn: 242835
Sanjoy Das [Tue, 21 Jul 2015 20:59:22 +0000 (20:59 +0000)]
[SCEV][NFC] Fix a typo in a comment.
llvm-svn: 242834
Rafael Espindola [Tue, 21 Jul 2015 20:50:53 +0000 (20:50 +0000)]
Don't iterate over the program headers in the constructor of ELFFile.
Not every program needs this information.
In particular, it is necessary and sufficient for a static linker to scan the
section table.
llvm-svn: 242833
Rafael Espindola [Tue, 21 Jul 2015 20:46:21 +0000 (20:46 +0000)]
Don't assume ELFFile iterates over the program headers.
It will stop doing so shortly.
llvm-svn: 242832
Tanya Lattner [Tue, 21 Jul 2015 20:14:20 +0000 (20:14 +0000)]
Remove oversight group. Replace with LLVM Foundation Board of Directors.
llvm-svn: 242830
Rafael Espindola [Tue, 21 Jul 2015 19:57:43 +0000 (19:57 +0000)]
Make printValue a member function.
We were already passing 3 values it can get from ELFDumper.
llvm-svn: 242829
Rafael Espindola [Tue, 21 Jul 2015 19:38:32 +0000 (19:38 +0000)]
Remove always null argument.
llvm-svn: 242828
Philip Reames [Tue, 21 Jul 2015 19:04:38 +0000 (19:04 +0000)]
[RewriteStatepointsForGC] minor style cleanup
Use a named lambda for readability, common some code, remove a stale comments, and use llvm style variable names.
llvm-svn: 242827
David Blaikie [Tue, 21 Jul 2015 18:59:10 +0000 (18:59 +0000)]
Fix GCC build due to shadowing
llvm-svn: 242826
David Blaikie [Tue, 21 Jul 2015 18:37:18 +0000 (18:37 +0000)]
Pass an iterator range to EmitCallArgs
llvm-svn: 242824
David Blaikie [Tue, 21 Jul 2015 18:37:12 +0000 (18:37 +0000)]
Add some utilities to iterator_range for trimming a range and constructing one from a container.
To be used in clang in a follow-up commit.
llvm-svn: 242823
Rafael Espindola [Tue, 21 Jul 2015 18:20:17 +0000 (18:20 +0000)]
Remove getDynamicSymbolName.
llvm-svn: 242821
Rafael Espindola [Tue, 21 Jul 2015 18:15:32 +0000 (18:15 +0000)]
Drop last use of getDynamicSymbolName.
llvm-svn: 242820
Richard Smith [Tue, 21 Jul 2015 18:07:47 +0000 (18:07 +0000)]
[modules] Produce an error if -cc1 wants to implicitly build a module and no
module cache has been provided, rather than creating one in the current
directory.
llvm-svn: 242819
Rafael Espindola [Tue, 21 Jul 2015 18:04:29 +0000 (18:04 +0000)]
Remove getStaticSymbolName.
Every user now keeps track of the correct string table to use.
llvm-svn: 242818
Jonathan Peyton [Tue, 21 Jul 2015 18:03:30 +0000 (18:03 +0000)]
Fix OMPT support for task frames, parallel regions, and parallel regions + loops
This patch makes it possible for a performance tool that uses call stack
unwinding to map implementation-level call stacks from master and worker
threads into a unified global view. There are several components to this patch.
include/*/ompt.h.var
Add a new enumeration type that indicates whether the code for a master task
for a parallel region is invoked by the user program or the runtime system
Change the signature for OMPT parallel begin/end callbacks to indicate whether
the master task will be invoked by the program or the runtime system. This
enables a performance tool using call stack unwinding to handle these two
cases differently. For this case, a profiler that uses call stack unwinding
needs to know that the call path prefix for the master task may differ from
those available within the begin/end callbacks if the program invokes the
master.
kmp.h
Change the signature for __kmp_join_call to take an additional parameter
indicating the fork_context type. This is needed to supply the OMPT parallel
end callback with information about whether the compiler or the runtime
invoked the master task for a parallel region.
kmp_csupport.c
Ensure that the OMPT task frame field reenter_runtime_frame is properly set
and cleared before and after calls to fork and join threads for a parallel
region.
Adjust the code for the new signature for __kmp_join_call.
Adjust the OMPT parallel begin callback invocations to carry the extra
parameter indicating whether the program or the runtime invokes the master
task for a parallel region.
kmp_gsupport.c
Apply all of the analogous changes described for kmp_csupport.c for the GOMP
interface
Add OMPT support for the GOMP combined parallel region + loop API to
maintain the OMPT task frame field reenter_runtime_frame.
kmp_runtime.c:
Use the new information passed by __kmp_join_call to adjust the OMPT
parallel end callback invocations to carry the extra parameter indicating
whether the program or the runtime invokes the master task for a parallel
region.
ompt_internal.h:
Use the flavor of the parallel region API (GNU or Intel) to determine who
invokes the master task.
Differential Revision: http://reviews.llvm.org/D11259
llvm-svn: 242817
Rafael Espindola [Tue, 21 Jul 2015 18:00:39 +0000 (18:00 +0000)]
Keep track of which string table is associated with a symbol table.
This removes the last uses of getStaticSymbolName in lld.
llvm-svn: 242816
Chaoren Lin [Tue, 21 Jul 2015 17:50:52 +0000 (17:50 +0000)]
Xfail TestGdbRemoteAbort for Android API <= 16.
Reviewers: sivachandra
Subscribers: tberghammer, danalbert, srhines, lldb-commits
Differential Revision: http://reviews.llvm.org/D11378
llvm-svn: 242815
Chaoren Lin [Tue, 21 Jul 2015 17:50:49 +0000 (17:50 +0000)]
Re-enable static Android build after build master restart.
llvm-svn: 242814
Chaoren Lin [Tue, 21 Jul 2015 17:50:16 +0000 (17:50 +0000)]
Update TestLoadUnload to use base Makefile.
Summary:
The current Makefile scheme only allows one dylib to be specified in each make
invocation, so TestLoadUnload had a custom Makefile that's unrelated to the
base Makefile.rules. This change uses recursive make invocations to bypass the
single dylib restriction. See D11202 for more context.
Reviewers: clayborg
Subscribers: chaoren, lldb-commits
Differential Revision: http://reviews.llvm.org/D11367
llvm-svn: 242813
Chad Rosier [Tue, 21 Jul 2015 17:47:56 +0000 (17:47 +0000)]
Follow up to r242810. NFC.
llvm-svn: 242812
Reid Kleckner [Tue, 21 Jul 2015 17:42:37 +0000 (17:42 +0000)]
[asan] Remove AsanPlatformThreadInit
Since the CoreFoundation allocator replacement was moved in r173134, all
implementations of this function have been empty.
Reviewers: samsonov
Differential Revision: http://reviews.llvm.org/D11375
llvm-svn: 242811
Chad Rosier [Tue, 21 Jul 2015 17:42:04 +0000 (17:42 +0000)]
[AArch64] Simplify the passing of arguments. NFC.
This is setup for future work planned for the AArch64 Load/Store Opt pass.
llvm-svn: 242810
Reid Kleckner [Tue, 21 Jul 2015 17:40:14 +0000 (17:40 +0000)]
Re-land 242726 to use RAII to do cleanup
The LooksLikeCodeInBug11395() codepath was returning without clearing
the ProcessedAllocas cache.
llvm-svn: 242809
Philip Reames [Tue, 21 Jul 2015 17:18:03 +0000 (17:18 +0000)]
[RewriteStatepointsForGC] Hoist some code out of a loop
llvm-svn: 242808
Arnold Schwaighofer [Tue, 21 Jul 2015 17:07:07 +0000 (17:07 +0000)]
MergeFunc: Transfer the callee's attributes when replacing a direct caller
We insert a bitcast which obfuscates the getCalledFunction for the utility
function which looks up attributes from the called function. Loosing ABI
changing parameter attributes is a bad thing.
rdar://
21516488
llvm-svn: 242807
Alex Lorenz [Tue, 21 Jul 2015 16:59:53 +0000 (16:59 +0000)]
MIR Serialization: Serialize the external symbol machine operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242806
Philip Reames [Tue, 21 Jul 2015 16:51:17 +0000 (16:51 +0000)]
[RewriteStatepointsForGC] Delete trivial code
A bit more code cleanup: delete some a trivial true assertion and supporting code, remove a redundant cast, and use count in assertions where feasible.
llvm-svn: 242805
Rafael Espindola [Tue, 21 Jul 2015 16:50:57 +0000 (16:50 +0000)]
Remove dead code.
llvm-svn: 242804
Alex Lorenz [Tue, 21 Jul 2015 16:50:35 +0000 (16:50 +0000)]
IR: Extract a function 'printLLVMNameWithoutPrefix' from 'PrintLLVMName'. NFC.
This commit extracts the code that prints out a name of an LLVM value without a
prefix from a function 'PrintLLVMName' into a publicly accessible function named
'printLLVMNameWithoutPrefix'.
This change would be useful for MIR serialization, as it would allow the MIR
printer to reuse this function to print out the names of the external symbol
machine operands.
Reviewers: Duncan P. N. Exon Smith
llvm-svn: 242803
Rafael Espindola [Tue, 21 Jul 2015 16:42:01 +0000 (16:42 +0000)]
Remove always false parameter.
llvm-svn: 242802
Rafael Espindola [Tue, 21 Jul 2015 16:40:14 +0000 (16:40 +0000)]
Use range loop. NFC.
llvm-svn: 242801
Bob Wilson [Tue, 21 Jul 2015 16:40:03 +0000 (16:40 +0000)]
Update the documentation for "novtable" to match r242730.
llvm-svn: 242800
Kuba Brecka [Tue, 21 Jul 2015 16:31:35 +0000 (16:31 +0000)]
Reverting r242787, attempt 2.
llvm-svn: 242799
Rafael Espindola [Tue, 21 Jul 2015 16:26:21 +0000 (16:26 +0000)]
Replace the last uses of ELF::getSymbolName in llvm-readobj.
llvm-svn: 242798
Daniel Jasper [Tue, 21 Jul 2015 16:18:51 +0000 (16:18 +0000)]
Add missing parentheses to appease -Wlogical-op-parentheses.
Add missing case to appease -Wswitch.
llvm-svn: 242797
Sanjay Patel [Tue, 21 Jul 2015 16:09:58 +0000 (16:09 +0000)]
fix formatting; NFC
llvm-svn: 242796
Rafael Espindola [Tue, 21 Jul 2015 16:05:53 +0000 (16:05 +0000)]
Use helper function. NFC.
llvm-svn: 242795
Rafael Espindola [Tue, 21 Jul 2015 16:02:10 +0000 (16:02 +0000)]
llvm-readobj: use the associated string table to print symbols. NFI.
This just removes some cases that require ELFFile to eagerly parse the ELF
file.
llvm-svn: 242794