Commit e1c423d
[flang][OpenMP] Detect BLOCK construct through lookahead (llvm#150617)
Avoid parsing the entire ExecutionPartConstruct in either the strictly-
or the loosely-structured block parser only to discard it when it's not
BLOCK (or is BLOCK) respectively. Doing so was not incorrct, but in
pathological cases (like Fujitsu 0981_0034) the recursive parsing can
take a very long time.
Instead, detect the presence of BLOCK first (via a simple lookahead),
and fail immediately if necessary.1 parent e173e07 commit e1c423d
1 file changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1222 | 1222 | | |
1223 | 1223 | | |
1224 | 1224 | | |
1225 | | - | |
1226 | | - | |
1227 | | - | |
1228 | | - | |
1229 | | - | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1230 | 1233 | | |
1231 | 1234 | | |
1232 | 1235 | | |
| |||
1237 | 1240 | | |
1238 | 1241 | | |
1239 | 1242 | | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
1240 | 1247 | | |
1241 | 1248 | | |
1242 | 1249 | | |
| |||
0 commit comments