Anna Thomas [Fri, 24 Jun 2016 12:38:45 +0000 (12:38 +0000)]
[LICM] Avoid repeating expensive call while promoting loads. NFC
Summary:
We can avoid repeating the check `isGuaranteedToExecute` when it's already called once while checking if the alignment can be widened for the load/store being hoisted.
The function is invariant for the same instruction `UI` in `isGuaranteedToExecute(*UI, DT, CurLoop, SafetyInfo);`
Reviewers: hfinkel, eli.friedman
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D21672
llvm-svn: 273671
Hubert Tong [Fri, 24 Jun 2016 12:25:15 +0000 (12:25 +0000)]
Revert r273664
Revert change until build issues with MSVC can be resolved.
llvm-svn: 273670
Daniel Sanders [Fri, 24 Jun 2016 12:23:17 +0000 (12:23 +0000)]
[mips] Use --check-prefixes where appropriate. NFC.
llvm-svn: 273669
Richard Smith [Fri, 24 Jun 2016 12:21:30 +0000 (12:21 +0000)]
More approved features for C++17.
llvm-svn: 273668
Richard Smith [Fri, 24 Jun 2016 12:16:11 +0000 (12:16 +0000)]
Dynamic memory allocation with alignment has been approved for C++17.
llvm-svn: 273667
Richard Smith [Fri, 24 Jun 2016 12:15:12 +0000 (12:15 +0000)]
Using for attributes voted into C++17.
llvm-svn: 273666
Strahinja Petrovic [Fri, 24 Jun 2016 12:12:41 +0000 (12:12 +0000)]
This patch fixes problem with passing structures and unions
smaller than register as argument in variadic functions on
big endian architectures.
Differential Revision: http://reviews.llvm.org/D21611
llvm-svn: 273665
Hubert Tong [Fri, 24 Jun 2016 11:34:16 +0000 (11:34 +0000)]
Add FixedSizeStorage to TrailingObjects; NFC
Summary: This change introduces two types, `FixedSizeStorage` and `FixedSizeStorageOwner`, which can be used to provide stack-allocated objects with trailing objects.
Reviewers: rsmith, faisalv, aaron.ballman
Subscribers: llvm-commits, cfe-commits, nwilson
Differential Revision: http://reviews.llvm.org/D19770
llvm-svn: 273664
George Rimar [Fri, 24 Jun 2016 11:23:55 +0000 (11:23 +0000)]
[ELF] - Fix incorrect logic in VersionScriptParser::parseVersion()
Previously the next sample script would generate 2 entries in
Config->SymbolVersions with the same version name.
VERSION {
global: c;
};
That happened because parseVersionSymbols() was called twice.
At first for "global:" and since there is no local tag, it was called again.
Patch fixes the issue, testcase was updated to demonstrate.
Differential revision: http://reviews.llvm.org/D21640
llvm-svn: 273663
Richard Smith [Fri, 24 Jun 2016 11:20:31 +0000 (11:20 +0000)]
Add (commented out) status entries for the upcoming WG21 motions.
llvm-svn: 273662
George Rimar [Fri, 24 Jun 2016 11:18:44 +0000 (11:18 +0000)]
[ELF] - Support of compressed input sections implemented.
Patch implements support of zlib style compressed sections.
SHF_COMPRESSED flag is used to recognize that decompression is required.
After that decompression is performed and flag is removed from output.
Differential revision: http://reviews.llvm.org/D20272
llvm-svn: 273661
Cong Liu [Fri, 24 Jun 2016 09:39:28 +0000 (09:39 +0000)]
Remove ignoringImplicit from clang-tidy.
llvm-svn: 273660
Cong Liu [Fri, 24 Jun 2016 09:38:03 +0000 (09:38 +0000)]
IgnoringImplicit matcher.
llvm-svn: 273659
Simon Dardis [Fri, 24 Jun 2016 08:43:27 +0000 (08:43 +0000)]
Revert "Revert "[misched] Extend scheduler to handle unsupported features""
This reverts commit r273565.
This was an over-eager revert.
llvm-svn: 273658
Matt Arsenault [Fri, 24 Jun 2016 07:07:55 +0000 (07:07 +0000)]
AMDGPU: Add stub custom CodeGenPrepare pass
This will do various things including ones
CodeGenPrepare does, but with knowledge of uniform
values.
llvm-svn: 273657
George Burgess IV [Fri, 24 Jun 2016 06:58:15 +0000 (06:58 +0000)]
Remove hack introduced by r273641.
Hopefully the buildbots have had enough time to pick this up by now.
llvm-svn: 273656
Matt Arsenault [Fri, 24 Jun 2016 06:58:01 +0000 (06:58 +0000)]
AMDGPU: Un-xfail and add tests
Un XFAIL a few tests plus a few more I had lying around
in my tree, which seem to all work now but I don't see tests
that quite test the same things.
llvm-svn: 273655
Ryan Govostes [Fri, 24 Jun 2016 06:49:01 +0000 (06:49 +0000)]
Change shared library load path to appease Android bot
llvm-svn: 273654
Matt Arsenault [Fri, 24 Jun 2016 06:30:22 +0000 (06:30 +0000)]
AMDGPU: Remove disable-irstructurizer subtarget feature
The only real reason to use it is for testing, so replace
it with a command line option instead of a potentially function
dependent feature.
llvm-svn: 273653
Matt Arsenault [Fri, 24 Jun 2016 06:30:11 +0000 (06:30 +0000)]
AMDGPU: Cleanup subtarget handling.
Split AMDGPUSubtarget into amdgcn/r600 specific subclasses.
This removes most of the static_casting of the basic codegen
classes everywhere, and tries to restrict the features
visible on the wrong target.
llvm-svn: 273652
David Majnemer [Fri, 24 Jun 2016 05:48:59 +0000 (05:48 +0000)]
try to fix the MSVC build
llvm-svn: 273651
David Majnemer [Fri, 24 Jun 2016 05:33:44 +0000 (05:33 +0000)]
Use even more ArrayRefs
No functional change is intended, just a small refactoring.
llvm-svn: 273650
David Majnemer [Fri, 24 Jun 2016 05:31:23 +0000 (05:31 +0000)]
Silence a -Wc++11-narrowing warning
llvm-svn: 273649
David Majnemer [Fri, 24 Jun 2016 04:39:22 +0000 (04:39 +0000)]
Update LLDB for r273647
llvm-svn: 273648
David Majnemer [Fri, 24 Jun 2016 04:05:48 +0000 (04:05 +0000)]
Use more ArrayRefs
No functional change is intended, just a small refactoring.
llvm-svn: 273647
David Majnemer [Fri, 24 Jun 2016 04:05:35 +0000 (04:05 +0000)]
Use the same underlying type for bitfields
MSVC allocates fresh storage for consecutive bitfields with different
underlying types.
llvm-svn: 273646
David Majnemer [Fri, 24 Jun 2016 04:05:25 +0000 (04:05 +0000)]
Use the same underlying type for bitfields
MSVC allocates fresh storage for consecutive bitfields with different
underlying types.
llvm-svn: 273645
David Majnemer [Fri, 24 Jun 2016 04:05:21 +0000 (04:05 +0000)]
Switch more loops to be range-based
This makes the code a little more concise, no functional change is
intended.
llvm-svn: 273644
Craig Topper [Fri, 24 Jun 2016 03:06:11 +0000 (03:06 +0000)]
[X86] Combine two nearby calls to isSingleInputShuffleVector. NFC
llvm-svn: 273643
Vedant Kumar [Fri, 24 Jun 2016 02:33:01 +0000 (02:33 +0000)]
[llvm-cov] Fix two warnings
They were using output streams inconsistently. One also had a grammar
bug.
I noticed these while trying to pare down D18278.
llvm-svn: 273642
George Burgess IV [Fri, 24 Jun 2016 02:19:11 +0000 (02:19 +0000)]
Temporary hack to clean a file from buildbots.
Some buildbots are complaining about a .s file under test/ that was
inadvertently created by a test earlier today, and is still hanging
around. I'll undo this change in ~1hr (or whenever the bots are done
getting rid of said file).
llvm-svn: 273641
Enrico Granata [Fri, 24 Jun 2016 02:07:15 +0000 (02:07 +0000)]
Fix an issue where the @lldb.command marker would not work with the new 5-argument version of the Python command function
This:
a) teaches PythonCallable to look inside a callable object
b) teaches PythonCallable to discover whether a callable method is bound
c) teaches lldb.command to dispatch to either the older 4 argument version or the newer 5 argument version
llvm-svn: 273640
Chuang-Yu Cheng [Fri, 24 Jun 2016 01:59:00 +0000 (01:59 +0000)]
Teaching SimplifyCFG to recognize the Or-Mask trick that InstCombine uses to
reduce the number of comparisons.
Specifically, InstCombine can turn:
(i == 5334 || i == 5335)
into:
((i | 1) == 5335)
SimplifyCFG was already able to detect the pattern:
(i == 5334 || i == 5335)
to:
((i & -2) == 5334)
This patch supersedes D21315 and resolves PR27555
(https://llvm.org/bugs/show_bug.cgi?id=27555).
Thanks to David and Chandler for the suggestions!
Author: Thomas Jablin (tjablin)
Reviewers: majnemer chandlerc halfdan cycheng
http://reviews.llvm.org/D21397
llvm-svn: 273639
Peter Collingbourne [Fri, 24 Jun 2016 01:58:02 +0000 (01:58 +0000)]
BitcodeWriter: Remove redundant (and incorrect) check for whether to emit module summary.
The function name Module::empty() is slightly misleading in that it
only tests for the presence of functions in the module. However we
still want to emit the module summary if the module contains only
global variables or aliases. The presence of such entities can be
determined simply by checking the summary directly, as we are doing
below.
Differential Revision: http://reviews.llvm.org/D21669
llvm-svn: 273638
George Burgess IV [Fri, 24 Jun 2016 01:41:29 +0000 (01:41 +0000)]
Attempt to fix MSVC breakage caused by r273636.
Apparently earlier versions of MSVC don't have constexpr bitset ctors.
llvm-svn: 273637
George Burgess IV [Fri, 24 Jun 2016 01:00:03 +0000 (01:00 +0000)]
[CFLAA] Propagate StratifiedAttrs in interproc. analysis.
This patch also has a refactor that kills StratifiedAttr, and leaves us
with StratifiedAttrs, because having both was mildly redundant.
This patch makes us correctly handle stratified attributes when doing
interprocedural analysis. It also adds another attribute, AttrCaller,
which acts like AttrUnknown. We can filter out AttrCaller values when
during interprocedural analysis, since the caller should have
information about what arguments it's passing to its callee.
Patch by Jia Chen.
Differential Revision: http://reviews.llvm.org/D21645
llvm-svn: 273636
Vedant Kumar [Fri, 24 Jun 2016 00:41:26 +0000 (00:41 +0000)]
[llvm-cov] Use getOptions() instead of Options in SourceCoverageView, NFC
A lot of this code is going to move into the text-based coverage
renderer, and won't be able to use Options directly. Use the getter.
llvm-svn: 273635
Vedant Kumar [Fri, 24 Jun 2016 00:34:51 +0000 (00:34 +0000)]
[llvm-cov] Add SourceNames to SourceCoverageViews, NFC
A SourceName can be a file or a function. It makes sense to attach this
information to a SourceCoverageView, seeing as views (1) already point
to the text corresponding to the relevant source code and (2) are
already used to render that text along with the SourceNames.
This is a nice cleanup which is independent of the upcoming html patch.
While we're at it, document the fields in SourceCoverageView.
llvm-svn: 273634
Vedant Kumar [Fri, 24 Jun 2016 00:34:48 +0000 (00:34 +0000)]
[llvm-cov] Rename SourceCoverageView::LineCoverageInfo to LineCoverageStats, NFC
Pull LineCoverageInfo out of SourceCoverageView and rename it so that it
doesn't conflict with another class of the same name in
CoverageSummaryInfo.h.
This cuts down on the amount of code we have to move into a `protected`
section of SourceCoverageView for the upcoming html patch. It also makes
the code a bit clearer: having two LineCoverageInfo's is strange.
llvm-svn: 273633
Sean Callanan [Fri, 24 Jun 2016 00:24:40 +0000 (00:24 +0000)]
Handle variadic Objective-C methods from DWARF correctly.
<rdar://problem/
22039804>
llvm-svn: 273632
Ahmed Bougacha [Fri, 24 Jun 2016 00:08:01 +0000 (00:08 +0000)]
[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
Evandro Menezes [Thu, 23 Jun 2016 23:43:23 +0000 (23:43 +0000)]
[AArch64] Model the cost of vector by element FP multiplies on Exynos M1. (NFC)
llvm-svn: 273630
Ryan Govostes [Thu, 23 Jun 2016 23:26:25 +0000 (23:26 +0000)]
[asan] Add failure logging to global-registration.c test case
llvm-svn: 273629
Tom Stellard [Thu, 23 Jun 2016 23:11:29 +0000 (23:11 +0000)]
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
Chris Bieneman [Thu, 23 Jun 2016 23:01:47 +0000 (23:01 +0000)]
[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
Hans Wennborg [Thu, 23 Jun 2016 22:57:25 +0000 (22:57 +0000)]
[codeview] Add classes and unions to the Local/Global UDTs lists
Differential Revision: http://reviews.llvm.org/D21655
llvm-svn: 273626
Chandler Carruth [Thu, 23 Jun 2016 22:51:14 +0000 (22:51 +0000)]
[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
NAKAMURA Takumi [Thu, 23 Jun 2016 22:47:59 +0000 (22:47 +0000)]
Parser::ParseCXXCondition(): Prune \param in r273548 [-Wdocumentation]
llvm-svn: 273624
Chris Bieneman [Thu, 23 Jun 2016 22:36:31 +0000 (22:36 +0000)]
[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
Sean Callanan [Thu, 23 Jun 2016 22:18:08 +0000 (22:18 +0000)]
Don't run the top-level expression test case with -gmodules.
<rdar://problem/
26563587>
llvm-svn: 273622
Tobias Grosser [Thu, 23 Jun 2016 22:17:27 +0000 (22:17 +0000)]
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
Chris Bieneman [Thu, 23 Jun 2016 22:07:21 +0000 (22:07 +0000)]
[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
Martin Probst [Thu, 23 Jun 2016 21:51:49 +0000 (21:51 +0000)]
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
Matthias Braun [Thu, 23 Jun 2016 21:43:28 +0000 (21:43 +0000)]
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
Kyle Butt [Thu, 23 Jun 2016 21:40:35 +0000 (21:40 +0000)]
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
Kyle Butt [Thu, 23 Jun 2016 21:38:49 +0000 (21:38 +0000)]
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
Matthias Braun [Thu, 23 Jun 2016 21:27:38 +0000 (21:27 +0000)]
MachineScheduler: Improve debug messages
Consistenly display available and pending queues immediately before the
scheduling choice is done.
llvm-svn: 273615
Rafael Espindola [Thu, 23 Jun 2016 21:18:59 +0000 (21:18 +0000)]
Uses shouldAssumeDSOLocal.
With that SystemZ knows to avoid a GOT for PIE.
llvm-svn: 273614
George Burgess IV [Thu, 23 Jun 2016 20:59:13 +0000 (20:59 +0000)]
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
Rafael Espindola [Thu, 23 Jun 2016 20:50:42 +0000 (20:50 +0000)]
Refactor to use shouldAssumeDSOLocal. NFC.
llvm-svn: 273612
Mike Aizatsky [Thu, 23 Jun 2016 20:44:48 +0000 (20:44 +0000)]
[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
Rafael Espindola [Thu, 23 Jun 2016 20:37:49 +0000 (20:37 +0000)]
Convert test to FileCheck.
llvm-svn: 273609
Anna Thomas [Thu, 23 Jun 2016 20:22:22 +0000 (20:22 +0000)]
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
Tobias Grosser [Thu, 23 Jun 2016 20:21:47 +0000 (20:21 +0000)]
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
Dehao Chen [Thu, 23 Jun 2016 20:13:10 +0000 (20:13 +0000)]
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
Matt Arsenault [Thu, 23 Jun 2016 20:00:34 +0000 (20:00 +0000)]
AMDGPU: Add option to disable spilling SGPRs to VGPRs.
This can help debug spilling problems.
llvm-svn: 273605
Greg Clayton [Thu, 23 Jun 2016 19:54:32 +0000 (19:54 +0000)]
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
Martin Probst [Thu, 23 Jun 2016 19:52:32 +0000 (19:52 +0000)]
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
Richard Smith [Thu, 23 Jun 2016 19:16:49 +0000 (19:16 +0000)]
Implement p0292r2 (constexpr if), a likely C++1z feature.
llvm-svn: 273602
George Burgess IV [Thu, 23 Jun 2016 19:16:04 +0000 (19:16 +0000)]
Attempt to fix breakage caused by r273596.
llvm-svn: 273601
Richard Smith [Thu, 23 Jun 2016 19:02:52 +0000 (19:02 +0000)]
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
Aaron Ballman [Thu, 23 Jun 2016 19:02:09 +0000 (19:02 +0000)]
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
Tobias Grosser [Thu, 23 Jun 2016 18:59:30 +0000 (18:59 +0000)]
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
George Burgess IV [Thu, 23 Jun 2016 18:55:23 +0000 (18:55 +0000)]
[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
Rafael Espindola [Thu, 23 Jun 2016 18:43:06 +0000 (18:43 +0000)]
Refactor duplicated code. NFC.
llvm-svn: 273595
Hans Wennborg [Thu, 23 Jun 2016 18:23:28 +0000 (18:23 +0000)]
[codeview] Fix letter casing in FileCheck regexes
We print those hex numbers with uppercase letters.
llvm-svn: 273594
Michael Kuperstein [Thu, 23 Jun 2016 18:17:25 +0000 (18:17 +0000)]
[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
Vassil Vassilev [Thu, 23 Jun 2016 18:13:46 +0000 (18:13 +0000)]
Typo.
llvm-svn: 273592
Reid Kleckner [Thu, 23 Jun 2016 18:12:31 +0000 (18:12 +0000)]
Fix the wasm build by including EndianStream.h
llvm-svn: 273591
Peter Collingbourne [Thu, 23 Jun 2016 18:11:19 +0000 (18:11 +0000)]
Add a test case for the regression in -Wfor-loop-analysis caused by r273548.
llvm-svn: 273590
Peter Collingbourne [Thu, 23 Jun 2016 18:11:15 +0000 (18:11 +0000)]
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
Nirav Dave [Thu, 23 Jun 2016 18:06:35 +0000 (18:06 +0000)]
Prevent generation of temp file in test from r273585.
llvm-svn: 273588
Sanjoy Das [Thu, 23 Jun 2016 18:03:32 +0000 (18:03 +0000)]
[SCEV] Don't unnecessarily namespace; NFC
llvm-svn: 273587
Sanjoy Das [Thu, 23 Jun 2016 18:03:26 +0000 (18:03 +0000)]
[IRCE] Use getTerminator instead of rbegin; NFC
llvm-svn: 273586
Nirav Dave [Thu, 23 Jun 2016 17:52:57 +0000 (17:52 +0000)]
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
Sanjay Patel [Thu, 23 Jun 2016 17:41:59 +0000 (17:41 +0000)]
[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
Ahmed Bougacha [Thu, 23 Jun 2016 17:09:49 +0000 (17:09 +0000)]
[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
Todd Fiala [Thu, 23 Jun 2016 16:54:39 +0000 (16:54 +0000)]
fix Xcode build for r273547
llvm-svn: 273582
Pablo Barrio [Thu, 23 Jun 2016 16:53:49 +0000 (16:53 +0000)]
[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
Artur Pilipenko [Thu, 23 Jun 2016 16:34:52 +0000 (16:34 +0000)]
Upgrade other old memset/memcpy signatures in tests causing buildbot failures with rL273568.
llvm-svn: 273580
Hans Wennborg [Thu, 23 Jun 2016 16:33:53 +0000 (16:33 +0000)]
[codeview] Emit retained types
Differential Revision: http://reviews.llvm.org/D21630
llvm-svn: 273579
Chris Lattner [Thu, 23 Jun 2016 16:29:22 +0000 (16:29 +0000)]
Change the email address for commit access requests to my llvm address.
llvm-svn: 273578
Vedant Kumar [Thu, 23 Jun 2016 16:27:08 +0000 (16:27 +0000)]
NFC, add an "end namespace" comment for consistency
llvm-svn: 273577
Jonathan Peyton [Thu, 23 Jun 2016 16:18:59 +0000 (16:18 +0000)]
Remove redundant %libomp-compile step from test/lock/omp_lock.c
llvm-svn: 273576
Hans Wennborg [Thu, 23 Jun 2016 16:13:26 +0000 (16:13 +0000)]
Revert r273567 "[SystemZ] Let z13 also support FeatureMiscellaneousExtensions."
It broke test/CodeGen/SystemZ/vec-extract-02.ll
llvm-svn: 273575
Hans Wennborg [Thu, 23 Jun 2016 16:13:23 +0000 (16:13 +0000)]
Revert r273568 "Remangle intrinsics names when types are renamed"
It broke 2008-07-15-Bswap.ll and 2009-09-01-PostRAProlog.ll
llvm-svn: 273574
Artur Pilipenko [Thu, 23 Jun 2016 16:07:10 +0000 (16:07 +0000)]
Fix an old memset signature in 2009-09-01-PostRAProlog.ll test causing a buildbot failure
llvm-svn: 273573
Ben Craig [Thu, 23 Jun 2016 15:47:12 +0000 (15:47 +0000)]
[Analyzer] Don't cache report generation ExplodedNodes
During the core analysis, ExplodedNodes are added to the
ExplodedGraph, and those nodes are cached for deduplication purposes.
After core analysis, reports are generated. Here, trimmed copies of
the ExplodedGraph are made. Since the ExplodedGraph has already been
deduplicated, there is no need to deduplicate again.
This change makes it possible to add ExplodedNodes to an
ExplodedGraph without the overhead of deduplication. "Uncached" nodes
also cannot be iterated over, but none of the report generation code
attempts to iterate over all nodes. This change reduces the analysis
time of a large .C file from 3m43.941s to 3m40.256s (~1.6% speedup).
It should slightly reduce memory consumption. Gains should be roughly
proportional to the number (and path length) of static analysis
warnings.
This patch enables future work that should remove the need for an
InterExplodedGraphMap inverse map. I plan on using the (now unused)
ExplodedNode link to connect new nodes to the original nodes.
http://reviews.llvm.org/D21229
llvm-svn: 273572
Reid Kleckner [Thu, 23 Jun 2016 15:40:42 +0000 (15:40 +0000)]
Use CreateFileA and add a FIXME to switch to the wide variant
No functional change. Required to build with -DUNICODE, as is done in
http://reviews.llvm.org/D21643
llvm-svn: 273571
Renato Golin [Thu, 23 Jun 2016 15:28:00 +0000 (15:28 +0000)]
[docs] Bump minimum version of CMake in its own doc
llvm-svn: 273570