-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25537 from JuliaLang/tb/llvm_addrspace
Apply a forgotten patch to LLVM >3.9
- Loading branch information
Showing
3 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# treat patches as files that should not be modified | ||
*.patch -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
diff -ru llvm-5.0.0.orig/lib/Target/NVPTX/NVPTXISelLowering.cpp llvm-5.0.0/lib/Target/NVPTX/NVPTXISelLowering.cpp | ||
--- llvm-5.0.0.orig/lib/Target/NVPTX/NVPTXISelLowering.cpp 2017-07-12 22:49:21.000000000 +0200 | ||
+++ llvm-5.0.0/lib/Target/NVPTX/NVPTXISelLowering.cpp 2018-01-13 09:08:17.275987874 +0100 | ||
@@ -1235,6 +1235,14 @@ | ||
} | ||
} | ||
|
||
+bool NVPTXTargetLowering::isNoopAddrSpaceCast(unsigned SrcAS, | ||
+ unsigned DestAS) const { | ||
+ assert(SrcAS != DestAS && "Expected different address spaces!"); | ||
+ | ||
+ return (SrcAS == ADDRESS_SPACE_GENERIC || SrcAS > ADDRESS_SPACE_LOCAL) && | ||
+ (DestAS == ADDRESS_SPACE_GENERIC || DestAS > ADDRESS_SPACE_LOCAL); | ||
+} | ||
+ | ||
SDValue | ||
NVPTXTargetLowering::LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const { | ||
SDLoc dl(Op); | ||
diff -ru llvm-5.0.0.orig/lib/Target/NVPTX/NVPTXISelLowering.h llvm-5.0.0/lib/Target/NVPTX/NVPTXISelLowering.h | ||
--- llvm-5.0.0.orig/lib/Target/NVPTX/NVPTXISelLowering.h 2018-01-13 09:07:48.839643576 +0100 | ||
+++ llvm-5.0.0/lib/Target/NVPTX/NVPTXISelLowering.h 2018-01-13 09:06:18.658551692 +0100 | ||
@@ -443,6 +443,8 @@ | ||
const NVPTXSubtarget &STI); | ||
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override; | ||
|
||
+ bool isNoopAddrSpaceCast(unsigned SrcAS, unsigned DestAS) const override; | ||
+ | ||
SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const; | ||
|
||
const char *getTargetNodeName(unsigned Opcode) const override; |