File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -4176,7 +4176,7 @@ bool NVPTXDAGToDAGISel::tryFence(SDNode *N) {
4176
4176
return true ;
4177
4177
}
4178
4178
4179
- NVPTXScopes::NVPTXScopes (LLVMContext &C) : CTX(&C) {
4179
+ NVPTXScopes::NVPTXScopes (LLVMContext &C) {
4180
4180
Scopes[C.getOrInsertSyncScopeID (" singlethread" )] = NVPTX::Scope::Thread;
4181
4181
Scopes[C.getOrInsertSyncScopeID (" " )] = NVPTX::Scope::System;
4182
4182
Scopes[C.getOrInsertSyncScopeID (" block" )] = NVPTX::Scope::Block;
@@ -4191,13 +4191,11 @@ NVPTX::Scope NVPTXScopes::operator[](SyncScope::ID ID) const {
4191
4191
4192
4192
auto S = Scopes.find (ID);
4193
4193
if (S == Scopes.end ()) {
4194
- SmallVector<StringRef, 8 > ScopeNames;
4195
- assert (CTX != nullptr && " CTX is nullptr" );
4196
- CTX->getSyncScopeNames (ScopeNames);
4197
- StringRef Unknown{" unknown" };
4198
- auto Name = ID < ScopeNames.size () ? ScopeNames[ID] : Unknown;
4199
- report_fatal_error (
4200
- formatv (" Could not find scope ID={} with name \" {}\" ." , int (ID), Name));
4194
+ // TODO:
4195
+ // - Add API to LLVMContext to get the name of a single scope.
4196
+ // - Use that API here to print an error containing the name
4197
+ // of this Unknown ID.
4198
+ report_fatal_error (formatv (" Could not find scope ID={}." , int (ID)));
4201
4199
}
4202
4200
return S->second ;
4203
4201
}
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ struct NVPTXScopes {
35
35
36
36
private:
37
37
SmallMapVector<SyncScope::ID, NVPTX::Scope, 8 > Scopes{};
38
- LLVMContext *CTX = nullptr ;
39
38
};
40
39
41
40
class LLVM_LIBRARY_VISIBILITY NVPTXDAGToDAGISel : public SelectionDAGISel {
You can’t perform that action at this time.
0 commit comments