Performance and Temperature Aware Floorplanning Optimization for 2D and 3D Microarchitectures