[llvm] a9d0ab2 - Re-apply "[AArch64] Enable "sink-and-fold" in MachineSink by default (#67432)"

Momchil Velikov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 01:36:51 PDT 2023


Author: Momchil Velikov
Date: 2023-10-06T09:34:42+01:00
New Revision: a9d0ab2ee572f179f80483f3ebbbcdd03c3b4481

URL: https://github.com/llvm/llvm-project/commit/a9d0ab2ee572f179f80483f3ebbbcdd03c3b4481
DIFF: https://github.com/llvm/llvm-project/commit/a9d0ab2ee572f179f80483f3ebbbcdd03c3b4481.diff

LOG: Re-apply "[AArch64] Enable "sink-and-fold" in MachineSink by default (#67432)"

This re-applies commit ace20e24287b, which was reverted in eff4ef25b3dc.

The issues were fixed in:

  * b30765caf874 [AArch64] Fix an incorrect handling of debug values in
    MachineSink (#68107)

  * b454b04d6869 [AArch64] Fix a compiler crash in MachineSink (#67705)

Added: 
    

Modified: 
    llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
    llvm/test/CodeGen/AArch64/sink-and-fold.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
index 3d818c76bd4b7d7..fcc30a7cfceaf47 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
@@ -200,7 +200,7 @@ static cl::opt<bool> EnableGISelLoadStoreOptPostLegal(
 static cl::opt<bool>
     EnableSinkFold("aarch64-enable-sink-fold",
                    cl::desc("Enable sinking and folding of instruction copies"),
-                   cl::init(false), cl::Hidden);
+                   cl::init(true), cl::Hidden);
 
 extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAArch64Target() {
   // Register the target.

diff  --git a/llvm/test/CodeGen/AArch64/sink-and-fold.ll b/llvm/test/CodeGen/AArch64/sink-and-fold.ll
index 632fdb391053121..52007221e12a7b5 100644
--- a/llvm/test/CodeGen/AArch64/sink-and-fold.ll
+++ b/llvm/test/CodeGen/AArch64/sink-and-fold.ll
@@ -1,5 +1,5 @@
 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
-; RUN: llc -aarch64-enable-sink-fold=true < %s | FileCheck %s
+; RUN: llc < %s | FileCheck %s
 target triple = "aarch64-linux"
 
 declare i32 @use(...)


        


More information about the llvm-commits mailing list