Don’t know enough of the particulars of the Blureprint case to completely rule it out, but in general this a hard problem to solve. If it was easy the Blueprint compiler would probably already be capable of this even if it was just used as a final optimization in the cooking process.
Most likely any auto-generated c++ code that could handle all blueprints wouldn’t see a big enough performance boost to be worth the trouble. Some of the overhead would probably have to carry over to the generated c++ code as well.
Some semi automated process to make it easier to translate complicated graphs to c++ code should be more feasible though.