kparzysz wrote:

> I can't say I understand what is going on here much with teh directive, and 
> will leave the review process to Alexey, but this is 1 giant code smell...

I'm introducing two different enum values for the ORDERED directive, since it 
has two forms: standalone and block-associated. They could have had different 
spellings in the OpenMP spec, but they don't.  So `#pragma omp ordered` could 
refer to either one, depending on what follows.

Until now, there was a single enum id for it: OMPD_ordered, a single AST class: 
OMPOrderedDirective, and a single AST writer opcode for it.  When we decode the 
AST bit stream, we create an empty shell, then fill it out with the rest of the 
decoded data.  The empty shell still requires the directive id to be specified, 
but we don't know which one we will need in the end, because it depends on the 
not-yet-decoded data. So a default value used and then reset as needed.

I guess I could add a different AST opcode in the other PR and avoid this 
resetting.  I'm going to try that.

https://github.com/llvm/llvm-project/pull/214728
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to