PPCTLSDynamicCallPass needs to be preceded by LiveVariables otherwise stage 2 clang build fails
| Bugzilla Link | 39756 |
| Version | trunk |
| OS | Linux |
| CC | @hfinkel,@nemanjai |
Extended Description
Currently in PPCTargetMachine.cpp we have the pass PPCTLSDynamicCallPass preceded by LiveVariables. If the LiveVariables pass is removed then stage 2 clang fails to build. The dependency should not be required. Should investigate the failure to find out where the bug comes from and possibly remove the dependency.
Adding further details here with respect to the history of this code.
First on Tue Feb 10 2015 r228725 - [PowerPC] Fix reverted patch r227976 to avoid register assignment issues This patch adds the following two lines to PPCTargetMachine.cpp. if (getPPCTargetMachine().getRelocationModel() == Reloc::PIC_) addPass(createPPCTLSDynamicCallPass());
This patch adds the PPCTLSDynamicCallPass to run before register allocation and only in the case of using the PIC model.
On Apr 28 2016 the commit r267954 - LiveIntervalAnalysis: Remove LiveVariables requirement
This patch removes the LiveVariables requirement from LiveIntervalAnalysis. However, the author noticed that PPCTLSDynamicCallPass still requires to have LiveVariables run first otherwise a stage 2 bootstrap build of clang fails. Therefore, LiveVariables was added just before that pass in PowerPC specific code.