Rename genAlignLoops (dotnet/coreclr#27030)
authorSinan Kaya <41809318+franksinankaya@users.noreply.github.com>
Tue, 8 Oct 2019 23:09:24 +0000 (16:09 -0700)
committerSergey Andreenko <seandree@microsoft.com>
Tue, 8 Oct 2019 23:09:24 +0000 (16:09 -0700)
* find src/jit -type f -exec sed -i -e 's/.*declspec.*genAlignLoops.*//g' {} \;

* Go back to doAlignLoops

* Rename to ShouldAlignLoops

Commit migrated from https://github.com/dotnet/coreclr/commit/8df2e7b38211e0a2b6bad706a473f181ec1cb3fb

src/coreclr/src/jit/codegeninterface.h
src/coreclr/src/jit/codegenlinear.cpp
src/coreclr/src/jit/compiler.cpp

index 7e902c2..cc00fc8 100644 (file)
@@ -75,12 +75,12 @@ public:
     //-------------------------------------------------------------------------
     //  The following property indicates whether to align loops.
     //  (Used to avoid effects of loop alignment when diagnosing perf issues.)
-    __declspec(property(get = doAlignLoops, put = setAlignLoops)) bool genAlignLoops;
-    bool doAlignLoops()
+
+    bool ShouldAlignLoops()
     {
         return m_genAlignLoops;
     }
-    void setAlignLoops(bool value)
+    void SetAlignLoops(bool value)
     {
         m_genAlignLoops = value;
     }
index d1a636e..8d92a74 100644 (file)
@@ -310,7 +310,7 @@ void CodeGen::genCodeForBBlist()
         genUpdateCurrentFunclet(block);
 
 #ifdef _TARGET_XARCH_
-        if (genAlignLoops && block->bbFlags & BBF_LOOP_HEAD)
+        if (ShouldAlignLoops() && block->bbFlags & BBF_LOOP_HEAD)
         {
             GetEmitter()->emitLoopAlign();
         }
index 9ee0231..10d8450 100644 (file)
@@ -4040,7 +4040,7 @@ _SetMinOpts:
 
         if (opts.jitFlags->IsSet(JitFlags::JIT_FLAG_RELOC))
         {
-            codeGen->genAlignLoops = false; // loop alignment not supported for prejitted code
+            codeGen->SetAlignLoops(false); // loop alignment not supported for prejitted code
 
             // The zapper doesn't set JitFlags::JIT_FLAG_ALIGN_LOOPS, and there is
             // no reason for it to set it as the JIT doesn't currently support loop alignment
@@ -4050,7 +4050,7 @@ _SetMinOpts:
         }
         else
         {
-            codeGen->genAlignLoops = opts.jitFlags->IsSet(JitFlags::JIT_FLAG_ALIGN_LOOPS);
+            codeGen->SetAlignLoops(opts.jitFlags->IsSet(JitFlags::JIT_FLAG_ALIGN_LOOPS));
         }
     }