#include <vector>
namespace llvm {
-
/// ArrayRef - Represent a constant reference to an array (0 or more elements
/// consecutively in memory), i.e. a start pointer and a length. It allows
/// various APIs to take consecutive elements easily and conveniently.
/// Construct an ArrayRef<const T*> from ArrayRef<T*>. This uses SFINAE to
/// ensure that only ArrayRefs of pointers can be converted.
template <typename U>
- ArrayRef(const ArrayRef<U *> &A,
- typename std::enable_if<
- std::is_convertible<U *const *, T const *>::value>::type* = 0)
+ ArrayRef(
+ const ArrayRef<U *> &A,
+ typename std::enable_if<
+ std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
: Data(A.data()), Length(A.size()) {}
/// Construct an ArrayRef<const T*> from a SmallVector<T*>. This is
/// templated in order to avoid instantiating SmallVectorTemplateCommon<T>
/// whenever we copy-construct an ArrayRef.
template<typename U, typename DummyT>
- /*implicit*/ ArrayRef(const SmallVectorTemplateCommon<U*, DummyT> &Vec,
- typename std::enable_if<
- std::is_convertible<U *const *,
- T const *>::value>::type* = 0)
+ /*implicit*/ ArrayRef(
+ const SmallVectorTemplateCommon<U *, DummyT> &Vec,
+ typename std::enable_if<
+ std::is_convertible<U *const *, T const *>::value>::type * = nullptr)
: Data(Vec.data()), Length(Vec.size()) {
}
template <typename T> hash_code hash_value(ArrayRef<T> S) {
return hash_combine_range(S.begin(), S.end());
}
-}
+} // end namespace llvm
-#endif
+#endif // LLVM_ADT_ARRAYREF_H
bool isPoisoned() const { return (reinterpret_cast<intptr_t>(mi) & 0x1) == 0x1; }
#endif // EXPENSIVE_CHECKS
-
};
template <>
SlotIndex getPrevIndex() const {
return SlotIndex(&*--listEntry()->getIterator(), getSlot());
}
-
};
template <> struct isPodLike<SlotIndex> { static const bool value = true; };
initializeSlotIndexesPass(*PassRegistry::getPassRegistry());
}
- ~SlotIndexes() {
+ ~SlotIndexes() override {
// The indexList's nodes are all allocated in the BumpPtrAllocator.
indexList.clearAndLeakNodesUnsafely();
}
indexList.erase(entry);
#endif
}
-
};
-
// Specialize IntervalMapInfo for half-open slot index intervals.
template <>
struct IntervalMapInfo<SlotIndex> : IntervalMapHalfOpenInfo<SlotIndex> {
};
-}
+} // end namespace llvm
#endif // LLVM_CODEGEN_SLOTINDEXES_H
}
private:
- virtual TypeIndex writeRecord(llvm::StringRef Data) override;
+ TypeIndex writeRecord(llvm::StringRef Data) override;
private:
std::vector<std::unique_ptr<Record>> Records;
std::unordered_map<llvm::StringRef, TypeIndex, RecordHash> HashedRecords;
};
-}
-}
-#endif
+} // end namespace codeview
+} // end namespace llvm
+
+#endif // LLVM_DEBUGINFO_CODEVIEW_MEMORYTYPETABLEBUILDER_H
return *this;
}
- ~RCMemoryManager() {
+ ~RCMemoryManager() override {
Client.destroyRemoteAllocator(Id);
DEBUG(dbgs() << "Destroyed remote allocator " << Id << "\n");
}
ResourceIdMgr::ResourceId Id)
: Remote(Remote), Id(Id) {}
- ~RCIndirectStubsManager() { Remote.destroyIndirectStubsManager(Id); }
+ ~RCIndirectStubsManager() override {
+ Remote.destroyIndirectStubsManager(Id);
+ }
std::error_code createStub(StringRef StubName, TargetAddress StubAddr,
JITSymbolFlags StubFlags) override {
}
private:
- void grow() {
+ void grow() override {
TargetAddress BlockAddr = 0;
uint32_t NumTrampolines = 0;
auto EC = Remote.emitTrampolineBlock(BlockAddr, NumTrampolines);
#undef DEBUG_TYPE
-#endif
+#endif // LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETCLIENT_H
-//=-- InstrProf.h - Instrumented profiling format support ---------*- C++ -*-=//
+//===-- InstrProf.h - Instrumented profiling format support -----*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_PROFILEDATA_INSTRPROF_H_
-#define LLVM_PROFILEDATA_INSTRPROF_H_
+#ifndef LLVM_PROFILEDATA_INSTRPROF_H
+#define LLVM_PROFILEDATA_INSTRPROF_H
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
/// Return the array of profiled values at \p Site.
inline std::unique_ptr<InstrProfValueData[]>
getValueForSite(uint32_t ValueKind, uint32_t Site,
- uint64_t (*ValueMapper)(uint32_t, uint64_t) = 0) const;
+ uint64_t (*ValueMapper)(uint32_t, uint64_t) = nullptr) const;
inline void
getValueForSite(InstrProfValueData Dest[], uint32_t ValueKind, uint32_t Site,
- uint64_t (*ValueMapper)(uint32_t, uint64_t) = 0) const;
+ uint64_t (*ValueMapper)(uint32_t, uint64_t) = nullptr) const;
/// Reserve space for NumValueSites sites.
inline void reserveSites(uint32_t ValueKind, uint32_t NumValueSites);
/// Add ValueData for ValueKind at value Site.
#include "llvm/ProfileData/InstrProfData.inc"
};
-} // end namespace RawInstrProf
+} // end namespace RawInstrProf
} // end namespace llvm
struct is_error_code_enum<llvm::instrprof_error> : std::true_type {};
}
-#endif // LLVM_PROFILEDATA_INSTRPROF_H_
+#endif // LLVM_PROFILEDATA_INSTRPROF_H
for (I = 0; I <= IPVK_Last; I++) {
uint16_t N = NumValueSites[I];
if (!N) {
- RuntimeRecord->SiteCountArray[I] = 0;
+ RuntimeRecord->SiteCountArray[I] = nullptr;
continue;
}
NumValueKinds++;
RuntimeRecord->SiteCountArray[I] = (uint8_t *)calloc(N, 1);
if (!RuntimeRecord->SiteCountArray[I])
return 1;
- RuntimeRecord->NodesKind[I] = Nodes ? &Nodes[S] : NULL;
+ RuntimeRecord->NodesKind[I] = Nodes ? &Nodes[S] : nullptr;
for (J = 0; J < N; J++) {
/* Compute value count for each site. */
uint32_t C = 0;
- ValueProfNode *Site = Nodes ? RuntimeRecord->NodesKind[I][J] : NULL;
+ ValueProfNode *Site = Nodes ? RuntimeRecord->NodesKind[I][J] : nullptr;
while (Site) {
C++;
Site = Site->Next;
uint32_t getNumValueDataRT(const void *R, uint32_t VK) {
unsigned I, S = 0;
const ValueProfRuntimeRecord *Record = (const ValueProfRuntimeRecord *)R;
- if (Record->SiteCountArray[VK] == 0)
+ if (Record->SiteCountArray[VK] == nullptr)
return 0;
for (I = 0; I < Record->NumValueSites[VK]; I++)
S += Record->SiteCountArray[VK][I];
return (ValueProfData *)calloc(TotalSizeInBytes, 1);
}
-static ValueProfRecordClosure RTRecordClosure = {0,
+static ValueProfRecordClosure RTRecordClosure = {nullptr,
getNumValueKindsRT,
getNumValueSitesRT,
getNumValueDataRT,
getNumValueDataForSiteRT,
- 0,
+ nullptr,
getValueForSiteRT,
allocValueProfDataRT};
return serializeValueProfDataFrom(&RTRecordClosure, DstData);
}
-
#undef INSTR_PROF_COMMON_API_IMPL
#endif /* INSTR_PROF_COMMON_API_IMPL */
/*============================================================================*/
-
#ifndef INSTR_PROF_DATA_DEFINED
-#ifndef INSTR_PROF_DATA_INC_
-#define INSTR_PROF_DATA_INC_
+#ifndef INSTR_PROF_DATA_INC
+#define INSTR_PROF_DATA_INC
/* Helper macros. */
#define INSTR_PROF_SIMPLE_QUOTE(x) #x
struct ValueProfNode *Next;
} ValueProfNode;
-#endif /* INSTR_PROF_DATA_INC_ */
+#endif /* INSTR_PROF_DATA_INC */
#else
#undef INSTR_PROF_DATA_DEFINED
#endif
T t;
private:
- AlignmentCalcImpl() {} // Never instantiate.
+ AlignmentCalcImpl() = delete;
};
// Abstract base class helper, this will have the minimal alignment and size
// of type T.
template <typename T>
struct AlignmentCalcImpl<T, true> : AlignmentCalcImplBase, T {
- virtual ~AlignmentCalcImpl() = 0;
+ ~AlignmentCalcImpl() override = 0;
};
} // End detail namespace.
class AlignerImpl {
T1 t1; T2 t2; T3 t3; T4 t4; T5 t5; T6 t6; T7 t7; T8 t8; T9 t9; T10 t10;
- AlignerImpl(); // Never defined or instantiated.
+ AlignerImpl() = delete;
};
template <typename T1,
T6, T7, T8, T9, T10>)> {
};
} // end namespace llvm
-#endif
+
+#endif // LLVM_SUPPORT_ALIGNOF_H
ErrorOr(E ErrorCode,
typename std::enable_if<std::is_error_code_enum<E>::value ||
std::is_error_condition_enum<E>::value,
- void *>::type = 0)
+ void *>::type = nullptr)
: HasError(true) {
new (getErrorStorage()) std::error_code(make_error_code(ErrorCode));
}
return const_cast<ErrorOr<T> *>(this)->getErrorStorage();
}
-
union {
AlignedCharArrayUnion<storage_type> TStorage;
AlignedCharArrayUnion<std::error_code> ErrorStorage;
}
} // end namespace llvm
-#endif
+#endif // LLVM_SUPPORT_ERROROR_H
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include <deque>
+
using namespace llvm;
namespace {
std::error_code initStreamFromBuffer();
std::error_code initLazyStream(std::unique_ptr<DataStreamer> Streamer);
};
-} // namespace
+} // end anonymous namespace
BitcodeDiagnosticInfo::BitcodeDiagnosticInfo(std::error_code EC,
DiagnosticSeverity Severity,
/// Provide fast operand accessors
DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value);
};
-}
+} // end anonymous namespace
// FIXME: can we inherit this from ConstantExpr?
template <>
public FixedNumOperandTraits<ConstantPlaceHolder, 1> {
};
DEFINE_TRANSPARENT_OPERAND_ACCESSORS(ConstantPlaceHolder, Value)
-}
+} // end namespace llvm
void BitcodeReaderValueList::assignValue(Value *V, unsigned Idx) {
if (Idx == size()) {
OldV->replaceAllUsesWith(V);
delete PrevVal;
}
-
- return;
}
-
Constant *BitcodeReaderValueList::getConstantFwdRef(unsigned Idx,
Type *Ty) {
if (Idx >= size())
return Ret;
}
-
//===----------------------------------------------------------------------===//
// Functions for parsing blocks from the bitcode file
//===----------------------------------------------------------------------===//
getMDOrNull(Record[9]), getMDOrNull(Record[10]),
getMDOrNull(Record[11]), getMDOrNull(Record[12]),
getMDOrNull(Record[13]),
- Record.size() <= 15 ? 0 : getMDOrNull(Record[15]),
+ Record.size() <= 15 ? nullptr : getMDOrNull(Record[15]),
Record.size() <= 14 ? 0 : Record[14]),
NextMetadataNo++);
break;
}
break;
}
-
case bitc::CST_CODE_CE_BINOP: { // CE_BINOP: [opcode, opval, opval]
if (Record.size() < 3)
return error("Invalid record");
break;
}
-
// Read a record.
auto BitCode = Stream.readRecord(Entry.ID, Record);
switch (BitCode) {
llvm_unreachable("Unknown error type!");
}
};
-}
+} // end anonymous namespace
static ManagedStatic<BitcodeErrorCategoryType> ErrorCategory;
llvm_unreachable("A value of instrprof_error has no message.");
}
};
-}
+} // end anonymous namespace
static ManagedStatic<InstrProfErrorCategoryType> ErrorCategory;
}
static ValueProfRecordClosure InstrProfRecordClosure = {
- 0,
+ nullptr,
getNumValueKindsInstrProf,
getNumValueSitesInstrProf,
getNumValueDataInstrProf,
getNumValueDataForSiteInstrProf,
- 0,
+ nullptr,
getValueForSiteInstrProf,
allocValueProfDataInstrProf};
ProfileSummaryEntry PSE = {Cutoff, Count, BlocksSeen};
DetailedSummary.push_back(PSE);
}
- return;
}
-}
+} // end namespace llvm
return PROT_NONE;
}
-} // namespace
+} // anonymous namespace
namespace llvm {
namespace sys {
}
bool Memory::setExecutable (MemoryBlock &M, std::string *ErrMsg) {
- if (M.Address == 0 || M.Size == 0) return false;
+ if (M.Address == nullptr || M.Size == 0) return false;
Memory::InvalidateInstructionCache(M.Address, M.Size);
#if defined(__APPLE__) && (defined(__arm__) || defined(__arm64__))
kern_return_t kr = vm_protect(mach_task_self(), (vm_address_t)M.Address,
// have memop! In fact, starting from ATOMADD64_DAG all opcodes will be
// thought as target memory ops!
};
- }
+ } // end namespace X86ISD
/// Define some predicates that are used for node matching.
namespace X86 {
bool isOffsetSuitableForCodeModel(int64_t Offset, CodeModel::Model M,
bool hasSymbolicDisplacement = true);
-
/// Determines whether the callee is required to pop its
/// own arguments. Callee pop is necessary to support tail calls.
bool isCalleePop(CallingConv::ID CallingConv,
bool is64Bit, bool IsVarArg, bool GuaranteeTCO);
- }
+ } // end namespace X86
//===--------------------------------------------------------------------===//
// X86 Implementation of the TargetLowering interface
/// and types must exactly match those of the original return values of
/// the node), or leaves Results empty, which indicates that the node is not
/// to be custom lowered after all.
- virtual void LowerOperationWrapper(SDNode *N,
- SmallVectorImpl<SDValue> &Results,
- SelectionDAG &DAG) const override;
+ void LowerOperationWrapper(SDNode *N,
+ SmallVectorImpl<SDValue> &Results,
+ SelectionDAG &DAG) const override;
/// Replace the results of node with an illegal result
/// type with new values built out of custom code.
void ReplaceNodeResults(SDNode *N, SmallVectorImpl<SDValue>&Results,
SelectionDAG &DAG) const override;
-
SDValue PerformDAGCombine(SDNode *N, DAGCombinerInfo &DCI) const override;
/// Return true if the target has native support for
namespace X86 {
FastISel *createFastISel(FunctionLoweringInfo &funcInfo,
const TargetLibraryInfo *libInfo);
- }
-}
+ } // end namespace X86
+} // end namespace llvm
-#endif // X86ISELLOWERING_H
+#endif // LLVM_LIB_TARGET_X86_X86ISELLOWERING_H
if (CreateGlobalVar)
FuncNameVar = createPGOFuncNameVar(F, FuncName);
- };
+ }
};
// Compute Hash value for the CFG: the lower 32 bits are CRC32 of the index
const PGOUseEdge *E = BBCountInfo.OutEdges[s];
const BasicBlock *SrcBB = E->SrcBB;
const BasicBlock *DestBB = E->DestBB;
- if (DestBB == 0)
+ if (DestBB == nullptr)
continue;
unsigned SuccNum = GetSuccessorNumber(SrcBB, DestBB);
uint64_t EdgeCount = E->CountValue;
bool runOnFunction(Function &F) override;
};
-}
+} // end anonymous namespace
char AddDiscriminators::ID = 0;
INITIALIZE_PASS_BEGIN(AddDiscriminators, "add-discriminators",
// Sample base profile needs to distinguish different function calls within
// a same source line for correct profile annotation.
for (BasicBlock &B : F) {
- const DILocation *FirstDIL = NULL;
+ const DILocation *FirstDIL = nullptr;
for (auto &I : B.getInstList()) {
CallInst *Current = dyn_cast<CallInst>(&I);
if (!Current || isa<DbgInfoIntrinsic>(&I))
EmptyModuleStatsTy = makeModuleStatsTy();
ModuleStatsGV = new GlobalVariable(*M, EmptyModuleStatsTy, false,
- GlobalValue::InternalLinkage, 0);
+ GlobalValue::InternalLinkage, nullptr);
}
ArrayType *SanitizerStatReport::makeModuleStatsArrayTy() {
while (Begin != End && *Begin)
++Begin;
if (Begin == End)
- return 0;
+ return nullptr;
StringRef Filename(FilenameBegin, Begin - FilenameBegin);
++Begin;
if (Begin == End)
- return 0;
+ return nullptr;
symbolize::LLVMSymbolizer::Options SymbolizerOptions;
SymbolizerOptions.Demangle = ClDemangle;
Begin += SizeofPtr;
if (Begin > End)
- return 0;
+ return nullptr;
if (Addr == 0 && Data == 0)
return Begin;
if (Begin == End)
- return 0;
+ return nullptr;
ErrorOr<DILineInfo> LineInfo = Symbolizer.symbolizeCode(Filename, Addr);
if (LineInfo) {
char SizeofPtr = *Begin++;
while (Begin != End) {
Begin = ReadModule(SizeofPtr, Begin, End);
- if (Begin == 0) {
+ if (Begin == nullptr) {
errs() << argv[0] << ": " << ClInputFile << ": short read\n";
return 1;
}
return SectionMemoryManager::needsToReserveAllocationSpace();
}
- bool finalizeMemory(std::string *ErrMsg = 0) override {
+ bool finalizeMemory(std::string *ErrMsg = nullptr) override {
++FinalizationCount;
return SectionMemoryManager::finalizeMemory(ErrMsg);
}
};
TEST(ObjectLinkingLayerTest, TestSetProcessAllSections) {
-
class SectionMemoryManagerWrapper : public SectionMemoryManager {
public:
SectionMemoryManagerWrapper(bool &DebugSeen) : DebugSeen(DebugSeen) {}
}
}
-
TEST_F(ObjectLinkingLayerExecutionTest, NoDuplicateFinalization) {
-
if (!TM)
return;
}
TEST_F(ObjectLinkingLayerExecutionTest, NoPrematureAllocation) {
-
if (!TM)
return;
"(multiple unrelated objects loaded prior to finalization)";
}
-}
+} // end anonymous namespace
-//===- llvm/unittest/IR/VerifierTest.cpp - Verifier unit tests ------------===//
+//===- llvm/unittest/IR/VerifierTest.cpp - Verifier unit tests --*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
Module M2("M2", C);
GlobalVariable *newGV =
new GlobalVariable(M1, Type::getInt8Ty(C), false,
- GlobalVariable::ExternalLinkage, NULL, "Some Global");
+ GlobalVariable::ExternalLinkage, nullptr,
+ "Some Global");
DIBuilder dbuilder(M2);
auto CU = dbuilder.createCompileUnit(dwarf::DW_LANG_Julia, "test.jl", ".",
EXPECT_TRUE(StringRef(ErrorOS.str())
.startswith("Referencing global in another module!"));
}
-}
-}
+} // end anonymous namespace
+} // end namespace llvm
#include "llvm/ProfileData/InstrProfWriter.h"
#include "llvm/Support/Compression.h"
#include "gtest/gtest.h"
-
#include <cstdarg>
using namespace llvm;
{{uint64_t("callee2"), 1000}, &Site1Values[2]},
{{uint64_t("callee3"), 500}, &Site1Values[3]},
{{uint64_t("callee4"), 300}, &Site1Values[4]},
- {{uint64_t("callee5"), 100}, 0}};
+ {{uint64_t("callee5"), 100}, nullptr}};
ValueProfNode Site2Values[4] = {{{uint64_t("callee5"), 800}, &Site2Values[1]},
{{uint64_t("callee3"), 1000}, &Site2Values[2]},
{{uint64_t("callee2"), 2500}, &Site2Values[3]},
- {{uint64_t("callee1"), 1300}, 0}};
+ {{uint64_t("callee1"), 1300}, nullptr}};
ValueProfNode Site3Values[3] = {{{uint64_t("callee6"), 800}, &Site3Values[1]},
{{uint64_t("callee3"), 1000}, &Site3Values[2]},
- {{uint64_t("callee4"), 5500}, 0}};
+ {{uint64_t("callee4"), 5500}, nullptr}};
ValueProfNode Site4Values[2] = {{{uint64_t("callee2"), 1800}, &Site4Values[1]},
- {{uint64_t("callee3"), 2000}, 0}};
+ {{uint64_t("callee3"), 2000}, nullptr}};
static ValueProfNode *ValueProfNodes[5] = {&Site1Values[0], &Site2Values[0],
- &Site3Values[0], &Site4Values[0], 0};
+ &Site3Values[0], &Site4Values[0],
+ nullptr};
+
static uint16_t NumValueSites[IPVK_Last + 1] = {5};
TEST_F(InstrProfTest, runtime_value_prof_data_read_write) {
ValueProfRuntimeRecord RTRecord;
InstrProfRecord Record("caller", 0x1234, {1ULL << 31, 2});
- VPData->deserializeTo(Record, 0);
+ VPData->deserializeTo(Record, nullptr);
// Now read data from Record and sanity check the data
ASSERT_EQ(5U, Record.getNumValueSites(IPVK_IndirectCallTarget));
for (unsigned I = 0; I < sizeof(Funcs) / sizeof(*Funcs); I++) {
Function *F = M->getFunction(Funcs[I]);
- ASSERT_TRUE(F != NULL);
+ ASSERT_TRUE(F != nullptr);
std::string PGOName = getPGOFuncName(*F);
uint64_t Key = IndexedInstrProf::ComputeHash(PGOName);
ASSERT_EQ(StringRef(PGOName),
-//=== - llvm/unittest/Support/AlignOfTest.cpp - Alignment utility tests ----===//
+//=== - llvm/unittest/Support/AlignOfTest.cpp - Alignment utility tests ---===//
//
// The LLVM Compiler Infrastructure
//
V8::~V8() {}
struct Abstract1 {
- virtual ~Abstract1() {}
+ virtual ~Abstract1() = default;
virtual void method() = 0;
char c;
};
struct Abstract2 : Abstract1 {
- virtual ~Abstract2() {}
+ ~Abstract2() override = default;
double d;
};
EXPECT_EQ(2u, sizeof(AlignedCharArray<2, 2>));
EXPECT_EQ(16u, sizeof(AlignedCharArray<2, 16>));
}
-}
+} // end anonymous namespace
-//===- DFAPacketizerEmitter.cpp - Packetization DFA for a VLIW machine-----===//
+//===- DFAPacketizerEmitter.cpp - Packetization DFA for a VLIW machine ----===//
//
// The LLVM Compiler Infrastructure
//
#include <map>
#include <string>
#include <queue>
+
using namespace llvm;
// --------------------------------------------------------------------
InsnInput = addDFAFuncUnits(InsnInput, U);
return InsnInput;
}
-}
+} // end anonymous namespace
+
// --------------------------------------------------------------------
#ifndef NDEBUG
void run(raw_ostream &OS);
};
-} // End anonymous namespace.
+} // end anonymous namespace
//
//
//
bool hasTransition(std::vector<unsigned> InsnClass) const;
};
-} // End anonymous namespace.
+} // end anonymous namespace
//
// class DFA: deterministic finite automaton for processor resource tracking.
int numInsnClasses = 0,
int maxResources = 0, int numCombos = 0, int maxStages = 0);
};
-} // End anonymous namespace.
+} // end anonymous namespace
#ifndef NDEBUG
// To enable debugging, run llvm-tblgen with: "-debug-only dfa-emitter".
DEBUG(dbgs() << " ");
}
}
-#endif
+#endif // NDEBUG
//
// Constructors and destructors for State and DFA
}
}
-
//
// canMaybeAddInsnClass - Quickly verifies if an instruction of type InsnClass
// may be a valid transition from this state i.e., can an instruction of type
return false;
}
-
const State &DFA::newState() {
auto IterPair = states.insert(State());
assert(IterPair.second && "State already exists");
TargetName(CodeGenTarget(R).getName()),
allInsnClasses(), Records(R) {}
-
//
// writeTableAndAPI - Print out a table representing the DFA and the
// associated API to create a DFA packetizer.
OS << "};\n";
OS << "} // namespace\n";
-
//
// Emit DFA Packetizer tables if the target is a VLIW machine.
//
OS << "} // End llvm namespace \n";
}
-
//
// collectAllFuncUnits - Construct a map of function unit names to bits.
//
return numCombos;
}
-
//
// collectOneInsnClass - Populate allInsnClasses with one instruction class
//
//
if (!current->hasTransition(InsnClass) &&
current->canMaybeAddInsnClass(InsnClass, ComboBitToBitsMap)) {
- const State *NewState = NULL;
+ const State *NewState = nullptr;
current->AddInsnClass(InsnClass, ComboBitToBitsMap, NewStateResources);
if (NewStateResources.size() == 0) {
DEBUG(dbgs() << " Skipped - no new states generated\n");
DFAPacketizerEmitter(RK).run(OS);
}
-} // End llvm namespace
+} // end namespaec llvm