[llvm] r235491 - [AArch64] Disable complex GEP optimization by default.

James Molloy james.molloy at arm.com
Wed Apr 22 02:11:38 PDT 2015


Author: jamesm
Date: Wed Apr 22 04:11:38 2015
New Revision: 235491

URL: http://llvm.org/viewvc/llvm-project?rev=235491&view=rev
Log:
[AArch64] Disable complex GEP optimization by default.

Enough concerns were raised that this optimization is pessimising some code patterns.

The obvious fix, to add a Reassociate run afterwards, causes even more pessimisation in some cases due to fewer complex addressing modes being matched. As there isn't a trivial fix for this, backing this out by default until someone gets a chance to fix the addressing mode matcher.

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp
    llvm/trunk/test/CodeGen/AArch64/aarch64-gep-opt.ll

Modified: llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp?rev=235491&r1=235490&r2=235491&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64TargetMachine.cpp Wed Apr 22 04:11:38 2015
@@ -85,7 +85,7 @@ EnableA53Fix835769("aarch64-fix-cortex-a
 static cl::opt<bool>
 EnableGEPOpt("aarch64-gep-opt", cl::Hidden,
              cl::desc("Enable optimizations on complex GEPs"),
-             cl::init(true));
+             cl::init(false));
 
 // FIXME: Unify control over GlobalMerge.
 static cl::opt<cl::boolOrDefault>

Modified: llvm/trunk/test/CodeGen/AArch64/aarch64-gep-opt.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/aarch64-gep-opt.ll?rev=235491&r1=235490&r2=235491&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/aarch64-gep-opt.ll (original)
+++ llvm/trunk/test/CodeGen/AArch64/aarch64-gep-opt.ll Wed Apr 22 04:11:38 2015
@@ -1,6 +1,6 @@
-; RUN: llc -O3 -verify-machineinstrs %s -o - | FileCheck %s
-; RUN: llc -O3 -print-after=codegenprepare -mcpu=cyclone < %s >%t 2>&1 && FileCheck --check-prefix=CHECK-NoAA <%t %s
-; RUN: llc -O3 -print-after=codegenprepare -mcpu=cortex-a53 < %s >%t 2>&1 && FileCheck --check-prefix=CHECK-UseAA <%t %s
+; RUN: llc -O3 -aarch64-gep-opt=true -verify-machineinstrs %s -o - | FileCheck %s
+; RUN: llc -O3 -aarch64-gep-opt=true -print-after=codegenprepare -mcpu=cyclone < %s >%t 2>&1 && FileCheck --check-prefix=CHECK-NoAA <%t %s
+; RUN: llc -O3 -aarch64-gep-opt=true -print-after=codegenprepare -mcpu=cortex-a53 < %s >%t 2>&1 && FileCheck --check-prefix=CHECK-UseAA <%t %s
 target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
 target triple = "aarch64-linux-gnueabi"
 





More information about the llvm-commits mailing list