diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-09-09 02:37:14 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-09-09 02:37:14 +0000 |
commit | 58e2d3d856b7dc7b97a18cfa2aeeb927bc7e6bd5 (patch) | |
tree | 9ca8acad793e03df4d19dc005e687a499d33efb7 /llvm/lib/CodeGen/LLVMTargetMachine.cpp | |
parent | 1bda93a25220228385abee686163272b1d910e79 (diff) | |
download | bcm5719-llvm-58e2d3d856b7dc7b97a18cfa2aeeb927bc7e6bd5.tar.gz bcm5719-llvm-58e2d3d856b7dc7b97a18cfa2aeeb927bc7e6bd5.zip |
Generate compact unwind encoding from CFI directives.
We used to generate the compact unwind encoding from the machine
instructions. However, this had the problem that if the user used `-save-temps'
or compiled their hand-written `.s' file (with CFI directives), we wouldn't
generate the compact unwind encoding.
Move the algorithm that generates the compact unwind encoding into the
MCAsmBackend. This way we can generate the encoding whether the code is from a
`.ll' or `.s' file.
<rdar://problem/13623355>
llvm-svn: 190290
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LLVMTargetMachine.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp index 6c9b2e57f39..6fd68ee7750 100644 --- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp +++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp @@ -178,7 +178,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, MCAsmBackend *MAB = 0; if (ShowMCEncoding) { MCE = getTarget().createMCCodeEmitter(MII, MRI, STI, *Context); - MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU); + MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(), TargetCPU); } MCStreamer *S = getTarget().createAsmStreamer(*Context, Out, @@ -197,7 +197,7 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM, // emission fails. MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(MII, MRI, STI, *Context); - MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(), + MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(), TargetCPU); if (MCE == 0 || MAB == 0) return true; @@ -271,7 +271,8 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM, const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>(); MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(*getInstrInfo(), MRI, STI, *Ctx); - MCAsmBackend *MAB = getTarget().createMCAsmBackend(getTargetTriple(), TargetCPU); + MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(), + TargetCPU); if (MCE == 0 || MAB == 0) return true; |