[llvm] 62883d9 - [llvm-exegesis] Fix unused variable 'VAddressSpaceCeiling' warning (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 18:16:47 PDT 2023


Author: Jie Fu
Date: 2023-06-27T09:14:07+08:00
New Revision: 62883d9f9037202628e5454cb935a1d27f6e246d

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

LOG: [llvm-exegesis] Fix unused variable 'VAddressSpaceCeiling' warning (NFC)

/Users/jiefu/llvm-project/llvm/tools/llvm-exegesis/lib/X86/Target.cpp:52:33: error: unused variable 'VAddressSpaceCeiling' [-Werror,-Wunused-const-variable]
static constexpr const intptr_t VAddressSpaceCeiling = 0x0000800000000000;
                                ^
1 error generated.

Added: 
    

Modified: 
    llvm/tools/llvm-exegesis/lib/X86/Target.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
index 9be178b77f70e..e690089fec565 100644
--- a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -46,12 +46,6 @@
 namespace llvm {
 namespace exegesis {
 
-#ifdef __arm__
-static constexpr const intptr_t VAddressSpaceCeiling = 0xC0000000;
-#else
-static constexpr const intptr_t VAddressSpaceCeiling = 0x0000800000000000;
-#endif
-
 // If a positive value is specified, we are going to use the LBR in
 // latency-mode.
 //
@@ -987,6 +981,12 @@ std::vector<MCInst> ExegesisX86Target::setRegTo(const MCSubtargetInfo &STI,
 
 #ifdef __linux__
 
+#ifdef __arm__
+static constexpr const intptr_t VAddressSpaceCeiling = 0xC0000000;
+#else
+static constexpr const intptr_t VAddressSpaceCeiling = 0x0000800000000000;
+#endif
+
 void generateSyscall(long SyscallNumber, std::vector<MCInst> &GeneratedCode) {
   GeneratedCode.push_back(
       loadImmediate(X86::RAX, 64, APInt(64, SyscallNumber)));


        


More information about the llvm-commits mailing list