Craig Topper [Tue, 14 Nov 2017 16:14:00 +0000 (16:14 +0000)]
[X86] Fix typo in comment. NFC
llvm-svn: 318156
Oliver Stannard [Tue, 14 Nov 2017 15:35:15 +0000 (15:35 +0000)]
[Docs] Add tablegen backend for target opcode documentation
This is a tablegen backend to generate documentation for the opcodes that exist
for each target. For each opcode, it lists the assembly string, the names and
types of all operands, and the flags and predicates that apply to the opcode.
Differential revision: https://reviews.llvm.org/D31025
llvm-svn: 318155
Sam McCall [Tue, 14 Nov 2017 15:22:34 +0000 (15:22 +0000)]
[tooling] Make compile_flags.txt negative test more hermetic
llvm-svn: 318154
Ilya Biryukov [Tue, 14 Nov 2017 14:26:42 +0000 (14:26 +0000)]
Use input redirection in WebAssembly/comdat.ll test.
To match how the other tests do it.
llvm-svn: 318153
Dave Lee [Tue, 14 Nov 2017 14:17:26 +0000 (14:17 +0000)]
Make isDefinition matcher support ObjCMethodDecl
Summary:
Allow the `isDefinition()` matcher to apply to `ObjCMethodDecl` nodes, in
addition to those it already supports. For whatever reason, `ObjCMethodDecl`
does not inherit from `FunctionDecl` and so this is specialization is necessary.
Reviewers: aaron.ballman, malcolm.parsons, alexshap
Reviewed By: aaron.ballman
Subscribers: cfe-commits, klimek
Differential Revision: https://reviews.llvm.org/D39948
llvm-svn: 318152
Simon Pilgrim [Tue, 14 Nov 2017 14:03:29 +0000 (14:03 +0000)]
[X86][AVX] Add scheduling test for vmovntdq 256-bit store
Needs to use inline asm as domain will otherwise be changed to float (vmovntps)
llvm-svn: 318151
Gabor Horvath [Tue, 14 Nov 2017 12:14:49 +0000 (12:14 +0000)]
Make DiagnosticIDs::getAllDiagnostics static. NFC.
Patch by: Andras Leitereg!
Differential Revision: https://reviews.llvm.org/D39372
llvm-svn: 318150
Gil Rapaport [Tue, 14 Nov 2017 12:09:30 +0000 (12:09 +0000)]
[LV] Introduce VPBlendRecipe, VPWidenMemoryInstructionRecipe
This patch is part of D38676.
The patch introduces two new Recipes to handle instructions whose vectorization
involves masking. These Recipes take VPlan-level masks in D38676, but still rely
on ILV's existing createEdgeMask(), createBlockInMask() in this patch.
VPBlendRecipe handles intra-loop phi nodes, which are vectorized as a sequence
of SELECTs. Its execute() code is refactored out of ILV::widenPHIInstruction(),
which now handles only loop-header phi nodes.
VPWidenMemoryInstructionRecipe handles load/store which are to be widened
(but are not part of an Interleave Group). In this patch it simply calls
ILV::vectorizeMemoryInstruction on execute().
Differential Revision: https://reviews.llvm.org/D39068
llvm-svn: 318149
Tim Northover [Tue, 14 Nov 2017 11:43:54 +0000 (11:43 +0000)]
ARM: correctly update CFG when splitting BB to fix branch.
Because the block-splitting code is multi-purpose, we have to meddle with the
branches when using it to fixup a conditional branch destination. We got the
code right, but forgot to update the CFG so the verifier complained when
expensive checks were on.
Probably harmless since constant-islands comes so late, but best to fix it
anyway.
llvm-svn: 318148
Gabor Horvath [Tue, 14 Nov 2017 11:30:38 +0000 (11:30 +0000)]
[ASTImporter] TypeAliasTemplate and PackExpansion importing capability
Patch by: Zoltan Gera!
Differential Revision: https://reviews.llvm.org/D39247
llvm-svn: 318147
Diana Picus [Tue, 14 Nov 2017 11:20:32 +0000 (11:20 +0000)]
[ARM GlobalISel] Remove C++ code for G_CONSTANT
Get rid of the handwritten instruction selector code for handling
G_CONSTANT. This code wasn't checking all the preconditions correctly
anyway, so it's better to leave it to TableGen, which can handle at
least some cases correctly (e.g. MOVi, MOVi16, folding into binary
operations). Also add tests to cover those cases.
llvm-svn: 318146
Pavel Labath [Tue, 14 Nov 2017 11:15:03 +0000 (11:15 +0000)]
Add a data formatter for libc++ std::bitset
Reviewers: jingham, EricWF
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D39966
llvm-svn: 318145
Alexander Richardson [Tue, 14 Nov 2017 11:14:25 +0000 (11:14 +0000)]
Rename identifiers named `__output`
Summary:
In the CHERI clang compiler __output and __input are keywords and therefore
we can't compile libc++ with our compiler.
Reviewers: mclow.lists, EricWF, theraven
Reviewed By: EricWF
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D39537
llvm-svn: 318144
Momchil Velikov [Tue, 14 Nov 2017 10:36:52 +0000 (10:36 +0000)]
[ARM] Fix incorrect conversion of a tail call to an ordinary call
When we emit a tail call for Armv8-M, but then discover that the caller needs to
save/restore `LR`, we convert the tail call to an ordinary one, since restoring
`LR` takes extra instructions, which may negate the benefits of the tail
call. If the callee, however, takes stack arguments, this conversion is
incorrect, since nothing has been done to pass the stack arguments.
Thus the patch reverts https://reviews.llvm.org/rL294000
Also, we improve the instruction sequence for popping `LR` in the case when we
couldn't immediately find a scratch low register, but we can use as a temporary
one of the callee-saved low registers and restore `LR` before popping other
callee-saves.
Differential Revision: https://reviews.llvm.org/D39599
llvm-svn: 318143
Erik Verbruggen [Tue, 14 Nov 2017 09:34:39 +0000 (09:34 +0000)]
[libclang] Allow crash recovery with LIBCLANG_NOTHREADS
Enabled crash recovery for some libclang operations on a calling thread even
when LIBCLANG_NOTHREAD is specified.
Previously it would only run under crash recovery if LIBCLANG_NOTHREAD is not
set. Moved handling of LIBCLANG_NOTHREAD env variable into RunSafely from its
call sites.
llvm-svn: 318142
Manuel Klimek [Tue, 14 Nov 2017 09:19:53 +0000 (09:19 +0000)]
Refactor ContinuationIndenter's breakProtrudingToken logic.
Create more orthogonal pieces. The restructuring made it easy to try out
several alternatives to D33589, and while none of the alternatives
turned out to be the right solution, the underlying simplification of
the structure is helpful.
Differential Revision: https://reviews.llvm.org/D39900
llvm-svn: 318141
Craig Topper [Tue, 14 Nov 2017 08:48:28 +0000 (08:48 +0000)]
[NewPassManager] Pass the -fdebug-pass-manager flag setting into the Analysis managers to match what we do in opt
Summary: Currently the -fdebug-pass-manager flag for clang doesn't enable the debug logging in the analysis managers. This is different than what the switch does when passed to opt.
Reviewers: chandlerc
Reviewed By: chandlerc
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D40007
llvm-svn: 318140
Martin Storsjo [Tue, 14 Nov 2017 07:07:01 +0000 (07:07 +0000)]
[builtins] Include GENERIC_SOURCES in arm_SOURCES for MinGW
It is included in the built sources for all other arches supported
for MinGW currently, except for arm.
Differential Revision: https://reviews.llvm.org/D39938
llvm-svn: 318139
Matt Arsenault [Tue, 14 Nov 2017 06:40:00 +0000 (06:40 +0000)]
AMDGPU: Fix test
llvm-svn: 318138
Chandler Carruth [Tue, 14 Nov 2017 05:20:03 +0000 (05:20 +0000)]
[PM] Require a registered x86 target for this test which uses the x86
triple.
llvm-svn: 318137
Adam Nemet [Tue, 14 Nov 2017 04:48:18 +0000 (04:48 +0000)]
[opt-viewer] Truncate long remark text in source view
The table is changed to fixed layout[1] and the lines use ellipses if they
would overflow their cell.
[1] https://css-tricks.com/fixing-tables-long-strings/
llvm-svn: 318136
Adam Nemet [Tue, 14 Nov 2017 04:37:32 +0000 (04:37 +0000)]
[opt-viewer] With hotness only show max 1000 entries on the index page
Adjustable with an option.
llvm-svn: 318135
Dylan McKay [Tue, 14 Nov 2017 04:32:49 +0000 (04:32 +0000)]
[AVR] Remove the select-mbb-placement-bug.ll test
This test was originally added when an old bug was fixed that caused
broken iterator code to break basic block placement.
The issue has an extremely low chance of every being a problem again.
This specific test is very flaky and fails often due to upstream
changes.
I have removed this test because it negates more value than it returns.
llvm-svn: 318134
Matt Arsenault [Tue, 14 Nov 2017 02:16:54 +0000 (02:16 +0000)]
AMDGPU: Fix producing saveexec when the copy is spilled
If the register from the copy from exec was spilled,
the copy before the spill was deleted leaving a spill
of undefined register verifier error and miscompiling.
Check for other use instructions of the copy register.
llvm-svn: 318132
Chandler Carruth [Tue, 14 Nov 2017 01:59:18 +0000 (01:59 +0000)]
[PM] Wire up support for the bounds checking sanitizer with the new PM.
Not much interesting here. Mostly wiring things together.
One thing worth noting is that the approach is substantially different
from the old PM. Here, the -O0 case works fundamentally differently in
that we just directly build the pipeline without any callbacks or other
cruft. In some ways, this is nice and clean. However, I don't like that
it causes the sanitizers to be enabled with different changes at
different times. =/ Suggestions for a better way to do this are welcome.
Differential Revision: https://reviews.llvm.org/D39085
llvm-svn: 318131
Chandler Carruth [Tue, 14 Nov 2017 01:47:24 +0000 (01:47 +0000)]
[PM] Add a missing header that I had in the next commit but was needed
in r318128. Should fix the build.
llvm-svn: 318130
Alex Lorenz [Tue, 14 Nov 2017 01:46:24 +0000 (01:46 +0000)]
[completion] complete ObjC interface names in an expression
Objective-C interfaces can be used in a class property expression.
rdar://
26982192
llvm-svn: 318129
Chandler Carruth [Tue, 14 Nov 2017 01:30:04 +0000 (01:30 +0000)]
[PM] Port BoundsChecking to the new PM.
Registers it and everything, updates all the references, etc.
Next patch will add support to Clang's `-fexperimental-new-pass-manager`
path to actually enable BoundsChecking correctly.
Differential Revision: https://reviews.llvm.org/D39084
llvm-svn: 318128
Rafael Espindola [Tue, 14 Nov 2017 01:21:15 +0000 (01:21 +0000)]
Use TempFile in llvm-ar. NFC.
llvm-svn: 318127
Marshall Clow [Tue, 14 Nov 2017 01:18:36 +0000 (01:18 +0000)]
Another test for LWG2952
llvm-svn: 318126
Marshall Clow [Tue, 14 Nov 2017 01:14:53 +0000 (01:14 +0000)]
Implement LWG2950: std::byte operations are misspecified
llvm-svn: 318125
Chandler Carruth [Tue, 14 Nov 2017 01:13:59 +0000 (01:13 +0000)]
[PM] Refactor BoundsChecking further to prepare it to be exposed both as
a legacy and new PM pass.
This essentially moves the class state to parameters and re-shuffles the
code to make that reasonable. It also does some minor cleanups along the
way and leaves some comments.
Differential Revision: https://reviews.llvm.org/D39081
llvm-svn: 318124
Sam Clegg [Tue, 14 Nov 2017 00:49:16 +0000 (00:49 +0000)]
[WebAssembly] Explicily disable comdat support for wasm output
For now at least. We clearly need some kind of comdat or
linkonce_odr support for wasm but currently COMDAT is not
supported.
Disable COMDAT support in the same way we do the Mach-O. This
also causes clang not to generated COMDATs.
Differential Revision: https://reviews.llvm.org/D39873
llvm-svn: 318123
Rafael Espindola [Tue, 14 Nov 2017 00:31:28 +0000 (00:31 +0000)]
Add a move assignment operator to TempFile. NFC.
llvm-svn: 318122
Mandeep Singh Grang [Tue, 14 Nov 2017 00:22:24 +0000 (00:22 +0000)]
[Sema] Stable sort OverloadCandidates to remove non-deterministic ordering
Summary: This fixes failure in Misc/diag-template-diffing.cpp uncovered by D39245.
Reviewers: rjmccall, rsmith
Reviewed By: rjmccall
Subscribers: cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D39944
llvm-svn: 318121
Marshall Clow [Tue, 14 Nov 2017 00:03:10 +0000 (00:03 +0000)]
Implement LWG2952: iterator_traits should work for pointers to cv T
llvm-svn: 318119
Ben Hamilton [Mon, 13 Nov 2017 23:54:31 +0000 (23:54 +0000)]
add new check for property declaration
Summary:
This check finds property declarations in Objective-C files that do not follow the pattern of property names in Apple's programming guide. The property name should be in the format of Lower Camel Case or with some particular acronyms as prefix.
Example:
@property(nonatomic, assign) int lowerCamelCase;
@property(nonatomic, strong) NSString *URLString;
Test plan: ninja check-clang-tools
Reviewers: benhamilton, hokein
Reviewed By: hokein
Subscribers: cfe-commits, mgorny
Differential Revision: https://reviews.llvm.org/D39829
llvm-svn: 318117
Hans Wennborg [Mon, 13 Nov 2017 23:47:58 +0000 (23:47 +0000)]
Update some code.google.com links
llvm-svn: 318115
Zachary Turner [Mon, 13 Nov 2017 23:33:29 +0000 (23:33 +0000)]
Revert "Update test_debuginfo.pl script to point to new tree location."
This reverts the aforementioned patch and 2 subsequent follow-ups,
as some buildbots are still failing 2 tests because of it.
Investigation is ongoing into the cause of the failures.
llvm-svn: 318112
Rafael Espindola [Mon, 13 Nov 2017 23:32:19 +0000 (23:32 +0000)]
Simplify and rename variable.
std::error_code can represent success, so we don't need a
Optional<std::error_code>.
Rename the variable to avoid confusion with the type Error.
llvm-svn: 318111
Hans Wennborg [Mon, 13 Nov 2017 23:27:55 +0000 (23:27 +0000)]
Update link to protobuf
llvm-svn: 318110
Hans Wennborg [Mon, 13 Nov 2017 23:27:54 +0000 (23:27 +0000)]
Update a link to the old code.google.com bug tracker
llvm-svn: 318109
Hans Wennborg [Mon, 13 Nov 2017 23:27:53 +0000 (23:27 +0000)]
Update link to the Chromium Clang page
llvm-svn: 318108
Matt Arsenault [Mon, 13 Nov 2017 23:24:26 +0000 (23:24 +0000)]
AMDGPU: Fix not converting d16 load/stores to offset
Fixes missed optimization with new MUBUF instructions.
llvm-svn: 318106
Rafael Espindola [Mon, 13 Nov 2017 23:06:54 +0000 (23:06 +0000)]
Simplify. NFC.
llvm-svn: 318104
Kuba Mracek [Mon, 13 Nov 2017 23:04:47 +0000 (23:04 +0000)]
Update TSan/ARM64 max VM to 0xfc0000000 to reflect a kernel change.
llvm-svn: 318103
Daniel Sanders [Mon, 13 Nov 2017 23:03:47 +0000 (23:03 +0000)]
[tablegen] Handle atomic predicates for ordering inside tablegen. NFC.
Similar to r315841, GlobalISel and SelectionDAG require different code for the
common atomic predicates due to differences in the representation.
Even without that, differences in the IR (SDNode vs MachineInstr) require
differences in the C++ predicate.
This patch moves the implementation of the common atomic predicates related to
ordering into tablegen so that it can handle these differences.
It's NFC for SelectionDAG since it emits equivalent code and it's NFC for
GlobalISel since the rules involving the relevant predicates are still
rejected by the importer.
llvm-svn: 318102
Eugene Zelenko [Mon, 13 Nov 2017 23:01:27 +0000 (23:01 +0000)]
[AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 318101
Matt Arsenault [Mon, 13 Nov 2017 22:55:05 +0000 (22:55 +0000)]
AMDGPU: Implement computeKnownBitsForTargetNode for mbcnt
llvm-svn: 318100
Matt Arsenault [Mon, 13 Nov 2017 22:40:55 +0000 (22:40 +0000)]
OpenCL: Assume inline asm is convergent
Already done for CUDA.
llvm-svn: 318098
Simon Atanasyan [Mon, 13 Nov 2017 22:40:36 +0000 (22:40 +0000)]
[MIPS] Set STO_MIPS_MICROMIPS flag and less-significant bit for microMIPS symbols
microMIPS symbols including microMIPS PLT records created for regular
symbols needs to be marked by STO_MIPS_MICROMIPS flag in a symbol table.
Additionally microMIPS entries in a dynamic symbol table should have
configured less-significant bit. That allows to escape teaching a
dynamic linker about microMIPS symbols.
llvm-svn: 318097
Daniel Sanders [Mon, 13 Nov 2017 22:26:13 +0000 (22:26 +0000)]
[tablegen] Handle atomic predicates for memory type inside tablegen. NFC.
Similar to r315841, GlobalISel and SelectionDAG require different code for the
common atomic predicates due to differences in the representation.
Even without that, differences in the IR (SDNode vs MachineInstr) require
differences in the C++ predicate.
This patch moves the implementation of the common atomic predicates related to
memory type into tablegen so that it can handle these differences.
It's NFC for SelectionDAG since it emits equivalent code and it's NFC for
GlobalISel since the rules involving the relevant predicates are still
rejected by the importer.
llvm-svn: 318095
Jake Ehrlich [Mon, 13 Nov 2017 22:13:08 +0000 (22:13 +0000)]
[llvm-objcopy] Add --strip-debug
Many projects use this option. There are two ways to use it. You can
either a) Just use --strip-debug and keep the old file with debug
content or b) you can use --strip-debug, --only-keep-debug, and
--add-gnu-debuglink all in conjunction to create two separate files, the
stripped file and the debug file. --only-keep-debug is more complicated
than --strip-debug because it keeps the section headers without keeping
section contents. That's not really supported by llvm-objcopy at the
moment but I plan on adding it. So this change just supports a) and
options to support b) will come soon.
Differential Revision: https://reviews.llvm.org/D39919
llvm-svn: 318094
Sanjay Patel [Mon, 13 Nov 2017 22:11:49 +0000 (22:11 +0000)]
[CodeGen] fix const-ness of cbrt and fma
cbrt() is always constant because it can't overflow or underflow. Therefore, it can't set errno.
fma() is not always constant because it can overflow or underflow. Therefore, it can set errno.
But we know that it never sets errno on GNU / MSVC, so make it constant in those environments.
Differential Revision: https://reviews.llvm.org/D39641
llvm-svn: 318093
Jake Ehrlich [Mon, 13 Nov 2017 22:02:07 +0000 (22:02 +0000)]
[llvm-objcopy] Add --strip-all option to llvm-objcopy
This change adds a slightly less extreme form of stripping. It should
remove any section that starts with ".debug" and should remove any
symbol table or relocations. In general this strips out most of the
stuff you don't need to execute but leaves a number of things around.
This behavior has been designed to be compatible with GNU strip/objcopy
--strip-all so that anywhere you currently use --strip-all you should be
able to use llvm-objcopy as a drop in replacement.
Differential Revision: https://reviews.llvm.org/D39769
llvm-svn: 318092
Serge Guelton [Mon, 13 Nov 2017 21:55:01 +0000 (21:55 +0000)]
Fix -Werror when compiling rL318083 (ter)
Statically assert the result and remove a runtime comparison, a direct consequence of the optimization introduced in rL318083.
llvm-svn: 318091
Serge Guelton [Mon, 13 Nov 2017 21:40:57 +0000 (21:40 +0000)]
Fix -Werror when compiling rL318083 (bis)
Statically assert the result and remove a runtime comparison, a direct consequence of the optimization introduced in rL318083.
llvm-svn: 318090
Vitaly Buka [Mon, 13 Nov 2017 21:27:58 +0000 (21:27 +0000)]
[sanitizer] Relax stack check in assert.cc even more
assert implementations can be very different
llvm-svn: 318089
Serge Guelton [Mon, 13 Nov 2017 21:25:35 +0000 (21:25 +0000)]
Fix -Werror when compiling rL318083
Statically assert the result and remove a runtime comparison, a direct consequence of the optimization introduced in rL318083.
llvm-svn: 318087
Adrian Prantl [Mon, 13 Nov 2017 21:24:54 +0000 (21:24 +0000)]
Fix an assertion in SelectionDAG::transferDbgValues()
when transferring debug info describing the lower bits of an extended SDNode.
rdar://problem/
35504722
llvm-svn: 318086
Tom de Vries [Mon, 13 Nov 2017 20:59:26 +0000 (20:59 +0000)]
[lsan] Remove semicolon after do {} while (0)
Remove semicolon after "do {} while (0)" in LOG_POINTERS and LOG_THREADS.
Reviewed by: kcc
llvm-svn: 318085
Tom de Vries [Mon, 13 Nov 2017 20:59:20 +0000 (20:59 +0000)]
[asan] Remove semicolon after do {} while (0)
Remove semicolon after "do {} while (0)" in in CHECK_SMALL_REGION
llvm-svn: 318084
Serge Guelton [Mon, 13 Nov 2017 20:57:40 +0000 (20:57 +0000)]
Reorder Value.def to optimize code size
If the first values in Value.def is the range of constant, then the code
generated by `isa<Constant>` is smaller by one operation (basically, an add is
removed). It turns out this small optimization reduces the size of the
statically linked clang binary by 400ko on my laptop. The theoritical
performance gain is non visible from my benchmarks, but the size dropdown is.
Differential Revision: https://reviews.llvm.org/D39373
llvm-svn: 318083
Vitaly Buka [Mon, 13 Nov 2017 20:49:14 +0000 (20:49 +0000)]
[tsan] Fix signal chaining
Summary: Return saved values only if installed sigaction is our wrapper.
Reviewers: eugenis, dvyukov
Subscribers: llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D39935
llvm-svn: 318082
Evgeniy Stepanov [Mon, 13 Nov 2017 20:45:38 +0000 (20:45 +0000)]
[arm] Fix Unnecessary reloads from GOT.
Summary:
This fixes PR35221.
Use pseudo-instructions to let MachineCSE hoist global address computation.
Subscribers: aemerson, javed.absar, kristof.beyls, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D39871
llvm-svn: 318081
Kostya Kortchinsky [Mon, 13 Nov 2017 20:38:22 +0000 (20:38 +0000)]
[sanitizer] Update scudo to use new API
Summary:
The ScudoAllocator uses a SecondaryHeader to keep track of the size and base address of each mmap'd chunk.
This aligns well with what the ReservedAddressRange is trying to do. This changeset converts the scudo allocator from using the MmapNoAccess/MmapFixed APIs to the ReservedAddressRange::Init and ::Map APIs. In doing so, it replaces the SecondayHeader struct with the ReservedAddressRange object.
This is part 3 of a 4 part changeset; part 1 https://reviews.llvm.org/D39072 and part 2 https://reviews.llvm.org/D38592
Reviewers: alekseyshl, mcgrathr, cryptoad, phosek
Reviewed By: cryptoad
Subscribers: llvm-commits, cryptoad, kubamracek
Differential Revision: https://reviews.llvm.org/D38593
llvm-svn: 318080
Stephane Sezer [Mon, 13 Nov 2017 20:13:25 +0000 (20:13 +0000)]
Reformat a comment. NFC.
llvm-svn: 318079
Vitaly Buka [Mon, 13 Nov 2017 19:56:20 +0000 (19:56 +0000)]
[tsan] Deadly signal handler for tsan
Summary: https://github.com/google/sanitizers/issues/637
Reviewers: eugenis
Subscribers: kubamracek, llvm-commits
Differential Revision: https://reviews.llvm.org/D39929
llvm-svn: 318078
Vitaly Buka [Mon, 13 Nov 2017 19:56:06 +0000 (19:56 +0000)]
[sanitizer] Relax stack check
-NEXT sometimes does not work as LLVMSymbolizer warning can appear there.
llvm-svn: 318077
Sanjay Patel [Mon, 13 Nov 2017 19:46:28 +0000 (19:46 +0000)]
[Reassociation] regenerate test checks; NFC
llvm-svn: 318076
Mandeep Singh Grang [Mon, 13 Nov 2017 19:29:31 +0000 (19:29 +0000)]
[clang] Remove redundant return [NFC]
Reviewers: rsmith, sfantao, mcrosier
Reviewed By: mcrosier
Subscribers: jholewinski, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D39915
llvm-svn: 318074
Reid Kleckner [Mon, 13 Nov 2017 18:43:11 +0000 (18:43 +0000)]
Fix clang -Wsometimes-uninitialized warning in SCEV code
I don't believe this was a problem in practice, as it's likely that the
boolean wasn't checked unless the backend condition was non-null.
llvm-svn: 318073
Reid Kleckner [Mon, 13 Nov 2017 18:38:53 +0000 (18:38 +0000)]
Remove a std::map and std::set that show up in LLD profiles
For GC roots, add a bit to SymbolBody to ensure that we don't add the
same root twice, and switch to a vector. In addition to being faster,
this may also fix some latent non-determinism. We iterate the GCRoot
list later and it the order should be deterministic.
For fixupExports, we can just use DenseMap. This is a simple string
uniquing task, and we don't iterate the map.
Reviewers: ruiu
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39609
llvm-svn: 318072
Reid Kleckner [Mon, 13 Nov 2017 18:38:25 +0000 (18:38 +0000)]
Disable GC and ICF when /debug is present
ICF and GC impair debugging, so MSVC disables these optimizations when
/debug is passed. They are still on by default when no PDB is produced.
This change also makes /opt:ref enable ICF, which is consistent with
MSVC: https://msdn.microsoft.com/en-us/library/bxwfs976.aspx
We should consider making /opt:icf fold readonly data in the near
future. LLD used to do this, but we disabled it because it breaks too
many programs. MSVC only does this if the user explicitly passes
/opt:icf.
Reviewers: ruiu, pcc
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39885
llvm-svn: 318071
Dinar Temirbulatov [Mon, 13 Nov 2017 18:35:43 +0000 (18:35 +0000)]
NFC, Allow SystemZ SLP tests only when SystemZ is supported.
llvm-svn: 318070
Rafael Espindola [Mon, 13 Nov 2017 18:33:44 +0000 (18:33 +0000)]
Create a TempFile class.
This just adds a TempFile class and replaces the use in
FileOutputBuffer with it.
The only difference for now is better error handling. Followup work includes:
- Convert other user of temporary files to it.
- Add support for automatically deleting on windows.
- Add a createUnnamed method that returns a potentially unnamed
file. It would be actually unnamed on modern linux and have a
unknown name on windows.
llvm-svn: 318069
Daniel Sanders [Mon, 13 Nov 2017 18:30:23 +0000 (18:30 +0000)]
[globalisel][tablegen] Add support for extload.
llvm-svn: 318068
Jan Vesely [Mon, 13 Nov 2017 18:28:56 +0000 (18:28 +0000)]
native_divide: provide function implementation instead of macro
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318067
Jan Vesely [Mon, 13 Nov 2017 18:28:53 +0000 (18:28 +0000)]
native_recip: provide function implementation instead of macro
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318066
Jan Vesely [Mon, 13 Nov 2017 18:28:51 +0000 (18:28 +0000)]
native_rsqrt: Switch implementation to 1 / native_sqrt
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318065
Jan Vesely [Mon, 13 Nov 2017 18:28:48 +0000 (18:28 +0000)]
native_tan: Switch implementation to use native_sin/native_cos
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318064
Jan Vesely [Mon, 13 Nov 2017 18:28:45 +0000 (18:28 +0000)]
math: Use precomputed constant for log2(10.0)
exp10 CTS fails with or without this change
Reviewer: Jeroen Ketema
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
llvm-svn: 318063
Rafael Espindola [Mon, 13 Nov 2017 18:15:22 +0000 (18:15 +0000)]
Try harder to delete the temporary file.
This changes COFF to use the output buffer that is reset by the error
handler.
llvm-svn: 318062
Rafael Espindola [Mon, 13 Nov 2017 18:10:37 +0000 (18:10 +0000)]
Remove dead include.
llvm-svn: 318061
Rafael Espindola [Mon, 13 Nov 2017 18:06:43 +0000 (18:06 +0000)]
Try harder to delete the temporary file.
It is really hard to cover restarts in a debugger, SIGKILL or power
failures. I will try to handle them in a followup patch, but it will
not support all the systems lld has to run on.
RemoveFileOnSignal takes care of crashes.
So what is left is making sure all regular exits delete the file. This
patch does that by moving the buffer to error handling. That is a bit
of a hack, but seemed better than to generalize it to take a callback on
construction.
I will implement this on COFF on the next patch.
llvm-svn: 318060
Petar Jovanovic [Mon, 13 Nov 2017 18:00:24 +0000 (18:00 +0000)]
fix printing of alias instructions by removing redundant spacing
Some alias instructions are printed with an extra space after the tab
character. Fix this by skipping that space when the tab character is printed
so that the instructions are aligned with the rest of the code.
Patch by Milos Stojanovic.
Differential Revision: https://reviews.llvm.org/D35946
llvm-svn: 318059
Sanjay Patel [Mon, 13 Nov 2017 17:56:23 +0000 (17:56 +0000)]
[ValueTracking] use 'auto' with 'dyn_cast'; NFC
llvm-svn: 318058
Craig Topper [Mon, 13 Nov 2017 17:53:59 +0000 (17:53 +0000)]
[X86] Allow X86ISD::Wrapper to be folded into the base of gather/scatter address
If the base of our gather corresponds to something contained in X86ISD::Wrapper we should be able to fold it into the address.
This patch refactors some of the address matching to more fully use the X86ISelAddressMode struct and the getAddressOperands helper. A new helper function matchVectorAddress is added to call matchWrapper or fall back to matchAddressBase.
We should also be able to support constant offsets from a wrapper, but I'll look into that in a future patch. We may even be able to completely reuse matchAddress here, but I wanted to start simple and work up to it.
Differential Revision: https://reviews.llvm.org/D39927
llvm-svn: 318057
Jonathan Peyton [Mon, 13 Nov 2017 17:44:48 +0000 (17:44 +0000)]
[OpenMP] Remove the unused testsuite/ directory
The testsuite directory is not used or updated and confuses new users to the
OpenMP project. These tests were rewritten using the lit format and put under
the runtime/test directory. This patch removes the entire testsuite/ directory.
Differential Revision: https://reviews.llvm.org/D39767
llvm-svn: 318056
Sanjay Patel [Mon, 13 Nov 2017 17:40:47 +0000 (17:40 +0000)]
[ValueTracking] simplify code in CannotBeNegativeZero() with match(); NFCI
llvm-svn: 318055
Devin Coughlin [Mon, 13 Nov 2017 17:35:29 +0000 (17:35 +0000)]
[analyzer] ObjCGenerics: Don't warn on cast conversions involving explicit cast
The ObjCGenerics checker warns on a cast when there is no subtyping relationship
between the tracked type of the value and the destination type of the cast. It
does this even if the cast was explicitly written. This means the user can't
write an explicit cast to silence the diagnostic.
This commit treats explicit casts involving generic types as an indication from
the programmer that the Objective-C type system is not rich enough to express
the needed invariant. On explicit casts, the checker now removes any existing
information inferred about the type arguments. Further, it no longer assumes
the casted-to specialized type because the invariant the programmer specifies
in the cast may only hold at a particular program point and not later ones. This
prevents a suppressing cast from requiring a cascade of casts down the
line.
rdar://problem/
33603303
Differential Revision: https://reviews.llvm.org/D39711
llvm-svn: 318054
Sanjay Patel [Mon, 13 Nov 2017 17:29:11 +0000 (17:29 +0000)]
[Reassociate] add tests with 'reassoc' FMF; NFC
llvm-svn: 318053
Pavel Labath [Mon, 13 Nov 2017 16:47:37 +0000 (16:47 +0000)]
Fix netbsd, freebsd and osx builds for ArchSpec move
llvm-svn: 318052
Jan Vesely [Mon, 13 Nov 2017 16:46:07 +0000 (16:46 +0000)]
AMDGPU: Drop duplicate setOperationAction
These are set with other scalar int ops few lines up
Differential Revision: https://reviews.llvm.org/D39928
llvm-svn: 318051
Jatin Bhateja [Mon, 13 Nov 2017 16:43:24 +0000 (16:43 +0000)]
[SCEV] Handling for ICmp occuring in the evolution chain.
Summary:
If a compare instruction is same or inverse of the compare in the
branch of the loop latch, then return a constant evolution node.
This shall facilitate computations of loop exit counts in cases
where compare appears in the evolution chain of induction variables.
Will fix PR 34538
Reviewers: sanjoy, hfinkel, junryoungju
Reviewed By: sanjoy, junryoungju
Subscribers: javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D38494
llvm-svn: 318050
Simon Dardis [Mon, 13 Nov 2017 16:41:17 +0000 (16:41 +0000)]
Revert "[CodeGenPrepare] Check that erased sunken address are not reused"
This reverts commit r318032. The test broke some sanitizer bots.
llvm-svn: 318049
Pavel Labath [Mon, 13 Nov 2017 16:16:33 +0000 (16:16 +0000)]
Move ArchSpec to the Utility module
The rationale here is that ArchSpec is used throughout the codebase,
including in places which should not depend on the rest of the code in
the Core module.
This commit touches many files, but most of it is just renaming of
#include lines. In a couple of cases, I removed the #include ArchSpec
line altogether, as the file was not using it. In one or two places,
this necessitated adding other #includes like lldb-private-defines.h.
llvm-svn: 318048
Diana Picus [Mon, 13 Nov 2017 16:02:42 +0000 (16:02 +0000)]
[ARM GlobalISel] Update legalizer test
Make one of the legalizer tests a bit more robust by making sure all
values we're interested in are used (either in a store or a return) and
by using loads instead of constants for obtaining values on fewer than
32 bits. This should make the test less fragile to changes in the
legalize combiner, since those loads are legal (as opposed to the
constants, which were being widened and thus produced opportunities for
the legalize combiner).
llvm-svn: 318047
Pavel Labath [Mon, 13 Nov 2017 15:57:20 +0000 (15:57 +0000)]
Remove last Host usage from ArchSpec
Summary:
In D39387, I was quick to jump to conclusion that ArchSpec has no
external dependencies. It turns there still was one call to
HostInfo::GetArchitecture left -- for implementing the "systemArch32"
architecture and friends.
Since GetAugmentedArchSpec is the place we handle these "incomplete"
triples that don't specify os or vendor and "systemArch" looks very much
like an incomplete triple, I move its handling there.
After this ArchSpec *really* does not have external dependencies, and
I'll move it to the Utility module as a follow-up.
Reviewers: zturner, clayborg, jingham
Subscribers: lldb-commits
Differential Revision: https://reviews.llvm.org/D39896
llvm-svn: 318046
Bill Seurer [Mon, 13 Nov 2017 15:43:19 +0000 (15:43 +0000)]
[PowerPC][msan] Update msan to handle changed memory layouts in newer kernels
In more recent Linux kernels (including those with 47 bit VMAs) the layout of
virtual memory for powerpc64 changed causing the memory sanitizer to not
work properly. This patch adjusts a bit mask in the memory sanitizer to work
on the newer kernels while continuing to work on the older ones as well.
This is the non-runtime part of the patch and finishes it. ref: r317802
Tested on several 4.x and 3.x kernel releases.
llvm-svn: 318045