[llvm] r231279 - Fix the build of the gold-plugin and examples.
Rafael Espindola
rafael.espindola at gmail.com
Wed Mar 4 11:15:29 PST 2015
Author: rafael
Date: Wed Mar 4 13:15:29 2015
New Revision: 231279
URL: http://llvm.org/viewvc/llvm-project?rev=231279&view=rev
Log:
Fix the build of the gold-plugin and examples.
Modified:
llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp
llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp
llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp
llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp
llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp
llvm/trunk/tools/gold/gold-plugin.cpp
Modified: llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp?rev=231279&r1=231278&r2=231279&view=diff
==============================================================================
--- llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp (original)
+++ llvm/trunk/examples/ExceptionDemo/ExceptionDemo.cpp Wed Mar 4 13:15:29 2015
@@ -1972,7 +1972,7 @@ int main(int argc, char *argv[]) {
// Set up the optimizer pipeline.
// Start with registering info about how the
// target lays out data structures.
- module->setDataLayout(executionEngine->getDataLayout());
+ module->setDataLayout(*executionEngine->getDataLayout());
// Optimizations turned on
#ifdef ADD_OPT_PASSES
Modified: llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp?rev=231279&r1=231278&r2=231279&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp Wed Mar 4 13:15:29 2015
@@ -560,7 +560,7 @@ void *MCJITHelper::getPointerToFunction(
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
- OpenModule->setDataLayout(NewEngine->getDataLayout());
+ OpenModule->setDataLayout(*NewEngine->getDataLayout());
// Provide basic AliasAnalysis support for GVN.
FPM->add(createBasicAliasAnalysisPass());
// Promote allocas to registers.
Modified: llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp?rev=231279&r1=231278&r2=231279&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp Wed Mar 4 13:15:29 2015
@@ -913,7 +913,7 @@ int main() {
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
- TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
+ TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
// Provide basic AliasAnalysis support for GVN.
OurFPM.add(createBasicAliasAnalysisPass());
// Do simple "peephole" optimizations and bit-twiddling optzns.
Modified: llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp?rev=231279&r1=231278&r2=231279&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp Wed Mar 4 13:15:29 2015
@@ -1034,7 +1034,7 @@ int main() {
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
- TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
+ TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
// Provide basic AliasAnalysis support for GVN.
OurFPM.add(createBasicAliasAnalysisPass());
// Do simple "peephole" optimizations and bit-twiddling optzns.
Modified: llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp?rev=231279&r1=231278&r2=231279&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp Wed Mar 4 13:15:29 2015
@@ -1208,7 +1208,7 @@ int main() {
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
- TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
+ TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
// Provide basic AliasAnalysis support for GVN.
OurFPM.add(createBasicAliasAnalysisPass());
// Promote allocas to registers.
Modified: llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp?rev=231279&r1=231278&r2=231279&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp Wed Mar 4 13:15:29 2015
@@ -1459,7 +1459,7 @@ int main() {
// Set up the optimizer pipeline. Start with registering info about how the
// target lays out data structures.
- TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
+ TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
#if 0
// Provide basic AliasAnalysis support for GVN.
OurFPM.add(createBasicAliasAnalysisPass());
Modified: llvm/trunk/tools/gold/gold-plugin.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/gold/gold-plugin.cpp?rev=231279&r1=231278&r2=231279&view=diff
==============================================================================
--- llvm/trunk/tools/gold/gold-plugin.cpp (original)
+++ llvm/trunk/tools/gold/gold-plugin.cpp Wed Mar 4 13:15:29 2015
@@ -711,10 +711,9 @@ getModuleForFile(LLVMContext &Context, c
static void runLTOPasses(Module &M, TargetMachine &TM) {
if (const DataLayout *DL = TM.getDataLayout())
- M.setDataLayout(DL);
+ M.setDataLayout(*DL);
legacy::PassManager passes;
- passes.add(new DataLayoutPass());
passes.add(createTargetTransformInfoWrapperPass(TM.getTargetIRAnalysis()));
PassManagerBuilder PMB;
@@ -764,7 +763,6 @@ static void codegen(Module &M) {
saveBCFile(output_name + ".opt.bc", M);
legacy::PassManager CodeGenPasses;
- CodeGenPasses.add(new DataLayoutPass());
SmallString<128> Filename;
int FD;
More information about the llvm-commits
mailing list