mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
[XCore] Move lowering of thread local storage to a separate pass.
Thread local storage is not supported by the XMOS linker so we handle thread local variables by lowering the variable to an array of n elements (where n is the number of hardware threads per core, currently 8 for all XMOS devices) indexed by the the current thread ID. Previously this lowering was spread across the XCoreISelLowering and the XCoreAsmPrinter classes. Moving this to a separate pass should be much cleaner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181124 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -46,6 +46,7 @@ public:
|
||||
return getTM<XCoreTargetMachine>();
|
||||
}
|
||||
|
||||
virtual bool addPreISel();
|
||||
virtual bool addInstSelector();
|
||||
};
|
||||
} // namespace
|
||||
@@ -54,6 +55,11 @@ TargetPassConfig *XCoreTargetMachine::createPassConfig(PassManagerBase &PM) {
|
||||
return new XCorePassConfig(this, PM);
|
||||
}
|
||||
|
||||
bool XCorePassConfig::addPreISel() {
|
||||
addPass(createXCoreLowerThreadLocalPass());
|
||||
return false;
|
||||
}
|
||||
|
||||
bool XCorePassConfig::addInstSelector() {
|
||||
addPass(createXCoreISelDag(getXCoreTargetMachine(), getOptLevel()));
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user