Weird LLVM pass effect

Hi all,

After doing a simple LLVM pass which instruments the beginning of some functions of one application of PARSEC (streamcluster kernel), the threads do not leave the pthread join command anymore. The LLVM IR seems fine (no major changes, just a simple instrumentation on the beginning of the functions as required). Without the simple optimization pass, everything works fine. I know it is a very unclear specification, but someone has any guesses about what can be happening or tips on debugging it?

Please, let me know if this list is not the appropriate place to this type of question.

Thank you in advance for the patience,

best, Marcelo.

Without seeing some sort of code (showing the changed IR or the code that make the changes the IR, for example), it’s really hard to “remote debug”. And this sort of thing sounds more like stepping through the generated machine-code to understand what goes on, than any other form of debugging.

My WAG would be that you are either inserting code in front of the first alloca that causes dynamic alloca’s, or something is getting overwritten that you didn’t intend/expect to overwrite.