mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 18:42:36 +00:00
Fix the build of the gold-plugin and examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b34736c630
commit
671944ff8f
@ -1972,7 +1972,7 @@ int main(int argc, char *argv[]) {
|
|||||||
// Set up the optimizer pipeline.
|
// Set up the optimizer pipeline.
|
||||||
// Start with registering info about how the
|
// Start with registering info about how the
|
||||||
// target lays out data structures.
|
// target lays out data structures.
|
||||||
module->setDataLayout(executionEngine->getDataLayout());
|
module->setDataLayout(*executionEngine->getDataLayout());
|
||||||
|
|
||||||
// Optimizations turned on
|
// Optimizations turned on
|
||||||
#ifdef ADD_OPT_PASSES
|
#ifdef ADD_OPT_PASSES
|
||||||
|
@ -560,7 +560,7 @@ void *MCJITHelper::getPointerToFunction(Function *F) {
|
|||||||
|
|
||||||
// Set up the optimizer pipeline. Start with registering info about how the
|
// Set up the optimizer pipeline. Start with registering info about how the
|
||||||
// target lays out data structures.
|
// target lays out data structures.
|
||||||
OpenModule->setDataLayout(NewEngine->getDataLayout());
|
OpenModule->setDataLayout(*NewEngine->getDataLayout());
|
||||||
// Provide basic AliasAnalysis support for GVN.
|
// Provide basic AliasAnalysis support for GVN.
|
||||||
FPM->add(createBasicAliasAnalysisPass());
|
FPM->add(createBasicAliasAnalysisPass());
|
||||||
// Promote allocas to registers.
|
// Promote allocas to registers.
|
||||||
|
@ -913,7 +913,7 @@ int main() {
|
|||||||
|
|
||||||
// Set up the optimizer pipeline. Start with registering info about how the
|
// Set up the optimizer pipeline. Start with registering info about how the
|
||||||
// target lays out data structures.
|
// target lays out data structures.
|
||||||
TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
|
TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
|
||||||
// Provide basic AliasAnalysis support for GVN.
|
// Provide basic AliasAnalysis support for GVN.
|
||||||
OurFPM.add(createBasicAliasAnalysisPass());
|
OurFPM.add(createBasicAliasAnalysisPass());
|
||||||
// Do simple "peephole" optimizations and bit-twiddling optzns.
|
// Do simple "peephole" optimizations and bit-twiddling optzns.
|
||||||
|
@ -1034,7 +1034,7 @@ int main() {
|
|||||||
|
|
||||||
// Set up the optimizer pipeline. Start with registering info about how the
|
// Set up the optimizer pipeline. Start with registering info about how the
|
||||||
// target lays out data structures.
|
// target lays out data structures.
|
||||||
TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
|
TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
|
||||||
// Provide basic AliasAnalysis support for GVN.
|
// Provide basic AliasAnalysis support for GVN.
|
||||||
OurFPM.add(createBasicAliasAnalysisPass());
|
OurFPM.add(createBasicAliasAnalysisPass());
|
||||||
// Do simple "peephole" optimizations and bit-twiddling optzns.
|
// Do simple "peephole" optimizations and bit-twiddling optzns.
|
||||||
|
@ -1208,7 +1208,7 @@ int main() {
|
|||||||
|
|
||||||
// Set up the optimizer pipeline. Start with registering info about how the
|
// Set up the optimizer pipeline. Start with registering info about how the
|
||||||
// target lays out data structures.
|
// target lays out data structures.
|
||||||
TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
|
TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
|
||||||
// Provide basic AliasAnalysis support for GVN.
|
// Provide basic AliasAnalysis support for GVN.
|
||||||
OurFPM.add(createBasicAliasAnalysisPass());
|
OurFPM.add(createBasicAliasAnalysisPass());
|
||||||
// Promote allocas to registers.
|
// Promote allocas to registers.
|
||||||
|
@ -1459,7 +1459,7 @@ int main() {
|
|||||||
|
|
||||||
// Set up the optimizer pipeline. Start with registering info about how the
|
// Set up the optimizer pipeline. Start with registering info about how the
|
||||||
// target lays out data structures.
|
// target lays out data structures.
|
||||||
TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
|
TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
|
||||||
#if 0
|
#if 0
|
||||||
// Provide basic AliasAnalysis support for GVN.
|
// Provide basic AliasAnalysis support for GVN.
|
||||||
OurFPM.add(createBasicAliasAnalysisPass());
|
OurFPM.add(createBasicAliasAnalysisPass());
|
||||||
|
@ -711,10 +711,9 @@ getModuleForFile(LLVMContext &Context, claimed_file &F,
|
|||||||
|
|
||||||
static void runLTOPasses(Module &M, TargetMachine &TM) {
|
static void runLTOPasses(Module &M, TargetMachine &TM) {
|
||||||
if (const DataLayout *DL = TM.getDataLayout())
|
if (const DataLayout *DL = TM.getDataLayout())
|
||||||
M.setDataLayout(DL);
|
M.setDataLayout(*DL);
|
||||||
|
|
||||||
legacy::PassManager passes;
|
legacy::PassManager passes;
|
||||||
passes.add(new DataLayoutPass());
|
|
||||||
passes.add(createTargetTransformInfoWrapperPass(TM.getTargetIRAnalysis()));
|
passes.add(createTargetTransformInfoWrapperPass(TM.getTargetIRAnalysis()));
|
||||||
|
|
||||||
PassManagerBuilder PMB;
|
PassManagerBuilder PMB;
|
||||||
@ -764,7 +763,6 @@ static void codegen(Module &M) {
|
|||||||
saveBCFile(output_name + ".opt.bc", M);
|
saveBCFile(output_name + ".opt.bc", M);
|
||||||
|
|
||||||
legacy::PassManager CodeGenPasses;
|
legacy::PassManager CodeGenPasses;
|
||||||
CodeGenPasses.add(new DataLayoutPass());
|
|
||||||
|
|
||||||
SmallString<128> Filename;
|
SmallString<128> Filename;
|
||||||
int FD;
|
int FD;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user