[llvm] [Hexagon] Add Loop Alignment pass. (PR #83328)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 28 12:39:08 PST 2024


================
@@ -32,6 +33,9 @@ class HexagonTargetMachine : public LLVMTargetMachine {
                        std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,
                        bool JIT);
   ~HexagonTargetMachine() override;
+  const HexagonSubtarget *getSubtargetImpl() const {
----------------
s-barannikov wrote:

This method shouldn't exist, subtarget is per-function. You can move `HST->useHVXOps()` check inside the pass'es `runOnMachineFunction` where subtarget is available via MF, and return early if it returns false.


https://github.com/llvm/llvm-project/pull/83328


More information about the llvm-commits mailing list