} else if (auto GEP = dyn_cast<GetElementPtrInst>(User)) {
// Take into account the GEP offset.
if (VPtr == GEP->getPointerOperand() && GEP->hasAllConstantIndices()) {
- SmallVector<Value *, 8> Indices(GEP->op_begin() + 1, GEP->op_end());
+ SmallVector<Value *, 8> Indices(drop_begin(GEP->operands()));
int64_t GEPOffset = M->getDataLayout().getIndexedOffsetInType(
GEP->getSourceElementType(), Indices);
findLoadCallsAtConstantOffset(M, DevirtCalls, User, Offset + GEPOffset,
visitCallStackMetadata(StackMD);
// Check that remaining operands are MDString.
- Check(std::all_of(MIB->op_begin() + 1, MIB->op_end(),
- [](const MDOperand &Op) { return isa<MDString>(Op); }),
+ Check(llvm::all_of(llvm::drop_begin(MIB->operands()),
+ [](const MDOperand &Op) { return isa<MDString>(Op); }),
"Not all !memprof MemInfoBlock operands 1 to N are MDString", MIB);
}
}
#include "SPIRVTargetMachine.h"
#include "SPIRVUtils.h"
#include "TargetInfo/SPIRVTargetInfo.h"
+#include "llvm/ADT/STLExtras.h"
#include "llvm/CodeGen/MachineModuleInfo.h"
#include "llvm/CodeGen/TargetPassConfig.h"
// If there are no capabilities, or we can't satisfy the version or
// capability requirements, use the list of extensions (if the subtarget
// can handle them all).
- if (std::all_of(ReqExts.begin(), ReqExts.end(),
- [&ST](const SPIRV::Extension::Extension &Ext) {
- return ST.canUseExtension(Ext);
- })) {
+ if (llvm::all_of(ReqExts, [&ST](const SPIRV::Extension::Extension &Ext) {
return {true, {}, ReqExts, 0, 0}; // TODO: add versions to extensions.
}
return {false, {}, {}, 0, 0};