Compile time aanalysis for hardware transactional memory architectures