diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2010-07-26 18:45:39 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2010-07-26 18:45:39 +0000 |
commit | b5a0ef99f8e2bd48f2fb2a3221d296d48f1d5940 (patch) | |
tree | 0f8ade426fe9bb995d9e3825fc540bc1cbe66a11 /lib/Target/ARM/ARMGlobalMerge.cpp | |
parent | 88dafec7f931f2cbb91be0857030768e4c6c2e03 (diff) | |
download | external_llvm-b5a0ef99f8e2bd48f2fb2a3221d296d48f1d5940.zip external_llvm-b5a0ef99f8e2bd48f2fb2a3221d296d48f1d5940.tar.gz external_llvm-b5a0ef99f8e2bd48f2fb2a3221d296d48f1d5940.tar.bz2 |
Currently EH lowering code expects typeinfo to be global only.
This assumption is not satisfied due to global mergeing.
Workaround the issue by temporary disablinge mergeing of const globals.
Also, ignore LLVM "special" globals. This fixes PR7716
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109423 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMGlobalMerge.cpp')
-rw-r--r-- | lib/Target/ARM/ARMGlobalMerge.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMGlobalMerge.cpp b/lib/Target/ARM/ARMGlobalMerge.cpp index cb7947b2..af7298a 100644 --- a/lib/Target/ARM/ARMGlobalMerge.cpp +++ b/lib/Target/ARM/ARMGlobalMerge.cpp @@ -178,6 +178,11 @@ bool ARMGlobalMerge::doInitialization(Module& M) { if (I->getAlignment() != 0) continue; + // Ignore all 'special' globals. + if (I->getName().startswith("llvm.") || + I->getName().startswith(".llvm.")) + continue; + if (TD->getTypeAllocSize(I->getType()) < MaxOffset) { if (I->isConstant()) ConstGlobals.push_back(I); @@ -188,8 +193,12 @@ bool ARMGlobalMerge::doInitialization(Module& M) { if (Globals.size() > 1) Changed |= doMerge(Globals, M, false); - if (ConstGlobals.size() > 1) - Changed |= doMerge(ConstGlobals, M, true); + // FIXME: This currently breaks the EH processing due to way how the + // typeinfo detection works. We might want to detect the TIs and ignore + // them in the future. + + // if (ConstGlobals.size() > 1) + // Changed |= doMerge(ConstGlobals, M, true); return Changed; } |