llvm-project/llvm/lib
Sjoerd Meijer d1522513d4 [ARM] Reimplement MVE Tail-Predication pass using @llvm.get.active.lane.mask
To set up a tail-predicated loop, we need to to calculate the number of
elements processed by the loop. We can now use intrinsic
@llvm.get.active.lane.mask() to do this, which is emitted by the vectoriser in
D79100. This intrinsic generates a predicate for the masked loads/stores, and
consumes the Backedge Taken Count (BTC) as its second argument. We can now use
that to reconstruct the loop tripcount, instead of the IR pattern match
approach we were using before.

Many thanks to Eli Friedman and Sam Parker for all their help with this work.

This also adds overflow checks for the different, new expressions that we
create: the loop tripcount, and the sub expression that calculates the
remaining elements to be processed. For the latter, SCEV is not able to
calculate precise enough bounds, so we work around that at the moment, but is
not entirely correct yet, it's conservative. The overflow checks can be
overruled with a force flag, which is thus potentially unsafe (but not really
because the vectoriser is the only place where this intrinsic is emitted at the
moment). It's also good to mention that the tail-predication pass is not yet
enabled by default.  We will follow up to see if we can implement these
overflow checks better, either by a change in SCEV or we may want revise the
definition of llvm.get.active.lane.mask.

Differential Revision: https://reviews.llvm.org/D79175
2020-06-17 15:17:42 +01:00
..
Analysis Revert "[InlineCost] InlineCostAnnotationWriterPass introduced" 2020-06-17 14:02:34 +00:00
AsmParser [LLParser] Delete temp CallInst when error occurs 2020-06-16 11:41:25 +08:00
BinaryFormat [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00
Bitcode [strictfp] Replace dangling strictfp attrs with nobuiltin 2020-06-15 10:05:35 -04:00
Bitstream [Bitcode] reserve in front of push_back loops. NFCI. 2020-05-01 15:52:53 +02:00
CodeGen [SafeStack,NFC] Fix names after files move 2020-06-17 01:08:40 -07:00
DWARFLinker [Clang] Restore replace_path_prefix instead of startswith 2020-05-13 13:49:14 -04:00
DebugInfo [DebugInfo] Unify Cursor usage for all debug line opcodes 2020-06-17 09:19:24 +01:00
Demangle Give microsoftDemangle() an outparam for how many input bytes were consumed. 2020-05-20 16:17:31 -04:00
ExecutionEngine [RuntimeDyld] Add dependence on Core. 2020-06-15 11:14:27 -07:00
Extensions Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
Frontend [OpenMP] Replace Clang's OpenMP RTL Definitions with OMPKinds.def 2020-06-01 16:23:10 -04:00
FuzzMutate [SVE] Eliminate calls to default-false VectorType::get() from FuzzMutate 2020-06-09 13:57:36 -07:00
Fuzzer
IR [NFC] Add API for edge domination check in dom tree 2020-06-17 16:05:05 +07:00
IRReader Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
LTO [StackSafety] Run ThinLTO 2020-06-12 18:11:29 -07:00
LineEditor
Linker [SVE] Eliminate calls to default-false VectorType::get() from Linker 2020-05-29 17:43:15 -07:00
MC Fix debug line info when line markers are present inside macros. 2020-06-16 16:13:11 +01:00
MCA [MCA][InstrBuilder] Correctly mark reserved resources in initializeUsedResources. 2020-05-10 19:25:54 +01:00
Object [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00
ObjectYAML [ObjectYAML][DWARF] Let writeVariableSizedInteger() return Error. 2020-06-17 09:30:14 +08:00
Option
Passes Revert "[InlineCost] InlineCostAnnotationWriterPass introduced" 2020-06-17 14:02:34 +00:00
ProfileData [llvm-cov gcov] Don't suppress .gcov output if .gcda is corrupted 2020-06-16 14:55:38 -07:00
Remarks YAMLRemarkParser.cpp - remove duplicate RemarkParser.h include. NFC. 2020-06-08 13:59:05 +01:00
Support [FileCheck] Implement * and / operators for ExpressionValue. 2020-06-17 09:39:17 +00:00
TableGen Fix ubsan error in tblgen with signed left shift 2020-06-16 11:15:09 -07:00
Target [ARM] Reimplement MVE Tail-Predication pass using @llvm.get.active.lane.mask 2020-06-17 15:17:42 +01:00
Testing
TextAPI [llvm][llvm-nm] add TextAPI/MachO support 2020-06-11 18:54:16 -07:00
ToolDrivers [COFF] Use Expected in COFFObjectFile creation 2020-05-08 14:22:28 -07:00
Transforms Follow up of rGe345d547a0d5, and attempt to pacify buildbot: 2020-06-17 13:24:09 +01:00
WindowsManifest
XRay [xray] Add llvm-xray extract support for 32 bit ARM 2020-05-28 18:41:11 -04:00
CMakeLists.txt Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
LLVMBuild.txt Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00