mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
[BOLT] Do not process empty functions.
Summary: While running on a recent test binary BOLT failed with an error. We were trying to process '__hot_end' (which is not really a function), and asserted that it had no basic blocks. This diff marks functions with empty basic blocks list as non-simple since there's no need to process them. (cherry picked from FBD4696517)
This commit is contained in:
@@ -1612,6 +1612,11 @@ bool BinaryFunction::buildCFG() {
|
||||
}
|
||||
}
|
||||
|
||||
if (BasicBlocks.empty()) {
|
||||
setSimple(false);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Intermediate dump.
|
||||
DEBUG(print(dbgs(), "after creating basic blocks"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user