Simon Pilgrim [Sun, 16 Jul 2017 13:59:44 +0000 (13:59 +0000)]
[X86] Add BMI1 scheduling tests
llvm-svn: 308135
Tobias Grosser [Sun, 16 Jul 2017 13:54:41 +0000 (13:54 +0000)]
[Polly] Fix a typo [NFC]
Reviewers: grosser, Meinersbur, bollu
Tags: #polly
Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in>
Differential Revision: https://reviews.llvm.org/D35459
llvm-svn: 308134
Simon Pilgrim [Sun, 16 Jul 2017 13:40:44 +0000 (13:40 +0000)]
[X86] Add LZCNT scheduling tests
llvm-svn: 308133
Simon Pilgrim [Sun, 16 Jul 2017 12:06:06 +0000 (12:06 +0000)]
[X86][SSE4A] Add EXTRQ/INSERTQ values to BTVER2 scheduling model
llvm-svn: 308132
Simon Pilgrim [Sun, 16 Jul 2017 11:43:16 +0000 (11:43 +0000)]
[X86][AVX] Regenerate tests with constant broadcast comments
llvm-svn: 308131
Simon Pilgrim [Sun, 16 Jul 2017 11:40:23 +0000 (11:40 +0000)]
[X86][AVX] Regenerate vector tzcnt tests with constant broadcast comments
llvm-svn: 308130
Simon Pilgrim [Sun, 16 Jul 2017 11:38:14 +0000 (11:38 +0000)]
[X86][AVX] Regenerate vector idiv tests with constant broadcast comments
llvm-svn: 308129
Simon Pilgrim [Sun, 16 Jul 2017 11:36:11 +0000 (11:36 +0000)]
[X86][AVX] Regenerate combine tests with constant broadcast comments
llvm-svn: 308128
Hiroshi Inoue [Sun, 16 Jul 2017 08:11:56 +0000 (08:11 +0000)]
fix typos in comments; NFC
llvm-svn: 308127
Hiroshi Inoue [Sun, 16 Jul 2017 07:48:48 +0000 (07:48 +0000)]
fix typos in comments; NFC
llvm-svn: 308126
Craig Topper [Sun, 16 Jul 2017 06:57:41 +0000 (06:57 +0000)]
[InstSimplify] Use commutable matchers to simplify some code. NFC
llvm-svn: 308125
Craig Topper [Sun, 16 Jul 2017 05:37:58 +0000 (05:37 +0000)]
[InstCombine] Move (0 - x) & 1 --> x & 1 to SimplifyDemandedUseBits.
This removes a dedicated matcher and allows us to support more than just an AND masking the lower bit.
llvm-svn: 308124
Vitaly Buka [Sun, 16 Jul 2017 01:28:40 +0000 (01:28 +0000)]
[asan] Disable not working new test on Windows
llvm-svn: 308123
Vitaly Buka [Sun, 16 Jul 2017 01:19:35 +0000 (01:19 +0000)]
[msan] Add missing include for fix test on Windows
llvm-svn: 308122
Vitaly Buka [Sun, 16 Jul 2017 01:05:37 +0000 (01:05 +0000)]
[tsan] Disable test with debug runtime
Test expects at least -O1 compiled runtime.
llvm-svn: 308121
Vitaly Buka [Sun, 16 Jul 2017 00:40:40 +0000 (00:40 +0000)]
[asan] Attempt to fix test in Windows after r308064
llvm-svn: 308120
Teresa Johnson [Sun, 16 Jul 2017 00:28:22 +0000 (00:28 +0000)]
Fix bot failures from r308114
Finally figured out that some bots were failing from r308114
with the message:
llvm-lto2: LTO::run failed: No available targets are compatible with this triple.
after adding in some other checking that finally caused this to show up
in the FileCheck output.
Added "REQUIRES: x86-registered-target" which should fix it.
llvm-svn: 308119
Faisal Vali [Sun, 16 Jul 2017 00:23:04 +0000 (00:23 +0000)]
[c++2a] Add option -std=c++2a to enable support for potential/transitional C++2a features
- as usual C++2a implies all the C++'s that came before it.
Thank you Aaron for the feedback here: https://reviews.llvm.org/D35454
llvm-svn: 308118
Vitaly Buka [Sun, 16 Jul 2017 00:17:11 +0000 (00:17 +0000)]
[compiler-rt] Fix fix format specifies type in test
llvm-svn: 308117
Teresa Johnson [Sun, 16 Jul 2017 00:01:16 +0000 (00:01 +0000)]
Attempt 2 to debug bot failures
Modify checks from r308114 even more, to see if I can narrow down
why some bots are still failing.
llvm-svn: 308116
Teresa Johnson [Sat, 15 Jul 2017 23:31:32 +0000 (23:31 +0000)]
Attempt to debug bot failures
Simplifying checks from r308114, to see if I can narrow down why some
bots are still failing.
llvm-svn: 308115
Teresa Johnson [Sat, 15 Jul 2017 22:58:06 +0000 (22:58 +0000)]
Restore with fix "[ThinLTO] Ensure we always select the same function copy to import"
This restores r308078/r308079 with a fix for bot non-determinisim (make
sure we run llvm-lto in single threaded mode so the debug output doesn't get
interleaved).
llvm-svn: 308114
Tobias Grosser [Sat, 15 Jul 2017 22:42:17 +0000 (22:42 +0000)]
[ScopDetection] If a loop is not part of a scop, none of it backedges can be
This patch makes sure that in case a loop is not fully contained within a region
that later forms a SCoP, none of the loop backedges are allowed to be part of
the region. We currently do not support the situation where only some of a loops
backedges are part of a scop. Today, this can break both scop modeling and code
generation. One such breaking test case is for example
test/ScopDetectionDiagnostics/loop_partially_in_scop-2.ll, where we totally
forgot to code generate some of the backedges. Fortunately, it is commonly not
necessary to support these partial loops, it is way more common that either
no backedge is included in a region or all loop backedge are included.
This fixes a recent miscompile in
MultiSource/Benchmarks/MiBench/consumer-typeset which was exposed after
r306477.
llvm-svn: 308113
Craig Topper [Sat, 15 Jul 2017 22:06:19 +0000 (22:06 +0000)]
[IR] Implement Constant::isNegativeZeroValue/isZeroValue/isAllOnesValue/isOneValue/isMinSignedValue for ConstantDataVector without going through getElementAsConstant
Summary:
Currently these methods call ConstantDataVector::getSplatValue which uses getElementsAsConstant to create a Constant object representing the element value. This method incurs a map lookup to see if we already have created such a Constant before and if not allocates a new Constant object.
This patch changes these methods to use getElementAsAPFloat and getElementAsInteger so we can just examine the data values directly.
Reviewers: spatel, pcc, dexonsmith, bogner, craig.topper
Reviewed By: craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35040
llvm-svn: 308112
Craig Topper [Sat, 15 Jul 2017 21:49:49 +0000 (21:49 +0000)]
[InstCombine] Improve the expansion in SimplifyUsingDistributiveLaws to handle cases where one side doesn't simplify, but the other side resolves to an identity value
Summary:
If one side simplifies to the identity value for inner opcode, we can replace the value with just the operation that can't be simplified.
I've removed a couple now unneeded special cases in visitAnd and visitOr. There are probably other cases I missed.
Reviewers: spatel, majnemer, hfinkel, dberlin
Reviewed By: spatel
Subscribers: grandinj, llvm-commits, spatel
Differential Revision: https://reviews.llvm.org/D35451
llvm-svn: 308111
Simon Pilgrim [Sat, 15 Jul 2017 21:17:35 +0000 (21:17 +0000)]
[X86][AVX] Regenerate tests with constant broadcast comments
llvm-svn: 308110
Simon Pilgrim [Sat, 15 Jul 2017 20:28:09 +0000 (20:28 +0000)]
[X86][AVX] Regenerate tests with constant broadcast comments
llvm-svn: 308109
Simon Pilgrim [Sat, 15 Jul 2017 19:29:19 +0000 (19:29 +0000)]
Strip trailing whitespace. NFCI
llvm-svn: 308108
Reid Kleckner [Sat, 15 Jul 2017 18:10:39 +0000 (18:10 +0000)]
[CodeView] Dump BuildInfoSym and ProcSym type indices
I need to print the type index in hex so that I can match it in
FileCheck for a test I'm writing.
llvm-svn: 308107
Reid Kleckner [Sat, 15 Jul 2017 18:10:15 +0000 (18:10 +0000)]
Fix mis-use of std::lower_bound
Binary search in C++ is such a PITA. =/
llvm-svn: 308106
Sanjay Patel [Sat, 15 Jul 2017 17:26:01 +0000 (17:26 +0000)]
[InstCombine] improve (1 << x) & 1 --> zext(x == 0) folding
1. Add a one-use check to prevent increasing instruction count.
2. Generalize the pattern matching to include vector types.
llvm-svn: 308105
Craig Topper [Sat, 15 Jul 2017 17:09:23 +0000 (17:09 +0000)]
[InstCombine] Add test cases for (X & (Y | ~X)) -> (X & Y) where the not is an inverted compare. NFC
Do the same for (X | (Y & ~X)) -> (X | Y)
llvm-svn: 308104
Craig Topper [Sat, 15 Jul 2017 17:09:22 +0000 (17:09 +0000)]
[InstCombine] Move 4 test cases from a test that didn't use FileCheck and merge them into a existing test file. NFC
llvm-svn: 308103
Sanjay Patel [Sat, 15 Jul 2017 15:55:07 +0000 (15:55 +0000)]
[InstCombine] add tests for (1 << x) & 1 --> zext(x == 0) ; NFC
This fold hit the trifecta:
1. It was untested.
2. It oversteps (multiuse is not checked, so increases instruction count).
3. It is incomplete (doesn't work for vectors).
llvm-svn: 308102
Richard Smith [Sat, 15 Jul 2017 15:51:59 +0000 (15:51 +0000)]
[cxx_status] Fix typos.
llvm-svn: 308101
Chandler Carruth [Sat, 15 Jul 2017 15:44:36 +0000 (15:44 +0000)]
[wasm] Update two tests for r308025 which causes scheduling changes due
to the newly improved AA information.
llvm-svn: 308100
Richard Smith [Sat, 15 Jul 2017 15:42:36 +0000 (15:42 +0000)]
[cxx_status] Add approved Toronto WG21 motions.
llvm-svn: 308099
Sanjay Patel [Sat, 15 Jul 2017 15:29:47 +0000 (15:29 +0000)]
[InstCombine] allow (0 - x) & 1 --> x & 1 for vectors
llvm-svn: 308098
Marshall Clow [Sat, 15 Jul 2017 15:22:21 +0000 (15:22 +0000)]
Update issues moved in Toronto
llvm-svn: 308097
Sanjay Patel [Sat, 15 Jul 2017 15:01:33 +0000 (15:01 +0000)]
[InstCombine] remove dead code/tests; NFCI
These patterns and tests were added to InstSimplify with:
https://reviews.llvm.org/rL303004
llvm-svn: 308096
Chandler Carruth [Sat, 15 Jul 2017 13:50:26 +0000 (13:50 +0000)]
Revert r308078 (and subsequent tweak in r308079) which introduces a test
that appears to exhibit non-determinism and is flaking on the bots
pretty consistently.
r308078: [ThinLTO] Ensure we always select the same function copy to import
r308079: Require asserts in new test that uses debug flag
llvm-svn: 308095
Florian Hahn [Sat, 15 Jul 2017 13:13:19 +0000 (13:13 +0000)]
[LoopInterchange] Add some optimization remarks.
Reviewers: anemet, karthikthecool, blitz.opensource
Reviewed By: anemet
Subscribers: mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D35122
llvm-svn: 308094
Tobias Grosser [Sat, 15 Jul 2017 12:41:32 +0000 (12:41 +0000)]
[Polly] Translate Scop::DomainMap to islpp
Reviewers: grosser, Meinersbur, bollu
Subscribers: pollydev
Tags: #polly
Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in>
Differential Revision: https://reviews.llvm.org/D35453
llvm-svn: 308093
John McCall [Sat, 15 Jul 2017 11:06:46 +0000 (11:06 +0000)]
Use ARC parsing rules for ns_returns_retained in MRC so that code can
be shared without warnings. Build AttributedTypes to leave breadcrumbs
for tools like the static analyzer. Warn about attempting to use the
attribute with incompatible return types.
llvm-svn: 308092
Yuka Takahashi [Sat, 15 Jul 2017 09:09:51 +0000 (09:09 +0000)]
[Bash-autocompletion] Fixed a bug on bash
Summary: Maybe I mismerged when merging previous commits by hand.
Differential Revision: https://reviews.llvm.org/D35448
llvm-svn: 308091
Nuno Lopes [Sat, 15 Jul 2017 09:09:24 +0000 (09:09 +0000)]
[docs] AliasAnalysis: clarify that PartialAlias doesn't enforce
objects to start at the same address
As discussed on the ML, there's consensus that this is what the implementations
do and it seems sensible.
llvm-svn: 308090
Tobias Grosser [Sat, 15 Jul 2017 09:01:31 +0000 (09:01 +0000)]
[Polly] Use Isl c++ for InvalidDomainMap
Reviewers: grosser, Meinersbur, bollu
Subscribers: maxf, pollydev
Tags: #polly
Contributed-by: Nandini Singhal <cs15mtech01004@iith.ac.in>
Differential Revision: https://reviews.llvm.org/D35308
llvm-svn: 308089
Chandler Carruth [Sat, 15 Jul 2017 08:08:19 +0000 (08:08 +0000)]
[PM/LCG] Teach the LazyCallGraph to maintain reference edges from every
function to every defined function known to LLVM as a library function.
LLVM can introduce calls to these functions either by replacing other
library calls or by recognizing patterns (such as memset_pattern or
vector math patterns) and replacing those with calls. When these library
functions are actually defined in the module, we need to have reference
edges to them initially so that we visit them during the CGSCC walk in
the right order and can effectively rebuild the call graph afterward.
This was discovered when building code with Fortify enabled as that is
a common case of both inline definitions of library calls and
simplifications of code into calling them.
This can in extreme cases of LTO-ing with libc introduce *many* more
reference edges. I discussed a bunch of different options with folks but
all of them are unsatisfying. They either make the graph operations
substantially more complex even when there are *no* defined libfuncs, or
they introduce some other complexity into the callgraph. So this patch
goes with the simplest possible solution of actual synthetic reference
edges. If this proves to be a memory problem, I'm happy to implement one
of the clever techniques to save memory here.
llvm-svn: 308088
Simon Atanasyan [Sat, 15 Jul 2017 07:14:25 +0000 (07:14 +0000)]
[mips] Handle the `long-calls` feature flags in the MIPS backend
If the `long-calls` feature flags is enabled, disable use of the `jal`
instruction. Instead of that call a function by by first loading its
address into a register, and then using the contents of that register.
Differential revision: https://reviews.llvm.org/D35168
llvm-svn: 308087
NAKAMURA Takumi [Sat, 15 Jul 2017 06:32:12 +0000 (06:32 +0000)]
SystemZCodeGen: Update libdeps. r308024 introduced LoopDataPrefetchPass.
llvm-svn: 308086
NAKAMURA Takumi [Sat, 15 Jul 2017 06:32:10 +0000 (06:32 +0000)]
ClangApplyReplacementsTests: Add clangBasic in libdeps.
r308015 introduced clangBasic to instantiate Diagnostics &c,
llvm-svn: 308085
NAKAMURA Takumi [Sat, 15 Jul 2017 06:14:47 +0000 (06:14 +0000)]
clang/test/FixIt/format.m: Tweak for i686, where ssize_t is int. (r308067)
llvm-svn: 308084
Yonghong Song [Sat, 15 Jul 2017 06:08:08 +0000 (06:08 +0000)]
bpf: fix a compilation bug due to unused variable for release build
Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 308083
Matt Arsenault [Sat, 15 Jul 2017 05:52:59 +0000 (05:52 +0000)]
AMDGPU: Return correct type during argument lowering
The type needs to be casted back to the original argument type.
Fixes an assert that for some reason is only run when
using -debug.
Includes an additional combine to avoid test regressions
from having conversions mixed with multiple Assert[SZ]ext
nodes. On subtargets where i16 is legal, this was producing an i32
register with an i16 AssertZExt, truncated to i16 with another i8
AssertZExt.
t2: i32,ch = CopyFromReg t0, Register:i32 %vreg0
t3: i16 = truncate t2
t5: i16 = AssertZext t3, ValueType:ch:i8
t6: i8 = truncate t5
t7: i32 = zero_extend t6
llvm-svn: 308082
Dinar Temirbulatov [Sat, 15 Jul 2017 05:43:54 +0000 (05:43 +0000)]
[SLPVectorizer] Add an extra parameter to tryScheduleBundle function, NFCI.
llvm-svn: 308081
Yonghong Song [Sat, 15 Jul 2017 05:41:42 +0000 (05:41 +0000)]
bpf: generate better lowering code for certain select/setcc instructions
Currently, for code like below,
===
inner_map = bpf_map_lookup_elem(outer_map, &port_key);
if (!inner_map) {
inner_map = &fallback_map;
}
===
the compiler generates (pseudo) code like the below:
===
I1: r1 = bpf_map_lookup_elem(outer_map, &port_key);
I2: r2 = 0
I3: if (r1 == r2)
I4: r6 = &fallback_map
I5: ...
===
During kernel verification process, After I1, r1 holds a state
map_ptr_or_null. If I3 condition is not taken
(path [I1, I2, I3, I5]), supposedly r1 should become map_ptr.
Unfortunately, kernel does not recognize this pattern
and r1 remains map_ptr_or_null at insn I5. This will cause
verificaiton failure later on.
Kernel, however, is able to recognize pattern "if (r1 == 0)"
properly and give a map_ptr state to r1 in the above case.
LLVM here generates suboptimal code which causes kernel verification
failure. This patch fixes the issue by changing BPF insn pattern
matching and lowering to generate proper codes if the righthand
parameter of the above condition is a constant. A test case
is also added.
Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 308080
Teresa Johnson [Sat, 15 Jul 2017 05:27:57 +0000 (05:27 +0000)]
Require asserts in new test that uses debug flag
This should fix bot failures from r308078.
llvm-svn: 308079
Teresa Johnson [Sat, 15 Jul 2017 04:53:05 +0000 (04:53 +0000)]
[ThinLTO] Ensure we always select the same function copy to import
Summary:
Check if the first eligible callee is under the instruction threshold.
Checking this on the first eligible callee ensures that we don't end
up selecting different callees to import when we invoke this routine
with different thresholds due to reaching the callee via paths that
are shallower or hotter (when there are multiple copies, i.e. with
weak or linkonce linkage). We don't want to leave the decision of which
copy to import up to the backend.
Reviewers: mehdi_amini
Subscribers: inglorion, fhahn, llvm-commits
Differential Revision: https://reviews.llvm.org/D35436
llvm-svn: 308078
Richard Trieu [Sat, 15 Jul 2017 02:55:13 +0000 (02:55 +0000)]
[ODRHash] Revert r307743 which reverted r307720
Reapply r307720 to allow processing of constructors and destructors. Reuse
the diagnostics for CXXMethodDecl for them.
llvm-svn: 308077
Haicheng Wu [Sat, 15 Jul 2017 02:12:16 +0000 (02:12 +0000)]
[TTI] Refine the cost of EXT in getUserCost()
Now, getUserCost() only checks the src and dst types of EXT to decide it is free
or not. This change first checks the types, then calls isExtFreeImpl(), and
check if EXT can form ExtLoad at last. Currently, only AArch64 has customized
implementation of isExtFreeImpl() to check if EXT can be folded into its use.
Differential Revision: https://reviews.llvm.org/D34458
llvm-svn: 308076
Kostya Serebryany [Sat, 15 Jul 2017 01:31:40 +0000 (01:31 +0000)]
[libFuzzer] remove stale code
llvm-svn: 308075
Jakub Kuderski [Sat, 15 Jul 2017 01:27:16 +0000 (01:27 +0000)]
[Dominators] Fix reachable visitation and reenable a unit test
This fixes a minor bug in insertion to a reachable node that caused
DominatorTree.InsertDeleteExhaustive flakiness. The patch also adds
a new testcase for this exact failure.
llvm-svn: 308074
Alexander Shaposhnikov [Sat, 15 Jul 2017 01:06:59 +0000 (01:06 +0000)]
[clang] Fix format test
This diff makes the test FixIt/format.m more robust.
The issue was caught by the build bot clang-cmake-thumbv7-a15.
Test plan: make check-all
llvm-svn: 308073
George Karpenkov [Sat, 15 Jul 2017 00:30:46 +0000 (00:30 +0000)]
[compiler-rt] [CMake] Build compiler-rt with no optimizations if the flag says so
Differential Revision: https://reviews.llvm.org/D35400
llvm-svn: 308072
Matthias Braun [Sat, 15 Jul 2017 00:29:25 +0000 (00:29 +0000)]
Try to fix modules build
Module builds somehow report an ambiguity between clang::Diagnostic and
clang::Tooling::Diagnostic. It seems as if one of the additional headers
brought in by the module brings the clang namespace to the toplevel. I
could not find out the reason for that, so for now I go with the simple
fix to bring the build back to green.
rdar://
33321397
llvm-svn: 308071
Jakub Kuderski [Fri, 14 Jul 2017 23:49:12 +0000 (23:49 +0000)]
[Dominators] Temporarily disable a flaky unit test
The DominatorTree.InsertDeleteExhaustive uses a RNG with a
constant seed to generate different sequences of updates. The test
fails on some buildbots and this patch disables it for now.
llvm-svn: 308070
Justin Bogner [Fri, 14 Jul 2017 23:33:04 +0000 (23:33 +0000)]
[libFuzzer] Allow non-fuzzer args after -ignore_remaining_args=1
With this change, libFuzzer will ignore any arguments after a sigil
argument, but it will preserve these arguments at the end of the
command line when launching subprocesses. Using this, its possible to
handle positional and single-dash arguments to the program under test
by discarding everything up to -ignore_remaining_args=1 in
LLVMFuzzerInitialize.
llvm-svn: 308069
Adrian Prantl [Fri, 14 Jul 2017 23:23:58 +0000 (23:23 +0000)]
Add missing space to comment
llvm-svn: 308068
Alexander Shaposhnikov [Fri, 14 Jul 2017 22:57:00 +0000 (22:57 +0000)]
[clang] Fix handling of "%zd" format specifier
This diff addresses FIXME in lib/Analysis/PrintfFormatString.cpp
and makes PrintfSpecifier::getArgType return the correct type.
In particular, this change enables Clang to emit a warning on
incorrect using of "%zd"/"%zn" format specifiers.
Differential revision: https://reviews.llvm.org/D35427
Test plan: make check-all
llvm-svn: 308067
Rafael Espindola [Fri, 14 Jul 2017 22:26:16 +0000 (22:26 +0000)]
Avoid using OutputSections::Sections.
This code runs after clearOutputSections.
llvm-svn: 308066
Jakub Kuderski [Fri, 14 Jul 2017 22:24:15 +0000 (22:24 +0000)]
[Dominators] Remove an extra semicolon and add a missing include.
llvm-svn: 308065
Alex Shlyapnikov [Fri, 14 Jul 2017 22:23:47 +0000 (22:23 +0000)]
[Sanitizers] ASan and LSan allocator set errno on failure.
Summary:
Set proper errno code on alloction failures and change some
implementations to satisfy their man-specified requirements:
LSan: valloc and memalign
ASan: pvalloc, memalign and posix_memalign
Changing both allocators in one patch since LSan depends on ASan allocator in some configurations.
Reviewers: vitalybuka
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D35440
llvm-svn: 308064
Alex Shlyapnikov [Fri, 14 Jul 2017 22:23:46 +0000 (22:23 +0000)]
[Sanitizers] LSan allocator set errno on failure.
Set proper errno code on alloction failures and change valloc and
memalign implementations to satisfy their man-specified requirements.
llvm-svn: 308063
Jakub Kuderski [Fri, 14 Jul 2017 21:58:53 +0000 (21:58 +0000)]
[Dominators] Implement incremental deletions
Summary:
This patch implements incremental edge deletions.
It also makes DominatorTreeBase store a pointer to the parent function. The parent function is needed to perform full rebuilts during some deletions, but it is also used to verify that inserted and deleted edges come from the same function.
Reviewers: dberlin, davide, grosser, sanjoy, brzycki
Reviewed By: dberlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35342
llvm-svn: 308062
Kostya Serebryany [Fri, 14 Jul 2017 21:48:19 +0000 (21:48 +0000)]
[libFuzzer] fix stats during merge
llvm-svn: 308061
Yi Kong [Fri, 14 Jul 2017 21:46:16 +0000 (21:46 +0000)]
[AArch64] Avoid selecting XZR inline ASM memory operand
Restricting register class to PointerRegClass for memory operands.
Also fix the PointerRegClass for AArch64 from GPR64 to GPR64sp, since
XZR cannot hold a memory pointer while SP is.
Fixes PR33134.
Differential Revision: https://reviews.llvm.org/D34999
llvm-svn: 308060
Geoff Berry [Fri, 14 Jul 2017 21:44:12 +0000 (21:44 +0000)]
[AArch64][Falkor] Avoid HW prefetcher tag collisions (step 1)
Summary:
This patch is the first step in reducing HW prefetcher instruction tag
collisions in inner loops for Falkor. It adds a pass that annotates IR
loads with metadata to indicate that they are known to be strided loads,
and adds a target lowering hook that translates this metadata to a
target-specific MachineMemOperand flag.
A follow on change will use this MachineMemOperand flag to re-write
instructions to reduce tag collisions.
Reviewers: mcrosier, t.p.northover
Subscribers: aemerson, rengolin, mgorny, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34963
llvm-svn: 308059
Jakub Kuderski [Fri, 14 Jul 2017 21:38:15 +0000 (21:38 +0000)]
[Dominators] Add a missing include
llvm-svn: 308058
Rafael Espindola [Fri, 14 Jul 2017 21:37:10 +0000 (21:37 +0000)]
Pass OutputSectionCommand to getOSThunkSec. NFC.
llvm-svn: 308057
Rafael Espindola [Fri, 14 Jul 2017 21:33:14 +0000 (21:33 +0000)]
Pass OutputSectionCommand to forEachExecInputSection's callback.
NFC, just makes the OutputSectionCommand available.
llvm-svn: 308056
Davide Italiano [Fri, 14 Jul 2017 21:20:29 +0000 (21:20 +0000)]
[AMDGPU] Throw away more dead code. NFCI.
llvm-svn: 308055
Jakub Kuderski [Fri, 14 Jul 2017 21:17:33 +0000 (21:17 +0000)]
[Dominators] Implement incremental insertions
Summary:
This patch introduces incremental edge insertions based on the Depth Based Search algorithm.
Insertions should work for both dominators and postdominators.
Reviewers: dberlin, grosser, davide, sanjoy, brzycki
Reviewed By: dberlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35341
llvm-svn: 308054
Alex Shlyapnikov [Fri, 14 Jul 2017 21:17:16 +0000 (21:17 +0000)]
[Sanitizers] Scudo allocator set errno on failure.
Summary:
Set proper errno code on alloction failure and change pvalloc and
posix_memalign implementation to satisfy their man-specified
requirements.
Reviewers: cryptoad
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35429
llvm-svn: 308053
Dimitry Andric [Fri, 14 Jul 2017 21:14:58 +0000 (21:14 +0000)]
Fix mixed line terminators. NFC.
llvm-svn: 308052
Geoff Berry [Fri, 14 Jul 2017 20:13:21 +0000 (20:13 +0000)]
[EarlyCSE] Handle calls with no MemorySSA info.
Summary:
When checking for memory dependencies between calls using MemorySSA,
handle cases where the calls have no MemoryAccess associated with them
because the AA analysis being used has determined that the call does not
read/write memory.
Fixes PR33756
Reviewers: dberlin, davide
Subscribers: mcrosier, llvm-commits, Prazek
Differential Revision: https://reviews.llvm.org/D35317
llvm-svn: 308051
Haicheng Wu [Fri, 14 Jul 2017 19:16:47 +0000 (19:16 +0000)]
[JumpThreading] Add a pattern to TryToUnfoldSelectInCurrBB()
Add the following pattern to TryToUnfoldSelectInCurrBB()
bb:
%p = phi [0, %bb1], [1, %bb2], [0, %bb3], [1, %bb4], ...
%c = cmp %p, 0
%s = select %c, trueval, falseval
The Select in the above pattern will be unfolded and then jump-threaded. The
current implementation does not allow CMP in the middle of PHI and Select.
Differential Revision: https://reviews.llvm.org/D34762
llvm-svn: 308050
Krzysztof Parzyszek [Fri, 14 Jul 2017 19:02:32 +0000 (19:02 +0000)]
[Hexagon] Replace ISD opcode VPACK with VPACKE/VPACKO, NFC
This breaks up pack-even and pack-odd into two separate operations.
llvm-svn: 308049
Nico Weber [Fri, 14 Jul 2017 18:52:30 +0000 (18:52 +0000)]
Fix flag names in @available docs.
llvm-svn: 308048
Davide Italiano [Fri, 14 Jul 2017 18:47:29 +0000 (18:47 +0000)]
[AMDGPU] Garbage collect dead code. NFCI.
Unbreaks the build with GCC7.
llvm-svn: 308047
Nico Weber [Fri, 14 Jul 2017 18:45:36 +0000 (18:45 +0000)]
Fix link in docs.
llvm-svn: 308046
Kostya Serebryany [Fri, 14 Jul 2017 18:42:07 +0000 (18:42 +0000)]
do more processing in clang-fuzzer (use EmitAssemblyAction)
Summary: use EmitAssemblyAction in clang-fuzzer
Reviewers: klimek, rsmith
Reviewed By: klimek
Subscribers: cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D34267
llvm-svn: 308045
Nico Weber [Fri, 14 Jul 2017 18:40:52 +0000 (18:40 +0000)]
Add documentation for @available
https://reviews.llvm.org/D35379
llvm-svn: 308044
Sterling Augustine [Fri, 14 Jul 2017 18:33:30 +0000 (18:33 +0000)]
Prevent ClangTools from generating dependency files.
D34304 created a way for ToolInvocations to conditionally generate
dependency files, and updated call sites to preserve the old behavior
of not generating them by default. CompilerInvocations...
Summary:
...are yet another
call-path that needs updating to preserve the old behavior.
Reviewers: klimek, echristo
Reviewed By: echristo
Subscribers: echristo, cfe-commits
Differential Revision: https://reviews.llvm.org/D35131
llvm-svn: 308043
Craig Topper [Fri, 14 Jul 2017 18:30:09 +0000 (18:30 +0000)]
[TableGen][MC] Fix a few places where we didn't hide the underlying type of LaneBitmask very well.
One place compared with 32, which I've replaced with LaneBitmask::BitWidth.
The other places are shifts of a constant 1 by a lane number. But if LaneBitmask were to be a larger type than 32-bits like 64-bits, the 1 would need to be 1ULL to do a 64-bit shift. To hide this I've added a LanebitMask::getLane that hides the shift and make sures the 1 is casted to correct type first.
llvm-svn: 308042
Jakub Kuderski [Fri, 14 Jul 2017 18:26:21 +0000 (18:26 +0000)]
[Dominators] Update Clang's DominatorTree to use the new template argument
Summary: This patch makes the Clang's DominatorTree use the new IsPostDom template argument for DominatorTreeBase.
Reviewers: dberlin, sanjoy, davide, grosser
Reviewed By: dberlin
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35316
llvm-svn: 308041
Jakub Kuderski [Fri, 14 Jul 2017 18:26:09 +0000 (18:26 +0000)]
[Dominators] Make IsPostDominator a template parameter
Summary:
DominatorTreeBase used to have IsPostDominators (bool) member to indicate if the tree is a dominator or a postdominator tree. This made it possible to switch between the two 'modes' at runtime, but it isn't used in practice anywhere.
This patch makes IsPostDominator a template argument. This way, it is easier to switch between different algorithms at compile-time based on this argument and design external utilities around it. It also makes it impossible to incidentally assign a postdominator tree to a dominator tree (and vice versa), and to further simplify template code in GenericDominatorTreeConstruction.
Reviewers: dberlin, sanjoy, davide, grosser
Reviewed By: dberlin
Subscribers: mzolotukhin, llvm-commits
Differential Revision: https://reviews.llvm.org/D35315
llvm-svn: 308040
Alfred Huang [Fri, 14 Jul 2017 17:56:55 +0000 (17:56 +0000)]
[AMDGPU] Do not insert an instruction into worklist twice in movetovalu
In moveToVALU(), move to vector ALU is performed, all instrs in
the use chain will be visited. We do not want the same node to be
pushed to the visit worklist more than once.
Differential Revision: https://reviews.llvm.org/D34726
llvm-svn: 308039
Aaron Ballman [Fri, 14 Jul 2017 17:49:52 +0000 (17:49 +0000)]
Unconditionally use .init_array instead of .ctors on Solaris.
Patch by Fedor Sergeev
llvm-svn: 308038
Alexander Shaposhnikov [Fri, 14 Jul 2017 17:30:14 +0000 (17:30 +0000)]
[clang] Add getSignedSizeType method
C11 standard refers to the signed counterpart of the type size_t in
the paragraph 7.21.6.1 where it defines d, i, o, u, x, or x conversion specifiers
(in printf format string).
In Clang there is a FIXME (in lib/Analysis/PrintfFormatString.cpp) for this case
(which is not handled correctly at the moment).
This diff adds getSignedSizeType method to TargetInfo and exposes it
in ASTContext similarly to how it is done for getSizeType.
lib/Analysis/PrintfFormatString.cpp will be changed in a separate commit.
Differential revision: https://reviews.llvm.org/D35378
Test plan: make check-all
llvm-svn: 308037
Jakub Kuderski [Fri, 14 Jul 2017 16:56:35 +0000 (16:56 +0000)]
[Dominators] Simplify block and node printing
Summary:
This patch adds `BlockPrinter`-- a small wrapper for printing CFG nodes and DomTree nodes to `raw_ostream`. It is meant to be only used internally, for debugging and printing errors.
Reviewers: dberlin, sanjoy, grosser, davide
Reviewed By: grosser, davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D35286
llvm-svn: 308036