Skip to content

Commit d8f3202

Browse files
authored
merge main into amd-staging (#540)
2 parents e736c5c + 32f9cce commit d8f3202

File tree

10 files changed

+11
-22
lines changed

10 files changed

+11
-22
lines changed

clang/lib/Analysis/LifetimeSafety/Facts.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ llvm::StringMap<ProgramPoint> FactManager::getTestPoints() const {
6868
for (const Fact *F : BlockFacts) {
6969
if (const auto *TPF = F->getAs<TestPointFact>()) {
7070
StringRef PointName = TPF->getAnnotation();
71-
assert(AnnotationToPointMap.find(PointName) ==
72-
AnnotationToPointMap.end() &&
71+
assert(!AnnotationToPointMap.contains(PointName) &&
7372
"more than one test points with the same name");
7473
AnnotationToPointMap[PointName] = F;
7574
}

compiler-rt/test/lit.common.cfg.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,16 @@ def push_dynamic_library_lookup_path(config, new_path):
113113
config.environment[dynamic_library_lookup_var] = new_ld_library_path_64
114114

115115

116-
# TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites.
117-
# See https://github.com/llvm/llvm-project/issues/106636 for more details.
118-
#
119116
# Choose between lit's internal shell pipeline runner and a real shell. If
120117
# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
121118
use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
122119
if use_lit_shell:
123120
# 0 is external, "" is default, and everything else is internal.
124121
execute_external = use_lit_shell == "0"
125122
else:
126-
# Otherwise we default to internal everywhere.
127-
execute_external = False
123+
# Otherwise we default to internal on Windows and external elsewhere, as
124+
# bash on Windows is usually very slow.
125+
execute_external = not sys.platform in ["win32"]
128126

129127
# Allow expanding substitutions that are based on other substitutions
130128
config.recursiveExpansionLimit = 10

llvm/include/llvm/CodeGen/TargetInstrInfo.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,10 @@ class LLVM_ABI TargetInstrInfo : public MCInstrInfo {
436436
/// MachineSink determines on its own whether the instruction is safe to sink;
437437
/// this gives the target a hook to override the default behavior with regards
438438
/// to which instructions should be sunk.
439+
///
440+
/// shouldPostRASink() is used by PostRAMachineSink.
439441
virtual bool shouldSink(const MachineInstr &MI) const { return true; }
442+
virtual bool shouldPostRASink(const MachineInstr &MI) const { return true; }
440443

441444
/// Return false if the instruction should not be hoisted by MachineLICM.
442445
///

llvm/lib/CodeGen/MachineSink.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,6 +2287,10 @@ bool PostRAMachineSinkingImpl::tryToSinkCopy(MachineBasicBlock &CurBB,
22872287
continue;
22882288
}
22892289

2290+
// Don't postRASink instructions that the target prefers not to sink.
2291+
if (!TII->shouldPostRASink(MI))
2292+
continue;
2293+
22902294
if (MI.isDebugOrPseudoInstr())
22912295
continue;
22922296

llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ Expected<ExecutorAddr> SimpleExecutorMemoryManager::reserve(uint64_t Size) {
3636

3737
Expected<ExecutorAddr>
3838
SimpleExecutorMemoryManager::initialize(tpctypes::FinalizeRequest &FR) {
39-
std::vector<shared::WrapperFunctionCall> DeallocationActions;
40-
4139
if (FR.Segments.empty()) {
4240
if (FR.Actions.empty())
4341
return make_error<StringError>("Finalization request is empty",

llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5421,8 +5421,6 @@ combineUnpackingMovIntoLoad(SDNode *N, TargetLowering::DAGCombinerInfo &DCI) {
54215421
if (!NVPTX::isPackedVectorTy(ElementVT) || ElementVT == MVT::v4i8)
54225422
return SDValue();
54235423

5424-
SmallVector<SDNode *> DeadCopyToRegs;
5425-
54265424
// Check whether all outputs are either used by an extractelt or are
54275425
// glue/chain nodes
54285426
if (!all_of(N->uses(), [&](SDUse &U) {

llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,6 @@ PreservedAnalyses LoopIdiomRecognizePass::run(Loop &L, LoopAnalysisManager &AM,
303303
// but ORE cannot be preserved (see comment before the pass definition).
304304
OptimizationRemarkEmitter ORE(L.getHeader()->getParent());
305305

306-
std::optional<PolynomialInfo> HR;
307-
308306
LoopIdiomRecognize LIR(&AR.AA, &AR.DT, &AR.LI, &AR.SE, &AR.TLI, &AR.TTI,
309307
AR.MSSA, DL, ORE);
310308
if (!LIR.runOnLoop(&L))

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21222,7 +21222,6 @@ BoUpSLP::BlockScheduling::tryScheduleBundle(ArrayRef<Value *> VL, BoUpSLP *SLP,
2122221222
}
2122321223
ScheduledBundlesList.pop_back();
2122421224
SmallVector<ScheduleData *> ControlDependentMembers;
21225-
SmallPtrSet<Instruction *, 4> Visited;
2122621225
for (Value *V : VL) {
2122721226
if (S.isNonSchedulable(V))
2122821227
continue;

llvm/lib/Transforms/Vectorize/VPlan.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@
5252
using namespace llvm;
5353
using namespace llvm::VPlanPatternMatch;
5454

55-
namespace llvm {
56-
extern cl::opt<bool> EnableVPlanNativePath;
57-
}
58-
5955
/// @{
6056
/// Metadata attribute names
6157
const char LLVMLoopVectorizeFollowupAll[] = "llvm.loop.vectorize.followup_all";

offload/include/omptarget.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ enum TargetAllocTy : int32_t {
107107
TARGET_ALLOC_DEFAULT,
108108
};
109109

110-
inline KernelArgsTy CTorDTorKernelArgs = {
111-
1, 0, nullptr, nullptr, nullptr, nullptr, nullptr,
112-
nullptr, 0, {0, 0, 0}, {1, 0, 0}, {1, 0, 0}, 0};
113-
114110
struct DeviceTy;
115111

116112
/// The libomptarget wrapper around a __tgt_async_info object directly

0 commit comments

Comments
 (0)