================
@@ -2538,6 +2541,311 @@ static RValue
EmitHipStdParUnsupportedBuiltin(CodeGenFunction *CGF,
return RValue::get(CGF->Builder.CreateCall(UBF, Args));
}
+namespace {
+
+struct PaddingClearer {
+ PaddingClearer(CodeGenFunction &F)
+ : CGF(F), CharWidth(CGF.getContext().getCharWidth()) {}
+
+ void run(Value *Ptr, QualType Ty) {
+ OccuppiedIntervals.clear();
+ Queue.clear();
+
+ Queue.push_back(Data{0, Ty, true});
+ while (!Queue.empty()) {
+ auto Current = Queue.front();
+ Queue.pop_front();
----------------
huixie90 wrote:
Thanks for the suggestion. May I clarify what the alternative are you
suggesting? is it `vector`? The reason I chose `deque` is that we have lots of
`push` and `pop` operations and the length of the queue won't be know up-front.
We discover more elements while search down the tree.
https://github.com/llvm/llvm-project/pull/75371
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits