-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[SandboxVectorizer][NFCI] Fix use of possibly-uninitialized scalar. #122201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
807217e
9344694
3c8349c
11901e0
803fc9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -686,7 +686,7 @@ void Context::runMoveInstrCallbacks(Instruction *I, const BBIterator &WhereIt) { | |
Context::CallbackID Context::registerEraseInstrCallback(EraseInstrCallback CB) { | ||
assert(EraseInstrCallbacks.size() <= MaxRegisteredCallbacks && | ||
"EraseInstrCallbacks size limit exceeded"); | ||
CallbackID ID = NextCallbackID++; | ||
CallbackID ID{NextCallbackID++}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably have a check here that
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm it's probably better to put this check in the constructor. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense; put an |
||
EraseInstrCallbacks[ID] = CB; | ||
return ID; | ||
} | ||
|
@@ -700,7 +700,7 @@ Context::CallbackID | |
Context::registerCreateInstrCallback(CreateInstrCallback CB) { | ||
assert(CreateInstrCallbacks.size() <= MaxRegisteredCallbacks && | ||
"CreateInstrCallbacks size limit exceeded"); | ||
CallbackID ID = NextCallbackID++; | ||
CallbackID ID{NextCallbackID++}; | ||
CreateInstrCallbacks[ID] = CB; | ||
return ID; | ||
} | ||
|
@@ -713,7 +713,7 @@ void Context::unregisterCreateInstrCallback(CallbackID ID) { | |
Context::CallbackID Context::registerMoveInstrCallback(MoveInstrCallback CB) { | ||
assert(MoveInstrCallbacks.size() <= MaxRegisteredCallbacks && | ||
"MoveInstrCallbacks size limit exceeded"); | ||
CallbackID ID = NextCallbackID++; | ||
CallbackID ID{NextCallbackID++}; | ||
MoveInstrCallbacks[ID] = CB; | ||
return ID; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would define the reserved uninitialized value here as a public value:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, called it
InvalidVal
.