Fix an issue with th_task_state_memo_stack and proxy/helper tasks

When proxy or helper tasks were used in inactive parallel regions, no
memo of the th_task_state was stored in the stack, so th_task_state
became invalid. This change inserts an item in the memo stack to track
these th_task_states.

Patch by Alex Duran.

Differential Revision: https://reviews.llvm.org/D145736

GitOrigin-RevId: 41f148e61d0b5a13f2406c4acf6e36ab24172a9d
1 file changed