diff options
author | Sam Parker <sam.parker@arm.com> | 2020-01-09 12:52:50 +0000 |
---|---|---|
committer | Sam Parker <sam.parker@arm.com> | 2020-01-09 12:54:01 +0000 |
commit | 9c91d79dadc660cb6a0ec736389341debd8cd118 (patch) | |
tree | bb6bb04ed0444d846587a7a9d2ac8733407ce0f8 /llvm/lib/Target/ARM | |
parent | 25dd99fab205619ef90d0da23bcfba3c9f762e5e (diff) | |
download | bcm5719-llvm-9c91d79dadc660cb6a0ec736389341debd8cd118.tar.gz bcm5719-llvm-9c91d79dadc660cb6a0ec736389341debd8cd118.zip |
[NFC][ARM] LowOverheadLoop comments
Add a comment describing the dependencies of the pass.
Diffstat (limited to 'llvm/lib/Target/ARM')
-rw-r--r-- | llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp index 31a98d86a54..6c45eecf0c2 100644 --- a/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp +++ b/llvm/lib/Target/ARM/ARMLowOverheadLoops.cpp @@ -19,6 +19,22 @@ /// which determines whether we can generated the tail-predicated low-overhead /// loop form. /// +/// Assumptions and Dependencies: +/// Low-overhead loops are constructed and executed using a setup instruction: +/// DLS, WLS, DLSTP or WLSTP and an instruction that loops back: LE or LETP. +/// WLS(TP) and LE(TP) are branching instructions with a (large) limited range +/// but fixed polarity: WLS can only branch forwards and LE can only branch +/// backwards. These restrictions mean that this pass is dependent upon block +/// layout and block sizes, which is why it's the last pass to run. The same is +/// true for ConstantIslands, but this pass does not increase the size of the +/// basic blocks, nor does it change the CFG. Instructions are mainly removed +/// during the transform and pseudo instructions are replaced by real ones. In +/// some cases, when we have to revert to a 'normal' loop, we have to introduce +/// multiple instructions for a single pseudo (see RevertWhile and +/// RevertLoopEnd). To handle this situation, t2WhileLoopStart and t2LoopEnd +/// are defined to be as large as this maximum sequence of replacement +/// instructions. +/// //===----------------------------------------------------------------------===// #include "ARM.h" |