Félix Cloutier via llvm-dev
2016-Aug-24 06:21 UTC
[llvm-dev] LLVM 3.9 RC2's SCCP pass removing calls to external functions?!
Hi, I've been porting a project to LLVM 3.9 and found that the SCCP pass may remove calls to external functions if their return type is declared to be an empty struct. For instance:> %empty = type {} > > declare %empty @foo() > > define i32 @main() { > %1 = call %empty @foo() > ret i32 0 > }opt -sccp -S file.ll returns:> %empty = type {} > > declare %empty @foo() > > define i32 @main() { > ret i32 0 > }It doesn't look right to remove a call to an external function (especially since the call isn't removed if `@foo` returns a `void` instead). It didn't happen with LLVM 3.8. I'm using the Mac OS X prebuilt binaries for RC2. Assuming that this is a bug, what are the next steps? Félix -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160823/fb482883/attachment.html>
Sanjoy Das via llvm-dev
2016-Aug-24 07:09 UTC
[llvm-dev] LLVM 3.9 RC2's SCCP pass removing calls to external functions?!
Hi Félix, Félix Cloutier via llvm-dev wrote: > Assuming that this is a bug, what are the next steps? Looks like you already have a very small test case -- have you tried sticking it in a debugger to see why SCCP thinks removing the call is okay? Alternatively, file a bug at llvm.org/bugs and someone will get to it. -- Sanjoy
Sanjoy Das via llvm-dev
2016-Aug-24 07:12 UTC
[llvm-dev] LLVM 3.9 RC2's SCCP pass removing calls to external functions?!
Hi Félix, Sanjoy Das wrote: > Félix Cloutier via llvm-dev wrote: > > Assuming that this is a bug, what are the next steps? > > Looks like you already have a very small test case -- have you tried > sticking it in a debugger to see why SCCP thinks removing the call is > okay? > > Alternatively, file a bug at llvm.org/bugs and someone will get to it. The third thing you can do is run a bisection to find the problematic commit, since you said this was a regression. -- Sanjoy
Maybe Matching Threads
- LLVM 3.9 RC2's SCCP pass removing calls to external functions?!
- LLVM 3.9 RC2's SCCP pass removing calls to external functions?!
- [LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
- [LLVMdev] Processing functions in call graph SCC "order" with function-level analyses
- [LLVMdev] Why shouldn't function entry blocks have predecessors?