[PATCH] D78411: [AArch64LoadStoreOptimizer] Skip debug insts during pattern matching
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 18 02:40:45 PDT 2020
fhahn added inline comments.
================
Comment at: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:751
auto MBB = MI.getParent();
for (MachineBasicBlock::reverse_iterator I = MI.getReverseIterator(),
E = MBB->rend();
----------------
could use range based iterator?
================
Comment at: llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:1013
+ MachineBasicBlock::iterator E = LoadI->getParent()->end();
+ MachineBasicBlock::iterator NextI = next_nodbg(LoadI, E);
----------------
nit: Not sure if it is worth to introduce a variable for a single use, as it also increases the number of variables to keep track in the function.
================
Comment at: llvm/test/CodeGen/AArch64/ldst-opt-mte.mir:1
-# RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass aarch64-ldst-opt -verify-machineinstrs -o - %s | FileCheck %s
---
----------------
I think it would be slightly better to have the version with DBG_VALUE as separate test, as it unnecessarily clutters the test with respect to the core functionality.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78411/new/
https://reviews.llvm.org/D78411
More information about the llvm-commits
mailing list