[llvm] r330718 - [SystemZ] Use preferred 16-byte function alignment

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 24 07:03:21 PDT 2018


Author: uweigand
Date: Tue Apr 24 07:03:21 2018
New Revision: 330718

URL: http://llvm.org/viewvc/llvm-project?rev=330718&view=rev
Log:
[SystemZ] Use preferred 16-byte function alignment

While not necessary for correctness, it is preferable for
performance reasons on all architectures we currently support
to align functions to 16-byte boundaries by default.


Modified:
    llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp

Modified: llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp?rev=330718&r1=330717&r2=330718&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZISelLowering.cpp Tue Apr 24 07:03:21 2018
@@ -122,6 +122,8 @@ SystemZTargetLowering::SystemZTargetLowe
 
   // Instructions are strings of 2-byte aligned 2-byte values.
   setMinFunctionAlignment(2);
+  // For performance reasons we prefer 16-byte alignment.
+  setPrefFunctionAlignment(4);
 
   // Handle operations that are handled in a similar way for all types.
   for (unsigned I = MVT::FIRST_INTEGER_VALUETYPE;




More information about the llvm-commits mailing list