David Majnemer [Sat, 6 Jun 2015 02:30:43 +0000 (02:30 +0000)]
[InstCombine] Don't miscompile select to poison
If we have (select a, b, c), it is sometimes valid to simplify this to a
single select operand. However, doing so is only valid if the
computation doesn't inject poison into the computation.
It might be helpful to consider the following example:
(select (icmp ne %i, INT_MAX), (add nsw %i, 1), INT_MIN)
The select is equivalent to (add %i, 1) but not (add nsw %i, 1).
Self hosting on x86_64 revealed that this occurs very, very rarely so
bailing out is hopefully pretty reasonable.
llvm-svn: 239215
Rafael Espindola [Sat, 6 Jun 2015 02:29:56 +0000 (02:29 +0000)]
Handle 16 bit PC relative relocations.
Fixes pr23771.
llvm-svn: 239214
Peter Collingbourne [Sat, 6 Jun 2015 02:09:34 +0000 (02:09 +0000)]
clang-cl: Implement /GL in terms of -flto.
No documentation yet; the linker needs more work.
Differential Revision: http://reviews.llvm.org/D10270
llvm-svn: 239213
Peter Collingbourne [Sat, 6 Jun 2015 02:00:45 +0000 (02:00 +0000)]
COFF: Read linker directives from bitcode files.
Differential Revision: http://reviews.llvm.org/D10285
llvm-svn: 239212
NAKAMURA Takumi [Sat, 6 Jun 2015 01:41:35 +0000 (01:41 +0000)]
TargetParser: Fix comments in enum(s) introduced in r239150. [-Wdocumentation]
llvm-svn: 239211
Craig Topper [Sat, 6 Jun 2015 01:34:04 +0000 (01:34 +0000)]
[TableGen] Change OpInit::getNumOperands and getOperand to use unsigned integers. NFC
llvm-svn: 239210
Craig Topper [Sat, 6 Jun 2015 01:34:01 +0000 (01:34 +0000)]
[TableGen] Remove trailing whitespace, add space between 'if' and paren, other formatting fixes. NFC
llvm-svn: 239209
Craig Topper [Sat, 6 Jun 2015 01:34:00 +0000 (01:34 +0000)]
[TableGen] Remove unnecessary temporary. NFC
llvm-svn: 239208
Craig Topper [Sat, 6 Jun 2015 01:33:58 +0000 (01:33 +0000)]
[TableGen] Fold variable declaration/initialization into if condition for a couple short lived variables. NFC
llvm-svn: 239207
Craig Topper [Sat, 6 Jun 2015 01:33:55 +0000 (01:33 +0000)]
[TableGen] Remove unnecessary outer 'if' and merge it's conditions into the inner 'if's. NFC
llvm-svn: 239206
Craig Topper [Sat, 6 Jun 2015 00:44:45 +0000 (00:44 +0000)]
[TableGen] Fold variable declarations with their assignments. NFC
llvm-svn: 239205
Craig Topper [Sat, 6 Jun 2015 00:44:42 +0000 (00:44 +0000)]
[TableGen] Correct the documentation for 'foreach' in the Language Intro.
llvm-svn: 239204
Chaoren Lin [Sat, 6 Jun 2015 00:25:50 +0000 (00:25 +0000)]
Fix TestAttachDenied and TestChangeProcessGroup for remote Windows to Android.
Summary: Updated `append_to_remote_wd` to work for both remote and local.
Reviewers: clayborg, ovyalov
Reviewed By: ovyalov
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10288
llvm-svn: 239203
Chaoren Lin [Sat, 6 Jun 2015 00:19:01 +0000 (00:19 +0000)]
Update TestGdbRemoteAbort and TestGdbRemoteSegFault to use `get_signal_number`.
Reviewers: clayborg, ovyalov
Reviewed By: ovyalov
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10286
llvm-svn: 239201
Frederic Riss [Fri, 5 Jun 2015 23:46:18 +0000 (23:46 +0000)]
[dsymutil] Fix misspelled CHECK line.
llvm-svn: 239200
Pavel Labath [Fri, 5 Jun 2015 23:14:14 +0000 (23:14 +0000)]
Remove unused editline includes
LLDB included editline in a couple of places, not respecting LLDB_DISABLE_LIBEDIT. As far as I can tell, these includes are not used, so I am removing them.
llvm-svn: 239199
Frederic Riss [Fri, 5 Jun 2015 23:06:11 +0000 (23:06 +0000)]
[dsymutil] Add support for linking the debug_frame section.
Linking the debug frame section is actually very easy as we just have to
patch the start address in the FDE header and then copy the rest of the
FDE without even looking at it. The only small complexity comes from the
handling of the CIEs that we should unique across object file. This is
also really easy by using a StringMap keyed on the raw contents of the
CIE.
llvm-svn: 239198
David Majnemer [Fri, 5 Jun 2015 22:40:53 +0000 (22:40 +0000)]
Move a test from static-assert.cpp to DeclPrinterTest
It's better not to rely on the diagnostics engine to pretty print the
argument to decltype. Instead, exercise the functionality in
DeclPrinterTest.
llvm-svn: 239197
Marshall Clow [Fri, 5 Jun 2015 22:34:19 +0000 (22:34 +0000)]
Fix PR#23767. Add tests for iterator invalidation for deque::erase/pop_front/pop_back
llvm-svn: 239196
Chaoren Lin [Fri, 5 Jun 2015 22:03:19 +0000 (22:03 +0000)]
Fix TestNamespace and TestThreadJump for remote Windows to Android.
Summary:
Update DYLDRendezvous and SOEntry to use FileSpecs instead of storing paths as
strings, which caused incorrect comparison results due to denormalization.
Reviewers: clayborg, vharron, ovyalov
Reviewed By: ovyalov
Subscribers: jwolfe, emaste, tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10267
llvm-svn: 239195
Eric Christopher [Fri, 5 Jun 2015 22:03:01 +0000 (22:03 +0000)]
Fix typo of function name.
llvm-svn: 239194
Eric Christopher [Fri, 5 Jun 2015 22:03:00 +0000 (22:03 +0000)]
Rename the single non-style conformant function in TargetCodeGenInfo
and update all callers.
llvm-svn: 239193
Akira Hatanaka [Fri, 5 Jun 2015 21:58:14 +0000 (21:58 +0000)]
Move the code in TargetPassConfig::addPass that inserts machine printer pass to
the overloaded version of addPass which takes Pass*.
This change enables inserting the machine printer pass when the overloaded
version of addPass that takes Pass* is called to add a pass, instead of the
one which takes AnalysisID. I need this to prevent make-check tests from
failing when I commit another patch later.
llvm-svn: 239192
Frederic Riss [Fri, 5 Jun 2015 21:21:57 +0000 (21:21 +0000)]
[dsymutil] Rename a variable to appease some bots.
Anyway having the type and the name of the member being the same
thing wasn't the wisest of the choices.
llvm-svn: 239190
Frederic Riss [Fri, 5 Jun 2015 21:12:07 +0000 (21:12 +0000)]
[dsymutil] Have the YAML deserialization rewrite the object address of symbols.
The main use of the YAML debug map format is for testing inside LLVM. If we have IR
files in the tests used to generate object files, then we obviously don't know the
addresses of the symbols inside the object files beforehand.
This change lets the YAML import lookup the addresses in the object files and rewrite
them. This will allow to have test that really don't need any binary input.
llvm-svn: 239189
Chaoren Lin [Fri, 5 Jun 2015 21:08:24 +0000 (21:08 +0000)]
Unique file names for TestStarted and TestFinished.
Summary: This fixes the issue of multiple test suites opening the same file for writing.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10284
llvm-svn: 239188
Alexey Samsonov [Fri, 5 Jun 2015 20:50:02 +0000 (20:50 +0000)]
[ASan] Bump maximum allowed malloc() size in ASan allocator to 1Tb.
1Tb of RAM ought to be enough for anybody.
llvm-svn: 239187
Frederic Riss [Fri, 5 Jun 2015 20:27:07 +0000 (20:27 +0000)]
[dsymutil] Apply clang-format. NFC
llvm-svn: 239186
Frederic Riss [Fri, 5 Jun 2015 20:27:04 +0000 (20:27 +0000)]
[dsymutil] Out-line the YAML serialization code. NFC
It will get a bit bigger in an upcoming commit. No need to have all
of that in the header.
Also move parseYAMLDebugMap() to the same place as the serialization
code. This way it will be able to share a private Context object with
it.
llvm-svn: 239185
Jonathan Peyton [Fri, 5 Jun 2015 20:24:13 +0000 (20:24 +0000)]
Fix extern warnings produced by ittnotify_static.c
when compiling with gcc or clang numerous warnings concerning the usage
of extern "C" linkage. All the __kmp_itt_sync* variables are declared
like: extern "C" type __kmp_itt_sync... = definition; through various macros.
This note from cppreference.com explains why this is a problem.
// From http://en.cppreference.com/w/cpp/language/language_linkage
extern "C" int x; // a declaration and not a definition
// The above line is equivalent to extern "C" { extern int x; }
extern "C" { int x; } // a declaration and definition
Since the __kmp_itt_* variables are being declared and defined, these variables
should use the bracketed version instead.
llvm-svn: 239184
Siva Chandra [Fri, 5 Jun 2015 19:54:49 +0000 (19:54 +0000)]
[TestGdbRemoteAbort] Skip on API 16 Android devices
Summary:
This change also adds the infrastructure required to specify the API
levels for which tests should be skipped.
Reviewers: chying, labath
Reviewed By: labath
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10282
llvm-svn: 239183
Ed Maste [Fri, 5 Jun 2015 18:50:33 +0000 (18:50 +0000)]
Removed unused private fields in RegisterContextLinux_mips
llvm-svn: 239181
Simon Atanasyan [Fri, 5 Jun 2015 18:26:44 +0000 (18:26 +0000)]
[Mips] Add test to check jal -> jalx conversion
No functional changes.
llvm-svn: 239180
Simon Atanasyan [Fri, 5 Jun 2015 18:26:38 +0000 (18:26 +0000)]
[Mips] Add test to check relocation result shifting in case of N64 ABI
llvm-svn: 239179
Simon Atanasyan [Fri, 5 Jun 2015 18:26:33 +0000 (18:26 +0000)]
[Mips] Fix rel-gprel16.test test case
This test case uses too large GP0 value. Now the test is correct. Later
we need to implement overflow checking to catch such cases.
llvm-svn: 239178
Simon Atanasyan [Fri, 5 Jun 2015 18:26:25 +0000 (18:26 +0000)]
[Mips] Fix hilo16-9-micro.test test case
This test case uses too large addends in relocations. Now the test is correct.
Later we need to implement overflow checking to catch such cases.
llvm-svn: 239177
David Majnemer [Fri, 5 Jun 2015 18:24:55 +0000 (18:24 +0000)]
Revert accidental commit
This change was unrelated to r239170.
llvm-svn: 239176
Renato Golin [Fri, 5 Jun 2015 18:24:12 +0000 (18:24 +0000)]
Revert "[InstCombine] Rephrase fix to SimplifyWithOpReplaced"
This reverts commit r239141. This commit was an attempt to reintroduce
a previous patch that broke many self-hosting bots with clang timeouts,
but it still has slowdown issues, at least on ARM, increasing the
compilation time (stage 2, clang's) by 5x.
llvm-svn: 239175
Rafael Espindola [Fri, 5 Jun 2015 18:21:00 +0000 (18:21 +0000)]
Refactor padding writing into a helper function.
llvm-svn: 239174
Siva Chandra [Fri, 5 Jun 2015 18:07:10 +0000 (18:07 +0000)]
[lldbtest] Use netloc instead of hostname to look up Android device ID.
Summary:
urlparse.ParseResult.hostname has only lowercase characters even if the
input URL had uppercase characters. Since Android device IDs can have
uppercase characters as well, use urlparse.ParseResult.netloc instead
and extract the device ID from it.
This change also improves the error message when lookup of the Android
device's API fails.
Reviewers: chaoren
Reviewed By: chaoren
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10278
llvm-svn: 239173
Sanjoy Das [Fri, 5 Jun 2015 18:04:46 +0000 (18:04 +0000)]
[InstCombine][NFC] Add a ``break;`` statement.
This change is NFC because both the ``break;`` and the fall through end
up returning immediately. However, this helps clarify intent and also
ensures correctness in case more ``case`` blocks are added later.
llvm-svn: 239172
Sanjoy Das [Fri, 5 Jun 2015 18:04:42 +0000 (18:04 +0000)]
[InstCombine] Fix PR23751.
PR23751 was caused by a missing ``break;`` in r234388.
llvm-svn: 239171
David Majnemer [Fri, 5 Jun 2015 18:03:58 +0000 (18:03 +0000)]
[AST] There is no message for C++1z-style static_assert
We would crash in the DeclPrinter trying to pretty-print the
static_assert message. C++1z-style assertions don't have a message so
we would crash.
This fixes PR23756.
llvm-svn: 239170
Peter Collingbourne [Fri, 5 Jun 2015 18:01:28 +0000 (18:01 +0000)]
Revert r238473, "Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM."
as it caused miscompilations and assertion failures (PR23768,
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20150601/280380.html).
llvm-svn: 239169
Rafael Espindola [Fri, 5 Jun 2015 17:54:25 +0000 (17:54 +0000)]
Save a map lookup. NFC.
llvm-svn: 239168
Fiona Glaser [Fri, 5 Jun 2015 17:52:34 +0000 (17:52 +0000)]
DAGCombiner: don't duplicate (fmul x, c) in visitFNEG if fneg is free
For targets with a free fneg, this fold is always a net loss if it
ends up duplicating the multiply, so definitely avoid it.
This might be true for some targets without a free fneg too, but
I'll leave that for future investigation.
llvm-svn: 239167
Yaron Keren [Fri, 5 Jun 2015 17:48:47 +0000 (17:48 +0000)]
Rangify more for loops in LegacyPassManager.cpp.
llvm-svn: 239166
Duncan P. N. Exon Smith [Fri, 5 Jun 2015 17:22:00 +0000 (17:22 +0000)]
Remove stray semi-colon, NFC
llvm-svn: 239165
Chandler Carruth [Fri, 5 Jun 2015 17:01:43 +0000 (17:01 +0000)]
[Unroll] Rework the naming and structure of the new unroll heuristics.
The new naming is (to me) much easier to understand. Here is a summary
of the new state of the world:
- '*Threshold' is the threshold for full unrolling. It is measured
against the estimated unrolled cost as computed by getUserCost in TTI
(or CodeMetrics, etc). We will exceed this threshold when unrolling
loops where unrolling exposes a significant degree of simplification
of the logic within the loop.
- '*PercentDynamicCostSavedThreshold' is the percentage of the loop's
estimated dynamic execution cost which needs to be saved by unrolling
to apply a discount to the estimated unrolled cost.
- '*DynamicCostSavingsDiscount' is the discount applied to the estimated
unrolling cost when the dynamic savings are expected to be high.
When actually analyzing the loop, we now produce both an estimated
unrolled cost, and an estimated rolled cost. The rolled cost is notably
a dynamic estimate based on our analysis of the expected execution of
each iteration.
While we're still working to build up the infrastructure for making
these estimates, to me it is much more clear *how* to make them better
when they have reasonably descriptive names. For example, we may want to
apply estimated (from heuristics or profiles) dynamic execution weights
to the *dynamic* cost estimates. If we start doing that, we would also
need to track the static unrolled cost and the dynamic unrolled cost, as
only the latter could reasonably be weighted by profile information.
This patch is sadly not without functionality change for the new unroll
analysis logic. Buried in the heuristic management were several things
that surprised me. For example, we never subtracted the optimized
instruction count off when comparing against the unroll heursistics!
I don't know if this just got lost somewhere along the way or what, but
with the new accounting of things, this is much easier to keep track of
and we use the post-simplification cost estimate to compare to the
thresholds, and use the dynamic cost reduction ratio to select whether
we can exceed the baseline threshold.
The old values of these flags also don't necessarily make sense. My
impression is that none of these thresholds or discounts have been tuned
yet, and so they're just arbitrary placehold numbers. As such, I've not
bothered to adjust for the fact that this is now a discount and not
a tow-tier threshold model. We need to tune all these values once the
logic is ready to be enabled.
Differential Revision: http://reviews.llvm.org/D9966
llvm-svn: 239164
Frederic Riss [Fri, 5 Jun 2015 16:35:44 +0000 (16:35 +0000)]
[dsymutil] Handle the -oso-prepend-path option when the input is a YAML debug map
All the tests using a YAML debug map will need this.
llvm-svn: 239163
Alexei Starovoitov [Fri, 5 Jun 2015 16:11:14 +0000 (16:11 +0000)]
[bpf] rename triple names bpf_be -> bpfeb
llvm-svn: 239162
Colin LeMahieu [Fri, 5 Jun 2015 16:00:11 +0000 (16:00 +0000)]
[Hexagon] Reapply r239097 with tests corrected for shuffling and duplexing.
llvm-svn: 239161
Joerg Sonnenberger [Fri, 5 Jun 2015 15:54:26 +0000 (15:54 +0000)]
Avoid C-style cast.
llvm-svn: 239160
Alexei Starovoitov [Fri, 5 Jun 2015 15:32:38 +0000 (15:32 +0000)]
Revert "Include BPF target in CMake builds."
This reverts commit r239035
llvm-svn: 239159
Benjamin Kramer [Fri, 5 Jun 2015 14:33:02 +0000 (14:33 +0000)]
[TargetParser] Properly attach functions of ARMTargetParser to the class
llvm-svn: 239158
Benjamin Kramer [Fri, 5 Jun 2015 14:32:54 +0000 (14:32 +0000)]
[ARM] Make helper function static.
This one had a declaration but it differed from the definition so the
declaration was actually dead.
llvm-svn: 239157
James Y Knight [Fri, 5 Jun 2015 14:16:39 +0000 (14:16 +0000)]
[SPARC] Fix windows test failure after r239154.
(Hopefully)
llvm-svn: 239156
Yaron Keren [Fri, 5 Jun 2015 14:15:07 +0000 (14:15 +0000)]
Rangify for loops in LegacyPassManager.cpp.
llvm-svn: 239155
James Y Knight [Fri, 5 Jun 2015 13:44:43 +0000 (13:44 +0000)]
[SPARC] Add multiarch include paths.
Adds tests verifying the proper dirs are found in the Debian 8/GCC4.9
layout for sparc (32bit), sparc (32bit) with lib64 multilib, and
sparc64.
The test cases added here also cover r239047, which fixed the linker
paths.
llvm-svn: 239154
Alexander Musman [Fri, 5 Jun 2015 13:40:59 +0000 (13:40 +0000)]
Fix for PR14269: Clang crashes when a bit field is used as inline assembler
input / output with memory constraint.
One generally can't get address of a bit field, so the general solution is to
error on such cases. GCC does the same.
Patch by Andrey Bokhanko
Differential Revision: http://reviews.llvm.org/D10086
llvm-svn: 239153
John Brawn [Fri, 5 Jun 2015 13:34:11 +0000 (13:34 +0000)]
[ARM] Use TargetParser to determine FPU subtarget features
The main effect of this is to fix anomalies where certain -mfpu options didn't
disable everything that they should causing strange behaviour when combined
with -mcpu or -march values that themselves enabled fpu subtarget features,
e.g. -mfpu=fpv5-dp-d16 with -march=armv7em previously behaved the same as
-mfpu=fpv5-sp-d16 due to fp-only-sp not being disabled.
Invalid -mfpu options now also give an error, which is consistent with the
handling of the .fpu directive.
Differential Revision: http://reviews.llvm.org/D10239
llvm-svn: 239152
John Brawn [Fri, 5 Jun 2015 13:31:19 +0000 (13:31 +0000)]
[ARM] Add support for -sp- FPUs and FPU none to TargetParser
These are added mainly for the benefit of clang, but this also means that they
are now allowed in .fpu directives and we emit the correct .fpu directive when
single-precision-only is used.
Differential Revision: http://reviews.llvm.org/D10238
llvm-svn: 239151
John Brawn [Fri, 5 Jun 2015 13:29:24 +0000 (13:29 +0000)]
[ARM] Add knowledge of FPU subtarget features to TargetParser
Add getFPUFeatures to TargetParser, which gets the list of subtarget features
that are enabled/disabled for each FPU, and use it when handling the .fpu
directive.
No functional change in this commit, though clang will start behaving
differently once it starts using this.
Differential Revision: http://reviews.llvm.org/D10237
llvm-svn: 239150
Daniel Jasper [Fri, 5 Jun 2015 13:18:09 +0000 (13:18 +0000)]
clang-format: More eagerly wrap trailing return types.
Before:
template <typename T>
auto
aaaaaaaaaaaaaaaaaaaaaa(T t) -> decltype(
eaaaaaaaaaaaaaaa<T>(t.a)
.
aaaaaaaa());
After:
template <typename T>
auto
aaaaaaaaaaaaaaaaaaaaaa(T t)
-> decltype(
eaaaaaaaaaaaaaaa<T>(t.a).
aaaaaaaa());
Also add a test case for a difficult template parsing case I stumbled accross.
Needs fixing.
llvm-svn: 239149
Ed Maste [Fri, 5 Jun 2015 13:03:08 +0000 (13:03 +0000)]
Improve OSType initialization in elf object file's arch_spec
Setting the OSType in the ArchSpec triple is needed to correctly setup
up the register context plugin. ArchSpec::SetArchitecture, for Mach-O
only, sets the OSType. For ELF it was left to the ObjectFileELF to fill
in the missing OSType.
This change moves the ObjectFileELF logic into ArchSpec.
A new optional 'os' parameter has been added to SetArchitecture.
For ELF, this value is the from the ELF header.e_ident[EI_OSABI].
The default value is 0 or ELFOSABI_NONE.
The real work of determining the OSType was done by the ObjectFileELF
helper function GetOsFromOSABI. This logic has been moved
SetArchitecture.
GetOsFromOSABI has been commented as being deprectated. It is left in
to support asserts.
For ELF the vendor value returned from SetArchitecture should be
UnknownVendor. An unneeded resetting in ObjectFileELF has been removed
and replaced with an assert.
This fixes a problem reading a core file on FreeBSD/ARM because the spec
triple was arm-unknown-unknown.
Patch by Tom Rix.
Differential Revision: http://reviews.llvm.org/D9292
llvm-svn: 239148
Artyom Skrobov [Fri, 5 Jun 2015 12:39:28 +0000 (12:39 +0000)]
[ARMTargetParser] Follow-up for r239099: one case was missed
llvm-svn: 239147
Simon Pilgrim [Fri, 5 Jun 2015 12:35:36 +0000 (12:35 +0000)]
[X86][AVX2] Added tests for v32i8 vector shifts
Currently still scalarized, but D9474 should remedy that.
llvm-svn: 239146
Toma Tabacu [Fri, 5 Jun 2015 12:19:27 +0000 (12:19 +0000)]
Revert "[mips] [IAS] Restore STI.FeatureBits in .set pop." (r239144).
This is breaking the Windows buildbots.
llvm-svn: 239145
Toma Tabacu [Fri, 5 Jun 2015 11:48:54 +0000 (11:48 +0000)]
[mips] [IAS] Restore STI.FeatureBits in .set pop.
Summary:
Only restoring AvailableFeatures is not enough and will lead to buggy behaviour.
For example, if we have a feature enabled and we ".set pop", the next time we try
to ".set" that feature nothing will happen because the "!(STI.getFeatureBits()[Feature])"
check will be false, because we didn't restore STI.FeatureBits.
In order to fix this, we need to make MipsAssemblerOptions remember the STI.FeatureBits
instead of the AvailableFeatures and then regenerate AvailableFeatures each time we ".set pop".
This is because, AFAIK, there is no way to convert from AvailableFeatures back to STI.FeatureBits,
but the reverse is possible by using ComputeAvailableFeatures(STI.FeatureBits).
I also moved the updating of AssemblerOptions inside the "if" statement in
setFeatureBits() and clearFeatureBits(), as there is no reason to update if
nothing changes.
Reviewers: dsanders, mkuper
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9156
llvm-svn: 239144
David Majnemer [Fri, 5 Jun 2015 10:52:40 +0000 (10:52 +0000)]
[LoopVectorize] Don't crash on zero-sized types in isInductionPHI
isInductionPHI wants to calculate the stride based on the pointee size.
However, this is not possible when the pointee is zero sized.
This fixes PR23763.
llvm-svn: 239143
Andrea Di Biagio [Fri, 5 Jun 2015 10:29:55 +0000 (10:29 +0000)]
Simplify code; NFC.
Also, moved test cases from CodeGen/X86/fold-buildvector-bug.ll into
CodeGen/X86/buildvec-insertvec.ll and regenerated CHECK lines using
update_llc_test_checks.py.
llvm-svn: 239142
David Majnemer [Fri, 5 Jun 2015 09:57:57 +0000 (09:57 +0000)]
[InstCombine] Rephrase fix to SimplifyWithOpReplaced
I don't have the IR which is causing the build bot breakage but I can
postulate as to why they are timing out:
1. SimplifyWithOpReplaced was stripping flags from the simplified value.
2. visitSelectInstWithICmp was overriding SimplifyWithOpReplaced because
it's simplification wasn't correct.
3. InstCombine would revisit the add instruction and note that it can
rederive the flags.
4. By modifying the value, we chose to revisit instructions which reuse
the value. One of the instructions is the original select, causing
LLVM to never reach fixpoint.
Instead, strip the flags only when we are sure we are going to perform
the simplification.
llvm-svn: 239141
Yaron Keren [Fri, 5 Jun 2015 09:40:53 +0000 (09:40 +0000)]
C++ 11 rangify for loop.
llvm-svn: 239140
Daniel Jasper [Fri, 5 Jun 2015 09:31:20 +0000 (09:31 +0000)]
Revert "[InstCombine] Don't miscompile safe increment idiom"
This is breaking a lot of build bots and is causing very long-running
compiles (infinite loops)?
Likely, we shouldn't return nullptr?
llvm-svn: 239139
Daniel Jasper [Fri, 5 Jun 2015 08:25:37 +0000 (08:25 +0000)]
clang-format: [JS] Let fat arrows have 'Assignment' precedence.
This is a more correct representation than using "Equality" introduced
in r238942 which was a quick fix to solve an actual regression.
According to the typescript spec, arrows behave like "low-precedence"
assignments.
Before:
var a = a.aaaaaaa((a: a) =>
aaaaaaaaaaaaaaaaaaaaa(
bbbbbbbbb) &&
aaaaaaaaaaaaaaaaaaaaa(bbbbbbb));
After:
var a = a.aaaaaaa((a: a) =>
aaaaaaaaaaaaaaaaaaaaa(
bbbbbbbbb) &&
aaaaaaaaaaaaaaaaaaaaa(bbbbbbb));
llvm-svn: 239137
Simon Pilgrim [Fri, 5 Jun 2015 08:24:23 +0000 (08:24 +0000)]
[X86][SSE] Added tests for i8/i16 vector shifts
Currently still scalarized, but D9474 should remedy that.
llvm-svn: 239136
Chaoren Lin [Fri, 5 Jun 2015 06:28:43 +0000 (06:28 +0000)]
Check before using platform specific attributes.
Summary: `os.uname` in TestUniversal and `os.geteuid` in TestTerminal.
Reviewers: clayborg, zturner
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10202
llvm-svn: 239135
Yury Gribov [Fri, 5 Jun 2015 06:08:23 +0000 (06:08 +0000)]
[ASan] Add process basename to log name and error message to
simplify analysis of sanitized systems logs.
Differential Revision: http://reviews.llvm.org/D7333
llvm-svn: 239134
Tobias Grosser [Fri, 5 Jun 2015 05:52:15 +0000 (05:52 +0000)]
Avoid the use of std::map emplace
This functionality does not yet seem to exist on all buildbots.
llvm-svn: 239133
Sagar Thakur [Fri, 5 Jun 2015 05:47:54 +0000 (05:47 +0000)]
[lldb-server][MIPS] Read/Write FP registers in FR0 mode
Adding support for read/write FP registers in FR0 mode of mips.
Reviewers: clayborg, tberghammer, jaydeep
Subscribers: emaste, nitesh.jain, bhushan, mohit.bhakkad, lldb-commits
Differential Revision: http://reviews.llvm.org/D10242
llvm-svn: 239132
Tobias Grosser [Fri, 5 Jun 2015 05:31:46 +0000 (05:31 +0000)]
Free two strings produced by isl
With this commit 'make check-polly' is now address sanitizer clean.
llvm-svn: 239131
Oleksiy Vyalov [Fri, 5 Jun 2015 01:32:45 +0000 (01:32 +0000)]
Fix error handling in AdbClient - PushFile and PullFile.
http://reviews.llvm.org/D10176
llvm-svn: 239130
Justin Bogner [Fri, 5 Jun 2015 01:23:42 +0000 (01:23 +0000)]
InstrProf: Fix reading of consecutive 32 bit coverage maps
When we generate coverage data, we explicitly set each coverage map's
alignment to 8 (See InstrProfiling::lowerCoverageData), but when we
read the coverage data, we assume consecutive maps are exactly
adjacent. When we're dealing with 32 bit, maps can end on a 4 byte
boundary, causing us to think the padding is part of the next record.
Fix this by adjusting the buffer to an appropriately aligned address
between records.
This is pretty awkward to test, as it requires a binary with multiple
coverage maps to hit, so we'd need to check in multiple source files
and a binary blob as inputs.
llvm-svn: 239129
Hubert Tong [Fri, 5 Jun 2015 01:10:24 +0000 (01:10 +0000)]
[Concepts] lex keywords: concept and requires
Summary:
This patch enables lexing of `concept` and `requires` as keywords.
Further changes which add messages for future keyword compat are to
follow.
Test Plan:
Testing of C++14 + Concepts TS mode is added to
`test/Lexer/keywords_test.cpp`, which expects that the new keywords are
enabled under said mode.
Reviewers: faisalv, fraggamuffin, rsmith
Reviewed By: rsmith
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D10233
llvm-svn: 239128
Chaoren Lin [Fri, 5 Jun 2015 00:28:06 +0000 (00:28 +0000)]
Delegate path operations to FileSpec.
Summary:
- Added PrependPathComponent utility functions to FileSpec.
- Delegate path operations in ParseCompileUnit to FileSpec.
- Delegate path operations in ParseSupportFiles to FileSpec.
Reviewers: clayborg, vharron, ovyalov
Reviewed By: ovyalov
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10253
llvm-svn: 239127
Siva Chandra [Fri, 5 Jun 2015 00:22:49 +0000 (00:22 +0000)]
[TestChangeProcessGroup] Mark the test as xfail for Android API 16
Summary:
This change adds the infrastructure to mark tests as xfail for specific
Android API levels.
Test Plan: dotest.py TestChangeProcessGroup on an Android API 16 device.
Reviewers: chying, labath, chaoren
Reviewed By: labath, chaoren
Subscribers: tberghammer, lldb-commits
Differential Revision: http://reviews.llvm.org/D10261
llvm-svn: 239126
Alexey Samsonov [Thu, 4 Jun 2015 23:58:31 +0000 (23:58 +0000)]
Revert "[Object, ELF] Fix segmentation fault in ELFFile::getSectionName()."
This reverts commit r239124.
llvm-svn: 239125
Alexey Samsonov [Thu, 4 Jun 2015 23:40:23 +0000 (23:40 +0000)]
[Object, ELF] Fix segmentation fault in ELFFile::getSectionName().
Don't do a null dereference if .shstrtab section is missing.
llvm-svn: 239124
Sean Silva [Thu, 4 Jun 2015 23:38:11 +0000 (23:38 +0000)]
Remove unused defaulted argument `IncludeTextualHeaders`.
llvm-svn: 239123
John Thompson [Thu, 4 Jun 2015 23:35:19 +0000 (23:35 +0000)]
Fixed modularize to warn about missing headers referenced in a module map.
llvm-svn: 239122
Jim Grosbach [Thu, 4 Jun 2015 23:35:03 +0000 (23:35 +0000)]
MC: Clean up naming in MCObjectFileInfo.h.
Init*() methods to init*().
llvm-svn: 239121
Jim Grosbach [Thu, 4 Jun 2015 23:35:00 +0000 (23:35 +0000)]
MC: Tidy up formatting and doc comments. NFC.
llvm-svn: 239120
Jim Grosbach [Thu, 4 Jun 2015 23:25:54 +0000 (23:25 +0000)]
MC: Clean up the naming for MCMachObjectWriter. NFC.
s/ExecutePostLayoutBinding/executePostLayoutBinding/
s/ComputeSymbolTable/computeSymbolTable/
s/BindIndirectSymbols/bindIndirectSymbols/
s/RecordTLVPRelocation/recordTLVPRelocation/
s/RecordScatteredRelocation/recordScatteredRelocation/
s/WriteLinkerOptionsLoadCommand/writeLinkerOptionsLoadCommand/
s/WriteLinkeditLoadCommand/writeLinkeditLoadCommand/
s/WriteNlist/writeNlist/
s/WriteDysymtabLoadCommand/writeDysymtabLoadCommand/
s/WriteSymtabLoadCommand/writeSymtabLoadCommand/
s/WriteSection/writeSection/
s/WriteSegmentLoadCommand/writeSegmentLoadCommand/
s/WriteHeader/writeHeader/
llvm-svn: 239119
Jim Grosbach [Thu, 4 Jun 2015 23:25:19 +0000 (23:25 +0000)]
MC: Move MachObjectWriter::SectionAddress to private.
There's already a get() method everything that needs it is using.
llvm-svn: 239118
Jim Grosbach [Thu, 4 Jun 2015 23:25:05 +0000 (23:25 +0000)]
MC: Tidy up formatting and doc comments. NFC.
llvm-svn: 239117
Alexey Samsonov [Thu, 4 Jun 2015 23:14:43 +0000 (23:14 +0000)]
[Object, ELF] Don't assert on invalid magic in createELFObjectFile.
Instead, return a proper error code from factory.
llvm-svn: 239116
David Majnemer [Thu, 4 Jun 2015 23:11:30 +0000 (23:11 +0000)]
[InstCombine] Don't miscompile safe increment idiom
We cleverly handle cases where computation done in one argument of a select
instruction is suitable for the other operand, thus obviating the need
of the select and the comparison. However, the other operand cannot
have flags.
This fixes PR23757.
llvm-svn: 239115
Swaroop Sridhar [Thu, 4 Jun 2015 23:03:21 +0000 (23:03 +0000)]
Statepoint: Fix handling of Far Immediate calls
gc.statepoint intrinsics with a far immediate call target
were lowered incorrectly as pc-rel32 calls.
This change fixes the problem, and generates an indirect call
via a scratch register.
For example:
Intrinsic:
%safepoint_token = call i32 (i64, i32, void ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_isVoidf(i64 0, i32 0, void ()* inttoptr (i64
140727162896504 to void ()*), i32 0, i32 0, i32 0, i32 0)
Old Incorrect Lowering:
callq
140727162896504
New Correct Lowering:
movabsq $
140727162896504, %rax
callq *%rax
In lowerCallFromStatepoint(), the callee-target was modified and
represented as a "TargetConstant" node, rather than a "Constant" node.
Undoing this modification enabled LowerCall() to generate the
correct CALL instruction.
llvm-svn: 239114
Alexey Samsonov [Thu, 4 Jun 2015 22:58:25 +0000 (22:58 +0000)]
[Object, ELF] Don't call llvm_unreachable() from createELFObjectFile.
Instead, return a proper error code from factory.
llvm-svn: 239113
Hubert Tong [Thu, 4 Jun 2015 22:53:21 +0000 (22:53 +0000)]
Test commit access.
Fixes trailing whitespace in lib/Sema/JumpDiagnostics.cpp.
llvm-svn: 239112