Encoding offload target triples onto comdat group key for offload initialization code guarantees that it will be executed once per each unique combination of offload targets.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Please add some unit tests.
lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
3830 | Please use llvm::sort instead of std::sort. See https://llvm.org/docs/CodingStandards.html#beware-of-non-deterministic-sorting-order-of-equal-elements. |
Comment Actions
Replaced std::sort with llvm::sort. Added a test for offload target registration code for two offload targets.
lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
3825 | Preallocate the memory for all elements at construction, you know the number of elements. |
lib/CodeGen/CGOpenMPRuntime.cpp | ||
---|---|---|
3825 | Agree. |
Preallocate the memory for all elements at construction, you know the number of elements.