[llvm] [X86] Respect code models more when determining if a global reference can fit in 32 bits (PR #75386)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 18:52:55 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff e8f43883a073f4ef71e7f724143e068099649952 57d318085c9c44f8fc95719dbbe01f221e35ee6c -- llvm/include/llvm/Target/TargetMachine.h llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp llvm/lib/Target/TargetMachine.cpp llvm/lib/Target/X86/X86FastISel.cpp llvm/lib/Target/X86/X86ISelDAGToDAG.cpp llvm/lib/Target/X86/X86Subtarget.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp
index b0dd907eea..d63f1ca169 100644
--- a/llvm/lib/Target/X86/X86Subtarget.cpp
+++ b/llvm/lib/Target/X86/X86Subtarget.cpp
@@ -86,7 +86,8 @@ X86Subtarget::classifyLocalReference(const GlobalValue *GV) const {
CodeModel::Model CM = TM.getCodeModel();
assert(CM != CodeModel::Tiny &&
"Tiny codesize model not supported on X86");
- // In the large code model, all text is far from any global data, so we use GOTOFF.
+ // In the large code model, all text is far from any global data, so we
+ // use GOTOFF.
if (CM == CodeModel::Large)
return X86II::MO_GOTOFF;
// Large GlobalValues use GOTOFF, otherwise use RIP-rel access.
``````````
</details>
https://github.com/llvm/llvm-project/pull/75386
More information about the llvm-commits
mailing list