1. The "JITState" object creates a PassManager with the ModuleProvider that the
jit is created with. If the ModuleProvider is removed and deleted, the
PassManager is invalid.
2. The Global maps in the JIT were not invalidated with a ModuleProvider was
removed. This could lead to a case where the Module would be freed, and a
new Module with Globals at the same addresses could return invalid results.
llvm-svn: 51384
ScalarEvolution::deleteValueFromRecords on it before doing the
replaceAllUsesWith, because ScalarEvolution looks at the instruction's
users to find SCEV references to the instruction's SCEV object in its
internal maps.
Move all of LSR's loop-related state clearing after processing the loop
and before cleaning up dead PHI nodes. This eliminates all of LSR's SCEV
references just before the calls to ScalarEvolution::deleteValueFromRecords
so that when ScalarEvolution drops its own SCEV references, the reference
counts will reach zero and the SCEVs will be deleted immediately.
These changes fix some compiler aborts involving ScalarEvolution holding
onto and reusing SCEV objects for instructions that have been deleted.
No regression test unfortunately; because the symptoms were due to
dangling pointers, reduced testcases ended up being fairly arbitrary.
llvm-svn: 51359
in Sema, per discussion on mailing list. This doesn't cause any changes
in the test results. I'll probably add some more tests at some point,
but it's an open question what we need to accept to be compatible with
real code.
This doesn't touch the existing isConstantExpr method on Expr; that
should be addressed somehow eventually (either removed or refined to
whatever is appropriate).
llvm-svn: 51318
consensus was that it was fine; iso646 is trivial.
We actually don't need that many headers overall... on Ubuntu, at least,
all we need are stdint.h, stdarg.h, limits.h, and float.h to stop
depending on having gcc's headers around for normal code.
On a side note, the path searching needs some improvement; I had to
hardcode the path to my header directory into clang.cpp to get the
driver to use it consistently.
llvm-svn: 51317
as far as I can tell, and it fixes code like test/CodeGen/functions.c.
(Whatever performance effect it might have, crashing on a
construct like this isn't really acceptable; I've run into this
multiple times.)
llvm-svn: 51312
extend beyond the end of the function.
I'm not completely sure this is the right way to fix this bug, so
someone familiar with the parser should double-check.
llvm-svn: 51311
If local spiller optimization turns some instruction into an identity copy, it will be removed. If the output register happens to be dead (and source is obviously killed), transfer the kill / dead information to last use / def in the same MBB.
llvm-svn: 51306