If a function calls a library function, that shouldn't be treated as potentially causing a cycle in the CFG. Additionally calls to noreturn functions are norecurse by definition.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Calls to exit() can recurse because of atexit() handlers. The same might be true of other libcalls?
Also, other noreturn functions can recurse; it's a weird path but I don't think it's malformed:
void bar() noreturn;
int foo() {
static bool Return = false;
if (Return) return 5;
Return = true;
bar();
}
void bar() {
sink(foo());
exit();
}
Comment Actions
Hi Duncan,
Damn, you're right. I didn't even consider atexit handlers. And that noreturn case is true too. I'll abandon this.
Cheers,
James
Comment Actions
Yeah, this would have been nice :(. There might be something you can do for certain LLVM intrinsics?