summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2010-07-26 18:45:39 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2010-07-26 18:45:39 +0000
commit6bcea068db4e159e0a908b50c01df2d33a5113e4 (patch)
treed0911237167534ce02ce61b7c0b71be9f97ec9f3 /llvm/lib
parentbb4c4b59a49d0b0a0e64aa84c69664abb6c441f2 (diff)
downloadbcm5719-llvm-6bcea068db4e159e0a908b50c01df2d33a5113e4.tar.gz
bcm5719-llvm-6bcea068db4e159e0a908b50c01df2d33a5113e4.zip
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 llvm-svn: 109423
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/ARM/ARMGlobalMerge.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/ARMGlobalMerge.cpp b/llvm/lib/Target/ARM/ARMGlobalMerge.cpp
index cb7947b20b4..af7298a2439 100644
--- a/llvm/lib/Target/ARM/ARMGlobalMerge.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud