Compiler techniques for enabling general-purpose hardware-agnostic FPGA programming