[PATCH] D112426: [ARM] Implement BTI placement pass for PACBTI-M
    Oliver Stannard (Linaro) via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Thu Oct 28 04:24:35 PDT 2021
    
    
  
ostannard accepted this revision.
ostannard added a comment.
This revision is now accepted and ready to land.
LGTM, just a few nit-picks.
================
Comment at: llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp:6081
+    Function &F, std::vector<outliner::Candidate> &Candidates) const {
+  outliner::Candidate &C = Candidates.front();
+  const Function &CFn = C.getMF()->getFunction();
----------------
Please add a comment explaining that branch-target-enforcement is guaranteed to be consistent between all candidates, so we only need to look at one.
================
Comment at: llvm/lib/Target/ARM/ARMBranchTargets.cpp:82
+
+    // Every function can potentially be called indirectly (even static if it
+    // has static linkage, due to linker-generated veneers).
----------------
Extra word "static" here
================
Comment at: llvm/lib/Target/ARM/ARMConstantIslandPass.cpp:2474
+  // the BTI instruction at its beginning.
+    if (BlockJumpTableRefCount[&OldBB] > 0)
+    return;
----------------
Indentation
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112426/new/
https://reviews.llvm.org/D112426
    
    
More information about the llvm-commits
mailing list