[llvm-commits] [llvm-gcc-4-2] r39875 - /llvm-gcc-4-2/trunk/gcc/llvm-backend.cpp
Anton Korobeynikov
asl at math.spbu.ru
Sun Jul 15 09:05:00 PDT 2007
Author: asl
Date: Sun Jul 15 11:04:59 2007
New Revision: 39875
URL: http://llvm.org/viewvc/llvm-project?rev=39875&view=rev
Log:
Use more sane way to emit a function: per statement.
Modified:
llvm-gcc-4-2/trunk/gcc/llvm-backend.cpp
Modified: llvm-gcc-4-2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4-2/trunk/gcc/llvm-backend.cpp?rev=39875&r1=39874&r2=39875&view=diff
==============================================================================
--- llvm-gcc-4-2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4-2/trunk/gcc/llvm-backend.cpp Sun Jul 15 11:04:59 2007
@@ -64,6 +64,7 @@
#include "timevar.h"
#include "tm.h"
#include "function.h"
+#include "tree-flow.h"
#include "tree-inline.h"
#include "langhooks.h"
#include "cgraph.h"
@@ -561,7 +562,9 @@
// Emit the body of the function iterating over all BBs
basic_block bb;
FOR_EACH_BB_FN (bb, DECL_STRUCT_FUNCTION (fndecl))
- Emitter.Emit(bb->stmt_list, 0);
+ for (block_stmt_iterator bsi = bsi_start (bb);
+ !bsi_end_p (bsi); bsi_next (&bsi))
+ Emitter.Emit(bsi_stmt (bsi), 0);
// Wrap things up.
Fn = Emitter.FinishFunctionBody();
More information about the llvm-commits
mailing list