CLAP: Cross-Layer Approximate Computing on Custom RISC-V Processors