projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3112987
)
[RISCV] Simplify lowerGlobalAddress. NFC
author
Fangrui Song
<i@maskray.me>
Sun, 17 Jul 2022 22:42:45 +0000
(15:42 -0700)
committer
Fangrui Song
<i@maskray.me>
Sun, 17 Jul 2022 22:42:45 +0000
(15:42 -0700)
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
patch
|
blob
|
history
diff --git
a/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
b/llvm/lib/Target/RISCV/RISCVISelLowering.cpp
index
382dbb9
..
abab23d
100644
(file)
--- a/
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+++ b/
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
@@
-3707,10
+3707,7
@@
SDValue RISCVTargetLowering::lowerGlobalAddress(SDValue Op,
SDLoc DL(Op);
GlobalAddressSDNode *N = cast<GlobalAddressSDNode>(Op);
assert(N->getOffset() == 0 && "unexpected offset in global node");
-
- const GlobalValue *GV = N->getGlobal();
- bool IsLocal = getTargetMachine().shouldAssumeDSOLocal(*GV->getParent(), GV);
- return getAddr(N, DAG, IsLocal);
+ return getAddr(N, DAG, N->getGlobal()->isDSOLocal());
}
SDValue RISCVTargetLowering::lowerBlockAddress(SDValue Op,