Skip to content

Commit 1a2c1b3

Browse files
author
iclsrc
committed
Merge from 'main' to 'sycl-web' (3 commits)
CONFLICT (content): Merge conflict in llvm/lib/Transforms/IPO/PassManagerBuilder.cpp CONFLICT (content): Merge conflict in llvm/lib/Passes/PassBuilderPipelines.cpp
2 parents 71d12fb + cbcf123 commit 1a2c1b3

File tree

6 files changed

+145
-169
lines changed

6 files changed

+145
-169
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
#include "llvm/Transforms/Scalar/GVN.h"
9090
#include "llvm/Transforms/Scalar/JumpThreading.h"
9191
#include "llvm/Transforms/Scalar/LowerMatrixIntrinsics.h"
92-
#include "llvm/Transforms/Scalar/NewGVN.h"
9392
#include "llvm/Transforms/Utils.h"
9493
#include "llvm/Transforms/Utils/CanonicalizeAliases.h"
9594
#include "llvm/Transforms/Utils/Debugify.h"
@@ -107,7 +106,6 @@ using namespace llvm;
107106

108107
namespace llvm {
109108
extern cl::opt<bool> DebugInfoCorrelate;
110-
extern cl::opt<bool> RunNewGVN;
111109

112110
// Experiment to move sanitizers earlier.
113111
static cl::opt<bool> ClSanitizeOnOptimizerEarlyEP(
@@ -682,10 +680,7 @@ static void addSanitizers(const Triple &TargetTriple,
682680
FPM.addPass(EarlyCSEPass(true /* Enable mem-ssa. */));
683681
FPM.addPass(InstCombinePass());
684682
FPM.addPass(JumpThreadingPass());
685-
if (RunNewGVN)
686-
FPM.addPass(NewGVNPass());
687-
else
688-
FPM.addPass(GVNPass());
683+
FPM.addPass(GVNPass());
689684
FPM.addPass(InstCombinePass());
690685
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
691686
}

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 100 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ static cl::opt<InliningAdvisorMode> UseInlineAdvisor(
134134
"enable-ml-inliner", cl::init(InliningAdvisorMode::Default), cl::Hidden,
135135
cl::desc("Enable ML policy for inliner. Currently trained for -Oz only"),
136136
cl::values(clEnumValN(InliningAdvisorMode::Default, "default",
137-
"Heuristics-based inliner version."),
137+
"Heuristics-based inliner version"),
138138
clEnumValN(InliningAdvisorMode::Development, "development",
139-
"Use development mode (runtime-loadable model)."),
139+
"Use development mode (runtime-loadable model)"),
140140
clEnumValN(InliningAdvisorMode::Release, "release",
141-
"Use release mode (AOT-compiled model).")));
141+
"Use release mode (AOT-compiled model)")));
142142

143143
static cl::opt<bool> EnableSyntheticCounts(
144144
"enable-npm-synthetic-counts", cl::Hidden,
@@ -161,7 +161,7 @@ static cl::opt<bool> EnableModuleInliner("enable-module-inliner",
161161
static cl::opt<bool> PerformMandatoryInliningsFirst(
162162
"mandatory-inlining-first", cl::init(true), cl::Hidden,
163163
cl::desc("Perform mandatory inlinings module-wide, before performing "
164-
"inlining."));
164+
"inlining"));
165165

166166
static cl::opt<bool> EnableO3NonTrivialUnswitching(
167167
"enable-npm-O3-nontrivial-unswitch", cl::init(true), cl::Hidden,
@@ -190,6 +190,99 @@ static cl::opt<bool> EnableGlobalAnalyses(
190190
"enable-global-analyses", cl::init(true), cl::Hidden,
191191
cl::desc("Enable inter-procedural analyses"));
192192

193+
static cl::opt<bool>
194+
RunPartialInlining("enable-partial-inlining", cl::init(false), cl::Hidden,
195+
cl::desc("Run Partial inlinining pass"));
196+
197+
static cl::opt<bool> ExtraVectorizerPasses(
198+
"extra-vectorizer-passes", cl::init(false), cl::Hidden,
199+
cl::desc("Run cleanup optimization passes after vectorization"));
200+
201+
static cl::opt<bool> RunNewGVN("enable-newgvn", cl::init(false), cl::Hidden,
202+
cl::desc("Run the NewGVN pass"));
203+
204+
static cl::opt<bool> EnableLoopInterchange(
205+
"enable-loopinterchange", cl::init(false), cl::Hidden,
206+
cl::desc("Enable the experimental LoopInterchange Pass"));
207+
208+
static cl::opt<bool> EnableUnrollAndJam("enable-unroll-and-jam",
209+
cl::init(false), cl::Hidden,
210+
cl::desc("Enable Unroll And Jam Pass"));
211+
212+
static cl::opt<bool> EnableLoopFlatten("enable-loop-flatten", cl::init(false),
213+
cl::Hidden,
214+
cl::desc("Enable the LoopFlatten Pass"));
215+
216+
static cl::opt<bool>
217+
EnableDFAJumpThreading("enable-dfa-jump-thread",
218+
cl::desc("Enable DFA jump threading"),
219+
cl::init(false), cl::Hidden);
220+
221+
static cl::opt<bool>
222+
EnableHotColdSplit("hot-cold-split",
223+
cl::desc("Enable hot-cold splitting pass"));
224+
225+
static cl::opt<bool> EnableIROutliner("ir-outliner", cl::init(false),
226+
cl::Hidden,
227+
cl::desc("Enable ir outliner pass"));
228+
229+
static cl::opt<bool>
230+
DisablePreInliner("disable-preinline", cl::init(false), cl::Hidden,
231+
cl::desc("Disable pre-instrumentation inliner"));
232+
233+
static cl::opt<int> PreInlineThreshold(
234+
"preinline-threshold", cl::Hidden, cl::init(75),
235+
cl::desc("Control the amount of inlining in pre-instrumentation inliner "
236+
"(default = 75)"));
237+
238+
static cl::opt<bool>
239+
EnableGVNHoist("enable-gvn-hoist",
240+
cl::desc("Enable the GVN hoisting pass (default = off)"));
241+
242+
static cl::opt<bool>
243+
EnableGVNSink("enable-gvn-sink",
244+
cl::desc("Enable the GVN sinking pass (default = off)"));
245+
246+
// This option is used in simplifying testing SampleFDO optimizations for
247+
// profile loading.
248+
static cl::opt<bool>
249+
EnableCHR("enable-chr", cl::init(true), cl::Hidden,
250+
cl::desc("Enable control height reduction optimization (CHR)"));
251+
252+
static cl::opt<bool> FlattenedProfileUsed(
253+
"flattened-profile-used", cl::init(false), cl::Hidden,
254+
cl::desc("Indicate the sample profile being used is flattened, i.e., "
255+
"no inline hierachy exists in the profile"));
256+
257+
static cl::opt<bool> EnableOrderFileInstrumentation(
258+
"enable-order-file-instrumentation", cl::init(false), cl::Hidden,
259+
cl::desc("Enable order file instrumentation (default = off)"));
260+
261+
static cl::opt<bool>
262+
EnableMatrix("enable-matrix", cl::init(false), cl::Hidden,
263+
cl::desc("Enable lowering of the matrix intrinsics"));
264+
265+
static cl::opt<bool> EnableConstraintElimination(
266+
"enable-constraint-elimination", cl::init(false), cl::Hidden,
267+
cl::desc(
268+
"Enable pass to eliminate conditions based on linear constraints"));
269+
270+
static cl::opt<bool> EnableFunctionSpecialization(
271+
"enable-function-specialization", cl::init(false), cl::Hidden,
272+
cl::desc("Enable Function Specialization pass"));
273+
274+
static cl::opt<AttributorRunOption> AttributorRun(
275+
"attributor-enable", cl::Hidden, cl::init(AttributorRunOption::NONE),
276+
cl::desc("Enable the attributor inter-procedural deduction pass"),
277+
cl::values(clEnumValN(AttributorRunOption::ALL, "all",
278+
"enable all attributor runs"),
279+
clEnumValN(AttributorRunOption::MODULE, "module",
280+
"enable module-wide attributor runs"),
281+
clEnumValN(AttributorRunOption::CGSCC, "cgscc",
282+
"enable call graph SCC attributor runs"),
283+
clEnumValN(AttributorRunOption::NONE, "none",
284+
"disable attributor runs")));
285+
193286
PipelineTuningOptions::PipelineTuningOptions() {
194287
LoopInterleaving = true;
195288
LoopVectorization = true;
@@ -206,29 +299,15 @@ PipelineTuningOptions::PipelineTuningOptions() {
206299

207300
namespace llvm {
208301
extern cl::opt<unsigned> MaxDevirtIterations;
209-
extern cl::opt<bool> EnableConstraintElimination;
210-
extern cl::opt<bool> EnableFunctionSpecialization;
211-
extern cl::opt<bool> EnableGVNHoist;
212-
extern cl::opt<bool> EnableGVNSink;
213-
extern cl::opt<bool> EnableHotColdSplit;
214-
extern cl::opt<bool> EnableIROutliner;
215-
extern cl::opt<bool> EnableOrderFileInstrumentation;
216-
extern cl::opt<bool> EnableCHR;
217-
extern cl::opt<bool> EnableLoopInterchange;
218-
extern cl::opt<bool> EnableUnrollAndJam;
219-
extern cl::opt<bool> EnableLoopFlatten;
220-
extern cl::opt<bool> EnableDFAJumpThreading;
221-
extern cl::opt<bool> RunNewGVN;
222-
extern cl::opt<bool> RunPartialInlining;
223-
extern cl::opt<bool> ExtraVectorizerPasses;
224-
extern cl::opt<bool> FlattenedProfileUsed;
225-
extern cl::opt<AttributorRunOption> AttributorRun;
226302
extern cl::opt<bool> EnableKnowledgeRetention;
303+
<<<<<<< HEAD
227304
extern cl::opt<bool> EnableMatrix;
228305
extern cl::opt<bool> DisablePreInliner;
229306
extern cl::opt<int> PreInlineThreshold;
230307

231308
extern cl::opt<bool> SYCLOptimizationMode;
309+
=======
310+
>>>>>>> cbcf123af293ee56876cce16dac83c3008478dae
232311
} // namespace llvm
233312

234313
void PassBuilder::invokePeepholeEPCallbacks(FunctionPassManager &FPM,

llvm/lib/Target/RISCV/RISCVInstrInfoZb.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ def : Pat<(i32 (or (zexti16 GPR:$rs1), (shl GPR:$rs2, (i32 16)))),
648648
(PACK GPR:$rs1, GPR:$rs2)>;
649649

650650
let Predicates = [HasStdExtZbkb, IsRV64] in {
651-
def : Pat<(i64 (or (and GPR:$rs1, 0x00000000FFFFFFFF), (shl GPR:$rs2, (i64 32)))),
651+
def : Pat<(i64 (or (zexti32 GPR:$rs1), (shl GPR:$rs2, (i64 32)))),
652652
(PACK GPR:$rs1, GPR:$rs2)>;
653653

654654
def : Pat<(binop_allwusers<or> (shl GPR:$rs2, (i64 16)),

0 commit comments

Comments
 (0)