History log of /external/llvm/lib/CodeGen/StackProtector.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
69d37fa6351d5fe2a97ea24a2d0d667a92f14a9c 05-Mar-2013 Bill Wendling <isanbard@gmail.com> Remove unused #includes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
e4957fb9b77a4fbdf711b9e5a722d107d86ccc50 23-Jan-2013 Bill Wendling <isanbard@gmail.com> Add the heuristic to differentiate SSPStrong from SSPRequired.

The requirements of the strong heuristic are:

* A Protector is required for functions which contain an array, regardless of
type or length.

* A Protector is required for functions which contain a structure/union which
contains an array, regardless of type or length. Note, there is no limit to
the depth of nesting.

* A protector is required when the address of a local variable (i.e., stack
based variable) is exposed. (E.g., such as through a local whose address is
taken as part of the RHS of an assignment or a local whose address is taken as
part of a function argument.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173231 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
114baee1fa017daefad2339c77b45b9ca3d79a41 23-Jan-2013 Bill Wendling <isanbard@gmail.com> Add the IR attribute 'sspstrong'.

SSPStrong applies a heuristic to insert stack protectors in these situations:

* A Protector is required for functions which contain an array, regardless of
type or length.

* A Protector is required for functions which contain a structure/union which
contains an array, regardless of type or length. Note, there is no limit to
the depth of nesting.

* A protector is required when the address of a local variable (i.e., stack
based variable) is exposed. (E.g., such as through a local whose address is
taken as part of the RHS of an assignment or a local whose address is taken as
part of a function argument.)

This patch implements the SSPString attribute to be equivalent to
SSPRequired. This will change in a subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
69e42dbd006c0afb732067ece7327988b1e24c01 11-Jan-2013 Benjamin Kramer <benny.kra@googlemail.com> Split TargetLowering into a CodeGen and a SelectionDAG part.

This fixes some of the cycles between libCodeGen and libSelectionDAG. It's still
a complete mess but as long as the edges consist of virtual call it doesn't
cause breakage. BasicTTI did static calls and thus broke some build
configurations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172246 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
0b8c9a80f20772c3793201ab5b251d3520b9cea3 02-Jan-2013 Chandler Carruth <chandlerc@gmail.com> 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
831737d329a727f53a1fb0572f7b7a8127208881 30-Dec-2012 Bill Wendling <isanbard@gmail.com> Remove the Function::getFnAttributes method in favor of using the AttributeSet
directly.

This is in preparation for removing the use of the 'Attribute' class as a
collection of attributes. That will shift to the AttributeSet class instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
034b94b17006f51722886b0f2283fb6fb19aca1f 19-Dec-2012 Bill Wendling <isanbard@gmail.com> Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
d04a8d4b33ff316ca4cf961e06c9e312eff8e64f 03-Dec-2012 Chandler Carruth <chandlerc@gmail.com> 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. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
6765834754cbb3cb0f15b4b15e98c5e73fa50066 09-Oct-2012 Bill Wendling <isanbard@gmail.com> Create enums for the different attributes.

We use the enums to query whether an Attributes object has that attribute. The
opaque layer is responsible for knowing where that specific attribute is stored.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165488 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
3574eca1b02600bac4e625297f4ecf745f4c4f32 08-Oct-2012 Micah Villmow <villmow@gmail.com> Move TargetData to DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
2c189061184925c6a8ecbb5a19e648b230a41c0e 26-Sep-2012 Bill Wendling <isanbard@gmail.com> Remove the `hasFnAttr' method from Function.

The hasFnAttr method has been replaced by querying the Attributes explicitly. No
intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
35907e98626b33f6406dc498201fc59ced282c8a 21-Aug-2012 Chad Rosier <mcrosier@apple.com> Add support for the --param ssp-buffer-size= driver option.
PR9673

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
a67eda76c0224ec272e2cc7cf919f4e6e213e275 17-Aug-2012 Bill Wendling <isanbard@gmail.com> Implement stack protectors for structures with character arrays in them.
<rdar://problem/10545247>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
6d86f3cdfc8d750d73f4a711ec74300fcb8644cb 13-Aug-2012 Bill Wendling <isanbard@gmail.com> Whitespace cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161788 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
1299422ee1e7834a8a697b2c915a8bfdada77246 07-Aug-2012 Bill Wendling <isanbard@gmail.com> For non-Darwin platforms, we want to generate stack protectors only for
character arrays. This is in line with what GCC does.
<rdar://problem/10529227>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
23d66a58b7900784a5808d24ce2d4a449f869aa8 23-Nov-2011 Bob Wilson <bob.wilson@apple.com> Enable stack protectors for all arrays, not just char arrays. rdar://5875909
Patch by Bill Wendling.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145097 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
db125cfaf57cc83e7dd7453de2d509bc8efd0e5e 18-Jul-2011 Chris Lattner <sabre@nondot.org> land David Blaikie's patch to de-constify Type, with a few tweaks.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
a3efbb15ddd5aa9006564cd79086723640084878 15-Jul-2011 Jay Foad <jay.foad@gmail.com> Convert CallInst and InvokeInst APIs to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
3f782f4d7586a4e644850ad4d05ef6a027aabc04 29-Mar-2011 Bill Wendling <isanbard@gmail.com> Inline check that's used only once.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128465 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
3c288b97879b975e75ae8eab69eee111f3bc3a43 29-Mar-2011 Bill Wendling <isanbard@gmail.com> Rework the logic (and removing the bad check for an unreachable block) so that
the FailBB dominator is correctly calculated. Believe it or not, there isn't a
functionality change here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128455 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
ad7d8a598b17452138c20f7a7acdcd7e1f0053d8 29-Mar-2011 Bill Wendling <isanbard@gmail.com> Don't try to add stack protector logic to a dead basic block. It messes up
dominator information.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
2d930db24f1d44a9d68c90cb7a1a58e76abd40da 29-Mar-2011 Bill Wendling <isanbard@gmail.com> In some cases, the "fail BB dominator" may be null after the BB was split (and
becomes reachable when before it wasn't). Check to make sure that it's not null
before trying to use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
53aac15a607d66926e586c7fc57634f6be4ef443 11-Mar-2011 Cameron Zwarich <zwarich@apple.com> Fix the GCC test suite issue exposed by r127477, which was caused by stack
protector insertion not working correctly with unreachable code. Since that
revision was rolled out, this test doesn't actual fail before this fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
80f6a507d4e11ba066ad0e53e12ad25ad8cf07ba 08-Jan-2011 Cameron Zwarich <zwarich@apple.com> Make more passes preserve dominators (or state that they preserve dominators if
they all ready do). This removes two dominator recomputations prior to isel,
which is a 1% improvement in total llc time for 403.gcc.

The only potentially suspect thing is making GCStrategy recompute dominators if
it used a custom lowering strategy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123064 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
081c34b725980f995be9080eaec24cd3dfaaf065 19-Oct-2010 Owen Anderson <resistor@mac.com> Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor. This function uses static dependency declarations to recursively initialize
the pass's dependencies.

Clients that only create passes through the createFooPass() APIs will require no changes. Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.

I have tested this with all standard configurations of clang and llvm-gcc on Darwin. It is possible that there are problems
with the static dependencies that will only be visible with non-standard options. If you encounter any crash in pass
registration/creation, please send the testcase to me directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
ce665bd2e2b581ab0858d1afe359192bac96b868 08-Oct-2010 Owen Anderson <resistor@mac.com> Now with fewer extraneous semicolons!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
90c579de5a383cee278acc3f7e7b9d0a656e6a35 06-Aug-2010 Owen Anderson <resistor@mac.com> Reapply r110396, with fixes to appease the Linux buildbot gods.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
1f74590e9d1b9cf0f1f81a156efea73f76546e05 06-Aug-2010 Owen Anderson <resistor@mac.com> Revert r110396 to fix buildbots.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
9ccaf53ada99c63737547c0235baeb8454b04e80 06-Aug-2010 Owen Anderson <resistor@mac.com> Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier. Clean up APIs related to this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
d13db2c59cc94162d6cf0a04187d408bfef6d4a7 22-Jul-2010 Owen Anderson <resistor@mac.com> Fix batch of converting RegisterPass<> to INTIALIZE_PASS().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
f8bd392dce26226249b99bc1fa8d112602da3e63 06-Jul-2010 Chris Lattner <sabre@nondot.org> tighten up this code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107670 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
f7a0c7bf8bc8318ed28d889c9a56437ab3e91385 06-Jul-2010 Eric Christopher <echristo@apple.com> Fix up -fstack-protector on linux to use the segment
registers. Split out testcases per architecture and os
now.

Patch from Nelson Elhage.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107640 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
b0bc6c361da9009e8414efde317d9bbff755f6c0 15-Feb-2010 Duncan Sands <baldrick@free.fr> Uniformize the names of type predicates: rather than having isFloatTy and
isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
8c65f6e71c1d46d823b9a884819992a9255edd54 05-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Move remaining stuff to the isInteger predicate.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92771 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
6726b6d75a8b679068a58cb954ba97cf9d1690ba 25-Oct-2009 Nick Lewycky <nicholas@mxc.ca> Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.
Chris claims we should never have visibility_hidden inside any .cpp file but
that's still not true even after this commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85042 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
dfd85c142f184ba3ce5562f0eed32a908c59c076 23-Oct-2009 Bill Wendling <isanbard@gmail.com> Neuter stack protectors by only checking character arrays. This is what GCC
does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
1d0be15f89cb5056e20e2d24faa8d6afb1573bca 13-Aug-2009 Owen Anderson <resistor@mac.com> Push LLVMContexts through the IntegerType APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
50dead06ffc107edb7e84857baaeeb09039c631c 16-Jul-2009 Owen Anderson <resistor@mac.com> Revert yesterday's change by removing the LLVMContext parameter to AllocaInst and MallocInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75863 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
9adc0abad3c3ed40a268ccbcee0c74cb9e1359fe 15-Jul-2009 Owen Anderson <resistor@mac.com> Move EVER MORE stuff over to LLVMContext.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
333c40096561218bc3597cf153c0a3895274414c 10-Jul-2009 Owen Anderson <resistor@mac.com> This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
777d2306b36816a53bc1ae1244c0dc7d998ae691 09-May-2009 Duncan Sands <baldrick@free.fr> Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71349 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
5601699d7c36b819179a7d89270100c34b3d0a32 06-Mar-2009 Bill Wendling <isanbard@gmail.com> When we split a basic block, there's a default branch to the newly created BB.
Delete this default branch, because we're going to generate our own.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
ceb4d1aecb9deffe59b3dcdc9a783ffde8477be9 12-Jan-2009 Duncan Sands <baldrick@free.fr> Rename getABITypeSize to getTypePaddedSize, as
suggested by Chris.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62099 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
5734450d40fe5546eb98c0d856d73c3321eaf5d2 18-Nov-2008 Bill Wendling <isanbard@gmail.com> Rename stackprotector_create intrinsic to stackprotector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
733bbc5320ac9d729caa8c0fe741dd516e7eda0b 18-Nov-2008 Bill Wendling <isanbard@gmail.com> Remove the stackprotector_check intrinsic. Use a volatile load instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59504 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
c3348a77f7e1bdc8e52a9f70fd190555df34d7c1 18-Nov-2008 Bill Wendling <isanbard@gmail.com> - Use "moveAfter" instead of "remove/insert" of a basic block.
- Use less indentation in coding.
- Shorten description.
- Update comments.
- Move code around


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59496 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
e9e6bdf27fca46dc9eca2ebdf73e03747d1859ab 13-Nov-2008 Bill Wendling <isanbard@gmail.com> Implement stack protectors as function attributes: "ssp" and "sspreq".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59202 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
22511ed2feeea786dba9fb5a07c0e6431dec0e32 11-Nov-2008 Bill Wendling <isanbard@gmail.com> Small simplification. Use the iterator already present as the insertion point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59008 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
7205677a46d02867004826218942dab3b466c926 10-Nov-2008 Bill Wendling <isanbard@gmail.com> - Make sure that we don't over-increment the iterator when going through the
basic blocks.
- Minor code clean-up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59002 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
b7c6ebcb4732302310cfaca81e1d26c3802c1646 07-Nov-2008 Bill Wendling <isanbard@gmail.com> - Modify the stack protector algorithm so that the stack slot is allocated in
LLVM IR code and not in the selection DAG ISel. This is a cleaner solution.

- Fix the heuristic for determining if protectors are necessary. The previous
one wasn't checking the proper type size.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58824 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
848693c254c1fc4d4956cbe1778b244bb035e0a0 07-Nov-2008 Bill Wendling <isanbard@gmail.com> Remove unneeded header file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
1fb615f820ee0ff415e78b25ef583a430c86a743 07-Nov-2008 Bill Wendling <isanbard@gmail.com> Don't build a vector of returns. Just modify the Function in the loop.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58822 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
703ccfe0538a30d674b52fdbb4f5debf9b062354 06-Nov-2008 Bill Wendling <isanbard@gmail.com> The size limit is for individual arrays. So if any array has more than 8 bytes
in it, then emit stack protectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58819 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
4c3a1d8d2be313f1b322f680801fec262a2480c6 06-Nov-2008 Bill Wendling <isanbard@gmail.com> - Rename stackprotector_{prologue,epilogue} to stackprotector_{create,check}.
- Get rid of "HasStackProtector" in MachineFrameInfo.
- Modify intrinsics to tell which are doing what with memory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58799 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
89c5cc6c793ca420194c94361e1c6dacb6d7c446 06-Nov-2008 Bill Wendling <isanbard@gmail.com> Adjust the stack protector heuristic to care about only arrays or calls to
"alloca".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58792 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
b2a4298ce41e7ef80cd75a3c1dfa6433f0759a1a 06-Nov-2008 Bill Wendling <isanbard@gmail.com> Implement the stack protector stack accesses via intrinsics:

- stackprotector_prologue creates a stack object and stores the guard there.

- stackprotector_epilogue reads the stack guard from the stack position created
by stackprotector_prologue.

- The PrologEpilogInserter was changed to make sure that the stack guard is
first on the stack frame.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
1508606ee80b9289d3c7c8121e67d9e744e2b4f2 05-Nov-2008 Bill Wendling <isanbard@gmail.com> Remove dead variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58741 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
fa75dc647cbe09c43169658106713a57409d0faf 05-Nov-2008 Bill Wendling <isanbard@gmail.com> Simplify the allocated size calculation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58740 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
f0eaa9a233e6162aab4b2a2b5bfc63d6f94b9384 05-Nov-2008 Bill Wendling <isanbard@gmail.com> Fix comment

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58739 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
613f77439eb6e1f660e615e0e851187da13255ae 05-Nov-2008 Bill Wendling <isanbard@gmail.com> Some code simplification. It now doesn't generate a prologue if the epilogue
isn't going to be generated.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58734 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
4a3a8511827ecdee7e606bdd4dc3733dcac41064 04-Nov-2008 Bill Wendling <isanbard@gmail.com> Small simplification of the stack guard type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58728 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
b7c2c1246f10972d5a8f55499226872608eb10f9 04-Nov-2008 Bill Wendling <isanbard@gmail.com> - Add a "getOrInsertGlobal" method to the Module class. This acts similarly to
"getOrInsertFunction" in that it either adds a new declaration of the global
and returns it, or returns the current one -- optionally casting it to the
correct type.
- Use the new getOrInsertGlobal in the stack protector code.
- Use "splitBasicBlock" in the stack protector code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58727 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
80a320d974dae7666157e80b141d7ff97e5f6544 04-Nov-2008 Bill Wendling <isanbard@gmail.com> Update in response to feedback from Chris:

- Use enums instead of magic numbers.

- Rework algorithm to use the bytes size from the target to determine when to
emit stack protectors.

- Get rid of "propolice" in any comments.

- Renamed an option to its expanded form.

- Other miscellanenous changes.

More changes will come after this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp
2b58ce5ab4e22e796303d68fb246d4031cb5d4ca 04-Nov-2008 Bill Wendling <isanbard@gmail.com> Initial checkin for stack protectors. Here's what it does:

* The prologue is modified to read the __stack_chk_guard global and insert it
onto the stack.

* The epilogue is modified to read the stored guard from the stack and compare
it to the original __stack_chk_guard value. If they differ, then the
__stack_chk_fail() function is called.

* The stack protector needs to be first on the stack (after the parameters) to
catch any stack-smashing activities.

Front-end support will follow after a round of beta testing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58673 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/StackProtector.cpp