Commit Graph

234691 Commits

Author SHA1 Message Date
Sean Callanan 5b42f4b8f4 Handle variadic Objective-C methods from DWARF correctly.
<rdar://problem/22039804>

llvm-svn: 273632
2016-06-24 00:24:40 +00:00
Ahmed Bougacha f0b46ee0aa [ARM] Use aapcs_vfp for ___truncdfhf2 on v7k.
r215348 overrode the f16 libcalls to be soft-float, but
v7k uses the default (hard-float) calling convention.

llvm-svn: 273631
2016-06-24 00:08:01 +00:00
Evandro Menezes 62c70101c3 [AArch64] Model the cost of vector by element FP multiplies on Exynos M1. (NFC)
llvm-svn: 273630
2016-06-23 23:43:23 +00:00
Ryan Govostes 0ec8ab680f [asan] Add failure logging to global-registration.c test case
llvm-svn: 273629
2016-06-23 23:26:25 +00:00
Tom Stellard 14416ae6cd Support/ELF: Add R_AMDGPU_GOTPCREL relocation
Summary:
We will start generating this in a future patch.

Reviewers: arsenm, kzhuravl, rafael, ruiu, tony-tye

Subscribers: arsenm, llvm-commits, kzhuravl

Differential Revision: http://reviews.llvm.org/D21482

llvm-svn: 273628
2016-06-23 23:11:29 +00:00
Chris Bieneman 606f178aeb [MachOYAML] Use a temporary to avoid gcc strict-aliasing warning
GCC complains about this with -Wstrict-aliasing. Using a temporary here should prevent the warning.

llvm-svn: 273627
2016-06-23 23:01:47 +00:00
Hans Wennborg 4b63a98de3 [codeview] Add classes and unions to the Local/Global UDTs lists
Differential Revision: http://reviews.llvm.org/D21655

llvm-svn: 273626
2016-06-23 22:57:25 +00:00
Chandler Carruth 586fc7c5be [LCG] Make the name of an SCC include more of the functions in it.
This makes it much easier to debug issues when the logging contains the
name of the SCC. It requires to create a temporary string, but for
logging and debugging uses that seems fine. I've added logic to try to
output all the function names with an elipsis if there are too many.
This was helpful fro me in debugging issues with the new pass manager.

llvm-svn: 273625
2016-06-23 22:51:14 +00:00
NAKAMURA Takumi ae9c904a4c Parser::ParseCXXCondition(): Prune \param in r273548 [-Wdocumentation]
llvm-svn: 273624
2016-06-23 22:47:59 +00:00
Chris Bieneman 10dcd3bd3b [yaml2macho] Removing asserts in favor of explicit yaml parse error
32-bit Mach headers don't have reserved fields. When generating the
mapping for 32-bit headers leaving off the reserved field will result in
parse errors if the field is present in the yaml.

Added a CHECK-NOT line to ensure that mach_header.yaml isn't adding a
reserved field, and a test to ensure that the parser error gets hit with
32-bit headers.

llvm-svn: 273623
2016-06-23 22:36:31 +00:00
Sean Callanan c17cb815ac Don't run the top-level expression test case with -gmodules.
<rdar://problem/26563587>

llvm-svn: 273622
2016-06-23 22:18:08 +00:00
Tobias Grosser 522478d2c0 clang-tidy: Add llvm namespace comments
llvm commonly adds a comment to the closing brace of a namespace to indicate
which namespace is closed. clang-tidy provides with llvm-namespace-comment
a handy tool to check for this habit. We use it to ensure we consitently use
namespace comments in Polly.

There are slightly different styles in how namespaces are closed in LLVM. As
there is no large difference between the different comment styles we go for the
style clang-tidy suggests by default.

To reproduce this fix run:

for i in `ls tools/polly/lib/*/*.cpp`; \
  clang-tidy -checks='-*,llvm-namespace-comment' -p build $i -fix \
  -header-filter=".*"; \
done

This cleanup was suggested by Eugene Zelenko <eugene.zelenko@gmail.com> in
http://reviews.llvm.org/D21488 and was split out to increase readability.

llvm-svn: 273621
2016-06-23 22:17:27 +00:00
Chris Bieneman 64adae59f3 [CMake] Add LLVM runtimes directory
Summary:
There are a few LLVM projects that produce runtime libraries. Ideally
runtime libraries should be built differently than other projects,
specifically they should be built using the just-built toolchain.

There is support for building compiler-rt in this way from the clang
build. Moving this logic into the LLVM build is interesting because it
provides a simpler way to extend the just-built toolchain to include
LLD and the LLVM object file tools.

Once this functionality is better fleshed out and tested we’ll want to
encapsulate it in a module that can be used for clang standalone
builds, and we’ll want to make it the default way to build compiler-rt.

With this patch applied there is no immediate change in the build.
Moving compiler-rt out from llvm/projects into llvm/runtimes enables
the functionality.

This code has a few improvements over the method provided by
LLVM_BUILD_EXTERNAL_COMPILER_RT. Specifically the sub-ninja command is
always invoked, so changes to compiler-rt source files will get built
properly, so this patch can be used for iterative development with
just-built tools.

This first patch only works with compiler-rt. Support for other
runtime projects will be coming in follow-up patches.

Reviewers: chandlerc, bogner

Subscribers: kubabrecka, llvm-commits

Differential Revision: http://reviews.llvm.org/D20992

llvm-svn: 273620
2016-06-23 22:07:21 +00:00
Martin Probst 31d6da7c0c clang-format: [JS] handle conditionals in fields, default params.
Summary:

Reviewers: djasper

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D21658

llvm-svn: 273619
2016-06-23 21:51:49 +00:00
Matthias Braun 4d624ae0cb MachineScheduler: Followup to debug message changes
Do not dump intermediate state of the pending queue anymore now that we
always dump the final state before picking.

llvm-svn: 273618
2016-06-23 21:43:28 +00:00
Kyle Butt 991df7889b Codegen: [X86] preservere memory refs for folded umul_lohi
Memory references were not being propagated for this folded load. This
prevented optimizations like LICM from hoisting the load.

Added test to verify that this allows LICM to proceed.

llvm-svn: 273617
2016-06-23 21:40:35 +00:00
Kyle Butt 178314ab52 Codegen: LICM Remove check for exactly 1 register def.
When considering whether to split an instruction with a memory operand
into an explicit load and a register-based instruction, we currently
check that the resulting instruction has exactly 1 def. This prevents 2
important LICM optimizations: compares with memory operands, and double
indirect calls. All the tests and the test-suite pass without the check.
My guess as to original intent is to limit the additional register pressure
created by the new instruction, but given that we only split out a single
register, it is already limited.

The licm-dominance test now checks actual memory loads for hoisting instead of
undef, and it tests compares.
hoist-invariant-load.ll now checks for 2 hoists, the intended hoist, and a bonus
from calling a got-relative function in a loop.

llvm-svn: 273616
2016-06-23 21:38:49 +00:00
Matthias Braun d29d31e30e MachineScheduler: Improve debug messages
Consistenly display available and pending queues immediately before the
scheduling choice is done.

llvm-svn: 273615
2016-06-23 21:27:38 +00:00
Rafael Espindola 2d3cce71ee Uses shouldAssumeDSOLocal.
With that SystemZ knows to avoid a GOT for PIE.

llvm-svn: 273614
2016-06-23 21:18:59 +00:00
George Burgess IV d14d05affe Attempt #2 to unbreak bots broken by r273596.
Some of the bots running GCC 4.7 seem to be having trouble with lambdas
that explicitly capture `this`. Relevant-looking bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53137

llvm-svn: 273613
2016-06-23 20:59:13 +00:00
Rafael Espindola 65787a9e01 Refactor to use shouldAssumeDSOLocal. NFC.
llvm-svn: 273612
2016-06-23 20:50:42 +00:00
Mike Aizatsky f0b3e85f4e [libfuzzer] moving is_ascii handler inside mutation dispatcher.
Summary: It also fixes a bug, when first random might not be ascii.

Differential Revision: http://reviews.llvm.org/D21573

llvm-svn: 273611
2016-06-23 20:44:48 +00:00
Rafael Espindola f2898d73a5 Convert test to FileCheck.
llvm-svn: 273609
2016-06-23 20:37:49 +00:00
Anna Thomas 31a0b2088f InstCombine rule to fold trunc when value available
Summary:
This instcombine rule folds away trunc operations that have value available from a prior load or store.
This kind of code can be generated as a result of GVN widening the load or from source code as well.

Reviewers: reames, majnemer, sanjoy

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D21246

llvm-svn: 273608
2016-06-23 20:22:22 +00:00
Tobias Grosser fb780bfc35 Drop unnecessary ';'
This addresses warnings produced by clang's -Wextra-semi.

This cleanup was suggested by Eugene Zelenko <eugene.zelenko@gmail.com> in
http://reviews.llvm.org/D21488 and was split out to increase readability.

llvm-svn: 273607
2016-06-23 20:21:47 +00:00
Dehao Chen bd3ed3c55b Invoke simplifycfg and sroa before instcombine.
Summary: InstCombine needs to be performed after simplifycfg and sroa, otherwise it may make bad optimization decisions.

Reviewers: davidxl, wmi, dnovillo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D21568

llvm-svn: 273606
2016-06-23 20:13:10 +00:00
Matt Arsenault 8d4b0eddd6 AMDGPU: Add option to disable spilling SGPRs to VGPRs.
This can help debug spilling problems.

llvm-svn: 273605
2016-06-23 20:00:34 +00:00
Greg Clayton fe9d1ee9e4 Added a new python example which installs a command called "shadow".
This shows how to grab individual blocks from stack frames and get only the variables from those blocks. It then will iterate over all of the parent blocks and look for shadowed variables.

llvm-svn: 273604
2016-06-23 19:54:32 +00:00
Martin Probst 1b7f98042d clang-format: [JS] recognize more type locations.
Summary: Includes parenthesized type expressions and type aliases.

Reviewers: djasper

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D21597

llvm-svn: 273603
2016-06-23 19:52:32 +00:00
Richard Smith b130fe7d31 Implement p0292r2 (constexpr if), a likely C++1z feature.
llvm-svn: 273602
2016-06-23 19:16:49 +00:00
George Burgess IV fe1397b977 Attempt to fix breakage caused by r273596.
llvm-svn: 273601
2016-06-23 19:16:04 +00:00
Richard Smith 03a4aa3d00 Re-commit r273548, reverted in r273589, with a fix to not produce
-Wfor-loop-analysis warnings for a for-loop with a condition variable. In such
a case, the loop condition variable is modified on each iteration of the loop
by definition.

Original commit message:

Rearrange condition handling so that semantic checks on a condition variable
are performed before the other substatements of the construct are parsed,
rather than deferring them until the end. This allows better error recovery
from semantic errors in the condition, improves diagnostic order, and is a
prerequisite for C++17 constexpr if.

llvm-svn: 273600
2016-06-23 19:02:52 +00:00
Aaron Ballman 2cd2a18a9f Default to using the Unicode version of Win32 APIs instead of the ANSI version. This helps to catch instances where a developer accidentally forgets to explicitly specify which version of the API to use and accidentally winds up failing to support non-ASCII characters properly.
llvm-svn: 273599
2016-06-23 19:02:09 +00:00
Tobias Grosser 8a12bd9035 Update isl to isl-0.17.1-84-g72ffe88
This is a regular maintenance update to ensure we are testing with a recent
version of isl.

llvm-svn: 273597
2016-06-23 18:59:30 +00:00
George Burgess IV 1f99da54c2 [CFLAA] Use better interprocedural function summaries.
Previously, we just unified any arguments that seemed to be related to
each other. With this patch, we now respect dereference levels, etc.
which should make us substantially more accurate. Proper handling of
StratifiedAttrs will be done in a later patch.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21536

llvm-svn: 273596
2016-06-23 18:55:23 +00:00
Rafael Espindola 53fd425e06 Refactor duplicated code. NFC.
llvm-svn: 273595
2016-06-23 18:43:06 +00:00
Hans Wennborg a21a263101 [codeview] Fix letter casing in FileCheck regexes
We print those hex numbers with uppercase letters.

llvm-svn: 273594
2016-06-23 18:23:28 +00:00
Michael Kuperstein 0194d30e09 [X86] Extract HiPE prologue constants into metadata
X86FrameLowering::adjustForHiPEPrologue() contains a hard-coded offset
into an Erlang Runtime System-internal data structure (the PCB). As the
layout of this data structure is prone to change, this poses problems
for maintaining compatibility.

To address this problem, the compiler can produce this information as
module-level named metadata. For example (where P_NSP_LIMIT is the
offending offset):

!hipe.literals = !{ !2, !3, !4 }
!2 = !{ !"P_NSP_LIMIT", i32 152 }
!3 = !{ !"X86_LEAF_WORDS", i32 24 }
!4 = !{ !"AMD64_LEAF_WORDS", i32 24 }

Patch by Magnus Lang

Differential Revision: http://reviews.llvm.org/D20363

llvm-svn: 273593
2016-06-23 18:17:25 +00:00
Vassil Vassilev e3ffbc38d9 Typo.
llvm-svn: 273592
2016-06-23 18:13:46 +00:00
Reid Kleckner 8f4bd1fdf2 Fix the wasm build by including EndianStream.h
llvm-svn: 273591
2016-06-23 18:12:31 +00:00
Peter Collingbourne ae72fa2f97 Add a test case for the regression in -Wfor-loop-analysis caused by r273548.
llvm-svn: 273590
2016-06-23 18:11:19 +00:00
Peter Collingbourne b77ebd749a Revert r273548, "Rearrange condition handling so that semantic checks on a condition variable"
as it caused a regression in -Wfor-loop-analysis.

llvm-svn: 273589
2016-06-23 18:11:15 +00:00
Nirav Dave 38bb1c15fd Prevent generation of temp file in test from r273585.
llvm-svn: 273588
2016-06-23 18:06:35 +00:00
Sanjoy Das 2951e6b314 [SCEV] Don't unnecessarily namespace; NFC
llvm-svn: 273587
2016-06-23 18:03:32 +00:00
Sanjoy Das 81c00fe022 [IRCE] Use getTerminator instead of rbegin; NFC
llvm-svn: 273586
2016-06-23 18:03:26 +00:00
Nirav Dave bfdb483755 Preserve DebugInfo when replacing values in DAGCombiner
Recommiting after correcting over-eager Debug Value transfer fixing PR28270.

[DAG] Previously debug values would transfer debuginfo for the selected
start node for a replacement which allows for debug to be dropped.

Push debug value transfer to occur with node/value replacement in
SelectionDAG, remove now extraneous transfers of debug values.

This refixes PR9817 which was being incompletely checked in the
testsuite.

Reviewers: jyknight

Subscribers: dblaikie, llvm-commits

Differential Revision: http://reviews.llvm.org/D21037

llvm-svn: 273585
2016-06-23 17:52:57 +00:00
Sanjay Patel e053621071 [ValueTracking] simplify logic in ComputeNumSignBits (NFCI)
This was noted in http://reviews.llvm.org/D21610 . The previous code
predated the use of APInt ( http://reviews.llvm.org/rL47654 ), so it
had to account for the fixed width of uint64_t.

Now that we're using the variable width APInt, we can remove some
complexity.

llvm-svn: 273584
2016-06-23 17:41:59 +00:00
Ahmed Bougacha ef3358d579 [TableGen] Use StringRef::compare instead of != and <. NFC.
The previous code would always do 1 or 2 prefix compares;
explicitly only do one.

This speeds up debug -gen-asm-matcher by ~10% (e.g. X86: 40s -> 35s).

llvm-svn: 273583
2016-06-23 17:09:49 +00:00
Todd Fiala 31ae3c5ade fix Xcode build for r273547
llvm-svn: 273582
2016-06-23 16:54:39 +00:00
Pablo Barrio 7a64346533 [ARM] Lower (select_cc k k (select_cc ~k ~k x)) into (SSAT l_k x)
Summary:
SSAT saturates an integer, making sure that its value lies within
an interval [-k, k]. Since the constant is given to SSAT as the
number of bytes set to one, k + 1 must be a power of 2, otherwise
the optimization is not possible. Also, the select_cc must use <
and > respectively so that they define an interval.

Reviewers: mcrosier, jmolloy, rengolin

Subscribers: aemerson, rengolin, llvm-commits

Differential Revision: http://reviews.llvm.org/D21372

llvm-svn: 273581
2016-06-23 16:53:49 +00:00