Commit Graph

25023 Commits

Author SHA1 Message Date
George Burgess IV f708f0a243 [Sema] Add -Wpointer-compare
This patch adds a warning that diagnoses comparisons of pointers to
'\0'. This is often indicative of a bug (e.g. the user might've
forgotten to dereference the pointer).

Patch by Elaina Guan!

Differential Revision: https://reviews.llvm.org/D65595

llvm-svn: 367940
2019-08-05 22:15:40 +00:00
Nico Weber 6fe88c3012 Fix another uninit read found by msan after r367829
llvm-svn: 367912
2019-08-05 19:35:59 +00:00
Michael Kruse d47b9438d7 [OpenMP 5.0] Codegen support for user-defined mappers.
This patch implements the code generation for OpenMP 5.0 declare mapper
(user-defined mapper) constructs. For each declare mapper, a mapper
function is generated. These mapper functions will be called by the
runtime and/or other mapper functions to achieve user defined mapping.

The design slides can be found at
https://github.com/lingda-li/public-sharing/blob/master/mapper_runtime_design.pptx

Re-commit after revert in r367773 because r367755 changed the LLVM-IR
output such that a CHECK line failed.

Patch by Lingda Li <lildmh@gmail.com>

Differential Revision: https://reviews.llvm.org/D59474

llvm-svn: 367905
2019-08-05 18:43:21 +00:00
Nico Weber ae9d421629 Undo what looks like an unintentional change in r367829
The MSan bot was (rightfully) complaining that NumASTLoaded was
unitialized, so put the initialization removed in r367829 back in.

While here, remove two needless semicolons added in that change.

llvm-svn: 367875
2019-08-05 15:23:10 +00:00
Rainer Orth 09d890d728 Move LangStandard*, InputKind::Language to Basic
This patch is a prerequisite for using LangStandard from Driver in
https://reviews.llvm.org/D64793.

It moves LangStandard* and InputKind::Language to Basic.  It is mostly
mechanical, with only a few changes of note:

- enum Language has been changed into enum class Language : uint8_t to
  avoid a clash between OpenCL in enum Language and OpenCL in enum
  LangFeatures and not to increase the size of class InputKind.

- Now that getLangStandardForName, which is currently unused, also checks
  both canonical and alias names, I've introduced a helper getLangKind
  which factors out a code pattern already used 3 times.

The patch has been tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11,
and x86_64-pc-linux-gnu.

There's a companion patch for lldb which uses LangStandard.h
(https://reviews.llvm.org/D65717).

While polly includes isl which in turn uses InputKind::C, that part of the
code isn't even built inside the llvm tree.  I've posted a patch to allow
for both InputKind::C and Language::C upstream
(https://groups.google.com/forum/#!topic/isl-development/6oEvNWOSQFE).

Differential Revision: https://reviews.llvm.org/D65562

llvm-svn: 367864
2019-08-05 13:59:26 +00:00
Raphael Isemann 58f0991736 [clang][NFC] Remove unused private variable 'CI' in CrossTranslationUnit.h
It seems because of the recent refactorings this variable has become unused
and now we get this warning in the build logs:

In file included from llvm/clang/lib/CrossTU/CrossTranslationUnit.cpp:12:
llvm/clang/include/clang/CrossTU/CrossTranslationUnit.h:200:21: warning: private field 'CI' is not used [-Wunused-private-field]
  CompilerInstance &CI;
                    ^

I'll remove them for now to get the builds back to green.

llvm-svn: 367840
2019-08-05 12:23:39 +00:00
Johan Vikstrom be60f97d23 [AST] Fix RecursiveASTVisitor visiting implicit constructor initializers.
Summary: RecursiveASTVisitor was visiting implcit constructor initializers. This caused semantic highlighting in clangd to emit error logs. Fixes this by checking if the constructor is written or if the visitor should visit implicit decls.

Reviewers: hokein, ilya-biryukov

Subscribers: kadircet, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65735

llvm-svn: 367839
2019-08-05 12:20:43 +00:00
Endre Fulop 0492fd4155 [CrossTU][NFCI] Refactor loadExternalAST function
Summary:
Refactor loadExternalAST method of CrossTranslationUnitContext in order to
reduce maintenance burden and so that features are easier to add in the future.

Reviewers: martong

Subscribers: rnkovacs, dkrupp, Szelethus, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64753

llvm-svn: 367829
2019-08-05 11:06:41 +00:00
Dmitri Gribenko 657330ee0e Adds a warning when an inline Doxygen comment has no argument
Summary:
It warns for for comments like
/** \pre \em */

where \em has no argument

This warning is enabled with the -Wdocumentation option.

Reviewers: gribozavr, rsmith

Reviewed By: gribozavr

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D64696

Patch by Mark de Wever.

llvm-svn: 367809
2019-08-05 08:05:16 +00:00
Petr Hosek 85faa70e04 [Driver] Support for disabling sanitizer runtime linking
This change introduces a pair of -fsanitize-link-runtime and
-fno-sanitize-link-runtime flags which can be used to control linking of
sanitizer runtimes. This is useful in certain environments like kernels
where existing runtime libraries cannot be used.

Differential Revision: https://reviews.llvm.org/D65029

llvm-svn: 367794
2019-08-04 22:24:14 +00:00
Serge Pavlov 037861b230 [Parser] Emit descriptive diagnostic for misplaced pragma
If a class or struct or union declaration contains a pragma that
is not valid in this context, compiler issues generic error like
"expected member name or ';' after declaration specifiers". With this
change the error tells that this pragma cannot appear in this declaration.

Differential Revision: https://reviews.llvm.org/D64932

llvm-svn: 367779
2019-08-04 10:08:51 +00:00
Michael Kruse 7eb2f08b9c Revert "[OpenMP 5.0] Codegen support for user-defined mappers."
This reverts commit r367773. The test case
OpenMP/declare_mapper_codegen.cpp is failing.

llvm-svn: 367774
2019-08-04 05:16:52 +00:00
Michael Kruse a04ffdbb05 [OpenMP 5.0] Codegen support for user-defined mappers.
This patch implements the code generation for OpenMP 5.0 declare mapper
(user-defined mapper) constructs. For each declare mapper, a mapper
function is generated. These mapper functions will be called by the
runtime and/or other mapper functions to achieve user defined mapping.

The design slides can be found at
https://github.com/lingda-li/public-sharing/blob/master/mapper_runtime_design.pptx

Patch by Lingda Li <lildmh@gmail.com>

Differential Revision: https://reviews.llvm.org/D59474

llvm-svn: 367773
2019-08-04 04:18:42 +00:00
Serge Pavlov fcb6123d05 Use switch instead of series of comparisons
This is style correction, no functional changes.

Differential Revision: https://reviews.llvm.org/D65670

llvm-svn: 367759
2019-08-03 16:32:49 +00:00
Erik Pilkington 06cccc5e6f Remove a dead diagnostic, NFC
This was issued in Objective-C 1 mode, but we not longer support that, so this
is just unreachable.

llvm-svn: 367708
2019-08-02 19:25:58 +00:00
Fangrui Song e93341f7c8 [Sema] Disable -Wbitwise-op-parentheses and -Wlogical-op-parentheses by default
Summary:
The -Wparentheses warnings are enabled by default in clang but they are under
-Wall in gcc (gcc/c-family/c.opt). Some of the operator precedence warnings are
oftentimes criticized as noise (clang: default; gcc: -Wall). If a warning is
very controversial, it is probably not a good idea to enable it by default.
This patch disables the rather annoying ones:

-Wbitwise-op-parentheses, e.g. i & i | i
-Wlogical-op-parentheses, e.g. i && i || i

After this change:

```
* = enabled by default

-Wall
  -Wparentheses
    -Wlogical-op-parentheses
    -Wlogical-not-parentheses*
    -Wbitwise-op-parentheses
    -Wshift-op-parentheses*
    -Woverloaded-shift-op-parentheses*
    -Wparentheses-equality*
    -Wdangling-else*
```

-Woverloaded-shift-op-parentheses is typically followed by overload
resolution failure. We can instead improve the error message, and
probably delete -Woverloaded-shift-op-parentheses in the future. Keep it
for now because it gives some diagnostics.

Reviewers: akyrtzi, jyknight, rtrieu, rsmith, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: dexonsmith, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65192

llvm-svn: 367690
2019-08-02 16:31:38 +00:00
Rui Ueyama 4d41c332ef Revert r367649: Improve raw_ostream so that you can "write" colors using operator<<
This reverts commit r367649 in an attempt to unbreak Windows bots.

llvm-svn: 367658
2019-08-02 07:22:34 +00:00
Rui Ueyama a52f982f1c Improve raw_ostream so that you can "write" colors using operator<<
1. raw_ostream supports ANSI colors so that you can write messages to
the termina with colors. Previously, in order to change and reset
color, you had to call `changeColor` and `resetColor` functions,
respectively.

So, if you print out "error: " in red, for example, you had to do
something like this:

  OS.changeColor(raw_ostream::RED);
  OS << "error: ";
  OS.resetColor();

With this patch, you can write the same code as follows:

  OS << raw_ostream::RED << "error: " << raw_ostream::RESET;

2. Add a boolean flag to raw_ostream so that you can disable colored
output. If you disable colors, changeColor, operator<<(Color),
resetColor and other color-related functions have no effect.

Most LLVM tools automatically prints out messages using colors, and
you can disable it by passing a flag such as `--disable-colors`.
This new flag makes it easy to write code that works that way.

Differential Revision: https://reviews.llvm.org/D65564

llvm-svn: 367649
2019-08-02 04:48:30 +00:00
Harlan Haskins 461f0722dd [clang] Adopt llvm::ErrorOr in FileManager methods
Previously, the FileManager would use NULL returns to signify whether a file existed, but that doesn’t cover permissions issues or anything else that might occur while trying to stat or read a file. Instead, convert getFile and getDirectory into returning llvm::ErrorOr

Signed-off-by: Harlan Haskins <harlan@apple.com>
llvm-svn: 367615
2019-08-01 21:31:49 +00:00
Csaba Dabis 7740c6d643 [analyzer] StackFrameContext: Add NodeBuilderContext::blockCount() to its profile
Summary:
It allows discriminating between stack frames of the same call that is
called multiple times in a loop.

Thanks to Artem Dergachev for the great idea!

Reviewed By: NoQ

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65587

llvm-svn: 367608
2019-08-01 20:41:13 +00:00
Serge Pavlov 3c26163d1a [Parser] Use special definition for pragma annotations
Previously pragma annotation tokens were described as any other
annotations in TokenKinds.def. This change introduces special macro
PRAGMA_ANNOTATION for the pragma descriptions. It allows implementing
checks that deal with pragma annotations only.

Differential Revision: https://reviews.llvm.org/D65405

llvm-svn: 367575
2019-08-01 15:15:10 +00:00
Serge Pavlov 0c50319927 [Parser] Change parameter type from int to enum
Some parser functions accept argument of type unsigned while it is
actually of type DeclSpec::TST. No functional changes.

Differential Revision: https://reviews.llvm.org/D65406

llvm-svn: 367545
2019-08-01 11:46:28 +00:00
Hans Wennborg c5877e9803 Delay emitting dllexport explicitly defaulted members until the class is fully parsed (PR40006)
This is similar to r245139, but that only addressed dllexported classes.
It was still possible to run into the same problem with dllexported
members in an otherwise normal class (see bug). This uses the same
strategy to fix: delay defining the method until the whole class has
been parsed.

(The easiest way to see the ordering problem is in
Parser::ParseCXXMemberSpecification(): it calls
ParseLexedMemberInitializers() *after* ActOnFinishCXXMemberDecls(),
which was trying to define the dllexport method. Now we delay it to
ActOnFinishCXXNonNestedClass() which is called after both of those.)

Differential revision: https://reviews.llvm.org/D65511

llvm-svn: 367520
2019-08-01 08:01:09 +00:00
Ziang Wan 87b668befe [Sema] Enable -Wimplicit-float-conversion for integral to floating point precision loss
Issue an warning when the code tries to do an implicit int -> float
conversion, where the float type ha a narrower significant than the
float type.

The new warning is controlled by flag -Wimplicit-int-float-conversion,
under -Wimplicit-float-conversion and -Wconversion. It is also silenced
when c++11 narrowing warning is issued.

Differential Revision: https://reviews.llvm.org/D64666

llvm-svn: 367497
2019-08-01 00:16:43 +00:00
Michael J. Spencer 33703fb9f9 [clang][ARM] Fix msvc arm{64} builtins to use int on LP64 systems.
The `InterlockedX_{acq,nf,rel}` functions deal with 32 bits which is long on
MSVC, but int on most other systems.

This also checks that `ReadStatusRegister` and `WriteStatusRegister` have
the correct type on aarch64-darwin.

Differential Revision: https://reviews.llvm.org/D64164

llvm-svn: 367479
2019-07-31 20:42:28 +00:00
Puyan Lotfi 61b6b0eb1b [NFC][clang] Refactor getCompilationPhases()+Types.def step 3.
Second landing attempt: Changed TY_ObjCXXHeader to TY_PP_ObjCXXHeader to fix
                        -xobjective-c++-header. This time I verified against
                        preprocessor output.

Dropping the 'u' entry and the entire Flags table from Types.def.
Now it'll be a bit easier to tablegenify this.

Differential Revision: https://reviews.llvm.org/D65308

llvm-svn: 367478
2019-07-31 20:40:08 +00:00
Matt Arsenault 64d7af09f5 AMDGPU: Add missing builtin declarations
llvm-svn: 367431
2019-07-31 14:03:05 +00:00
Momchil Velikov a36d31478c [AArch64] Add support for Transactional Memory Extension (TME)
Re-commit r366322 after some fixes

TME is a future architecture technology, documented in

  https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools
  https://developer.arm.com/docs/ddi0601/a

More about the future architectures:

  https://community.arm.com/developer/ip-products/processors/b/processors-ip-blog/posts/new-technologies-for-the-arm-a-profile-architecture

This patch adds support for the TME instructions TSTART, TTEST, TCOMMIT, and
TCANCEL and the target feature/arch extension "tme".

It also implements TME builtin functions, defined in ACLE Q2 2019
(https://developer.arm.com/docs/101028/latest)

Differential Revision: https://reviews.llvm.org/D64416

Patch by Javed Absar and Momchil Velikov

llvm-svn: 367428
2019-07-31 12:52:17 +00:00
Johannes Doerfert 3be25e7947 [Fix] Customize warnings for missing built-in types
If we detect a built-in declaration for which we cannot derive a type
matching the pattern in the Builtins.def file, we currently emit a
warning that the respective header is needed. However, this is not
necessarily the behavior we want as it has no connection to the location
of the declaration (which can actually be in the header in question).
Instead, this warning is generated
  - if we could not build the type for the pattern on file (for some
    reason). Here we should make the reason explicit. The actual problem
    is otherwise circumvented as the warning is misleading, see [0] for
    an example.
  - if we could not build the type for the pattern because we do not
    have a type on record, possible since D55483, we should not emit any
    warning. See [1] for a legitimate problem.

This patch address both cases. For the "setjmp" family a new warning is
introduced and for built-ins without type on record, so far
"pthread_create", we do not emit the warning anymore.

Also see: PR40692

[0] https://lkml.org/lkml/2019/1/11/718
[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=235583

Differential Revision: https://reviews.llvm.org/D58091

llvm-svn: 367387
2019-07-31 05:16:38 +00:00
Alex Lorenz 50044763f6 NFCI, optimize layout of FileEntry
The reordering of the UID field makes the size of a
FileEntry 8 bytes smaller on 64bit platforms.

llvm-svn: 367371
2019-07-31 00:12:00 +00:00
Erik Pilkington 4cae092099 [Sema] Actually map a variable template specialization from pattern to instantiation
We were previously just using a specialization in the class template instead of
creating a new specialization in the class instantiation.

Fixes llvm.org/PR42779.

Differential revision: https://reviews.llvm.org/D65359

llvm-svn: 367367
2019-07-30 23:38:18 +00:00
Sam McCall 71d4544961 Revert "[NFC][clang] Refactor getCompilationPhases()+Types.def step 3."
This reverts commit d2254dbf21.
This (unintentionally?) changed behavior, disallowing e.g. -x objective-c++-header

llvm-svn: 367353
2019-07-30 20:38:11 +00:00
Puyan Lotfi d2254dbf21 [NFC][clang] Refactor getCompilationPhases()+Types.def step 3.
Dropping the 'u' entry and the entire Flags table from Types.def.
Now it'll be a bit easier to tablegenify this.

Differential Revision: https://reviews.llvm.org/D65308

llvm-svn: 367345
2019-07-30 19:03:17 +00:00
Reid Kleckner c0e275df3d Remove cache for macro arg stringization
Summary:
The cache recorded the wrong expansion location for all but the first
stringization. It seems uncommon to stringize the same macro argument
multiple times, so this cache doesn't seem that important.

Fixes PR39942

Reviewers: vsk, rsmith

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65428

llvm-svn: 367337
2019-07-30 17:58:22 +00:00
JF Bastien ac8686205b [NFC] avoid AlignedCharArray in clang
As discussed in D65249, don't use AlignedCharArray or std::aligned_storage. Just use alignas(X) char Buf[Size];. This will allow me to remove AlignedCharArray entirely, and works on the current minimum version of Visual Studio.

llvm-svn: 367274
2019-07-29 23:12:48 +00:00
Jonas Devlieghere 2562bec939 [DependencyCollector] Make maybeAddDependency virtual (NFC)
Make DependencyCollector::maybeAddDependency, just like its other
methods, which I made virtual a while ago. The motivation for this
change is still the LLDB reproducer.

llvm-svn: 367271
2019-07-29 23:02:11 +00:00
Richard Smith e8b659fc1f Give the 'signed/unsigned wchar_t' extension a warning flag, and follow
GCC 9 in promoting it to an error by default.

llvm-svn: 367255
2019-07-29 20:00:46 +00:00
Richard Smith a625da716c When determining whether a lambda-expression is implicitly constexpr,
check the formal rules rather than seeing if the normal checks produce a
diagnostic.

This fixes the handling of C++2a extensions in lambdas in C++17 mode,
as well as some corner cases in earlier language modes where we issue
diagnostics for things other than not satisfying the formal constexpr
requirements.

llvm-svn: 367254
2019-07-29 19:59:45 +00:00
Gabor Borsik 4bde15fe1e [analyzer] Add yaml parser to GenericTaintChecker
While we implemented taint propagation rules for several
builtin/standard functions, there's a natural desire for users to add
such rules to custom functions.

A series of patches will implement an option that allows users to
annotate their functions with taint propagation rules through a YAML
file. This one adds parsing of the configuration file, which may be
specified in the commands line with the analyzer config:
alpha.security.taint.TaintPropagation:Config. The configuration may
contain propagation rules, filter functions (remove taint) and sink
functions (give a warning if it gets a tainted value).

I also added a new header for future checkers to conveniently read YAML
files as checker options.

Differential Revision: https://reviews.llvm.org/D59555

llvm-svn: 367190
2019-07-28 13:38:04 +00:00
Alexey Bataev 8a8c69808c [OPENMP]Add support for analysis of reduction variables.
Summary:
Reduction variables are the variables, for which the private copies
must be created in the OpenMP regions. Then they are initialized with
the predefined values depending on the reduction operation. After exit
from the OpenMP region the original variable is updated using the
reduction value and the value of the original reduction variable.

Reviewers: NoQ

Subscribers: guansong, jdoerfert, caomhin, kkwli0, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D65106

llvm-svn: 367116
2019-07-26 14:50:05 +00:00
Akira Hatanaka 6f6156b9fc Revert "[Sema] Diagnose default-initialization, destruction, and copying of"
This reverts commit r365985.

Prior to r365985, clang used to mark C union fields that have
non-trivial ObjC ownership qualifiers as unavailable if the union was
declared in a system header. r365985 stopped doing so, which caused the
swift compiler to crash when it tried to import a non-trivial union.

I have a patch that fixes the crash (https://reviews.llvm.org/D65256),
but I'm temporarily reverting the original patch until we can decide on
whether it's taking the right approach.

llvm-svn: 367076
2019-07-26 00:02:17 +00:00
George Burgess IV 9d045a5c1e [Sema] add -Walloca to flag uses of `alloca`
This CL adds an optional warning to diagnose uses of the
`__builtin_alloca` family of functions. The use of these functions is
discouraged by many, so it seems like a good idea to allow clang to warn
about it.

Patch by Elaina Guan!

Differential Revision: https://reviews.llvm.org/D64883

llvm-svn: 367067
2019-07-25 22:23:40 +00:00
Puyan Lotfi c07c83b162 [NFC][clang] Refactor getCompilationPhases()+Types.def step 2.
- Removing a few of the entries in the Flags for the Types.def table.
- Removing redundant parts of getCompilationPhases().

Flags have been removed from Types.def:

 a - The type should only be assembled: Now, check that Phases contains
     phases::Assemble but not phases::Compile or phases::Backend.
 p - The type should only be precompiled: Now, check that Phases contains
     phases::Precompile but that Flags does not contain 'm'.
 m - Precompiling this type produces a module file: Now, check that
     isPrepeocessedModuleType.



Differential Revision: https://reviews.llvm.org/D65176

llvm-svn: 367063
2019-07-25 22:05:55 +00:00
Matthias Gehre d293cbd5fd Add lifetime categories attributes
Summary:
This is the first part of work announced in
"[RFC] Adding lifetime analysis to clang" [0],
i.e. the addition of the [[gsl::Owner(T)]] and
[[gsl::Pointer(T)]] attributes, which
will enable user-defined types to participate in
the lifetime analysis (which will be part of the
next PR).
The type `T` here is called "DerefType" in the paper,
and denotes the type that an Owner owns and a Pointer
points to. E.g. `std::vector<int>` should be annotated
with `[[gsl::Owner(int)]]` and
a `std::vector<int>::iterator` with `[[gsl::Pointer(int)]]`.

[0] http://lists.llvm.org/pipermail/cfe-dev/2018-November/060355.html

Reviewers: gribozavr

Subscribers: xazax.hun, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D63954

llvm-svn: 367040
2019-07-25 17:50:51 +00:00
Erich Keane 393094859e Remove CallingConvMethodType
This seems to be an old vestage of a previous implementation of getting
the default calling convention, and everything is now using
CXXABI/ASTContext's getDefaultCallingConvention.  Remove it, since it
isn't doing anything.

llvm-svn: 367039
2019-07-25 17:14:45 +00:00
Erich Keane 46441fdb3c Implement P1771
As passed in the Cologne meeting and treated by Core as a DR,
[[nodiscard]] was applied to constructors so that they can be diagnosed
in cases where the user forgets a variable name for a type.

The intent is to enable the library to start using this on the
constructors of scope_guard/lock_guard.

Differential Revision: https://reviews.llvm.org/D64914

llvm-svn: 367027
2019-07-25 15:10:56 +00:00
Anton Bikineev 0ef3f27458 [clang] Fail for empty names in is*DerivedFrom matchers.
Differential Revision: https://reviews.llvm.org/D65279

llvm-svn: 367022
2019-07-25 14:48:55 +00:00
Anton Bikineev 4e1d188be2 [clang] Add isDirectlyDerivedFrom AST matcher.
Differential Revision: https://reviews.llvm.org/D65092

llvm-svn: 367010
2019-07-25 11:54:13 +00:00
Anastasia Stulova 88ed70e247 [OpenCL] Rename lang mode flag for C++ mode
Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++
or -std=clc++/-std=CLC++.

This aligns with OpenCL C conversion and removes ambiguity
with OpenCL C++. 

Differential Revision: https://reviews.llvm.org/D65102

llvm-svn: 367008
2019-07-25 11:04:29 +00:00
Sjoerd Meijer a48f58c97f [Clang] New loop pragma vectorize_predicate
This adds a new vectorize predication loop hint:

  #pragma clang loop vectorize_predicate(enable)

that can be used to indicate to the vectoriser that all (load/store)
instructions should be predicated (masked). This allows, for example, folding
of the remainder loop into the main loop.

This patch will be followed up with D64916 and D65197. The former is a
refactoring in the loopvectorizer and the groundwork to make tail loop folding
a more general concept, and in the latter the actual tail loop folding
transformation will be implemented.

Differential Revision: https://reviews.llvm.org/D64744

llvm-svn: 366989
2019-07-25 07:33:13 +00:00