Commit Graph

172 Commits

Author SHA1 Message Date
Axel Naumann
f0f8fe0fae Disable inliner/CallGraph pass where not needed: it is slow. 2014-04-22 09:14:57 +02:00
Axel Naumann
bc0c3877f7 Only run initializers (of all committed transactions!) if topmost. 2014-04-16 12:08:03 +02:00
Axel Naumann
5648b8fc7f No nested transactions for initializers! (Test coming up.) 2014-04-16 12:08:03 +02:00
Axel Naumann
40d2135253 Tell the new transaction what its parent is. 2014-04-16 12:08:02 +02:00
Axel Naumann
b935579c55 From Vassil: only commit what endTransaction() returns. 2014-04-16 12:08:01 +02:00
Vassil Vassilev
ffc9fe50b5 Disable useless warnings only for the wrapper functions.
We simulate programatically:
void __cling_Unique {
  #pragma push
  #pragma ... ignore ...
  {code}
  #pragma pop
}
2014-04-01 17:09:58 +02:00
Vassil Vassilev
33676c14a9 Implement dump of MacroDirectiveInfo. 2014-03-31 14:03:08 +02:00
Vassil Vassilev
33ece80d2b Move renaming. 2014-03-31 14:03:04 +02:00
Axel Naumann
f2da5f7cb7 Add backend passes (inlining etc) to cling.
They are usually provided by clang's BackendUtil - which we don't use and which
has no support for incremental ("streaming") compilation but runs the passes on
the whole module the whole time, and does end-of-TU cleanup (e.g. "dead" code
removal) that we cannot use because subsequent transactions might create new
uses - think force_inline functions that must stay.

Instead BackendPass wraps what's in clang's BackendUtil into a
TransactionTransformer. It gets added to the IR transformers. In the future this
should only transform the delta of one Transaction instead of the whole Module.

This fixes the libc++ issue we worked around by
templates' symbols are not exported anymore and cause missing symbols with
XCode 5.1.

We include ObjC passes even though this blows up the list of linked libraries to
make it easier to port cling to ObjC(++).
2014-03-28 15:51:03 +01:00
Vassil Vassilev
4d5e607256 Merge unloadTransaction and rollbackTransaction. 2014-03-24 14:25:58 +01:00
Vassil Vassilev
cad76c3090 Reset diags is done in the node eraser. 2014-03-24 14:25:58 +01:00
Axel Naumann
7390550dfe Add comment explaining (part of) the bootstrap sequencing. 2014-03-23 21:13:54 +01:00
Vassil Vassilev
887645367e Pass in codegen. 2014-03-14 10:52:29 +01:00
Axel Naumann
5045248a76 Dealy running static init until gCling is defined; local_cxa_atexit() needs it. 2014-03-04 19:55:00 +01:00
Vassil Vassilev
f29b09e054 Remove .printIR and replace it with smarter debug class reusing the latest state tracker. 2014-03-03 15:27:04 +01:00
Vassil Vassilev
2ecd78a0aa Move the callback invocation in the interpreter. 2014-03-03 15:27:04 +01:00
Vassil Vassilev
a6c682a670 Add more handy interface. 2014-02-27 12:49:13 +01:00
Vassil Vassilev
98283abd49 Replace the craftwork with the sophisticated node eraser. 2014-02-27 12:49:12 +01:00
Vassil Vassilev
1bf7c49086 Move unloading of N transactions outside IncrementalParser 2014-02-27 12:49:11 +01:00
Vassil Vassilev
9afad24a05 Pop back in the worker routine. 2014-02-27 12:49:11 +01:00
Vassil Vassilev
dc6a46c67d Enforce more integrity. 2014-02-27 12:49:11 +01:00
Vassil Vassilev
db34098f9e 80cols. 2014-02-20 10:36:10 +01:00
Vassil Vassilev
19c381562d Update all references of ReturnSynthesizer. 2014-02-18 17:22:59 +01:00
Axel Naumann
d599d45802 Must emit static variables from template instantiations (ROOT-6015).
This correpsonds to the call to CodeGen::HandleCXXStaticMemberVarInstantiation().
2014-02-14 10:25:08 +01:00
Vassil Vassilev
968528bbb4 Allow the unloading even in -fsyntax-only mode. At least for verification purposes it is very useful. 2014-02-06 14:50:57 +01:00
Vassil Vassilev
e5a0df500e Add support for C tentative definitions. 2014-02-06 14:50:57 +01:00
Axel Naumann
6bb75e4f62 Missing include for UsedAttr 2014-01-15 15:52:57 +01:00
Axel Naumann
04424faa35 Template instantiations are weak symbols (ROOT-5838). 2014-01-15 10:06:15 +01:00
Axel Naumann
44481ace1e Fix license; remove $Id$ version. 2014-01-07 11:14:04 +01:00
Vassil Vassilev
51d27bf1e5 Improve uncaching of unloaded files.
*Merge PreVisitDecl and PreVisitMacro and rename to CollectFilesToUncache.
*Add FID to the transaction storing the memory buffer file ID caused the
transaction.
2013-12-06 12:03:33 +01:00
Axel Naumann
67f5e5bf64 Add option to disable rollback. Handle missing ExecEngine. 2013-12-02 13:53:30 +01:00
Vassil Vassilev
26290c9b4c On teardown we delete the transactions in the pool, too. 2013-11-27 15:46:59 +01:00
Vassil Vassilev
d74740df1d Size doesn't make sense for a transaction. Iteration doesn't cause side effects anymore. 2013-11-25 17:32:56 +01:00
Vassil Vassilev
a0912520ee Reduce the hacky-ness of the state collector setup.
The second compilerInstance doesn't need to collect anything, thus we don't
need to attach it to the PP.
2013-11-25 13:56:02 +01:00
Vassil Vassilev
4e19547a50 The static consts end up in the lib's datasection, we need to force generation of the symbol. 2013-11-22 09:27:05 +01:00
Vassil Vassilev
f35b70cc1a When the initializer is trivially foldable we must not ignore emission. 2013-11-20 09:31:02 +01:00
Vassil Vassilev
3acc2f6716 Predecrement instead of postdecrement. 2013-10-29 22:18:58 +01:00
Vassil Vassilev
7bafd3c45e Set the transaction state to unloaded in the unloader not outside. 2013-10-29 22:18:58 +01:00
Vassil Vassilev
f9b132160d Allow unloaded/rolledback transactions to be returned even not empty in the pool. 2013-10-29 21:19:55 +01:00
Vassil Vassilev
2b757093b6 Release the unloaded transaction. 2013-10-29 20:19:27 +01:00
Vassil Vassilev
91c54bda2e Add more handy interface that takes a number of transactions to be rolled back. 2013-10-29 20:19:25 +01:00
Vassil Vassilev
6b2658d4ac If the transaction contains no useful code return to the pool.
This can happen in many cases such as parsing comments for example.
2013-10-29 20:19:15 +01:00
Vassil Vassilev
0b3c13cd0d Unload global values (global variables)
When executable code is generated from the llvm::Module the JIT stores the
GlobalValue, Address in a map. This map is used to 'lock' the GlobalValue, so
that it doesn't go out of sync. If we want to 'unload' it we first need to
update the global mapping so that the JIT/ExecutionEngine 'forgets' about the
mapping.
2013-10-29 20:19:10 +01:00
Vassil Vassilev
43c2ba8d0c Let the implicit auto fixer generate a decl stmt.
Usually the decls and stmts are linked-in through a DeclStmt. In the case of the
implicit auto keyword we cannot make the parser/sema generate a DeclStmt,
because it already has taken the path of parsing an expression. Instead we add
a DeclRefExpr referring the implicit auto declaration.

This DeclRefExpr is very important because it gives information where to
initialize the variable, i.e in which order. The implicit autofixer objective is
to find the first DeclRefExpr (there might be many) referring to the implicit
auto declaration and replace it with a proper DeclStmt.
2013-10-14 09:11:40 +02:00
Vassil Vassilev
6c51340d51 Implement implicit auto keyword injection in clang itself. 2013-10-14 09:11:38 +02:00
Axel Naumann
68c8bb74e8 By Vassil: update to current llvm. 2013-09-26 17:54:19 +02:00
Philippe Canal
285a6f151b No need to unload rolled back transactions 2013-09-20 06:50:00 +02:00
Philippe Canal
cde2785b96 Avoid assert in rootcling/genreflex just because there is a user error 2013-09-15 22:16:55 +02:00
Axel Naumann
b8adbb24b5 DGRs can have a decl to be emitted, another not to be emitted.
When this oce comes from a #include through ParseForModules():
class A{} g;
A should be emitted, but not g.
This is now tested in roottest/root/meta/templateAutoload.
2013-09-13 10:44:52 +02:00
Vassil Vassilev
e92c7da7c3 Use better name. 2013-09-11 13:50:57 +02:00