Compiler Based Protection Framework