- The LoopUnrolling feature needs the LoopExit included in the CFG so added this dependency via the config options
- The LoopExit element can be encountered even if we haven't encountered the block of the corresponding LoopStmt. So the asserts were not right.
- If we are caching out the Node then we get a nullptr from generateNode which case was not handled.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Yeah, looks good.
Some tests would be great, at least for 2 (in what case do we not have the loop on the stack?)
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp | ||
---|---|---|
190 ↗ | (On Diff #112713) | I would rather keep this method as is and add the extra logic elsewhere (ex: the place where includeLoopExitInCFG is used). To me, AnalyzerOptions::includeLoopExitInCFG() returns the value of the corresponding parameter and I would not expect it to use anything else. |
test/Analysis/loop-unrolling.cpp | ||
276 ↗ | (On Diff #112713) | nit: "loop" "exit" and "loop" "stack" are separate words, so consider using "_" to separate them. |