1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

36 Commits

Author SHA1 Message Date
Craig Topper
1e9dc30d4e More const correcting of stack coloring.
llvm-svn: 175490
2013-02-19 06:02:40 +00:00
Craig Topper
a6b4d1e45a Const-correct the stack coloring code.
llvm-svn: 175488
2013-02-19 05:32:02 +00:00
Craig Topper
1158149e4a Avoid extra DenseMap lookups in StackColoring::calculateLocalLiveness.
llvm-svn: 175487
2013-02-19 04:47:31 +00:00
Craig Topper
afb33dbcc7 Make the dump() function const and reduce the number of hash lookups it performs.
llvm-svn: 175485
2013-02-19 03:14:22 +00:00
Craig Topper
4d243629d2 Use a reference into the BlockLiveness DenseMap to avoid repeated hash lookups in collectMarkers.
llvm-svn: 175484
2013-02-19 03:06:17 +00:00
Edwin Vane
fafd787d1f Fixing warnings revealed by gcc release build
Fixed set-but-not-used warnings.

Reviewer: gribozavr
llvm-svn: 173810
2013-01-29 17:42:24 +00:00
Jakob Stoklund Olesen
10c1e03917 Move MachineTraceMetrics.h into include/llvm/CodeGen.
Let targets use it.

llvm-svn: 172688
2013-01-17 01:06:04 +00:00
Chandler Carruth
4c1f3c24db Move all of the header files which are involved in modelling the LLVM IR
into their new header subdirectory: include/llvm/IR. This matches the
directory structure of lib, and begins to correct a long standing point
of file layout clutter in LLVM.

There are still more header files to move here, but I wanted to handle
them in separate commits to make tracking what files make sense at each
layer easier.

The only really questionable files here are the target intrinsic
tablegen files. But that's a battle I'd rather not fight today.

I've updated both CMake and Makefile build systems (I think, and my
tests think, but I may have missed something).

I've also re-sorted the includes throughout the project. I'll be
committing updates to Clang, DragonEgg, and Polly momentarily.

llvm-svn: 171366
2013-01-02 11:36:10 +00:00
Roman Divacky
a299a2efa5 Remove duplicate includes.
llvm-svn: 170902
2012-12-21 17:06:44 +00:00
Chandler Carruth
a490793037 Use the new script to sort the includes of every file under lib.
Sooooo many of these had incorrect or strange main module includes.
I have manually inspected all of these, and fixed the main module
include to be the nearest plausible thing I could find. If you own or
care about any of these source files, I encourage you to take some time
and check that these edits were sensible. I can't have broken anything
(I strictly added headers, and reordered them, never removed), but they
may not be the headers you'd really like to identify as containing the
API being implemented.

Many forward declarations and missing includes were added to a header
files to allow them to parse cleanly when included first. The main
module rule does in fact have its merits. =]

llvm-svn: 169131
2012-12-03 16:50:05 +00:00
Ulrich Weigand
8bf374a2e3 Use std::stable_sort instead of std::sort when sorting stack slots
to guarantee deterministic code generation.

llvm-svn: 168074
2012-11-15 19:33:30 +00:00
Sebastian Pop
2e267f64cb Clear unknown mem ops when merging stack slots (pr14090)
When merging stack slots, if StackColoring::remapInstructions gets a
value back from GetUnderlyingObject that it does not know about or is
not itself a stack slot, clear the memory operand in case it aliases
the merged slot. This prevents the introduction of incorrect aliasing
information.

Author:    Matthew Curtis <mcurtis@codeaurora.org>
llvm-svn: 166216
2012-10-18 19:53:48 +00:00
Sebastian Pop
23cbb6a693 Change MachineFrameInfo::StackObject::Alloca from Value* to AllocaInst*
This more accurately reflects what is actually being stored in the
field.

No functionality change intended.

Author:    Matthew Curtis <mcurtis@codeaurora.org>
llvm-svn: 166215
2012-10-18 19:53:45 +00:00
Nadav Rotem
e6050a85c4 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
e36599a998 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
f2d805d1a9 Fix a typo.
llvm-svn: 163801
2012-09-13 14:51:00 +00:00
Nadav Rotem
9d75120c92 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
71183ed37c 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
da5869fc42 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
64c3cf5b29 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
d399d17563 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
27e7d654e0 Enable stack coloring.
llvm-svn: 163617
2012-09-11 13:48:35 +00:00
Nadav Rotem
54b95cb654 Stack Coloring: Dont crash on dbg values which use stack frames.
llvm-svn: 163616
2012-09-11 12:34:27 +00:00
Dmitri Gribenko
1d75adbbb2 Remove redundant semicolons which are null statements.
llvm-svn: 163547
2012-09-10 21:26:47 +00:00
Nadav Rotem
3fc7763c99 Disable stack coloring because it makes dragonegg fail bootstrapping.
llvm-svn: 163545
2012-09-10 21:17:58 +00:00
Nadav Rotem
bc8f2b49c9 Enable stack coloring.
llvm-svn: 163539
2012-09-10 20:15:49 +00:00
Nadav Rotem
cab746695d 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
a271aaded5 Minor cleanup. No functional change.
llvm-svn: 163510
2012-09-10 13:20:00 +00:00
Nadav Rotem
cb9794b1c7 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
42f7a4f93a 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
d5b75d5eec 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
edd576d454 Fix a typo in the comment.
llvm-svn: 163496
2012-09-10 08:51:46 +00:00
Nadav Rotem
917505e474 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
be07a8a840 Dont cast away const needlessly. Found by gcc48 -Wcast-qual.
llvm-svn: 163324
2012-09-06 15:42:13 +00:00
Nadav Rotem
8f64175704 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
f25e382cd2 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