WCET Optimizations and Architectural Support for Hard Real-Time Systems