aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SafeStack.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-10-17Test commit.Michael LeMay1-1/+1
llvm-svn: 284411
2016-10-14[safestack] Use non-thread-local unsafe stack pointer for Contiki OSDavid L Kreitzer1-49/+1
Patch by Michael LeMay Differential revision: http://reviews.llvm.org/D19852 llvm-svn: 284254
2016-10-13[safestack] Reapply r283248 after moving X86-targeted SafeStack tests intoDavid L Kreitzer1-7/+6
the X86 subdirectory. Original commit message: Requires a valid TargetMachine to be passed to the SafeStack pass. Patch by Michael LeMay Differential revision: http://reviews.llvm.org/D24896 llvm-svn: 284161
2016-10-08Turn cl::values() (for enum) from a vararg function to using C++ variadic ↵Mehdi Amini1-2/+1
template The core of the change is supposed to be NFC, however it also fixes what I believe was an undefined behavior when calling: va_start(ValueArgs, Desc); with Desc being a StringRef. Differential Revision: https://reviews.llvm.org/D25342 llvm-svn: 283671
2016-10-04Revert r283248. It caused failures in the hexagon buildbots.David L Kreitzer1-6/+7
llvm-svn: 283254
2016-10-04[safestack] Requires a valid TargetMachine to be passed to the SafeStack pass.David L Kreitzer1-7/+6
Patch by Michael LeMay Differential revision: http://reviews.llvm.org/D24896 llvm-svn: 283248
2016-07-26[safestack] Fix stack guard live range.Evgeniy Stepanov1-1/+1
Stack guard slot is live throughout the function. llvm-svn: 276712
2016-06-29StackColoring for SafeStack.Evgeniy Stepanov1-38/+50
This is a fix for PR27842. An IR-level implementation of stack coloring tailored to work with SafeStack. It is a bit weaker than the MI implementation in that it does not the "lifetime start at first access" logic. This can be improved in the future. This patch also replaces the naive implementation of stack frame layout with a greedy algorithm that can split existing stack slots and even fit small objects inside the alignment padding of other objects. llvm-svn: 274162
2016-06-23Fix doubly included headerMatt Arsenault1-1/+0
llvm-svn: 273528
2016-06-16[safestack] Sink unsafe address computation to each use.Evgeniy Stepanov1-8/+31
This is a fix for PR27844. When replacing uses of unsafe allocas, emit the new location immediately after each use. Without this, the pointer stays live from the function entry to the last use, while it's usually cheaper to recalculate. llvm-svn: 272969
2016-06-16[safestack] Fixup llvm.dbg.value when rewriting unsafe allocas.Evgeniy Stepanov1-0/+1
When moving unsafe allocas to the unsafe stack, dbg.declare intrinsics are updated to refer to the new location. This change does the same to dbg.value intrinsics. llvm-svn: 272968
2016-04-11[safestack] Add canary to unsafe stack framesEvgeniy Stepanov1-19/+76
Add StackProtector to SafeStack. This adds limited protection against data corruption in the caller frame. Current implementation treats all stack protector levels as -fstack-protector-all. llvm-svn: 266004
2016-02-02[safestack] Make sure the unsafe stack pointer is popped in all casesAnna Zaks1-27/+26
The unsafe stack pointer is only popped in moveStaticAllocasToUnsafeStack so it won't happen if there are no static allocas. Fixes https://llvm.org/bugs/show_bug.cgi?id=26122 Differential Revision: http://reviews.llvm.org/D16339 llvm-svn: 259447
2016-01-27Move SafeStack to CodeGen.Benjamin Kramer1-0/+760
It depends on the target machinery, that's not available for instrumentation passes. llvm-svn: 258942