Mageia Bugzilla – Attachment 2925 Details for
Bug 7717
Mageia needs open source drivers for glamor and radeon SI - patches are included
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
patch to fix segfault in mesa glamor radeonsi drivers
radeon.llvm.register.once.patch (text/plain), 1.57 KB, created by
Joseph Wang
on 2012-10-05 14:46:01 CEST
(
hide
)
Description:
patch to fix segfault in mesa glamor radeonsi drivers
Filename:
MIME Type:
Creator:
Joseph Wang
Created:
2012-10-05 14:46:01 CEST
Size:
1.57 KB
patch
obsolete
>--- a/src/gallium/drivers/radeon/AMDILCFGStructurizer.cpp 2012-10-03 19:11:58.000000000 +0800 >+++ b/src/gallium/drivers/radeon/AMDILCFGStructurizer.cpp 2012-10-05 01:20:02.433416433 +0800 >@@ -112,6 +112,30 @@ > > namespace llvm { > >+/// RegisterPassOnce template >+/// Copy from RegisterPass except that initialization is skipped >+/// if pass is already registered. This is needed in situations >+/// where the constructor could be called multiple times as a result >+/// of dynamic loading >+ >+template<typename passName> >+struct RegisterPassOnce : public PassInfo { >+ >+ // Register Pass using default constructor... >+ RegisterPassOnce(const char *PassArg, const char *Name, >+ bool CFGOnly = false, >+ bool is_analysis = false) >+ : PassInfo(Name, PassArg, &passName::ID, >+ PassInfo::NormalCtor_t(callDefaultCtor<passName>), >+ CFGOnly, is_analysis) { >+ PassRegistry *pass_registry = PassRegistry::getPassRegistry(); >+ if (!pass_registry->getPassInfo(StringRef(PassArg))) { >+ pass_registry->registerPass(*this); >+ } >+ } >+}; >+ >+ > /// PostDominatorTree Class - Concrete subclass of DominatorTree that is used > /// to compute the a post-dominator tree. > /// >@@ -179,7 +203,7 @@ > } //end of namespace llvm > > char MachinePostDominatorTree::ID = 0; >-static RegisterPass<MachinePostDominatorTree> >+static RegisterPassOnce<MachinePostDominatorTree> > machinePostDominatorTreePass("machinepostdomtree", > "MachinePostDominator Tree Construction", > true, true);
--- a/src/gallium/drivers/radeon/AMDILCFGStructurizer.cpp 2012-10-03 19:11:58.000000000 +0800 +++ b/src/gallium/drivers/radeon/AMDILCFGStructurizer.cpp 2012-10-05 01:20:02.433416433 +0800 @@ -112,6 +112,30 @@ namespace llvm { +/// RegisterPassOnce template +/// Copy from RegisterPass except that initialization is skipped +/// if pass is already registered. This is needed in situations +/// where the constructor could be called multiple times as a result +/// of dynamic loading + +template<typename passName> +struct RegisterPassOnce : public PassInfo { + + // Register Pass using default constructor... + RegisterPassOnce(const char *PassArg, const char *Name, + bool CFGOnly = false, + bool is_analysis = false) + : PassInfo(Name, PassArg, &passName::ID, + PassInfo::NormalCtor_t(callDefaultCtor<passName>), + CFGOnly, is_analysis) { + PassRegistry *pass_registry = PassRegistry::getPassRegistry(); + if (!pass_registry->getPassInfo(StringRef(PassArg))) { + pass_registry->registerPass(*this); + } + } +}; + + /// PostDominatorTree Class - Concrete subclass of DominatorTree that is used /// to compute the a post-dominator tree. /// @@ -179,7 +203,7 @@ } //end of namespace llvm char MachinePostDominatorTree::ID = 0; -static RegisterPass<MachinePostDominatorTree> +static RegisterPassOnce<MachinePostDominatorTree> machinePostDominatorTreePass("machinepostdomtree", "MachinePostDominator Tree Construction", true, true);
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 7717
:
2922
|
2923
|
2924
| 2925 |
2926
|
2927