Nadav Rotem
2ae810a51f
Disable the protection from escaped allocas in an attempt to find violating passes. This may break the buildbots. I plan to revert it in a few hours.
...
llvm-svn: 164024
2012-09-17 10:21:55 +00:00
Nadav Rotem
77a09ebbeb
Rename the flag which protects from escaped allocas, which may come from bugs in user code or in the compiler. Also, dont assert if the protection is not enabled.
...
llvm-svn: 163807
2012-09-13 15:46:30 +00:00
Nadav Rotem
2bd25fed29
Fix a typo.
...
llvm-svn: 163801
2012-09-13 14:51:00 +00:00
Nadav Rotem
4e9ad06617
Stack Coloring: We have code that checks that all of the uses of allocas
...
are within the lifetime zone. Sometime legitimate usages of allocas are
hoisted outside of the lifetime zone. For example, GEPS may calculate the
address of a member of an allocated struct. This commit makes sure that
we only check (abort regions or assert) for instructions that read and write
memory using stack frames directly. Notice that by allowing legitimate
usages outside the lifetime zone we also stop checking for instructions
which use derivatives of allocas. We will catch less bugs in user code
and in the compiler itself.
llvm-svn: 163791
2012-09-13 12:38:37 +00:00
Nadav Rotem
9566ca9af8
Add a flag to disable the code that looks for allocas which escaped the lifetime regions. This is useful for debugging. No testcase because without this check we fail on assertions when finding escaped allocas.
...
llvm-svn: 163702
2012-09-12 11:06:26 +00:00
Nadav Rotem
b9e2202049
Enable stack-coloring, in hope that the recent fixes will enable correct dragonegg self-hosting.
...
llvm-svn: 163687
2012-09-12 07:58:35 +00:00
Nadav Rotem
8ff00989fc
Stack coloring: remove lifetime intervals which contain escaped allocas.
...
The input program may contain intructions which are not inside lifetime
markers. This can happen due to a bug in the compiler or due to a bug in
user code (for example, returning a reference to a local variable).
This commit adds checks that all of the instructions in the function and
invalidates lifetime ranges which do not contain all of the instructions.
llvm-svn: 163678
2012-09-12 04:57:37 +00:00
Nadav Rotem
42b641c879
Dragonegg selfhost exposed additional cases where alloca usage moved outside of lifetime markers. Disabling the pass for now.
...
llvm-svn: 163623
2012-09-11 15:40:27 +00:00
Nadav Rotem
4464613ceb
Enable stack coloring.
...
llvm-svn: 163617
2012-09-11 13:48:35 +00:00
Nadav Rotem
65ba95ebf9
Stack Coloring: Dont crash on dbg values which use stack frames.
...
llvm-svn: 163616
2012-09-11 12:34:27 +00:00
Dmitri Gribenko
ca1e27be0d
Remove redundant semicolons which are null statements.
...
llvm-svn: 163547
2012-09-10 21:26:47 +00:00
Nadav Rotem
5a72a23a70
Disable stack coloring because it makes dragonegg fail bootstrapping.
...
llvm-svn: 163545
2012-09-10 21:17:58 +00:00
Nadav Rotem
107faf853b
Enable stack coloring.
...
llvm-svn: 163539
2012-09-10 20:15:49 +00:00
Nadav Rotem
3c86b78ae4
Stack Coloring: Handle the case where END markers come before BEGIN markers properly.
...
llvm-svn: 163530
2012-09-10 18:51:09 +00:00
Nadav Rotem
ba9a03f279
Minor cleanup. No functional change.
...
llvm-svn: 163510
2012-09-10 13:20:00 +00:00
Nadav Rotem
d62287dc91
Stack Coloring: Debug prints to print the slot number and not the array index.
...
llvm-svn: 163509
2012-09-10 13:17:58 +00:00
Nadav Rotem
ed242a0f1c
Stack Coloring: When searching for disjoint regions, do not compare intervals twice or to theirself.
...
llvm-svn: 163508
2012-09-10 12:47:38 +00:00
Nadav Rotem
6731363185
Stack Coloring: Add support for multiple regions of the same slot, within a single basic block.
...
llvm-svn: 163507
2012-09-10 12:39:35 +00:00
Nadav Rotem
2f41ff93e6
Fix a typo in the comment.
...
llvm-svn: 163496
2012-09-10 08:51:46 +00:00
Nadav Rotem
28e6f8c1fc
Add an assertion that the frame index is indeed inside the declared lifetime region.
...
llvm-svn: 163495
2012-09-10 08:44:15 +00:00
Roman Divacky
4717a8d654
Dont cast away const needlessly. Found by gcc48 -Wcast-qual.
...
llvm-svn: 163324
2012-09-06 15:42:13 +00:00
Nadav Rotem
9e3cc9f884
Disable stack coloring by default in order to resolve the i386 failures.
...
llvm-svn: 163316
2012-09-06 14:27:06 +00:00
Nadav Rotem
7c277da364
Add a new optimization pass: Stack Coloring, that merges disjoint static allocations (allocas). Allocas are known to be
...
disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics).
llvm-svn: 163299
2012-09-06 09:17:37 +00:00