summaryrefslogtreecommitdiff
path: root/lib/CodeGen/StackColoring.cpp
Commit message (Collapse)AuthorAge
* StackColoring: don't clear an instruction's mem operand if the underlyingAkira Hatanaka2013-05-14
| | | | | | | | | object is a PseudoSourceValue and PseudoSourceValue::isConstant returns true (i.e., points to memory that has a constant value). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181751 91177308-0d34-0410-b5e6-96231b3b80d8
* Couple more sets of tidying.Eric Christopher2013-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177920 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting.Eric Christopher2013-03-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177898 91177308-0d34-0410-b5e6-96231b3b80d8
* More const correcting of stack coloring.Craig Topper2013-02-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175490 91177308-0d34-0410-b5e6-96231b3b80d8
* Const-correct the stack coloring code.Craig Topper2013-02-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175488 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid extra DenseMap lookups in StackColoring::calculateLocalLiveness.Craig Topper2013-02-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175487 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the dump() function const and reduce the number of hash lookups it ↵Craig Topper2013-02-19
| | | | | | performs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175485 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a reference into the BlockLiveness DenseMap to avoid repeated hash ↵Craig Topper2013-02-19
| | | | | | lookups in collectMarkers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175484 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing warnings revealed by gcc release buildEdwin Vane2013-01-29
| | | | | | | | | Fixed set-but-not-used warnings. Reviewer: gribozavr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173810 91177308-0d34-0410-b5e6-96231b3b80d8
* Move MachineTraceMetrics.h into include/llvm/CodeGen.Jakob Stoklund Olesen2013-01-17
| | | | | | Let targets use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172688 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove duplicate includes.Roman Divacky2012-12-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170902 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-03
| | | | | | | | | | | | | | | | | 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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
* Use std::stable_sort instead of std::sort when sorting stack slotsUlrich Weigand2012-11-15
| | | | | | | to guarantee deterministic code generation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168074 91177308-0d34-0410-b5e6-96231b3b80d8
* Clear unknown mem ops when merging stack slots (pr14090)Sebastian Pop2012-10-18
| | | | | | | | | | | | 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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166216 91177308-0d34-0410-b5e6-96231b3b80d8
* Change MachineFrameInfo::StackObject::Alloca from Value* to AllocaInst*Sebastian Pop2012-10-18
| | | | | | | | | | | This more accurately reflects what is actually being stored in the field. No functionality change intended. Author: Matthew Curtis <mcurtis@codeaurora.org> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166215 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable the protection from escaped allocas in an attempt to find violating ↵Nadav Rotem2012-09-17
| | | | | | passes. This may break the buildbots. I plan to revert it in a few hours. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164024 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the flag which protects from escaped allocas, which may come from ↵Nadav Rotem2012-09-13
| | | | | | bugs in user code or in the compiler. Also, dont assert if the protection is not enabled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163807 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo.Nadav Rotem2012-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163801 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack Coloring: We have code that checks that all of the uses of allocasNadav Rotem2012-09-13
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163791 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a flag to disable the code that looks for allocas which escaped the ↵Nadav Rotem2012-09-12
| | | | | | lifetime regions. This is useful for debugging. No testcase because without this check we fail on assertions when finding escaped allocas. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163702 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable stack-coloring, in hope that the recent fixes will enable correct ↵Nadav Rotem2012-09-12
| | | | | | dragonegg self-hosting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163687 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack coloring: remove lifetime intervals which contain escaped allocas.Nadav Rotem2012-09-12
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163678 91177308-0d34-0410-b5e6-96231b3b80d8
* Dragonegg selfhost exposed additional cases where alloca usage moved outside ↵Nadav Rotem2012-09-11
| | | | | | of lifetime markers. Disabling the pass for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163623 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable stack coloring.Nadav Rotem2012-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163617 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack Coloring: Dont crash on dbg values which use stack frames.Nadav Rotem2012-09-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163616 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant semicolons which are null statements.Dmitri Gribenko2012-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163547 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable stack coloring because it makes dragonegg fail bootstrapping.Nadav Rotem2012-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163545 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable stack coloring.Nadav Rotem2012-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163539 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack Coloring: Handle the case where END markers come before BEGIN markers ↵Nadav Rotem2012-09-10
| | | | | | properly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163530 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup. No functional change.Nadav Rotem2012-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163510 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack Coloring: Debug prints to print the slot number and not the array index.Nadav Rotem2012-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163509 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack Coloring: When searching for disjoint regions, do not compare ↵Nadav Rotem2012-09-10
| | | | | | intervals twice or to theirself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163508 91177308-0d34-0410-b5e6-96231b3b80d8
* Stack Coloring: Add support for multiple regions of the same slot, within a ↵Nadav Rotem2012-09-10
| | | | | | single basic block. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163507 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in the comment.Nadav Rotem2012-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163496 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertion that the frame index is indeed inside the declared lifetime ↵Nadav Rotem2012-09-10
| | | | | | region. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163495 91177308-0d34-0410-b5e6-96231b3b80d8
* Dont cast away const needlessly. Found by gcc48 -Wcast-qual.Roman Divacky2012-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163324 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable stack coloring by default in order to resolve the i386 failures.Nadav Rotem2012-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163316 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new optimization pass: Stack Coloring, that merges disjoint static ↵Nadav Rotem2012-09-06
allocations (allocas). Allocas are known to be disjoint if they are marked by disjoint lifetime markers (@llvm.lifetime.XXX intrinsics). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163299 91177308-0d34-0410-b5e6-96231b3b80d8