[polly] 55cfb1f - [Polly] Fix build after IRBuilder changes
Michael Kruse via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 17 13:57:59 PST 2020
Thank you.
Michael
Am Mo., 17. Feb. 2020 um 12:03 Uhr schrieb Nikita Popov via
llvm-commits <llvm-commits at lists.llvm.org>:
>
>
> Author: Nikita Popov
> Date: 2020-02-17T19:02:50+01:00
> New Revision: 55cfb1fb501d0f72518062b6655d4a788258c9f7
>
> URL: https://github.com/llvm/llvm-project/commit/55cfb1fb501d0f72518062b6655d4a788258c9f7
> DIFF: https://github.com/llvm/llvm-project/commit/55cfb1fb501d0f72518062b6655d4a788258c9f7.diff
>
> LOG: [Polly] Fix build after IRBuilder changes
>
> Simply dropping the createPollyIRBuilder() function here, because
> it doesn't do much. Also directly initialize Expander in
> ScopExpander instead of going through the copy-constructor.
>
> Added:
>
>
> Modified:
> polly/include/polly/CodeGen/IRBuilder.h
> polly/lib/CodeGen/CodeGeneration.cpp
> polly/lib/CodeGen/PPCGCodeGeneration.cpp
> polly/lib/Support/ScopHelper.cpp
>
> Removed:
>
>
>
> ################################################################################
> diff --git a/polly/include/polly/CodeGen/IRBuilder.h b/polly/include/polly/CodeGen/IRBuilder.h
> index 8033ffafb7de..8aeef3856a07 100644
> --- a/polly/include/polly/CodeGen/IRBuilder.h
> +++ b/polly/include/polly/CodeGen/IRBuilder.h
> @@ -155,13 +155,5 @@ class IRInserter : protected llvm::IRBuilderDefaultInserter {
> // matches for certain names.
> typedef llvm::IRBuilder<llvm::ConstantFolder, IRInserter> PollyIRBuilder;
>
> -/// Return an IR builder pointed before the @p BB terminator.
> -static inline PollyIRBuilder createPollyIRBuilder(llvm::BasicBlock *BB,
> - ScopAnnotator &LA) {
> - PollyIRBuilder Builder(BB->getContext(), llvm::ConstantFolder(),
> - polly::IRInserter(LA));
> - Builder.SetInsertPoint(BB->getTerminator());
> - return Builder;
> -}
> } // namespace polly
> #endif
>
> diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
> index 671372d36bf4..01c64ee3c101 100644
> --- a/polly/lib/CodeGen/CodeGeneration.cpp
> +++ b/polly/lib/CodeGen/CodeGeneration.cpp
> @@ -207,7 +207,9 @@ static bool CodeGen(Scop &S, IslAstInfo &AI, LoopInfo &LI, DominatorTree &DT,
> assert(R->isSimple());
> BasicBlock *EnteringBB = S.getEnteringBlock();
> assert(EnteringBB);
> - PollyIRBuilder Builder = createPollyIRBuilder(EnteringBB, Annotator);
> + PollyIRBuilder Builder(EnteringBB->getContext(), ConstantFolder(),
> + IRInserter(Annotator));
> + Builder.SetInsertPoint(EnteringBB->getTerminator());
>
> // Only build the run-time condition and parameters _after_ having
> // introduced the conditional branch. This is important as the conditional
>
> diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
> index db5546906703..bd92c7e705c9 100644
> --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
> +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
> @@ -3452,7 +3452,9 @@ class PPCGCodeGeneration : public ScopPass {
>
> BasicBlock *EnteringBB = R->getEnteringBlock();
>
> - PollyIRBuilder Builder = createPollyIRBuilder(EnteringBB, Annotator);
> + PollyIRBuilder Builder(EnteringBB->getContext(), ConstantFolder(),
> + IRInserter(Annotator));
> + Builder.SetInsertPoint(EnteringBB->getTerminator());
>
> // Only build the run-time condition and parameters _after_ having
> // introduced the conditional branch. This is important as the conditional
>
> diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp
> index d2a8f3884240..0b8d24939298 100644
> --- a/polly/lib/Support/ScopHelper.cpp
> +++ b/polly/lib/Support/ScopHelper.cpp
> @@ -243,7 +243,7 @@ struct ScopExpander : SCEVVisitor<ScopExpander, const SCEV *> {
> explicit ScopExpander(const Region &R, ScalarEvolution &SE,
> const DataLayout &DL, const char *Name, ValueMapT *VMap,
> BasicBlock *RTCBB)
> - : Expander(SCEVExpander(SE, DL, Name)), SE(SE), Name(Name), R(R),
> + : Expander(SE, DL, Name), SE(SE), Name(Name), R(R),
> VMap(VMap), RTCBB(RTCBB) {}
>
> Value *expandCodeFor(const SCEV *E, Type *Ty, Instruction *I) {
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list