-
-
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.
- Loading branch information
Showing
10 changed files
with
224 additions
and
31 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
LLVM_VER = 3.7.1 | ||
LLVM_VER = 3.9.0 | ||
LLVM_LIB_SUFFIX = | ||
PCRE_VER = 10.22 | ||
DSFMT_VER = 2.2.3 | ||
|
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,13 @@ | ||
Index: lib/asan/asan_mapping.h | ||
=================================================================== | ||
--- a/projects/compiler-rt/lib/asan/asan_mapping.h (revision 256758) | ||
+++ b/projects/compiler-rt/lib/asan/asan_mapping.h (working copy) | ||
@@ -146,7 +146,7 @@ | ||
# elif SANITIZER_IOS | ||
# define SHADOW_OFFSET kIosShadowOffset64 | ||
# else | ||
-# define SHADOW_OFFSET kDefaultShort64bitShadowOffset | ||
+# define SHADOW_OFFSET kDefaultShadowOffset64 | ||
# endif | ||
# endif | ||
#endif |
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,98 @@ | ||
Index: lib/Target/NVPTX/NVPTXISelLowering.h | ||
=================================================================== | ||
--- a/lib/Target/NVPTX/NVPTXISelLowering.h | ||
+++ b/lib/Target/NVPTX/NVPTXISelLowering.h | ||
@@ -539,7 +539,8 @@ | ||
SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override; | ||
|
||
unsigned getArgumentAlignment(SDValue Callee, const ImmutableCallSite *CS, | ||
- Type *Ty, unsigned Idx) const; | ||
+ Type *Ty, unsigned Idx, | ||
+ const DataLayout &DL) const; | ||
}; | ||
} // namespace llvm | ||
|
||
Index: lib/Target/NVPTX/NVPTXISelLowering.cpp | ||
=================================================================== | ||
--- a/lib/Target/NVPTX/NVPTXISelLowering.cpp | ||
+++ b/lib/Target/NVPTX/NVPTXISelLowering.cpp | ||
@@ -1024,11 +1024,15 @@ | ||
return O.str(); | ||
} | ||
|
||
-unsigned | ||
-NVPTXTargetLowering::getArgumentAlignment(SDValue Callee, | ||
- const ImmutableCallSite *CS, | ||
- Type *Ty, | ||
- unsigned Idx) const { | ||
+unsigned NVPTXTargetLowering::getArgumentAlignment(SDValue Callee, | ||
+ const ImmutableCallSite *CS, | ||
+ Type *Ty, unsigned Idx, | ||
+ const DataLayout &DL) const { | ||
+ if (!CS) { | ||
+ // CallSite is zero, fallback to ABI type alignment | ||
+ return DL.getABITypeAlignment(Ty); | ||
+ } | ||
+ | ||
unsigned Align = 0; | ||
const Value *DirectCallee = CS->getCalledFunction(); | ||
|
||
@@ -1046,7 +1050,7 @@ | ||
|
||
const Value *CalleeV = cast<CallInst>(CalleeI)->getCalledValue(); | ||
// Ignore any bitcast instructions | ||
- while(isa<ConstantExpr>(CalleeV)) { | ||
+ while (isa<ConstantExpr>(CalleeV)) { | ||
const ConstantExpr *CE = cast<ConstantExpr>(CalleeV); | ||
if (!CE->isCast()) | ||
break; | ||
@@ -1069,7 +1073,6 @@ | ||
|
||
// Call is indirect or alignment information is not available, fall back to | ||
// the ABI type alignment | ||
- auto &DL = CS->getCaller()->getParent()->getDataLayout(); | ||
return DL.getABITypeAlignment(Ty); | ||
} | ||
|
||
@@ -1126,7 +1129,8 @@ | ||
ComputePTXValueVTs(*this, DAG.getDataLayout(), Ty, vtparts, &Offsets, | ||
0); | ||
|
||
- unsigned align = getArgumentAlignment(Callee, CS, Ty, paramCount + 1); | ||
+ unsigned align = | ||
+ getArgumentAlignment(Callee, CS, Ty, paramCount + 1, DL); | ||
// declare .param .align <align> .b8 .param<n>[<size>]; | ||
unsigned sz = DL.getTypeAllocSize(Ty); | ||
SDVTList DeclareParamVTs = DAG.getVTList(MVT::Other, MVT::Glue); | ||
@@ -1166,7 +1170,8 @@ | ||
} | ||
if (Ty->isVectorTy()) { | ||
EVT ObjectVT = getValueType(DL, Ty); | ||
- unsigned align = getArgumentAlignment(Callee, CS, Ty, paramCount + 1); | ||
+ unsigned align = | ||
+ getArgumentAlignment(Callee, CS, Ty, paramCount + 1, DL); | ||
// declare .param .align <align> .b8 .param<n>[<size>]; | ||
unsigned sz = DL.getTypeAllocSize(Ty); | ||
SDVTList DeclareParamVTs = DAG.getVTList(MVT::Other, MVT::Glue); | ||
@@ -1426,7 +1431,7 @@ | ||
DeclareRetOps); | ||
InFlag = Chain.getValue(1); | ||
} else { | ||
- retAlignment = getArgumentAlignment(Callee, CS, retTy, 0); | ||
+ retAlignment = getArgumentAlignment(Callee, CS, retTy, 0, DL); | ||
SDVTList DeclareRetVTs = DAG.getVTList(MVT::Other, MVT::Glue); | ||
SDValue DeclareRetOps[] = { Chain, | ||
DAG.getConstant(retAlignment, dl, MVT::i32), | ||
@@ -1633,9 +1638,10 @@ | ||
} else { | ||
SmallVector<EVT, 16> VTs; | ||
SmallVector<uint64_t, 16> Offsets; | ||
- ComputePTXValueVTs(*this, DAG.getDataLayout(), retTy, VTs, &Offsets, 0); | ||
+ auto &DL = DAG.getDataLayout(); | ||
+ ComputePTXValueVTs(*this, DL, retTy, VTs, &Offsets, 0); | ||
assert(VTs.size() == Ins.size() && "Bad value decomposition"); | ||
- unsigned RetAlign = getArgumentAlignment(Callee, CS, retTy, 0); | ||
+ unsigned RetAlign = getArgumentAlignment(Callee, CS, retTy, 0, DL); | ||
for (unsigned i = 0, e = Ins.size(); i != e; ++i) { | ||
unsigned sz = VTs[i].getSizeInBits(); | ||
unsigned AlignI = GreatestCommonDivisor64(RetAlign, Offsets[i]); |
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,13 @@ | ||
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
index 43d1b37..3efe3d6 100644 | ||
--- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
+++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp | ||
@@ -404,7 +404,7 @@ static ShadowMapping getShadowMapping(Triple &TargetTriple, int LongSize, | ||
if (IsKasan) | ||
Mapping.Offset = kLinuxKasan_ShadowOffset64; | ||
else | ||
- Mapping.Offset = kSmallX86_64ShadowOffset; | ||
+ Mapping.Offset = kDefaultShadowOffset64; | ||
} else if (IsWindows && IsX86_64) { | ||
Mapping.Offset = kWindowsShadowOffset64; | ||
} else if (IsMIPS64) |
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
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