summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorPavel Vinogradov2019-09-20 15:00:32 -0400
committerPavel Vinogradov2019-09-20 15:14:58 -0400
commitfad5c97232179ae666c8adfd856714f056f13363 (patch)
treebc92a49b5ed55e8d03fb0f98a41eafeaf633cb16 /devel
parent5cf903e2d3f749cccd84b17a4c3d584963554199 (diff)
devel/llvm: reenabled and updated PIC patches for 9.0.0
Diffstat (limited to 'devel')
-rw-r--r--devel/llvm/0001-fix-compile-error.patch102
-rw-r--r--devel/llvm/HISTORY3
-rwxr-xr-xdevel/llvm/PRE_BUILD8
3 files changed, 55 insertions, 58 deletions
diff --git a/devel/llvm/0001-fix-compile-error.patch b/devel/llvm/0001-fix-compile-error.patch
index 50349a5a24..c6cafe21b9 100644
--- a/devel/llvm/0001-fix-compile-error.patch
+++ b/devel/llvm/0001-fix-compile-error.patch
@@ -54,55 +54,49 @@ diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index 37b9c4b..19742d2 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
-@@ -348,7 +348,7 @@
- for (BasicBlock *ExitBlock : ExitBlocks)
- InsertPts.push_back(&*ExitBlock->getFirstInsertionPt());
+@@ -416,7 +416,7 @@
+ MSSAInsertPts.push_back(nullptr);
+ }
- PredIteratorCache PIC;
+ PredIteratorCache pic;
bool Promoted = false;
-@@ -371,7 +371,7 @@
- PointerMustAliases.insert(ASI.getValue());
+@@ -442,7 +442,7 @@
+ PointerMustAliases.insert(ASI.getValue());
- Promoted |= promoteLoopAccessesToScalars(
-- PointerMustAliases, ExitBlocks, InsertPts, PIC, LI, DT, TLI, L,
-+ PointerMustAliases, ExitBlocks, InsertPts, pic, LI, DT, TLI, L,
- CurAST.get(), &SafetyInfo, ORE);
- }
+ Promoted |= promoteLoopAccessesToScalars(
+- PointerMustAliases, ExitBlocks, InsertPts, MSSAInsertPts, PIC, LI,
++ PointerMustAliases, ExitBlocks, InsertPts, MSSAInsertPts, pic, LI,
+ DT, TLI, L, CurAST.get(), MSSAU.get(), &SafetyInfo, ORE);
}
-@@ -1639,12 +1639,12 @@
- LoopPromoter(Value *SP, ArrayRef<const Instruction *> Insts, SSAUpdater &S,
+
+@@ -1749,7 +1749,7 @@
const SmallSetVector<Value *, 8> &PMA,
SmallVectorImpl<BasicBlock *> &LEB,
-- SmallVectorImpl<Instruction *> &LIP, PredIteratorCache &PIC,
-+ SmallVectorImpl<Instruction *> &LIP, PredIteratorCache &pic,
- AliasSetTracker &ast, LoopInfo &li, DebugLoc dl, int alignment,
- bool UnorderedAtomic, const AAMDNodes &AATags,
- ICFLoopSafetyInfo &SafetyInfo)
- : LoadAndStorePromoter(Insts, S), SomePtr(SP), PointerMustAliases(PMA),
-- LoopExitBlocks(LEB), LoopInsertPts(LIP), PredCache(PIC), AST(ast),
-+ LoopExitBlocks(LEB), LoopInsertPts(LIP), PredCache(pic), AST(ast),
- LI(li), DL(std::move(dl)), Alignment(alignment),
- UnorderedAtomic(UnorderedAtomic), AATags(AATags), SafetyInfo(SafetyInfo)
- {}
-@@ -1723,7 +1723,7 @@
- bool llvm::promoteLoopAccessesToScalars(
+ SmallVectorImpl<Instruction *> &LIP,
+- SmallVectorImpl<MemoryAccess *> &MSSAIP, PredIteratorCache &PIC,
++ SmallVectorImpl<MemoryAccess *> &MSSAIP, PredIteratorCache &pic,
+ AliasSetTracker &ast, MemorySSAUpdater *MSSAU, LoopInfo &li,
+ DebugLoc dl, int alignment, bool UnorderedAtomic,
+ const AAMDNodes &AATags, ICFLoopSafetyInfo &SafetyInfo)
+@@ -1851,7 +1851,7 @@
const SmallSetVector<Value *, 8> &PointerMustAliases,
SmallVectorImpl<BasicBlock *> &ExitBlocks,
-- SmallVectorImpl<Instruction *> &InsertPts, PredIteratorCache &PIC,
-+ SmallVectorImpl<Instruction *> &InsertPts, PredIteratorCache &pic,
+ SmallVectorImpl<Instruction *> &InsertPts,
+- SmallVectorImpl<MemoryAccess *> &MSSAInsertPts, PredIteratorCache &PIC,
++ SmallVectorImpl<MemoryAccess *> &MSSAInsertPts, PredIteratorCache &pic,
LoopInfo *LI, DominatorTree *DT, const TargetLibraryInfo *TLI,
- Loop *CurLoop, AliasSetTracker *CurAST, ICFLoopSafetyInfo *SafetyInfo,
- OptimizationRemarkEmitter *ORE) {
-@@ -1943,7 +1943,7 @@
+ Loop *CurLoop, AliasSetTracker *CurAST, MemorySSAUpdater *MSSAU,
+ ICFLoopSafetyInfo *SafetyInfo, OptimizationRemarkEmitter *ORE) {
+@@ -2091,7 +2091,7 @@
SmallVector<PHINode *, 16> NewPHIs;
SSAUpdater SSA(&NewPHIs);
LoopPromoter Promoter(SomePtr, LoopUses, SSA, PointerMustAliases, ExitBlocks,
-- InsertPts, PIC, *CurAST, *LI, DL, Alignment,
-+ InsertPts, pic, *CurAST, *LI, DL, Alignment,
- SawUnorderedAtomic, AATags, *SafetyInfo);
+- InsertPts, MSSAInsertPts, PIC, *CurAST, MSSAU, *LI, DL,
++ InsertPts, MSSAInsertPts, pic, *CurAST, MSSAU, *LI, DL,
+ Alignment, SawUnorderedAtomic, AATags, *SafetyInfo);
// Set up the preheader to have a definition of the value. It is the live-out
diff --git a/lib/Transforms/Utils/PredicateInfo.cpp b/lib/Transforms/Utils/PredicateInfo.cpp
@@ -202,30 +196,30 @@ diff --git a/lib/IR/PassTimingInfo.cpp b/lib/IR/PassTimingInfo.cpp
diff -git a/include/llvm/Passes/PassBuilder.h b/include/llvm/Passes/PassBuilder.h
--- a/include/llvm/Passes/PassBuilder.h
+++ bc/include/llvm/Passes/PassBuilder.h
-@@ -63,7 +63,7 @@
- class PassBuilder {
+@@ -111,7 +111,7 @@
TargetMachine *TM;
+ PipelineTuningOptions PTO;
Optional<PGOOptions> PGOOpt;
- PassInstrumentationCallbacks *PIC;
+ PassInstrumentationCallbacks *pic;
public:
/// A struct to capture parsed pass pipeline names.
-@@ -179,8 +179,8 @@
-
+@@ -228,8 +228,8 @@
explicit PassBuilder(TargetMachine *TM = nullptr,
+ PipelineTuningOptions PTO = PipelineTuningOptions(),
Optional<PGOOptions> PGOOpt = None,
- PassInstrumentationCallbacks *PIC = nullptr)
-- : TM(TM), PGOOpt(PGOOpt), PIC(PIC) {}
+- : TM(TM), PTO(PTO), PGOOpt(PGOOpt), PIC(PIC) {}
+ PassInstrumentationCallbacks *pic = nullptr)
-+ : TM(TM), PGOOpt(PGOOpt), pic(pic) {}
++ : TM(TM), PTO(PTO), PGOOpt(PGOOpt), pic(pic) {}
/// Cross register the analysis managers through their proxies.
///
diff --git a/include/llvm/Passes/StandardInstrumentations.h b/include/llvm/Passes/StandardInstrumentations.h
--- a/include/llvm/Passes/StandardInstrumentations.h
+++ b/include/llvm/Passes/StandardInstrumentations.h
-@@ -36,7 +36,7 @@
+@@ -35,7 +35,7 @@
PrintIRInstrumentation() = default;
~PrintIRInstrumentation();
@@ -234,28 +228,28 @@ diff --git a/include/llvm/Passes/StandardInstrumentations.h b/include/llvm/Passe
private:
bool printBeforePass(StringRef PassID, Any IR);
-@@ -63,7 +63,7 @@
+@@ -62,7 +62,7 @@
public:
StandardInstrumentations() = default;
- void registerCallbacks(PassInstrumentationCallbacks &PIC);
+ void registerCallbacks(PassInstrumentationCallbacks &pic);
- };
- } // namespace llvm
+ TimePassesHandler &getTimePasses() { return TimePasses; }
+ };
diff --git a/lib/Passes/PassRegistry.def b/lib/Passes/PassRegistry.def
--- a/lib/Passes/PassRegistry.def
+++ b/lib/Passes/PassRegistry.def
-@@ -27,7 +27,7 @@
+@@ -26,7 +26,7 @@
MODULE_ANALYSIS("stack-safety", StackSafetyGlobalAnalysis())
MODULE_ANALYSIS("targetlibinfo", TargetLibraryAnalysis())
MODULE_ANALYSIS("verify", VerifierAnalysis())
-MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(PIC))
+MODULE_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis(pic))
+ MODULE_ANALYSIS("asan-globals-md", ASanGlobalsMetadataAnalysis())
#ifndef MODULE_ALIAS_ANALYSIS
- #define MODULE_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
-@@ -89,7 +89,7 @@
+@@ -96,7 +96,7 @@
#endif
CGSCC_ANALYSIS("no-op-cgscc", NoOpCGSCCAnalysis())
CGSCC_ANALYSIS("fam-proxy", FunctionAnalysisManagerCGSCCProxy())
@@ -264,7 +258,7 @@ diff --git a/lib/Passes/PassRegistry.def b/lib/Passes/PassRegistry.def
#undef CGSCC_ANALYSIS
#ifndef CGSCC_PASS
-@@ -128,7 +128,7 @@
+@@ -135,7 +135,7 @@
FUNCTION_ANALYSIS("targetir",
TM ? TM->getTargetIRAnalysis() : TargetIRAnalysis())
FUNCTION_ANALYSIS("verify", VerifierAnalysis())
@@ -273,7 +267,7 @@ diff --git a/lib/Passes/PassRegistry.def b/lib/Passes/PassRegistry.def
#ifndef FUNCTION_ALIAS_ANALYSIS
#define FUNCTION_ALIAS_ANALYSIS(NAME, CREATE_PASS) \
-@@ -249,7 +249,7 @@
+@@ -278,7 +278,7 @@
LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
LOOP_ANALYSIS("access-info", LoopAccessAnalysis())
LOOP_ANALYSIS("ivusers", IVUsersAnalysis())
@@ -320,18 +314,18 @@ diff --git a/lib/Passes/StandardInstrumentations.cpp b/lib/Passes/StandardInstru
diff --git a/tools/opt/NewPMDriver.cpp b/tools/opt/NewPMDriver.cpp
--- a/tools/opt/NewPMDriver.cpp
+++ b/tools/opt/NewPMDriver.cpp
-@@ -245,11 +245,11 @@
- else
- P = None;
- }
+@@ -257,11 +257,11 @@
+ P->CSAction = PGOOptions::CSIRUse;
+ }
+ }
- PassInstrumentationCallbacks PIC;
+ PassInstrumentationCallbacks pic;
StandardInstrumentations SI;
- SI.registerCallbacks(PIC);
+ SI.registerCallbacks(pic);
-- PassBuilder PB(TM, P, &PIC);
-+ PassBuilder PB(TM, P, &pic);
+- PassBuilder PB(TM, PipelineTuningOptions(), P, &PIC);
++ PassBuilder PB(TM, PipelineTuningOptions(), P, &pic);
registerEPCallbacks(PB, VerifyEachPass, DebugPM);
// Load requested pass plugins and let them register pass builder callbacks
diff --git a/devel/llvm/HISTORY b/devel/llvm/HISTORY
index fc576c9d37..cca9c53322 100644
--- a/devel/llvm/HISTORY
+++ b/devel/llvm/HISTORY
@@ -1,3 +1,6 @@
+2019-09-20 Pavel Vinogradov <public@sourcemage.org>
+ * PRE_BUILD, 0001-fix-compile-error*.patch: reenabled and updated
+
2019-09-19 Treeve Jelbert <treeve@sourcemage.org>
* DETAILS: version 9.0.0
fix url
diff --git a/devel/llvm/PRE_BUILD b/devel/llvm/PRE_BUILD
index dc359fee79..7dfd7cc2b3 100755
--- a/devel/llvm/PRE_BUILD
+++ b/devel/llvm/PRE_BUILD
@@ -12,8 +12,8 @@ if [[ "$LLVM_WITH_CLANG" == y ]]; then
sedit '/^ *set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE/s/TRUE/FALSE/' \
projects/compiler-rt/cmake/config-ix.cmake
;;
- esac
-# patch -p1 < "${SPELL_DIRECTORY}/0001-fix-compile-error-clang.patch"
+ esac &&
+ patch -p1 < "${SPELL_DIRECTORY}/0001-fix-compile-error-clang.patch"
# cd ${SOURCE_DIRECTORY}/tools/clang &&
# patch -p1 < $SPELL_DIRECTORY/0001-fix-scan-view-s-module-search-path.patch &&
# sedit '
@@ -46,6 +46,6 @@ if spell_ok libffi;then
fi &&
# do not build all backends
-sed -i "/^set.*all\"$/s/all//" CMakeLists.txt
+sed -i "/^set.*all\"$/s/all//" CMakeLists.txt &&
-#patch -p1 < "${SPELL_DIRECTORY}/0001-fix-compile-error.patch"
+patch -p1 < "${SPELL_DIRECTORY}/0001-fix-compile-error.patch"