An extensible and flexible AMD loader and compiler